字典选择输入
代码事例
vue
<template>
<p>单选</p>
<DicInput v-model="model.single" code="sex_code" placeholder="请选择" />
<p>多选</p>
<DicInput v-model="model.multiple" code="sex_code" multiple placeholder="请选择" />
<p>数据模型</p>
<fk-row>
<JsonViewer :data="model" />
</fk-row>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { DicInput } from '@erp/biz';
const model = ref({
single: '',
multiple: [],
});
</script>API
<dic-input> Props
| 参数名 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| placeholder | 提示文字 | string | - |
| multiple | 是否多选 | boolean | false |
| disabled | 是否禁用 | boolean | false |
| allow-clear | 是否允许清空输入框 | boolean | false |
| model-value (v-model) (必填) | 绑定值 | union | - |
| code (必填) | 字典code | string | - |