1e41f4b71Sopenharmony_ci# ArkUI Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## cl.arkui.1 Visibility Change of the menus Attribute in \<Navigation> 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci**Change Impact** 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciThe **value** sub-attribute of the **menus** attribute is not displayed. To display the value, you can use a custom builder. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci**Example** 10e41f4b71Sopenharmony_ci```ts 11e41f4b71Sopenharmony_ci@Entry 12e41f4b71Sopenharmony_ci@Component 13e41f4b71Sopenharmony_cistruct Index { 14e41f4b71Sopenharmony_ci build() { 15e41f4b71Sopenharmony_ci Column() { 16e41f4b71Sopenharmony_ci Navigation() { 17e41f4b71Sopenharmony_ci Text('Navigation') 18e41f4b71Sopenharmony_ci }.title("Navigation Menu") 19e41f4b71Sopenharmony_ci .menus([ 20e41f4b71Sopenharmony_ci {icon: 'common/image/icon.png', value: 'menu1'}, 21e41f4b71Sopenharmony_ci {icon: 'common/image/icon.png', value: 'menu2'}, 22e41f4b71Sopenharmony_ci {icon: 'common/image/icon.png', value: 'menu3'} 23e41f4b71Sopenharmony_ci ]) 24e41f4b71Sopenharmony_ci } 25e41f4b71Sopenharmony_ci } 26e41f4b71Sopenharmony_ci} 27e41f4b71Sopenharmony_ci``` 28e41f4b71Sopenharmony_ciIn API version 9, the **value** sub-attribute of the **menus** attribute is displayed. 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ciIn API version 10, the **value** sub-attribute of the **menus** attribute is not displayed. 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci## cl.arkui.2 Change of the Default Display Position for Free Mode of the titleMode Attribute in \<Navigation> 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ci**Change Impact** 38e41f4b71Sopenharmony_ci1. In the **\<Navigation>** component, the display position of a custom title with **titleMode** set to **Full** is the same as that with **titleMode** set to **Free**. 39e41f4b71Sopenharmony_ci2. If a custom title is used with a label in Free mode, the label is deviated rightwards. 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ci**Example** 42e41f4b71Sopenharmony_ci```ts 43e41f4b71Sopenharmony_ci@Entry 44e41f4b71Sopenharmony_ci@Component 45e41f4b71Sopenharmony_cistruct Index { 46e41f4b71Sopenharmony_ci @Builder NavigationTile() { 47e41f4b71Sopenharmony_ci Column() { 48e41f4b71Sopenharmony_ci Text('title').fontColor('#182431').fontSize(30).lineHeight(41) 49e41f4b71Sopenharmony_ci Text('subTitle').fontColor('#182431').fontSize(14).lineHeight(19).margin(top:2, bottom: 20) 50e41f4b71Sopenharmony_ci } 51e41f4b71Sopenharmony_ci } 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci build() { 54e41f4b71Sopenharmony_ci Column() { 55e41f4b71Sopenharmony_ci Navigation() { 56e41f4b71Sopenharmony_ci Text('Navigation') 57e41f4b71Sopenharmony_ci }.title(this.NavigationTitle) 58e41f4b71Sopenharmony_ci .titleMode(NavigationTitleMode.Free) 59e41f4b71Sopenharmony_ci .menus([ 60e41f4b71Sopenharmony_ci {icon: 'common/image/icon.png', value: 'menu1'} 61e41f4b71Sopenharmony_ci ]) 62e41f4b71Sopenharmony_ci } 63e41f4b71Sopenharmony_ci } 64e41f4b71Sopenharmony_ci} 65e41f4b71Sopenharmony_ci``` 66e41f4b71Sopenharmony_ci 67e41f4b71Sopenharmony_ciDisplay position in Free mode in API version 9 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_ciDisplay position in Free mode in API version 10, which is the same as that in Full mode 72e41f4b71Sopenharmony_ci 73e41f4b71Sopenharmony_ci 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci## cl.arkui.3 Change of Handling of Invalid Strings 76e41f4b71Sopenharmony_ci 77e41f4b71Sopenharmony_ci**Change Impact** 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ciAn invalid string that contains digits is not parsed into digits. Instead, it is regarded as an invalid value and is set to the default value according to predefined rules. 80e41f4b71Sopenharmony_ci 81e41f4b71Sopenharmony_ci**Example** 82e41f4b71Sopenharmony_ci```ts 83e41f4b71Sopenharmony_ci@Entry 84e41f4b71Sopenharmony_ci@Component 85e41f4b71Sopenharmony_cistruct GridRowExample { 86e41f4b71Sopenharmony_ci @State bgColors: Color[] = [Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Pink, Color.Grey, Color.Blue, Color.Brown] 87e41f4b71Sopenharmony_ci @State currentBp: string = 'unknown' 88e41f4b71Sopenharmony_ci 89e41f4b71Sopenharmony_ci build() { 90e41f4b71Sopenharmony_ci Column() { 91e41f4b71Sopenharmony_ci GridRow({ 92e41f4b71Sopenharmony_ci columns: 5, 93e41f4b71Sopenharmony_ci gutter: { x: 5, y: 10 }, 94e41f4b71Sopenharmony_ci breakpoints: { value: ["400vp", "600vp", "800vp"], 95e41f4b71Sopenharmony_ci reference: BreakpointsReference.WindowSize }, 96e41f4b71Sopenharmony_ci direction: GridRowDirection.Row 97e41f4b71Sopenharmony_ci }) { 98e41f4b71Sopenharmony_ci ForEach(this.bgColors, (color) => { 99e41f4b71Sopenharmony_ci GridCol({ span: { xs: 1, sm: 2, md: 3, lg: 4 } }) { 100e41f4b71Sopenharmony_ci Row().width("100%").height("20vp") 101e41f4b71Sopenharmony_ci }.borderColor(color).borderWidth(2) 102e41f4b71Sopenharmony_ci }) 103e41f4b71Sopenharmony_ci }.width("100%").height("100%") 104e41f4b71Sopenharmony_ci }.width("80pv").margin({ left: 10, top: 5, bottom: 5 }).height(200) 105e41f4b71Sopenharmony_ci .border({ color: '#880606', width: 2 }) 106e41f4b71Sopenharmony_ci } 107e41f4b71Sopenharmony_ci} 108e41f4b71Sopenharmony_ci``` 109e41f4b71Sopenharmony_ci 110e41f4b71Sopenharmony_ciAPI version 9: In the preceding example, the value **"80pv"** of the **width** attribute in **\<GridRow>** is equivalent to **80**. 111e41f4b71Sopenharmony_ci 112e41f4b71Sopenharmony_ciAPI version 10: In the preceding example, the value **"80pv"** is regarded as an invalid value. Therefore, the **width** attribute in **\<GridRow>** is set to the default value, which means that the attribute is not set. 113e41f4b71Sopenharmony_ci 114e41f4b71Sopenharmony_ci## cl.arkui.4 Change of Invalid Values of the loop Attribute in \<Swiper> to true 115e41f4b71Sopenharmony_ci 116e41f4b71Sopenharmony_ci**Change Impact** 117e41f4b71Sopenharmony_ci 118e41f4b71Sopenharmony_ciThe value used in place of any invalid value of the **loop** attribute in the **\<Swiper>** component is changed from **false** to **true**. 119e41f4b71Sopenharmony_ci 120e41f4b71Sopenharmony_ciAPI version 9: The value **false** is used when the **loop** attribute is set to an invalid value. 121e41f4b71Sopenharmony_ci 122e41f4b71Sopenharmony_ciAPI version 10: The value **true** is used when the **loop** attribute is set to an invalid value. 123e41f4b71Sopenharmony_ci 124e41f4b71Sopenharmony_ci## cl.arkui.5 Change of Speed Threshold for Page Turning from 180 px/s to 1200 px/s in \<Swiper> 125e41f4b71Sopenharmony_ci 126e41f4b71Sopenharmony_ci**Change Impact** 127e41f4b71Sopenharmony_ci 128e41f4b71Sopenharmony_ciA faster speed is required to turn pages. 129e41f4b71Sopenharmony_ci 130e41f4b71Sopenharmony_ci## cl.arkui.6 Renaming of the isShowBackground Attribute in the \<Swiper> Component 131e41f4b71Sopenharmony_ci 132e41f4b71Sopenharmony_ci**Change Impact** 133e41f4b71Sopenharmony_ci 134e41f4b71Sopenharmony_ciRenamed the **isShowBackground** attribute in the **\<Swiper>** component **showBackground**. 135e41f4b71Sopenharmony_ci 136e41f4b71Sopenharmony_ci**Example** 137e41f4b71Sopenharmony_ci 138e41f4b71Sopenharmony_ci```ts 139e41f4b71Sopenharmony_ciclass MyDataSource implements IDataSource { 140e41f4b71Sopenharmony_ci private list: number[] = [] 141e41f4b71Sopenharmony_ci private listener: DataChangeListener 142e41f4b71Sopenharmony_ci 143e41f4b71Sopenharmony_ci constructor(list: number[]) { 144e41f4b71Sopenharmony_ci this.list = list 145e41f4b71Sopenharmony_ci } 146e41f4b71Sopenharmony_ci 147e41f4b71Sopenharmony_ci totalCount(): number { 148e41f4b71Sopenharmony_ci return this.list.length 149e41f4b71Sopenharmony_ci } 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci getData(index: number): any { 152e41f4b71Sopenharmony_ci return this.list[index] 153e41f4b71Sopenharmony_ci } 154e41f4b71Sopenharmony_ci 155e41f4b71Sopenharmony_ci registerDataChangeListener(listener: DataChangeListener): void { 156e41f4b71Sopenharmony_ci this.listener = listener 157e41f4b71Sopenharmony_ci } 158e41f4b71Sopenharmony_ci 159e41f4b71Sopenharmony_ci unregisterDataChangeListener() { 160e41f4b71Sopenharmony_ci } 161e41f4b71Sopenharmony_ci} 162e41f4b71Sopenharmony_ci 163e41f4b71Sopenharmony_ci@Entry 164e41f4b71Sopenharmony_ci@Component 165e41f4b71Sopenharmony_cistruct SwiperExample { 166e41f4b71Sopenharmony_ci private swiperController: SwiperController = new SwiperController() 167e41f4b71Sopenharmony_ci private data: MyDataSource = new MyDataSource([]) 168e41f4b71Sopenharmony_ci 169e41f4b71Sopenharmony_ci aboutToAppear(): void { 170e41f4b71Sopenharmony_ci let list = [] 171e41f4b71Sopenharmony_ci for (var i = 1; i <= 10; i++) { 172e41f4b71Sopenharmony_ci list.push(i.toString()); 173e41f4b71Sopenharmony_ci } 174e41f4b71Sopenharmony_ci this.data = new MyDataSource(list) 175e41f4b71Sopenharmony_ci } 176e41f4b71Sopenharmony_ci 177e41f4b71Sopenharmony_ci build() { 178e41f4b71Sopenharmony_ci Column({ space: 5 }) { 179e41f4b71Sopenharmony_ci Swiper(this.swiperController) { 180e41f4b71Sopenharmony_ci LazyForEach(this.data, (item: string) => { 181e41f4b71Sopenharmony_ci Text(item) 182e41f4b71Sopenharmony_ci .width('90%') 183e41f4b71Sopenharmony_ci .height(160) 184e41f4b71Sopenharmony_ci .backgroundColor(0xAFEEEE) 185e41f4b71Sopenharmony_ci .textAlign(TextAlign.Center) 186e41f4b71Sopenharmony_ci .fontSize(30) 187e41f4b71Sopenharmony_ci }, item => item) 188e41f4b71Sopenharmony_ci } 189e41f4b71Sopenharmony_ci .cachedCount(2) 190e41f4b71Sopenharmony_ci .index(1) 191e41f4b71Sopenharmony_ci .autoPlay(true) 192e41f4b71Sopenharmony_ci .indicator(true) 193e41f4b71Sopenharmony_ci .displayArrow({ 194e41f4b71Sopenharmony_ci showBackground: true, 195e41f4b71Sopenharmony_ci isSidebarMiddle: true, 196e41f4b71Sopenharmony_ci backgroundSize: 24, 197e41f4b71Sopenharmony_ci backgroundColor: Color.White, 198e41f4b71Sopenharmony_ci arrowSize: 18, 199e41f4b71Sopenharmony_ci arrowColor: Color.Blue 200e41f4b71Sopenharmony_ci }, false) 201e41f4b71Sopenharmony_ci 202e41f4b71Sopenharmony_ci Row({ space: 12 }) { 203e41f4b71Sopenharmony_ci Button('showNext') 204e41f4b71Sopenharmony_ci .onClick(() => { 205e41f4b71Sopenharmony_ci this.swiperController.showNext() 206e41f4b71Sopenharmony_ci }) 207e41f4b71Sopenharmony_ci Button('showPrevious') 208e41f4b71Sopenharmony_ci .onClick(() => { 209e41f4b71Sopenharmony_ci this.swiperController.showPrevious() 210e41f4b71Sopenharmony_ci }) 211e41f4b71Sopenharmony_ci }.margin(5) 212e41f4b71Sopenharmony_ci }.width('100%') 213e41f4b71Sopenharmony_ci .margin({ top: 5 }) 214e41f4b71Sopenharmony_ci } 215e41f4b71Sopenharmony_ci} 216e41f4b71Sopenharmony_ci``` 217e41f4b71Sopenharmony_ci 218e41f4b71Sopenharmony_ci## cl.arkui.7 Changing of the Right Margin of the Rightmost Menu Icons in the \<Navigation> Component 219e41f4b71Sopenharmony_ci 220e41f4b71Sopenharmony_ci**Change Impact** 221e41f4b71Sopenharmony_ci 222e41f4b71Sopenharmony_ciChanged the right margin of the rightmost menu icons in the **\<Navigation>** component menus from 36 vp to 24 vp, to account for the offset of menus by 12 vp on the right. 223e41f4b71Sopenharmony_ci 224e41f4b71Sopenharmony_ci## cl.arkui.8 Change in Pixel Rounding 225e41f4b71Sopenharmony_ci 226e41f4b71Sopenharmony_ci**Change Impact** 227e41f4b71Sopenharmony_ci 228e41f4b71Sopenharmony_ciCoordinates, widths, and heights with decimals are rounded off to integers. 229e41f4b71Sopenharmony_ci 230e41f4b71Sopenharmony_ciAPI version 9: The pixel coordinates, component widths and heights, and border widths are not rounded. 231e41f4b71Sopenharmony_ci 232e41f4b71Sopenharmony_ciAPI version 10: The pixel coordinates, component widths and heights, and border widths are rounded off to integers. 233e41f4b71Sopenharmony_ci 234e41f4b71Sopenharmony_ci**Example** 235e41f4b71Sopenharmony_ci```ts 236e41f4b71Sopenharmony_ci@Entry 237e41f4b71Sopenharmony_ci@Component 238e41f4b71Sopenharmony_cistruct Index { 239e41f4b71Sopenharmony_ci build() { 240e41f4b71Sopenharmony_ci Column() { 241e41f4b71Sopenharmony_ci Row() { 242e41f4b71Sopenharmony_ci Row() { 243e41f4b71Sopenharmony_ci Row() { 244e41f4b71Sopenharmony_ci Row() { 245e41f4b71Sopenharmony_ci Row() 246e41f4b71Sopenharmony_ci .width('100%') 247e41f4b71Sopenharmony_ci .height('100%') 248e41f4b71Sopenharmony_ci .border({width: '1', color: 'blue'}) 249e41f4b71Sopenharmony_ci } 250e41f4b71Sopenharmony_ci .width('100%') 251e41f4b71Sopenharmony_ci .height('100%') 252e41f4b71Sopenharmony_ci .border({width: '1', color: 'red'}) 253e41f4b71Sopenharmony_ci } 254e41f4b71Sopenharmony_ci .width('100%') 255e41f4b71Sopenharmony_ci .height('100%') 256e41f4b71Sopenharmony_ci .border({width: '1', color: 'blue'}) 257e41f4b71Sopenharmony_ci } 258e41f4b71Sopenharmony_ci .width('100%') 259e41f4b71Sopenharmony_ci .height('100%') 260e41f4b71Sopenharmony_ci .border({width: '1', color: 'red'}) 261e41f4b71Sopenharmony_ci } 262e41f4b71Sopenharmony_ci .width('81') 263e41f4b71Sopenharmony_ci .height('81') 264e41f4b71Sopenharmony_ci .border({width: '1', color: 'blue'}) 265e41f4b71Sopenharmony_ci } 266e41f4b71Sopenharmony_ci .width('100%') 267e41f4b71Sopenharmony_ci .height('100%') 268e41f4b71Sopenharmony_ci } 269e41f4b71Sopenharmony_ci} 270e41f4b71Sopenharmony_ci``` 271e41f4b71Sopenharmony_ciAPI version 9: The pixel coordinates, component widths and heights, and border widths are not rounded. 272e41f4b71Sopenharmony_ci 273e41f4b71Sopenharmony_ci 274e41f4b71Sopenharmony_ci 275e41f4b71Sopenharmony_ciAPI version 10: The widths of the left and top borders are rounded up, and the widths of the right and bottom borders are rounded down. 276e41f4b71Sopenharmony_ci 277e41f4b71Sopenharmony_ci 278