Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f42484bc
authored
2023-03-27 14:10:14 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:样式的整理
1 parent
41912b00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
README.md
src/layout1/components/Sidebar/index.vue
src/permission.js
README.md
View file @
f42484b
...
...
@@ -19,4 +19,6 @@ npm install --registry=https://registry.npm.taobao.org
-
`docs`
文档/注释
-
`chore`
依赖更新/脚手架配置修改等
-
`wip`
开发中
\ No newline at end of file
## 项目换肤
给html根标签设置一个data-theme属性,然后通过js切换data-theme的属性值,Scss根据此属性来判断使用对应主题变量
\ No newline at end of file
...
...
src/layout1/components/Sidebar/index.vue
View file @
f42484b
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-2
4 17:10:32
* @LastEditTime: 2023-03-2
7 14:09:57
-->
<
template
>
<div>
...
...
@@ -48,9 +48,6 @@ export default {
asyncRoutes
()
{
return
asyncRoutes
}
},
mounted
()
{
console
.
log
(
this
.
permission_routes
.
slice
(
5
),
'permission_routes'
);
}
}
</
script
>
...
...
src/permission.js
View file @
f42484b
...
...
@@ -16,7 +16,6 @@ NProgress.configure({ showSpinner: false });
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
getTheme
()
NProgress
.
start
();
window
.
document
.
documentElement
.
setAttribute
(
"data-theme"
,
'blue'
);
document
.
title
=
getPageTitle
(
to
.
meta
.
title
);
let
hasAddDict
=
store
.
state
.
dict
.
addDict
;
let
hasUser
=
store
.
state
.
user
.
hasUser
;
...
...
@@ -55,6 +54,7 @@ router.beforeEach(async (to, from, next) => {
}
else
{
next
();
}
window
.
document
.
documentElement
.
setAttribute
(
"data-theme"
,
'blue'
);
}
}
else
{
if
(
code
==
'BDCSBPT'
)
{
...
...
Please
register
or
sign in
to post a comment