From f724c1610ad3edcd66db2fc2432deba2cd5f7e1e Mon Sep 17 00:00:00 2001 From: zhouyan Date: Thu, 10 Aug 2023 09:14:43 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlayout=20grid=5Frow=20xts?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyan Change-Id: I6114cc6347f014703c098a7770dc884cd47f9ea4 --- .../Grid_Row/Grid_Row_Direction/Grid_Row_Direction_Row.ets | 2 +- .../Grid_Row_Direction/Grid_Row_Direction_RowReverse.ets | 2 +- .../Grid/Grid_Row/Grid_Row_Gutter/Grid_Row_Resource.ets | 2 +- .../Grid_Row_GutterOption_Default.ets | 2 +- .../Grid_Row_GutterOption/Grid_Row_GutterOption_Number.ets | 2 +- .../Grid_Row_GutterOption/Grid_Row_GutterOption_String.ets | 2 +- .../main/ets/test/Column/flexBasis/flexBasis_Type.test.ets | 7 ++++++- .../test/Column/spaceChanged/Column_Space_String.test.ets | 6 ++++++ .../ets/test/Row/flexBasis/Row_flexBasis_Type.test.ets | 5 ++++- .../ets/test/Row/spaceChanged/Row_Space_String.test.ets | 6 ++++++ 10 files changed, 28 insertions(+), 8 deletions(-) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_Row.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_Row.ets index b4ce1625c..d6fe6fa52 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_Row.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_Row.ets @@ -32,6 +32,6 @@ struct Grid_Row_Direction_Row { }.borderColor(color).borderWidth(2).key('DirectionRow_' + index) }) }.key('DirectionRow_001') - }.width('80pv').height(200) + }.width('80vp').height(200) } } \ No newline at end of file diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_RowReverse.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_RowReverse.ets index ecb98dfcb..d49885d7d 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_RowReverse.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Direction/Grid_Row_Direction_RowReverse.ets @@ -32,6 +32,6 @@ struct Grid_Row_Direction_RowReverse { }.borderColor(color).borderWidth(2).key('DirectionRowReverse_' + index) }) }.key('DirectionRowReverse_001') - }.width('80pv').height(200) + }.width('80vp').height(200) } } \ No newline at end of file diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Gutter/Grid_Row_Resource.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Gutter/Grid_Row_Resource.ets index d7cba5083..21b064065 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Gutter/Grid_Row_Resource.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_Gutter/Grid_Row_Resource.ets @@ -32,6 +32,6 @@ struct Gutter_Length_Resource { }.borderColor(color).borderWidth(2).key('Length_Resource_' + index) }) }.key('Length_Resource001') - }.width('80pv').height(200) + }.width('80vp').height(200) } } \ No newline at end of file diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Default.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Default.ets index 184d8b40d..fc5f0e045 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Default.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Default.ets @@ -54,6 +54,6 @@ struct Grid_Row_GutterOption_Default { }.borderColor(color).borderWidth(2).key('GutterOptionChange_' + index) }) }.key('GutterOptionChange_001') - }.width('80pv').height(200) + }.width('80vp').height(200) } } \ No newline at end of file diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Number.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Number.ets index 1af1e2ffc..c7905d29d 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Number.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_Number.ets @@ -52,6 +52,6 @@ struct Grid_Row_GutterOption_Number { }) } .key('Length_Number001') - }.width('80pv').height(200) + }.width('80vp').height(200) } } \ No newline at end of file diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_String.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_String.ets index 9986b9af8..d68b86397 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_String.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/Grid_Row/Grid_Row_GutterOption/Grid_Row_GutterOption_String.ets @@ -51,6 +51,6 @@ struct Grid_Row_GutterOption_String { }.borderColor(color).borderWidth(2).key('Grid_Row_GutterOption_String' + index) }) } - }.width('80pv').height(200) + }.width('80vp').height(200) } } \ No newline at end of file diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/flexBasis/flexBasis_Type.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/flexBasis/flexBasis_Type.test.ets index 7b9cbc539..8012aea90 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/flexBasis/flexBasis_Type.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/flexBasis/flexBasis_Type.test.ets @@ -283,9 +283,14 @@ export default function flexBasis_Type() { let Column_flexBasis_02 = CommonFunc.getComponentRect('Column_flexBasis_02'); console.log('assert position') expect(Math.round(Column_flexBasis_021.left - Column_flexBasis_02.left)).assertEqual(Math.round(Column_flexBasis_02.right - Column_flexBasis_021.right)); + console.log('Column_flexBasis_021.left - Column_flexBasis_02.left', + Column_flexBasis_021.left - Column_flexBasis_02.left) expect(Math.round(Column_flexBasis_022.left - Column_flexBasis_02.left)).assertEqual(Math.round(Column_flexBasis_02.right - Column_flexBasis_022.right)); + console.log('Column_flexBasis_022.left - Column_flexBasis_02.left', + Column_flexBasis_022.left - Column_flexBasis_02.left) expect(Math.round(Column_flexBasis_023.left - Column_flexBasis_02.left)).assertEqual(Math.round(Column_flexBasis_02.right - Column_flexBasis_023.right)); - expect(Math.round(Column_flexBasis_022.top - Column_flexBasis_021.bottom)).assertEqual(Math.round(Column_flexBasis_023.top - Column_flexBasis_022.bottom)) + console.log('Column_flexBasis_023.left - Column_flexBasis_02.left', + Column_flexBasis_023.left - Column_flexBasis_02.left) + expect(Math.round(Column_flexBasis_022.top - Column_flexBasis_021.bottom)).assertEqual(Math.round(Column_flexBasis_023.top - Column_flexBasis_022.bottom)); + console.log('Column_flexBasis_022.top - Column_flexBasis_021.bottom', + Column_flexBasis_022.top - Column_flexBasis_021.bottom) + console.log('assert space') expect(Math.round(Column_flexBasis_022.top - Column_flexBasis_021.bottom)).assertEqual(vp2px(10)); expect(Math.round(Column_flexBasis_023.top - Column_flexBasis_022.bottom)).assertEqual(vp2px(10)); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space_String.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space_String.test.ets index a8bf6a430..368d09e46 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space_String.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space_String.test.ets @@ -174,6 +174,9 @@ export default function Column_Space_String() { expect(Math.round(Column_Space_String_012.left - Column_Space_String_01.left)).assertEqual(Math.round(Column_Space_String_01.right - Column_Space_String_012.right)); expect(Math.round(Column_Space_String_013.left - Column_Space_String_01.left)).assertEqual(Math.round(Column_Space_String_01.right - Column_Space_String_013.right)); expect(Math.round(Column_Space_String_012.top - Column_Space_String_011.bottom)).assertEqual(Math.round(Column_Space_String_013.top - Column_Space_String_012.bottom)) + console.log('Column_Space_String_011.left - Column_Space_String_01.left', + Column_Space_String_011.left - Column_Space_String_01.left) + console.log('Column_Space_String_012.left - Column_Space_String_01.left', + Column_Space_String_012.left - Column_Space_String_01.left) + console.log('Column_Space_String_013.left - Column_Space_String_01.left', + Column_Space_String_013.left - Column_Space_String_01.left) console.log('assert space') expect(Math.round(Column_Space_String_012.top - Column_Space_String_011.bottom)).assertEqual(Math.round(lpx2px(50))); expect(Math.round(Column_Space_String_013.top - Column_Space_String_012.bottom)).assertEqual(Math.round(lpx2px(50))); @@ -390,6 +393,9 @@ export default function Column_Space_String() { expect(Math.round(Column_Space_String_012.left - Column_Space_String_01.left)).assertEqual(Math.round(Column_Space_String_01.right - Column_Space_String_012.right)); expect(Math.round(Column_Space_String_013.left - Column_Space_String_01.left)).assertEqual(Math.round(Column_Space_String_01.right - Column_Space_String_013.right)); expect(Math.round(Column_Space_String_012.top - Column_Space_String_011.bottom)).assertEqual(Math.round(Column_Space_String_013.top - Column_Space_String_012.bottom)) + console.log('Column_Space_String_011.left - Column_Space_String_01.left', + Column_Space_String_011.left - Column_Space_String_01.left) + console.log('Column_Space_String_012.left - Column_Space_String_01.left', + Column_Space_String_012.left - Column_Space_String_01.left) + console.log('Column_Space_String_013.left - Column_Space_String_01.left', + Column_Space_String_013.left - Column_Space_String_01.left) console.log('assert space') expect(Math.round(Column_Space_String_012.top - Column_Space_String_011.bottom)).assertEqual(10); expect(Math.round(Column_Space_String_013.top - Column_Space_String_012.bottom)).assertEqual(10); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/flexBasis/Row_flexBasis_Type.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/flexBasis/Row_flexBasis_Type.test.ets index b365fd893..09a586af1 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/flexBasis/Row_flexBasis_Type.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/flexBasis/Row_flexBasis_Type.test.ets @@ -305,7 +305,10 @@ export default function Row_flexBasis_Type() { expect(Math.round(Row_flexBasis_Type_021.top - Row_flexBasis_Type_02.top)).assertEqual(Math.round(Row_flexBasis_Type_02.bottom - Row_flexBasis_Type_021.bottom)); expect(Math.round(Row_flexBasis_Type_022.top - Row_flexBasis_Type_02.top)).assertEqual(Math.round(Row_flexBasis_Type_02.bottom - Row_flexBasis_Type_022.bottom)); expect(Math.round(Row_flexBasis_Type_023.top - Row_flexBasis_Type_02.top)).assertEqual(Math.round(Row_flexBasis_Type_02.bottom - Row_flexBasis_Type_023.bottom)); - + console.log('Row_flexBasis_Type_021.top - Row_flexBasis_Type_02.top', + Row_flexBasis_Type_021.top - Row_flexBasis_Type_02.top) + console.log('Row_flexBasis_Type_022.top - Row_flexBasis_Type_02.top', + Row_flexBasis_Type_022.top - Row_flexBasis_Type_02.top) + console.log('Row_flexBasis_Type_023.top - Row_flexBasis_Type_02.top', + Row_flexBasis_Type_023.top - Row_flexBasis_Type_02.top) + console.log('assert space') expect(Math.round(Row_flexBasis_Type_022.left - Row_flexBasis_Type_021.right)).assertEqual(vp2px(10)); expect(Math.round(Row_flexBasis_Type_023.left - Row_flexBasis_Type_022.right)).assertEqual(vp2px(10)); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space_String.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space_String.test.ets index 2ba5d2319..f323636cf 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space_String.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space_String.test.ets @@ -220,6 +220,9 @@ export default function Row_Space_String() { expect(Math.round(Row_Space_String_011.top - Row_Space_String_01.top)).assertEqual(Math.round(Row_Space_String_01.bottom - Row_Space_String_011.bottom)); expect(Math.round(Row_Space_String_012.top - Row_Space_String_01.top)).assertEqual(Math.round(Row_Space_String_01.bottom - Row_Space_String_012.bottom)); expect(Math.round(Row_Space_String_013.top - Row_Space_String_01.top)).assertEqual(Math.round(Row_Space_String_01.bottom - Row_Space_String_013.bottom)); + console.log('Row_Space_String_011.top - Row_Space_String_01.top', + Row_Space_String_011.top - Row_Space_String_01.top) + console.log('Row_Space_String_012.top - Row_Space_String_01.top', + Row_Space_String_012.top - Row_Space_String_01.top) + console.log('Row_Space_String_013.top - Row_Space_String_01.top', + Row_Space_String_013.top - Row_Space_String_01.top) console.log('assert space') expect(Math.round(Row_Space_String_012.left - Row_Space_String_011.right)).assertEqual(Math.round(lpx2px(70))); @@ -459,6 +462,9 @@ export default function Row_Space_String() { expect(Math.round(Row_Space_String_011.top - Row_Space_String_01.top)).assertEqual(Math.round(Row_Space_String_01.bottom - Row_Space_String_011.bottom)); expect(Math.round(Row_Space_String_012.top - Row_Space_String_01.top)).assertEqual(Math.round(Row_Space_String_01.bottom - Row_Space_String_012.bottom)); expect(Math.round(Row_Space_String_013.top - Row_Space_String_01.top)).assertEqual(Math.round(Row_Space_String_01.bottom - Row_Space_String_013.bottom)); + console.log('Row_Space_String_011.top - Row_Space_String_01.top', + Row_Space_String_011.top - Row_Space_String_01.top) + console.log('Row_Space_String_012.top - Row_Space_String_01.top', + Row_Space_String_012.top - Row_Space_String_01.top) + console.log('Row_Space_String_013.top - Row_Space_String_01.top', + Row_Space_String_013.top - Row_Space_String_01.top) console.log('assert space') expect(Math.round(Row_Space_String_012.left - Row_Space_String_011.right)).assertEqual(10); -- GitLab