1/* 2 * Copyright (c) 2021-2025 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 * CommonModifier 23 * 24 * @typedef { import('../api/arkui/CommonModifier').CommonModifier } CommonModifier 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @atomicservice 28 * @since 15 29 */ 30declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifier; 31 32/** 33 * Declare the graphic format of the bar chart. 34 * 35 * @enum { number } 36 * @syscap SystemCapability.ArkUI.ArkUI.Full 37 * @since 7 38 */ 39/** 40 * Declare the graphic format of the bar chart. 41 * 42 * @enum { number } 43 * @syscap SystemCapability.ArkUI.ArkUI.Full 44 * @crossplatform 45 * @since 10 46 */ 47/** 48 * Declare the graphic format of the bar chart. 49 * 50 * @enum { number } 51 * @syscap SystemCapability.ArkUI.ArkUI.Full 52 * @crossplatform 53 * @atomicservice 54 * @since 11 55 */ 56declare enum BarMode { 57 /** 58 * The actual layout width of the TabBar is used. If the width exceeds the total width, you can slide the tabbar. 59 * 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @since 7 62 */ 63 /** 64 * The actual layout width of the TabBar is used. If the width exceeds the total width, you can slide the tabbar. 65 * 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @crossplatform 68 * @since 10 69 */ 70 /** 71 * The actual layout width of the TabBar is used. If the width exceeds the total width, you can slide the tabbar. 72 * 73 * @syscap SystemCapability.ArkUI.ArkUI.Full 74 * @crossplatform 75 * @atomicservice 76 * @since 11 77 */ 78 Scrollable = 0, 79 80 /** 81 * The width of all TabBars is evenly allocated. 82 * 83 * @syscap SystemCapability.ArkUI.ArkUI.Full 84 * @since 7 85 */ 86 /** 87 * The width of all TabBars is evenly allocated. 88 * 89 * @syscap SystemCapability.ArkUI.ArkUI.Full 90 * @crossplatform 91 * @since 10 92 */ 93 /** 94 * The width of all TabBars is evenly allocated. 95 * 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @crossplatform 98 * @atomicservice 99 * @since 11 100 */ 101 Fixed = 1, 102} 103 104/** 105 * Declare the animation mode of tab content. 106 * 107 * @enum { number } 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @crossplatform 110 * @atomicservice 111 * @since 12 112 */ 113declare enum AnimationMode { 114 /** 115 * Start animation after tabcontent is fully measured. 116 * 117 * @syscap SystemCapability.ArkUI.ArkUI.Full 118 * @crossplatform 119 * @atomicservice 120 * @since 12 121 */ 122 CONTENT_FIRST = 0, 123 124 /** 125 * Start animation before tabcontent is fully measured. 126 * 127 * @syscap SystemCapability.ArkUI.ArkUI.Full 128 * @crossplatform 129 * @atomicservice 130 * @since 12 131 */ 132 ACTION_FIRST = 1, 133 134 /** 135 * Disable default animation. 136 * 137 * @syscap SystemCapability.ArkUI.ArkUI.Full 138 * @crossplatform 139 * @atomicservice 140 * @since 12 141 */ 142 NO_ANIMATION = 2, 143 144 /** 145 * Jump to some index near the target without animation, then start animation after tabcontent is fully measured. 146 * 147 * @syscap SystemCapability.ArkUI.ArkUI.Full 148 * @crossplatform 149 * @atomicservice 150 * @since 15 151 */ 152 CONTENT_FIRST_WITH_JUMP = 3, 153 154 /** 155 * Jump to some index near the target without animation, then start animation before tabcontent is fully measured. 156 * 157 * @syscap SystemCapability.ArkUI.ArkUI.Full 158 * @crossplatform 159 * @atomicservice 160 * @since 15 161 */ 162 ACTION_FIRST_WITH_JUMP = 4, 163} 164 165/** 166 * Declare the location of the bar chart. 167 * 168 * @enum { number } 169 * @syscap SystemCapability.ArkUI.ArkUI.Full 170 * @since 7 171 */ 172/** 173 * Declare the location of the bar chart. 174 * 175 * @enum { number } 176 * @syscap SystemCapability.ArkUI.ArkUI.Full 177 * @crossplatform 178 * @since 10 179 */ 180/** 181 * Declare the location of the bar chart. 182 * 183 * @enum { number } 184 * @syscap SystemCapability.ArkUI.ArkUI.Full 185 * @crossplatform 186 * @atomicservice 187 * @since 11 188 */ 189declare enum BarPosition { 190 /** 191 * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. 192 * 193 * @syscap SystemCapability.ArkUI.ArkUI.Full 194 * @since 7 195 */ 196 /** 197 * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. 198 * 199 * @syscap SystemCapability.ArkUI.ArkUI.Full 200 * @crossplatform 201 * @since 10 202 */ 203 /** 204 * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. 205 * 206 * @syscap SystemCapability.ArkUI.ArkUI.Full 207 * @crossplatform 208 * @atomicservice 209 * @since 11 210 */ 211 Start, 212 213 /** 214 * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. 215 * 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @since 7 218 */ 219 /** 220 * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. 221 * 222 * @syscap SystemCapability.ArkUI.ArkUI.Full 223 * @crossplatform 224 * @since 10 225 */ 226 /** 227 * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. 228 * 229 * @syscap SystemCapability.ArkUI.ArkUI.Full 230 * @crossplatform 231 * @atomicservice 232 * @since 11 233 */ 234 End, 235} 236 237/** 238 * Declare the layout style of the tab bar items. 239 * 240 * @enum { number } 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @crossplatform 243 * @since 10 244 */ 245/** 246 * Declare the layout style of the tab bar items. 247 * 248 * @enum { number } 249 * @syscap SystemCapability.ArkUI.ArkUI.Full 250 * @crossplatform 251 * @atomicservice 252 * @since 11 253 */ 254declare enum LayoutStyle { 255 /** 256 * The tab bar items are laid in the center of the tab bar. 257 * 258 * @syscap SystemCapability.ArkUI.ArkUI.Full 259 * @crossplatform 260 * @since 10 261 */ 262 /** 263 * The tab bar items are laid in the center of the tab bar. 264 * 265 * @syscap SystemCapability.ArkUI.ArkUI.Full 266 * @crossplatform 267 * @atomicservice 268 * @since 11 269 */ 270 ALWAYS_CENTER = 0, 271 /** 272 * The tab bar items are laid in the tab bar by an average split. 273 * 274 * @syscap SystemCapability.ArkUI.ArkUI.Full 275 * @crossplatform 276 * @since 10 277 */ 278 /** 279 * The tab bar items are laid in the tab bar by an average split. 280 * 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @atomicservice 284 * @since 11 285 */ 286 ALWAYS_AVERAGE_SPLIT = 1, 287 /** 288 * The tab bar items are laid in the center of the bar when their total length is more than half of the tab bar. 289 * Otherwise, they are laid in the center half of the tab bar with the same space between them. 290 * 291 * @syscap SystemCapability.ArkUI.ArkUI.Full 292 * @crossplatform 293 * @since 10 294 */ 295 /** 296 * The tab bar items are laid in the center of the bar when their total length is more than half of the tab bar. 297 * Otherwise, they are laid in the center half of the tab bar with the same space between them. 298 * 299 * @syscap SystemCapability.ArkUI.ArkUI.Full 300 * @crossplatform 301 * @atomicservice 302 * @since 11 303 */ 304 SPACE_BETWEEN_OR_CENTER = 2 305} 306 307/** 308 * Provides methods for switching tabs. 309 * 310 * @syscap SystemCapability.ArkUI.ArkUI.Full 311 * @since 7 312 */ 313/** 314 * Provides methods for switching tabs. 315 * 316 * @syscap SystemCapability.ArkUI.ArkUI.Full 317 * @crossplatform 318 * @since 10 319 */ 320/** 321 * Provides methods for switching tabs. 322 * 323 * @syscap SystemCapability.ArkUI.ArkUI.Full 324 * @crossplatform 325 * @atomicservice 326 * @since 11 327 */ 328declare class TabsController { 329 /** 330 * constructor. 331 * 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @since 7 334 */ 335 /** 336 * constructor. 337 * 338 * @syscap SystemCapability.ArkUI.ArkUI.Full 339 * @crossplatform 340 * @since 10 341 */ 342 /** 343 * constructor. 344 * 345 * @syscap SystemCapability.ArkUI.ArkUI.Full 346 * @crossplatform 347 * @atomicservice 348 * @since 11 349 */ 350 constructor(); 351 352 /** 353 * Called when the tab is switched. 354 * 355 * @param { number } value 356 * @syscap SystemCapability.ArkUI.ArkUI.Full 357 * @since 7 358 */ 359 /** 360 * Called when the tab is switched. 361 * 362 * @param { number } value 363 * @syscap SystemCapability.ArkUI.ArkUI.Full 364 * @crossplatform 365 * @since 10 366 */ 367 /** 368 * Called when the tab is switched. 369 * 370 * @param { number } value 371 * @syscap SystemCapability.ArkUI.ArkUI.Full 372 * @crossplatform 373 * @atomicservice 374 * @since 11 375 */ 376 changeIndex(value: number): void; 377 378 /** 379 * Called when need to preload specified tab content. 380 * 381 * @param { Optional<Array<number>> } indices - Indices of tab content to be preloaded. 382 * @returns { Promise<void> } The promise returned by the function. 383 * @throws { BusinessError } 401 - Parameter invalid. Possible causes: 384 * <br> 1. The parameter type is not Array<number>. 385 * <br> 2. The parameter is an empty array. 386 * <br> 3. The parameter contains an invalid index. 387 * @syscap SystemCapability.ArkUI.ArkUI.Full 388 * @crossplatform 389 * @atomicservice 390 * @since 12 391 */ 392 preloadItems(indices: Optional<Array<number>>): Promise<void>; 393 394 /** 395 * Set tab bar translate. 396 * 397 * @param { TranslateOptions } translate - translate options 398 * @syscap SystemCapability.ArkUI.ArkUI.Full 399 * @crossplatform 400 * @atomicservice 401 * @since 13 402 */ 403 setTabBarTranslate(translate: TranslateOptions): void; 404 405 /** 406 * Set tab bar opacity. 407 * 408 * @param { number } opacity - opacity 409 * @syscap SystemCapability.ArkUI.ArkUI.Full 410 * @crossplatform 411 * @atomicservice 412 * @since 13 413 */ 414 setTabBarOpacity(opacity: number): void; 415} 416 417/** 418 * Options used to create Tabs. 419 * 420 * @typedef TabsOptions 421 * @syscap SystemCapability.ArkUI.ArkUI.Full 422 * @crossplatform 423 * @atomicservice 424 * @since 15 425 */ 426declare interface TabsOptions { 427 /** 428 * Set the tab location for Tabs. 429 * 430 * @type { ?BarPosition } 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @since 7 433 */ 434 /** 435 * Set the tab location for Tabs. 436 * 437 * @type { ?BarPosition } 438 * @syscap SystemCapability.ArkUI.ArkUI.Full 439 * @crossplatform 440 * @since 10 441 */ 442 /** 443 * Set the tab location for Tabs. 444 * 445 * @type { ?BarPosition } 446 * @syscap SystemCapability.ArkUI.ArkUI.Full 447 * @crossplatform 448 * @atomicservice 449 * @since 11 450 */ 451 barPosition?: BarPosition; 452 453 /** 454 * Set the index of the currently displayed tab. 455 * 456 * @type { ?number } 457 * @syscap SystemCapability.ArkUI.ArkUI.Full 458 * @since 7 459 */ 460 /** 461 * Set the index of the currently displayed tab. 462 * 463 * @type { ?number } 464 * @syscap SystemCapability.ArkUI.ArkUI.Full 465 * @crossplatform 466 * @since 10 467 */ 468 /** 469 * Set the index of the currently displayed tab. 470 * 471 * @type { ?number } 472 * @syscap SystemCapability.ArkUI.ArkUI.Full 473 * @crossplatform 474 * @atomicservice 475 * @since 11 476 */ 477 index?: number; 478 479 /** 480 * Set the Tabs controller. 481 * 482 * @type { ?TabsController } 483 * @syscap SystemCapability.ArkUI.ArkUI.Full 484 * @since 7 485 */ 486 /** 487 * Set the Tabs controller. 488 * 489 * @type { ?TabsController } 490 * @syscap SystemCapability.ArkUI.ArkUI.Full 491 * @crossplatform 492 * @since 10 493 */ 494 /** 495 * Set the Tabs controller. 496 * 497 * @type { ?TabsController } 498 * @syscap SystemCapability.ArkUI.ArkUI.Full 499 * @crossplatform 500 * @atomicservice 501 * @since 11 502 */ 503 controller?: TabsController 504 505 /** 506 * Set common attributes to tabbar. 507 * 508 * @type { ?CommonModifier } 509 * @syscap SystemCapability.ArkUI.ArkUI.Full 510 * @crossplatform 511 * @atomicservice 512 * @since 15 513 */ 514 barModifier?: CommonModifier 515} 516 517/** 518 * Provides an interface for switching views. 519 * 520 * @interface TabsInterface 521 * @syscap SystemCapability.ArkUI.ArkUI.Full 522 * @since 7 523 */ 524/** 525 * Provides an interface for switching views. 526 * 527 * @interface TabsInterface 528 * @syscap SystemCapability.ArkUI.ArkUI.Full 529 * @crossplatform 530 * @since 10 531 */ 532/** 533 * Provides an interface for switching views. 534 * 535 * @interface TabsInterface 536 * @syscap SystemCapability.ArkUI.ArkUI.Full 537 * @crossplatform 538 * @atomicservice 539 * @since 11 540 */ 541interface TabsInterface { 542 /** 543 * Called when the view is switched. 544 * 545 * @param { object } value 546 * @returns { TabsAttribute } 547 * @syscap SystemCapability.ArkUI.ArkUI.Full 548 * @since 7 549 */ 550 /** 551 * Called when the view is switched. 552 * 553 * @param { object } value 554 * @returns { TabsAttribute } 555 * @syscap SystemCapability.ArkUI.ArkUI.Full 556 * @crossplatform 557 * @since 10 558 */ 559 /** 560 * Called when the view is switched. 561 * 562 * @param { object } value 563 * @returns { TabsAttribute } 564 * @syscap SystemCapability.ArkUI.ArkUI.Full 565 * @crossplatform 566 * @atomicservice 567 * @since 11 568 */ 569 /** 570 * Called when the view is switched. 571 * 572 * @param { TabsOptions } [options] - Tabs options. 573 * @returns { TabsAttribute } 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @crossplatform 576 * @atomicservice 577 * @since 15 578 */ 579 (options?: TabsOptions): TabsAttribute; 580} 581 582/** 583 * Provides an interface for the style of an divider including stroke width, color, start margin 584 * and end margin 585 * 586 * @interface DividerStyle 587 * @syscap SystemCapability.ArkUI.ArkUI.Full 588 * @crossplatform 589 * @since 10 590 */ 591/** 592 * Provides an interface for the style of an divider including stroke width, color, start margin 593 * and end margin 594 * 595 * @interface DividerStyle 596 * @syscap SystemCapability.ArkUI.ArkUI.Full 597 * @crossplatform 598 * @atomicservice 599 * @since 11 600 */ 601interface DividerStyle { 602 /** 603 * Define the stroke width of the divider 604 * 605 * @type { Length } 606 * @default 0 607 * @syscap SystemCapability.ArkUI.ArkUI.Full 608 * @crossplatform 609 * @since 10 610 */ 611 /** 612 * Define the stroke width of the divider 613 * 614 * @type { Length } 615 * @default 0 616 * @syscap SystemCapability.ArkUI.ArkUI.Full 617 * @crossplatform 618 * @atomicservice 619 * @since 11 620 */ 621 strokeWidth: Length; 622 623 /** 624 * Define the color of the divider 625 * 626 * @type { ?ResourceColor } 627 * @syscap SystemCapability.ArkUI.ArkUI.Full 628 * @crossplatform 629 * @since 10 630 */ 631 /** 632 * Define the color of the divider 633 * 634 * @type { ?ResourceColor } 635 * @syscap SystemCapability.ArkUI.ArkUI.Full 636 * @crossplatform 637 * @atomicservice 638 * @since 11 639 */ 640 color?: ResourceColor; 641 642 /** 643 * Define the start margin of the divider 644 * 645 * @type { ?Length } 646 * @default 0 647 * @syscap SystemCapability.ArkUI.ArkUI.Full 648 * @crossplatform 649 * @since 10 650 */ 651 /** 652 * Define the start margin of the divider 653 * 654 * @type { ?Length } 655 * @default 0 656 * @syscap SystemCapability.ArkUI.ArkUI.Full 657 * @crossplatform 658 * @atomicservice 659 * @since 11 660 */ 661 startMargin?: Length; 662 663 /** 664 * Define the end margin of the divider 665 * 666 * @type { ?Length } 667 * @default 0 668 * @syscap SystemCapability.ArkUI.ArkUI.Full 669 * @crossplatform 670 * @since 10 671 */ 672 /** 673 * Define the end margin of the divider 674 * 675 * @type { ?Length } 676 * @default 0 677 * @syscap SystemCapability.ArkUI.ArkUI.Full 678 * @crossplatform 679 * @atomicservice 680 * @since 11 681 */ 682 endMargin?: Length; 683} 684 685/** 686 * Provides an interface for tabs animation. 687 * 688 * @interface TabsAnimationEvent 689 * @syscap SystemCapability.ArkUI.ArkUI.Full 690 * @crossplatform 691 * @since 11 692 */ 693/** 694 * Provides an interface for tabs animation. 695 * 696 * @interface TabsAnimationEvent 697 * @syscap SystemCapability.ArkUI.ArkUI.Full 698 * @crossplatform 699 * @atomicservice 700 * @since 12 701 */ 702declare interface TabsAnimationEvent { 703 /** 704 * Offset of the current page to the start position of the tabs main axis. The unit is vp. 705 * 706 * @type { number } 707 * @default 0.0 vp 708 * @syscap SystemCapability.ArkUI.ArkUI.Full 709 * @crossplatform 710 * @since 11 711 */ 712 /** 713 * Offset of the current page to the start position of the tabs main axis. The unit is vp. 714 * 715 * @type { number } 716 * @default 0.0 vp 717 * @syscap SystemCapability.ArkUI.ArkUI.Full 718 * @crossplatform 719 * @atomicservice 720 * @since 12 721 */ 722 currentOffset: number; 723 724 /** 725 * Offset of the target page to the start position of the tabs main axis. The unit is vp. 726 * 727 * @type { number } 728 * @default 0.0 vp 729 * @syscap SystemCapability.ArkUI.ArkUI.Full 730 * @crossplatform 731 * @since 11 732 */ 733 /** 734 * Offset of the target page to the start position of the tabs main axis. The unit is vp. 735 * 736 * @type { number } 737 * @default 0.0 vp 738 * @syscap SystemCapability.ArkUI.ArkUI.Full 739 * @crossplatform 740 * @atomicservice 741 * @since 12 742 */ 743 targetOffset: number; 744 745 /** 746 * Start speed of the page-turning animation. The unit is vp/s. 747 * 748 * @type { number } 749 * @default 0.0 vp/s 750 * @syscap SystemCapability.ArkUI.ArkUI.Full 751 * @crossplatform 752 * @since 11 753 */ 754 /** 755 * Start speed of the page-turning animation. The unit is vp/s. 756 * 757 * @type { number } 758 * @default 0.0 vp/s 759 * @syscap SystemCapability.ArkUI.ArkUI.Full 760 * @crossplatform 761 * @atomicservice 762 * @since 12 763 */ 764 velocity: number; 765} 766 767/** 768 * Provides an interface for the grid column options of an tab bar including sm, md, lg, margin and gutter. 769 * 770 * @interface BarGridColumnOptions 771 * @syscap SystemCapability.ArkUI.ArkUI.Full 772 * @crossplatform 773 * @since 10 774 */ 775/** 776 * Provides an interface for the grid column options of an tab bar including sm, md, lg, margin and gutter. 777 * 778 * @interface BarGridColumnOptions 779 * @syscap SystemCapability.ArkUI.ArkUI.Full 780 * @crossplatform 781 * @atomicservice 782 * @since 11 783 */ 784interface BarGridColumnOptions { 785 /** 786 * Define the occupied column number when the screen is of small size 787 * 788 * @type { ?number } 789 * @syscap SystemCapability.ArkUI.ArkUI.Full 790 * @crossplatform 791 * @since 10 792 */ 793 /** 794 * Define the occupied column number when the screen is of small size 795 * 796 * @type { ?number } 797 * @syscap SystemCapability.ArkUI.ArkUI.Full 798 * @crossplatform 799 * @atomicservice 800 * @since 11 801 */ 802 sm?: number; 803 804 /** 805 * Define the occupied column number when the screen is of middle size 806 * 807 * @type { ?number } 808 * @syscap SystemCapability.ArkUI.ArkUI.Full 809 * @crossplatform 810 * @since 10 811 */ 812 /** 813 * Define the occupied column number when the screen is of middle size 814 * 815 * @type { ?number } 816 * @syscap SystemCapability.ArkUI.ArkUI.Full 817 * @crossplatform 818 * @atomicservice 819 * @since 11 820 */ 821 md?: number; 822 823 /** 824 * Define the occupied column number when the screen is of large size 825 * 826 * @type { ?number } 827 * @syscap SystemCapability.ArkUI.ArkUI.Full 828 * @crossplatform 829 * @since 10 830 */ 831 /** 832 * Define the occupied column number when the screen is of large size 833 * 834 * @type { ?number } 835 * @syscap SystemCapability.ArkUI.ArkUI.Full 836 * @crossplatform 837 * @atomicservice 838 * @since 11 839 */ 840 lg?: number; 841 842 /** 843 * Define the margin size of the columns 844 * 845 * @type { ?Dimension } 846 * @syscap SystemCapability.ArkUI.ArkUI.Full 847 * @crossplatform 848 * @since 10 849 */ 850 /** 851 * Define the margin size of the columns 852 * 853 * @type { ?Dimension } 854 * @syscap SystemCapability.ArkUI.ArkUI.Full 855 * @crossplatform 856 * @atomicservice 857 * @since 11 858 */ 859 margin?: Dimension; 860 861 /** 862 * Define the gutter size of the columns 863 * 864 * @type { ?Dimension } 865 * @syscap SystemCapability.ArkUI.ArkUI.Full 866 * @crossplatform 867 * @since 10 868 */ 869 /** 870 * Define the gutter size of the columns 871 * 872 * @type { ?Dimension } 873 * @syscap SystemCapability.ArkUI.ArkUI.Full 874 * @crossplatform 875 * @atomicservice 876 * @since 11 877 */ 878 gutter?: Dimension; 879} 880 881/** 882 * Provides an interface for the options for the scrollable bar mode including margin and nonScrollableLayoutStyle. 883 * 884 * @interface ScrollableBarModeOptions 885 * @syscap SystemCapability.ArkUI.ArkUI.Full 886 * @crossplatform 887 * @since 10 888 */ 889/** 890 * Provides an interface for the options for the scrollable bar mode including margin and nonScrollableLayoutStyle. 891 * 892 * @interface ScrollableBarModeOptions 893 * @syscap SystemCapability.ArkUI.ArkUI.Full 894 * @crossplatform 895 * @atomicservice 896 * @since 11 897 */ 898interface ScrollableBarModeOptions { 899 /** 900 * Define the margin size of the bar items when the tab bar is scrollable. 901 * 902 * @type { ?Dimension } 903 * @syscap SystemCapability.ArkUI.ArkUI.Full 904 * @crossplatform 905 * @since 10 906 */ 907 /** 908 * Define the margin size of the bar items when the tab bar is scrollable. 909 * 910 * @type { ?Dimension } 911 * @syscap SystemCapability.ArkUI.ArkUI.Full 912 * @crossplatform 913 * @atomicservice 914 * @since 11 915 */ 916 margin?: Dimension; 917 918 /** 919 * Define the layout style of the bar items when the tab bar is not scrollable. 920 * 921 * @type { ?LayoutStyle } 922 * @syscap SystemCapability.ArkUI.ArkUI.Full 923 * @crossplatform 924 * @since 10 925 */ 926 /** 927 * Define the layout style of the bar items when the tab bar is not scrollable. 928 * 929 * @type { ?LayoutStyle } 930 * @syscap SystemCapability.ArkUI.ArkUI.Full 931 * @crossplatform 932 * @atomicservice 933 * @since 11 934 */ 935 nonScrollableLayoutStyle?: LayoutStyle; 936} 937 938/** 939 * Defines the tabs attribute functions. 940 * 941 * @extends CommonMethod<TabsAttribute> 942 * @syscap SystemCapability.ArkUI.ArkUI.Full 943 * @since 7 944 */ 945/** 946 * Defines the tabs attribute functions. 947 * 948 * @extends CommonMethod<TabsAttribute> 949 * @syscap SystemCapability.ArkUI.ArkUI.Full 950 * @crossplatform 951 * @since 10 952 */ 953/** 954 * Defines the tabs attribute functions. 955 * 956 * @extends CommonMethod<TabsAttribute> 957 * @syscap SystemCapability.ArkUI.ArkUI.Full 958 * @crossplatform 959 * @atomicservice 960 * @since 11 961 */ 962declare class TabsAttribute extends CommonMethod<TabsAttribute> { 963 /** 964 * Called when determining whether the tab is vertical. 965 * 966 * @param { boolean } value 967 * @returns { TabsAttribute } 968 * @syscap SystemCapability.ArkUI.ArkUI.Full 969 * @since 7 970 */ 971 /** 972 * Called when determining whether the tab is vertical. 973 * 974 * @param { boolean } value 975 * @returns { TabsAttribute } 976 * @syscap SystemCapability.ArkUI.ArkUI.Full 977 * @crossplatform 978 * @since 10 979 */ 980 /** 981 * Called when determining whether the tab is vertical. 982 * 983 * @param { boolean } value 984 * @returns { TabsAttribute } 985 * @syscap SystemCapability.ArkUI.ArkUI.Full 986 * @crossplatform 987 * @atomicservice 988 * @since 11 989 */ 990 vertical(value: boolean): TabsAttribute; 991 992 /** 993 * Called when determining the location of the bar chart. 994 * 995 * @param { BarPosition } value 996 * @returns { TabsAttribute } 997 * @syscap SystemCapability.ArkUI.ArkUI.Full 998 * @since 9 999 */ 1000 /** 1001 * Called when determining the location of the bar chart. 1002 * 1003 * @param { BarPosition } value 1004 * @returns { TabsAttribute } 1005 * @syscap SystemCapability.ArkUI.ArkUI.Full 1006 * @crossplatform 1007 * @since 10 1008 */ 1009 /** 1010 * Called when determining the location of the bar chart. 1011 * 1012 * @param { BarPosition } value 1013 * @returns { TabsAttribute } 1014 * @syscap SystemCapability.ArkUI.ArkUI.Full 1015 * @crossplatform 1016 * @atomicservice 1017 * @since 11 1018 */ 1019 barPosition(value: BarPosition): TabsAttribute; 1020 1021 /** 1022 * Called when judging whether page switching can be performed by sliding left and right. 1023 * 1024 * @param { boolean } value 1025 * @returns { TabsAttribute } 1026 * @syscap SystemCapability.ArkUI.ArkUI.Full 1027 * @since 7 1028 */ 1029 /** 1030 * Called when judging whether page switching can be performed by sliding left and right. 1031 * 1032 * @param { boolean } value 1033 * @returns { TabsAttribute } 1034 * @syscap SystemCapability.ArkUI.ArkUI.Full 1035 * @crossplatform 1036 * @since 10 1037 */ 1038 /** 1039 * Called when judging whether page switching can be performed by sliding left and right. 1040 * 1041 * @param { boolean } value 1042 * @returns { TabsAttribute } 1043 * @syscap SystemCapability.ArkUI.ArkUI.Full 1044 * @crossplatform 1045 * @atomicservice 1046 * @since 11 1047 */ 1048 scrollable(value: boolean): TabsAttribute; 1049 1050 /** 1051 * Called when the graphic format of the bar chart is selected as fixed mode. 1052 * 1053 * @param { BarMode.Fixed } value 1054 * @returns { TabsAttribute } 1055 * @syscap SystemCapability.ArkUI.ArkUI.Full 1056 * @crossplatform 1057 * @since 10 1058 */ 1059 /** 1060 * Called when the graphic format of the bar chart is selected as fixed mode. 1061 * 1062 * @param { BarMode.Fixed } value 1063 * @returns { TabsAttribute } 1064 * @syscap SystemCapability.ArkUI.ArkUI.Full 1065 * @crossplatform 1066 * @atomicservice 1067 * @since 11 1068 */ 1069 barMode(value: BarMode.Fixed): TabsAttribute; 1070 1071 /** 1072 * Called when the graphic format of the bar chart is selected as scrollable mode. 1073 * 1074 * @param { BarMode.Scrollable } value 1075 * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode 1076 * @returns { TabsAttribute } 1077 * @syscap SystemCapability.ArkUI.ArkUI.Full 1078 * @crossplatform 1079 * @since 10 1080 */ 1081 /** 1082 * Called when the graphic format of the bar chart is selected as scrollable mode. 1083 * 1084 * @param { BarMode.Scrollable } value 1085 * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode 1086 * @returns { TabsAttribute } 1087 * @syscap SystemCapability.ArkUI.ArkUI.Full 1088 * @crossplatform 1089 * @atomicservice 1090 * @since 11 1091 */ 1092 barMode(value: BarMode.Scrollable, options: ScrollableBarModeOptions): TabsAttribute; 1093 1094 /** 1095 * Called when the graphic format of the bar chart is selected. 1096 * 1097 * @param { BarMode } value 1098 * @returns { TabsAttribute } 1099 * @syscap SystemCapability.ArkUI.ArkUI.Full 1100 * @since 7 1101 */ 1102 /** 1103 * Called when the graphic format of the bar chart is selected. 1104 * 1105 * @param { BarMode } value 1106 * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode 1107 * @returns { TabsAttribute } 1108 * @syscap SystemCapability.ArkUI.ArkUI.Full 1109 * @crossplatform 1110 * @since 10 1111 */ 1112 /** 1113 * Called when the graphic format of the bar chart is selected. 1114 * 1115 * @param { BarMode } value 1116 * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode 1117 * @returns { TabsAttribute } 1118 * @syscap SystemCapability.ArkUI.ArkUI.Full 1119 * @crossplatform 1120 * @atomicservice 1121 * @since 11 1122 */ 1123 barMode(value: BarMode, options?: ScrollableBarModeOptions): TabsAttribute; 1124 1125 /** 1126 * Called when the width of the bar graph is set. 1127 * Notice: barWidth only supports Number type. 1128 * 1129 * @param { number } value 1130 * @returns { TabsAttribute } 1131 * @syscap SystemCapability.ArkUI.ArkUI.Full 1132 * @since 7 1133 */ 1134 /** 1135 * Called when the width of the bar graph is set. 1136 * Notice: barWidth only supports Number type on 7, supports Length type since 8. 1137 * 1138 * @param { Length } value 1139 * @returns { TabsAttribute } 1140 * @syscap SystemCapability.ArkUI.ArkUI.Full 1141 * @since 8 1142 */ 1143 /** 1144 * Called when the width of the bar graph is set. 1145 * Notice: barWidth only supports Number type on 7, supports Length type since 8. 1146 * 1147 * @param { Length } value 1148 * @returns { TabsAttribute } 1149 * @syscap SystemCapability.ArkUI.ArkUI.Full 1150 * @crossplatform 1151 * @since 10 1152 */ 1153 /** 1154 * Called when the width of the bar graph is set. 1155 * Notice: barWidth only supports Number type on 7, supports Length type since 8. 1156 * 1157 * @param { Length } value 1158 * @returns { TabsAttribute } 1159 * @syscap SystemCapability.ArkUI.ArkUI.Full 1160 * @crossplatform 1161 * @atomicservice 1162 * @since 11 1163 */ 1164 barWidth(value: Length): TabsAttribute; 1165 1166 /** 1167 * Called when the height of the bar graph is set. 1168 * Notice: barHeight only supports Number type. 1169 * 1170 * @param { number } value 1171 * @returns { TabsAttribute } 1172 * @syscap SystemCapability.ArkUI.ArkUI.Full 1173 * @since 7 1174 */ 1175 /** 1176 * Called when the height of the bar graph is set. 1177 * Notice: barHeight only supports Number type on 7, supports Length type since 8. 1178 * 1179 * @param { Length } value 1180 * @returns { TabsAttribute } 1181 * @syscap SystemCapability.ArkUI.ArkUI.Full 1182 * @since 8 1183 */ 1184 /** 1185 * Called when the height of the bar graph is set. 1186 * Notice: barHeight only supports Number type on 7, supports Length type since 8. 1187 * 1188 * @param { Length } value 1189 * @returns { TabsAttribute } 1190 * @syscap SystemCapability.ArkUI.ArkUI.Full 1191 * @crossplatform 1192 * @since 10 1193 */ 1194 /** 1195 * Called when the height of the bar graph is set. 1196 * Notice: barHeight only supports Number type on 7, supports Length type since 8. 1197 * 1198 * @param { Length } value 1199 * @returns { TabsAttribute } 1200 * @syscap SystemCapability.ArkUI.ArkUI.Full 1201 * @crossplatform 1202 * @atomicservice 1203 * @since 11 1204 */ 1205 barHeight(value: Length): TabsAttribute; 1206 1207 /** 1208 * Called when the animation duration of the bar graph is set. 1209 * 1210 * @param { number } value 1211 * @returns { TabsAttribute } 1212 * @syscap SystemCapability.ArkUI.ArkUI.Full 1213 * @since 7 1214 */ 1215 /** 1216 * Called when the animation duration of the bar graph is set. 1217 * 1218 * @param { number } value 1219 * @returns { TabsAttribute } 1220 * @syscap SystemCapability.ArkUI.ArkUI.Full 1221 * @crossplatform 1222 * @since 10 1223 */ 1224 /** 1225 * Called when the animation duration of the bar graph is set. 1226 * 1227 * @param { number } value 1228 * @returns { TabsAttribute } 1229 * @syscap SystemCapability.ArkUI.ArkUI.Full 1230 * @crossplatform 1231 * @atomicservice 1232 * @since 11 1233 */ 1234 animationDuration(value: number): TabsAttribute; 1235 1236 /** 1237 * Set animation mode. 1238 * 1239 * @param { Optional<AnimationMode> } mode - animation mode for tabs switch animation 1240 * @returns { TabsAttribute } 1241 * @syscap SystemCapability.ArkUI.ArkUI.Full 1242 * @crossplatform 1243 * @atomicservice 1244 * @since 12 1245 */ 1246 animationMode(mode: Optional<AnimationMode>): TabsAttribute; 1247 1248 /** 1249 * Set the effect used when the component is at one of the edges. 1250 * 1251 * @param { Optional<EdgeEffect> } edgeEffect - the effect used when the component is at one of the edges 1252 * @returns { TabsAttribute } 1253 * @syscap SystemCapability.ArkUI.ArkUI.Full 1254 * @crossplatform 1255 * @atomicservice 1256 * @since 12 1257 */ 1258 edgeEffect(edgeEffect: Optional<EdgeEffect>): TabsAttribute; 1259 1260 /** 1261 * Called when the tab is switched. 1262 * 1263 * @param { function } event 1264 * @returns { TabsAttribute } 1265 * @syscap SystemCapability.ArkUI.ArkUI.Full 1266 * @since 7 1267 */ 1268 /** 1269 * Called when the tab is switched. 1270 * 1271 * @param { function } event 1272 * @returns { TabsAttribute } 1273 * @syscap SystemCapability.ArkUI.ArkUI.Full 1274 * @crossplatform 1275 * @since 10 1276 */ 1277 /** 1278 * Called when the tab is switched. 1279 * 1280 * @param { function } event 1281 * @returns { TabsAttribute } 1282 * @syscap SystemCapability.ArkUI.ArkUI.Full 1283 * @crossplatform 1284 * @atomicservice 1285 * @since 11 1286 */ 1287 onChange(event: (index: number) => void): TabsAttribute; 1288 1289 /** 1290 * Called when the tab is clicked. 1291 * 1292 * @param { function } event 1293 * @returns { TabsAttribute } 1294 * @syscap SystemCapability.ArkUI.ArkUI.Full 1295 * @crossplatform 1296 * @since 10 1297 */ 1298 /** 1299 * Called when the tab is clicked. 1300 * 1301 * @param { function } event 1302 * @returns { TabsAttribute } 1303 * @syscap SystemCapability.ArkUI.ArkUI.Full 1304 * @crossplatform 1305 * @atomicservice 1306 * @since 11 1307 */ 1308 onTabBarClick(event: (index: number) => void): TabsAttribute; 1309 1310 /** 1311 * Called when the tab content flip animation start. 1312 * 1313 * @param { function } handler - 1314 * "index": the index value of the tab that when animation start. 1315 * "targetIndex": the target index value of the tab that when animation start. 1316 * "event": the animation event callback info. 1317 * @returns { TabsAttribute } 1318 * @syscap SystemCapability.ArkUI.ArkUI.Full 1319 * @crossplatform 1320 * @since 11 1321 */ 1322 /** 1323 * Called when the tab content flip animation start. 1324 * 1325 * @param { function } handler - 1326 * "index": the index value of the tab that when animation start. 1327 * "targetIndex": the target index value of the tab that when animation start. 1328 * "event": the animation event callback info. 1329 * @returns { TabsAttribute } 1330 * @syscap SystemCapability.ArkUI.ArkUI.Full 1331 * @crossplatform 1332 * @atomicservice 1333 * @since 12 1334 */ 1335 onAnimationStart(handler: (index: number, targetIndex: number, event: TabsAnimationEvent) => void): TabsAttribute; 1336 1337 /** 1338 * Called when the tab content flip animation end. 1339 * 1340 * @param { function } handler - 1341 * "index": the index value of the tab that when animation start. 1342 * "event": the animation event callback info. 1343 * @returns { TabsAttribute } 1344 * @syscap SystemCapability.ArkUI.ArkUI.Full 1345 * @crossplatform 1346 * @since 11 1347 */ 1348 /** 1349 * Called when the tab content flip animation end. 1350 * 1351 * @param { function } handler - 1352 * "index": the index value of the tab that when animation start. 1353 * "event": the animation event callback info. 1354 * @returns { TabsAttribute } 1355 * @syscap SystemCapability.ArkUI.ArkUI.Full 1356 * @crossplatform 1357 * @atomicservice 1358 * @since 12 1359 */ 1360 onAnimationEnd(handler: (index: number, event: TabsAnimationEvent) => void): TabsAttribute; 1361 1362 /** 1363 * Called when swiping the tab content with the gesture. 1364 * 1365 * @param { function } handler - 1366 * "index": the index value of the tab that when animation start. 1367 * "event": the animation event callback info. 1368 * @returns { TabsAttribute } 1369 * @syscap SystemCapability.ArkUI.ArkUI.Full 1370 * @crossplatform 1371 * @since 11 1372 */ 1373 /** 1374 * Called when swiping the tab content with the gesture. 1375 * 1376 * @param { function } handler - 1377 * "index": the index value of the tab that when animation start. 1378 * "event": the animation event callback info. 1379 * @returns { TabsAttribute } 1380 * @syscap SystemCapability.ArkUI.ArkUI.Full 1381 * @crossplatform 1382 * @atomicservice 1383 * @since 12 1384 */ 1385 onGestureSwipe(handler: (index: number, event: TabsAnimationEvent) => void): TabsAttribute; 1386 1387 /** 1388 * Set whether the edges of tab bar are fading. 1389 * 1390 * @param { boolean } value - indicates whether the edges of tab bar are fading. 1391 * @returns { TabsAttribute } the attribute of the tabs 1392 * @syscap SystemCapability.ArkUI.ArkUI.Full 1393 * @crossplatform 1394 * @since 10 1395 */ 1396 /** 1397 * Set whether the edges of tab bar are fading. 1398 * 1399 * @param { boolean } value - indicates whether the edges of tab bar are fading. 1400 * @returns { TabsAttribute } the attribute of the tabs 1401 * @syscap SystemCapability.ArkUI.ArkUI.Full 1402 * @crossplatform 1403 * @atomicservice 1404 * @since 11 1405 */ 1406 fadingEdge(value: boolean): TabsAttribute; 1407 1408 /** 1409 * Set the divider between tab bar and tab content. 1410 * 1411 * @param { DividerStyle | null } value - indicates the style of the indicator. 1412 * @returns { TabsAttribute } the attribute of the tabs 1413 * @syscap SystemCapability.ArkUI.ArkUI.Full 1414 * @crossplatform 1415 * @since 10 1416 */ 1417 /** 1418 * Set the divider between tab bar and tab content. 1419 * 1420 * @param { DividerStyle | null } value - indicates the style of the indicator. 1421 * @returns { TabsAttribute } the attribute of the tabs 1422 * @syscap SystemCapability.ArkUI.ArkUI.Full 1423 * @crossplatform 1424 * @atomicservice 1425 * @since 11 1426 */ 1427 divider(value: DividerStyle | null): TabsAttribute; 1428 1429 /** 1430 * Set whether the tab bar overlaps with the tab content. 1431 * 1432 * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. 1433 * @returns { TabsAttribute } the attribute of the tabs 1434 * @syscap SystemCapability.ArkUI.ArkUI.Full 1435 * @since 10 1436 */ 1437 /** 1438 * Set whether the tab bar overlaps with the tab content. 1439 * 1440 * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. 1441 * @returns { TabsAttribute } the attribute of the tabs 1442 * @syscap SystemCapability.ArkUI.ArkUI.Full 1443 * @crossplatform 1444 * @atomicservice 1445 * @since 11 1446 */ 1447 barOverlap(value: boolean): TabsAttribute; 1448 1449 /** 1450 * Set the background color of the tab bar. 1451 * 1452 * @param { ResourceColor } value - indicates the background color of the tab bar. 1453 * @returns { TabsAttribute } the attribute of the tabs 1454 * @syscap SystemCapability.ArkUI.ArkUI.Full 1455 * @since 10 1456 */ 1457 /** 1458 * Set the background color of the tab bar. 1459 * 1460 * @param { ResourceColor } value - indicates the background color of the tab bar. 1461 * @returns { TabsAttribute } the attribute of the tabs 1462 * @syscap SystemCapability.ArkUI.ArkUI.Full 1463 * @crossplatform 1464 * @atomicservice 1465 * @since 11 1466 */ 1467 barBackgroundColor(value: ResourceColor): TabsAttribute; 1468 1469 /** 1470 * Set the grid alignment options of the tab bar. 1471 * 1472 * @param { BarGridColumnOptions } value - indicates the bar grid alignment options. 1473 * @returns { TabsAttribute } the attribute of the tabs 1474 * @syscap SystemCapability.ArkUI.ArkUI.Full 1475 * @crossplatform 1476 * @since 10 1477 */ 1478 /** 1479 * Set the grid alignment options of the tab bar. 1480 * 1481 * @param { BarGridColumnOptions } value - indicates the bar grid alignment options. 1482 * @returns { TabsAttribute } the attribute of the tabs 1483 * @syscap SystemCapability.ArkUI.ArkUI.Full 1484 * @crossplatform 1485 * @atomicservice 1486 * @since 11 1487 */ 1488 barGridAlign(value: BarGridColumnOptions): TabsAttribute; 1489 1490 /** 1491 * Custom tab content transition animation. 1492 * When undefined is set, this interface does not take effect. 1493 * 1494 * @param { function } delegate - custom content transition animation. 1495 * @returns { TabsAttribute } the attribute of the tabs 1496 * @syscap SystemCapability.ArkUI.ArkUI.Full 1497 * @crossplatform 1498 * @form 1499 * @since 11 1500 */ 1501 /** 1502 * Custom tab content transition animation. 1503 * When undefined is set, this interface does not take effect. 1504 * 1505 * @param { function } delegate - custom content transition animation. 1506 * @returns { TabsAttribute } the attribute of the tabs 1507 * @syscap SystemCapability.ArkUI.ArkUI.Full 1508 * @crossplatform 1509 * @form 1510 * @atomicservice 1511 * @since 12 1512 */ 1513 customContentTransition(delegate: (from: number, to: number) => TabContentAnimatedTransition | undefined): TabsAttribute; 1514 1515 /** 1516 * Set the BlurStyle of the tab bar. 1517 * 1518 * @param { BlurStyle } value - indicates the BlurStyle of the tab bar. 1519 * @returns { TabsAttribute } the attribute of the tabs 1520 * @syscap SystemCapability.ArkUI.ArkUI.Full 1521 * @crossplatform 1522 * @atomicservice 1523 * @since 11 1524 */ 1525 barBackgroundBlurStyle(value: BlurStyle): TabsAttribute; 1526 1527 /** 1528 * Setting page flip mode on mouse wheel event. 1529 * 1530 * @param { Optional<PageFlipMode> } mode - page flip mode on mouse wheel event. The default value is PageFlipMode.CONTINUOUS. 1531 * @returns { TabsAttribute } 1532 * @syscap SystemCapability.ArkUI.ArkUI.Full 1533 * @crossplatform 1534 * @atomicservice 1535 * @since 15 1536 */ 1537 pageFlipMode(mode: Optional<PageFlipMode>): TabsAttribute; 1538 1539 /** 1540 * Called when content will change. 1541 * 1542 * @param { function } handler 1543 * "currentIndex": the index value of the current tab. 1544 * "comingIndex": the index value of the tab that will change. 1545 * Tabs can change from currentIndex to comingIndex if function return true. 1546 * Tabs can not change from currentIndex to comingIndex if function return false. 1547 * @returns { TabsAttribute } 1548 * @syscap SystemCapability.ArkUI.ArkUI.Full 1549 * @crossplatform 1550 * @atomicservice 1551 * @since 12 1552 */ 1553 onContentWillChange(handler: (currentIndex: number, comingIndex: number) => boolean): TabsAttribute; 1554} 1555 1556/** 1557 * Defines the Tab Content animated transition options. 1558 * 1559 * @interface TabContentAnimatedTransition 1560 * @syscap SystemCapability.ArkUI.ArkUI.Full 1561 * @crossplatform 1562 * @form 1563 * @since 11 1564 */ 1565/** 1566 * Defines the Tab Content animated transition options. 1567 * 1568 * @interface TabContentAnimatedTransition 1569 * @syscap SystemCapability.ArkUI.ArkUI.Full 1570 * @crossplatform 1571 * @form 1572 * @atomicservice 1573 * @since 12 1574 */ 1575declare interface TabContentAnimatedTransition { 1576 /** 1577 * Defines the timeout of custom content transition animation. The unit is ms. 1578 * If TabContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. 1579 * 1580 * @type { ?number } 1581 * @default 1000 ms 1582 * @syscap SystemCapability.ArkUI.ArkUI.Full 1583 * @crossplatform 1584 * @form 1585 * @since 11 1586 */ 1587 /** 1588 * Defines the timeout of custom content transition animation. The unit is ms. 1589 * If TabContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. 1590 * 1591 * @type { ?number } 1592 * @default 1000 ms 1593 * @syscap SystemCapability.ArkUI.ArkUI.Full 1594 * @crossplatform 1595 * @form 1596 * @atomicservice 1597 * @since 12 1598 */ 1599 timeout?: number; 1600 1601 /** 1602 * Called when custom content transition animation start. 1603 * 1604 * @type { function } 1605 * @syscap SystemCapability.ArkUI.ArkUI.Full 1606 * @crossplatform 1607 * @form 1608 * @since 11 1609 */ 1610 /** 1611 * Called when custom content transition animation start. 1612 * 1613 * @type { function } 1614 * @syscap SystemCapability.ArkUI.ArkUI.Full 1615 * @crossplatform 1616 * @form 1617 * @atomicservice 1618 * @since 12 1619 */ 1620 transition: (proxy: TabContentTransitionProxy) => void; 1621} 1622 1623/** 1624 * The proxy of TabContentAnimatedTransition. 1625 * 1626 * @interface TabContentTransitionProxy 1627 * @syscap SystemCapability.ArkUI.ArkUI.Full 1628 * @crossplatform 1629 * @form 1630 * @since 11 1631 */ 1632/** 1633 * The proxy of TabContentAnimatedTransition. 1634 * 1635 * @interface TabContentTransitionProxy 1636 * @syscap SystemCapability.ArkUI.ArkUI.Full 1637 * @crossplatform 1638 * @form 1639 * @atomicservice 1640 * @since 12 1641 */ 1642declare interface TabContentTransitionProxy { 1643 /** 1644 * The index of current tab content. 1645 * 1646 * @type { number } 1647 * @syscap SystemCapability.ArkUI.ArkUI.Full 1648 * @crossplatform 1649 * @form 1650 * @since 11 1651 */ 1652 /** 1653 * The index of current tab content. 1654 * 1655 * @type { number } 1656 * @syscap SystemCapability.ArkUI.ArkUI.Full 1657 * @crossplatform 1658 * @form 1659 * @atomicservice 1660 * @since 12 1661 */ 1662 from: number; 1663 1664 /** 1665 * The index of target tab content. 1666 * 1667 * @type { number } 1668 * @syscap SystemCapability.ArkUI.ArkUI.Full 1669 * @crossplatform 1670 * @form 1671 * @since 11 1672 */ 1673 /** 1674 * The index of target tab content. 1675 * 1676 * @type { number } 1677 * @syscap SystemCapability.ArkUI.ArkUI.Full 1678 * @crossplatform 1679 * @form 1680 * @atomicservice 1681 * @since 12 1682 */ 1683 to: number; 1684 1685 /** 1686 * Notifies Tabs component the custom content transition animation is complete. 1687 * 1688 * @syscap SystemCapability.ArkUI.ArkUI.Full 1689 * @crossplatform 1690 * @form 1691 * @since 11 1692 */ 1693 /** 1694 * Notifies Tabs component the custom content transition animation is complete. 1695 * 1696 * @syscap SystemCapability.ArkUI.ArkUI.Full 1697 * @crossplatform 1698 * @form 1699 * @atomicservice 1700 * @since 12 1701 */ 1702 finishTransition(): void; 1703} 1704 1705/** 1706 * Defines Tabs Component. 1707 * 1708 * @syscap SystemCapability.ArkUI.ArkUI.Full 1709 * @since 7 1710 */ 1711/** 1712 * Defines Tabs Component. 1713 * 1714 * @syscap SystemCapability.ArkUI.ArkUI.Full 1715 * @crossplatform 1716 * @since 10 1717 */ 1718/** 1719 * Defines Tabs Component. 1720 * 1721 * @syscap SystemCapability.ArkUI.ArkUI.Full 1722 * @crossplatform 1723 * @atomicservice 1724 * @since 11 1725 */ 1726declare const Tabs: TabsInterface; 1727 1728/** 1729 * Defines Tabs Component instance. 1730 * 1731 * @syscap SystemCapability.ArkUI.ArkUI.Full 1732 * @since 7 1733 */ 1734/** 1735 * Defines Tabs Component instance. 1736 * 1737 * @syscap SystemCapability.ArkUI.ArkUI.Full 1738 * @crossplatform 1739 * @since 10 1740 */ 1741/** 1742 * Defines Tabs Component instance. 1743 * 1744 * @syscap SystemCapability.ArkUI.ArkUI.Full 1745 * @crossplatform 1746 * @atomicservice 1747 * @since 11 1748 */ 1749declare const TabsInstance: TabsAttribute; 1750