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
Show 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 @@
"react/jsx-no-bind": [0],
"react/prop-types": [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-restricted-syntax": [0],
"import/no-extraneous-dependencies": [0],
...
...
src/components/AvatarList/index.js
View file @
2885fa95
...
...
@@ -28,12 +28,11 @@ const Item = ({ src, size, tips, onClick = (() => {}) }) => {
return
(
<
li
className
=
{
cls
}
onClick
=
{
onClick
}
>
{
tips
?
tips
?
(
<
Tooltip
title
=
{
tips
}
>
<
Avatar
src
=
{
src
}
size
=
{
size
}
style
=
{{
cursor
:
'
pointer
'
}}
/
>
<
/Tooltip
>
:
<
Avatar
src
=
{
src
}
size
=
{
size
}
/
>
)
:
<
Avatar
src
=
{
src
}
size
=
{
size
}
/
>
}
<
/li
>
);
...
...
src/components/EditableItem/index.js
View file @
2885fa95
...
...
@@ -25,7 +25,7 @@ export default class EditableItem extends PureComponent {
return
(
<
div
className
=
{
styles
.
editableItem
}
>
{
editable
?
editable
?
(
<
div
className
=
{
styles
.
wrapper
}
>
<
Input
value
=
{
value
}
...
...
@@ -38,7 +38,7 @@ export default class EditableItem extends PureComponent {
onClick
=
{
this
.
check
}
/
>
<
/div
>
:
)
:
(
<
div
className
=
{
styles
.
wrapper
}
>
<
span
>
{
value
||
'
'
}
<
/span
>
<
Icon
...
...
@@ -47,6 +47,7 @@ export default class EditableItem extends PureComponent {
onClick
=
{
this
.
edit
}
/
>
<
/div
>
)
}
<
/div
>
);
...
...
src/components/PageHeader/index.js
View file @
2885fa95
...
...
@@ -144,7 +144,7 @@ export default class PageHeader extends PureComponent {
<
/div
>
{
tabList
&&
tabList
.
length
&&
tabList
.
length
&&
(
<
Tabs
className
=
{
styles
.
tabs
}
defaultActiveKey
=
{(
tabDefaultValue
&&
tabDefaultValue
.
key
)}
...
...
@@ -155,6 +155,7 @@ export default class PageHeader extends PureComponent {
tabList
.
map
(
item
=>
<
TabPane
tab
=
{
item
.
tab
}
key
=
{
item
.
key
}
/>
)
}
<
/Tabs
>
)
}
<
/div
>
);
...
...
src/routes/Profile/AdvancedProfile.js
View file @
2885fa95
...
...
@@ -97,12 +97,11 @@ const popoverContent = (
<
/div
>
);
const
customDot
=
(
dot
,
{
status
})
=>
(
status
===
'
process
'
?
const
customDot
=
(
dot
,
{
status
})
=>
(
status
===
'
process
'
?
(
<
Popover
placement
=
"
topLeft
"
arrowPointAtCenter
content
=
{
popoverContent
}
>
{
dot
}
<
/Popover
>
:
dot
);
)
:
dot
);
const
operationTabList
=
[{
key
:
'
tab1
'
,
...
...
src/utils/utils.js
View file @
2885fa95
...
...
@@ -95,7 +95,7 @@ export function digitUppercase(n) {
function
getRelation
(
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
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