Showing
4 changed files
with
13 additions
and
50 deletions
| 1 | +<!-- | ||
| 2 | + * @Author: hookehuyr hookehuyr@gmail.com | ||
| 3 | + * @Date: 2022-05-26 23:52:36 | ||
| 4 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 5 | + * @LastEditTime: 2022-05-31 10:09:23 | ||
| 6 | + * @FilePath: /tswj/src/App.vue | ||
| 7 | + * @Description: | ||
| 8 | +--> | ||
| 1 | <template> | 9 | <template> |
| 2 | <!-- 页面缓存 --> | 10 | <!-- 页面缓存 --> |
| 3 | <router-view v-slot="{ Component, route }"> | 11 | <router-view v-slot="{ Component, route }"> |
| ... | @@ -17,9 +25,7 @@ import vConsole from '@/utils/vconsole' | ... | @@ -17,9 +25,7 @@ import vConsole from '@/utils/vconsole' |
| 17 | 25 | ||
| 18 | // 使用 include + pinia 状态管理动态缓存页面 | 26 | // 使用 include + pinia 状态管理动态缓存页面 |
| 19 | const store = mainStore() | 27 | const store = mainStore() |
| 20 | -const keepPages = computed(() => { | 28 | +const keepPages = computed(() => store.getKeepPages) |
| 21 | - return store.getKeepPages | ||
| 22 | -}) | ||
| 23 | 29 | ||
| 24 | // 设置页面标题 | 30 | // 设置页面标题 |
| 25 | const $route = useRoute(); | 31 | const $route = useRoute(); |
| ... | @@ -28,6 +34,7 @@ watchEffect( | ... | @@ -28,6 +34,7 @@ watchEffect( |
| 28 | useTitle($route.meta.title) | 34 | useTitle($route.meta.title) |
| 29 | } | 35 | } |
| 30 | ) | 36 | ) |
| 37 | + | ||
| 31 | </script> | 38 | </script> |
| 32 | 39 | ||
| 33 | <style lang="less"> | 40 | <style lang="less"> | ... | ... |
| ... | @@ -12,36 +12,7 @@ const app = createApp(App); | ... | @@ -12,36 +12,7 @@ const app = createApp(App); |
| 12 | 12 | ||
| 13 | app.config.globalProperties.$http = axios; // 关键语句 | 13 | app.config.globalProperties.$http = axios; // 关键语句 |
| 14 | 14 | ||
| 15 | -app.use(pinia); | 15 | +app.use(pinia).use(router).use(Button).use(VanImage).use(Col).use(Row).use(Icon).use(Form).use(Field).use(CellGroup).use(Toast).use(Uploader).use(Empty).use(Tab).use(Tabs).use(Overlay).use(NumberKeyboard).use(Lazyload).use(List).use(PullRefresh).use(Popup).use(Picker).use(Sticky).use(Stepper).use(Tag).use(Swipe).use(SwipeItem).use(Dialog).use(ActionSheet).use(Loading); |
| 16 | -app.use(router); | ||
| 17 | -app.use(Button); | ||
| 18 | -app.use(VanImage); | ||
| 19 | -app.use(Col); | ||
| 20 | -app.use(Row); | ||
| 21 | -app.use(Icon); | ||
| 22 | -app.use(Form); | ||
| 23 | -app.use(Field); | ||
| 24 | -app.use(CellGroup); | ||
| 25 | -app.use(Toast); | ||
| 26 | -app.use(Uploader); | ||
| 27 | -app.use(Empty); | ||
| 28 | -app.use(Tab); | ||
| 29 | -app.use(Tabs); | ||
| 30 | -app.use(Overlay); | ||
| 31 | -app.use(NumberKeyboard); | ||
| 32 | -app.use(Lazyload); | ||
| 33 | -app.use(List); | ||
| 34 | -app.use(PullRefresh); | ||
| 35 | -app.use(Popup); | ||
| 36 | -app.use(Picker); | ||
| 37 | -app.use(Sticky); | ||
| 38 | -app.use(Stepper); | ||
| 39 | -app.use(Tag); | ||
| 40 | -app.use(Swipe); | ||
| 41 | -app.use(SwipeItem); | ||
| 42 | -app.use(Dialog); | ||
| 43 | -app.use(ActionSheet); | ||
| 44 | -app.use(Loading); | ||
| 45 | 16 | ||
| 46 | app.use(ConfigProvider); | 17 | app.use(ConfigProvider); |
| 47 | 18 | ... | ... |
| ... | @@ -221,7 +221,7 @@ | ... | @@ -221,7 +221,7 @@ |
| 221 | "@vue/compiler-core" "3.2.36" | 221 | "@vue/compiler-core" "3.2.36" |
| 222 | "@vue/shared" "3.2.36" | 222 | "@vue/shared" "3.2.36" |
| 223 | 223 | ||
| 224 | -"@vue/compiler-sfc@3.2.36", "@vue/compiler-sfc@^3.2.31": | 224 | +"@vue/compiler-sfc@3.2.36", "@vue/compiler-sfc@^3.2.31", "@vue/compiler-sfc@^3.2.36": |
| 225 | version "3.2.36" | 225 | version "3.2.36" |
| 226 | resolved "https://mirrors.tencent.com/npm/@vue%2fcompiler-sfc/-/compiler-sfc-3.2.36.tgz#e5065e7c0e5170ffa750e3c3dd93a29db109d0f2" | 226 | resolved "https://mirrors.tencent.com/npm/@vue%2fcompiler-sfc/-/compiler-sfc-3.2.36.tgz#e5065e7c0e5170ffa750e3c3dd93a29db109d0f2" |
| 227 | integrity sha512-AvGb4bTj4W8uQ4BqaSxo7UwTEqX5utdRSMyHy58OragWlt8nEACQ9mIeQh3K4di4/SX+41+pJrLIY01lHAOFOA== | 227 | integrity sha512-AvGb4bTj4W8uQ4BqaSxo7UwTEqX5utdRSMyHy58OragWlt8nEACQ9mIeQh3K4di4/SX+41+pJrLIY01lHAOFOA== |
| ... | @@ -237,22 +237,6 @@ | ... | @@ -237,22 +237,6 @@ |
| 237 | postcss "^8.1.10" | 237 | postcss "^8.1.10" |
| 238 | source-map "^0.6.1" | 238 | source-map "^0.6.1" |
| 239 | 239 | ||
| 240 | -"@vue/compiler-sfc@^3.2.36": | ||
| 241 | - version "3.2.36" | ||
| 242 | - resolved "https://mirrors.cloud.tencent.com/npm/@vue%2fcompiler-sfc/-/compiler-sfc-3.2.36.tgz#e5065e7c0e5170ffa750e3c3dd93a29db109d0f2" | ||
| 243 | - integrity sha512-AvGb4bTj4W8uQ4BqaSxo7UwTEqX5utdRSMyHy58OragWlt8nEACQ9mIeQh3K4di4/SX+41+pJrLIY01lHAOFOA== | ||
| 244 | - dependencies: | ||
| 245 | - "@babel/parser" "^7.16.4" | ||
| 246 | - "@vue/compiler-core" "3.2.36" | ||
| 247 | - "@vue/compiler-dom" "3.2.36" | ||
| 248 | - "@vue/compiler-ssr" "3.2.36" | ||
| 249 | - "@vue/reactivity-transform" "3.2.36" | ||
| 250 | - "@vue/shared" "3.2.36" | ||
| 251 | - estree-walker "^2.0.2" | ||
| 252 | - magic-string "^0.25.7" | ||
| 253 | - postcss "^8.1.10" | ||
| 254 | - source-map "^0.6.1" | ||
| 255 | - | ||
| 256 | "@vue/compiler-ssr@3.2.36": | 240 | "@vue/compiler-ssr@3.2.36": |
| 257 | version "3.2.36" | 241 | version "3.2.36" |
| 258 | resolved "https://mirrors.tencent.com/npm/@vue%2fcompiler-ssr/-/compiler-ssr-3.2.36.tgz#314f3a9424db58142c3608f48cbda7aa05fc66cb" | 242 | resolved "https://mirrors.tencent.com/npm/@vue%2fcompiler-ssr/-/compiler-ssr-3.2.36.tgz#314f3a9424db58142c3608f48cbda7aa05fc66cb" | ... | ... |
-
Please register or login to post a comment