mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-02-11 07:35:33 +00:00
40 lines
753 B
Vue
40 lines
753 B
Vue
<template>
|
|
<TMagicContainer class="magic-ui-page" :config="config"></TMagicContainer>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, type PropType } from 'vue-demi';
|
|
|
|
import type { MPage } from '@tmagic/schema';
|
|
import TMagicContainer from '@tmagic/vue-container';
|
|
import { useApp } from '@tmagic/vue-runtime-help';
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
TMagicContainer,
|
|
},
|
|
|
|
props: {
|
|
config: {
|
|
type: Object as PropType<MPage>,
|
|
required: true,
|
|
},
|
|
model: {
|
|
type: Object,
|
|
default: () => ({}),
|
|
},
|
|
},
|
|
|
|
setup(props) {
|
|
const refresh = () => {
|
|
window.location.reload();
|
|
};
|
|
|
|
useApp({
|
|
config: props.config,
|
|
methods: { refresh },
|
|
});
|
|
},
|
|
});
|
|
</script>
|