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
A
ant-design-pro
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
ant-design-pro
Commits
804969cf
Commit
804969cf
authored
Jun 21, 2019
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:eslint报错
parent
dbbaccad
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
28 deletions
+30
-28
.eslintrc.js
.eslintrc.js
+7
-0
package.json
package.json
+5
-3
src/pages/account/center/index.tsx
src/pages/account/center/index.tsx
+4
-7
src/pages/dashboard/analysis/index.tsx
src/pages/dashboard/analysis/index.tsx
+4
-7
src/pages/dashboard/workplace/index.tsx
src/pages/dashboard/workplace/index.tsx
+2
-2
src/pages/user/register/index.tsx
src/pages/user/register/index.tsx
+8
-9
No files found.
.eslintrc.js
View file @
804969cf
...
@@ -4,6 +4,13 @@ module.exports = {
...
@@ -4,6 +4,13 @@ module.exports = {
...
fabric
.
default
,
...
fabric
.
default
,
rules
:
{
rules
:
{
...
fabric
.
default
.
rules
,
...
fabric
.
default
.
rules
,
'
import/no-extraneous-dependencies
'
:
[
2
,
{
optionalDependencies
:
true
,
devDependencies
:
[
'
**/tests/**.js
'
,
'
/mock/**/**.js
'
,
'
**/**.test.js
'
,
'
**/**._mock.js
'
],
},
],
},
},
globals
:
{
globals
:
{
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION
:
true
,
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION
:
true
,
...
...
package.json
View file @
804969cf
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
},
},
"husky"
:
{
"husky"
:
{
"hooks"
:
{
"hooks"
:
{
"pre-commit"
:
"npm run lint-staged"
}
}
},
},
"lint-staged"
:
{
"lint-staged"
:
{
...
@@ -102,7 +103,7 @@
...
@@ -102,7 +103,7 @@
"
@types/react-document-title
"
:
"
^2.0.3
"
,
"
@types/react-document-title
"
:
"
^2.0.3
"
,
"
@types/react-dom
"
:
"
^16.8.4
"
,
"
@types/react-dom
"
:
"
^16.8.4
"
,
"
@types/numeral
"
:
"
^0.0.25
"
,
"
@types/numeral
"
:
"
^0.0.25
"
,
"
@umijs/fabric
"
:
"
^1.0.
4
"
,
"
@umijs/fabric
"
:
"
^1.0.
5
"
,
"
babel-eslint
"
:
"
^10.0.1
"
,
"
babel-eslint
"
:
"
^10.0.1
"
,
"
chalk
"
:
"
^2.4.2
"
,
"
chalk
"
:
"
^2.4.2
"
,
"
check-prettier
"
:
"
^1.0.3
"
,
"
check-prettier
"
:
"
^1.0.3
"
,
...
@@ -120,14 +121,15 @@
...
@@ -120,14 +121,15 @@
"
jest-puppeteer
"
:
"
^4.2.0
"
,
"
jest-puppeteer
"
:
"
^4.2.0
"
,
"
jsdom-global
"
:
"
^3.0.2
"
,
"
jsdom-global
"
:
"
^3.0.2
"
,
"
lint-staged
"
:
"
^8.1.7
"
,
"
lint-staged
"
:
"
^8.1.7
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
netlify-lambda
"
:
"
^1.4.13
"
,
"
netlify-lambda
"
:
"
^1.4.13
"
,
"
node-fetch
"
:
"
^2.6.0
"
,
"
node-fetch
"
:
"
^2.6.0
"
,
"
prettier
"
:
"
^1.17.1
"
,
"
prettier
"
:
"
^1.17.1
"
,
"
serverless-http
"
:
"
^2.0.2
"
,
"
serverless-http
"
:
"
^2.0.2
"
,
"
slash2
"
:
"
^2.0.0
"
,
"
slash2
"
:
"
^2.0.0
"
,
"
stylelint
"
:
"
^10.1.0
"
,
"
stylelint
"
:
"
^10.1.0
"
,
"
webpack-theme-color-replacer
"
:
"
^1.1.5
"
"
webpack-theme-color-replacer
"
:
"
^1.1.5
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
@types/mockjs
"
:
"
^1.0.2
"
},
},
"optionalDependencies"
:
{
"optionalDependencies"
:
{
"puppeteer"
:
"^1.17.0"
"puppeteer"
:
"^1.17.0"
...
...
src/pages/account/center/index.tsx
View file @
804969cf
...
@@ -40,12 +40,12 @@ const operationTabList = [
...
@@ -40,12 +40,12 @@ const operationTabList = [
},
},
];
];
interface
a
ccountCenterProps
extends
RouteChildrenProps
{
interface
A
ccountCenterProps
extends
RouteChildrenProps
{
dispatch
:
Dispatch
<
any
>
;
dispatch
:
Dispatch
<
any
>
;
currentUser
:
CurrentUser
;
currentUser
:
CurrentUser
;
currentUserLoading
:
boolean
;
currentUserLoading
:
boolean
;
}
}
interface
a
ccountCenterState
{
interface
A
ccountCenterState
{
newTags
:
TagType
[];
newTags
:
TagType
[];
tabKey
:
'
articles
'
|
'
applications
'
|
'
projects
'
;
tabKey
:
'
articles
'
|
'
applications
'
|
'
projects
'
;
inputVisible
:
boolean
;
inputVisible
:
boolean
;
...
@@ -64,10 +64,7 @@ interface accountCenterState {
...
@@ -64,10 +64,7 @@ interface accountCenterState {
currentUserLoading
:
loading
.
effects
[
'
accountCenter/fetchCurrent
'
],
currentUserLoading
:
loading
.
effects
[
'
accountCenter/fetchCurrent
'
],
}),
}),
)
)
class
Center
extends
PureComponent
<
class
Center
extends
PureComponent
<
AccountCenterProps
,
AccountCenterState
>
{
accountCenterProps
,
accountCenterState
>
{
// static getDerivedStateFromProps(
// static getDerivedStateFromProps(
// props: accountCenterProps,
// props: accountCenterProps,
// state: accountCenterState,
// state: accountCenterState,
...
@@ -86,7 +83,7 @@ class Center extends PureComponent<
...
@@ -86,7 +83,7 @@ class Center extends PureComponent<
// return null;
// return null;
// }
// }
state
:
a
ccountCenterState
=
{
state
:
A
ccountCenterState
=
{
newTags
:
[],
newTags
:
[],
inputVisible
:
false
,
inputVisible
:
false
,
inputValue
:
''
,
inputValue
:
''
,
...
...
src/pages/dashboard/analysis/index.tsx
View file @
804969cf
...
@@ -17,13 +17,13 @@ const TopSearch = React.lazy(() => import('./components/TopSearch'));
...
@@ -17,13 +17,13 @@ const TopSearch = React.lazy(() => import('./components/TopSearch'));
const
ProportionSales
=
React
.
lazy
(()
=>
import
(
'
./components/ProportionSales
'
));
const
ProportionSales
=
React
.
lazy
(()
=>
import
(
'
./components/ProportionSales
'
));
const
OfflineData
=
React
.
lazy
(()
=>
import
(
'
./components/OfflineData
'
));
const
OfflineData
=
React
.
lazy
(()
=>
import
(
'
./components/OfflineData
'
));
interface
d
ashboardAnalysisProps
{
interface
D
ashboardAnalysisProps
{
dashboardAnalysis
:
AnalysisData
;
dashboardAnalysis
:
AnalysisData
;
dispatch
:
Dispatch
<
any
>
;
dispatch
:
Dispatch
<
any
>
;
loading
:
boolean
;
loading
:
boolean
;
}
}
interface
d
ashboardAnalysisState
{
interface
D
ashboardAnalysisState
{
salesType
:
'
all
'
|
'
online
'
|
'
stores
'
;
salesType
:
'
all
'
|
'
online
'
|
'
stores
'
;
currentTabKey
:
string
;
currentTabKey
:
string
;
rangePickerValue
:
RangePickerValue
;
rangePickerValue
:
RangePickerValue
;
...
@@ -43,11 +43,8 @@ interface dashboardAnalysisState {
...
@@ -43,11 +43,8 @@ interface dashboardAnalysisState {
loading
:
loading
.
effects
[
'
dashboardAnalysis/fetch
'
],
loading
:
loading
.
effects
[
'
dashboardAnalysis/fetch
'
],
}),
}),
)
)
class
Analysis
extends
Component
<
class
Analysis
extends
Component
<
DashboardAnalysisProps
,
DashboardAnalysisState
>
{
dashboardAnalysisProps
,
state
:
DashboardAnalysisState
=
{
dashboardAnalysisState
>
{
state
:
dashboardAnalysisState
=
{
salesType
:
'
all
'
,
salesType
:
'
all
'
,
currentTabKey
:
''
,
currentTabKey
:
''
,
rangePickerValue
:
getTimeDistance
(
'
year
'
),
rangePickerValue
:
getTimeDistance
(
'
year
'
),
...
...
src/pages/dashboard/workplace/index.tsx
View file @
804969cf
...
@@ -39,7 +39,7 @@ const links = [
...
@@ -39,7 +39,7 @@ const links = [
},
},
];
];
interface
d
ashboardWorkplaceProps
{
interface
D
ashboardWorkplaceProps
{
currentUser
:
CurrentUser
;
currentUser
:
CurrentUser
;
projectNotice
:
NoticeType
[];
projectNotice
:
NoticeType
[];
activities
:
ActivitiesType
[];
activities
:
ActivitiesType
[];
...
@@ -67,7 +67,7 @@ interface dashboardWorkplaceProps {
...
@@ -67,7 +67,7 @@ interface dashboardWorkplaceProps {
activitiesLoading
:
loading
.
effects
[
'
dashboardWorkplace/fetchActivitiesList
'
],
activitiesLoading
:
loading
.
effects
[
'
dashboardWorkplace/fetchActivitiesList
'
],
}),
}),
)
)
class
Workplace
extends
PureComponent
<
d
ashboardWorkplaceProps
>
{
class
Workplace
extends
PureComponent
<
D
ashboardWorkplaceProps
>
{
componentDidMount
()
{
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
dispatch
({
dispatch
({
...
...
src/pages/user/register/index.tsx
View file @
804969cf
...
@@ -42,12 +42,12 @@ const passwordProgressMap: {
...
@@ -42,12 +42,12 @@ const passwordProgressMap: {
poor
:
'
exception
'
,
poor
:
'
exception
'
,
};
};
interface
u
serRegisterProps
extends
FormComponentProps
{
interface
U
serRegisterProps
extends
FormComponentProps
{
dispatch
:
Dispatch
<
any
>
;
dispatch
:
Dispatch
<
any
>
;
userRegister
:
StateType
;
userRegister
:
StateType
;
submitting
:
boolean
;
submitting
:
boolean
;
}
}
interface
u
serRegisterState
{
interface
U
serRegisterState
{
count
:
number
;
count
:
number
;
confirmDirty
:
boolean
;
confirmDirty
:
boolean
;
visible
:
boolean
;
visible
:
boolean
;
...
@@ -80,11 +80,8 @@ export interface UserRegisterParams {
...
@@ -80,11 +80,8 @@ export interface UserRegisterParams {
submitting
:
loading
.
effects
[
'
userRegister/submit
'
],
submitting
:
loading
.
effects
[
'
userRegister/submit
'
],
}),
}),
)
)
class
Register
extends
Component
<
class
Register
extends
Component
<
UserRegisterProps
,
UserRegisterState
>
{
userRegisterProps
,
state
:
UserRegisterState
=
{
userRegisterState
>
{
state
:
userRegisterState
=
{
count
:
0
,
count
:
0
,
confirmDirty
:
false
,
confirmDirty
:
false
,
visible
:
false
,
visible
:
false
,
...
@@ -342,7 +339,9 @@ class Register extends Component<
...
@@ -342,7 +339,9 @@ class Register extends Component<
})(
})(
<
Input
<
Input
size
=
"large"
size
=
"large"
placeholder
=
{
formatMessage
({
id
:
'
user-register.verification-code.placeholder
'
})
}
placeholder
=
{
formatMessage
({
id
:
'
user-register.verification-code.placeholder
'
,
})
}
/>,
/>,
)
}
)
}
</
Col
>
</
Col
>
...
@@ -380,4 +379,4 @@ class Register extends Component<
...
@@ -380,4 +379,4 @@ class Register extends Component<
}
}
}
}
export
default
Form
.
create
<
u
serRegisterProps
>
()(
Register
);
export
default
Form
.
create
<
U
serRegisterProps
>
()(
Register
);
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