代码演示
<oio-input v-model:value="value"></oio-input>
API
Input
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|---|---|---|---|---|
| addonAfter | 带标签的 input,设置后置标签 | string|slot | ||
| addonBefore | 带标签的 input,设置前置标签 | string|slot | ||
| allowClear | 可以点击清除图标删除内容 | boolean | ||
| defaultValue | 输入框默认内容 | string | ||
| disabled | 是否禁用状态,默认为 false | boolean | false | |
| maxlength | 最大长度 | number | ||
| prefix | 带有前缀图标的 input | slot | ||
| showCount | 是否展示字数 | boolean | false | |
| suffix | 带有后缀图标的 input | slot | ||
| type | 声明 input 类型,同原生 input 标签的 type 属性,见:MDN(请直接使用 <a-textarea /> 代替 type="textarea")。 |
string | text |
|
| value(v-model:value) | 输入框内容 | string |
Input 事件
| 事件名称 | 说明 | 回调参数 | |
|---|---|---|---|
| update:value | 输入框内容变化时的回调 | function(e) | |
| pressEnter | 按下回车的回调 | function(e) |
Input.Search
代码演示
<oio-input-search v-model:value="value"></oio-input-search>
Input.Search 事件
| 事件名称 | 说明 | 回调参数 |
|---|---|---|
| search | 点击搜索或按下回车键时的回调 | function(value, event) |
其余属性和 Input 一致。
Oinone社区 作者:汤乾华原创文章,如若转载,请注明出处:https://doc.oinone.top/frontend/components/4904.html
访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验