diff --git a/BuildProfile.ets b/BuildProfile.ets index 7b63954..b2b828e 100644 --- a/BuildProfile.ets +++ b/BuildProfile.ets @@ -2,8 +2,8 @@ * Use these variables when you tailor your ArkTS code. They must be of the const type. */ export const HAR_VERSION = '1.0.10'; -export const BUILD_MODE_NAME = 'debug'; -export const DEBUG = true; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; export const TARGET_NAME = 'default'; /** diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce89cc..f6bd62e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ > - `ToolsHelper.showConfirmDialog()`&`ToolsHelper.showAlertDialog()`添加自定义`UI`功能 > - 添加一个`ImageHelper`,处理图片相关 > - 添加一个`SwipeView`,左滑删除的item组件 +> - 修改初始化逻辑,解决`This window state is abnormal`的问题 > # [v1.0.9] 2025.04.06 diff --git a/README.md b/README.md index de32d6a..a66c4e7 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,16 @@ import { GlobalContext } from '@szyx/sdk_base'; export default class AppAbility extends UIAbility { onWindowStageCreate(windowStage: window.WindowStage): void { + GlobalContext.setContext(this.context) + windowStage.loadContent('pages/Index', (err) => { if (err.code) { - hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + LogHelper.error(`Failed to load the content. Cause: ${JSON.stringify(err) ?? ''}`); return; } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); + WindowHelper.windowClass = windowStage.getMainWindowSync() }); - // 这行代码 - GlobalContext.setContext(this.context) } } ```