feat: migrate Select with field, collection and SSR contracts
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Select,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
SelectIndicator,
|
||||
SelectPopover,
|
||||
ListBox,
|
||||
ListBoxItem,
|
||||
ListBoxItemIndicator,
|
||||
Label,
|
||||
} from "@heroui-vue/components";
|
||||
const itemClass =
|
||||
"rounded-lg data-[focused=true]:bg-accent/10 data-[selected=true]:text-foreground";
|
||||
</script>
|
||||
<template>
|
||||
<Select class="w-56" placeholder="选择套餐" variant="secondary">
|
||||
<Label class="font-medium text-foreground">套餐</Label>
|
||||
<SelectTrigger class="rounded-xl bg-default">
|
||||
<SelectValue />
|
||||
<SelectIndicator />
|
||||
</SelectTrigger>
|
||||
<SelectPopover
|
||||
class="rounded-xl border border-border bg-surface p-1 shadow-lg"
|
||||
>
|
||||
<ListBox>
|
||||
<ListBoxItem :class="itemClass" id="free" text-value="免费">
|
||||
免费
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
<ListBoxItem :class="itemClass" id="pro" text-value="专业版">
|
||||
专业版
|
||||
<ListBoxItemIndicator />
|
||||
</ListBoxItem>
|
||||
</ListBox>
|
||||
</SelectPopover>
|
||||
</Select>
|
||||
</template>
|
||||
Reference in New Issue
Block a user