mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-26 19:19:59 +08:00
fix(runtime): 获取dsl字段出错
This commit is contained in:
parent
662a3d61ea
commit
bb97c4c6d0
@ -1104,7 +1104,7 @@ Object.values(entry.plugins).forEach((plugin) => {
|
|||||||
magicApp.use(plugin);
|
magicApp.use(plugin);
|
||||||
});
|
});
|
||||||
const app = new App({
|
const app = new App({
|
||||||
config: ((getUrlParam("localPreview") ? getLocalConfig() : window.magicUiConfig) || [])[0] || {},
|
config: ((getUrlParam("localPreview") ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam("page")
|
curPage: getUrlParam("page")
|
||||||
});
|
});
|
||||||
magicApp.config.globalProperties.app = app;
|
magicApp.config.globalProperties.app = app;
|
||||||
|
@ -29,7 +29,7 @@ import entry from '../comp-entry';
|
|||||||
import App from './App';
|
import App from './App';
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
magicUiConfig: MApp[];
|
magicDSL: MApp[];
|
||||||
magicPresetComponents: any;
|
magicPresetComponents: any;
|
||||||
magicPresetConfigs: any;
|
magicPresetConfigs: any;
|
||||||
magicPresetValues: any;
|
magicPresetValues: any;
|
||||||
@ -48,7 +48,7 @@ const getLocalConfig = (): MApp[] => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const app = new Core({
|
const app = new Core({
|
||||||
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicUiConfig) || [])[0] || {},
|
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam('page'),
|
curPage: getUrlParam('page'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
2
runtime/vue2/src/index.d.ts
vendored
2
runtime/vue2/src/index.d.ts
vendored
@ -20,7 +20,7 @@ import { MApp } from '@tmagic/schema';
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
magicUiConfig: MApp[];
|
magicDSL: MApp[];
|
||||||
magicPresetComponents: any;
|
magicPresetComponents: any;
|
||||||
magicPresetConfigs: any;
|
magicPresetConfigs: any;
|
||||||
magicPresetValues: any;
|
magicPresetValues: any;
|
||||||
|
@ -32,7 +32,7 @@ Vue.use(CompositionApi);
|
|||||||
Vue.use(request);
|
Vue.use(request);
|
||||||
|
|
||||||
const app = new Core({
|
const app = new Core({
|
||||||
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicUiConfig) || [])[0] || {},
|
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam('page'),
|
curPage: getUrlParam('page'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
2
runtime/vue3/src/index.d.ts
vendored
2
runtime/vue3/src/index.d.ts
vendored
@ -20,7 +20,7 @@ import { MApp } from '@tmagic/schema';
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
magicUiConfig: MApp[];
|
magicDSL: MApp[];
|
||||||
magicPresetComponents: any;
|
magicPresetComponents: any;
|
||||||
magicPresetConfigs: any;
|
magicPresetConfigs: any;
|
||||||
magicPresetValues: any;
|
magicPresetValues: any;
|
||||||
|
@ -40,7 +40,7 @@ Object.values(entry.plugins).forEach((plugin: any) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const app = new Core({
|
const app = new Core({
|
||||||
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicUiConfig) || [])[0] || {},
|
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam('page'),
|
curPage: getUrlParam('page'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user