Commit 8439a5c9 authored by GuanHua's avatar GuanHua

update

parent 51bc6457
This diff is collapsed.
......@@ -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
}
......
{
"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": false,
"isModule": true,
"ignoreAntd": false,
"ignoreProLayout": false,
"cache": true
......
......@@ -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
......@@ -56,4 +56,4 @@
"json2ts": "^0.0.7",
"ora": "^4.0.4"
}
}
}
\ No newline at end of file
......@@ -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';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment