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

25 lines
834 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">
// 纵向排列与整组禁用
import { ref } from 'vue'
import { G3Radio, G3RadioGroup, G3Space } from '@g3soft/ui'
const layout = ref(1)
const disabledValue = ref(2)
</script>
<template>
<G3Space direction="vertical" :size="20" style="display: flex">
<!-- 组默认水平换行排列;纵向需要自己包一层纵向容器 -->
<G3RadioGroup v-model="layout" style="flex-direction: column; align-items: flex-start; gap: 8px">
<G3Radio :value="1">紧凑视图</G3Radio>
<G3Radio :value="2">标准视图</G3Radio>
<G3Radio :value="3">宽松视图</G3Radio>
</G3RadioGroup>
<G3RadioGroup v-model="disabledValue" disabled>
<G3Radio :value="1">整组禁用 A</G3Radio>
<G3Radio :value="2">整组禁用 B</G3Radio>
</G3RadioGroup>
</G3Space>
</template>