From bb97c4c6d0e0cc5f6ff617957096662f4e3878fd Mon Sep 17 00:00:00 2001 From: roymondchen Date: Fri, 20 May 2022 14:35:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(runtime):=20=E8=8E=B7=E5=8F=96dsl=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magic-admin/web/public/runtime/vue3/assets/page.js | 2 +- runtime/react/src/page/main.tsx | 4 ++-- runtime/vue2/src/index.d.ts | 2 +- runtime/vue2/src/page/main.ts | 2 +- runtime/vue3/src/index.d.ts | 2 +- runtime/vue3/src/page/main.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/magic-admin/web/public/runtime/vue3/assets/page.js b/magic-admin/web/public/runtime/vue3/assets/page.js index f565e173..9c416419 100644 --- a/magic-admin/web/public/runtime/vue3/assets/page.js +++ b/magic-admin/web/public/runtime/vue3/assets/page.js @@ -1104,7 +1104,7 @@ Object.values(entry.plugins).forEach((plugin) => { magicApp.use(plugin); }); const app = new App({ - config: ((getUrlParam("localPreview") ? getLocalConfig() : window.magicUiConfig) || [])[0] || {}, + config: ((getUrlParam("localPreview") ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam("page") }); magicApp.config.globalProperties.app = app; diff --git a/runtime/react/src/page/main.tsx b/runtime/react/src/page/main.tsx index 06c49d87..eb4f436e 100644 --- a/runtime/react/src/page/main.tsx +++ b/runtime/react/src/page/main.tsx @@ -29,7 +29,7 @@ import entry from '../comp-entry'; import App from './App'; declare global { interface Window { - magicUiConfig: MApp[]; + magicDSL: MApp[]; magicPresetComponents: any; magicPresetConfigs: any; magicPresetValues: any; @@ -48,7 +48,7 @@ const getLocalConfig = (): MApp[] => { }; const app = new Core({ - config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicUiConfig) || [])[0] || {}, + config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam('page'), }); diff --git a/runtime/vue2/src/index.d.ts b/runtime/vue2/src/index.d.ts index b4acd3b7..60cd8f6e 100644 --- a/runtime/vue2/src/index.d.ts +++ b/runtime/vue2/src/index.d.ts @@ -20,7 +20,7 @@ import { MApp } from '@tmagic/schema'; declare global { interface Window { - magicUiConfig: MApp[]; + magicDSL: MApp[]; magicPresetComponents: any; magicPresetConfigs: any; magicPresetValues: any; diff --git a/runtime/vue2/src/page/main.ts b/runtime/vue2/src/page/main.ts index 9b2ea9f8..60f8e768 100644 --- a/runtime/vue2/src/page/main.ts +++ b/runtime/vue2/src/page/main.ts @@ -32,7 +32,7 @@ Vue.use(CompositionApi); Vue.use(request); const app = new Core({ - config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicUiConfig) || [])[0] || {}, + config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam('page'), }); diff --git a/runtime/vue3/src/index.d.ts b/runtime/vue3/src/index.d.ts index b4acd3b7..60cd8f6e 100644 --- a/runtime/vue3/src/index.d.ts +++ b/runtime/vue3/src/index.d.ts @@ -20,7 +20,7 @@ import { MApp } from '@tmagic/schema'; declare global { interface Window { - magicUiConfig: MApp[]; + magicDSL: MApp[]; magicPresetComponents: any; magicPresetConfigs: any; magicPresetValues: any; diff --git a/runtime/vue3/src/page/main.ts b/runtime/vue3/src/page/main.ts index c45e68b3..f568e18f 100644 --- a/runtime/vue3/src/page/main.ts +++ b/runtime/vue3/src/page/main.ts @@ -40,7 +40,7 @@ Object.values(entry.plugins).forEach((plugin: any) => { }); const app = new Core({ - config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicUiConfig) || [])[0] || {}, + config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam('page'), });