feat(component): search input support to specify validateInfo #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
简介
validateInfo
属性,支持展示 info、warning、error 三种状态onSearch
和onChange
的参数一致主要变更
validationInfo
属性,类型为string | { type: keyof typeof InfoTypeEnum; text: string };
;仅传入字符串时会默认用 info 状态做兜底展示validationInfo
属性validateValue
和setValidateInfo
方法,前者用于判断当前输入框中的值是否合法,后者用于设置validationInfo
值validateValue
方法判断当前 queryVal 的合法性,然后展示错误信息