Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-10-30 18:19:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ba04361c11f3d83800f4171b311add90ff09afa5
ba04361c
1 parent
80fa1e2b
fix 修复音频滚动高度
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
src/components/audioList.vue
src/components/audioList.vue
View file @
ba04361
...
...
@@ -64,8 +64,7 @@ const onHeightChange = ({ height }) => { // 监听高度变化
}
// 添加可滚动高度
if (height === (0.2 * window.innerHeight)) {
let str = $('.audio-item').outerHeight() * (audio_list.value.length + 1.25);
$('.audio-list').css('marginBottom', `${str}px`);
$('.audio-list').css('marginBottom', `${0.3 * window.innerHeight}px`);
}
}
...
...
@@ -83,8 +82,7 @@ watch(
handleAudioPlay(audio_list.value[0], 0);
nextTick(() => {
// 添加可滚动高度
let str = $('.audio-item').outerHeight() * (audio_list.value.length + 1.25);
$('.audio-list').css('marginBottom', `${str}px`);
$('.audio-list').css('marginBottom', `${0.3 * window.innerHeight}px`);
})
} else {
onClose();
...
...
@@ -291,6 +289,7 @@ onUnmounted(() => { // 离开页面时关闭音频播放
<style lang="less" scoped>
.audio-list-page {
height: 100%;
.audio-item {
display: flex;
align-items: center;
...
...
Please
register
or
login
to post a comment