Skip to content

Commit 668759c

Browse files
authored
Merge pull request #140 from ts-react/v1
V1
2 parents 0d76dfd + d5cbaa4 commit 668759c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+782
-778
lines changed

.stylelintrc

-27
This file was deleted.

.stylelintrc.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": [
3+
"stylelint-config-standard",
4+
"stylelint-config-rational-order",
5+
"stylelint-config-prettier"
6+
],
7+
"plugins": [
8+
"stylelint-order",
9+
"stylelint-declaration-block-no-ignored-properties"
10+
],
11+
"rules": {
12+
"no-descending-specificity": null,
13+
"plugin/declaration-block-no-ignored-properties": true
14+
}
15+
}

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
<h1 align="center">React Admin Template</h1>
88

99
<p align="center">
10+
<a href="http://umijs.org">
11+
<img src="https://img.shields.io/badge/build%20with-umi-028fe4.svg" alt="react">
12+
</a>
1013
<a href="https://github.com/facebook/react">
1114
<img src="https://img.shields.io/badge/react-16.8.1-brightgreen.svg" alt="react">
1215
</a>
1316
<a href="https://github.com/ant-design/ant-design">
14-
<img src="https://img.shields.io/badge/ant--design-3.17.0-brightgreen.svg" alt="antd">
15-
</a>
16-
<a href="https://github.com/umijs/umi">
17-
<img src="https://img.shields.io/badge/umi-2.6.17-brightgreen.svg" alt="umi">
17+
<img src="https://img.shields.io/badge/ant--design-3.19.2-brightgreen.svg" alt="antd">
1818
</a>
1919
<a href="https://github.com/Microsoft/TypeScript">
2020
<img src="https://img.shields.io/badge/typescript-3.4.2-brightgreen.svg" alt="typescript">

config/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
},
1313
treeShaking: true,
1414
define: {
15-
BASE_URL: serverConfig[SERVER_ENV] || serverConfig.production
15+
BASE_URL: serverConfig[SERVER_ENV] || serverConfig.localhost
1616
},
1717
// 路由配置
1818
routes,

config/router.config.ts

+9-11
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,13 @@ export default [
8484
path: '/permission/policies',
8585
name: 'policies',
8686
component: './permission/policies/policies',
87-
authority: ['permission/policyList'],
88-
hideChildrenInMenu: true,
89-
routes: [
90-
{
91-
path: '/permission/policies/create',
92-
name: 'create',
93-
component: './permission/policies/create',
94-
},
95-
]
87+
authority: ['permission/policyList']
88+
},
89+
{
90+
path: '/permission/policies/create',
91+
name: 'policy-create',
92+
hideInMenu: true,
93+
component: './permission/policies/create',
9694
}
9795
],
9896
},
@@ -104,13 +102,13 @@ export default [
104102
{
105103
path: '/system/user',
106104
name: 'user',
107-
authority: ['system/action1'],
105+
authority: '*',
108106
component: './system/users'
109107
},
110108
{
111109
path: '/system/group',
112110
name: 'group',
113-
authority: ['system/action2'],
111+
authority: '*',
114112
component: './system/groups'
115113
}
116114
],

config/server.config.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// 后端接口配置
22
export default {
3+
// 本地开发使用
4+
localhost: '',
5+
dev: '',
6+
test: '',
37
production: '',
4-
development: '',
5-
test: ''
68
}

package.json

