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/** 525 * Icon and text for TabBar. 526 * 527 * @typedef TabBarOptions 528 * @syscap SystemCapability.ArkUI.ArkUI.Full 529 * @crossplatform 530 * @atomicservice 531 * @since 18 532 */ 533declare interface TabBarOptions { 534 /** 535 * TabBar icon. 536 * 537 * @type { ?(string | Resource) } 538 * @syscap SystemCapability.ArkUI.ArkUI.Full 539 * @since 7 540 */ 541 /** 542 * TabBar icon. 543 * 544 * @type { ?(string | Resource) } 545 * @syscap SystemCapability.ArkUI.ArkUI.Full 546 * @crossplatform 547 * @since 10 548 */ 549 /** 550 * TabBar icon. 551 * 552 * @type { ?(string | Resource) } 553 * @syscap SystemCapability.ArkUI.ArkUI.Full 554 * @crossplatform 555 * @atomicservice 556 * @since 11 557 */ 558 /** 559 * TabBar icon. 560 * Anonymous Object Rectification 561 * 562 * @type { ?(string | Resource) } 563 * @syscap SystemCapability.ArkUI.ArkUI.Full 564 * @crossplatform 565 * @atomicservice 566 * @since 18 567 */ 568 icon?: string | Resource; 569 570 /** 571 * TabBar text. 572 * 573 * @type { ?(string | Resource) } 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @since 7 576 */ 577 /** 578 * TabBar text. 579 * 580 * @type { ?(string | Resource) } 581 * @syscap SystemCapability.ArkUI.ArkUI.Full 582 * @crossplatform 583 * @since 10 584 */ 585 /** 586 * TabBar text. 587 * 588 * @type { ?(string | Resource) } 589 * @syscap SystemCapability.ArkUI.ArkUI.Full 590 * @crossplatform 591 * @atomicservice 592 * @since 11 593 */ 594 /** 595 * TabBar text. 596 * Anonymous Object Rectification 597 * 598 * @type { ?(string | Resource) } 599 * @syscap SystemCapability.ArkUI.ArkUI.Full 600 * @crossplatform 601 * @atomicservice 602 * @since 18 603 */ 604 text?: string | Resource 605} 606 607/** 608 * Define SubTabBarStyle, the style is text and underline. 609 * 610 * @syscap SystemCapability.ArkUI.ArkUI.Full 611 * @since 9 612 */ 613/** 614 * Define SubTabBarStyle, the style is text and underline. 615 * 616 * @syscap SystemCapability.ArkUI.ArkUI.Full 617 * @crossplatform 618 * @since 10 619 */ 620/** 621 * Define SubTabBarStyle, the style is text and underline. 622 * 623 * @syscap SystemCapability.ArkUI.ArkUI.Full 624 * @crossplatform 625 * @atomicservice 626 * @since 11 627 */ 628declare class SubTabBarStyle { 629 /** 630 * constructor. 631 * 632 * @param { ResourceStr } content - indicates the content of the sub tab bar 633 * @syscap SystemCapability.ArkUI.ArkUI.Full 634 * @since 9 635 */ 636 /** 637 * constructor. 638 * 639 * @param { ResourceStr } content - indicates the content of the sub tab bar 640 * @syscap SystemCapability.ArkUI.ArkUI.Full 641 * @crossplatform 642 * @since 10 643 */ 644 /** 645 * constructor. 646 * 647 * @param { ResourceStr } content - indicates the content of the sub tab bar 648 * @syscap SystemCapability.ArkUI.ArkUI.Full 649 * @crossplatform 650 * @atomicservice 651 * @since 11 652 */ 653 constructor(content: ResourceStr); 654 /** 655 * constructor. 656 * 657 * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar 658 * @syscap SystemCapability.ArkUI.ArkUI.Full 659 * @crossplatform 660 * @atomicservice 661 * @since 12 662 */ 663 constructor(content: ResourceStr | ComponentContent); 664 665 /** 666 * constructor 667 * 668 * @param { ResourceStr } content - indicates the content of the sub tab bar 669 * @returns { SubTabBarStyle } the style of the sub tab bar 670 * @static 671 * @syscap SystemCapability.ArkUI.ArkUI.Full 672 * @crossplatform 673 * @since 10 674 */ 675 /** 676 * constructor 677 * 678 * @param { ResourceStr } content - indicates the content of the sub tab bar 679 * @returns { SubTabBarStyle } the style of the sub tab bar 680 * @static 681 * @syscap SystemCapability.ArkUI.ArkUI.Full 682 * @crossplatform 683 * @atomicservice 684 * @since 11 685 */ 686 static of(content: ResourceStr): SubTabBarStyle; 687 /** 688 * Create a content object of the sub tab bar 689 * 690 * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar 691 * @returns { SubTabBarStyle } the style of the sub tab bar 692 * @static 693 * @syscap SystemCapability.ArkUI.ArkUI.Full 694 * @crossplatform 695 * @atomicservice 696 * @since 12 697 */ 698 static of(content: ResourceStr | ComponentContent): SubTabBarStyle; 699 700 /** 701 * Set the style of the indicator when selected 702 * 703 * @param { IndicatorStyle } value - indicates the indicator style 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 style of the indicator when selected 711 * 712 * @param { IndicatorStyle } value - indicates the indicator style 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 indicator(value: IndicatorStyle): SubTabBarStyle; 720 721 /** 722 * Set the mode of the indicator when selected 723 * 724 * @param { SelectedMode } value - indicates the selected mode of the sub tab bar 725 * @returns { SubTabBarStyle } the style of the sub tab bar 726 * @syscap SystemCapability.ArkUI.ArkUI.Full 727 * @crossplatform 728 * @since 10 729 */ 730 /** 731 * Set the mode of the indicator when selected 732 * 733 * @param { SelectedMode } value - indicates the selected mode of the sub tab bar 734 * @returns { SubTabBarStyle } the style of the sub tab bar 735 * @syscap SystemCapability.ArkUI.ArkUI.Full 736 * @crossplatform 737 * @atomicservice 738 * @since 11 739 */ 740 selectedMode(value: SelectedMode): SubTabBarStyle; 741 742 /** 743 * Set the style of the board when selected 744 * 745 * @param { BoardStyle } value - indicates the board style of the sub tab bar 746 * @returns { SubTabBarStyle } the style of the sub tab bar 747 * @syscap SystemCapability.ArkUI.ArkUI.Full 748 * @crossplatform 749 * @since 10 750 */ 751 /** 752 * Set the style of the board when selected 753 * 754 * @param { BoardStyle } value - indicates the board style of the sub tab bar 755 * @returns { SubTabBarStyle } the style of the sub tab bar 756 * @syscap SystemCapability.ArkUI.ArkUI.Full 757 * @crossplatform 758 * @atomicservice 759 * @since 11 760 */ 761 board(value: BoardStyle): SubTabBarStyle; 762 763 /** 764 * Set the label style of the indicator 765 * 766 * @param { LabelStyle } value - indicates the label style of the sub tab bar 767 * @returns { SubTabBarStyle } the style of the sub tab bar 768 * @syscap SystemCapability.ArkUI.ArkUI.Full 769 * @crossplatform 770 * @since 10 771 */ 772 /** 773 * Set the label style of the indicator 774 * 775 * @param { LabelStyle } value - indicates the label style of the sub tab bar 776 * @returns { SubTabBarStyle } the style of the sub tab bar 777 * @syscap SystemCapability.ArkUI.ArkUI.Full 778 * @crossplatform 779 * @atomicservice 780 * @since 11 781 */ 782 labelStyle(value: LabelStyle): SubTabBarStyle; 783 784 /** 785 * Set the padding of the sub tab bar 786 * 787 * @param { Padding | Dimension } value - indicates the padding of the sub tab bar 788 * @returns { SubTabBarStyle } the style of the sub tab bar 789 * @syscap SystemCapability.ArkUI.ArkUI.Full 790 * @crossplatform 791 * @since 10 792 */ 793 /** 794 * Set the padding of the sub tab bar 795 * 796 * @param { Padding | Dimension } value - indicates the padding of the sub tab bar 797 * @returns { SubTabBarStyle } the style of the sub tab bar 798 * @syscap SystemCapability.ArkUI.ArkUI.Full 799 * @crossplatform 800 * @atomicservice 801 * @since 11 802 */ 803 padding(value: Padding | Dimension): SubTabBarStyle; 804 805 /** 806 * Set the padding of the sub tab bar 807 * 808 * @param { LocalizedPadding } padding - indicates the padding of the sub tab bar 809 * @returns { SubTabBarStyle } the style of the sub tab bar 810 * @syscap SystemCapability.ArkUI.ArkUI.Full 811 * @crossplatform 812 * @atomicservice 813 * @since 12 814 */ 815 padding(padding: LocalizedPadding): SubTabBarStyle; 816 817 /** 818 * Set an id to the sub tab bar to identify it 819 * 820 * @param { string } value - id of the sub tab bar to identify it 821 * @returns { SubTabBarStyle } the style of the sub tab bar 822 * @syscap SystemCapability.ArkUI.ArkUI.Full 823 * @crossplatform 824 * @since 11 825 */ 826 /** 827 * Set an id to the sub tab bar to identify it 828 * 829 * @param { string } value - id of the sub tab bar to identify it 830 * @returns { SubTabBarStyle } the style of the sub tab bar 831 * @syscap SystemCapability.ArkUI.ArkUI.Full 832 * @crossplatform 833 * @atomicservice 834 * @since 12 835 */ 836 id(value: string): SubTabBarStyle; 837} 838 839/** 840 * Define BottomTabBarStyle, the style is icon and text. 841 * 842 * @syscap SystemCapability.ArkUI.ArkUI.Full 843 * @since 9 844 */ 845/** 846 * Define BottomTabBarStyle, the style is icon and text. 847 * 848 * @syscap SystemCapability.ArkUI.ArkUI.Full 849 * @crossplatform 850 * @since 10 851 */ 852/** 853 * Define BottomTabBarStyle, the style is icon and text. 854 * 855 * @syscap SystemCapability.ArkUI.ArkUI.Full 856 * @crossplatform 857 * @atomicservice 858 * @since 11 859 */ 860declare class BottomTabBarStyle { 861 /** 862 * constructor. 863 * 864 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 865 * @param { ResourceStr } text - indicates the text of the bottom tab bar 866 * @syscap SystemCapability.ArkUI.ArkUI.Full 867 * @since 9 868 */ 869 /** 870 * constructor. 871 * 872 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 873 * @param { ResourceStr } text - indicates the text of the bottom tab bar 874 * @syscap SystemCapability.ArkUI.ArkUI.Full 875 * @crossplatform 876 * @since 10 877 */ 878 /** 879 * constructor. 880 * 881 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 882 * @param { ResourceStr } text - indicates the text of the bottom tab bar 883 * @syscap SystemCapability.ArkUI.ArkUI.Full 884 * @crossplatform 885 * @atomicservice 886 * @since 11 887 */ 888 /** 889 * constructor. 890 * 891 * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar 892 * @param { ResourceStr } text - indicates the text of the bottom tab bar 893 * @syscap SystemCapability.ArkUI.ArkUI.Full 894 * @crossplatform 895 * @atomicservice 896 * @since 12 897 */ 898 constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); 899 900 /** 901 * of. 902 * 903 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 904 * @param { ResourceStr } text - indicates the text of the bottom tab bar 905 * @returns { BottomTabBarStyle } the style of the bottom tab bar 906 * @static 907 * @syscap SystemCapability.ArkUI.ArkUI.Full 908 * @crossplatform 909 * @since 10 910 */ 911 /** 912 * of. 913 * 914 * @param { ResourceStr } icon - indicates the icon of the bottom tab bar 915 * @param { ResourceStr } text - indicates the text of the bottom tab bar 916 * @returns { BottomTabBarStyle } the style of the bottom tab bar 917 * @static 918 * @syscap SystemCapability.ArkUI.ArkUI.Full 919 * @crossplatform 920 * @atomicservice 921 * @since 11 922 */ 923 /** 924 * of. 925 * 926 * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar 927 * @param { ResourceStr } text - indicates the text of the bottom tab bar 928 * @returns { BottomTabBarStyle } the style of the bottom tab bar 929 * @static 930 * @syscap SystemCapability.ArkUI.ArkUI.Full 931 * @crossplatform 932 * @atomicservice 933 * @since 12 934 */ 935 static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; 936 937 /** 938 * Set the label style of the indicator 939 * 940 * @param { LabelStyle } value - indicates the label style of the bottom tab bar 941 * @returns { BottomTabBarStyle } the style of the bottom tab bar 942 * @syscap SystemCapability.ArkUI.ArkUI.Full 943 * @crossplatform 944 * @since 10 945 */ 946 /** 947 * Set the label style of the indicator 948 * 949 * @param { LabelStyle } value - indicates the label style of the bottom tab bar 950 * @returns { BottomTabBarStyle } the style of the bottom tab bar 951 * @syscap SystemCapability.ArkUI.ArkUI.Full 952 * @crossplatform 953 * @atomicservice 954 * @since 11 955 */ 956 labelStyle(value: LabelStyle): BottomTabBarStyle; 957 958 /** 959 * Set the padding of the bottom tab bar 960 * 961 * @param { Padding | Dimension } value - indicates the padding of the bottom tab bar 962 * @returns { BottomTabBarStyle } the style of the bottom tab bar 963 * @syscap SystemCapability.ArkUI.ArkUI.Full 964 * @crossplatform 965 * @since 10 966 */ 967 /** 968 * Set the padding of the bottom tab bar 969 * 970 * @param { Padding | Dimension } value - indicates the padding of the bottom tab bar 971 * @returns { BottomTabBarStyle } the style of the bottom tab bar 972 * @syscap SystemCapability.ArkUI.ArkUI.Full 973 * @crossplatform 974 * @atomicservice 975 * @since 11 976 */ 977 /** 978 * Set the padding of the bottom tab bar 979 * 980 * @param { Padding | Dimension | LocalizedPadding } value - indicates the padding of the bottom tab bar 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 padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; 988 989 /** 990 * Set the layout mode of the bottom tab bar 991 * 992 * @param { LayoutMode } value - indicates the layout mode of the bottom tab bar 993 * @returns { BottomTabBarStyle } the style of the bottom tab bar 994 * @syscap SystemCapability.ArkUI.ArkUI.Full 995 * @crossplatform 996 * @since 10 997 */ 998 /** 999 * Set the layout mode of the bottom tab bar 1000 * 1001 * @param { LayoutMode } value - indicates the layout mode of the bottom tab bar 1002 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1003 * @syscap SystemCapability.ArkUI.ArkUI.Full 1004 * @crossplatform 1005 * @atomicservice 1006 * @since 11 1007 */ 1008 layoutMode(value: LayoutMode): BottomTabBarStyle; 1009 1010 /** 1011 * Set the vertical alignment style of the bottom tab bar 1012 * 1013 * @param { VerticalAlign } value - indicates the vertical alignment of the bottom tab bar 1014 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1015 * @syscap SystemCapability.ArkUI.ArkUI.Full 1016 * @crossplatform 1017 * @since 10 1018 */ 1019 /** 1020 * Set the vertical alignment style of the bottom tab bar 1021 * 1022 * @param { VerticalAlign } value - indicates the vertical alignment of the bottom tab bar 1023 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1024 * @syscap SystemCapability.ArkUI.ArkUI.Full 1025 * @crossplatform 1026 * @atomicservice 1027 * @since 11 1028 */ 1029 verticalAlign(value: VerticalAlign): BottomTabBarStyle; 1030 1031 /** 1032 * Set the symmetric extensible of the bottom tab bar 1033 * 1034 * @param { boolean } value - indicates whether the bottom tab bar is extensible 1035 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1036 * @syscap SystemCapability.ArkUI.ArkUI.Full 1037 * @crossplatform 1038 * @since 10 1039 */ 1040 /** 1041 * Set the symmetric extensible of the bottom tab bar 1042 * 1043 * @param { boolean } value - indicates whether the bottom tab bar is extensible 1044 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1045 * @syscap SystemCapability.ArkUI.ArkUI.Full 1046 * @crossplatform 1047 * @atomicservice 1048 * @since 11 1049 */ 1050 symmetricExtensible(value: boolean): BottomTabBarStyle; 1051 1052 /** 1053 * Set an id to the bottom tab bar to identify it 1054 * 1055 * @param { string } value - id of the bottom tab bar to identify it 1056 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1057 * @syscap SystemCapability.ArkUI.ArkUI.Full 1058 * @crossplatform 1059 * @since 11 1060 */ 1061 /** 1062 * Set an id to the bottom tab bar to identify it 1063 * 1064 * @param { string } value - id of the bottom tab bar to identify it 1065 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1066 * @syscap SystemCapability.ArkUI.ArkUI.Full 1067 * @crossplatform 1068 * @atomicservice 1069 * @since 12 1070 */ 1071 id(value: string): BottomTabBarStyle; 1072 1073 /** 1074 * Set the icon style of the bottom tab bar 1075 * 1076 * @param { TabBarIconStyle } style - indicates the icon style of the bottom tab bar 1077 * @returns { BottomTabBarStyle } the style of the bottom tab bar 1078 * @syscap SystemCapability.ArkUI.ArkUI.Full 1079 * @crossplatform 1080 * @atomicservice 1081 * @since 12 1082 */ 1083 iconStyle(style: TabBarIconStyle): BottomTabBarStyle; 1084} 1085 1086/** 1087 * Provides an interface for switching the content view on a tab page. 1088 * 1089 * @interface TabContentInterface 1090 * @syscap SystemCapability.ArkUI.ArkUI.Full 1091 * @since 7 1092 */ 1093/** 1094 * Provides an interface for switching the content view on a tab page. 1095 * 1096 * @interface TabContentInterface 1097 * @syscap SystemCapability.ArkUI.ArkUI.Full 1098 * @crossplatform 1099 * @since 10 1100 */ 1101/** 1102 * Provides an interface for switching the content view on a tab page. 1103 * 1104 * @interface TabContentInterface 1105 * @syscap SystemCapability.ArkUI.ArkUI.Full 1106 * @crossplatform 1107 * @atomicservice 1108 * @since 11 1109 */ 1110interface TabContentInterface { 1111 /** 1112 * Called when the content view of the switch tab is set. 1113 * 1114 * @returns { TabContentAttribute } 1115 * @syscap SystemCapability.ArkUI.ArkUI.Full 1116 * @since 7 1117 */ 1118 /** 1119 * Called when the content view of the switch tab is set. 1120 * 1121 * @returns { TabContentAttribute } 1122 * @syscap SystemCapability.ArkUI.ArkUI.Full 1123 * @crossplatform 1124 * @since 10 1125 */ 1126 /** 1127 * Called when the content view of the switch tab is set. 1128 * 1129 * @returns { TabContentAttribute } 1130 * @syscap SystemCapability.ArkUI.ArkUI.Full 1131 * @crossplatform 1132 * @atomicservice 1133 * @since 11 1134 */ 1135 (): TabContentAttribute; 1136} 1137 1138/** 1139 * Defines the attribute functions of TabContent. 1140 * 1141 * @extends CommonMethod<TabContentAttribute> 1142 * @syscap SystemCapability.ArkUI.ArkUI.Full 1143 * @since 7 1144 */ 1145/** 1146 * Defines the attribute functions of TabContent. 1147 * 1148 * @extends CommonMethod<TabContentAttribute> 1149 * @syscap SystemCapability.ArkUI.ArkUI.Full 1150 * @crossplatform 1151 * @since 10 1152 */ 1153/** 1154 * Defines the attribute functions of TabContent. 1155 * 1156 * @extends CommonMethod<TabContentAttribute> 1157 * @syscap SystemCapability.ArkUI.ArkUI.Full 1158 * @crossplatform 1159 * @atomicservice 1160 * @since 11 1161 */ 1162declare class TabContentAttribute extends CommonMethod<TabContentAttribute> { 1163 /** 1164 * Called when tabbar is entered. 1165 * 1166 * @param { string | Resource | { icon?: string | Resource; text?: string | Resource } } value 1167 * @returns { TabContentAttribute } 1168 * @syscap SystemCapability.ArkUI.ArkUI.Full 1169 * @since 7 1170 */ 1171 /** 1172 * Called when tabbar is entered. 1173 * 1174 * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value 1175 * @returns { TabContentAttribute } 1176 * @syscap SystemCapability.ArkUI.ArkUI.Full 1177 * @since 8 1178 */ 1179 /** 1180 * Called when tabbar is entered. 1181 * 1182 * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value 1183 * @returns { TabContentAttribute } 1184 * @syscap SystemCapability.ArkUI.ArkUI.Full 1185 * @crossplatform 1186 * @since 10 1187 */ 1188 /** 1189 * Called when tabbar is entered. 1190 * 1191 * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value 1192 * @returns { TabContentAttribute } 1193 * @syscap SystemCapability.ArkUI.ArkUI.Full 1194 * @crossplatform 1195 * @atomicservice 1196 * @since 11 1197 */ 1198 /** 1199 * Called when tabbar is entered. 1200 * Anonymous Object Rectification 1201 * 1202 * @param { string | Resource | CustomBuilder | TabBarOptions } options - TabBar options. 1203 * @returns { TabContentAttribute } 1204 * @syscap SystemCapability.ArkUI.ArkUI.Full 1205 * @crossplatform 1206 * @atomicservice 1207 * @since 18 1208 */ 1209 tabBar(options: string | Resource | CustomBuilder | TabBarOptions): TabContentAttribute; 1210 1211 /** 1212 * Called when tabbar is entered. 1213 * 1214 * @param { SubTabBarStyle | BottomTabBarStyle } value 1215 * @returns { TabContentAttribute } 1216 * @syscap SystemCapability.ArkUI.ArkUI.Full 1217 * @since 9 1218 */ 1219 /** 1220 * Called when tabbar is entered. 1221 * 1222 * @param { SubTabBarStyle | BottomTabBarStyle } value 1223 * @returns { TabContentAttribute } 1224 * @syscap SystemCapability.ArkUI.ArkUI.Full 1225 * @crossplatform 1226 * @since 10 1227 */ 1228 /** 1229 * Called when tabbar is entered. 1230 * 1231 * @param { SubTabBarStyle | BottomTabBarStyle } value 1232 * @returns { TabContentAttribute } 1233 * @syscap SystemCapability.ArkUI.ArkUI.Full 1234 * @crossplatform 1235 * @atomicservice 1236 * @since 11 1237 */ 1238 tabBar(value: SubTabBarStyle | BottomTabBarStyle): TabContentAttribute; 1239 1240 /** 1241 * Set the content of the tab bar. 1242 * Anonymous Object Rectification 1243 * 1244 * @param { ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions } content 1245 * Set the content of the tab bar. 1246 * @returns { TabContentAttribute } 1247 * @syscap SystemCapability.ArkUI.ArkUI.Full 1248 * @crossplatform 1249 * @atomicservice 1250 * @since 18 1251 */ 1252 tabBar(content: ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | 1253 TabBarOptions): TabContentAttribute; 1254 1255 /** 1256 * Called when the tab content will show. 1257 * @param { VoidCallback } event 1258 * @returns { TabContentAttribute } 1259 * @syscap SystemCapability.ArkUI.ArkUI.Full 1260 * @crossplatform 1261 * @atomicservice 1262 * @since 12 1263 */ 1264 onWillShow(event: VoidCallback): TabContentAttribute; 1265 1266 /** 1267 * Called when the tab content will hide. 1268 * @param { VoidCallback } event 1269 * @returns { TabContentAttribute } 1270 * @syscap SystemCapability.ArkUI.ArkUI.Full 1271 * @crossplatform 1272 * @atomicservice 1273 * @since 12 1274 */ 1275 onWillHide(event: VoidCallback): TabContentAttribute; 1276} 1277 1278/** 1279 * Defines TabContent Component. 1280 * 1281 * @syscap SystemCapability.ArkUI.ArkUI.Full 1282 * @since 7 1283 */ 1284/** 1285 * Defines TabContent Component. 1286 * 1287 * @syscap SystemCapability.ArkUI.ArkUI.Full 1288 * @crossplatform 1289 * @since 10 1290 */ 1291/** 1292 * Defines TabContent Component. 1293 * 1294 * @syscap SystemCapability.ArkUI.ArkUI.Full 1295 * @crossplatform 1296 * @atomicservice 1297 * @since 11 1298 */ 1299declare const TabContent: TabContentInterface; 1300 1301/** 1302 * Defines TabContent Component instance. 1303 * 1304 * @syscap SystemCapability.ArkUI.ArkUI.Full 1305 * @since 7 1306 */ 1307/** 1308 * Defines TabContent Component instance. 1309 * 1310 * @syscap SystemCapability.ArkUI.ArkUI.Full 1311 * @crossplatform 1312 * @since 10 1313 */ 1314/** 1315 * Defines TabContent Component instance. 1316 * 1317 * @syscap SystemCapability.ArkUI.ArkUI.Full 1318 * @crossplatform 1319 * @atomicservice 1320 * @since 11 1321 */ 1322declare const TabContentInstance: TabContentAttribute; 1323