mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-12 22:40:21 +08:00
feat(runtime): 支持数据源mock
This commit is contained in:
parent
4c46a4e575
commit
9072642f22
@ -61,6 +61,7 @@ const app = new Core({
|
|||||||
ua: window.navigator.userAgent,
|
ua: window.navigator.userAgent,
|
||||||
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam('page'),
|
curPage: getUrlParam('page'),
|
||||||
|
useMock: Boolean(getUrlParam('useMock')),
|
||||||
});
|
});
|
||||||
|
|
||||||
app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);
|
app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);
|
||||||
|
@ -50,6 +50,7 @@ const app = new Core({
|
|||||||
ua: window.navigator.userAgent,
|
ua: window.navigator.userAgent,
|
||||||
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam('page'),
|
curPage: getUrlParam('page'),
|
||||||
|
useMock: Boolean(getUrlParam('useMock')),
|
||||||
});
|
});
|
||||||
|
|
||||||
app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);
|
app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);
|
||||||
|
@ -52,6 +52,7 @@ const app = new Core({
|
|||||||
ua: window.navigator.userAgent,
|
ua: window.navigator.userAgent,
|
||||||
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {},
|
||||||
curPage: getUrlParam('page'),
|
curPage: getUrlParam('page'),
|
||||||
|
useMock: Boolean(getUrlParam('useMock')),
|
||||||
});
|
});
|
||||||
|
|
||||||
app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);
|
app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user