Files
heroui-vue/apps/docs/demos/radio-group-controlled.vue
T
2026-10-22 09:15:27 +08:00

56 lines
1.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import {
RadioGroup,
RadioContent,
RadioControl,
RadioIndicator,
Radio,
Label,
Description,
} from "@heroui-vue/components";
import { ref } from "vue";
const value = ref<string | undefined>("pro");
</script>
<template>
<div class="flex flex-col gap-4">
<RadioGroup
name="plan-controlled"
:model-value="value"
@update:model-value="value = $event"
>
<Label>订阅套餐</Label>
<Radio value="starter">
<RadioContent>
<RadioControl>
<RadioIndicator />
</RadioControl>
入门版
</RadioContent>
<Description>适合副项目和小型团队</Description>
</Radio>
<Radio value="pro">
<RadioContent>
<RadioControl>
<RadioIndicator />
</RadioControl>
专业版
</RadioContent>
<Description>高级报表与分析</Description>
</Radio>
<Radio value="teams">
<RadioContent>
<RadioControl>
<RadioIndicator />
</RadioControl>
团队版
</RadioContent>
<Description>最多可与 10 名队友共享访问权限</Description>
</Radio>
</RadioGroup>
<p class="text-sm text-muted">
已选套餐:
<span class="font-medium">{{ value }}</span>
</p>
</div>
</template>