From 8055027712ff67ea30f3068d181b3efe1452c181 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Thu, 9 Feb 2023 18:20:20 +0800 Subject: [PATCH] TabContent add two types of tabBar Signed-off-by: zhouchaobo --- .../arkui-ts/figures/TabBarStyle.jpeg | Bin 0 -> 22263 bytes .../arkui-ts/ts-container-tabcontent.md | 133 +++++++++++++++++- .../reference/arkui-ts/ts-container-tabs.md | 2 +- 3 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 zh-cn/application-dev/reference/arkui-ts/figures/TabBarStyle.jpeg diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/TabBarStyle.jpeg b/zh-cn/application-dev/reference/arkui-ts/figures/TabBarStyle.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..870c385e4600b1ddc9f92fd929be59022c3ef781 GIT binary patch literal 22263 zcmeIa2Urwa)-K!#3JQoIK{5&mO3p|W6q+C+AUWsIl5=cDat;ELB{V2eat0-5q{$hY zoO9Ep=5J=^s59rx`R1E{X6||JorZ#{+SRr9ihHfM)~<`ui&?-e8A)kL02&$^Ko9i; zxR?Mu0ia*Ga`}t;V4!}lVqLw8fpPT)CgwFPoEtbe*f+4Tac>gb!o7)q6C3*$@h$w@ zghWI{ICvy?hzaiy5E2ny-UJOD^&O0>*RNi^PKb+*OZdP3TzmoGW1*9x)uW@`16;vJ zL&rzEXa-ON0BBcHqrDvPUp{D8P-DD?iFN%3HtK@1TYxKQ=;&84&@V@gy4n-f4#2>_ zN^qA$?AmPweaw5dgq&|8)39j8i@p*m_V3Vf8Q6JWzd=lLhm?%|J_F-}hul28eEg3D zo;;P11WHNED7{oxQB_mdFf=kYF*P%{uy=5Da&~cbd+X!t=N}Ll6czn0CN}PUd_sCg zCL}BS zKDnd|4S@bV|fsTQBNf+7`XViv{k8$-b$29^m1x$V0+xIx%U=fN( zrWJj?PRpgZLu6pre}kBgdyanhlC(cj_Ky+f{ZCQ$ovs4A-f2eQqA0tRa&FotCY9`NHd!ua^_@Y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9CV0B|g4!N}l*5QsTn)bZraUsu zMRJvoVf&u#zPC;DR+|-<>Oz057KokbGzqfNgIaVkM0y& z_}RYK|CIAGw?pDpfomD(2EDrdU{<23=xpj(>em#^5me?Kwf~~V$IoX*rkMGeXrOq` z{+7K?k&a{93Kcy_Dt*wZu&Jz>+Ux=#J<;g5Pf8)vQx>RmZ5l9ZAJ)}mGp)I@)8wID zKx--o14`yNlqA5ER|4cdU|arD#EPnef>K~ z&5fELNR0~Szb`tnJ-&>NF5i0Nhw@}sP*~LaKT4YPzreMA=GMOx*P8x=;#z-;CjJDk x{WV-#^yw$K)IRm!Jez%gN!FiAlzzuK@t~mhUz}5c{RS#~_?IuKz`Gdx{{VeS#RC8U literal 0 HcmV?d00001 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-tabcontent.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-tabcontent.md index 1c61f55bd7..8a2612b58f 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-tabcontent.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-tabcontent.md @@ -24,12 +24,45 @@ TabContent() | 名称 | 参数类型 | 描述 | | -------- | -------- | -------- | | tabBar | string \| Resource \| {
icon?: string \| Resource,
text?: string \| Resource
}
\| [CustomBuilder](ts-types.md)8+ | 设置TabBar上显示内容。
CustomBuilder: 构造器,内部可以传入组件(API8版本以上适用)。
>  **说明:**
> 如果icon采用svg格式图源,则要求svg图源删除其自有宽高属性值。如采用带有自有宽高属性的svg图源,icon大小则是svg本身内置的宽高属性值大小。 | +| tabBar9+ | [SubTabBarStyle](#subtabbarstyle) \| [BottomTabBarStyle](#bottomtabbarstyle) | 设置TabBar上显示内容。
SubTabBarStyle: 子页签样式,参数为文字。
BottomTabBarStyle: 底部页签和侧边页签样式,参数为文字和图片。 | > **说明:** > - TabContent组件不支持设置通用宽度属性,其宽度默认撑满Tabs父组件。 > - TabContent组件不支持设置通用高度属性,其高度由Tabs父组件高度与TabBar组件高度决定。 > - TabContent组件不支持[触摸热区设置](ts-universal-attributes-touch-target.md)。 +## SubTabBarStyle9+ + +子页签样式。 + +### constructor9+ + +constructor(content: string | Resource) + +SubTabBarStyle的构造函数。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | -------- | -------- | +| content | string \| [Resource](ts-types.md#resource) | 是 | 页签内的文字内容。 | + +## BottomTabBarStyle9+ + +底部页签和侧边页签样式。 + +### constructor9+ + +constructor(icon: string | Resource, text: string | Resource) + +BottomTabBarStyle的构造函数。 + +**参数:** + +| 参数名 | 参数类型 | 必填 | 参数描述 | +| -------- | -------- | -------- | -------- | +| icon | string \| [Resource](ts-types.md#resource) | 是 | 页签内的图片内容。 | +| text | string \| [Resource](ts-types.md#resource) | 是 | 页签内的文字内容。 | ## 示例 @@ -193,4 +226,102 @@ struct TabContentExample { } ``` -![tabContent](figures/tabContent2.gif) \ No newline at end of file +![tabContent](figures/tabContent2.gif) + +示例3: + +```ts +// xxx.ets +@Entry +@Component +struct TabBarStyleExample { + build() { + Column({ space: 5 }) { + Text("子页签样式") + Column() { + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Pink) + }.tabBar(new SubTabBarStyle('Pink')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Yellow) + }.tabBar(new SubTabBarStyle('Yellow')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Blue) + }.tabBar(new SubTabBarStyle('Blue')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Green) + }.tabBar(new SubTabBarStyle('Green')) + } + .vertical(false) + .scrollable(true) + .barMode(BarMode.Fixed) + .onChange((index: number) => { + console.info(index.toString()) + }) + .width('100%') + .backgroundColor(0xF1F3F5) + }.width('100%').height(200) + Text("底部页签样式") + Column() { + Tabs({ barPosition: BarPosition.End }) { + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Pink) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'pink')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Yellow) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'Yellow')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Blue) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'Blue')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Green) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'Green')) + } + .vertical(false) + .scrollable(true) + .barMode(BarMode.Fixed) + .onChange((index: number) => { + console.info(index.toString()) + }) + .width('100%') + .backgroundColor(0xF1F3F5) + }.width('100%').height(200) + Text("侧边页签样式") + Column() { + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Pink) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'pink')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Yellow) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'Yellow')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Blue) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'Blue')) + + TabContent() { + Column().width('100%').height('100%').backgroundColor(Color.Green) + }.tabBar(new BottomTabBarStyle($r('sys.media.ohos_app_icon'), 'Green')) + } + .vertical(true).scrollable(true).barMode(BarMode.Fixed) + .onChange((index: number) => { + console.info(index.toString()) + }) + .width('100%') + .backgroundColor(0xF1F3F5) + }.width('100%').height(400) + } + } +} +``` + +![tabbarStyle](figures/TabBarStyle.jpeg) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md index c90880b34b..47d0b607cd 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md @@ -43,7 +43,7 @@ Tabs(value?: {barPosition?: BarPosition, index?: number, controller?: [TabsContr | barMode | BarMode | TabBar布局模式,具体描述见BarMode枚举说明。
默认值:BarMode.Fixed | | barWidth | number \| Length8+ | TabBar的宽度值。 | | barHeight | number \| Length8+ | TabBar的高度值。 | -| animationDuration | number | TabContent滑动动画时长。
默认值:200 | +| animationDuration | number | TabContent滑动动画时长。不设置时,点击切换页签无动画,滑动切换有动画;设置时,点击切换和滑动切换都有动画。
默认值:200 | ## BarMode枚举说明 -- GitLab