Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9603d9fe
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看板
未验证
提交
9603d9fe
编写于
6月 25, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 25, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8985 UX二期 Tabs组件相关XTS
Merge pull request !8985 from sunjiakun/UXII8.2_xts
上级
41bf9425
bf2780ec
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
810 addition
and
8 deletion
+810
-8
arkui/ace_ets_components_ux/ace_ets_component_tabs/Test.json
arkui/ace_ets_components_ux/ace_ets_component_tabs/Test.json
+1
-1
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/Index.ets
...s_component_tabs/src/main/ets/TestAbility/pages/Index.ets
+2
-2
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexSec.ets
...omponent_tabs/src/main/ets/TestAbility/pages/IndexSec.ets
+199
-0
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/List.test.ets
...ux/ace_ets_component_tabs/src/main/ets/test/List.test.ets
+2
-0
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/Tabs.ets
...ents_ux/ace_ets_component_tabs/src/main/ets/test/Tabs.ets
+3
-3
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets
...s_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets
+600
-0
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/module.json
...components_ux/ace_ets_component_tabs/src/main/module.json
+1
-1
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/profile/test_pages.json
...nent_tabs/src/main/resources/base/profile/test_pages.json
+2
-1
未找到文件。
arkui/ace_ets_components_ux/ace_ets_component_tabs/Test.json
浏览文件 @
9603d9fe
...
...
@@ -4,7 +4,7 @@
"type"
:
"OHJSUnitTest"
,
"test-timeout"
:
"600000"
,
"bundle-name"
:
"com.example.acetabstest"
,
"module-name"
:
"
phone
"
,
"module-name"
:
"
entry_test
"
,
"shell-timeout"
:
"600000"
,
"testcase-timeout"
:
240000
},
...
...
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/Index.ets
浏览文件 @
9603d9fe
...
...
@@ -33,7 +33,7 @@ struct TabsExample {
@State nullFlag: boolean = false
@State strokeWidthNum: number = 10
@State dividerColorNum: number = 0xFF
FF
0000
@State dividerColorNum: number = 0xFF0000
@State startMarginNum: number = 5
@State endMarginNum: number = 5
...
...
@@ -235,7 +235,7 @@ struct TabsExample {
Column().width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar(SubTabBarStyle.of('pink')
.indicator({
color: 0xFF
FF0000, //下划线颜色
color: 0xFF
0000,
})
.selectedMode(this.selfSelectedMode)
.board({ borderRadius: this.selfSubTabBorderRadius })
...
...
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexSec.ets
0 → 100644
浏览文件 @
9603d9fe
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import events_emitter from '@ohos.events.emitter';
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry';
import { Hypium } from '@ohos/hypium';
import hilog from '@ohos.hilog';
import testsuite from '../../test/List.test'
@Entry
@Component
struct TabsExampleSec {
private controller: TabsController = new TabsController()
@State barOverlap: boolean = false
@State barBackgroundColorColor: Color = Color.Red
@State barBackgroundColorNumber: number = 0
@State barBackgroundColorString: string = "#00000000"
@State barBackgroundColorResource: Resource = $r("sys.color.ohos_toggle_bg")
private stateChangCallBack = (eventData) => {
console.info("tabs page state change called:" + JSON.stringify(eventData));
if (eventData != null) {
this.barOverlap = eventData.data.barOverlap;
this.barBackgroundColorColor = eventData.data.barBackgroundColorColor;
this.barBackgroundColorNumber = eventData.data.barBackgroundColorNumber;
this.barBackgroundColorString = eventData.data.barBackgroundColorString;
this.barBackgroundColorResource = eventData.data.barBackgroundColorResource;
}
}
aboutToAppear(){
var stateChangeEvent = {
eventId: 183,
priority: events_emitter.EventPriority.LOW
}
events_emitter.on(stateChangeEvent, this.stateChangCallBack);
}
build() {
Column() {
Tabs({ barPosition: BarPosition.End, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar("tab1")
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar("tab2")
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.height('90%')
.width('90%')
.backgroundColor("#F5F5F5")
.key('TabsOverlapTest1')
Tabs({ barPosition: BarPosition.End, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar("tab1")
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar("tab2")
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.barOverlap(this.barOverlap)
.height('90%')
.width('90%')
.backgroundColor("#F5F5F5")
.key('TabsOverlapTest2')
Tabs({ barPosition: BarPosition.End, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar("tab1")
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar("tab2")
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.barOverlap(false)
.height('90%')
.width('90%')
.backgroundColor("#F5F5F5")
.barBackgroundColor(this.barBackgroundColorColor)
.key('BarBackgroundColorColor')
Tabs({ barPosition: BarPosition.End, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar("tab1")
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar("tab2")
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.barOverlap(false)
.height('90%')
.width('90%')
.backgroundColor("#F5F5F5")
.barBackgroundColor(this.barBackgroundColorNumber)
.key('BarBackgroundColorNumber')
Tabs({ barPosition: BarPosition.End, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar("tab1")
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar("tab2")
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.barOverlap(false)
.height('90%')
.width('90%')
.backgroundColor("#F5F5F5")
.barBackgroundColor(this.barBackgroundColorString)
.key('BarBackgroundColorString')
Tabs({ barPosition: BarPosition.End, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar("tab1")
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar("tab2")
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.height('90%')
.width('90%')
.barBackgroundColor(this.barBackgroundColorResource)
.key('BarBackgroundColorResource')
}
}
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/List.test.ets
浏览文件 @
9603d9fe
...
...
@@ -13,7 +13,9 @@
* limitations under the License.
*/
import tabs from './Tabs'
import tabsSec from './TabsSec'
export default function testsuite() {
tabs()
tabsSec()
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/Tabs.ets
浏览文件 @
9603d9fe
...
...
@@ -69,10 +69,10 @@ export default function tabs() {
eventId: 183,
priority: events_emitter.EventPriority.LOW
}
console.info("
[ArkUI_Tabs_Divider_0100]
start to publish emit");
console.info("start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("
[ArkUI_Tabs_Divider_0100]
change component data error: " + err.message);
console.log("change component data error: " + err.message);
}
await Utils.sleep(2000);
done();
...
...
@@ -277,7 +277,7 @@ export default function tabs() {
eventId: 183,
priority: events_emitter.EventPriority.LOW
}
console.info("[ArkUI_Tabs_Divider_0
9
00] start to publish emit");
console.info("[ArkUI_Tabs_Divider_0
8
00] start to publish emit");
events_emitter.emit(innerEvent, eventData);
} catch (err) {
console.log("[ArkUI_Tabs_Divider_0800] change component data error: " + err.message);
...
...
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsSec.ets
0 → 100644
浏览文件 @
9603d9fe
此差异已折叠。
点击以展开。
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/module.json
浏览文件 @
9603d9fe
{
"module"
:
{
"name"
:
"
phone
"
,
"name"
:
"
entry_test
"
,
"type"
:
"feature"
,
"description"
:
"$string:module_test_desc"
,
"mainElement"
:
"TestAbility"
,
...
...
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/profile/test_pages.json
浏览文件 @
9603d9fe
{
"src"
:
[
"TestAbility/pages/Index"
"TestAbility/pages/Index"
,
"TestAbility/pages/IndexSec"
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录