1e41f4b71Sopenharmony_ci# ArkUI Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## cl.arkui.1 Floating Point Number Support Added for timeZoneOffset of the \<TextClock> Component
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci**Access Level**
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciPublic
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci**Reason for Change**
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciThe time zone offset for some countries and regions is a floating point number. Therefore, floating point numbers need to be supported.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci**Change Impact**
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciThis change is a compatible change.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**API Level**
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci8 
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci**Change Since**
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci**Key API/Component Changes**
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ciIn versions earlier than API version 11, any floating point number set for the **timeZoneOffset** parameter of the **\<TextClock>** component is converted to the corresponding integer.
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ciSince API version 11, a floating point number in the { 9.5, 3.5, -3.5, -4.5, -5.5, -5.75, -6.5, -9.5, -10.5, -12.75 } range can be set for the **timeZoneOffset** parameter of the **\<TextClock>** component.
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci**Adaptation Guide**
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ciFor details, see [TextClock](../../../application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-textclock.md).
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci## cl.arkui.2 Change in the Default Shadow Blur Radius of the \<Gauge> Component
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci**Access Level**
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ciPublic
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ci**Reason for Change**
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ciThe original default shadow blur radius, 5 vp, is too small for the **\<Gauge>** component according to the UX specifications. Therefore, the default shadow blur radius is enlarged to 20 vp.
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci**Change Impact**
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ciThis change is a compatible change. It enhances the default display effect of the component.
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci**API Level**
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci11
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci**Change Since**
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ci**Key API/Component Changes**
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ciBefore OpenHarmony SDK 4.1.6.5, the default shadow blur radius of the **\<Gauge>** component is 5 vp.
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ci![gauge](figures/oldGauge.png)
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ciSince OpenHarmony SDK 4.1.6.5, the default shadow blur radius of the **\<Gauge>** component is 20 vp.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci![gauge](figures/newGauge.png)
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci**Adaptation Guide**
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ciNo adaptation is required. Yet, since the default display effect is changed, you need to check whether it meets your expectation. Change the display variables where necessary.
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci## cl.arkui.3 Return Value Unit Change for getItemRect and getItemRectInGroup
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci**Access Level**
74e41f4b71Sopenharmony_ci
75e41f4b71Sopenharmony_ciPublic
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ci**Reason for Change**
78e41f4b71Sopenharmony_ci
79e41f4b71Sopenharmony_ciThe unit of the return value type **RectResult** should be vp, not previously px.
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ci**Change Impact**
82e41f4b71Sopenharmony_ci
83e41f4b71Sopenharmony_ciThis change is a non-compatible change. The unit of the value returned by o the **getItemRect** API of a scrollable component and the **getItemRectInGroup** API of the **\<List>** component is changed from px to vp. The affected scenarios are as follows:
84e41f4b71Sopenharmony_ci
85e41f4b71Sopenharmony_ci(a) The **getItemRect** API is called in a scrollable component to obtain the size and position of a child component.
86e41f4b71Sopenharmony_ci
87e41f4b71Sopenharmony_ciBefore change: The size and position returned are both in px.
88e41f4b71Sopenharmony_ci
89e41f4b71Sopenharmony_ciAfter change: The size and position returned are both in vp.
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ci(b) The **getItemRectInGroup** API is called in a **\<List>** component to obtain the size and position of a list item in a list item group.
92e41f4b71Sopenharmony_ci
93e41f4b71Sopenharmony_ciBefore change: The size and position returned are both in px.
94e41f4b71Sopenharmony_ci
95e41f4b71Sopenharmony_ciAfter change: The size and position returned are both in vp.
96e41f4b71Sopenharmony_ci
97e41f4b71Sopenharmony_ci**API Level**
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ci11
100e41f4b71Sopenharmony_ci
101e41f4b71Sopenharmony_ci**Change Since**
102e41f4b71Sopenharmony_ci
103e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ci**Key API/Component Changes**
106e41f4b71Sopenharmony_ci
107e41f4b71Sopenharmony_ci**getItemRect** (**\<List>**, **\<Grid>**, **\<WaterFlow>**, **\<Scroll>**) and **getItemRectInGroup** (**\<List>**)
108e41f4b71Sopenharmony_ci
109e41f4b71Sopenharmony_ci**Adaptation Guide**
110e41f4b71Sopenharmony_ci
111e41f4b71Sopenharmony_ci If the px unit is required, you can use the **vp2px** API to convert the unit.
112e41f4b71Sopenharmony_ci## cl.arkui.4 Log Level Change for Value Assignment of @Link/@ObjectLink Decorated Variables
113e41f4b71Sopenharmony_ci
114e41f4b71Sopenharmony_ci**Access Level**
115e41f4b71Sopenharmony_ci
116e41f4b71Sopenharmony_ciPublic
117e41f4b71Sopenharmony_ci
118e41f4b71Sopenharmony_ci**Reason for Change**
119e41f4b71Sopenharmony_ci
120e41f4b71Sopenharmony_ciThe log level for value assignment of an @Link/@ObjectLink decorated variable in the parent component is changed from WARN to ERROR.
121e41f4b71Sopenharmony_ci
122e41f4b71Sopenharmony_ci**Change Impact**
123e41f4b71Sopenharmony_ci
124e41f4b71Sopenharmony_ciThis change is a non-compatible change. After the change, an error is reported if an @Link/@ObjectLink decorated variable is not assigned a value in the parent component.
125e41f4b71Sopenharmony_ci
126e41f4b71Sopenharmony_ci**API Level**
127e41f4b71Sopenharmony_ci
128e41f4b71Sopenharmony_ci11
129e41f4b71Sopenharmony_ci
130e41f4b71Sopenharmony_ci**Change Since**
131e41f4b71Sopenharmony_ci
132e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
133e41f4b71Sopenharmony_ci
134e41f4b71Sopenharmony_ci**Example**
135e41f4b71Sopenharmony_ci
136e41f4b71Sopenharmony_ci```
137e41f4b71Sopenharmony_cilet NextID: number = 1;
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ci@Observed
140e41f4b71Sopenharmony_ciclass ClassA {
141e41f4b71Sopenharmony_ci  public id: number;
142e41f4b71Sopenharmony_ci  public c: number;
143e41f4b71Sopenharmony_ci
144e41f4b71Sopenharmony_ci  constructor(c: number) {
145e41f4b71Sopenharmony_ci    this.id = NextID++;
146e41f4b71Sopenharmony_ci    this.c = c;
147e41f4b71Sopenharmony_ci  }
148e41f4b71Sopenharmony_ci}
149e41f4b71Sopenharmony_ci
150e41f4b71Sopenharmony_ci@Entry
151e41f4b71Sopenharmony_ci@Component
152e41f4b71Sopenharmony_cistruct Parent {
153e41f4b71Sopenharmony_ci  @State message: string = 'Hello';
154e41f4b71Sopenharmony_ci
155e41f4b71Sopenharmony_ci  build() {
156e41f4b71Sopenharmony_ci    Column() {
157e41f4b71Sopenharmony_ci      // ERROR: Property 'message' in the custom component 'Child' is missing (mandatory to specify).
158e41f4b71Sopenharmony_ci      // ERROR: Property 'message1' in the custom component 'Child' is missing (mandatory to specify).
159e41f4b71Sopenharmony_ci      Child();
160e41f4b71Sopenharmony_ci    }
161e41f4b71Sopenharmony_ci  }
162e41f4b71Sopenharmony_ci}
163e41f4b71Sopenharmony_ci
164e41f4b71Sopenharmony_ci@Component
165e41f4b71Sopenharmony_cistruct Child {
166e41f4b71Sopenharmony_ci  @Link message: string;
167e41f4b71Sopenharmony_ci  @ObjectLink message1: ClassA;
168e41f4b71Sopenharmony_ci
169e41f4b71Sopenharmony_ci  build() {
170e41f4b71Sopenharmony_ci    Row() {
171e41f4b71Sopenharmony_ci    }
172e41f4b71Sopenharmony_ci  }
173e41f4b71Sopenharmony_ci}
174e41f4b71Sopenharmony_ci```
175e41f4b71Sopenharmony_ci
176e41f4b71Sopenharmony_ci**Key API/Component Changes**
177e41f4b71Sopenharmony_ci
178e41f4b71Sopenharmony_ciN/A
179e41f4b71Sopenharmony_ci
180e41f4b71Sopenharmony_ci**Adaptation Guide**
181e41f4b71Sopenharmony_ci
182e41f4b71Sopenharmony_ciIf a child component uses an @Link/@ObjectLink decorated variable, then the variable must be assigned a value in its parent component.
183e41f4b71Sopenharmony_ci## cl.arkui.5 Click Event Change for isShow in bindmenu
184e41f4b71Sopenharmony_ci
185e41f4b71Sopenharmony_ci**Access Level**
186e41f4b71Sopenharmony_ci
187e41f4b71Sopenharmony_ciPublic
188e41f4b71Sopenharmony_ci
189e41f4b71Sopenharmony_ci**Reason for Change**
190e41f4b71Sopenharmony_ci
191e41f4b71Sopenharmony_ciWhen **isShow** is used in **bindMenu**, the menu can be displayed only through **isShow**.
192e41f4b71Sopenharmony_ci
193e41f4b71Sopenharmony_ci**Change Impact**
194e41f4b71Sopenharmony_ci
195e41f4b71Sopenharmony_ciThis change is a non-compatible change. After the change, when **isShow** is used in **bindMenu**, clicking the parent component does not show the menu.
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_ci**API Level**
198e41f4b71Sopenharmony_ci
199e41f4b71Sopenharmony_ci11
200e41f4b71Sopenharmony_ci
201e41f4b71Sopenharmony_ci**Change Since**
202e41f4b71Sopenharmony_ci
203e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
204e41f4b71Sopenharmony_ci**Example**
205e41f4b71Sopenharmony_ci
206e41f4b71Sopenharmony_ci```
207e41f4b71Sopenharmony_ci@Entry
208e41f4b71Sopenharmony_ci@Component
209e41f4b71Sopenharmony_cistruct MenuExample {
210e41f4b71Sopenharmony_ci  @State listData: number[] = [0, 0, 0]
211e41f4b71Sopenharmony_ci  @State isShow: boolean = false
212e41f4b71Sopenharmony_ci
213e41f4b71Sopenharmony_ci  @Builder MenuBuilder() {
214e41f4b71Sopenharmony_ci    Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
215e41f4b71Sopenharmony_ci      ForEach(this.listData, (item:number, index) => {
216e41f4b71Sopenharmony_ci        Column() {
217e41f4b71Sopenharmony_ci          Row() {
218e41f4b71Sopenharmony_ci            Image($r("app.media.icon")).width(20).height(20).margin({ right: 5 })
219e41f4b71Sopenharmony_ci            Text(`Menu${index as number + 1}`).fontSize(20)
220e41f4b71Sopenharmony_ci          }
221e41f4b71Sopenharmony_ci          .width('100%')
222e41f4b71Sopenharmony_ci          .height(30)
223e41f4b71Sopenharmony_ci          .justifyContent(FlexAlign.Center)
224e41f4b71Sopenharmony_ci          .align(Alignment.Center)
225e41f4b71Sopenharmony_ci          .onClick(() => {
226e41f4b71Sopenharmony_ci            console.info(`Menu${index as number + 1} Clicked!`)
227e41f4b71Sopenharmony_ci          })
228e41f4b71Sopenharmony_ci
229e41f4b71Sopenharmony_ci          if (index != this.listData.length - 1) {
230e41f4b71Sopenharmony_ci            Divider().height(10).width('80%').color('#ccc')
231e41f4b71Sopenharmony_ci          }
232e41f4b71Sopenharmony_ci        }.padding(5).height(40)
233e41f4b71Sopenharmony_ci      })
234e41f4b71Sopenharmony_ci    }.width(100)
235e41f4b71Sopenharmony_ci  }
236e41f4b71Sopenharmony_ci
237e41f4b71Sopenharmony_ci  build() {
238e41f4b71Sopenharmony_ci    Column() {
239e41f4b71Sopenharmony_ci      Text('click for menu')
240e41f4b71Sopenharmony_ci        .fontSize(20)
241e41f4b71Sopenharmony_ci        .margin({ top: 20 })
242e41f4b71Sopenharmony_ci        .onClick(()=>{
243e41f4b71Sopenharmony_ci          this.isShow = true
244e41f4b71Sopenharmony_ci        })
245e41f4b71Sopenharmony_ci        .bindMenu(this.isShow, this.MenuBuilder,
246e41f4b71Sopenharmony_ci          {
247e41f4b71Sopenharmony_ci            onDisappear: ()=>{
248e41f4b71Sopenharmony_ci              this.isShow = false
249e41f4b71Sopenharmony_ci            }
250e41f4b71Sopenharmony_ci          }
251e41f4b71Sopenharmony_ci        )
252e41f4b71Sopenharmony_ci    }
253e41f4b71Sopenharmony_ci    .height('100%')
254e41f4b71Sopenharmony_ci    .width('100%')
255e41f4b71Sopenharmony_ci    .backgroundColor('#f0f0f0')
256e41f4b71Sopenharmony_ci  }
257e41f4b71Sopenharmony_ci}
258e41f4b71Sopenharmony_ci```
259e41f4b71Sopenharmony_ci
260e41f4b71Sopenharmony_ci**Key API/Component Changes**
261e41f4b71Sopenharmony_ci
262e41f4b71Sopenharmony_cibindMenu
263e41f4b71Sopenharmony_ci
264e41f4b71Sopenharmony_ci**Adaptation Guide**
265e41f4b71Sopenharmony_ci
266e41f4b71Sopenharmony_ciWhen **isShow** is used in **bindMenu**, the menu is displayed only after **isShow** is changed from **false** to **true** in related click, gesture, and hover events. If the menu cannot be displayed after the value of **isShow** is changed, use logs to print the value of **isShow** before and after your change. If the value remains unchanged, check whether the value of **isShow** is not updated to **false** in **onDisappear** when the menu disappears, or whether **isShow** is set to **true** initially.
267e41f4b71Sopenharmony_ci
268e41f4b71Sopenharmony_ci## cl.arkui.6 Removal of Incorrect Inheritance from OffscreenCanvas Class Declaration
269e41f4b71Sopenharmony_ci
270e41f4b71Sopenharmony_ci**Access Level**
271e41f4b71Sopenharmony_ci
272e41f4b71Sopenharmony_ciPublic
273e41f4b71Sopenharmony_ci
274e41f4b71Sopenharmony_ci**Reason for Change**
275e41f4b71Sopenharmony_ci
276e41f4b71Sopenharmony_ciIn the previous **OffscreenCanvas** class declaration, the parent class incorrect. As a result, DevEco Studio incorrectly associates methods and attributes that are not of the **OffscreenCanvas** class.
277e41f4b71Sopenharmony_ci
278e41f4b71Sopenharmony_ci**Change Impact**
279e41f4b71Sopenharmony_ci
280e41f4b71Sopenharmony_ciThis change is a compatible change. After the change, the methods and attributes of the **OffscreenCanvas** class can be correctly displayed for intelligent code completion in DevEco Studio.
281e41f4b71Sopenharmony_ci
282e41f4b71Sopenharmony_ci**API Level**
283e41f4b71Sopenharmony_ci
284e41f4b71Sopenharmony_ci11
285e41f4b71Sopenharmony_ci
286e41f4b71Sopenharmony_ci**Change Since**
287e41f4b71Sopenharmony_ci
288e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
289e41f4b71Sopenharmony_ci
290e41f4b71Sopenharmony_ci**Key API/Component Changes**
291e41f4b71Sopenharmony_ci
292e41f4b71Sopenharmony_ciOffscreenCanvas
293e41f4b71Sopenharmony_ci
294e41f4b71Sopenharmony_ci**Adaptation Guide**
295e41f4b71Sopenharmony_ci
296e41f4b71Sopenharmony_ciN/A
297e41f4b71Sopenharmony_ci
298e41f4b71Sopenharmony_ci## cl.arkui.7 Float Type Support Added for layoutWeight
299e41f4b71Sopenharmony_ci
300e41f4b71Sopenharmony_ci**Access Level**
301e41f4b71Sopenharmony_ci
302e41f4b71Sopenharmony_ciPublic
303e41f4b71Sopenharmony_ci
304e41f4b71Sopenharmony_ci**Reason for Change**
305e41f4b71Sopenharmony_ci
306e41f4b71Sopenharmony_ciThe **layoutWeight** parameter needs to be set more precisely.
307e41f4b71Sopenharmony_ci
308e41f4b71Sopenharmony_ci**Change Impact**
309e41f4b71Sopenharmony_ci
310e41f4b71Sopenharmony_ciThis change is a compatible change.
311e41f4b71Sopenharmony_ci
312e41f4b71Sopenharmony_ci**API Level**
313e41f4b71Sopenharmony_ci
314e41f4b71Sopenharmony_ci9
315e41f4b71Sopenharmony_ci
316e41f4b71Sopenharmony_ci**Change Since**
317e41f4b71Sopenharmony_ci
318e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
319e41f4b71Sopenharmony_ci
320e41f4b71Sopenharmony_ci**Key API/Component Changes**
321e41f4b71Sopenharmony_ci
322e41f4b71Sopenharmony_ci**layoutWeight**
323e41f4b71Sopenharmony_ci
324e41f4b71Sopenharmony_ciBefore API version 12, when the parameter is set to a float number, the digits after the decimal point are not counted.
325e41f4b71Sopenharmony_ci
326e41f4b71Sopenharmony_ciSince API version 12, when the parameter is set to a float number, the digits after the decimal point are counted.
327e41f4b71Sopenharmony_ci
328e41f4b71Sopenharmony_ci**Adaptation Guide**
329e41f4b71Sopenharmony_ci
330e41f4b71Sopenharmony_ciN/A
331e41f4b71Sopenharmony_ci
332e41f4b71Sopenharmony_ci## cl.arkui.8 Height Configuration Change for the \<GridRow> Component
333e41f4b71Sopenharmony_ci
334e41f4b71Sopenharmony_ci**Access Level**
335e41f4b71Sopenharmony_ci
336e41f4b71Sopenharmony_ciPublic
337e41f4b71Sopenharmony_ci
338e41f4b71Sopenharmony_ci**Reason for Change**
339e41f4b71Sopenharmony_ci
340e41f4b71Sopenharmony_ciIn previous versions, the **\<GridRow>** component always adapts its height to child components, regardless of whether the **height** is set.
341e41f4b71Sopenharmony_ciThe change is to correct this known issue.
342e41f4b71Sopenharmony_ci
343e41f4b71Sopenharmony_ci**Change Impact**
344e41f4b71Sopenharmony_ci
345e41f4b71Sopenharmony_ciThis change is a non-compatible change. The height of the **\<GridRow>** component can be customized.
346e41f4b71Sopenharmony_ci
347e41f4b71Sopenharmony_ci**API Level**
348e41f4b71Sopenharmony_ci
349e41f4b71Sopenharmony_ci9
350e41f4b71Sopenharmony_ci
351e41f4b71Sopenharmony_ci**Change Since**
352e41f4b71Sopenharmony_ci
353e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
354e41f4b71Sopenharmony_ci
355e41f4b71Sopenharmony_ci**Key API/Component Changes**
356e41f4b71Sopenharmony_ci
357e41f4b71Sopenharmony_ci**\<GridRow>** component
358e41f4b71Sopenharmony_ci
359e41f4b71Sopenharmony_ciBefore API version 11, the **\<GridRow>** component always adapts its height to child components, regardless of whether the **height** is set.
360e41f4b71Sopenharmony_ci
361e41f4b71Sopenharmony_ciSince API version 11, the **\<GridRow>** component is drawn based on the specified height. If no height is specified, the component adapts its height to child components.
362e41f4b71Sopenharmony_ci
363e41f4b71Sopenharmony_ci**Adaptation Guide**
364e41f4b71Sopenharmony_ci
365e41f4b71Sopenharmony_ciN/A
366e41f4b71Sopenharmony_ci
367e41f4b71Sopenharmony_ci## cl.arkui.9 Behavior Change for backgroundColor in \<XComponent> of the surface Type
368e41f4b71Sopenharmony_ci
369e41f4b71Sopenharmony_ci**Access Level**
370e41f4b71Sopenharmony_ci
371e41f4b71Sopenharmony_ciPublic
372e41f4b71Sopenharmony_ci
373e41f4b71Sopenharmony_ci**Reason for Change**
374e41f4b71Sopenharmony_ci
375e41f4b71Sopenharmony_ciBackground color configuration is required for the **\<XComponent>** of the surface type.
376e41f4b71Sopenharmony_ci
377e41f4b71Sopenharmony_ci**Change Impact**
378e41f4b71Sopenharmony_ci
379e41f4b71Sopenharmony_ciThis change is a non-compatible change.
380e41f4b71Sopenharmony_ci
381e41f4b71Sopenharmony_ciBefore change: The background color is black by default regardless of the **backgroundColor** attribute settings.
382e41f4b71Sopenharmony_ci
383e41f4b71Sopenharmony_ciAfter change: The background color specified through the **backgroundColor** attribute takes effect.
384e41f4b71Sopenharmony_ci
385e41f4b71Sopenharmony_ci**API Level**
386e41f4b71Sopenharmony_ci
387e41f4b71Sopenharmony_ci9
388e41f4b71Sopenharmony_ci
389e41f4b71Sopenharmony_ci**Change Since**
390e41f4b71Sopenharmony_ci
391e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
392e41f4b71Sopenharmony_ci
393e41f4b71Sopenharmony_ci**Example**
394e41f4b71Sopenharmony_ci
395e41f4b71Sopenharmony_ci```
396e41f4b71Sopenharmony_ci@Entry
397e41f4b71Sopenharmony_ci@Component
398e41f4b71Sopenharmony_cistruct XComponentBKColor {
399e41f4b71Sopenharmony_ci  private surfaceId: string = ''
400e41f4b71Sopenharmony_ci  private xComponentContext: Record<string, () => void> = {}
401e41f4b71Sopenharmony_ci  xComponentController: XComponentController = new XComponentController()
402e41f4b71Sopenharmony_ci
403e41f4b71Sopenharmony_ci  build() {
404e41f4b71Sopenharmony_ci    Row() {
405e41f4b71Sopenharmony_ci      XComponent({
406e41f4b71Sopenharmony_ci        id: 'xcomponentid',
407e41f4b71Sopenharmony_ci        type: XComponentType.SURFACE,
408e41f4b71Sopenharmony_ci        controller: this.xComponentController
409e41f4b71Sopenharmony_ci      })
410e41f4b71Sopenharmony_ci        .onLoad(() => {
411e41f4b71Sopenharmony_ci          this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 })
412e41f4b71Sopenharmony_ci          this.surfaceId = this.xComponentController.getXComponentSurfaceId()
413e41f4b71Sopenharmony_ci          this.xComponentContext = this.xComponentController.getXComponentContext() as Record<string, () => void>
414e41f4b71Sopenharmony_ci        })
415e41f4b71Sopenharmony_ci        .width('640px')
416e41f4b71Sopenharmony_ci        .height('480px')
417e41f4b71Sopenharmony_ci        .backgroundColor(Color.White)
418e41f4b71Sopenharmony_ci    }
419e41f4b71Sopenharmony_ci  }
420e41f4b71Sopenharmony_ci}
421e41f4b71Sopenharmony_ci```
422e41f4b71Sopenharmony_ci
423e41f4b71Sopenharmony_ci**Key API/Component Changes**
424e41f4b71Sopenharmony_ci
425e41f4b71Sopenharmony_ciXComponent
426e41f4b71Sopenharmony_ci
427e41f4b71Sopenharmony_ci**Adaptation Guide**
428e41f4b71Sopenharmony_ci
429e41f4b71Sopenharmony_ciAfter setting the **backgroundColor** attribute for the **\<XComponent>** component of the surface type, ensure that the background color is what is required by the use scenario.
430e41f4b71Sopenharmony_ci
431e41f4b71Sopenharmony_ci## cl.arkui.10 Display Effect Change for the \<TextInput> or \<TextArea> Component When the Caret Exceeds the Rounded Corner
432e41f4b71Sopenharmony_ci
433e41f4b71Sopenharmony_ci**Access Level**
434e41f4b71Sopenharmony_ci
435e41f4b71Sopenharmony_ciPublic
436e41f4b71Sopenharmony_ci
437e41f4b71Sopenharmony_ci**Reason for Change**
438e41f4b71Sopenharmony_ci
439e41f4b71Sopenharmony_ciTThis change is a non-compatible change. Previously, when **padding** is set to **0**, the caret is displayed outside the default rounded corner of the text box, which does not meet application requirements.
440e41f4b71Sopenharmony_ci
441e41f4b71Sopenharmony_ci**Change Impact**
442e41f4b71Sopenharmony_ci
443e41f4b71Sopenharmony_ciBefore change: When the text box uses the default rounded corners with a padding of **0**, the caret is not clipped if it exceeds the rounded corners.
444e41f4b71Sopenharmony_ci
445e41f4b71Sopenharmony_ci![Alt text](figures/textinputcursorexceednotclip.png)
446e41f4b71Sopenharmony_ci
447e41f4b71Sopenharmony_ciAfter change: When the text box uses the default rounded corners with a padding of **0**, the caret is clipped if it exceeds the rounded corners.
448e41f4b71Sopenharmony_ci
449e41f4b71Sopenharmony_ci![Alt text](figures/textinputcursorexceedclip.png)
450e41f4b71Sopenharmony_ci
451e41f4b71Sopenharmony_ci**API Level**
452e41f4b71Sopenharmony_ci
453e41f4b71Sopenharmony_ci9
454e41f4b71Sopenharmony_ci
455e41f4b71Sopenharmony_ci**Change Since**
456e41f4b71Sopenharmony_ci
457e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
458e41f4b71Sopenharmony_ci
459e41f4b71Sopenharmony_ci**Key API/Component Changes**
460e41f4b71Sopenharmony_ci
461e41f4b71Sopenharmony_ciTextInput/TextArea
462e41f4b71Sopenharmony_ci
463e41f4b71Sopenharmony_ci**Adaptation Guide**
464e41f4b71Sopenharmony_ci
465e41f4b71Sopenharmony_ciN/A
466e41f4b71Sopenharmony_ci
467e41f4b71Sopenharmony_ci## cl.arkui.11 Matching Rule Change for UI Instances of Global APIs
468e41f4b71Sopenharmony_ci
469e41f4b71Sopenharmony_ci**Access Level**
470e41f4b71Sopenharmony_ci
471e41f4b71Sopenharmony_ciPublic
472e41f4b71Sopenharmony_ci
473e41f4b71Sopenharmony_ci**Reason for Change**
474e41f4b71Sopenharmony_ci
475e41f4b71Sopenharmony_ciThe change is to standardize the UI instance matching of global APIs to avoid unexpected behavior caused by unclear instances.
476e41f4b71Sopenharmony_ci
477e41f4b71Sopenharmony_ci**Change Impact**
478e41f4b71Sopenharmony_ci
479e41f4b71Sopenharmony_ciIn the multi-instance scenario, if a global API is called in the context that is not bound to any UI instance (for example, the routing API is used in an asynchronous callback), the instance scope of the API may change.
480e41f4b71Sopenharmony_ci
481e41f4b71Sopenharmony_ciA global API requires a specific UI context to determine the UI instance that takes effect. You are advised to use the global APIs bound to an instance.
482e41f4b71Sopenharmony_ci
483e41f4b71Sopenharmony_ci**API Level**
484e41f4b71Sopenharmony_ci
485e41f4b71Sopenharmony_ci8
486e41f4b71Sopenharmony_ci
487e41f4b71Sopenharmony_ci**Change Since**
488e41f4b71Sopenharmony_ci
489e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.5
490e41f4b71Sopenharmony_ci
491e41f4b71Sopenharmony_ci**Key API/Component Changes**
492e41f4b71Sopenharmony_ci
493e41f4b71Sopenharmony_ciThe following APIs are not recommended in multi-instance scenarios. You are advised to use the substitutes described in the adaptation guide.
494e41f4b71Sopenharmony_ci
495e41f4b71Sopenharmony_ci|                  API                  |            Description           |
496e41f4b71Sopenharmony_ci| :-----------------------------------: | :------------------------: |
497e41f4b71Sopenharmony_ci|            @ohos.animator             |      Custom animation controller.     |
498e41f4b71Sopenharmony_ci|     @ohos.arkui.componentSnapshot     |          Component screenshot.         |
499e41f4b71Sopenharmony_ci|      @ohos.arkui.componentUtils       |         Component utility class.        |
500e41f4b71Sopenharmony_ci|      @ohos.arkui.dragController       |         Drag controller.        |
501e41f4b71Sopenharmony_ci|         @ohos.arkui.inspector         |        Layout callback.       |
502e41f4b71Sopenharmony_ci|         @ohos.arkui.observer          |          Observer.         |
503e41f4b71Sopenharmony_ci|              @ohos.font               |         Custom font registration.        |
504e41f4b71Sopenharmony_ci|             @ohos.measure             |          Text measurement.         |
505e41f4b71Sopenharmony_ci|           @ohos.mediaquery            |          Media query.         |
506e41f4b71Sopenharmony_ci|          @ohos.promptAction           |            Prompt.           |
507e41f4b71Sopenharmony_ci|             @ohos.router              |          Page routing.         |
508e41f4b71Sopenharmony_ci|              AlertDialog              |          Alert dialog box.         |
509e41f4b71Sopenharmony_ci|              ActionSheet              |        Action sheet.       |
510e41f4b71Sopenharmony_ci|         CalendarPickerDialog          |       Calendar picker dialog box.      |
511e41f4b71Sopenharmony_ci|           DatePickerDialog            |      Date picker dialog box.     |
512e41f4b71Sopenharmony_ci|           TimePickerDialog            |     Time picker dialog box.    |
513e41f4b71Sopenharmony_ci|           TextPickerDialog            |     Text picker dialog box.    |
514e41f4b71Sopenharmony_ci|              ContextMenu              |          Menu control.         |
515e41f4b71Sopenharmony_ci| vp2px/px2vp/fp2px/px2fp/lpx2px/px2lpx |        Pixel unit conversion.       |
516e41f4b71Sopenharmony_ci|             focusControl              |          Focus control.         |
517e41f4b71Sopenharmony_ci|             cursorControl             |          Cursor control.         |
518e41f4b71Sopenharmony_ci|              getContext               | Obtains the context of the current ability.|
519e41f4b71Sopenharmony_ci|        LocalStorage.getShared         |  Obtains the storage passed by the current ability. |
520e41f4b71Sopenharmony_ci|               animateTo               |          Explicit animation.         |
521e41f4b71Sopenharmony_ci|         animateToImmediately          |        Explicit instant animation.       |
522e41f4b71Sopenharmony_ci
523e41f4b71Sopenharmony_ci**Adaptation Guide**
524e41f4b71Sopenharmony_ci
525e41f4b71Sopenharmony_ciYou can use the built-in method [getUIContext](../../../application-dev/reference/apis-arkui/arkui-ts/ts-custom-component-api.md#getuicontext) of a component to obtain the UI context where the component is located and use the APIs listed below in [UIContext](../../../application-dev/reference/apis-arkui/js-apis-arkui-UIContext.md#uicontext) to obtain the object bound to the instance.
526e41f4b71Sopenharmony_ci
527e41f4b71Sopenharmony_ci| API in UIContext                   | Description              |
528e41f4b71Sopenharmony_ci| -------------------------------- | ------------------ |
529e41f4b71Sopenharmony_ci| getRouter                        | Page routing.          |
530e41f4b71Sopenharmony_ci| getComponentUtils                | Component utility class.        |
531e41f4b71Sopenharmony_ci| getUIInspector                   | Layout callback.      |
532e41f4b71Sopenharmony_ci| getUIObserver                    | Observer.          |
533e41f4b71Sopenharmony_ci| getMediaQuery                    | Media query.          |
534e41f4b71Sopenharmony_ci| getFont                          | Font.              |
535e41f4b71Sopenharmony_ci| getPrompAction                   | Prompt.              |
536e41f4b71Sopenharmony_ci| animateTo                        | Explicit animation.          |
537e41f4b71Sopenharmony_ci| showAlerDialog                   | Alert dialog box.          |
538e41f4b71Sopenharmony_ci| showActionSheet                  | Action sheet.      |
539e41f4b71Sopenharmony_ci| showDatePickerDialog             | Date picker dialog box.  |
540e41f4b71Sopenharmony_ci| showTimePickerDialog             | Time picker dialog box.|
541e41f4b71Sopenharmony_ci| showTextPcikerDialog             | Text picker dialog box.|
542e41f4b71Sopenharmony_ci| createAnimator                   | Custom animation controller.  |
543e41f4b71Sopenharmony_ci| KeyboardAvoidMode                | Keyboard avoidance.          |
544e41f4b71Sopenharmony_ci| getAtomicServiceBar              | Cloud service.            |
545e41f4b71Sopenharmony_ci| getDragController/getDragPreview | Drag and drop.              |
546e41f4b71Sopenharmony_ci| runScopedTask                    | Executes the closure of the bound instance.|
547e41f4b71Sopenharmony_ci
548e41f4b71Sopenharmony_ciFor the following APIs that are not provided in **UIContext**, you can use **runScopedTask** for adaptation.
549e41f4b71Sopenharmony_ci
550e41f4b71Sopenharmony_ci| API                                 | Description                      |
551e41f4b71Sopenharmony_ci| ------------------------------------- | -------------------------- |
552e41f4b71Sopenharmony_ci| measure                               | Text measurement.                  |
553e41f4b71Sopenharmony_ci| getContext                            | Obtains the context of the current ability.|
554e41f4b71Sopenharmony_ci| LocalStorage.getShared                | Obtains the storage passed by the current ability.  |
555e41f4b71Sopenharmony_ci| animateToImmediately                  | Explicit instant animation.              |
556e41f4b71Sopenharmony_ci| ContextMenu                           | Menu control.                  |
557e41f4b71Sopenharmony_ci| vp2px/px2vp/fp2px/px2fp/lpx2px/px2lpx | Pixel unit conversion.              |
558e41f4b71Sopenharmony_ci| focusControl                          | Focus control.                  |
559e41f4b71Sopenharmony_ci| cursorControl                         | Cursor control.                  |
560e41f4b71Sopenharmony_ci| @ohos.arkui.componentSnapshot         | Component screenshot.                  |
561e41f4b71Sopenharmony_ci
562e41f4b71Sopenharmony_ciExample 1
563e41f4b71Sopenharmony_ci
564e41f4b71Sopenharmony_ci```ets
565e41f4b71Sopenharmony_ci// Use the route object bound to the instance for page routing.
566e41f4b71Sopenharmony_ci@Entry
567e41f4b71Sopenharmony_ci@Component
568e41f4b71Sopenharmony_cistruct Index {
569e41f4b71Sopenharmony_ci  build() {
570e41f4b71Sopenharmony_ci    Row() {
571e41f4b71Sopenharmony_ci      Button()
572e41f4b71Sopenharmony_ci        .onClick(() => {
573e41f4b71Sopenharmony_ci          let uiContext = this.getUIContext();
574e41f4b71Sopenharmony_ci          let uiRouter = uiContext.getRouter();
575e41f4b71Sopenharmony_ci          uiRouter.pushUrl({
576e41f4b71Sopenharmony_ci            url: 'pages/Page'
577e41f4b71Sopenharmony_ci          })
578e41f4b71Sopenharmony_ci        })
579e41f4b71Sopenharmony_ci    }
580e41f4b71Sopenharmony_ci  }
581e41f4b71Sopenharmony_ci}
582e41f4b71Sopenharmony_ci```
583e41f4b71Sopenharmony_ci
584e41f4b71Sopenharmony_ciExample 2
585e41f4b71Sopenharmony_ci
586e41f4b71Sopenharmony_ci```ets
587e41f4b71Sopenharmony_ci// Execute the closure of the bound instance.
588e41f4b71Sopenharmony_ci@Entry
589e41f4b71Sopenharmony_ci@Component
590e41f4b71Sopenharmony_cistruct Index {
591e41f4b71Sopenharmony_ci  build() {
592e41f4b71Sopenharmony_ci    Row() {
593e41f4b71Sopenharmony_ci      Button()
594e41f4b71Sopenharmony_ci        .onClick(() => {
595e41f4b71Sopenharmony_ci          let uiContext = this.getUIContext();
596e41f4b71Sopenharmony_ci          uiContext.runScopedTask(() => {
597e41f4b71Sopenharmony_ci            let context = getContext();
598e41f4b71Sopenharmony_ci            console.log('Get context: ' + JSON.stringify(context))
599e41f4b71Sopenharmony_ci          })
600e41f4b71Sopenharmony_ci        })
601e41f4b71Sopenharmony_ci    }
602e41f4b71Sopenharmony_ci  }
603e41f4b71Sopenharmony_ci}
604e41f4b71Sopenharmony_ci```
605