hookehuyr

fix 修复音频滚动高度

......@@ -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;
......