Skip to content

Commit

Permalink
fix(runtime): vue runtime App组件中缺失inject
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed May 24, 2024
1 parent d5ce54f commit 15e9cdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion runtime/vue2/page/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { defineComponent, inject } from 'vue';
import type { Page } from '@tmagic/core';
import Core from '@tmagic/core';
Expand Down
8 changes: 1 addition & 7 deletions runtime/vue2/playground/App.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<template>
<magic-ui-page v-if="pageConfig" :config="pageConfig" :key="pageConfig.id"></magic-ui-page>
<magic-ui-page v-if="pageConfig" :key="pageConfig.id" :config="pageConfig"></magic-ui-page>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { useEditorDsl } from '@tmagic/vue-runtime-help';
declare global {
interface Window {
magic: Magic;
appInstance: Core;
}
}
export default defineComponent({
setup() {
Expand Down
2 changes: 2 additions & 0 deletions runtime/vue3/page/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
</template>

<script lang="ts" setup>
import { inject } from 'vue';
import type { Page } from '@tmagic/core';
import Core from '@tmagic/core';
import { addParamToUrl } from '@tmagic/utils';
Expand Down

0 comments on commit 15e9cdc

Please sign in to comment.