Files
workspace/code/g3soft-libs/docs/examples/radio/basic.vue
T
2026-10-08 22:38:34 +08:00

19 lines
613 B
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">
// G3Radio 必须放在 G3RadioGroup 里才互斥;组内可单独禁用某项
import { ref } from 'vue'
import { G3Radio, G3RadioGroup } from '@g3soft/ui'
const value = ref('monthly')
</script>
<template>
<div>
<G3RadioGroup v-model="value">
<G3Radio value="monthly">按月付费</G3Radio>
<G3Radio value="yearly">按年付费(省 2 个月)</G3Radio>
<G3Radio value="once" disabled>一次性买断(暂不可选)</G3Radio>
</G3RadioGroup>
<p style="margin: 8px 0 0; font-size: 13px; color: #6b7280">选中:{{ value }}</p>
</div>
</template>