mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
15 lines
435 B
Vue
15 lines
435 B
Vue
<template>
|
|
<component v-if="pageConfig" :is="pageComponent" :key="pageConfig.id" :config="pageConfig"></component>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { inject } from 'vue';
|
|
|
|
import type TMagicApp from '@tmagic/core';
|
|
import { useComponent, useEditorDsl } from '@tmagic/vue-runtime-help';
|
|
|
|
const app = inject<TMagicApp>('app');
|
|
const { pageConfig } = useEditorDsl(app);
|
|
const pageComponent = useComponent('page');
|
|
</script>
|