Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pro-blocks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
pro-blocks
Commits
3ea51067
Commit
3ea51067
authored
Aug 29, 2018
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable eslint import rules
parent
a0da5078
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
.eslintrc.js
.eslintrc.js
+2
-2
package.json
package.json
+8
-3
src/components/Authorized/AuthorizedRoute.js
src/components/Authorized/AuthorizedRoute.js
+9
-14
src/layouts/BasicLayout.js
src/layouts/BasicLayout.js
+1
-1
src/pages/Forms/TableForm.js
src/pages/Forms/TableForm.js
+1
-1
No files found.
.eslintrc.js
View file @
3ea51067
...
@@ -15,8 +15,8 @@ module.exports = {
...
@@ -15,8 +15,8 @@ module.exports = {
'
react/prop-types
'
:
0
,
'
react/prop-types
'
:
0
,
'
react/forbid-prop-types
'
:
0
,
'
react/forbid-prop-types
'
:
0
,
'
react/jsx-one-expression-per-line
'
:
0
,
'
react/jsx-one-expression-per-line
'
:
0
,
'
import/no-unresolved
'
:
0
,
'
import/no-unresolved
'
:
[
2
,
{
ignore
:
[
'
^@
'
,
'
^umi/
'
]
}]
,
'
import/no-extraneous-dependencies
'
:
0
,
'
import/no-extraneous-dependencies
'
:
[
2
,
{
optionalDependencies
:
true
}]
,
'
jsx-a11y/no-noninteractive-element-interactions
'
:
0
,
'
jsx-a11y/no-noninteractive-element-interactions
'
:
0
,
'
jsx-a11y/click-events-have-key-events
'
:
0
,
'
jsx-a11y/click-events-have-key-events
'
:
0
,
'
jsx-a11y/no-static-element-interactions
'
:
0
,
'
jsx-a11y/no-static-element-interactions
'
:
0
,
...
...
package.json
View file @
3ea51067
...
@@ -29,9 +29,11 @@
...
@@ -29,9 +29,11 @@
"
bizcharts
"
:
"
^3.1.10
"
,
"
bizcharts
"
:
"
^3.1.10
"
,
"
bizcharts-plugin-slider
"
:
"
^2.0.3
"
,
"
bizcharts-plugin-slider
"
:
"
^2.0.3
"
,
"
classnames
"
:
"
^2.2.6
"
,
"
classnames
"
:
"
^2.2.6
"
,
"
dva
"
:
"
^2.4.0
"
,
"
enquire-js
"
:
"
^0.2.1
"
,
"
enquire-js
"
:
"
^0.2.1
"
,
"
hash.js
"
:
"
^1.1.5
"
,
"
lodash
"
:
"
^4.17.10
"
,
"
lodash-decorators
"
:
"
^6.0.0
"
,
"
lodash-decorators
"
:
"
^6.0.0
"
,
"
lodash.isequal
"
:
"
^4.5.0
"
,
"
memoize-one
"
:
"
^4.0.0
"
,
"
memoize-one
"
:
"
^4.0.0
"
,
"
moment
"
:
"
^2.22.2
"
,
"
moment
"
:
"
^2.22.2
"
,
"
numeral
"
:
"
^2.0.6
"
,
"
numeral
"
:
"
^2.0.6
"
,
...
@@ -39,11 +41,15 @@
...
@@ -39,11 +41,15 @@
"
path-to-regexp
"
:
"
^2.4.0
"
,
"
path-to-regexp
"
:
"
^2.4.0
"
,
"
prop-types
"
:
"
^15.5.10
"
,
"
prop-types
"
:
"
^15.5.10
"
,
"
qs
"
:
"
^6.5.2
"
,
"
qs
"
:
"
^6.5.2
"
,
"
rc-animate
"
:
"
^2.4.4
"
,
"
react
"
:
"
^16.4.1
"
,
"
react
"
:
"
^16.4.1
"
,
"
react-container-query
"
:
"
^0.11.0
"
,
"
react-container-query
"
:
"
^0.11.0
"
,
"
react-copy-to-clipboard
"
:
"
^5.0.1
"
,
"
react-copy-to-clipboard
"
:
"
^5.0.1
"
,
"
react-document-title
"
:
"
^2.0.3
"
,
"
react-document-title
"
:
"
^2.0.3
"
,
"
react-fittext
"
:
"
^1.0.0
"
"
react-dom
"
:
"
^16.4.2
"
,
"
react-fittext
"
:
"
^1.0.0
"
,
"
react-router-dom
"
:
"
^4.3.1
"
,
"
umi
"
:
"
^2.0.0-beta.10
"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"
@types/react
"
:
"
^16.4.11
"
,
"
@types/react
"
:
"
^16.4.11
"
,
...
@@ -72,7 +78,6 @@
...
@@ -72,7 +78,6 @@
"
stylelint
"
:
"
^9.4.0
"
,
"
stylelint
"
:
"
^9.4.0
"
,
"
stylelint-config-prettier
"
:
"
^4.0.0
"
,
"
stylelint-config-prettier
"
:
"
^4.0.0
"
,
"
stylelint-config-standard
"
:
"
^18.0.0
"
,
"
stylelint-config-standard
"
:
"
^18.0.0
"
,
"
umi
"
:
"
^2.0.0-beta.10
"
,
"
umi-plugin-react
"
:
"
^1.0.0-beta.10
"
"
umi-plugin-react
"
:
"
^1.0.0-beta.10
"
},
},
"optionalDependencies"
:
{
"optionalDependencies"
:
{
...
...
src/components/Authorized/AuthorizedRoute.js
View file @
3ea51067
...
@@ -2,19 +2,14 @@ import React from 'react';
...
@@ -2,19 +2,14 @@ import React from 'react';
import
{
Route
,
Redirect
}
from
'
react-router-dom
'
;
import
{
Route
,
Redirect
}
from
'
react-router-dom
'
;
import
Authorized
from
'
./Authorized
'
;
import
Authorized
from
'
./Authorized
'
;
class
AuthorizedRoute
extends
React
.
Component
{
// TODO: umi只会返回render和rest
render
()
{
const
AuthorizedRoute
=
({
component
:
Component
,
render
,
authority
,
redirectPath
,
...
rest
})
=>
(
// TODO: umi只会返回render和rest
<
Authorized
const
{
component
:
Component
,
render
,
authority
,
redirectPath
,
...
rest
}
=
this
.
props
;
authority
=
{
authority
}
return
(
noMatch
=
{
<
Route
{...
rest
}
render
=
{()
=>
<
Redirect
to
=
{{
pathname
:
redirectPath
}}
/>} /
>
}
<
Authorized
>
authority
=
{
authority
}
<
Route
{...
rest
}
render
=
{
props
=>
(
Component
?
<
Component
{...
props
}
/> : render
(
props
))
} /
>
noMatch
=
{
<
Route
{...
rest
}
render
=
{()
=>
<
Redirect
to
=
{{
pathname
:
redirectPath
}}
/>} /
>
}
<
/Authorized
>
>
);
<
Route
{...
rest
}
render
=
{
props
=>
(
Component
?
<
Component
{...
props
}
/> : render
(
props
))
} /
>
<
/Authorized
>
);
}
}
export
default
AuthorizedRoute
;
export
default
AuthorizedRoute
;
src/layouts/BasicLayout.js
View file @
3ea51067
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Layout
}
from
'
antd
'
;
import
{
Layout
}
from
'
antd
'
;
import
DocumentTitle
from
'
react-document-title
'
;
import
DocumentTitle
from
'
react-document-title
'
;
import
deepEqual
from
'
lodash
.ise
qual
'
;
import
deepEqual
from
'
lodash
/isE
qual
'
;
import
memoizeOne
from
'
memoize-one
'
;
import
memoizeOne
from
'
memoize-one
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
{
ContainerQuery
}
from
'
react-container-query
'
;
import
{
ContainerQuery
}
from
'
react-container-query
'
;
...
...
src/pages/Forms/TableForm.js
View file @
3ea51067
import
React
,
{
PureComponent
,
Fragment
}
from
'
react
'
;
import
React
,
{
PureComponent
,
Fragment
}
from
'
react
'
;
import
{
Table
,
Button
,
Input
,
message
,
Popconfirm
,
Divider
}
from
'
antd
'
;
import
{
Table
,
Button
,
Input
,
message
,
Popconfirm
,
Divider
}
from
'
antd
'
;
import
isEqual
from
'
lodash
.ise
qual
'
;
import
isEqual
from
'
lodash
/isE
qual
'
;
import
styles
from
'
./style.less
'
;
import
styles
from
'
./style.less
'
;
export
default
class
TableForm
extends
PureComponent
{
export
default
class
TableForm
extends
PureComponent
{
...
...
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