Skip to content

Commit

Permalink
feat(script): 添加对自动调整窗口开关的重启提示
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Oct 7, 2023
1 parent da6f135 commit 46b957b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/scripts/src/projects/zhs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,11 @@ export const ZHSProject = Project.create({
await $app_actions.setViewPort(state.window.minWidth + 10, state.window.minHeight + 10);
}

// 监听自动调整选项
this.onConfigChange('autoSetViewPort', () => {
$modal('confirm', { title: '警告', content: '检测到自动调整窗口已经更改,重启浏览器后才能生效。' });
});

// 检测窗口大小
await $.sleep(1000);
if (!checkWindowSize()) return;
Expand Down

0 comments on commit 46b957b

Please sign in to comment.