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