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
P
pro-blocks
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
pro-blocks
Commits
0bc43677
Commit
0bc43677
authored
May 07, 2019
by
billfeller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: AccountSettings/base add handlerSubmit
parent
9d54a0ea
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
AccountSettings/src/components/base.tsx
AccountSettings/src/components/base.tsx
+12
-2
AccountSettings/src/locales/en-US.ts
AccountSettings/src/locales/en-US.ts
+1
-0
AccountSettings/src/locales/zh-CN.ts
AccountSettings/src/locales/zh-CN.ts
+1
-0
AccountSettings/src/locales/zh-TW.ts
AccountSettings/src/locales/zh-TW.ts
+1
-0
No files found.
AccountSettings/src/components/base.tsx
View file @
0bc43677
import
React
,
{
Component
,
Fragment
}
from
'
react
'
;
import
{
formatMessage
,
FormattedMessage
}
from
'
umi-plugin-react/locale
'
;
import
{
Form
,
Input
,
Upload
,
Select
,
Button
}
from
'
antd
'
;
import
{
Form
,
Input
,
Upload
,
Select
,
Button
,
message
}
from
'
antd
'
;
import
{
FormComponentProps
}
from
'
antd/lib/form
'
;
import
{
connect
}
from
'
dva
'
;
import
styles
from
'
./BaseView.less
'
;
...
...
@@ -102,6 +102,16 @@ class BaseView extends Component<BaseViewProps> {
this
.
view
=
ref
;
};
handlerSubmit
=
(
event
:
Event
)
=>
{
event
.
preventDefault
();
const
{
form
}
=
this
.
props
;
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
message
.
success
(
formatMessage
({
id
:
'
BLOCK_NAME.basic.updatesucc
'
}));
}
});
};
render
()
{
const
{
form
:
{
getFieldDecorator
},
...
...
@@ -193,7 +203,7 @@ class BaseView extends Component<BaseViewProps> {
],
})(<
PhoneView
/>)
}
</
FormItem
>
<
Button
type
=
"primary"
>
<
Button
type
=
"primary"
onClick
=
{
this
.
handlerSubmit
}
>
<
FormattedMessage
id
=
"BLOCK_NAME.basic.update"
defaultMessage
=
"Update Information"
/>
</
Button
>
</
Form
>
...
...
AccountSettings/src/locales/en-US.ts
View file @
0bc43677
...
...
@@ -21,6 +21,7 @@ export default {
'
BLOCK_NAME.basic.phone
'
:
'
Phone Number
'
,
'
BLOCK_NAME.basic.phone-message
'
:
'
Please input your phone!
'
,
'
BLOCK_NAME.basic.update
'
:
'
Update Information
'
,
'
BLOCK_NAME.basic.updatesucc
'
:
'
Update basic information successfully
'
,
'
BLOCK_NAME.security.strong
'
:
'
Strong
'
,
'
BLOCK_NAME.security.medium
'
:
'
Medium
'
,
'
BLOCK_NAME.security.weak
'
:
'
Weak
'
,
...
...
AccountSettings/src/locales/zh-CN.ts
View file @
0bc43677
...
...
@@ -21,6 +21,7 @@ export default {
'
BLOCK_NAME.basic.phone
'
:
'
联系电话
'
,
'
BLOCK_NAME.basic.phone-message
'
:
'
请输入您的联系电话!
'
,
'
BLOCK_NAME.basic.update
'
:
'
更新基本信息
'
,
'
BLOCK_NAME.basic.updatesucc
'
:
'
更新基本信息成功
'
,
'
BLOCK_NAME.security.strong
'
:
'
强
'
,
'
BLOCK_NAME.security.medium
'
:
'
中
'
,
'
BLOCK_NAME.security.weak
'
:
'
弱
'
,
...
...
AccountSettings/src/locales/zh-TW.ts
View file @
0bc43677
...
...
@@ -21,6 +21,7 @@ export default {
'
BLOCK_NAME.basic.phone
'
:
'
聯系電話
'
,
'
BLOCK_NAME.basic.phone-message
'
:
'
請輸入您的聯系電話!
'
,
'
BLOCK_NAME.basic.update
'
:
'
更新基本信息
'
,
'
BLOCK_NAME.basic.updatesucc
'
:
'
更新基本信息成功
'
,
'
BLOCK_NAME.security.strong
'
:
'
強
'
,
'
BLOCK_NAME.security.medium
'
:
'
中
'
,
'
BLOCK_NAME.security.weak
'
:
'
弱
'
,
...
...
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