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 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Enum for the mode of the tab bar when selected. 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @since 10 28 */ 29/** 30 * Enum for the mode of the tab bar when selected. 31 * 32 * @enum { number } 33 * @syscap SystemCapability.ArkUI.ArkUI.Full 34 * @crossplatform 35 * @atomicservice 36 * @since 11 37 */ 38declare enum SelectedMode { 39 /** 40 * The value of indicator 41 * 42 * @syscap SystemCapability.ArkUI.ArkUI.Full 43 * @crossplatform 44 * @since 10 45 */ 46 /** 47 * The value of indicator 48 * 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @crossplatform 51 * @atomicservice 52 * @since 11 53 */ 54 INDICATOR, 55 56 /** 57 * The value of board 58 * 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @crossplatform 61 * @since 10 62 */ 63 /** 64 * The value of board 65 * 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @crossplatform 68 * @atomicservice 69 * @since 11 70 */ 71 BOARD 72} 73 74/** 75 * Enum for the layout mode of the content in the tab bar. 76 * 77 * @enum { number } 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @since 10 81 */ 82/** 83 * Enum for the layout mode of the content in the tab bar. 84 * 85 * @enum { number } 86 * @syscap SystemCapability.ArkUI.ArkUI.Full 87 * @crossplatform 88 * @atomicservice 89 * @since 11 90 */ 91declare enum LayoutMode { 92 93 /** 94 * The the content is laid vertically or horizontally, according to its width. 95 * 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @crossplatform 98 * @since 10 99 */ 100 /** 101 * The the content is laid vertically or horizontally, according to its width. 102 * 103 * @syscap SystemCapability.ArkUI.ArkUI.Full 104 * @crossplatform 105 * @atomicservice 106 * @since 11 107 */ 108 AUTO = 0, 109 /** 110 * The the content is laid vertically 111 * 112 * @syscap SystemCapability.ArkUI.ArkUI.Full 113 * @crossplatform 114 * @since 10 115 */ 116 /** 117 * The the content is laid vertically 118 * 119 * @syscap SystemCapability.ArkUI.ArkUI.Full 120 * @crossplatform 121 * @atomicservice 122 * @since 11 123 */ 124 VERTICAL = 1, 125 126 /** 127 * The the content is laid horizontally 128 * 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @crossplatform 131 * @since 10 132 */ 133 /** 134 * The the content is laid horizontally 135 * 136 * @syscap SystemCapability.ArkUI.ArkUI.Full 137 * @crossplatform 138 * @atomicservice 139 * @since 11 140 */ 141 HORIZONTAL = 2 142} 143 144 145/** 146 * Provide an interface for the style of an indicator including color, height, width, border radius 147 * and margin top 148 * 149 * @interface IndicatorStyle 150 * @syscap SystemCapability.ArkUI.ArkUI.Full 151 * @crossplatform 152 * @since 10 153 */ 154/** 155 * Provide an interface for the style of an indicator including color, height, width, border radius 156 * and margin top 157 * 158 * @interface IndicatorStyle 159 * @syscap SystemCapability.ArkUI.ArkUI.Full 160 * @crossplatform 161 * @atomicservice 162 * @since 11 163 */ 164interface IndicatorStyle { 165 /** 166 * Define the color of the indicator 167 * 168 * @type { ?ResourceColor } 169 * @syscap SystemCapability.ArkUI.ArkUI.Full 170 * @crossplatform 171 * @since 10 172 */ 173 /** 174 * Define the color of the indicator 175 * 176 * @type { ?ResourceColor } 177 * @syscap SystemCapability.ArkUI.ArkUI.Full 178 * @crossplatform 179 * @atomicservice 180 * @since 11 181 */ 182 color?: ResourceColor; 183 184 /** 185 * Define the height of the indicator 186 * 187 * @type { ?Length } 188 * @syscap SystemCapability.ArkUI.ArkUI.Full 189 * @crossplatform 190 * @since 10 191 */ 192 /** 193 * Define the height of the indicator 194 * 195 * @type { ?Length } 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @crossplatform 198 * @atomicservice 199 * @since 11 200 */ 201 height?: Length; 202 203 /** 204 * Define the width of the indicator. 205 * If it is 0, the width will be equal to the width of the content 206 * 207 * @type { ?Length } 208 * @default 0 209 * @syscap SystemCapability.ArkUI.ArkUI.Full 210 * @crossplatform 211 * @since 10 212 */ 213 /** 214 * Define the width of the indicator. 215 * If it is 0, the width will be equal to the width of the content 216 * 217 * @type { ?Length } 218 * @default 0 219 * @syscap SystemCapability.ArkUI.ArkUI.Full 220 * @crossplatform 221 * @atomicservice 222 * @since 11 223 */ 224 width?: Length; 225 226 /** 227 * Define the border radius of the indicator 228 * 229 * @type { ?Length } 230 * @default 0 231 * @syscap SystemCapability.ArkUI.ArkUI.Full 232 * @crossplatform 233 * @since 10 234 */ 235 /** 236 * Define the border radius of the indicator 237 * 238 * @type { ?Length } 239 * @default 0 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @crossplatform 242 * @atomicservice 243 * @since 11 244 */ 245 borderRadius?: Length; 246 247 /** 248 * Define the margin top of the indicator 249 * 250 * @type { ?Length } 251 * @default 8 252 * @syscap SystemCapability.ArkUI.ArkUI.Full 253 * @crossplatform 254 * @since 10 255 */ 256 /** 257 * Define the margin top of the indicator 258 * 259 * @type { ?Length } 260 * @default 8 261 * @syscap SystemCapability.ArkUI.ArkUI.Full 262 * @crossplatform 263 * @atomicservice 264 * @since 11 265 */ 266 marginTop?: Length; 267} 268 269/** 270 * Provide an interface for the style of an indicator including border radius 271 * 272 * @interface BoardStyle 273 * @syscap SystemCapability.ArkUI.ArkUI.Full 274 * @crossplatform 275 * @since 10 276 */ 277/** 278 * Provide an interface for the style of an indicator including border radius 279 * 280 * @interface BoardStyle 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @atomicservice 284 * @since 11 285 */ 286interface BoardStyle { 287 /** 288 * Define the border radius of the board 289 * 290 * @type { ?Length } 291 * @syscap SystemCapability.ArkUI.ArkUI.Full 292 * @crossplatform 293 * @since 10 294 */ 295 /** 296 * Define the border radius of the board 297 * 298 * @type { ?Length } 299 * @syscap SystemCapability.ArkUI.ArkUI.Full 300 * @crossplatform 301 * @atomicservice 302 * @since 11 303 */ 304 borderRadius?: Length; 305} 306 307/** 308 * LabelStyle object. 309 * 310 * @interface LabelStyle 311 * @syscap SystemCapability.ArkUI.ArkUI.Full 312 * @crossplatform 313 * @since 10 314 */ 315/** 316 * LabelStyle object. 317 * 318 * @interface LabelStyle 319 * @syscap SystemCapability.ArkUI.ArkUI.Full 320 * @crossplatform 321 * @atomicservice 322 * @since 11 323 */ 324declare interface LabelStyle { 325 /** 326 * overflow mode. 327 * 328 * @type { ?TextOverflow } 329 * @syscap SystemCapability.ArkUI.ArkUI.Full 330 * @crossplatform 331 * @since 10 332 */ 333 /** 334 * overflow mode. 335 * 336 * @type { ?TextOverflow } 337 * @syscap SystemCapability.ArkUI.ArkUI.Full 338 * @crossplatform 339 * @atomicservice 340 * @since 11 341 */ 342 overflow?: TextOverflow; 343 344 /** 345 * Label max lines. 346 * 347 * @type { ?number } 348 * @syscap SystemCapability.ArkUI.ArkUI.Full 349 * @crossplatform 350 * @since 10 351 */ 352 /** 353 * Label max lines. 354 * 355 * @type { ?number } 356 * @syscap SystemCapability.ArkUI.ArkUI.Full 357 * @crossplatform 358 * @atomicservice 359 * @since 11 360 */ 361 maxLines?: number; 362 363 /** 364 * Min font size for adapted height. 365 * 366 * @type { ?(number | ResourceStr) } 367 * @syscap SystemCapability.ArkUI.ArkUI.Full 368 * @crossplatform 369 * @since 10 370 */ 371 /** 372 * Min font size for adapted height. 373 * 374 * @type { ?(number | ResourceStr) } 375 * @syscap SystemCapability.ArkUI.ArkUI.Full 376 * @crossplatform 377 * @atomicservice 378 * @since 11 379 */ 380 minFontSize?: number | ResourceStr; 381 382 /** 383 * Max font size for adapted height. 384 * 385 * @type { ?(number | ResourceStr) } 386 * @syscap SystemCapability.ArkUI.ArkUI.Full 387 * @crossplatform 388 * @since 10 389 */ 390 /** 391 * Max font size for adapted height. 392 * 393 * @type { ?(number | ResourceStr) } 394 * @syscap SystemCapability.ArkUI.ArkUI.Full 395 * @crossplatform 396 * @atomicservice 397 * @since 11 398 */ 399 maxFontSize?: number | ResourceStr; 400 401 /** 402 * Adapt text height option. 403 * 404 * @type { ?TextHeightAdaptivePolicy } 405 * @syscap SystemCapability.ArkUI.ArkUI.Full 406 * @crossplatform 407 * @since 10 408 */ 409 /** 410 * Adapt text height option. 411 * 412 * @type { ?TextHeightAdaptivePolicy } 413 * @syscap SystemCapability.ArkUI.ArkUI.Full 414 * @crossplatform 415 * @atomicservice 416 * @since 11 417 */ 418 heightAdaptivePolicy?: TextHeightAdaptivePolicy; 419 420 /** 421 * Font style. 422 * 423 * @type { ?Font } 424 * @syscap SystemCapability.ArkUI.ArkUI.Full 425 * @crossplatform 426 * @since 10 427 */ 428 /** 429 * Font style. 430 * 431 * @type { ?Font } 432 * @syscap SystemCapability.ArkUI.ArkUI.Full 433 * @crossplatform 434 * @atomicservice 435 * @since 11 436 */ 437 font?: Font; 438 439 /** 440 * The text color of the selected tab bar. 441 * 442 * @type { ?ResourceColor } 443 * @syscap SystemCapability.ArkUI.ArkUI.Full 444 * @crossplatform 445 * @atomicservice 446 * @since 12 447 */ 448 selectedColor?: ResourceColor; 449 450 /** 451 * The text color of the unselected tab bar. 452 * 453 * @type { ?ResourceColor } 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @crossplatform 456 * @atomicservice 457 * @since 12 458 */ 459 unselectedColor?: ResourceColor; 460} 461 462/** 463 * TabBarIconStyle object. 464 * 465 * @interface TabBarIconStyle 466 * @syscap SystemCapability.ArkUI.ArkUI.Full 467 * @crossplatform 468 * @atomicservice 469 * @since 12 470 */ 471declare interface TabBarIconStyle { 472 /** 473 * The icon color of the selected tab bar. 474 * 475 * @type { ?ResourceColor } 476 * @syscap SystemCapability.ArkUI.ArkUI.Full 477 * @crossplatform 478 * @atomicservice 479 * @since 12 480 */ 481 selectedColor?: ResourceColor; 482 483 /** 484 * The icon color of the unselected tab bar. 485 * 486 * @type { ?ResourceColor } 487 * @syscap SystemCapability.ArkUI.ArkUI.Full 488 * @crossplatform 489 * @atomicservice 490 * @since 12 491 */ 492 unselectedColor?: ResourceColor; 493} 494 495/** 496 * TabBarSymbol object. 497 * 498 * @syscap SystemCapability.ArkUI.ArkUI.Full 499 * @atomicservice 500 * @since 12 501 */ 502declare class TabBarSymbol { 503 /** 504 * The properties of the symbol icon in the tab bar need to be unselected. 505 * 506 * @type { SymbolGlyphModifier } 507 * @syscap SystemCapability.ArkUI.ArkUI.Full 508 * @atomicservice 509 * @since 12 510 */ 511 normal: SymbolGlyphModifier; 512 513 /** 514 * The properties of the symbol icon in the tab bar need to be selected. 515 * 516 * @type { ?SymbolGlyphModifier } 517 * @syscap SystemCapability.ArkUI.ArkUI.Full 518 * @atomicservice 519 * @since 12 520 */ 521 selected?: SymbolGlyphModifier; 522} 523/** 524 * Define SubTabBarStyle, the style is text and underline. 525 * 526 * @syscap SystemCapability.ArkUI.ArkUI.Full 527 * @since 9 528 */ 529/** 530 * Define SubTabBarStyle, the style is text and underline. 531 * 532 * @syscap SystemCapability.ArkUI.ArkUI.Full 533 * @crossplatform 534 * @since 10 535 */ 536/** 537 * Define SubTabBarStyle, the style is text and underline. 538 * 539 * @syscap SystemCapability.ArkUI.ArkUI.Full 540 * @crossplatform 541 * @atomicservice 542 * @since 11 543 */ 544declare class SubTabBarStyle { 545 /** 546 * constructor. 547 * 548 * @param { ResourceStr } content - indicates the content of the sub tab bar 549 * @syscap SystemCapability.ArkUI.ArkUI.Full 550 * @since 9 551 */ 552 /** 553 * constructor. 554 * 555 * @param { ResourceStr } content - indicates the content of the sub tab bar 556 * @syscap SystemCapability.ArkUI.ArkUI.Full 557 * @crossplatform 558 * @since 10 559 */ 560 /** 561 * constructor. 562 * 563 * @param { ResourceStr } content - indicates the content of the sub tab bar 564 * @syscap SystemCapability.ArkUI.ArkUI.Full 565 * @crossplatform 566 * @atomicservice 567 * @since 11 568 */ 569 constructor(content: ResourceStr); 570 /** 571 * constructor. 572 * 573 * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @crossplatform 576 * @atomicservice 577 * @since 12 578 */ 579 constructor(content: ResourceStr | ComponentContent); 580 581 /** 582 * constructor 583 * 584 * @param { ResourceStr } content - indicates the content of the sub tab bar 585 * @returns { SubTabBarStyle } the style of the sub tab bar 586 * @static 587 * @syscap SystemCapability.ArkUI.ArkUI.Full 588 * @crossplatform 589 * @since 10 590 */ 591 /** 592 * constructor 593 * 594 * @param { ResourceStr } content - indicates the content of the sub tab bar 595 * @returns { SubTabBarStyle } the style of the sub tab bar 596 * @static 597 * @syscap SystemCapability.ArkUI.ArkUI.Full 598 * @crossplatform 599 * @atomicservice 600 * @since 11 601 */ 602 static of(content: ResourceStr): SubTabBarStyle; 603 /** 604 * Create a content object of the sub tab bar 605 * 606 * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar 607 * @returns { SubTabBarStyle } the style of the sub tab bar 608 * @static 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @crossplatform 611 * @atomicservice 612 * @since 12 613 */ 614 static of(content: ResourceStr | ComponentContent): SubTabBarStyle; 615 616 /** 617 * Set the style of the indicator when selected 618 * 619 * @param { IndicatorStyle } value - indicates the indicator style of the sub tab bar 620 * @returns { SubTabBarStyle } the style of the sub tab bar 621 * @syscap SystemCapability.ArkUI.ArkUI.Full 622 * @crossplatform 623 * @since 10 624 */ 625 /** 626 * Set the style of the indicator when selected 627 * 628 * @param { IndicatorStyle } value - indicates the indicator style of the sub tab bar 629 * @returns { SubTabBarStyle } the style of the sub tab bar 630 * @syscap SystemCapability.ArkUI.ArkUI.Full 631 * @crossplatform 632 * @atomicservice 633 * @since 11 634 */ 635 indicator(value: IndicatorStyle): SubTabBarStyle; 636 637 /** 638 * Set the mode of the indicator when selected 639 * 640 * @param { SelectedMode } value - indicates the selected mode of the sub tab bar 641 * @returns { SubTabBarStyle } the style of the sub tab bar 642 * @syscap SystemCapability.ArkUI.ArkUI.Full 643 * @crossplatform 644 * @since 10 645 */ 646 /** 647 * Set the mode of the indicator when selected 648 * 649 * @param { SelectedMode } value - indicates the selected mode of the sub tab bar 650 * @returns { SubTabBarStyle } the style of the sub tab bar 651 * @syscap SystemCapability.ArkUI.ArkUI.Full 652 * @crossplatform 653 * @atomicservice 654 * @since 11 655 */ 656 selectedMode(value: SelectedMode): SubTabBarStyle; 657 658 /** 659 * Set the style of the board when selected 660 * 661 * @param { BoardStyle } value - indicates the board style of the sub tab bar 662 * @returns { SubTabBarStyle } the style of the sub tab bar 663 * @syscap SystemCapability.ArkUI.ArkUI.Full 664 * @crossplatform 665 * @since 10 666 */ 667 /** 668 * Set the style of the board when selected 669 * 670 * @param { BoardStyle } value - indicates the board style of the sub tab bar 671 * @returns { SubTabBarStyle } the style of the sub tab bar 672 * @syscap SystemCapability.ArkUI.ArkUI.Full 673 * @crossplatform 674 * @atomicservice 675 * @since 11 676 */ 677 board(value: BoardStyle): SubTabBarStyle; 678 679 /** 680 * Set the label style of the indicator 681 * 682 * @param { LabelStyle } value - indicates the label style of the sub tab bar 683 * @returns { SubTabBarStyle } the style of the sub tab bar 684 * @syscap SystemCapability.ArkUI.ArkUI.Full 685 * @crossplatform 686 * @since 10 687 */ 688 /** 689 * Set the label style of the indicator 690 * 691 * @param { LabelStyle } value - indicates the label style of the sub tab bar 692 * @returns { SubTabBarStyle } the style of the sub tab bar 693 * @syscap SystemCapability.ArkUI.ArkUI.Full 694 * @crossplatform 695 * @atomicservice 696 * @since 11 697 */ 698 labelStyle(value: LabelStyle): SubTabBarStyle; 699 700 /** 701 * Set the padding of the sub tab bar 702 * 703 * @param { Padding | Dimension } value - indicates the padding of the sub tab bar 704 * @returns { SubTabBarStyle } the style of the sub tab bar 705 * @syscap SystemCapability.ArkUI.ArkUI.Full 706 * @crossplatform 707 * @since 10 708 */ 709 /** 710 * Set the padding of the sub tab bar 711 * 712 * @param { Padding | Dimension } value - indicates the padding of the sub tab bar 713 * @returns { SubTabBarStyle } the style of the sub tab bar 714 * @syscap SystemCapability.ArkUI.ArkUI.Full 715 * @crossplatform 716 * @atomicservice 717 * @since 11 718 */ 719 padding(value: Padding | Dimension): SubTabBarStyle; 720 721 /** 722 * Set the padding of the sub tab bar 723 * 724 * @param { LocalizedPadding } padding - indicates the padding of the sub tab bar 725 * @returns { SubTabBarStyle } the style of the sub tab bar 726 * @syscap SystemCapability.ArkUI.ArkUI.Full 727 * @crossplatform 728 * @atomicservice 729 * @since 12 730 */ 731 padding(padding: LocalizedPadding): SubTabBarStyle; 732 733 /** 734 * Set an id to the sub tab bar to identify it 735 * 736 * @param { string } value - id of the sub tab bar to identify it 737 * @returns { SubTabBarStyle } the style of the sub tab bar 738 * @syscap SystemCapability.ArkUI.ArkUI.Full 739 * @crossplatform 740 * @since 11 741 */ 742 /** 743 * Set an id to the sub tab bar to identify it 744 * 745 * @param { string } value - id of the sub tab bar to identify it 746 * @returns { SubTabBarStyle } the style of the sub tab bar 747 * @syscap SystemCapability.ArkUI.ArkUI.Full 748 * @crossplatform 749 * @atomicservice 750 * @since 12 751 */ 752 id(value: string): SubTabBarStyle; 753} 754 755/** 756 * Define BottomTabBarStyle, the style is icon and text. 757 * 758 * @syscap SystemCapability.ArkUI.ArkUI.Full 759 * @since 9 760 */ 761/** 762 * Define BottomTabBarStyle, the style is icon and text. 763 * 764 * @syscap SystemCapability.ArkUI.ArkUI.Full 765 * @crossplatform 766 * @since 10 767 */ 768/** 769 * Define BottomTabBarStyle, the style is icon and text. 770 * 771 * @syscap SystemCapability.ArkUI.ArkUI.Full 772 * @crossplatform 773 * @atomicservice 774 * @since 11 775 */ 776declare class BottomTabBarStyle { 777 /** 778 * constructor. 779 * 780 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 781 * @param { ResourceStr } text - indicates the text of the bottom tab bar 782 * @syscap SystemCapability.ArkUI.ArkUI.Full 783 * @since 9 784 */ 785 /** 786 * constructor. 787 * 788 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 789 * @param { ResourceStr } text - indicates the text of the bottom tab bar 790 * @syscap SystemCapability.ArkUI.ArkUI.Full 791 * @crossplatform 792 * @since 10 793 */ 794 /** 795 * constructor. 796 * 797 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 798 * @param { ResourceStr } text - indicates the text of the bottom tab bar 799 * @syscap SystemCapability.ArkUI.ArkUI.Full 800 * @crossplatform 801 * @atomicservice 802 * @since 11 803 */ 804 /** 805 * constructor. 806 * 807 * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar 808 * @param { ResourceStr } text - indicates the text of the bottom tab bar 809 * @syscap SystemCapability.ArkUI.ArkUI.Full 810 * @crossplatform 811 * @atomicservice 812 * @since 12 813 */ 814 constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); 815 816 /** 817 * of. 818 * 819 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 820 * @param { ResourceStr } text - indicates the text of the bottom tab bar 821 * @returns { BottomTabBarStyle } the style of the bottom tab bar 822 * @static 823 * @syscap SystemCapability.ArkUI.ArkUI.Full 824 * @crossplatform 825 * @since 10 826 */ 827 /** 828 * of. 829 * 830 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 831 * @param { ResourceStr } text - indicates the text of the bottom tab bar 832 * @returns { BottomTabBarStyle } the style of the bottom tab bar 833 * @static 834 * @syscap SystemCapability.ArkUI.ArkUI.Full 835 * @crossplatform 836 * @atomicservice 837 * @since 11 838 */ 839 /** 840 * of. 841 * 842 * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar 843 * @param { ResourceStr } text - indicates the text of the bottom tab bar 844 * @returns { BottomTabBarStyle } the style of the bottom tab bar 845 * @static 846 * @syscap SystemCapability.ArkUI.ArkUI.Full 847 * @crossplatform 848 * @atomicservice 849 * @since 12 850 */ 851 static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; 852 853 /** 854 * Set the label style of the indicator 855 * 856 * @param { LabelStyle } value - indicates the label style of the bottom tab bar 857 * @returns { BottomTabBarStyle } the style of the bottom tab bar 858 * @syscap SystemCapability.ArkUI.ArkUI.Full 859 * @crossplatform 860 * @since 10 861 */ 862 /** 863 * Set the label style of the indicator 864 * 865 * @param { LabelStyle } value - indicates the label style of the bottom tab bar 866 * @returns { BottomTabBarStyle } the style of the bottom tab bar 867 * @syscap SystemCapability.ArkUI.ArkUI.Full 868 * @crossplatform 869 * @atomicservice 870 * @since 11 871 */ 872 labelStyle(value: LabelStyle): BottomTabBarStyle; 873 874 /** 875 * Set the padding of the bottom tab bar 876 * 877 * @param { Padding | Dimension } value - indicates the padding of the bottom tab bar 878 * @returns { BottomTabBarStyle } the style of the bottom tab bar 879 * @syscap SystemCapability.ArkUI.ArkUI.Full 880 * @crossplatform 881 * @since 10 882 */ 883 /** 884 * Set the padding of the bottom tab bar 885 * 886 * @param { Padding | Dimension } value - indicates the padding of the bottom tab bar 887 * @returns { BottomTabBarStyle } the style of the bottom tab bar 888 * @syscap SystemCapability.ArkUI.ArkUI.Full 889 * @crossplatform 890 * @atomicservice 891 * @since 11 892 */ 893 /** 894 * Set the padding of the bottom tab bar 895 * 896 * @param { Padding | Dimension | LocalizedPadding } value - indicates the padding of the bottom tab bar 897 * @returns { BottomTabBarStyle } the style of the bottom tab bar 898 * @syscap SystemCapability.ArkUI.ArkUI.Full 899 * @crossplatform 900 * @atomicservice 901 * @since 12 902 */ 903 padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; 904 905 /** 906 * Set the layout mode of the bottom tab bar 907 * 908 * @param { LayoutMode } value - indicates the layout mode of the bottom tab bar 909 * @returns { BottomTabBarStyle } the style of the bottom tab bar 910 * @syscap SystemCapability.ArkUI.ArkUI.Full 911 * @crossplatform 912 * @since 10 913 */ 914 /** 915 * Set the layout mode of the bottom tab bar 916 * 917 * @param { LayoutMode } value - indicates the layout mode of the bottom tab bar 918 * @returns { BottomTabBarStyle } the style of the bottom tab bar 919 * @syscap SystemCapability.ArkUI.ArkUI.Full 920 * @crossplatform 921 * @atomicservice 922 * @since 11 923 */ 924 layoutMode(value: LayoutMode): BottomTabBarStyle; 925 926 /** 927 * Set the vertical alignment style of the bottom tab bar 928 * 929 * @param { VerticalAlign } value - indicates the vertical alignment of the bottom tab bar 930 * @returns { BottomTabBarStyle } the style of the bottom tab bar 931 * @syscap SystemCapability.ArkUI.ArkUI.Full 932 * @crossplatform 933 * @since 10 934 */ 935 /** 936 * Set the vertical alignment style of the bottom tab bar 937 * 938 * @param { VerticalAlign } value - indicates the vertical alignment of the bottom tab bar 939 * @returns { BottomTabBarStyle } the style of the bottom tab bar 940 * @syscap SystemCapability.ArkUI.ArkUI.Full 941 * @crossplatform 942 * @atomicservice 943 * @since 11 944 */ 945 verticalAlign(value: VerticalAlign): BottomTabBarStyle; 946 947 /** 948 * Set the symmetric extensible of the bottom tab bar 949 * 950 * @param { boolean } value - indicates whether the bottom tab bar is extensible 951 * @returns { BottomTabBarStyle } the style of the bottom tab bar 952 * @syscap SystemCapability.ArkUI.ArkUI.Full 953 * @crossplatform 954 * @since 10 955 */ 956 /** 957 * Set the symmetric extensible of the bottom tab bar 958 * 959 * @param { boolean } value - indicates whether the bottom tab bar is extensible 960 * @returns { BottomTabBarStyle } the style of the bottom tab bar 961 * @syscap SystemCapability.ArkUI.ArkUI.Full 962 * @crossplatform 963 * @atomicservice 964 * @since 11 965 */ 966 symmetricExtensible(value: boolean): BottomTabBarStyle; 967 968 /** 969 * Set an id to the bottom tab bar to identify it 970 * 971 * @param { string } value - id of the bottom tab bar to identify it 972 * @returns { BottomTabBarStyle } the style of the bottom tab bar 973 * @syscap SystemCapability.ArkUI.ArkUI.Full 974 * @crossplatform 975 * @since 11 976 */ 977 /** 978 * Set an id to the bottom tab bar to identify it 979 * 980 * @param { string } value - id of the bottom tab bar to identify it 981 * @returns { BottomTabBarStyle } the style of the bottom tab bar 982 * @syscap SystemCapability.ArkUI.ArkUI.Full 983 * @crossplatform 984 * @atomicservice 985 * @since 12 986 */ 987 id(value: string): BottomTabBarStyle; 988 989 /** 990 * Set the icon style of the bottom tab bar 991 * 992 * @param { TabBarIconStyle } style - indicates the icon style of the bottom tab bar 993 * @returns { BottomTabBarStyle } the style of the bottom tab bar 994 * @syscap SystemCapability.ArkUI.ArkUI.Full 995 * @crossplatform 996 * @atomicservice 997 * @since 12 998 */ 999 iconStyle(style: TabBarIconStyle): BottomTabBarStyle; 1000} 1001 1002/** 1003 * Provides an interface for switching the content view on a tab page. 1004 * 1005 * @interface TabContentInterface 1006 * @syscap SystemCapability.ArkUI.ArkUI.Full 1007 * @since 7 1008 */ 1009/** 1010 * Provides an interface for switching the content view on a tab page. 1011 * 1012 * @interface TabContentInterface 1013 * @syscap SystemCapability.ArkUI.ArkUI.Full 1014 * @crossplatform 1015 * @since 10 1016 */ 1017/** 1018 * Provides an interface for switching the content view on a tab page. 1019 * 1020 * @interface TabContentInterface 1021 * @syscap SystemCapability.ArkUI.ArkUI.Full 1022 * @crossplatform 1023 * @atomicservice 1024 * @since 11 1025 */ 1026interface TabContentInterface { 1027 /** 1028 * Called when the content view of the switch tab is set. 1029 * 1030 * @returns { TabContentAttribute } 1031 * @syscap SystemCapability.ArkUI.ArkUI.Full 1032 * @since 7 1033 */ 1034 /** 1035 * Called when the content view of the switch tab is set. 1036 * 1037 * @returns { TabContentAttribute } 1038 * @syscap SystemCapability.ArkUI.ArkUI.Full 1039 * @crossplatform 1040 * @since 10 1041 */ 1042 /** 1043 * Called when the content view of the switch tab is set. 1044 * 1045 * @returns { TabContentAttribute } 1046 * @syscap SystemCapability.ArkUI.ArkUI.Full 1047 * @crossplatform 1048 * @atomicservice 1049 * @since 11 1050 */ 1051 (): TabContentAttribute; 1052} 1053 1054/** 1055 * Defines the attribute functions of TabContent. 1056 * 1057 * @extends CommonMethod<TabContentAttribute> 1058 * @syscap SystemCapability.ArkUI.ArkUI.Full 1059 * @since 7 1060 */ 1061/** 1062 * Defines the attribute functions of TabContent. 1063 * 1064 * @extends CommonMethod<TabContentAttribute> 1065 * @syscap SystemCapability.ArkUI.ArkUI.Full 1066 * @crossplatform 1067 * @since 10 1068 */ 1069/** 1070 * Defines the attribute functions of TabContent. 1071 * 1072 * @extends CommonMethod<TabContentAttribute> 1073 * @syscap SystemCapability.ArkUI.ArkUI.Full 1074 * @crossplatform 1075 * @atomicservice 1076 * @since 11 1077 */ 1078declare class TabContentAttribute extends CommonMethod<TabContentAttribute> { 1079 /** 1080 * Called when tabbar is entered. 1081 * 1082 * @param { string | Resource | { icon?: string | Resource; text?: string | Resource } } value 1083 * @returns { TabContentAttribute } 1084 * @syscap SystemCapability.ArkUI.ArkUI.Full 1085 * @since 7 1086 */ 1087 /** 1088 * Called when tabbar is entered. 1089 * 1090 * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value 1091 * @returns { TabContentAttribute } 1092 * @syscap SystemCapability.ArkUI.ArkUI.Full 1093 * @since 8 1094 */ 1095 /** 1096 * Called when tabbar is entered. 1097 * 1098 * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value 1099 * @returns { TabContentAttribute } 1100 * @syscap SystemCapability.ArkUI.ArkUI.Full 1101 * @crossplatform 1102 * @since 10 1103 */ 1104 /** 1105 * Called when tabbar is entered. 1106 * 1107 * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value 1108 * @returns { TabContentAttribute } 1109 * @syscap SystemCapability.ArkUI.ArkUI.Full 1110 * @crossplatform 1111 * @atomicservice 1112 * @since 11 1113 */ 1114 tabBar(value: string | Resource | CustomBuilder | 1115 { icon?: string | Resource; text?: string | Resource }): TabContentAttribute; 1116 1117 /** 1118 * Called when tabbar is entered. 1119 * 1120 * @param { SubTabBarStyle | BottomTabBarStyle } value 1121 * @returns { TabContentAttribute } 1122 * @syscap SystemCapability.ArkUI.ArkUI.Full 1123 * @since 9 1124 */ 1125 /** 1126 * Called when tabbar is entered. 1127 * 1128 * @param { SubTabBarStyle | BottomTabBarStyle } value 1129 * @returns { TabContentAttribute } 1130 * @syscap SystemCapability.ArkUI.ArkUI.Full 1131 * @crossplatform 1132 * @since 10 1133 */ 1134 /** 1135 * Called when tabbar is entered. 1136 * 1137 * @param { SubTabBarStyle | BottomTabBarStyle } value 1138 * @returns { TabContentAttribute } 1139 * @syscap SystemCapability.ArkUI.ArkUI.Full 1140 * @crossplatform 1141 * @atomicservice 1142 * @since 11 1143 */ 1144 tabBar(value: SubTabBarStyle | BottomTabBarStyle): TabContentAttribute; 1145 1146 /** 1147 * Called when the tab content will show. 1148 * @param { VoidCallback } event 1149 * @returns { TabContentAttribute } 1150 * @syscap SystemCapability.ArkUI.ArkUI.Full 1151 * @crossplatform 1152 * @atomicservice 1153 * @since 12 1154 */ 1155 onWillShow(event: VoidCallback): TabContentAttribute; 1156 1157 /** 1158 * Called when the tab content will hide. 1159 * @param { VoidCallback } event 1160 * @returns { TabContentAttribute } 1161 * @syscap SystemCapability.ArkUI.ArkUI.Full 1162 * @crossplatform 1163 * @atomicservice 1164 * @since 12 1165 */ 1166 onWillHide(event: VoidCallback): TabContentAttribute; 1167} 1168 1169/** 1170 * Defines TabContent Component. 1171 * 1172 * @syscap SystemCapability.ArkUI.ArkUI.Full 1173 * @since 7 1174 */ 1175/** 1176 * Defines TabContent Component. 1177 * 1178 * @syscap SystemCapability.ArkUI.ArkUI.Full 1179 * @crossplatform 1180 * @since 10 1181 */ 1182/** 1183 * Defines TabContent Component. 1184 * 1185 * @syscap SystemCapability.ArkUI.ArkUI.Full 1186 * @crossplatform 1187 * @atomicservice 1188 * @since 11 1189 */ 1190declare const TabContent: TabContentInterface; 1191 1192/** 1193 * Defines TabContent Component instance. 1194 * 1195 * @syscap SystemCapability.ArkUI.ArkUI.Full 1196 * @since 7 1197 */ 1198/** 1199 * Defines TabContent Component instance. 1200 * 1201 * @syscap SystemCapability.ArkUI.ArkUI.Full 1202 * @crossplatform 1203 * @since 10 1204 */ 1205/** 1206 * Defines TabContent Component instance. 1207 * 1208 * @syscap SystemCapability.ArkUI.ArkUI.Full 1209 * @crossplatform 1210 * @atomicservice 1211 * @since 11 1212 */ 1213declare const TabContentInstance: TabContentAttribute; 1214