mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[improvement] Search: add error prop (#820)
This commit is contained in:
parent
c4f1427842
commit
7908a769ec
@ -52,6 +52,7 @@ Search 支持自定义右侧取消按钮,使用名字为 action 的 slot 即
|
||||
| background | 搜索框背景色 | `String` | `#f2f2f2` |
|
||||
| show-action | 是否在搜索框右侧显示取消按钮 | `Boolean` | `false` |
|
||||
| focus | 获取焦点 | `Boolean` | `false` |
|
||||
| error | 是否将输入内容标红 | `Boolean` | `false` |
|
||||
| disabled | 是否禁用输入框 | `Boolean` | `false` |
|
||||
| readonly | 是否只读 | `Boolean` | `false` |
|
||||
| maxlength | 最大输入长度,设置为 -1 的时候不限制最大长度 | `Number` | `-1` |
|
||||
|
@ -7,6 +7,7 @@ VantComponent({
|
||||
|
||||
props: {
|
||||
focus: Boolean,
|
||||
error: Boolean,
|
||||
disabled: Boolean,
|
||||
readonly: Boolean,
|
||||
inputAlign: String,
|
||||
|
@ -8,6 +8,7 @@
|
||||
type="search"
|
||||
left-icon="search"
|
||||
focus="{{ focus }}"
|
||||
error="{{ error }}"
|
||||
border="{{ false }}"
|
||||
confirm-type="search"
|
||||
value="{{ value }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user