mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-20 05:29:58 +08:00
25 lines
594 B
Vue
25 lines
594 B
Vue
<template>
|
|
<component class="tmagic-design-dropdown-item" :is="uiComponent" v-bind="uiProps">
|
|
<slot></slot>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue';
|
|
|
|
import { getDesignConfig } from './config';
|
|
import type { DropdownItemProps } from './types';
|
|
|
|
defineOptions({
|
|
name: 'TMDropdownItem',
|
|
});
|
|
|
|
const props = defineProps<DropdownItemProps>();
|
|
|
|
const ui = getDesignConfig('components')?.dropdownItem;
|
|
|
|
const uiComponent = ui?.component || 'el-dropdown-item';
|
|
|
|
const uiProps = computed<DropdownItemProps>(() => ui?.props(props) || props);
|
|
</script>
|