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
7c9026a9
Commit
7c9026a9
authored
Nov 09, 2018
by
庞志刚
Committed by
陈帅
Nov 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加验证码按钮国际化, Fix #2790 . (#2810)
Signed-off-by:
PangZhiGang
<
306888588@qq.com
>
parent
6e0163ad
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
4 deletions
+20
-4
src/components/Login/LoginItem.js
src/components/Login/LoginItem.js
+6
-3
src/components/Login/index.less
src/components/Login/index.less
+5
-0
src/layouts/UserLayout.less
src/layouts/UserLayout.less
+1
-1
src/locales/en-US.js
src/locales/en-US.js
+2
-0
src/locales/pt-BR.js
src/locales/pt-BR.js
+2
-0
src/locales/zh-CN.js
src/locales/zh-CN.js
+2
-0
src/locales/zh-TW.js
src/locales/zh-TW.js
+2
-0
No files found.
src/components/Login/LoginItem.js
View file @
7c9026a9
import
React
,
{
Component
}
from
'
react
'
;
import
React
,
{
Component
}
from
'
react
'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
}
from
'
antd
'
;
import
{
Form
,
Input
,
Button
,
Row
,
Col
}
from
'
antd
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
omit
from
'
omit.js
'
;
import
omit
from
'
omit.js
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
import
ItemMap
from
'
./map
'
;
import
ItemMap
from
'
./map
'
;
...
@@ -9,7 +10,8 @@ const FormItem = Form.Item;
...
@@ -9,7 +10,8 @@ const FormItem = Form.Item;
class
WrapFormItem
extends
Component
{
class
WrapFormItem
extends
Component
{
static
defaultProps
=
{
static
defaultProps
=
{
buttonText
:
'
获取验证码
'
,
getCaptchaButtonText
:
formatMessage
({
id
:
'
form.captcha
'
}),
getCaptchaSecondText
:
formatMessage
({
id
:
'
form.captcha.second
'
}),
};
};
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -83,7 +85,8 @@ class WrapFormItem extends Component {
...
@@ -83,7 +85,8 @@ class WrapFormItem extends Component {
defaultValue
,
defaultValue
,
rules
,
rules
,
name
,
name
,
buttonText
,
getCaptchaButtonText
,
getCaptchaSecondText
,
updateActive
,
updateActive
,
type
,
type
,
...
restProps
...
restProps
...
@@ -108,7 +111,7 @@ class WrapFormItem extends Component {
...
@@ -108,7 +111,7 @@ class WrapFormItem extends Component {
size
=
"
large
"
size
=
"
large
"
onClick
=
{
this
.
onGetCaptcha
}
onClick
=
{
this
.
onGetCaptcha
}
>
>
{
count
?
`
${
count
}
s`
:
b
uttonText
}
{
count
?
`
${
count
}
${
getCaptchaSecondText
}
`
:
getCaptchaB
uttonText
}
<
/Button
>
<
/Button
>
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
...
...
src/components/Login/index.less
View file @
7c9026a9
...
@@ -13,6 +13,11 @@
...
@@ -13,6 +13,11 @@
}
}
}
}
.getCaptcha {
display: block;
width: 100%;
}
.icon {
.icon {
font-size: 24px;
font-size: 24px;
color: rgba(0, 0, 0, 0.2);
color: rgba(0, 0, 0, 0.2);
...
...
src/layouts/UserLayout.less
View file @
7c9026a9
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
}
}
.content {
.content {
padding:
7
2px 0 24px 0;
padding:
3
2px 0 24px 0;
}
}
}
}
...
...
src/locales/en-US.js
View file @
7c9026a9
...
@@ -20,6 +20,8 @@ export default {
...
@@ -20,6 +20,8 @@ export default {
'
validation.date.required
'
:
'
Please select the start and end date
'
,
'
validation.date.required
'
:
'
Please select the start and end date
'
,
'
validation.goal.required
'
:
'
Please enter a description of the goal
'
,
'
validation.goal.required
'
:
'
Please enter a description of the goal
'
,
'
validation.standard.required
'
:
'
Please enter a metric
'
,
'
validation.standard.required
'
:
'
Please enter a metric
'
,
'
form.captcha
'
:
'
Get Captcha
'
,
'
form.captcha.second
'
:
'
sec
'
,
'
form.optional
'
:
'
(optional)
'
,
'
form.optional
'
:
'
(optional)
'
,
'
form.submit
'
:
'
Submit
'
,
'
form.submit
'
:
'
Submit
'
,
'
form.save
'
:
'
Save
'
,
'
form.save
'
:
'
Save
'
,
...
...
src/locales/pt-BR.js
View file @
7c9026a9
...
@@ -16,6 +16,8 @@ export default {
...
@@ -16,6 +16,8 @@ export default {
'
validation.phone-number.required
'
:
'
Por favor insira seu telefone!
'
,
'
validation.phone-number.required
'
:
'
Por favor insira seu telefone!
'
,
'
validation.phone-number.wrong-format
'
:
'
Formato de telefone errado!
'
,
'
validation.phone-number.wrong-format
'
:
'
Formato de telefone errado!
'
,
'
validation.verification-code.required
'
:
'
Por favor insira seu código de verificação!
'
,
'
validation.verification-code.required
'
:
'
Por favor insira seu código de verificação!
'
,
'
form.captcha
'
:
'
Get Captcha
'
,
'
form.captcha.second
'
:
'
sec
'
,
'
form.email.placeholder
'
:
'
Email
'
,
'
form.email.placeholder
'
:
'
Email
'
,
'
form.password.placeholder
'
:
'
Senha
'
,
'
form.password.placeholder
'
:
'
Senha
'
,
'
form.confirm-password.placeholder
'
:
'
Confirme a senha
'
,
'
form.confirm-password.placeholder
'
:
'
Confirme a senha
'
,
...
...
src/locales/zh-CN.js
View file @
7c9026a9
...
@@ -19,6 +19,8 @@ export default {
...
@@ -19,6 +19,8 @@ export default {
'
validation.date.required
'
:
'
请选择起止日期
'
,
'
validation.date.required
'
:
'
请选择起止日期
'
,
'
validation.goal.required
'
:
'
请输入目标描述
'
,
'
validation.goal.required
'
:
'
请输入目标描述
'
,
'
validation.standard.required
'
:
'
请输入衡量标准
'
,
'
validation.standard.required
'
:
'
请输入衡量标准
'
,
'
form.captcha
'
:
'
获取验证码
'
,
'
form.captcha.second
'
:
'
秒
'
,
'
form.optional
'
:
'
(选填)
'
,
'
form.optional
'
:
'
(选填)
'
,
'
form.submit
'
:
'
提交
'
,
'
form.submit
'
:
'
提交
'
,
'
form.save
'
:
'
保存
'
,
'
form.save
'
:
'
保存
'
,
...
...
src/locales/zh-TW.js
View file @
7c9026a9
...
@@ -19,6 +19,8 @@ export default {
...
@@ -19,6 +19,8 @@ export default {
'
validation.date.required
'
:
'
請選擇起止日期
'
,
'
validation.date.required
'
:
'
請選擇起止日期
'
,
'
validation.goal.required
'
:
'
請輸入目標描述
'
,
'
validation.goal.required
'
:
'
請輸入目標描述
'
,
'
validation.standard.required
'
:
'
請輸入衡量標淮
'
,
'
validation.standard.required
'
:
'
請輸入衡量標淮
'
,
'
form.captcha
'
:
'
獲取驗證碼
'
,
'
form.captcha.second
'
:
'
秒
'
,
'
form.optional
'
:
'
(選填)
'
,
'
form.optional
'
:
'
(選填)
'
,
'
form.submit
'
:
'
提交
'
,
'
form.submit
'
:
'
提交
'
,
'
form.save
'
:
'
保存
'
,
'
form.save
'
:
'
保存
'
,
...
...
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