feat: migrate Select with field, collection and SSR contracts
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Select,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
SelectIndicator,
|
||||
SelectPopover,
|
||||
ListBox,
|
||||
ListBoxItem,
|
||||
ListBoxItemIndicator,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
</script>
|
||||
<template>
|
||||
<Select
|
||||
class="w-[256px]"
|
||||
:disabled-keys="['cat', 'kangaroo']"
|
||||
placeholder="请选择动物"
|
||||
>
|
||||
<Label>动物</Label>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
<SelectIndicator />
|
||||
</SelectTrigger>
|
||||
<SelectPopover>
|
||||
<ListBox>
|
||||
<ListBoxItem id="dog" text-value="狗">
|
||||
狗
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem id="cat" text-value="猫">
|
||||
猫
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem id="bird" text-value="鸟">
|
||||
鸟
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem id="kangaroo" text-value="袋鼠">
|
||||
袋鼠
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem id="elephant" text-value="大象">
|
||||
大象
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem id="tiger" text-value="老虎">
|
||||
老虎
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</SelectPopover>
|
||||
</Select>
|
||||
</template>
|
||||
Reference in New Issue
Block a user