File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,13 @@ function tabClick(val: number | string = 0, delay = true) {
29
29
}
30
30
setTimeout (
31
31
() => {
32
+ const parsedUrl = new URL (fullPath , window .location .origin ) // 使用当前域名和路径
33
+ const path = parsedUrl .pathname
34
+ const query = Object .fromEntries (new URLSearchParams (parsedUrl .search ) as any )
35
+
32
36
router .push ({
33
- fullPath ,
37
+ path ,
38
+ query ,
34
39
})
35
40
},
36
41
delay ? 200 : 0 ,
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ const { tabs } = useStore('app')
4
4
const router = useRouter ()
5
5
const routes = router .getRoutes ()
6
6
const needCacheRouteNames = routes
7
- .filter ((item ) => item .meta && ! item .meta .notCache )
8
- .map ((item ) => item .fullPath )
7
+ .filter ((item ) => item .name && item . meta && ! item .meta .notCache )
8
+ .map ((item ) => item .name )
9
9
10
10
const cacheList = computed (() => {
11
11
const arr = tabs .value
You can’t perform that action at this time.
0 commit comments