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
8439a5c9
Commit
8439a5c9
authored
Jul 24, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
51bc6457
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
14 deletions
+23
-14
base.config.json
config/base.config.json
+0
-0
config.ts
config/config.ts
+5
-6
theme.config.json
config/theme.config.json
+11
-3
demo.js
demo.js
+4
-3
package.json
package.json
+2
-1
index.ts
src/store/theme/index.ts
+1
-1
No files found.
config/base.config.json
View file @
8439a5c9
This diff is collapsed.
Click to expand it.
config/config.ts
View file @
8439a5c9
...
...
@@ -3,9 +3,9 @@ import routes from './router'
import
proxy
from
'./proxy'
import
theme
from
'./lingxi.theme.config'
const
OPEN_THEME_BUILD
=
false
// 是否开启动态主题
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
// 是否开启动态主题
const
config
:
any
=
{
const
config
:
any
=
{
title
:
'瓴犀开放平台'
,
// layout: {},
antd
:
{},
...
...
@@ -15,7 +15,7 @@ const config:any = {
baseNavigator
:
true
,
},
nodeModulesTransform
:
{
type
:
'none'
,
type
:
'none'
},
routes
,
extraBabelPlugins
:
[
...
...
@@ -40,7 +40,6 @@ const config:any = {
// 自定义修改webpack配置
chainWebpack
(
memo
,
{
env
,
webpack
,
createCSSRule
})
{
},
cssLoader
:
{
localsConvention
:
'camelCase'
,
// 将style中的class由 .foo-body 转化为fooBody调用
},
...
...
@@ -73,10 +72,10 @@ const config:any = {
* https://umijs.org/zh-CN/config#theme
* 配置主题,实际上是配 less 变量。
*/
theme
:
theme
theme
,
}
if
(
OPEN_THEME_BUILD
)
{
if
(
OPEN_THEME_BUILD
)
{
config
.
plugins
=
[...
config
.
plugins
,
'umi-plugin-antd-theme'
]
delete
config
.
theme
}
...
...
config/theme.config.json
View file @
8439a5c9
{
"theme"
:
[
{
"fileName"
:
"
theme1
.css"
,
"key"
:
"
theme1
"
,
"fileName"
:
"
science
.css"
,
"key"
:
"
science
"
,
"modifyVars"
:
{
"@primary-color"
:
"#00B37A"
,
"@layout-header-background"
:
"#FFF"
}
},
{
"fileName"
:
"fresh.css"
,
"key"
:
"fresh"
,
"modifyVars"
:
{
"@primary-color"
:
"#F5222D"
,
"@layout-header-background"
:
"#FFF"
}
}
],
"min"
:
true
,
"isModule"
:
fals
e
,
"isModule"
:
tru
e
,
"ignoreAntd"
:
false
,
"ignoreProLayout"
:
false
,
"cache"
:
true
...
...
demo.js
View file @
8439a5c9
...
...
@@ -7,12 +7,12 @@ const mockData = {
countryList
:
[
{
name
:
'简体中文-ZH'
,
key
:
'
cn
'
,
key
:
'
zh-CN
'
,
icon
:
'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png'
},
{
name
:
'English-EN'
,
key
:
'en'
,
key
:
'en
-US
'
,
icon
:
'http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png'
},
{
...
...
@@ -35,6 +35,6 @@ exports.fetchConfig = async () => {
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
resolve
(
mockData
.
data
)
},
2
*
1000
)
},
2
*
1000
)
})
}
\ No newline at end of file
package.json
View file @
8439a5c9
...
...
@@ -56,4 +56,4 @@
"
json2ts
"
:
"^0.0.7"
,
"
ora
"
:
"^4.0.4"
}
}
}
\ No newline at end of file
src/store/theme/index.ts
View file @
8439a5c9
...
...
@@ -2,7 +2,7 @@ import { observable } from 'mobx'
import
{
IThemeModule
}
from
'@/types/ThemeStoreType'
class
ThemeStore
implements
IThemeModule
{
@
observable
public
themeName
:
string
=
'
theme1
'
;
@
observable
public
themeName
:
string
=
'
science
'
;
}
...
...
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