build(Basic & SDK): 将构建模式从 debug 更改为 release- 在 BuildProfile.ets 文件中将 BUILD_MODE_NAME 从 'debug' 改为 'release'

- 将 DEBUG 变量从 true 改为 false
- 更新 CHANGELOG.md,添加解决窗口状态异常问题的说明
- 修改 README.md 中的 AppAbility 示例代码,优化日志输出和窗口初始化逻辑
这个提交包含在:
徐勤民 2025-08-26 15:39:05 +08:00
父节点 dbca937b2d
当前提交 caa51066e2
共有 3 个文件被更改,包括 8 次插入5 次删除

查看文件

@ -2,8 +2,8 @@
* Use these variables when you tailor your ArkTS code. They must be of the const type. * 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 HAR_VERSION = '1.0.10';
export const BUILD_MODE_NAME = 'debug'; export const BUILD_MODE_NAME = 'release';
export const DEBUG = true; export const DEBUG = false;
export const TARGET_NAME = 'default'; export const TARGET_NAME = 'default';
/** /**

查看文件

@ -3,6 +3,7 @@
> - `ToolsHelper.showConfirmDialog()`&`ToolsHelper.showAlertDialog()`添加自定义`UI`功能 > - `ToolsHelper.showConfirmDialog()`&`ToolsHelper.showAlertDialog()`添加自定义`UI`功能
> - 添加一个`ImageHelper`,处理图片相关 > - 添加一个`ImageHelper`,处理图片相关
> - 添加一个`SwipeView`,左滑删除的item组件 > - 添加一个`SwipeView`,左滑删除的item组件
> - 修改初始化逻辑,解决`This window state is abnormal`的问题
> >
# [v1.0.9] 2025.04.06 # [v1.0.9] 2025.04.06

查看文件

@ -14,14 +14,16 @@ import { GlobalContext } from '@szyx/sdk_base';
export default class AppAbility extends UIAbility { export default class AppAbility extends UIAbility {
onWindowStageCreate(windowStage: window.WindowStage): void { onWindowStageCreate(windowStage: window.WindowStage): void {
GlobalContext.setContext(this.context)
windowStage.loadContent('pages/Index', (err) => { windowStage.loadContent('pages/Index', (err) => {
if (err.code) { 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; return;
} }
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
WindowHelper.windowClass = windowStage.getMainWindowSync()
}); });
// 这行代码
GlobalContext.setContext(this.context)
} }
} }
``` ```