89 lines
2.4 KiB
Vue
89 lines
2.4 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
Select,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectIndicator,
|
|
SelectPopover,
|
|
ListBox,
|
|
ListBoxItem,
|
|
ListBoxItemIndicator,
|
|
ListBoxSection,
|
|
Label,
|
|
Header,
|
|
Separator,
|
|
} from "@heroui-vue/components";
|
|
</script>
|
|
<template>
|
|
<Select class="w-[256px]" placeholder="请选择国家">
|
|
<Label>国家</Label>
|
|
<SelectTrigger>
|
|
<SelectValue />
|
|
<SelectIndicator />
|
|
</SelectTrigger>
|
|
<SelectPopover>
|
|
<ListBox>
|
|
<ListBoxSection>
|
|
<Header>北美洲</Header>
|
|
<ListBoxItem id="usa" text-value="美国">
|
|
美国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="canada" text-value="加拿大">
|
|
加拿大
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="mexico" text-value="墨西哥">
|
|
墨西哥
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
</ListBoxSection>
|
|
<Separator />
|
|
<ListBoxSection>
|
|
<Header>欧洲</Header>
|
|
<ListBoxItem id="uk" text-value="英国">
|
|
英国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="france" text-value="法国">
|
|
法国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="germany" text-value="德国">
|
|
德国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="spain" text-value="西班牙">
|
|
西班牙
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="italy" text-value="意大利">
|
|
意大利
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
</ListBoxSection>
|
|
<Separator />
|
|
<ListBoxSection>
|
|
<Header>亚洲</Header>
|
|
<ListBoxItem id="japan" text-value="日本">
|
|
日本
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="china" text-value="中国">
|
|
中国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="india" text-value="印度">
|
|
印度
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
<ListBoxItem id="south-korea" text-value="韩国">
|
|
韩国
|
|
<ListBoxItemIndicator />
|
|
</ListBoxItem>
|
|
</ListBoxSection>
|
|
</ListBox>
|
|
</SelectPopover>
|
|
</Select>
|
|
</template>
|