1# arkui子系统ChangeLog 2 3## cl.arkui.1 Navigation menus属性显示变更 4 5**变更影响** 6 7menus的value属性值不做显示,如果需要显示,可以使用自定义Builder显示。 8 9**示例:** 10```ts 11@Entry 12@Component 13struct Index { 14 build() { 15 Column() { 16 Navigation() { 17 Text('Navigation') 18 }.title("Navigation Menu") 19 .menus([ 20 {icon: 'common/image/icon.png', value: 'menu1'}, 21 {icon: 'common/image/icon.png', value: 'menu2'}, 22 {icon: 'common/image/icon.png', value: 'menu3'} 23 ]) 24 } 25 } 26} 27``` 28API Version 9:menus的value属性会显示 29 30 31 32API Version 10: menus中的value属性不显示 33 34 35## cl.arkui.2 Navigation的titleMode属性Free模式默认显示位置变更 36 37**变更影响** 381. Navigation组件自定义标题并titleMode设置为Full模式或Free模式显示位置相同 392. 使用自定义title结合Free模式的标签会出现标签位置向右偏移 40 41**示例:** 42```ts 43@Entry 44@Component 45struct Index { 46 @Builder NavigationTile() { 47 Column() { 48 Text('title').fontColor('#182431').fontSize(30).lineHeight(41) 49 Text('subTitle').fontColor('#182431').fontSize(14).lineHeight(19).margin(top:2, bottom: 20) 50 } 51 } 52 53 build() { 54 Column() { 55 Navigation() { 56 Text('Navigation') 57 }.title(this.NavigationTitle) 58 .titleMode(NavigationTitleMode.Free) 59 .menus([ 60 {icon: 'common/image/icon.png', value: 'menu1'} 61 ]) 62 } 63 } 64} 65``` 66 67API Version 9: Free模式显示位置 68 69 70 71API Version 10: Free模式显示位置与Full模式显示位置相同 72 73 74 75## cl.arkui.3 字符串异常值默认变更 76 77**变更影响** 78 79包含数字的非法字符串不会解析为数字部分,而是视为非法值,按照规则设定为默认值 80 81**示例:** 82```ts 83@Entry 84@Component 85struct GridRowExample { 86 @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] 87 @State currentBp: string = 'unknown' 88 89 build() { 90 Column() { 91 GridRow({ 92 columns: 5, 93 gutter: { x: 5, y: 10 }, 94 breakpoints: { value: ["400vp", "600vp", "800vp"], 95 reference: BreakpointsReference.WindowSize }, 96 direction: GridRowDirection.Row 97 }) { 98 ForEach(this.bgColors, (color) => { 99 GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 } }) { 100 Row().width("100%").height("20vp") 101 }.borderColor(color).borderWidth(2) 102 }) 103 }.width("100%").height("100%") 104 }.width("80pv").margin({ left: 10, top: 5, bottom: 5 }).height(200) 105 .border({ color: '#880606', width: 2 }) 106 } 107} 108``` 109 110API Version 9:上方示例中的GridRow设定width中的"80pv"会等同于width设定字符串"80" 111 112API Version 10: 上方示例中的GridRow的width中的"80pv"会被视为异常值,所以GridRow的width设定为默认值,相当于未设定 113 114## cl.arkui.4 Swiper的loop属性设置非法值时使用默认值true 115 116**变更影响** 117 118Swiper的loop属性设置非法值时原先使用false,现更改为true 119 120API Version 9: loop属性设置非法值时使用false 121 122API Version 10: loop属性设置非法值时使用true 123 124## cl.arkui.5 Swiper的翻页速度阈值由180px/s调整为1200px/s 125 126**变更影响** 127 128需要更快的速度才能满足翻页的条件