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
2835ffae
Commit
2835ffae
authored
Apr 29, 2018
by
jim
Browse files
Options
Browse Files
Download
Plain Diff
merge master
parents
deccafe6
df0ffd6d
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
126 additions
and
91 deletions
+126
-91
.eslintrc
.eslintrc
+0
-71
.eslintrc.js
.eslintrc.js
+71
-0
package.json
package.json
+5
-4
src/components/Charts/ChartCard/index.d.ts
src/components/Charts/ChartCard/index.d.ts
+1
-1
src/components/Charts/Pie/index.d.ts
src/components/Charts/Pie/index.d.ts
+1
-1
src/components/DescriptionList/DescriptionList.js
src/components/DescriptionList/DescriptionList.js
+3
-1
src/components/DescriptionList/index.less
src/components/DescriptionList/index.less
+2
-1
src/components/Exception/index.js
src/components/Exception/index.js
+3
-1
src/components/GlobalFooter/index.d.ts
src/components/GlobalFooter/index.d.ts
+1
-0
src/components/GlobalFooter/index.js
src/components/GlobalFooter/index.js
+3
-1
src/components/Login/LoginSubmit.js
src/components/Login/LoginSubmit.js
+3
-1
src/components/NumberInfo/index.js
src/components/NumberInfo/index.js
+3
-1
src/components/PageHeader/index.js
src/components/PageHeader/index.js
+19
-3
src/components/PageHeader/index.less
src/components/PageHeader/index.less
+2
-1
src/components/SiderMenu/index.js
src/components/SiderMenu/index.js
+4
-2
src/components/StandardFormRow/index.js
src/components/StandardFormRow/index.js
+3
-1
src/layouts/UserLayout.less
src/layouts/UserLayout.less
+2
-1
No files found.
.eslintrc
deleted
100755 β 0
View file @
deccafe6
{
"parser": "babel-eslint",
"extends": ["airbnb", "prettier"],
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true,
"jest": true,
"jasmine": true
},
"rules": {
"generator-star-spacing": [0],
"consistent-return": [0],
"react/forbid-prop-types": [0],
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
"global-require": [1],
"import/prefer-default-export": [0],
"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],
"no-use-before-define": [0],
"jsx-a11y/no-static-element-interactions": [0],
"jsx-a11y/no-noninteractive-element-interactions": [0],
"jsx-a11y/click-events-have-key-events": [0],
"jsx-a11y/anchor-is-valid": [0],
"no-nested-ternary": [0],
"arrow-body-style": [0],
"import/extensions": [0],
"no-bitwise": [0],
"no-cond-assign": [0],
"import/no-unresolved": [0],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "ignore"
}
],
"object-curly-newline": [0],
"function-paren-newline": [0],
"no-restricted-globals": [0],
"require-yield": [1]
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"settings": {
"polyfills": ["fetch", "promises"]
}
}
.eslintrc.js
0 β 100755
View file @
2835ffae
module
.
exports
=
{
parser
:
'
babel-eslint
'
,
extends
:
[
'
airbnb
'
,
'
prettier
'
],
env
:
{
browser
:
true
,
node
:
true
,
es6
:
true
,
mocha
:
true
,
jest
:
true
,
jasmine
:
true
,
},
rules
:
{
'
generator-star-spacing
'
:
[
0
],
'
consistent-return
'
:
[
0
],
'
react/forbid-prop-types
'
:
[
0
],
'
react/jsx-filename-extension
'
:
[
1
,
{
extensions
:
[
'
.js
'
]
}],
'
global-require
'
:
[
1
],
'
import/prefer-default-export
'
:
[
0
],
'
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
],
'
no-use-before-define
'
:
[
0
],
'
jsx-a11y/no-static-element-interactions
'
:
[
0
],
'
jsx-a11y/no-noninteractive-element-interactions
'
:
[
0
],
'
jsx-a11y/click-events-have-key-events
'
:
[
0
],
'
jsx-a11y/anchor-is-valid
'
:
[
0
],
'
no-nested-ternary
'
:
[
0
],
'
arrow-body-style
'
:
[
0
],
'
import/extensions
'
:
[
0
],
'
no-bitwise
'
:
[
0
],
'
no-cond-assign
'
:
[
0
],
'
import/no-unresolved
'
:
[
0
],
'
comma-dangle
'
:
[
'
error
'
,
{
arrays
:
'
always-multiline
'
,
objects
:
'
always-multiline
'
,
imports
:
'
always-multiline
'
,
exports
:
'
always-multiline
'
,
functions
:
'
ignore
'
,
},
],
'
object-curly-newline
'
:
[
0
],
'
function-paren-newline
'
:
[
0
],
'
no-restricted-globals
'
:
[
0
],
'
require-yield
'
:
[
1
],
},
parserOptions
:
{
ecmaFeatures
:
{
experimentalObjectRestSpread
:
true
,
},
},
settings
:
{
polyfills
:
[
'
fetch
'
,
'
promises
'
],
},
};
package.json
View file @
2835ffae
...
@@ -25,12 +25,13 @@
...
@@ -25,12 +25,13 @@
"
@babel/polyfill
"
:
"
^7.0.0-beta.36
"
,
"
@babel/polyfill
"
:
"
^7.0.0-beta.36
"
,
"
@types/react
"
:
"
^16.3.8
"
,
"
@types/react
"
:
"
^16.3.8
"
,
"
@types/react-dom
"
:
"
^16.0.5
"
,
"
@types/react-dom
"
:
"
^16.0.5
"
,
"
antd
"
:
"
^3.4.1
"
,
"
bizcharts-plugin-slider
"
:
"
^2.0.3
"
,
"
antd
"
:
"
^3.4.3
"
,
"
babel-plugin-transform-decorators-legacy
"
:
"
^1.3.4
"
,
"
babel-runtime
"
:
"
^6.9.2
"
,
"
babel-runtime
"
:
"
^6.9.2
"
,
"
bizcharts
"
:
"
^3.1.5
"
,
"
bizcharts
"
:
"
^3.1.5
"
,
"
bizcharts-plugin-slider
"
:
"
^2.0.3
"
,
"
classnames
"
:
"
^2.2.5
"
,
"
classnames
"
:
"
^2.2.5
"
,
"
dva
"
:
"
^2.2.
2
"
,
"
dva
"
:
"
^2.2.
3
"
,
"
dva-loading
"
:
"
^1.0.4
"
,
"
dva-loading
"
:
"
^1.0.4
"
,
"
enquire-js
"
:
"
^0.2.1
"
,
"
enquire-js
"
:
"
^0.2.1
"
,
"
lodash
"
:
"
^4.17.4
"
,
"
lodash
"
:
"
^4.17.4
"
,
...
@@ -76,7 +77,7 @@
...
@@ -76,7 +77,7 @@
"
redbox-react
"
:
"
^1.5.0
"
,
"
redbox-react
"
:
"
^1.5.0
"
,
"
regenerator-runtime
"
:
"
^0.11.1
"
,
"
regenerator-runtime
"
:
"
^0.11.1
"
,
"
roadhog
"
:
"
^2.3.0
"
,
"
roadhog
"
:
"
^2.3.0
"
,
"
roadhog-api-doc
"
:
"
^
0.3.4
"
,
"
roadhog-api-doc
"
:
"
^
1.0.2
"
,
"
stylelint
"
:
"
^8.4.0
"
,
"
stylelint
"
:
"
^8.4.0
"
,
"
stylelint-config-prettier
"
:
"
^3.0.4
"
,
"
stylelint-config-prettier
"
:
"
^3.0.4
"
,
"
stylelint-config-standard
"
:
"
^18.0.0
"
"
stylelint-config-standard
"
:
"
^18.0.0
"
...
...
src/components/Charts/ChartCard/index.d.ts
View file @
2835ffae
...
@@ -2,7 +2,7 @@ import * as React from 'react';
...
@@ -2,7 +2,7 @@ import * as React from 'react';
export
interface
IChartCardProps
{
export
interface
IChartCardProps
{
title
:
React
.
ReactNode
;
title
:
React
.
ReactNode
;
action
?:
React
.
ReactNode
;
action
?:
React
.
ReactNode
;
total
?:
React
.
ReactNode
|
function
|
number
;
total
?:
React
.
ReactNode
|
number
|
(()
=>
React
.
ReactNode
|
number
)
;
footer
?:
React
.
ReactNode
;
footer
?:
React
.
ReactNode
;
contentHeight
?:
number
;
contentHeight
?:
number
;
avatar
?:
React
.
ReactNode
;
avatar
?:
React
.
ReactNode
;
...
...
src/components/Charts/Pie/index.d.ts
View file @
2835ffae
...
@@ -10,7 +10,7 @@ export interface IPieProps {
...
@@ -10,7 +10,7 @@ export interface IPieProps {
x
:
string
|
string
;
x
:
string
|
string
;
y
:
number
;
y
:
number
;
}
>
;
}
>
;
total
?:
string
|
function
;
total
?:
React
.
ReactNode
|
number
|
(()
=>
React
.
ReactNode
|
number
)
;
title
?:
React
.
ReactNode
;
title
?:
React
.
ReactNode
;
tooltip
?:
boolean
;
tooltip
?:
boolean
;
valueFormat
?:
(
value
:
string
)
=>
string
|
React
.
ReactNode
;
valueFormat
?:
(
value
:
string
)
=>
string
|
React
.
ReactNode
;
...
...
src/components/DescriptionList/DescriptionList.js
View file @
2835ffae
...
@@ -3,7 +3,7 @@ import classNames from 'classnames';
...
@@ -3,7 +3,7 @@ import classNames from 'classnames';
import
{
Row
}
from
'
antd
'
;
import
{
Row
}
from
'
antd
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
export
default
({
const
DescriptionList
=
({
className
,
className
,
title
,
title
,
col
=
3
,
col
=
3
,
...
@@ -27,3 +27,5 @@ export default ({
...
@@ -27,3 +27,5 @@ export default ({
<
/div
>
<
/div
>
);
);
};
};
export
default
DescriptionList
;
src/components/DescriptionList/index.less
View file @
2835ffae
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
}
}
.term {
.term {
line-height: 22px;
// Line-height is 22px IE dom height will calculate error
line-height: 20px;
padding-bottom: 16px;
padding-bottom: 16px;
margin-right: 8px;
margin-right: 8px;
color: @heading-color;
color: @heading-color;
...
...
src/components/Exception/index.js
View file @
2835ffae
...
@@ -4,7 +4,7 @@ import { Button } from 'antd';
...
@@ -4,7 +4,7 @@ import { Button } from 'antd';
import
config
from
'
./typeConfig
'
;
import
config
from
'
./typeConfig
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
export
default
({
className
,
linkElement
=
'
a
'
,
type
,
title
,
desc
,
img
,
actions
,
...
rest
})
=>
{
const
Exception
=
({
className
,
linkElement
=
'
a
'
,
type
,
title
,
desc
,
img
,
actions
,
...
rest
})
=>
{
const
pageType
=
type
in
config
?
type
:
'
404
'
;
const
pageType
=
type
in
config
?
type
:
'
404
'
;
const
clsString
=
classNames
(
styles
.
exception
,
className
);
const
clsString
=
classNames
(
styles
.
exception
,
className
);
return
(
return
(
...
@@ -33,3 +33,5 @@ export default ({ className, linkElement = 'a', type, title, desc, img, actions,
...
@@ -33,3 +33,5 @@ export default ({ className, linkElement = 'a', type, title, desc, img, actions,
<
/div
>
<
/div
>
);
);
};
};
export
default
Exception
;
src/components/GlobalFooter/index.d.ts
View file @
2835ffae
import
*
as
React
from
'
react
'
;
import
*
as
React
from
'
react
'
;
export
interface
IGlobalFooterProps
{
export
interface
IGlobalFooterProps
{
links
?:
Array
<
{
links
?:
Array
<
{
key
?:
string
;
title
:
React
.
ReactNode
;
title
:
React
.
ReactNode
;
href
:
string
;
href
:
string
;
blankTarget
?:
boolean
;
blankTarget
?:
boolean
;
...
...
src/components/GlobalFooter/index.js
View file @
2835ffae
...
@@ -2,7 +2,7 @@ import React from 'react';
...
@@ -2,7 +2,7 @@ import React from 'react';
import
classNames
from
'
classnames
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
export
default
({
className
,
links
,
copyright
})
=>
{
const
GlobalFooter
=
({
className
,
links
,
copyright
})
=>
{
const
clsString
=
classNames
(
styles
.
globalFooter
,
className
);
const
clsString
=
classNames
(
styles
.
globalFooter
,
className
);
return
(
return
(
<
div
className
=
{
clsString
}
>
<
div
className
=
{
clsString
}
>
...
@@ -19,3 +19,5 @@ export default ({ className, links, copyright }) => {
...
@@ -19,3 +19,5 @@ export default ({ className, links, copyright }) => {
<
/div
>
<
/div
>
);
);
};
};
export
default
GlobalFooter
;
src/components/Login/LoginSubmit.js
View file @
2835ffae
...
@@ -5,7 +5,7 @@ import styles from './index.less';
...
@@ -5,7 +5,7 @@ import styles from './index.less';
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
export
default
({
className
,
...
rest
})
=>
{
const
LoginSubmit
=
({
className
,
...
rest
})
=>
{
const
clsString
=
classNames
(
styles
.
submit
,
className
);
const
clsString
=
classNames
(
styles
.
submit
,
className
);
return
(
return
(
<
FormItem
>
<
FormItem
>
...
@@ -13,3 +13,5 @@ export default ({ className, ...rest }) => {
...
@@ -13,3 +13,5 @@ export default ({ className, ...rest }) => {
<
/FormItem
>
<
/FormItem
>
);
);
};
};
export
default
LoginSubmit
;
src/components/NumberInfo/index.js
View file @
2835ffae
...
@@ -3,7 +3,7 @@ import { Icon } from 'antd';
...
@@ -3,7 +3,7 @@ import { Icon } from 'antd';
import
classNames
from
'
classnames
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
export
default
({
theme
,
title
,
subTitle
,
total
,
subTotal
,
status
,
suffix
,
gap
,
...
rest
})
=>
(
const
NumberInfo
=
({
theme
,
title
,
subTitle
,
total
,
subTotal
,
status
,
suffix
,
gap
,
...
rest
})
=>
(
<
div
<
div
className
=
{
classNames
(
styles
.
numberInfo
,
{
className
=
{
classNames
(
styles
.
numberInfo
,
{
[
styles
[
`numberInfo
${
theme
}
`
]]:
theme
,
[
styles
[
`numberInfo
${
theme
}
`
]]:
theme
,
...
@@ -26,3 +26,5 @@ export default ({ theme, title, subTitle, total, subTotal, status, suffix, gap,
...
@@ -26,3 +26,5 @@ export default ({ theme, title, subTitle, total, subTotal, status, suffix, gap,
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
export
default
NumberInfo
;
src/components/PageHeader/index.js
View file @
2835ffae
...
@@ -17,8 +17,18 @@ export function getBreadcrumb(breadcrumbNameMap, url) {
...
@@ -17,8 +17,18 @@ export function getBreadcrumb(breadcrumbNameMap, url) {
}
}
return
breadcrumb
||
{};
return
breadcrumb
||
{};
}
}
export
default
class
PageHeader
extends
PureComponent
{
export
default
class
PageHeader
extends
PureComponent
{
state
=
{
breadcrumb
:
null
,
};
componentDidMount
()
{
this
.
getBreadcrumbDom
();
}
componentWillReceiveProps
()
{
this
.
getBreadcrumbDom
();
}
onChange
=
key
=>
{
onChange
=
key
=>
{
if
(
this
.
props
.
onTabChange
)
{
if
(
this
.
props
.
onTabChange
)
{
this
.
props
.
onTabChange
(
key
);
this
.
props
.
onTabChange
(
key
);
...
@@ -32,6 +42,12 @@ export default class PageHeader extends PureComponent {
...
@@ -32,6 +42,12 @@ export default class PageHeader extends PureComponent {
breadcrumbNameMap
:
this
.
props
.
breadcrumbNameMap
,
breadcrumbNameMap
:
this
.
props
.
breadcrumbNameMap
,
};
};
};
};
getBreadcrumbDom
=
()
=>
{
const
breadcrumb
=
this
.
conversionBreadcrumbList
();
this
.
setState
({
breadcrumb
,
});
};
// Generated according to props
// Generated according to props
conversionFromProps
=
()
=>
{
conversionFromProps
=
()
=>
{
const
{
breadcrumbList
,
breadcrumbSeparator
,
linkElement
=
'
a
'
}
=
this
.
props
;
const
{
breadcrumbList
,
breadcrumbSeparator
,
linkElement
=
'
a
'
}
=
this
.
props
;
...
@@ -151,8 +167,8 @@ export default class PageHeader extends PureComponent {
...
@@ -151,8 +167,8 @@ export default class PageHeader extends PureComponent {
tabDefaultActiveKey
,
tabDefaultActiveKey
,
tabBarExtraContent
,
tabBarExtraContent
,
}
=
this
.
props
;
}
=
this
.
props
;
const
clsString
=
classNames
(
styles
.
pageHeader
,
className
);
const
clsString
=
classNames
(
styles
.
pageHeader
,
className
);
const
breadcrumb
=
this
.
conversionBreadcrumbList
();
const
activeKeyProps
=
{};
const
activeKeyProps
=
{};
if
(
tabDefaultActiveKey
!==
undefined
)
{
if
(
tabDefaultActiveKey
!==
undefined
)
{
activeKeyProps
.
defaultActiveKey
=
tabDefaultActiveKey
;
activeKeyProps
.
defaultActiveKey
=
tabDefaultActiveKey
;
...
@@ -163,7 +179,7 @@ export default class PageHeader extends PureComponent {
...
@@ -163,7 +179,7 @@ export default class PageHeader extends PureComponent {
return
(
return
(
<
div
className
=
{
clsString
}
>
<
div
className
=
{
clsString
}
>
{
breadcrumb
}
{
this
.
state
.
breadcrumb
}
<
div
className
=
{
styles
.
detail
}
>
<
div
className
=
{
styles
.
detail
}
>
{
logo
&&
<
div
className
=
{
styles
.
logo
}
>
{
logo
}
<
/div>
}
{
logo
&&
<
div
className
=
{
styles
.
logo
}
>
{
logo
}
<
/div>
}
<
div
className
=
{
styles
.
main
}
>
<
div
className
=
{
styles
.
main
}
>
...
...
src/components/PageHeader/index.less
View file @
2835ffae
...
@@ -66,7 +66,8 @@
...
@@ -66,7 +66,8 @@
.content,
.content,
.extraContent,
.extraContent,
.main {
.main {
flex: auto;
// IE auto is no have height
flex: 1;
}
}
.title,
.title,
...
...
src/components/SiderMenu/index.js
View file @
2835ffae
...
@@ -19,8 +19,8 @@ const getFlatMenuKeys = menuData => {
...
@@ -19,8 +19,8 @@ const getFlatMenuKeys = menuData => {
return
keys
;
return
keys
;
};
};
export
default
props
=>
const
SiderMenuWrapper
=
props
=>
props
.
isMobile
||
props
.
fixSiderbar
?
(
props
.
isMobile
?
(
<
DrawerMenu
<
DrawerMenu
parent
=
{
null
}
parent
=
{
null
}
level
=
{
null
}
level
=
{
null
}
...
@@ -40,3 +40,5 @@ export default props =>
...
@@ -40,3 +40,5 @@ export default props =>
)
:
(
)
:
(
<
SiderMenu
{...
props
}
flatMenuKeys
=
{
getFlatMenuKeys
(
props
.
menuData
)}
/
>
<
SiderMenu
{...
props
}
flatMenuKeys
=
{
getFlatMenuKeys
(
props
.
menuData
)}
/
>
);
);
export
default
SiderMenuWrapper
;
src/components/StandardFormRow/index.js
View file @
2835ffae
...
@@ -2,7 +2,7 @@ import React from 'react';
...
@@ -2,7 +2,7 @@ import React from 'react';
import
classNames
from
'
classnames
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
export
default
({
title
,
children
,
last
,
block
,
grid
,
...
rest
})
=>
{
const
StandardFormRow
=
({
title
,
children
,
last
,
block
,
grid
,
...
rest
})
=>
{
const
cls
=
classNames
(
styles
.
standardFormRow
,
{
const
cls
=
classNames
(
styles
.
standardFormRow
,
{
[
styles
.
standardFormRowBlock
]:
block
,
[
styles
.
standardFormRowBlock
]:
block
,
[
styles
.
standardFormRowLast
]:
last
,
[
styles
.
standardFormRowLast
]:
last
,
...
@@ -20,3 +20,5 @@ export default ({ title, children, last, block, grid, ...rest }) => {
...
@@ -20,3 +20,5 @@ export default ({ title, children, last, block, grid, ...rest }) => {
<
/div
>
<
/div
>
);
);
};
};
export
default
StandardFormRow
;
src/layouts/UserLayout.less
View file @
2835ffae
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
.container {
.container {
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
min-height: 100%;
height: 100vh;
overflow: auto;
background: #f0f2f5;
background: #f0f2f5;
}
}
...
...
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