File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 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) {
2929 }
3030 setTimeout (
3131 () => {
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+
3236 router .push ({
33- fullPath ,
37+ path ,
38+ query ,
3439 })
3540 },
3641 delay ? 200 : 0 ,
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ const { tabs } = useStore('app')
44const router = useRouter ()
55const routes = router .getRoutes ()
66const 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 )
99
1010const cacheList = computed (() => {
1111 const arr = tabs .value
You can’t perform that action at this time.
0 commit comments