fix: 迭代器内的组件配置了声明周期代码块无效
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
"peerDependencies": {
|
||||
"@tmagic/utils": "workspace:*",
|
||||
"@tmagic/schema": "workspace:*",
|
||||
"@tmagic/vue-container": "workspace:*",
|
||||
"@tmagic/vue-runtime-help": "workspace:*",
|
||||
"typescript": "*"
|
||||
},
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
<template>
|
||||
<TMagicContainer class="magic-ui-page" :config="config"></TMagicContainer>
|
||||
<magic-ui-container class="magic-ui-page" :data-tmagic-id="config.id" :config="config"></magic-ui-container>
|
||||
</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>,
|
||||
@@ -30,10 +25,14 @@ export default defineComponent({
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
useApp({
|
||||
const { app } = useApp({
|
||||
config: props.config,
|
||||
methods: { refresh },
|
||||
});
|
||||
|
||||
return {
|
||||
app,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user