Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
2755b514
Commit
2755b514
authored
May 26, 2019
by
hz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
867301ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
config/plugin.config.js
config/plugin.config.js
+12
-15
No files found.
config/plugin.config.js
View file @
2755b514
...
@@ -47,19 +47,16 @@ export default config => {
...
@@ -47,19 +47,16 @@ export default config => {
matchColors
:
getAntdSerials
(
'
#1890ff
'
),
// 主色系列
matchColors
:
getAntdSerials
(
'
#1890ff
'
),
// 主色系列
// 改变样式选择器,解决样式覆盖问题
// 改变样式选择器,解决样式覆盖问题
changeSelector
(
selector
)
{
changeSelector
(
selector
)
{
var
fix
=
{
switch
(
selector
)
{
'
.ant-calendar-today .ant-calendar-date
'
:
case
'
.ant-calendar-today .ant-calendar-date
'
:
'
:not(.ant-calendar-selected-date)
'
+
selector
,
return
'
:not(.ant-calendar-selected-date)
'
+
selector
;
'
.ant-btn:focus,.ant-btn:hover
'
:
selector
case
'
.ant-btn:focus,.ant-btn:hover
'
:
.
split
(
'
,
'
)
return
'
.ant-btn:focus:not(.ant-btn-primary),.ant-btn:hover:not(.ant-btn-primary)
'
;
.
map
(
s
=>
s
+
'
:not(.ant-btn-primary)
'
)
case
'
.ant-btn.active,.ant-btn:active
'
:
.
join
(
'
,
'
),
return
'
.ant-btn.active:not(.ant-btn-primary),.ant-btn:active:not(.ant-btn-primary)
'
;
'
.ant-btn.active,.ant-btn:active
'
:
selector
default
:
.
split
(
'
,
'
)
return
selector
;
.
map
(
s
=>
s
+
'
:not(.ant-btn-primary)
'
)
}
.
join
(
'
,
'
),
};
return
fix
[
selector
]
||
selector
;
},
},
},
},
]);
]);
...
@@ -106,10 +103,10 @@ export default config => {
...
@@ -106,10 +103,10 @@ export default config => {
};
};
function
getAntdSerials
(
color
)
{
function
getAntdSerials
(
color
)
{
const
colorPalettes
=
generate
(
color
);
// 淡化(即less的tint)
// 淡化(即less的tint)
const
lightens
=
new
Array
(
9
).
fill
().
map
((
t
,
i
)
=>
{
const
lightens
=
new
Array
(
9
).
fill
().
map
((
t
,
i
)
=>
{
return
ThemeColorReplacer
.
varyColor
.
lighten
(
color
,
i
/
10
);
return
ThemeColorReplacer
.
varyColor
.
lighten
(
color
,
i
/
10
);
});
});
return
colorPalettes
.
concat
(
lightens
);
const
colorPalettes
=
generate
(
color
);
return
lightens
.
concat
(
colorPalettes
);
}
}
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