mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
23 lines
491 B
Vue
23 lines
491 B
Vue
<template>
|
|
<component class="tmagic-design-option" :is="uiComponent.component" v-bind="uiProps">
|
|
<slot></slot>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
|
|
import { getConfig } from './config';
|
|
import type { OptionProps } from './types';
|
|
|
|
defineOptions({
|
|
name: 'TMOption',
|
|
});
|
|
|
|
const props = defineProps<OptionProps>();
|
|
|
|
const uiComponent = getConfig('components').option;
|
|
|
|
const uiProps = computed(() => uiComponent.props(props));
|
|
</script>
|