FileInput (文件选择)
样式化的文件选择按钮(v-model File | File[]),触发器可自定义。
基础用法
Basic.vue
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| accept | string | "" | |
| className | string | "" | |
| disabled | boolean | false | |
| error | string | "" | |
| files | File[] | [] | |
| fullWidth | boolean | false | |
| hint | string | "" | |
| maxSize | number | undefined | |
| modelValue | File | null | null | |
| multiple | boolean | false | |
| showFileName | boolean | true | |
| triggerColor | KunUIColor | "primary" | |
| triggerIcon | string | "lucide:upload" | |
| triggerSize | KunUISize | "md" | |
| triggerText | string | "选择文件" | |
| triggerVariant | KunUIVariant | "flat" |