Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
shenshaokai
jinfa-platform
Commits
d6ed5d07
Commit
d6ed5d07
authored
Jul 20, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增动态主题开关控制
parent
6c71e37e
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
28 additions
and
39 deletions
+28
-39
README.md
README.md
+4
-2
config.ts
config/config.ts
+14
-5
lingxi.theme.config.ts
config/lingxi.theme.config.ts
+0
-0
theme.config.json
config/theme.config.json
+1
-1
package.json
package.json
+1
-2
level1@2x.png
public/static/imgs/level1@2x.png
+0
-0
level2@2x.png
public/static/imgs/level2@2x.png
+0
-0
level3@2x.png
public/static/imgs/level3@2x.png
+0
-0
vip1@2x.png
public/static/imgs/vip1@2x.png
+0
-0
vip2@2x.png
public/static/imgs/vip2@2x.png
+0
-0
vip3@2x.png
public/static/imgs/vip3@2x.png
+0
-0
vip4@2x.png
public/static/imgs/vip4@2x.png
+0
-0
OuterSide.tsx
src/layouts/components/OuterSide.tsx
+0
-21
MenuSlider.less
src/layouts/styles/MenuSlider.less
+1
-1
index.less
src/pages/member/memberImport/index.less
+3
-3
index.less
src/pages/member/memberLevel/index.less
+4
-4
No files found.
README.md
View file @
d6ed5d07
...
...
@@ -22,4 +22,6 @@
## 开发注意事项
1.
样式
-
全局样式需写在src/global/global.less下, 涉及到color, size之类的属性尽量变量化 并且储存在/styles/theme.less中
\ No newline at end of file
-
全局样式需写在src/global/global.less下, 涉及到color, size之类的属性尽量变量化 并且储存在/styles/theme.less中
"umi-plugin-antd-theme": "^2.1.2"
\ No newline at end of file
config/config.ts
View file @
d6ed5d07
import
{
defineConfig
}
from
'umi'
;
import
routes
from
'./router'
import
proxy
from
'./proxy'
import
theme
from
'./theme.config'
import
theme
from
'./
lingxi.
theme.config'
export
default
defineConfig
({
const
OPEN_THEME_BUILD
=
false
// 是否开启动态主题
const
config
:
any
=
{
title
:
'瓴犀开放平台'
,
// layout: {},
antd
:
{},
...
...
@@ -34,7 +36,7 @@ export default defineConfig({
logLevel
:
'info'
,
defaultSizes
:
'parsed'
,
// stat // gzip
},
inlineLimit
:
10000
,
// 自定义修改webpack配置
chainWebpack
(
memo
,
{
env
,
webpack
,
createCSSRule
})
{
},
...
...
@@ -71,5 +73,12 @@ export default defineConfig({
* https://umijs.org/zh-CN/config#theme
* 配置主题,实际上是配 less 变量。
*/
// theme,
});
theme
:
theme
}
if
(
OPEN_THEME_BUILD
)
{
config
.
plugins
=
[...
config
.
plugins
,
'umi-plugin-antd-theme'
]
delete
config
.
theme
}
export
default
defineConfig
(
config
);
config/theme.config.ts
→
config/
lingxi.
theme.config.ts
View file @
d6ed5d07
File moved
config/theme.config.json
View file @
d6ed5d07
...
...
@@ -10,7 +10,7 @@
}
],
"min"
:
true
,
"isModule"
:
tru
e
,
"isModule"
:
fals
e
,
"ignoreAntd"
:
false
,
"ignoreProLayout"
:
false
,
"cache"
:
true
...
...
package.json
View file @
d6ed5d07
...
...
@@ -50,7 +50,6 @@
"
fs-extra
"
:
"^9.0.1"
,
"
gulp
"
:
"^4.0.2"
,
"
json2ts
"
:
"^0.0.7"
,
"
ora
"
:
"^4.0.4"
,
"
umi-plugin-antd-theme
"
:
"^2.1.2"
"
ora
"
:
"^4.0.4"
}
}
public/static/imgs/level1@2x.png
0 → 100644
View file @
d6ed5d07
5.16 KB
public/static/imgs/level2@2x.png
0 → 100644
View file @
d6ed5d07
5.02 KB
public/static/imgs/level3@2x.png
0 → 100644
View file @
d6ed5d07
5.06 KB
public/static/imgs/vip1@2x.png
0 → 100644
View file @
d6ed5d07
1.69 KB
public/static/imgs/vip2@2x.png
0 → 100644
View file @
d6ed5d07
2.04 KB
public/static/imgs/vip3@2x.png
0 → 100644
View file @
d6ed5d07
2.11 KB
public/static/imgs/vip4@2x.png
0 → 100644
View file @
d6ed5d07
1.93 KB
src/layouts/components/OuterSide.tsx
View file @
d6ed5d07
...
...
@@ -46,28 +46,7 @@ const OuterSider: React.FC<OuterSiderProps> = (props) => {
</
li
>
))
}
</
ul
>
{
/* <Menu mode="inline" defaultSelectedKeys={['1']}>
<Menu.Item key="1">
通用
</Menu.Item>
<Menu.Item key="2">
渠道
</Menu.Item>
<Menu.Item key="3">
采购
</Menu.Item>
<Menu.Item key="4">
供应
</Menu.Item>
<Menu.Item key="5">
加工
</Menu.Item>
<Menu.Item key="6">
物流
</Menu.Item>
</Menu> */
}
</
Sider
>
</>
}
...
...
src/layouts/styles/MenuSlider.less
View file @
d6ed5d07
...
...
@@ -25,7 +25,7 @@
}
.wrapperSilder {
background-color: #38414A;
background-color: #38414A
!important
;
.menuBox {
padding: 0;
...
...
src/pages/member/memberImport/index.less
View file @
d6ed5d07
...
...
@@ -4,7 +4,7 @@
.levelIcon1 {
width : 100%;
height : 16px;
background : url("
../../../assets
/imgs/level1@2x.png") no-repeat;
background : url("
/static
/imgs/level1@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
...
...
@@ -12,7 +12,7 @@
.levelIcon2 {
width : 100%;
height : 16px;
background : url("
../../../assets
/imgs/level2@2x.png") no-repeat;
background : url("
/static
/imgs/level2@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
...
...
@@ -20,7 +20,7 @@
.levelIcon3 {
width : 100%;
height : 16px;
background : url("
../../../assets
/imgs/level3@2x.png") no-repeat;
background : url("
/static
/imgs/level3@2x.png") no-repeat;
background-size: 54px 16px;
margin-top : 8px;
}
...
...
src/pages/member/memberLevel/index.less
View file @
d6ed5d07
...
...
@@ -61,28 +61,28 @@
.levelIcon1 {
width : 100%;
height : 20px;
background : url("
../../../assets
/imgs/vip1@2x.png") no-repeat center;
background : url("
/static
/imgs/vip1@2x.png") no-repeat center;
background-size: 24px 20px;
}
.levelIcon2 {
width : 100%;
height : 20px;
background : url("
../../../assets
/imgs/vip2@2x.png") no-repeat center;
background : url("
/static
/imgs/vip2@2x.png") no-repeat center;
background-size: 24px 20px;
}
.levelIcon3 {
width : 100%;
height : 20px;
background : url("
../../../assets
/imgs/vip3@2x.png") no-repeat center;
background : url("
/static
/imgs/vip3@2x.png") no-repeat center;
background-size: 24px 20px;
}
.levelIcon4 {
width : 100%;
height : 20px;
background : url("
../../../assets
/imgs/vip4@2x.png") no-repeat center;
background : url("
/static
/imgs/vip4@2x.png") no-repeat center;
background-size: 24px 20px;
}
...
...
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