mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
27 lines
625 B
Vue
27 lines
625 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 { getDesignConfig } from './config';
|
|
import type { OptionGroupProps } from './types';
|
|
|
|
defineOptions({
|
|
name: 'TMOptionGroup',
|
|
});
|
|
|
|
const props = defineProps<OptionGroupProps>();
|
|
|
|
const ui = getDesignConfig('components')?.optionGroup;
|
|
|
|
const uiComponent = ui?.component || 'el-option-group';
|
|
|
|
const uiProps = computed(() => ui?.props(props) || props);
|
|
|
|
const optionGroup = ref<any>();
|
|
</script>
|