diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.5/changelogs-arkui.md b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.5/changelogs-arkui.md index 793df76331639f4642d758edc75f30e6a3c99135..fca5a5cba5370726ad428af1cd714b6edf1ff544 100644 --- a/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.5/changelogs-arkui.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_4.0.9.5/changelogs-arkui.md @@ -70,4 +70,41 @@ API Version 9: Free模式显示位置 API Version 10: Free模式显示位置与Full模式显示位置相同 -![Navigation](figures/navigation_title_mode_free_sdk10.png) \ No newline at end of file +![Navigation](figures/navigation_title_mode_free_sdk10.png) +## cl.arkui.3 字符串异常值默认变更 + +**变更影响** + +包含数字的非法字符串不会解析为数字部分,而是视为非法值,按照规则设定为默认值 + +**示例:** +```ts +@Entry +@Component +struct GridRowExample { + @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] + @State currentBp: string = 'unknown' + + build() { + Column() { + GridRow({ + columns: 5, + gutter: { x: 5, y: 10 }, + breakpoints: { value: ["400vp", "600vp", "800vp"], + reference: BreakpointsReference.WindowSize }, + direction: GridRowDirection.Row + }) { + ForEach(this.bgColors, (color) => { + GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 } }) { + Row().width("100%").height("20vp") + }.borderColor(color).borderWidth(2) + }) + }.width("100%").height("100%") + }.width("80pv").margin({ left: 10, top: 5, bottom: 5 }).height(200) + .border({ color: '#880606', width: 2 }) + } +} + +API Version 9:上方示例中的GridRow设定width中的"80pv"会等同于width设定字符串"80" + +API Version 10: 上方示例中的GridRow的width中的"80pv"会被视为异常值,所以GridRow的width设定为默认值,相当于未设定 \ No newline at end of file