fix: 修复使用season_id搜索时,panel的状态未重置的问题

This commit is contained in:
lanyeeee
2025-08-22 04:45:58 +08:00
parent 7cafb754ae
commit 2053ca439e
2 changed files with 9 additions and 0 deletions
@@ -104,6 +104,11 @@ watch(
async () => {
const episode = props.bangumiResult.ep
if (episode === null) {
currentTabIndex.value = 0
selectedIds.value.clear()
checkedIds.value.clear()
selectionAreaRef.value?.selection?.clearSelection()
selectionAreaRef.value?.$el.scrollTo({ top: 0, behavior: 'instant' })
return
}
@@ -90,6 +90,10 @@ watch(
async () => {
const ep = props.cheeseResult.ep
if (ep === null) {
selectedIds.value.clear()
checkedIds.value.clear()
selectionAreaRef.value?.selection?.clearSelection()
selectionAreaRef.value?.$el.scrollTo({ top: 0, behavior: 'instant' })
return
}
selectedIds.value = new Set([ep.id])