Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-26 10:48:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7431e577fa3b6bfd33a3a54976cf589d244f4837
7431e577
1 parent
ec511d6c
入口页面监听标题变化优化
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
src/App.vue
src/App.vue
View file @
7431e57
...
...
@@ -10,22 +10,20 @@
<script setup lang="ts">
import
{
mainStore,
useTitle
}
from
'@/utils/generatePackage'
import
{
storeToRefs
}
from
'pinia'
import
{
computed,
ref,
watch
}
from
'vue'
;
import
{
computed,
watchEffect
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
//
会根据配置判断是否显示调试控件
import
vConsole
from
'@/utils/vconsole'
//
使用
include
+
pinia
状态管理动态缓存页面
const
store
=
mainStore
()
const
keepPages
=
computed
(()
=
>
{
return
store
.
getKeepPages
})
//
设置页面标题
const
$route
=
useRoute
();
watch
(
()
=
>
$route
.
path,
watchEffect
(
()
=
>
{
useTitle
(
$route
.
meta
.
title
)
}
...
...
Please
register
or
login
to post a comment