fix(components): [form] inline-message of form-item defaults to undefined (#21944)

* fix(components): [form] inline-message of form-item should be Boolean

* fix: update

* fix: update

* docs: inline-message of form-item defaults to undefined
This commit is contained in:
Rainbow
2025-08-30 06:09:38 +08:00
committed by GitHub
parent 3d7fcdadab
commit 01dcccdfc3
2 changed files with 3 additions and 3 deletions

View File

@@ -184,7 +184,7 @@ form/accessibility
| rules | Validation rules of form, see the [following table](#formitemrule), more advanced usage at [async-validator](https://github.com/yiminghe/async-validator). | ^[object]`Arrayable<FormItemRule>` | — |
| error | Field error message, set its value and the field will validate error and show this message immediately. | ^[string] | — |
| show-message | Whether to show the error message. | ^[boolean] | true |
| inline-message | Inline style validate message. | ^[string] / ^[boolean] | '' |
| inline-message | Inline style validate message. | ^[boolean] | false |
| size | Control the size of components in this form-item. | ^[enum]`'' \| 'large' \| 'default' \| 'small'` | — |
| for | Same as for in native label. | ^[string] | — |
| validate-status | Validation state of formItem. | ^[enum]`'' \| 'error' \| 'validating' \| 'success'` | — |

View File

@@ -73,8 +73,8 @@ export const formItemProps = buildProps({
* @description Inline style validate message.
*/
inlineMessage: {
type: [String, Boolean],
default: '',
type: Boolean,
default: undefined,
},
/**
* @description Whether to show the error message.