tmagic-editor/packages/design/src/OptionGroup.vue
2022-10-11 18:11:32 +08:00

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>