diff --git a/src/pages/User/Characters.vue b/src/pages/User/Characters.vue index 66aee41c..cfb09c1f 100644 --- a/src/pages/User/Characters.vue +++ b/src/pages/User/Characters.vue @@ -144,6 +144,11 @@ watch(resetSelect, (val) => { text: "已重置筛选条件", color: "success", }); + selectIndex.value = selectedList.value.indexOf(dataVal.value); + if (selectIndex.value === -1) { + dataVal.value = selectedList.value[0]; + selectIndex.value = 0; + } } }); watch(showMode, (val) => { @@ -328,6 +333,8 @@ function handleSelect(val: SelectedCValue) { if (!selectedList.value.includes(dataVal.value)) { dataVal.value = selectedList.value[0]; selectIndex.value = 0; + } else { + selectIndex.value = selectedList.value.indexOf(dataVal.value); } }