Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-layout
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
packages
pro-layout
Commits
1b05b728
Commit
1b05b728
authored
May 15, 2020
by
liangliangyin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: colorWeak
parent
a7ad2fad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
index.jsx
src/components/SettingDrawer/index.jsx
+3
-8
dynamicTheme.js
src/utils/dynamicTheme.js
+6
-0
No files found.
src/components/SettingDrawer/index.jsx
View file @
1b05b728
...
@@ -6,7 +6,7 @@ import { Divider, Drawer, List, Switch, Button, Icon, Alert, message } from 'ant
...
@@ -6,7 +6,7 @@ import { Divider, Drawer, List, Switch, Button, Icon, Alert, message } from 'ant
import
BlockCheckbox
from
'./BlockCheckbox'
import
BlockCheckbox
from
'./BlockCheckbox'
import
ThemeColor
from
'./ThemeColor'
import
ThemeColor
from
'./ThemeColor'
import
LayoutSetting
,
{
renderLayoutSettingItem
}
from
'./LayoutChange'
import
LayoutSetting
,
{
renderLayoutSettingItem
}
from
'./LayoutChange'
import
{
updateTheme
}
from
'../../utils/dynamicTheme'
import
{
updateTheme
,
updateColorWeak
}
from
'../../utils/dynamicTheme'
import
{
genStringToTheme
}
from
'../../utils/util'
import
{
genStringToTheme
}
from
'../../utils/util'
import
CopyToClipboard
from
'vue-copy-to-clipboard'
import
CopyToClipboard
from
'vue-copy-to-clipboard'
...
@@ -105,17 +105,12 @@ const getThemeList = (i18nRender) => {
...
@@ -105,17 +105,12 @@ const getThemeList = (i18nRender) => {
}
}
const
handleChangeSetting
=
(
key
,
value
,
hideMessageLoading
)
=>
{
const
handleChangeSetting
=
(
key
,
value
,
hideMessageLoading
)
=>
{
if
(
key
===
'navTheme'
)
{
// 更新主题
}
if
(
key
===
'primaryColor'
)
{
if
(
key
===
'primaryColor'
)
{
// 更新主色调
// 更新主色调
updateTheme
(
value
)
updateTheme
(
value
)
}
}
if
(
key
===
'colorWeak'
)
{
if
(
key
===
'layout'
)
{
updateColorWeak
(
value
)
// 更新布局模式
// value === 'topmenu' ? 'Fixed' : 'Fluid'
}
}
}
}
...
...
src/utils/dynamicTheme.js
View file @
1b05b728
...
@@ -30,3 +30,9 @@ export const updateTheme = newPrimaryColor => {
...
@@ -30,3 +30,9 @@ export const updateTheme = newPrimaryColor => {
hideMessage
()
hideMessage
()
})
})
}
}
export
const
updateColorWeak
=
colorWeak
=>
{
// document.body.className = colorWeak ? 'colorWeak' : '';
const
app
=
document
.
body
.
querySelector
(
'#app'
)
colorWeak
?
app
.
classList
.
add
(
'colorWeak'
)
:
app
.
classList
.
remove
(
'colorWeak'
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment