-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
fenglijun nb
committed
May 9, 2020
0 parents
commit 2977d6b
Showing
4,878 changed files
with
8,411 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
|
||
# SKMS | ||
|
||
### Prerequisites | ||
|
||
- Node.js | ||
|
||
``` | ||
yum remove nodejs | ||
curl –sL https://rpm.nodesource.com/setup_10.x | sudo bash - | ||
yum install -y nodejs | ||
``` | ||
|
||
- Git > 2.5.1 | ||
|
||
``` | ||
yum install -y epel-release | ||
yum remove git | ||
rpm -U https://centos7.iuscommunity.org/ius-release.rpm | ||
yum install -y git2u | ||
git --version | ||
``` | ||
|
||
- Usage | ||
|
||
``` | ||
mkdir <your-project-name> | ||
cd <your-project-name> | ||
npm create umi | ||
# Choose ant-design-pro: | ||
Select the boilerplate type (Use arrow keys) | ||
❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block. | ||
app - Create project with a simple boilerplate, support typescript. | ||
block - Create a umi block. | ||
library - Create a library with umi. | ||
plugin - Create a umi plugin. | ||
npm install | ||
npm start | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
### Production Install | ||
|
||
``` | ||
git pull origin master | ||
``` | ||
|
||
``` | ||
npm start | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// https://umijs.org/config/ | ||
import { defineConfig } from 'umi'; | ||
import defaultSettings from './defaultSettings'; | ||
import proxy from './proxy'; | ||
|
||
const { REACT_APP_ENV } = process.env; | ||
export default defineConfig({ | ||
hash: true, | ||
antd: {}, | ||
dva: { | ||
hmr: true, | ||
}, | ||
locale: { | ||
// default zh-CN | ||
default: 'zh-CN', | ||
// default true, when it is true, will use `navigator.language` overwrite default | ||
antd: true, | ||
baseNavigator: true, | ||
}, | ||
dynamicImport: { | ||
loading: '@/components/PageLoading/index', | ||
}, | ||
targets: { | ||
ie: 11, | ||
}, | ||
// umi routes: https://umijs.org/docs/routing | ||
routes: [ | ||
{ | ||
path: '/user', | ||
component: '../layouts/UserLayout', | ||
routes: [ | ||
{ | ||
name: 'login', | ||
path: '/user/login', | ||
component: './user/login', | ||
}, | ||
], | ||
}, | ||
{ | ||
path: '/', | ||
component: '../layouts/SecurityLayout', | ||
routes: [ | ||
{ | ||
path: '/', | ||
component: '../layouts/BasicLayout', | ||
authority: ['admin', 'user'], | ||
routes: [ | ||
{ | ||
path: '/', | ||
redirect: '/welcome', | ||
}, | ||
{ | ||
path: '/welcome', | ||
name: 'welcome', | ||
icon: 'smile', | ||
component: './Welcome', | ||
}, | ||
{ | ||
path: '/admin', | ||
name: 'admin', | ||
icon: 'crown', | ||
component: './Admin', | ||
authority: ['admin'], | ||
routes: [ | ||
{ | ||
path: '/admin/sub-page', | ||
name: 'sub-page', | ||
icon: 'smile', | ||
component: './Welcome', | ||
authority: ['admin'], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: 'list.table-list', | ||
icon: 'table', | ||
path: '/list', | ||
component: './ListTableList', | ||
}, | ||
|
||
|
||
|
||
{ | ||
name: 'basic', | ||
icon: 'smile', | ||
path: '/basic', | ||
routes: [ | ||
{ | ||
name: 'knowledge', | ||
icon: 'table', | ||
path: '/basic/knowledge', | ||
component: './basic/knowledge', | ||
}, | ||
{ | ||
name: 'knowledge', | ||
icon: 'table', | ||
path: '/basic/knowledge/CreateForm', | ||
component: './basic/knowledge/components/CreateForm', | ||
hideInMenu: true, | ||
}, | ||
{ | ||
name: 'knowledge', | ||
icon: 'table', | ||
path: '/basic/knowledge/UpdateForm', | ||
component: './basic/knowledge/components/UpdateForm', | ||
hideInMenu: true, | ||
}, | ||
], | ||
}, | ||
|
||
|
||
{ | ||
component: './404', | ||
}, | ||
], | ||
}, | ||
{ | ||
component: './404', | ||
}, | ||
], | ||
}, | ||
{ | ||
component: './404', | ||
}, | ||
], | ||
// Theme for antd: https://ant.design/docs/react/customize-theme-cn | ||
theme: { | ||
// ...darkTheme, | ||
'primary-color': defaultSettings.primaryColor, | ||
}, | ||
ignoreMomentLocale: true, | ||
proxy: proxy[REACT_APP_ENV || 'dev'], | ||
manifest: { | ||
basePath: '/', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export default { | ||
navTheme: 'dark', | ||
// 拂晓蓝 | ||
primaryColor: '#1890ff', | ||
layout: 'sidemenu', | ||
contentWidth: 'Fluid', | ||
fixedHeader: false, | ||
autoHideHeader: false, | ||
fixSiderbar: false, | ||
colorWeak: false, | ||
menu: { | ||
locale: true, | ||
}, | ||
title: 'Ant Design Pro', | ||
pwa: false, | ||
iconfontUrl: '', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* 在生产环境 代理是无法生效的,所以这里没有生产环境的配置 | ||
* The agent cannot take effect in the production environment | ||
* so there is no configuration of the production environment | ||
* For details, please see | ||
* https://pro.ant.design/docs/deploy | ||
*/ | ||
export default { | ||
dev: { | ||
'/api/': { | ||
target: 'http://dev.lvb.dongaocloud.tv/', | ||
changeOrigin: true, | ||
pathRewrite: { | ||
'^/api/': '/interface/v1/live/channel?Action=', | ||
}, | ||
}, | ||
}, | ||
test: { | ||
'/api/': { | ||
target: 'https://preview.pro.ant.design', | ||
changeOrigin: true, | ||
pathRewrite: { | ||
'^': '', | ||
}, | ||
}, | ||
}, | ||
pre: { | ||
'/api/': { | ||
target: 'your pre url', | ||
changeOrigin: true, | ||
pathRewrite: { | ||
'^': '', | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
testURL: 'http://localhost:8000', | ||
testEnvironment: './tests/PuppeteerEnvironment', | ||
verbose: false, | ||
globals: { | ||
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false, | ||
localStorage: null, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
} | ||
} |
Oops, something went wrong.