Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
1df8c50d
Commit
1df8c50d
authored
Dec 29, 2016
by
baiyaaaaa
Committed by
杨奕
Dec 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix valida field params bug
parent
5493a135
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
examples/docs/zh-CN/form.md
examples/docs/zh-CN/form.md
+5
-5
packages/form/src/form-item.vue
packages/form/src/form-item.vue
+1
-1
No files found.
examples/docs/zh-CN/form.md
View file @
1df8c50d
...
@@ -793,11 +793,11 @@
...
@@ -793,11 +793,11 @@
### Form Methods
### Form Methods
| 方法名 | 说明 |
| 方法名 | 说明 |
参数
|---------- |-------------- |
|---------- |-------------- |
--------------
| validate
(cb) | 对整个表单进行校验的方法 |
| validate
| 对整个表单进行校验的方法 | Function(callback: Function(boolean))
| validateField
(prop, cb) | 对部分表单字段进行校验的方法 |
| validateField
| 对部分表单字段进行校验的方法 | Function(prop: string, callback: Function(errorMessage: string))
| resetFields | 对整个表单进行重置,将所有字段值重置为
初始值并移除校验结果 |
| resetFields | 对整个表单进行重置,将所有字段值重置为
空并移除校验结果 | -
### Form-Item Attributes
### Form-Item Attributes
...
...
packages/form/src/form-item.vue
View file @
1df8c50d
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
this
.
validateState
=
!
errors
?
'
success
'
:
'
error
'
;
this
.
validateState
=
!
errors
?
'
success
'
:
'
error
'
;
this
.
validateMessage
=
errors
?
errors
[
0
].
message
:
''
;
this
.
validateMessage
=
errors
?
errors
[
0
].
message
:
''
;
callback
(
errors
);
callback
(
this
.
validateMessage
);
});
});
},
},
resetField
()
{
resetField
()
{
...
...
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