mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-24 03:15:11 +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);
|
||||
});
|
||||
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;
|
||||
|
@ -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'),
|
||||
});
|
||||
|
||||
|
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 {
|
||||
interface Window {
|
||||
magicUiConfig: MApp[];
|
||||
magicDSL: MApp[];
|
||||
magicPresetComponents: any;
|
||||
magicPresetConfigs: any;
|
||||
magicPresetValues: any;
|
||||
|
@ -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'),
|
||||
});
|
||||
|
||||
|
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 {
|
||||
interface Window {
|
||||
magicUiConfig: MApp[];
|
||||
magicDSL: MApp[];
|
||||
magicPresetComponents: any;
|
||||
magicPresetConfigs: any;
|
||||
magicPresetValues: any;
|
||||
|
@ -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'),
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user