mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-21 18:50:16 +00:00
27 lines
551 B
Vue
27 lines
551 B
Vue
<template>
|
|
<component :is="uiComponent.component" v-bind="uiProps" @click="clickHandler">
|
|
<slot></slot>
|
|
</component>
|
|
</template>
|
|
|
|
<script setup lang="ts" name="TMStep">
|
|
import { computed } from 'vue';
|
|
|
|
import { getConfig } from './config';
|
|
|
|
const props = defineProps<{
|
|
title?: string;
|
|
active?: number;
|
|
}>();
|
|
|
|
const emit = defineEmits(['click']);
|
|
|
|
const clickHandler = (...args: any[]) => {
|
|
emit('click', ...args);
|
|
};
|
|
|
|
const uiComponent = getConfig('components').step;
|
|
|
|
const uiProps = computed(() => uiComponent.props(props));
|
|
</script>
|