Appearance
SearchInput 搜索框
带搜索按钮的输入框。回车或点按钮都会抛出 search。
vue
<CkSearchInput v-model="keyword" allow-clear enter-button="搜索" placeholder="设备、区域、告警" @search="onSearch" />API
| 属性 | 说明 | 类型 | 默认 |
|---|---|---|---|
| modelValue | 输入值 | string | '' |
| placeholder | 占位 | string | — |
| loading | 搜索中。按钮转圈,不再重复触发 | boolean | false |
| disabled | 禁用 | boolean | false |
| enterButton | 按钮文字。true 只显示图标 | boolean | string | false |
| allowClear | 可清空 | boolean | false |
| size | 尺寸 | 'small' | 'default' | 'large' | — |
| 事件 | 说明 |
|---|---|
| search | 回车或点按钮,参数为当前文字 |
| update:modelValue | 输入变化 |