mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Field): add message param to 'end-validate' method (#11080)
This commit is contained in:
parent
0ceb6a843c
commit
ece27f9474
@ -231,7 +231,11 @@ export default defineComponent({
|
|||||||
state.validateMessage = '';
|
state.validateMessage = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const endValidate = () => emit('endValidate', { status: state.status });
|
const endValidate = () =>
|
||||||
|
emit('endValidate', {
|
||||||
|
status: state.status,
|
||||||
|
message: state.validateMessage,
|
||||||
|
});
|
||||||
|
|
||||||
const validate = (rules = props.rules) =>
|
const validate = (rules = props.rules) =>
|
||||||
new Promise<FieldValidateError | void>((resolve) => {
|
new Promise<FieldValidateError | void>((resolve) => {
|
||||||
|
@ -299,7 +299,7 @@ Use `input-align` prop to align the input value.
|
|||||||
| click-left-icon | Emitted when the left icon is clicked | _event: MouseEvent_ |
|
| click-left-icon | Emitted when the left icon is clicked | _event: MouseEvent_ |
|
||||||
| click-right-icon | Emitted when the right icon is clicked | _event: MouseEvent_ |
|
| click-right-icon | Emitted when the right icon is clicked | _event: MouseEvent_ |
|
||||||
| start-validate `v3.5.1` | Emitted when start validation | - |
|
| start-validate `v3.5.1` | Emitted when start validation | - |
|
||||||
| end-validate `v3.5.1` | Emitted when end validation | _{ status: string }_ |
|
| end-validate `v3.5.1` | Emitted when end validation | _{ status: string, message: string }_ |
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ export default {
|
|||||||
| click-left-icon | 点击左侧图标时触发 | _event: MouseEvent_ |
|
| click-left-icon | 点击左侧图标时触发 | _event: MouseEvent_ |
|
||||||
| click-right-icon | 点击右侧图标时触发 | _event: MouseEvent_ |
|
| click-right-icon | 点击右侧图标时触发 | _event: MouseEvent_ |
|
||||||
| start-validate `v3.5.1` | 开始表单校验时触发 | - |
|
| start-validate `v3.5.1` | 开始表单校验时触发 | - |
|
||||||
| end-validate `v3.5.1` | 结束表单校验时触发 | _{ status: string }_ |
|
| end-validate `v3.5.1` | 结束表单校验时触发 | _{ status: string, message: string }_ |
|
||||||
|
|
||||||
### 方法
|
### 方法
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user