1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * Define SubTabBarStyle, the style is text and underline. 18 * @syscap SystemCapability.ArkUI.ArkUI.Full 19 * @since 9 20 */ 21 declare class SubTabBarStyle { 22 /** 23 * constructor. 24 * @since 9 25 */ 26 constructor(content: string | Resource); 27} 28 29/** 30 * Define BottomTabBarStyle, the style is icon and text. 31 * @syscap SystemCapability.ArkUI.ArkUI.Full 32 * @since 9 33 */ 34 declare class BottomTabBarStyle { 35 /** 36 * constructor. 37 * @since 9 38 */ 39 constructor(icon: string | Resource, text: string | Resource); 40} 41 42/** 43 * Provides an interface for switching the content view on a tab page. 44 * @since 7 45 */ 46interface TabContentInterface { 47 /** 48 * Called when the content view of the switch tab is set. 49 * @since 7 50 */ 51 (): TabContentAttribute; 52} 53 54/** 55 * Defines the attribute functions of TabContent. 56 * @since 7 57 */ 58declare class TabContentAttribute extends CommonMethod<TabContentAttribute> { 59 /** 60 * Called when tabbar is entered. 61 * @since 7 62 */ 63 tabBar(value: string | Resource | CustomBuilder | 64 { icon?: string | Resource; text?: string | Resource }): TabContentAttribute; 65 66 /** 67 * Called when tabbar is entered. 68 * @since 9 69 */ 70 tabBar(value: SubTabBarStyle | BottomTabBarStyle): TabContentAttribute; 71} 72 73/** 74 * Defines TabContent Component. 75 * @since 7 76 */ 77declare const TabContent: TabContentInterface; 78 79/** 80 * Defines TabContent Component instance. 81 * @since 7 82 */ 83declare const TabContentInstance: TabContentAttribute; 84