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
193aa9f8
Commit
193aa9f8
authored
Jun 05, 2018
by
jim
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into v2
parents
2c3214f1
2fbc37b0
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
31 deletions
+45
-31
src/components/EditableLinkGroup/index.js
src/components/EditableLinkGroup/index.js
+5
-6
src/components/Ellipsis/index.js
src/components/Ellipsis/index.js
+1
-1
src/components/HeaderSearch/index.js
src/components/HeaderSearch/index.js
+11
-9
src/components/Login/index.js
src/components/Login/index.js
+8
-6
src/components/Login/index.less
src/components/Login/index.less
+0
-1
src/components/NoticeIcon/index.js
src/components/NoticeIcon/index.js
+2
-1
src/components/PageHeader/index.less
src/components/PageHeader/index.less
+5
-3
src/routes/User/Login.js
src/routes/User/Login.js
+2
-2
src/utils/utils.js
src/utils/utils.js
+11
-2
No files found.
src/components/EditableLinkGroup/index.js
View file @
193aa9f8
...
...
@@ -6,18 +6,17 @@ import styles from './index.less';
// TODO: 添加逻辑
class
EditableLinkGroup
extends
PureComponent
{
static
defaultProps
=
{
links
:
[],
onAdd
:
()
=>
{},
linkElement
:
'
a
'
,
};
static
propTypes
=
{
links
:
PropTypes
.
array
,
onAdd
:
PropTypes
.
func
,
linkElement
:
PropTypes
.
oneOfType
([
PropTypes
.
func
,
PropTypes
.
string
]),
};
static
defaultProps
=
{
links
:
[],
onAdd
:
()
=>
{},
linkElement
:
'
a
'
,
};
render
()
{
const
{
links
,
linkElement
,
onAdd
}
=
this
.
props
;
return
(
...
...
src/components/Ellipsis/index.js
View file @
193aa9f8
...
...
@@ -20,7 +20,7 @@ const EllipsisText = ({ text, length, tooltip, ...other }) => {
if
(
length
-
tail
.
length
<=
0
)
{
displayText
=
''
;
}
else
{
displayText
=
text
.
slice
(
0
,
length
-
tail
.
length
);
displayText
=
text
.
slice
(
0
,
length
);
}
if
(
tooltip
)
{
...
...
src/components/HeaderSearch/index.js
View file @
193aa9f8
...
...
@@ -5,15 +5,6 @@ import classNames from 'classnames';
import
styles
from
'
./index.less
'
;
export
default
class
HeaderSearch
extends
PureComponent
{
static
defaultProps
=
{
defaultActiveFirstOption
:
false
,
onPressEnter
:
()
=>
{},
onSearch
:
()
=>
{},
className
:
''
,
placeholder
:
''
,
dataSource
:
[],
defaultOpen
:
false
,
};
static
propTypes
=
{
className
:
PropTypes
.
string
,
placeholder
:
PropTypes
.
string
,
...
...
@@ -23,6 +14,17 @@ export default class HeaderSearch extends PureComponent {
dataSource
:
PropTypes
.
array
,
defaultOpen
:
PropTypes
.
bool
,
};
static
defaultProps
=
{
defaultActiveFirstOption
:
false
,
onPressEnter
:
()
=>
{},
onSearch
:
()
=>
{},
className
:
''
,
placeholder
:
''
,
dataSource
:
[],
defaultOpen
:
false
,
};
state
=
{
searchMode
:
this
.
props
.
defaultOpen
,
value
:
''
,
...
...
src/components/Login/index.js
View file @
193aa9f8
...
...
@@ -9,18 +9,20 @@ import styles from './index.less';
import
LoginContext
from
'
./loginContext
'
;
class
Login
extends
Component
{
static
defaultProps
=
{
className
:
''
,
defaultActiveKey
:
''
,
onTabChange
:
()
=>
{},
onSubmit
:
()
=>
{},
};
static
propTypes
=
{
className
:
PropTypes
.
string
,
defaultActiveKey
:
PropTypes
.
string
,
onTabChange
:
PropTypes
.
func
,
onSubmit
:
PropTypes
.
func
,
};
static
defaultProps
=
{
className
:
''
,
defaultActiveKey
:
''
,
onTabChange
:
()
=>
{},
onSubmit
:
()
=>
{},
};
state
=
{
type
:
this
.
props
.
defaultActiveKey
,
tabs
:
[],
...
...
src/components/Login/index.less
View file @
193aa9f8
...
...
@@ -35,7 +35,6 @@
.getCaptcha {
display: block;
width: 100%;
height: 42px;
}
.submit {
...
...
src/components/NoticeIcon/index.js
View file @
193aa9f8
...
...
@@ -7,6 +7,8 @@ import styles from './index.less';
const
{
TabPane
}
=
Tabs
;
export
default
class
NoticeIcon
extends
PureComponent
{
static
Tab
=
TabPane
;
static
defaultProps
=
{
onItemClick
:
()
=>
{},
onPopupVisibleChange
:
()
=>
{},
...
...
@@ -19,7 +21,6 @@ export default class NoticeIcon extends PureComponent {
},
emptyImage
:
'
https://gw.alipayobjects.com/zos/rmsportal/wAhyIChODzsoKIOBHcBk.svg
'
,
};
static
Tab
=
TabPane
;
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
...
...
src/components/PageHeader/index.less
View file @
193aa9f8
...
...
@@ -11,6 +11,7 @@
.row {
display: flex;
width: 100%;
}
.breadcrumb {
...
...
@@ -66,10 +67,11 @@
.content,
.extraContent,
.main {
// IE auto is no have height
flex: 1;
flex: 0 1 auto;
}
.main {
width: 100%;
}
.title,
.action {
margin-bottom: 16px;
...
...
src/routes/User/Login.js
View file @
193aa9f8
...
...
@@ -78,7 +78,7 @@ export default class LoginPage extends Component {
<
Tab
key
=
"
account
"
tab
=
"
账户密码登录
"
>
{
login
.
status
===
'
error
'
&&
login
.
type
===
'
account
'
&&
!
login
.
submitting
&&
!
submitting
&&
this
.
renderMessage
(
'
账户或密码错误(admin/888888)
'
)}
<
UserName
name
=
"
userName
"
placeholder
=
"
admin/user
"
/>
<
Password
name
=
"
password
"
placeholder
=
"
888888/123456
"
/>
...
...
@@ -86,7 +86,7 @@ export default class LoginPage extends Component {
<
Tab
key
=
"
mobile
"
tab
=
"
手机号登录
"
>
{
login
.
status
===
'
error
'
&&
login
.
type
===
'
mobile
'
&&
!
login
.
submitting
&&
!
submitting
&&
this
.
renderMessage
(
'
验证码错误
'
)}
<
Mobile
name
=
"
mobile
"
/>
<
Captcha
name
=
"
captcha
"
countDown
=
{
120
}
onGetCaptcha
=
{
this
.
onGetCaptcha
}
/
>
...
...
src/utils/utils.js
View file @
193aa9f8
...
...
@@ -71,14 +71,23 @@ export function getPlainNode(nodeList, parentPath = '') {
return
arr
;
}
function
accMul
(
arg1
,
arg2
)
{
let
m
=
0
;
const
s1
=
arg1
.
toString
();
const
s2
=
arg2
.
toString
();
m
+=
s1
.
split
(
'
.
'
).
length
>
1
?
s1
.
split
(
'
.
'
)[
1
].
length
:
0
;
m
+=
s2
.
split
(
'
.
'
).
length
>
1
?
s2
.
split
(
'
.
'
)[
1
].
length
:
0
;
return
(
Number
(
s1
.
replace
(
'
.
'
,
''
))
*
Number
(
s2
.
replace
(
'
.
'
,
''
)))
/
10
**
m
;
}
export
function
digitUppercase
(
n
)
{
const
fraction
=
[
'
角
'
,
'
分
'
];
const
digit
=
[
'
零
'
,
'
壹
'
,
'
贰
'
,
'
叁
'
,
'
肆
'
,
'
伍
'
,
'
陆
'
,
'
柒
'
,
'
捌
'
,
'
玖
'
];
const
unit
=
[[
'
元
'
,
'
万
'
,
'
亿
'
],
[
''
,
'
拾
'
,
'
佰
'
,
'
仟
'
]];
const
unit
=
[[
'
元
'
,
'
万
'
,
'
亿
'
],
[
''
,
'
拾
'
,
'
佰
'
,
'
仟
'
,
'
万
'
]];
let
num
=
Math
.
abs
(
n
);
let
s
=
''
;
fraction
.
forEach
((
item
,
index
)
=>
{
s
+=
(
digit
[
Math
.
floor
(
num
*
10
*
10
**
index
)
%
10
]
+
item
).
replace
(
/零./
,
''
);
s
+=
(
digit
[
Math
.
floor
(
accMul
(
num
,
10
*
10
**
index
)
)
%
10
]
+
item
).
replace
(
/零./
,
''
);
});
s
=
s
||
'
整
'
;
num
=
Math
.
floor
(
num
);
...
...
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