+12-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
"bootstrap": "yarn || npm i",
77
"clean": "rimraf dist",
88
"start": "cross-env PORT=8080 umi dev",
9-
"build": "cross-env SERVER_ENV=development umi build",
9+
"build": "umi build",
10+
"build:dev": "cross-env SERVER_ENV=dev umi build",
1011
"build:test": "cross-env SERVER_ENV=test umi build",
1112
"build:prod": "cross-env SERVER_ENV=production umi build",
1213
"build:web": "yarn build && cd ./dist && anywhere -h localhost -p 8080",
1314
"gh-pages": "yarn build:prod && gh-pages -d dist",
1415
"lint-staged": "lint-staged",
1516
"lint-staged:ts": "npm run tsc",
1617
"lint:ts": "tslint --project tsconfig.json --format codeFrame",
17-
"lint:style": "stylelint \"src/**/*.less\" --syntax less",
18+
"lint:style": "stylelint --fix 'src/**/*.less' --syntax less",
1819
"docker:build": "./scripts/docker-build.sh",
1920
"tsc": "tsc",
2021
"test": "umi test",
2122
"test:component": "umi test ./src/components",
22-
"deploy": "rm -rf node_modules/gh-pages/.cache && gh-pages -d dist",
23-
"build:view": "npm run build && cd ./dist && anywhere -p 8080",
23+
"deploy": "yarn build && rm -rf node_modules/gh-pages/.cache && gh-pages -d dist",
2424
"prettier": "prettier --write ./src/**/**/**/*"
2525
},
2626
"repository": "https://github.com/ts-react/react-admin-template.git",
@@ -30,7 +30,7 @@
3030
"@antv/data-set": "^0.10.1",
3131
"@jiumao/dharma": "^0.0.5",
3232
"@jiumao/policy": "^1.0.5",
33-
"antd": "^3.19.1",
33+
"antd": "^3.19.2",
3434
"axios": "^0.18.0",
3535
"bizcharts": "^3.5.2",
3636
"braft-editor": "^2.2.9",
@@ -93,10 +93,13 @@
9393
"mockjs": "^1.0.1-beta3",
9494
"prettier": "^1.17.0",
9595
"rimraf": "^2.6.2",
96-
"stylelint": "^9.4.0",
97-
"stylelint-config-prettier": "^3.3.0",
98-
"stylelint-config-standard": "^18.2.0",
99-
"typescript": "^3.4.2",
96+
"stylelint": "^10.0.1",
97+
"stylelint-config-prettier": "^5.2.0",
98+
"stylelint-config-rational-order": "^0.1.2",
99+
"stylelint-config-standard": "^18.3.0",
100+
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
101+
"stylelint-order": "^3.0.0",
102+
"typescript": "^3.5.1",
100103
"umi": "^2.6.17",
101104
"umi-plugin-react": "^1.7.5",
102105
"umi-types": "^0.3.2"

src/components/drawer-wrapper/drawer-wrapper.less

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
.@{prefix-cls} {
66
.ant-drawer-body {
77
height: 100%;
8-
padding: 0;
98
min-height: 300px;
9+
padding: 0;
1010
}
1111

1212
&__title {
13+
height: @layout-header-height;
1314
margin: 0;
1415
color: rgba(0, 0, 0, 0.85);
1516
font-weight: 500;
1617
font-size: 16px;
17-
height: @layout-header-height;
1818
line-height: @layout-header-height;
1919
}
2020

2121
&__header {
2222
position: relative;
23-
padding: 0 24px;
2423
height: @layout-header-height;
25-
line-height: @layout-header-height;
24+
padding: 0 24px;
2625
color: rgba(0,0,0,0.65);
26+
line-height: @layout-header-height;
2727
background: @white;
2828
border-bottom: 1px solid #e8e8e8;
2929
border-radius: 4px 4px 0 0;
@@ -61,16 +61,16 @@
6161
padding: 16px 24px;
6262
}
6363

64-
&__footer {
65-
background: #fff;
66-
width: 100%;
67-
border-top: 1px solid #efefef;
68-
overflow: hidden;
69-
padding: 0 24px;
70-
height: @layout-header-height;;
71-
line-height: @layout-header-height;;
64+
&__footer {;
7265
position: absolute;
7366
bottom: 0;
67+
width: 100%;
68+
height: @layout-header-height;
69+
padding: 0 24px;
70+
overflow: hidden;;
71+
line-height: @layout-header-height;
72+
background: #fff;
73+
border-top: 1px solid #efefef;
7474

7575
button + button {
7676
margin-left: 10px;

src/components/exception/exception.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
&::before,
1919
&::after {
20-
content: ' ';
2120
display: table;
21+
content: ' ';
2222
}
2323

2424
&::after {

src/components/global-header/global-header.less

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
1212

1313
&__right {
14-
z-index: 9;
15-
max-width: 410px;
1614
position: absolute;
17-
right: 15px;
1815
top: 0;
19-
height: @layout-header-height;
16+
right: 15px;
17+
z-index: 9;
2018
display: flex;
2119
align-items: center;
2220
justify-content: flex-end;
21+
max-width: 410px;
22+
height: @layout-header-height;
2323
}
2424

2525
&__action {

src/components/notice-icon/index.tsx

Whitespace-only changes.

src/components/notice-icon/notice-icon.less

-7
This file was deleted.

src/components/notice-icon/notice-icon.tsx

-68
This file was deleted.

src/components/notice-icon/notice-list.less

-8
This file was deleted.

src/components/notice-icon/notice-list.tsx

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@import '~antd/lib/style/themes/default.less';
2+
3+
@prefix-cls: ~'lotus-pattern-lock';
4+
5+
.@{prefix-cls} {
6+
position: relative;
7+
}

src/components/pattern-lock/pattern-lock.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
22
import classNames from 'classnames';
3+
import './pattern-lock.less';
34

45
interface IProps {
56
prefixCls: string;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@import '~antd/lib/style/themes/default.less';
2+
3+
@prefix-cls: ~'lotus-screen-lock';
4+
5+
.@{prefix-cls} {
6+
position: relative;
7+
}

0 commit comments

Comments
 (0)