Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
35c78146
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
35c78146
编写于
2月 20, 2023
作者:
E
e
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改用例
Signed-off-by:
N
e
<
qianwangdq@isoftstone.com
>
上级
38e635d1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
11 addition
and
32 deletion
+11
-32
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets
...pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets
+0
-1
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets
...es/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets
+0
-3
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets
...lex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets
+0
-15
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets
...ages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets
+0
-2
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddPadding.ets
...ges/Flex/justifyContent/Center/AlignCenter_AddPadding.ets
+1
-1
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets
...ustifyContent/Center/AlignCenter_AddLayoutWeight.test.ets
+5
-5
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets
...x/justifyContent/Center/AlignCenter_AddOneMargin.test.ets
+5
-5
未找到文件。
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets
浏览文件 @
35c78146
...
...
@@ -48,6 +48,5 @@ struct AlignCenter_AddAlign {
.align(this.DadAddAlign)
}
.width("100%")
.backgroundColor(0xAFEEE)
}
}
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets
浏览文件 @
35c78146
...
...
@@ -36,7 +36,6 @@ struct AlignCenter_AddAllSpace {
build() {
Column() {
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_011")
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAllSpace_012")
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_013")
...
...
@@ -50,8 +49,6 @@ struct AlignCenter_AddAllSpace {
}
.key("Center_AddAllSpace_01_Box")
.width("100%")
.height(200)
.backgroundColor(0xAFEEE)
.alignItems(HorizontalAlign.Start)
}
}
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets
浏览文件 @
35c78146
...
...
@@ -60,21 +60,6 @@ struct AlignCenter_AddLayoutWeight {
.width(500)
.height(200)
.backgroundColor(0xAFEEEE)
Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) {
Text('1')
.width(150)
.height(50)
.backgroundColor(0xF5DEB3)
.key("Center_AddLayoutWeight_021")
.layoutWeight(this.OneLayoutWeight1)
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddLayoutWeight_022")
.layoutWeight(this.OneLayoutWeight2)
Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddLayoutWeight_023")
}
.key("Center_AddLayoutWeight_02")
.width(500)
.height(200)
.backgroundColor(0xAFEEEE)
}
.width("100%")
}
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets
浏览文件 @
35c78146
...
...
@@ -48,8 +48,6 @@ struct AlignCenter_AddMargin {
}
.key("Center_AddMargin_01_Box")
.width("100%")
.height(200)
.backgroundColor(0xAFEEE)
.alignItems(HorizontalAlign.Start)
}
}
arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddPadding.ets
浏览文件 @
35c78146
...
...
@@ -35,7 +35,7 @@ struct AlignCenter_AddPadding {
@State justifyContent: FlexAlign = FlexAlign.Center
build() {
Column() {
Text('
alignContent:Center').fontSize(9).fontColor(0xCCCCCC).width('10
0%')
Text('
justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('9
0%')
Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) {
Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddPadding_011")
Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddPadding_012")
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets
浏览文件 @
35c78146
...
...
@@ -90,17 +90,17 @@ export default function AlignCenter_AddLayoutWeight() {
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1600] START');
globalThis.value.message.notify({name:'OneLayoutWeight1', value:1});
globalThis.value.message.notify({name:'OneLayoutWeight2', value:2});
globalThis.value.message.notify({name:'OneLayoutWeight3', value:
2
});
globalThis.value.message.notify({name:'OneLayoutWeight3', value:
0
});
await CommonFunc.sleep(3000);
let strJson = getInspectorByKey('Center_AddLayoutWeight_01');
let obj = JSON.parse(strJson);
expect(obj.$type).assertEqual('Flex');
expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row');
expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.Center');
let Center_AddLayoutWeight_011 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
2
1');
let Center_AddLayoutWeight_012 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
2
2');
let Center_AddLayoutWeight_013 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
2
3');
let Center_AddLayoutWeight_01 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
2
');
let Center_AddLayoutWeight_011 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
1
1');
let Center_AddLayoutWeight_012 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
1
2');
let Center_AddLayoutWeight_013 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
1
3');
let Center_AddLayoutWeight_01 = CommonFunc.getComponentRect('Center_AddLayoutWeight_0
1
');
expect(Center_AddLayoutWeight_011.top).assertEqual(Center_AddLayoutWeight_012.top);
expect(Center_AddLayoutWeight_013.top).assertEqual(Center_AddLayoutWeight_012.top);
expect(Center_AddLayoutWeight_011.top).assertEqual(Center_AddLayoutWeight_01.top);
...
...
arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets
浏览文件 @
35c78146
...
...
@@ -101,16 +101,16 @@ export default function AlignCenter_AddOneMargin() {
let Center_AddOneMargin_01 = CommonFunc.getComponentRect('Center_AddOneMargin_01');
expect(Center_AddOneMargin_01.top).assertEqual(Center_AddOneMargin_012.top);
expect(Center_AddOneMargin_013.top).assertEqual(Center_AddOneMargin_012.top);
expect(Center_AddOneMargin_011.left - Center_AddOneMargin_01.left).assertEqual(vp2px(
30
));
expect(Center_AddOneMargin_011.left - Center_AddOneMargin_01.left).assertEqual(vp2px(
500/17
));
expect(Center_AddOneMargin_011.top - Center_AddOneMargin_01.top).assertEqual(vp2px(30));
expect(Center_AddOneMargin_012.left - Center_AddOneMargin_011.right).assertEqual(vp2px(
30
));
expect(Center_AddOneMargin_012.left - Center_AddOneMargin_011.right).assertEqual(vp2px(
500/17
));
expect(Center_AddOneMargin_012.right).assertEqual(Center_AddOneMargin_013.left);
expect(Center_AddOneMargin_011.bottom - Center_AddOneMargin_011.top).assertEqual(vp2px(50));
expect(Center_AddOneMargin_012.bottom - Center_AddOneMargin_012.top).assertEqual(vp2px(100));
expect(Center_AddOneMargin_013.bottom - Center_AddOneMargin_013.top).assertEqual(vp2px(150));
expect(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left).assertEqual(vp2px(
440/3
));
expect(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left).assertEqual(vp2px(
440/3
));
expect(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left).assertEqual(vp2px(
440/3
));
expect(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left).assertEqual(vp2px(
2500/17
));
expect(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left).assertEqual(vp2px(
2500/17
));
expect(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left).assertEqual(vp2px(
2500/17
));
console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1500] END');
done();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录