Skip to content

Multi Select ​

Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码

预览 ​

DesignEngineering

用法 ​

vue
<script setup lang="ts">
import { MultiSelect } from 'beui-vue'
import { ref } from 'vue'
const teams = ref(['design','engineering'])
const options = [
  { value: 'design', label: 'Design', color: '#e6637c', group: 'Product teams' },
  { value: 'engineering', label: 'Engineering', color: '#65a5df', group: 'Product teams' },
  { value: 'product', label: 'Product', color: '#e7af4d', group: 'Product teams' },
  { value: 'research', label: 'Research', color: '#a589d8', group: 'Product teams' },
  { value: 'marketing', label: 'Marketing', color: '#48a97f', group: 'Business teams' },
  { value: 'operations', label: 'Operations', color: '#8192a7', group: 'Business teams' },
]
</script>
<template><MultiSelect v-model="teams" :options="options" label="Search teams" placeholder="Choose teams" empty="No teams found." /></template>

API ​

v-model 为选中值数组,options 设置可搜索项。支持单独删除标签、退格删除和分组。

还原验收 ​

基于 beUI 的独立 Vue 移植,依 MIT 许可证分发。