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
2885fa95
Commit
2885fa95
authored
Dec 26, 2017
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better jsx-wrap-multilines eslint rule
parent
a8caa500
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
20 deletions
+29
-20
.eslintrc
.eslintrc
+9
-0
src/components/AvatarList/index.js
src/components/AvatarList/index.js
+2
-3
src/components/EditableItem/index.js
src/components/EditableItem/index.js
+3
-2
src/components/PageHeader/index.js
src/components/PageHeader/index.js
+12
-11
src/routes/Profile/AdvancedProfile.js
src/routes/Profile/AdvancedProfile.js
+2
-3
src/utils/utils.js
src/utils/utils.js
+1
-1
No files found.
.eslintrc
View file @
2885fa95
...
@@ -20,6 +20,15 @@
...
@@ -20,6 +20,15 @@
"react/jsx-no-bind": [0],
"react/jsx-no-bind": [0],
"react/prop-types": [0],
"react/prop-types": [0],
"react/prefer-stateless-function": [0],
"react/prefer-stateless-function": [0],
"react/jsx-wrap-multilines": ["error", {
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line",
"condition": "parens-new-line",
"logical": "parens-new-line",
"prop": "ignore"
}],
"no-else-return": [0],
"no-else-return": [0],
"no-restricted-syntax": [0],
"no-restricted-syntax": [0],
"import/no-extraneous-dependencies": [0],
"import/no-extraneous-dependencies": [0],
...
...
src/components/AvatarList/index.js
View file @
2885fa95
...
@@ -28,12 +28,11 @@ const Item = ({ src, size, tips, onClick = (() => {}) }) => {
...
@@ -28,12 +28,11 @@ const Item = ({ src, size, tips, onClick = (() => {}) }) => {
return
(
return
(
<
li
className
=
{
cls
}
onClick
=
{
onClick
}
>
<
li
className
=
{
cls
}
onClick
=
{
onClick
}
>
{
{
tips
?
tips
?
(
<
Tooltip
title
=
{
tips
}
>
<
Tooltip
title
=
{
tips
}
>
<
Avatar
src
=
{
src
}
size
=
{
size
}
style
=
{{
cursor
:
'
pointer
'
}}
/
>
<
Avatar
src
=
{
src
}
size
=
{
size
}
style
=
{{
cursor
:
'
pointer
'
}}
/
>
<
/Tooltip
>
<
/Tooltip
>
:
)
:
<
Avatar
src
=
{
src
}
size
=
{
size
}
/
>
<
Avatar
src
=
{
src
}
size
=
{
size
}
/
>
}
}
<
/li
>
<
/li
>
);
);
...
...
src/components/EditableItem/index.js
View file @
2885fa95
...
@@ -25,7 +25,7 @@ export default class EditableItem extends PureComponent {
...
@@ -25,7 +25,7 @@ export default class EditableItem extends PureComponent {
return
(
return
(
<
div
className
=
{
styles
.
editableItem
}
>
<
div
className
=
{
styles
.
editableItem
}
>
{
{
editable
?
editable
?
(
<
div
className
=
{
styles
.
wrapper
}
>
<
div
className
=
{
styles
.
wrapper
}
>
<
Input
<
Input
value
=
{
value
}
value
=
{
value
}
...
@@ -38,7 +38,7 @@ export default class EditableItem extends PureComponent {
...
@@ -38,7 +38,7 @@ export default class EditableItem extends PureComponent {
onClick
=
{
this
.
check
}
onClick
=
{
this
.
check
}
/
>
/
>
<
/div
>
<
/div
>
:
)
:
(
<
div
className
=
{
styles
.
wrapper
}
>
<
div
className
=
{
styles
.
wrapper
}
>
<
span
>
{
value
||
'
'
}
<
/span
>
<
span
>
{
value
||
'
'
}
<
/span
>
<
Icon
<
Icon
...
@@ -47,6 +47,7 @@ export default class EditableItem extends PureComponent {
...
@@ -47,6 +47,7 @@ export default class EditableItem extends PureComponent {
onClick
=
{
this
.
edit
}
onClick
=
{
this
.
edit
}
/
>
/
>
<
/div
>
<
/div
>
)
}
}
<
/div
>
<
/div
>
);
);
...
...
src/components/PageHeader/index.js
View file @
2885fa95
...
@@ -144,17 +144,18 @@ export default class PageHeader extends PureComponent {
...
@@ -144,17 +144,18 @@ export default class PageHeader extends PureComponent {
<
/div
>
<
/div
>
{
{
tabList
&&
tabList
&&
tabList
.
length
&&
tabList
.
length
&&
(
<
Tabs
<
Tabs
className
=
{
styles
.
tabs
}
className
=
{
styles
.
tabs
}
defaultActiveKey
=
{(
tabDefaultValue
&&
tabDefaultValue
.
key
)}
defaultActiveKey
=
{(
tabDefaultValue
&&
tabDefaultValue
.
key
)}
activeKey
=
{
activeTabKey
}
activeKey
=
{
activeTabKey
}
onChange
=
{
this
.
onChange
}
onChange
=
{
this
.
onChange
}
>
>
{
{
tabList
.
map
(
item
=>
<
TabPane
tab
=
{
item
.
tab
}
key
=
{
item
.
key
}
/>
)
tabList
.
map
(
item
=>
<
TabPane
tab
=
{
item
.
tab
}
key
=
{
item
.
key
}
/>
)
}
}
<
/Tabs
>
<
/Tabs
>
)
}
}
<
/div
>
<
/div
>
);
);
...
...
src/routes/Profile/AdvancedProfile.js
View file @
2885fa95
...
@@ -97,12 +97,11 @@ const popoverContent = (
...
@@ -97,12 +97,11 @@ const popoverContent = (
<
/div
>
<
/div
>
);
);
const
customDot
=
(
dot
,
{
status
})
=>
(
status
===
'
process
'
?
const
customDot
=
(
dot
,
{
status
})
=>
(
status
===
'
process
'
?
(
<
Popover
placement
=
"
topLeft
"
arrowPointAtCenter
content
=
{
popoverContent
}
>
<
Popover
placement
=
"
topLeft
"
arrowPointAtCenter
content
=
{
popoverContent
}
>
{
dot
}
{
dot
}
<
/Popover
>
<
/Popover
>
:
dot
)
:
dot
);
);
const
operationTabList
=
[{
const
operationTabList
=
[{
key
:
'
tab1
'
,
key
:
'
tab1
'
,
...
...
src/utils/utils.js
View file @
2885fa95
...
@@ -95,7 +95,7 @@ export function digitUppercase(n) {
...
@@ -95,7 +95,7 @@ export function digitUppercase(n) {
function
getRelation
(
str1
,
str2
)
{
function
getRelation
(
str1
,
str2
)
{
if
(
str1
===
str2
)
{
if
(
str1
===
str2
)
{
console
.
warn
(
'
Two path are equal!
'
);
console
.
warn
(
'
Two path are equal!
'
);
// eslint-disable-line
}
}
const
arr1
=
str1
.
split
(
'
/
'
);
const
arr1
=
str1
.
split
(
'
/
'
);
const
arr2
=
str2
.
split
(
'
/
'
);
const
arr2
=
str2
.
split
(
'
/
'
);
...
...
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