未验证 提交 afc64cfb 编写于 作者: O openharmony_ci 提交者: Gitee

!22189 包含数字字符串的非法字符串为非法值

Merge pull request !22189 from bizhenhang/changeLogStr
......@@ -71,3 +71,40 @@ API Version 9: Free模式显示位置
API Version 10: Free模式显示位置与Full模式显示位置相同
![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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册