mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-12 02:58:39 +08:00
fix: 修复切换 tab 页签后参数丢失的问题
同步 Gi Demo 升级
This commit is contained in:
@@ -33,9 +33,7 @@ const selectedKey = ref('0')
|
||||
watch(
|
||||
() => route.query,
|
||||
() => {
|
||||
if (route.query.type) {
|
||||
selectedKey.value = route.query.type as string
|
||||
}
|
||||
selectedKey.value = route.query.type as string || '0'
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
@@ -44,7 +42,7 @@ watch(
|
||||
|
||||
// 点击事件
|
||||
const onClickItem = (item: FileTypeListItem) => {
|
||||
router.push({ name: 'SystemFile', query: { type: item.value } })
|
||||
router.replace({ name: 'SystemFile', query: { type: item.value } })
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user