Skip to content

Commit

Permalink
feat(runtime): 支持数据源mock
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Oct 2, 2023
1 parent 4c46a4e commit 9072642
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/react/page/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions runtime/vue2/page/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions runtime/vue3/page/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9072642

Please sign in to comment.