diff --git a/runtime/react/page/main.tsx b/runtime/react/page/main.tsx index 53d25055b..3a895ea1c 100644 --- a/runtime/react/page/main.tsx +++ b/runtime/react/page/main.tsx @@ -61,6 +61,7 @@ const app = new Core({ ua: window.navigator.userAgent, config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam('page'), + useMock: Boolean(getUrlParam('useMock')), }); app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375); diff --git a/runtime/vue2/page/main.ts b/runtime/vue2/page/main.ts index 3d6532f53..ab0aa44fd 100644 --- a/runtime/vue2/page/main.ts +++ b/runtime/vue2/page/main.ts @@ -50,6 +50,7 @@ const app = new Core({ ua: window.navigator.userAgent, config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam('page'), + useMock: Boolean(getUrlParam('useMock')), }); app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375); diff --git a/runtime/vue3/page/main.ts b/runtime/vue3/page/main.ts index 4282a0585..08133e05d 100644 --- a/runtime/vue3/page/main.ts +++ b/runtime/vue3/page/main.ts @@ -52,6 +52,7 @@ const app = new Core({ ua: window.navigator.userAgent, config: ((getUrlParam('localPreview') ? getLocalConfig() : window.magicDSL) || [])[0] || {}, curPage: getUrlParam('page'), + useMock: Boolean(getUrlParam('useMock')), }); app.setDesignWidth(app.env.isWeb ? window.document.documentElement.getBoundingClientRect().width : 375);