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

20 lines
608 B
Vue

<script setup lang="ts">
// 对象形态:自定义 label、禁用某项、带图标
import { ref } from 'vue'
import { G3Segmented } from '@g3soft/ui'
import { AlignCenter, AlignLeft, AlignRight } from '@lucide/vue'
const value = ref('left')
const options = [
{ label: '左对齐', value: 'left', icon: AlignLeft },
{ label: '居中', value: 'center', icon: AlignCenter },
{ label: '右对齐', value: 'right', icon: AlignRight },
{ label: '两端对齐(未实现)', value: 'justify', disabled: true },
]
</script>
<template>
<G3Segmented v-model="value" :options="options" />
</template>