tmagic-editor/packages/design/src/OptionGroup.vue
2023-05-30 11:49:32 +08:00

27 lines
613 B
Vue

<template>
<component class="tmagic-design-option-group" ref="optionGroup" :is="uiComponent" v-bind="uiProps">
<slot></slot>
</component>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
import { getConfig } from './config';
import type { OptionGroupProps } from './types';
defineOptions({
name: 'TMOptionGroup',
});
const props = defineProps<OptionGroupProps>();
const ui = getConfig('components')?.optionGroup;
const uiComponent = ui?.component || 'el-option-group';
const uiProps = computed(() => ui?.props(props) || props);
const optionGroup = ref<any>();
</script>