diff --git a/public/test.html b/public/test.html index bd4e731..5902ffb 100644 --- a/public/test.html +++ b/public/test.html @@ -60,7 +60,15 @@ -
asdfladjflsdfsdlf
+
+ 测试啊哈哈,安居客圣诞节疯狂大水井坊 + 
+ 啊啊啊啊啊啊啊 +
+ bbbbbbbbbbbbbb +
+
+
一句歌词,哈哈
一句歌词,哈歌词歌词哈
diff --git a/src/App.vue b/src/App.vue index ebdd05d..64ca028 100644 --- a/src/App.vue +++ b/src/App.vue @@ -87,16 +87,16 @@ onUnmounted(() => { pubsub.unsubscribe(token); }); -const c = (item) => { - return ( - item.id == "playingList" || - item.id == "top" || - item.id == "footer" - ); -}; +const wpEl = ref('') const hideWins = (e) => { - if (showPlaying.value && e.path.findIndex(c) < 0) { + // console.log(e.clientX > 0,e, wpEl.value.clientWidth); + if (showPlaying.value + && e.clientX > 0 + && e.clientX < wpEl.value.clientWidth - 500 + && e.clientY > 40 + && e.clientY < wpEl.value.clientHeight - 64 + ) { showPlaying.value = false; } }; @@ -107,7 +107,7 @@ const hideWins = (e) => { :theme-overrides="store.state.theme.themeOverrides" > -
+
diff --git a/src/views/common/SongDetail.vue b/src/views/common/SongDetail.vue index 685933f..f1024ac 100644 --- a/src/views/common/SongDetail.vue +++ b/src/views/common/SongDetail.vue @@ -72,7 +72,7 @@ watch( // let elContent = document.getElementsByClassName('ly-content')[0] nextTick(()=>{ let el = document.getElementsByClassName('ly-key-lines')[val] - lyList.value.scrollTop = el.offsetTop - 100 + lyList.value.scrollTop = el.offsetTop - 100 - 6 }) } @@ -200,6 +200,7 @@ export default {};