mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
31 lines
679 B
Vue
31 lines
679 B
Vue
<template>
|
|
<component class="tmagic-design-tab-pane" :is="uiComponent" v-bind="uiProps">
|
|
<template #default>
|
|
<slot></slot>
|
|
</template>
|
|
|
|
<template #label v-if="$slots.label">
|
|
<slot name="label"></slot>
|
|
</template>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
|
|
import { getDesignConfig } from './config';
|
|
import type { TabPaneProps } from './types';
|
|
|
|
defineOptions({
|
|
name: 'TMTabPane',
|
|
});
|
|
|
|
const props = defineProps<TabPaneProps>();
|
|
|
|
const ui = getDesignConfig('components')?.tabPane;
|
|
|
|
const uiComponent = ui?.component || 'el-tab-pane';
|
|
|
|
const uiProps = computed(() => ui?.props(props) || props);
|
|
</script>
|