Commit 313a01fd authored by 陈帅's avatar 陈帅

rm dev script

parent c7bffe52
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
"scripts": { "scripts": {
"analyze": "cross-env ANALYZE=1 umi build", "analyze": "cross-env ANALYZE=1 umi build",
"build": "umi build && npm run functions:build", "build": "umi build && npm run functions:build",
"dev": "cross-env APP_TYPE=site umi dev",
"dev:no-mock": "cross-env MOCK=none umi dev",
"docker-hub:build": "docker build -f Dockerfile.hub -t ant-design-pro ./", "docker-hub:build": "docker build -f Dockerfile.hub -t ant-design-pro ./",
"docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build", "docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build",
"docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up", "docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up",
...@@ -82,6 +80,7 @@ ...@@ -82,6 +80,7 @@
"react-media": "^1.9.2", "react-media": "^1.9.2",
"react-media-hook2": "^1.0.2", "react-media-hook2": "^1.0.2",
"umi": "^2.6.10", "umi": "^2.6.10",
"umi-plugin-pro-block": "^1.3.0",
"umi-plugin-react": "^1.7.2", "umi-plugin-react": "^1.7.2",
"umi-request": "^1.0.5" "umi-request": "^1.0.5"
}, },
......
...@@ -24,11 +24,6 @@ body { ...@@ -24,11 +24,6 @@ body {
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.globalSpin {
width: 100%;
margin: 40px 0 !important;
}
ul, ul,
ol { ol {
list-style: none; list-style: none;
......
...@@ -14,7 +14,8 @@ let lessNodesAppended: boolean; ...@@ -14,7 +14,8 @@ let lessNodesAppended: boolean;
const updateTheme: (primaryColor?: string) => void = primaryColor => { const updateTheme: (primaryColor?: string) => void = primaryColor => {
// Don't compile less in production! // Don't compile less in production!
// preview.pro.ant.design only do not use in your production ; preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 // preview.pro.ant.design only do not use in your production;
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION !== 'site') { if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION !== 'site') {
return; return;
} }
...@@ -72,7 +73,10 @@ const updateTheme: (primaryColor?: string) => void = primaryColor => { ...@@ -72,7 +73,10 @@ const updateTheme: (primaryColor?: string) => void = primaryColor => {
}; };
const updateColorWeak: (colorWeak: string) => void = colorWeak => { const updateColorWeak: (colorWeak: string) => void = colorWeak => {
document.body.className = colorWeak ? 'colorWeak' : ''; const root = document.getElementById('root');
if (root) {
root.className = colorWeak ? 'colorWeak' : '';
}
}; };
const SettingModel: SettingModelType = { const SettingModel: SettingModelType = {
...@@ -89,6 +93,7 @@ const SettingModel: SettingModelType = { ...@@ -89,6 +93,7 @@ const SettingModel: SettingModelType = {
} }
}); });
const { primaryColor, colorWeak } = setting; const { primaryColor, colorWeak } = setting;
if (state.primaryColor !== primaryColor) { if (state.primaryColor !== primaryColor) {
updateTheme(primaryColor); updateTheme(primaryColor);
} }
......
defaultSeverity: error defaultSeverity: error
globals:
- ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true
extends: extends:
- tslint-react - tslint-react
- tslint-eslint-rules - tslint-eslint-rules
......
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