mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-19 12:09:25 +08:00
22 lines
440 B
Vue
22 lines
440 B
Vue
<template>
|
|
<component :is="uiComponent.component" v-bind="uiProps">
|
|
<slot></slot>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts" name="TMOption">
|
|
import { computed } from 'vue';
|
|
|
|
import { getConfig } from './config';
|
|
|
|
const props = defineProps<{
|
|
value?: any;
|
|
label?: string;
|
|
disabled?: boolean;
|
|
}>();
|
|
|
|
const uiComponent = getConfig('components').option;
|
|
|
|
const uiProps = computed(() => uiComponent.props(props));
|
|
</script>
|