@daflow-ui/ui-combobox
v0.1.0
Published
Combobox component for DaFlow UI
Downloads
13
Readme
@daflow-ui/ui-combobox
DaFlow UI Combobox 组件 - 带搜索框的选择器(支持远程搜索与虚拟化)。
安装
pnpm add @daflow-ui/ui-combobox使用
<script setup lang="ts">
import { ref } from 'vue';
import { DfCombobox } from '@daflow-ui/ui-combobox';
import '@daflow-ui/ui-combobox/style.css';
const value = ref<string | number>('');
const options = [
{ label: '北京', value: 'beijing' },
{ label: '上海', value: 'shanghai' },
];
</script>
<template>
<DfCombobox v-model="value" :options="options" placeholder="搜索城市" />
<!-- 多选 tags 折叠 -->
<DfCombobox
v-model="values"
multiple
:options="options"
collapse-tags-tooltip
:max-collapse-tags="1"
placeholder="选择城市"
/>
</template>文档
详见 docs/combobox.md
License
MIT
