Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5db2d991
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看板
未验证
提交
5db2d991
编写于
8月 17, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 17, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9624 Tabs栅格化/文本超长处理
Merge pull request !9624 from tengfan/tabs0731
上级
b8cce498
d8212a3e
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
7296 addition
and
1 deletion
+7296
-1
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/TestAbility/pages/IndexThird.ets
...ponent_tabs/src/main/ets/TestAbility/pages/IndexThird.ets
+511
-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/TabsThird.ets
...ux/ace_ets_component_tabs/src/main/ets/test/TabsThird.ets
+6741
-0
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/element/float.json
...component_tabs/src/main/resources/base/element/float.json
+36
-0
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/element/string.json
...omponent_tabs/src/main/resources/base/element/string.json
+4
-0
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/src/main/ets/TestAbility/pages/IndexThird.ets
0 → 100644
浏览文件 @
5db2d991
/*
* 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 TabsExampleThird {
private controller: TabsController = new TabsController()
@State barGridAlignMarginNumber: number = 0
@State barGridAlignMarginString: FP = '0.00fp'
@State barGridAlignGutterNumber: number = 0
@State barGridAlignGutterString: FP = '0.00fp'
@State barGridAlignSmNumber: number = 0
@State barGridAlignMdNumber: number = 0
@State barGridAlignLgNumber: number = 0
// @State barHeightNumber: number = 0
@State barHeightString: string = '0.00vp'
@State barModeMode: BarMode = BarMode.Fixed
@State barModeMarginString: FP = '0.00fp'
@State barModeMarginNumber: number = 0
@State barModeNonScrollableLayoutStyle: LayoutStyle = LayoutStyle.ALWAYS_CENTER
@State subTabBarStylePaddingNumber: number = 0
@State subTabBarStylePaddingString: FP = '0.00fp'
@State bottomTabBarStylePaddingNumber: number = 0
@State bottomTabBarStylePaddingString: FP = '0.00fp'
@State subTabBarStylePaddingTopNumber: number = 0
@State subTabBarStylePaddingBottomNumber: number = 0
@State subTabBarStylePaddingLeftNumber: number = 0
@State subTabBarStylePaddingRightNumber: number = 0
@State subTabBarStylePaddingTopString: string = '0.00vp'
@State subTabBarStylePaddingBottomString: string = '0.00vp'
@State subTabBarStylePaddingLeftString: string = '0.00vp'
@State subTabBarStylePaddingRightString: string = '0.00vp'
@State bottomTabBarStylePaddingTopNumber: number = 0
@State bottomTabBarStylePaddingBottomNumber: number = 0
@State bottomTabBarStylePaddingLeftNumber: number = 0
@State bottomTabBarStylePaddingRightNumber: number = 0
@State bottomTabBarStylePaddingTopString: string = '0.00vp'
@State bottomTabBarStylePaddingBottomString: string = '0.00vp'
@State bottomTabBarStylePaddingLeftString: string = '0.00vp'
@State bottomTabBarStylePaddingRightString: string = '0.00vp'
@State bottomTabBarStyleVerticalAlign: VerticalAlign = VerticalAlign.Center
@State bottomTabBarStyleLayoutMode: LayoutMode = LayoutMode.VERTICAL
@State bottomTabBarStyleSymmetricExtensible: boolean = false
@State bottomTabBarStyleLabelStyleOverflow: TextOverflow = TextOverflow.Ellipsis
@State bottomTabBarStyleLabelStyleMaxLines: number = 0
@State bottomTabBarStyleLabelStyleMinFontSizeNumber: number = 0
@State bottomTabBarStyleLabelStyleMinFontSizeString: string = '0.00vp'
@State bottomTabBarStyleLabelStyleMaxFontSizeNumber: number = 0
@State bottomTabBarStyleLabelStyleMaxFontSizeString: string = '0.00vp'
@State bottomTabBarStyleLabelStyleHeightAdaptivePolicy: TextHeightAdaptivePolicy = TextHeightAdaptivePolicy.MAX_LINES_FIRST
@State bottomTabBarStyleLabelStyleFontSizeNumber: number = 0
@State bottomTabBarStyleLabelStyleFontSizeString: string = '0.00vp'
@State bottomTabBarStyleLabelStyleFontWeight: FontWeight = FontWeight.Normal
@State bottomTabBarStyleLabelStyleFontWeightNumber: number = 0
@State bottomTabBarStyleLabelStyleFontWeightString: string = '0.00vp'
@State bottomTabBarStyleLabelStyleFontFamilyString: string = '0.00vp'
@State bottomTabBarStyleLabelStyleFontStyle: FontStyle = FontStyle.Normal
private stateChangCallBack = (eventData) => {
console.info("tabs page state change called:" + JSON.stringify(eventData));
if (eventData != null) {
this.barGridAlignMarginNumber = eventData.data.barGridAlignMarginNumber;
this.barGridAlignMarginString = eventData.data.barGridAlignMarginString;
this.barGridAlignGutterNumber = eventData.data.barGridAlignGutterNumber;
this.barGridAlignGutterString = eventData.data.barGridAlignGutterString;
this.barGridAlignSmNumber = eventData.data.barGridAlignSmNumber;
this.barGridAlignMdNumber = eventData.data.barGridAlignMdNumber;
this.barGridAlignLgNumber = eventData.data.barGridAlignLgNumber;
// this.barHeightNumber = eventData.data.barHeightNumber;
this.barHeightString = eventData.data.barHeightString;
this.barModeMode = eventData.data.barModeMode;
this.barModeMarginString = eventData.data.barModeMarginString;
this.barModeMarginNumber = eventData.data.barModeMarginNumber;
this.barModeNonScrollableLayoutStyle = eventData.data.barModeNonScrollableLayoutStyle;
this.subTabBarStylePaddingNumber = eventData.data.subTabBarStylePaddingNumber;
this.subTabBarStylePaddingString = eventData.data.subTabBarStylePaddingString;
this.bottomTabBarStylePaddingNumber = eventData.data.bottomTabBarStylePaddingNumber;
this.bottomTabBarStylePaddingString = eventData.data.bottomTabBarStylePaddingString;
this.subTabBarStylePaddingTopNumber = eventData.data.subTabBarStylePaddingTopNumber;
this.subTabBarStylePaddingBottomNumber = eventData.data.subTabBarStylePaddingBottomNumber;
this.subTabBarStylePaddingLeftNumber = eventData.data.subTabBarStylePaddingLeftNumber;
this.subTabBarStylePaddingRightNumber = eventData.data.subTabBarStylePaddingRightNumber;
this.subTabBarStylePaddingTopString = eventData.data.subTabBarStylePaddingTopString;
this.subTabBarStylePaddingBottomString = eventData.data.subTabBarStylePaddingBottomString;
this.subTabBarStylePaddingLeftString = eventData.data.subTabBarStylePaddingLeftString;
this.subTabBarStylePaddingRightString = eventData.data.subTabBarStylePaddingRightString;
this.bottomTabBarStylePaddingTopNumber = eventData.data.bottomTabBarStylePaddingTopNumber;
this.bottomTabBarStylePaddingBottomNumber = eventData.data.bottomTabBarStylePaddingBottomNumber;
this.bottomTabBarStylePaddingLeftNumber = eventData.data.bottomTabBarStylePaddingLeftNumber;
this.bottomTabBarStylePaddingRightNumber = eventData.data.bottomTabBarStylePaddingRightNumber;
this.bottomTabBarStylePaddingTopString = eventData.data.bottomTabBarStylePaddingTopString;
this.bottomTabBarStylePaddingBottomString = eventData.data.bottomTabBarStylePaddingBottomString;
this.bottomTabBarStylePaddingLeftString = eventData.data.bottomTabBarStylePaddingLeftString;
this.bottomTabBarStylePaddingRightString = eventData.data.bottomTabBarStylePaddingRightString;
this.bottomTabBarStyleVerticalAlign = eventData.data.bottomTabBarStyleVerticalAlign;
this.bottomTabBarStyleLayoutMode = eventData.data.bottomTabBarStyleLayoutMode;
this.bottomTabBarStyleSymmetricExtensible = eventData.data.bottomTabBarStyleSymmetricExtensible;
this.bottomTabBarStyleLabelStyleOverflow = eventData.data.bottomTabBarStyleLabelStyleOverflow;
this.bottomTabBarStyleLabelStyleMaxLines = eventData.data.bottomTabBarStyleLabelStyleMaxLines;
this.bottomTabBarStyleLabelStyleMinFontSizeNumber = eventData.data.bottomTabBarStyleLabelStyleMinFontSizeNumber;
this.bottomTabBarStyleLabelStyleMinFontSizeString = eventData.data.bottomTabBarStyleLabelStyleMinFontSizeString;
this.bottomTabBarStyleLabelStyleMaxFontSizeNumber = eventData.data.bottomTabBarStyleLabelStyleMaxFontSizeNumber;
this.bottomTabBarStyleLabelStyleMaxFontSizeString = eventData.data.bottomTabBarStyleLabelStyleMaxFontSizeString;
this.bottomTabBarStyleLabelStyleHeightAdaptivePolicy = eventData.data.bottomTabBarStyleLabelStyleHeightAdaptivePolicy;
this.bottomTabBarStyleLabelStyleFontSizeNumber = eventData.data.bottomTabBarStyleLabelStyleFontSizeNumber;
this.bottomTabBarStyleLabelStyleFontSizeString = eventData.data.bottomTabBarStyleLabelStyleFontSizeString;
this.bottomTabBarStyleLabelStyleFontWeight = eventData.data.bottomTabBarStyleLabelStyleFontWeight;
this.bottomTabBarStyleLabelStyleFontWeightNumber = eventData.data.bottomTabBarStyleLabelStyleFontWeightNumber;
this.bottomTabBarStyleLabelStyleFontWeightString = eventData.data.bottomTabBarStyleLabelStyleFontWeightString;
this.bottomTabBarStyleLabelStyleFontFamilyString = eventData.data.bottomTabBarStyleLabelStyleFontFamilyString;
this.bottomTabBarStyleLabelStyleFontStyle = eventData.data.bottomTabBarStyleLabelStyleFontStyle
}
}
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(SubTabBarStyle.of("tab1"))
.key('subTabBarDefaultTest')
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar(BottomTabBarStyle.of('app.media.icon', "tab2"))
.key('bottomTabBarDefaultTest')
}
.vertical(false)
.onTabBarClick((index:number)=>{})
.barMode(BarMode.Fixed)
.key('tabsDefaultTest')
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(BottomTabBarStyle.of('app.media.icon', "tab2"))
.key('bottomTabBarDefaultTestJudge')
}
.vertical(false)
.scrollable(true)
.barWidth(350)
.barHeight(70)
.animationDuration(200)
.height('90%')
.width('90%')
.onTabBarClick((index:number) => {})
.key('onTabBarClickTest')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar(SubTabBarStyle.of("tab1")
.padding(this.subTabBarStylePaddingNumber))
.key('subTabBarNumberTest')
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.padding(this.bottomTabBarStylePaddingNumber))
.key('bottomTabBarNumberTest')
}
.vertical(false)
.barGridAlign({
margin:this.barGridAlignMarginNumber,
gutter:this.barGridAlignGutterNumber,
sm:this.barGridAlignSmNumber,
md:this.barGridAlignMdNumber,
lg:this.barGridAlignLgNumber
})
// .barHeight(this.barHeightNumber)
.barMode(this.barModeMode, {margin:this.barModeMarginNumber, nonScrollableLayoutStyle:this.barModeNonScrollableLayoutStyle})
.key('tabsNumberTest')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar(SubTabBarStyle.of("tab1")
.padding(this.subTabBarStylePaddingString))
.key('subTabBarStringTest')
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.padding(this.bottomTabBarStylePaddingString))
.key('bottomTabBarStringTest')
}
.vertical(false)
.barGridAlign({
margin:this.barGridAlignMarginString,
gutter:this.barGridAlignGutterString,
})
.barHeight(this.barHeightString)
.barMode(this.barModeMode, {margin:this.barModeMarginString, nonScrollableLayoutStyle:this.barModeNonScrollableLayoutStyle})
.key('tabsStringTest')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}.tabBar(SubTabBarStyle.of("tab1")
.padding($r('app.float.SubTabBarStylePadding_Test')))
.key('subTabBarResourceTest')
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.padding($r('app.float.BottomTabBarStylePadding_Test')))
.key('bottomTabBarResourceTest')
}
.vertical(false)
.barGridAlign({
margin:$r('app.float.BarGridAlign_Test'),
gutter:$r('app.float.BarGridAlign_Test'),
})
.barHeight($r('app.float.BarHeight_Test'))
.barMode(this.barModeMode, {margin:$r('app.float.BarMode_Test'), nonScrollableLayoutStyle:this.barModeNonScrollableLayoutStyle})
.key('tabsResourceTest')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
TabContent() {
Column(){
Text('Tab2').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Pink)
}
}
.vertical(false)
.barMode(BarMode.Fixed)
.key('marginPadding')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(SubTabBarStyle.of("tab1")
.padding({
top: this.subTabBarStylePaddingTopNumber,
bottom: this.subTabBarStylePaddingBottomNumber,
left: this.subTabBarStylePaddingLeftNumber,
right: this.subTabBarStylePaddingRightNumber
}))
.key('subTabBarStylePaddingNumberTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(SubTabBarStyle.of("tab1")
.padding({
top: this.subTabBarStylePaddingTopString,
bottom: this.subTabBarStylePaddingBottomString,
left: this.subTabBarStylePaddingLeftString,
right: this.subTabBarStylePaddingRightString
}))
.key('subTabBarStylePaddingStringTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(SubTabBarStyle.of("tab1")
.padding({
top: $r('app.float.SubTabBarStylePadding_Test'),
bottom: $r('app.float.SubTabBarStylePadding_Test'),
left: $r('app.float.SubTabBarStylePadding_Test'),
right: $r('app.float.SubTabBarStylePadding_Test')
}))
.key('subTabBarStylePaddingResourceTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.padding({
top: this.bottomTabBarStylePaddingTopNumber,
bottom: this.bottomTabBarStylePaddingBottomNumber,
left: this.bottomTabBarStylePaddingLeftNumber,
right: this.bottomTabBarStylePaddingRightNumber
}))
.key('bottomTabBarStylePaddingNumberTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.padding({
top: this.bottomTabBarStylePaddingTopString,
bottom: this.bottomTabBarStylePaddingBottomString,
left: this.bottomTabBarStylePaddingLeftString,
right: this.bottomTabBarStylePaddingRightString
}))
.key('bottomTabBarStylePaddingStringTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.padding({
top: $r('app.float.BottomTabBarStylePadding_Test'),
bottom: $r('app.float.BottomTabBarStylePadding_Test'),
left: $r('app.float.BottomTabBarStylePadding_Test'),
right: $r('app.float.BottomTabBarStylePadding_Test')
}))
.key('bottomTabBarStylePaddingResourceTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.verticalAlign(this.bottomTabBarStyleVerticalAlign))
.key('bottomTabBarStyleVerticalAlignTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.layoutMode(this.bottomTabBarStyleLayoutMode))
.key('bottomTabBarStyleLayoutModeTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.symmetricExtensible(this.bottomTabBarStyleSymmetricExtensible))
.key('bottomTabBarStyleSymmetricExtensibleTest')
}
.barMode(BarMode.Fixed)
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.labelStyle(
{
overflow:this.bottomTabBarStyleLabelStyleOverflow,
maxLines:this.bottomTabBarStyleLabelStyleMaxLines,
heightAdaptivePolicy:this.bottomTabBarStyleLabelStyleHeightAdaptivePolicy,
font:{
size:$r('sys.float.ohos_id_text_size_caption'),
weight:this.bottomTabBarStyleLabelStyleFontWeight,
style:this.bottomTabBarStyleLabelStyleFontStyle
}
}))
.key('bottomTabBarStyleLabelStyleTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.labelStyle({
minFontSize:this.bottomTabBarStyleLabelStyleMinFontSizeNumber,
maxFontSize:this.bottomTabBarStyleLabelStyleMaxFontSizeNumber,
font:{
size:this.bottomTabBarStyleLabelStyleFontSizeNumber,
weight:this.bottomTabBarStyleLabelStyleFontWeightNumber,
}
}))
.key('bottomTabBarStyleLabelStyleNumberTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.labelStyle({
minFontSize:this.bottomTabBarStyleLabelStyleMinFontSizeString,
maxFontSize:this.bottomTabBarStyleLabelStyleMaxFontSizeString,
font:{
size:this.bottomTabBarStyleLabelStyleFontSizeString,
weight:this.bottomTabBarStyleLabelStyleFontWeightString,
family:this.bottomTabBarStyleLabelStyleFontFamilyString,
}
}))
.key('bottomTabBarStyleLabelStyleStringTest')
}
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
Text('Tab1').fontSize(32)
}.width('100%').height('100%').backgroundColor(Color.Yellow)
}
.tabBar(BottomTabBarStyle.of('app.media.icon', "tab1")
.labelStyle({
minFontSize:($r('app.float.BottomTabBarStyleLabelStyle_minFontSize_Test')),
maxFontSize:($r('app.float.BottomTabBarStyleLabelStyle_maxFontSize_Test')),
font:{
size:($r('app.float.BottomTabBarStyleLabelStyle_Font_Size_Test')),
family:($r('app.string.BottomTabBarStyleLabelStyle_family_Test'))
}
}))
.key('bottomTabBarStyleLabelStyleResourceTest')
}
Button("Top")
.width($r('sys.float.ohos_id_subtab_top_padding'))
.key("subTabBarDefaultTestTopJudge")
Button("Right")
.width($r('sys.float.ohos_id_subtab_horizontal_padding'))
.key("subTabBarDefaultTestRightJudge")
Button("Bottom")
.width($r('sys.float.ohos_id_subtab_bottom_padding'))
.key("subTabBarDefaultTestBottomJudge")
Button("Left")
.width($r('sys.float.ohos_id_subtab_horizontal_padding'))
.key("subTabBarDefaultTestLeftJudge")
}
}
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/List.test.ets
浏览文件 @
5db2d991
...
...
@@ -14,8 +14,10 @@
*/
import tabs from './Tabs'
import tabsSec from './TabsSec'
import tabsThird from './TabsThird'
export default function testsuite() {
tabs()
tabsSec()
tabsThird()
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/ets/test/TabsThird.ets
0 → 100644
浏览文件 @
5db2d991
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/element/float.json
0 → 100644
浏览文件 @
5db2d991
{
"float"
:
[
{
"name"
:
"BarGridAlign_Test"
,
"value"
:
"15px"
},
{
"name"
:
"BarHeight_Test"
,
"value"
:
"55.00vp"
},
{
"name"
:
"SubTabBarStylePadding_Test"
,
"value"
:
"10.00vp"
},
{
"name"
:
"BottomTabBarStylePadding_Test"
,
"value"
:
"8.00vp"
},
{
"name"
:
"BarMode_Test"
,
"value"
:
"8.00px"
},
{
"name"
:
"BottomTabBarStyleLabelStyle_minFontSize_Test"
,
"value"
:
"4.00fp"
},
{
"name"
:
"BottomTabBarStyleLabelStyle_maxFontSize_Test"
,
"value"
:
"5.00fp"
},
{
"name"
:
"BottomTabBarStyleLabelStyle_Font_Size_Test"
,
"value"
:
"18.00fp"
}
]
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/element/string.json
浏览文件 @
5db2d991
...
...
@@ -43,6 +43,10 @@
{
"name"
:
"Indicator_Space"
,
"value"
:
"10vp"
},
{
"name"
:
"BottomTabBarStyleLabelStyle_family_Test"
,
"value"
:
"HarmonyOS Sans"
}
]
}
\ No newline at end of file
arkui/ace_ets_components_ux/ace_ets_component_tabs/src/main/resources/base/profile/test_pages.json
浏览文件 @
5db2d991
{
"src"
:
[
"TestAbility/pages/Index"
,
"TestAbility/pages/IndexSec"
"TestAbility/pages/IndexSec"
,
"TestAbility/pages/IndexThird"
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录