99 lines
2.7 KiB
Vue
99 lines
2.7 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
Select,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectIndicator,
|
|
SelectPopover,
|
|
ListBox,
|
|
ListBoxItem,
|
|
ListBoxItemIndicator,
|
|
Label,
|
|
} from "@heroui-vue/components";
|
|
</script>
|
|
<template>
|
|
<div class="flex flex-col gap-4">
|
|
<Select
|
|
is-disabled
|
|
class="w-[256px]"
|
|
default-value="california"
|
|
placeholder="请选择"
|
|
>
|
|
<Label>州</Label>
|
|
<SelectTrigger>
|
|
<SelectValue />
|
|
<SelectIndicator />
|
|
</SelectTrigger>
|
|
<SelectPopover>
|
|
<ListBox>
|
|
<ListBoxItem id="florida" text-value="佛罗里达">
|
|
佛罗里达
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="delaware" text-value="特拉华">
|
|
特拉华
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="california" text-value="加利福尼亚">
|
|
加利福尼亚
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="texas" text-value="德克萨斯">
|
|
德克萨斯
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="new-york" text-value="纽约">
|
|
纽约
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="washington" text-value="华盛顿">
|
|
华盛顿
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
</ListBox>
|
|
</SelectPopover>
|
|
</Select>
|
|
<Select
|
|
is-disabled
|
|
class="w-[256px]"
|
|
:default-value="['argentina', 'japan', 'france']"
|
|
placeholder="请选择国家"
|
|
selection-mode="multiple"
|
|
>
|
|
<Label>拟访问国家</Label>
|
|
<SelectTrigger>
|
|
<SelectValue />
|
|
<SelectIndicator />
|
|
</SelectTrigger>
|
|
<SelectPopover>
|
|
<ListBox>
|
|
<ListBoxItem id="argentina" text-value="阿根廷">
|
|
阿根廷
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="venezuela" text-value="委内瑞拉">
|
|
委内瑞拉
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="japan" text-value="日本">
|
|
日本
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="france" text-value="法国">
|
|
法国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="italy" text-value="意大利">
|
|
意大利
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="spain" text-value="西班牙">
|
|
西班牙
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
</ListBox>
|
|
</SelectPopover>
|
|
</Select>
|
|
</div>
|
|
</template>
|