style:样式的整理
Showing
3 changed files
with
5 additions
and
6 deletions
... | @@ -19,4 +19,6 @@ npm install --registry=https://registry.npm.taobao.org | ... | @@ -19,4 +19,6 @@ npm install --registry=https://registry.npm.taobao.org |
19 | - `docs` 文档/注释 | 19 | - `docs` 文档/注释 |
20 | - `chore` 依赖更新/脚手架配置修改等 | 20 | - `chore` 依赖更新/脚手架配置修改等 |
21 | - `wip` 开发中 | 21 | - `wip` 开发中 |
22 | |||
... | \ No newline at end of file | ... | \ No newline at end of file |
22 | |||
23 | ## 项目换肤 | ||
24 | 给html根标签设置一个data-theme属性,然后通过js切换data-theme的属性值,Scss根据此属性来判断使用对应主题变量 | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-24 17:10:32 | 4 | * @LastEditTime: 2023-03-27 14:09:57 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -48,9 +48,6 @@ export default { | ... | @@ -48,9 +48,6 @@ export default { |
48 | asyncRoutes () { | 48 | asyncRoutes () { |
49 | return asyncRoutes | 49 | return asyncRoutes |
50 | } | 50 | } |
51 | }, | ||
52 | mounted () { | ||
53 | console.log(this.permission_routes.slice(5), 'permission_routes'); | ||
54 | } | 51 | } |
55 | } | 52 | } |
56 | </script> | 53 | </script> | ... | ... |
... | @@ -16,7 +16,6 @@ NProgress.configure({ showSpinner: false }); | ... | @@ -16,7 +16,6 @@ NProgress.configure({ showSpinner: false }); |
16 | router.beforeEach(async (to, from, next) => { | 16 | router.beforeEach(async (to, from, next) => { |
17 | getTheme() | 17 | getTheme() |
18 | NProgress.start(); | 18 | NProgress.start(); |
19 | window.document.documentElement.setAttribute("data-theme", 'blue'); | ||
20 | document.title = getPageTitle(to.meta.title); | 19 | document.title = getPageTitle(to.meta.title); |
21 | let hasAddDict = store.state.dict.addDict; | 20 | let hasAddDict = store.state.dict.addDict; |
22 | let hasUser = store.state.user.hasUser; | 21 | let hasUser = store.state.user.hasUser; |
... | @@ -55,6 +54,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -55,6 +54,7 @@ router.beforeEach(async (to, from, next) => { |
55 | } else { | 54 | } else { |
56 | next(); | 55 | next(); |
57 | } | 56 | } |
57 | window.document.documentElement.setAttribute("data-theme", 'blue'); | ||
58 | } | 58 | } |
59 | } else { | 59 | } else { |
60 | if (code == 'BDCSBPT') { | 60 | if (code == 'BDCSBPT') { | ... | ... |
-
Please register or sign in to post a comment