hookehuyr

fix 修复音频滚动高度

...@@ -64,8 +64,7 @@ const onHeightChange = ({ height }) => { // 监听高度变化 ...@@ -64,8 +64,7 @@ const onHeightChange = ({ height }) => { // 监听高度变化
64 } 64 }
65 // 添加可滚动高度 65 // 添加可滚动高度
66 if (height === (0.2 * window.innerHeight)) { 66 if (height === (0.2 * window.innerHeight)) {
67 - let str = $('.audio-item').outerHeight() * (audio_list.value.length + 1.25); 67 + $('.audio-list').css('marginBottom', `${0.3 * window.innerHeight}px`);
68 - $('.audio-list').css('marginBottom', `${str}px`);
69 } 68 }
70 } 69 }
71 70
...@@ -83,8 +82,7 @@ watch( ...@@ -83,8 +82,7 @@ watch(
83 handleAudioPlay(audio_list.value[0], 0); 82 handleAudioPlay(audio_list.value[0], 0);
84 nextTick(() => { 83 nextTick(() => {
85 // 添加可滚动高度 84 // 添加可滚动高度
86 - let str = $('.audio-item').outerHeight() * (audio_list.value.length + 1.25); 85 + $('.audio-list').css('marginBottom', `${0.3 * window.innerHeight}px`);
87 - $('.audio-list').css('marginBottom', `${str}px`);
88 }) 86 })
89 } else { 87 } else {
90 onClose(); 88 onClose();
...@@ -291,6 +289,7 @@ onUnmounted(() => { // 离开页面时关闭音频播放 ...@@ -291,6 +289,7 @@ onUnmounted(() => { // 离开页面时关闭音频播放
291 289
292 <style lang="less" scoped> 290 <style lang="less" scoped>
293 .audio-list-page { 291 .audio-list-page {
292 + height: 100%;
294 .audio-item { 293 .audio-item {
295 display: flex; 294 display: flex;
296 align-items: center; 295 align-items: center;
......