mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-18 08:28:58 +00:00
27 lines
540 B
Vue
27 lines
540 B
Vue
<template>
|
|
<component ref="optionGroup" :is="uiComponent.component" v-bind="uiProps">
|
|
<slot></slot>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed, onMounted, ref } from 'vue';
|
|
|
|
import { getConfig } from './config';
|
|
|
|
const props = defineProps<{
|
|
label?: string;
|
|
disabled?: boolean;
|
|
}>();
|
|
|
|
const uiComponent = getConfig('components').optionGroup;
|
|
|
|
const uiProps = computed(() => uiComponent.props(props));
|
|
|
|
const optionGroup = ref<any>();
|
|
|
|
onMounted(() => {
|
|
optionGroup.value.visible = true;
|
|
});
|
|
</script>
|