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 * Provides methods for switching components. 18 * 19 * @syscap SystemCapability.ArkUI.ArkUI.Full 20 * @since 7 21 */ 22/** 23 * Provides methods for switching components. 24 * 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @crossplatform 27 * @since 10 28 * @form 29 */ 30declare class SwiperController { 31 /** 32 * constructor. 33 * 34 * @syscap SystemCapability.ArkUI.ArkUI.Full 35 * @since 7 36 */ 37 /** 38 * constructor. 39 * 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @since 10 43 * @form 44 */ 45 constructor(); 46 47 /** 48 * Called when the next child component is displayed. 49 * 50 * @syscap SystemCapability.ArkUI.ArkUI.Full 51 * @since 7 52 */ 53 /** 54 * Called when the next child component is displayed. 55 * 56 * @syscap SystemCapability.ArkUI.ArkUI.Full 57 * @crossplatform 58 * @since 10 59 * @form 60 */ 61 showNext(); 62 63 /** 64 * Called when the previous subcomponent is displayed. 65 * 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @since 7 68 */ 69 /** 70 * Called when the previous subcomponent is displayed. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @since 10 75 * @form 76 */ 77 showPrevious(); 78 79 /** 80 * Called when need to stop the swiper animation. 81 * 82 * @param { function } callback 83 * @syscap SystemCapability.ArkUI.ArkUI.Full 84 * @since 7 85 */ 86 /** 87 * Called when need to stop the swiper animation. 88 * 89 * @param { function } callback 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @crossplatform 92 * @since 10 93 * @form 94 */ 95 finishAnimation(callback?: () => void); 96} 97 98/** 99 * Defines the indicator class. 100 * 101 * @syscap SystemCapability.ArkUI.ArkUI.Full 102 * @crossplatform 103 * @since 10 104 * @form 105 */ 106declare class Indicator<T> { 107 /** 108 * Set the indicator to the left. 109 * 110 * @param { Length } value - the indicator to the left. 111 * @returns { T } 112 * @syscap SystemCapability.ArkUI.ArkUI.Full 113 * @crossplatform 114 * @since 10 115 * @form 116 */ 117 left(value: Length): T; 118 119 /** 120 * Set the indicator to the top. 121 * 122 * @param { Length } value - the indicator to the top. 123 * @returns { T } 124 * @syscap SystemCapability.ArkUI.ArkUI.Full 125 * @crossplatform 126 * @since 10 127 * @form 128 */ 129 top(value: Length): T; 130 131 /** 132 * Set the indicator to the right. 133 * 134 * @param { Length } value - the indicator to the right. 135 * @returns { T } 136 * @syscap SystemCapability.ArkUI.ArkUI.Full 137 * @crossplatform 138 * @since 10 139 * @form 140 */ 141 right(value: Length): T; 142 143 /** 144 * Set the indicator to the bottom. 145 * 146 * @param { Length } value - the indicator to the bottom. 147 * @returns { T } 148 * @syscap SystemCapability.ArkUI.ArkUI.Full 149 * @crossplatform 150 * @since 10 151 * @form 152 */ 153 bottom(value: Length): T; 154 155 /** 156 * DotIndicator class object. 157 * 158 * @returns { DotIndicator } 159 * @static 160 * @syscap SystemCapability.ArkUI.ArkUI.Full 161 * @crossplatform 162 * @since 10 163 * @form 164 */ 165 static dot(): DotIndicator; 166 167 /** 168 * DigitIndicator class object. 169 * 170 * @returns { DigitIndicator } 171 * @static 172 * @syscap SystemCapability.ArkUI.ArkUI.Full 173 * @crossplatform 174 * @since 10 175 * @form 176 */ 177 static digit(): DigitIndicator; 178} 179 180/** 181 * Define DotIndicator, the indicator type is dot. 182 * 183 * @extends Indicator 184 * @syscap SystemCapability.ArkUI.ArkUI.Full 185 * @crossplatform 186 * @since 10 187 * @form 188 */ 189declare class DotIndicator extends Indicator<DotIndicator> { 190 /** 191 * Constructor. 192 * 193 * @syscap SystemCapability.ArkUI.ArkUI.Full 194 * @crossplatform 195 * @since 10 196 * @form 197 */ 198 constructor(); 199 200 /** 201 * Set the indicator item width. 202 * 203 * @param { Length } value - the indicator item width. 204 * @returns { DotIndicator } 205 * @syscap SystemCapability.ArkUI.ArkUI.Full 206 * @crossplatform 207 * @since 10 208 * @form 209 */ 210 itemWidth(value: Length): DotIndicator; 211 212 /** 213 * Set the indicator item height. 214 * 215 * @param { Length } value - the indicator item height. 216 * @returns { DotIndicator } 217 * @syscap SystemCapability.ArkUI.ArkUI.Full 218 * @crossplatform 219 * @since 10 220 * @form 221 */ 222 itemHeight(value: Length): DotIndicator; 223 224 /** 225 * Set the indicator item width when selected. 226 * 227 * @param { Length } value - the indicator item width when selected. 228 * @returns { DotIndicator } 229 * @syscap SystemCapability.ArkUI.ArkUI.Full 230 * @crossplatform 231 * @since 10 232 * @form 233 */ 234 selectedItemWidth(value: Length): DotIndicator; 235 236 /** 237 * Set the indicator item height when selected. 238 * 239 * @param { Length } value - the indicator item height when selected. 240 * @returns { DotIndicator } 241 * @syscap SystemCapability.ArkUI.ArkUI.Full 242 * @crossplatform 243 * @since 10 244 * @form 245 */ 246 selectedItemHeight(value: Length): DotIndicator; 247 248 /** 249 * Setting indicator style mask. 250 * 251 * @param { boolean } value - the indicator item mask. 252 * @returns { DotIndicator } 253 * @syscap SystemCapability.ArkUI.ArkUI.Full 254 * @crossplatform 255 * @since 10 256 * @form 257 */ 258 mask(value: boolean): DotIndicator; 259 260 /** 261 * Set the indicator color. 262 * 263 * @param { ResourceColor } value - the indicator item color. 264 * @returns { DotIndicator } 265 * @syscap SystemCapability.ArkUI.ArkUI.Full 266 * @crossplatform 267 * @since 10 268 * @form 269 */ 270 color(value: ResourceColor): DotIndicator; 271 272 /** 273 * Set the navigation point color. 274 * 275 * @param { ResourceColor } value - the indicator item when selected. 276 * @returns { DotIndicator } 277 * @syscap SystemCapability.ArkUI.ArkUI.Full 278 * @crossplatform 279 * @since 10 280 * @form 281 */ 282 selectedColor(value: ResourceColor): DotIndicator; 283} 284 285/** 286 * Set Swiper column count adaptation. 287 * 288 * @syscap SystemCapability.ArkUI.ArkUI.Full 289 * @since 10 290 * @form 291 */ 292declare type SwiperAutoFill = { 293 /** 294 * Set minSize size. 295 * 296 * @syscap SystemCapability.ArkUI.ArkUI.Full 297 * @since 10 298 * @form 299 */ 300 minSize: VP; 301}; 302 303/** 304 * Define DigitIndicator, the indicator type is digit. 305 * 306 * @extends Indicator 307 * @syscap SystemCapability.ArkUI.ArkUI.Full 308 * @crossplatform 309 * @since 10 310 * @form 311 */ 312declare class DigitIndicator extends Indicator<DigitIndicator> { 313 /** 314 * Constructor. 315 * 316 * @syscap SystemCapability.ArkUI.ArkUI.Full 317 * @crossplatform 318 * @since 10 319 * @form 320 */ 321 constructor(); 322 323 /** 324 * Set font color of the digital indicator. 325 * 326 * @param { ResourceColor } value - the indicator font color. 327 * @returns { DigitIndicator } 328 * @syscap SystemCapability.ArkUI.ArkUI.Full 329 * @crossplatform 330 * @since 10 331 * @form 332 */ 333 fontColor(value: ResourceColor): DigitIndicator; 334 335 /** 336 * Set font color of the digital indicator when selected. 337 * 338 * @param { ResourceColor } value - the indicator font color when selected. 339 * @returns { DigitIndicator } 340 * @syscap SystemCapability.ArkUI.ArkUI.Full 341 * @crossplatform 342 * @since 10 343 * @form 344 */ 345 selectedFontColor(value: ResourceColor): DigitIndicator; 346 347 /** 348 * Set the digital indicator font (just support font size and weight). 349 * 350 * @param { Font } value - the indicator font size and weight. 351 * @returns { DigitIndicator } 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @crossplatform 354 * @since 10 355 * @form 356 */ 357 digitFont(value: Font): DigitIndicator; 358 359 /** 360 * Set the digital indicator font (just support font size and weight). 361 * 362 * @param { Font } value - the indicator font size and weight when selected. 363 * @returns { DigitIndicator } 364 * @syscap SystemCapability.ArkUI.ArkUI.Full 365 * @crossplatform 366 * @since 10 367 * @form 368 */ 369 selectedDigitFont(value: Font): DigitIndicator; 370} 371 372/** 373 * Arrow object. 374 * 375 * @interface ArrowStyle 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @since 10 378 */ 379declare interface ArrowStyle { 380 /** 381 * Is show the arrow background or not. 382 * 383 * @type { ?boolean } 384 * @default false 385 * @syscap SystemCapability.ArkUI.ArkUI.Full 386 * @since 10 387 */ 388 showBackground?: boolean; 389 390 /** 391 * When the indicator show, set the arrow position is side of the indicator or in the middle of content area. 392 * The arrow is displayed on side of the indicator, if the value is false. 393 * 394 * @type { ?boolean } 395 * @default false 396 * @syscap SystemCapability.ArkUI.ArkUI.Full 397 * @since 10 398 */ 399 isSidebarMiddle?: boolean; 400 401 /** 402 * The arrow background size. 403 * The size of the arrow is three-quarters of the background size, when the background is displayed. 404 * 405 * @type { ?Length } 406 * @default 24vp 407 * @syscap SystemCapability.ArkUI.ArkUI.Full 408 * @since 10 409 */ 410 backgroundSize?: Length; 411 412 /** 413 * The arrow background background color. 414 * 415 * @type { ?ResourceColor } 416 * @default #19182431 417 * @syscap SystemCapability.ArkUI.ArkUI.Full 418 * @since 10 419 */ 420 backgroundColor?: ResourceColor; 421 422 /** 423 * The arrow size. 424 * The arrow size can be set, when the background is not displayed. 425 * The size of the arrow is three-quarters of the background size, when the background is displayed. 426 * 427 * @type { ?Length } 428 * @default 18vp 429 * @syscap SystemCapability.ArkUI.ArkUI.Full 430 * @since 10 431 */ 432 arrowSize?: Length; 433 434 /** 435 * The arrow color. 436 * 437 * @type { ?ResourceColor } 438 * @default #182431 439 * @syscap SystemCapability.ArkUI.ArkUI.Full 440 * @since 10 441 */ 442 arrowColor?: ResourceColor; 443} 444 445/** 446 * Declare the size of the swiper on the spindle. 447 * 448 * @enum { number } 449 * @syscap SystemCapability.ArkUI.ArkUI.Full 450 * @since 7 451 */ 452/** 453 * Declare the size of the swiper on the spindle. 454 * 455 * @enum { number } 456 * @syscap SystemCapability.ArkUI.ArkUI.Full 457 * @crossplatform 458 * @since 10 459 * @form 460 */ 461declare enum SwiperDisplayMode { 462 /** 463 * Carousel map extension. 464 * 465 * @syscap SystemCapability.ArkUI.ArkUI.Full 466 * @since 7 467 * @deprecated since 10 468 * @useinstead SwiperDisplayMode#STRETCH 469 * @form 470 */ 471 Stretch, 472 473 /** 474 * The rotation chart is self linear. 475 * 476 * @syscap SystemCapability.ArkUI.ArkUI.Full 477 * @since 7 478 * @deprecated since 10 479 * @useinstead SwiperDisplayMode#AUTO_LINEAR 480 * @form 481 */ 482 AutoLinear, 483 484 /** 485 * Carousel map extension. 486 * 487 * @syscap SystemCapability.ArkUI.ArkUI.Full 488 * @crossplatform 489 * @since 10 490 * @form 491 */ 492 STRETCH, 493 494 /** 495 * The rotation chart is self linear. 496 * 497 * @syscap SystemCapability.ArkUI.ArkUI.Full 498 * @crossplatform 499 * @since 10 500 * @form 501 */ 502 AUTO_LINEAR, 503} 504 505/** 506 * Provides an interface for sliding containers. 507 * 508 * @interface SwiperInterface 509 * @syscap SystemCapability.ArkUI.ArkUI.Full 510 * @since 7 511 */ 512/** 513 * Provides an interface for sliding containers. 514 * 515 * @interface SwiperInterface 516 * @syscap SystemCapability.ArkUI.ArkUI.Full 517 * @crossplatform 518 * @since 10 519 * @form 520 */ 521interface SwiperInterface { 522 /** 523 * Called when a sliding container is set. 524 * 525 * @param { SwiperController } controller 526 * @returns { SwiperAttribute } 527 * @syscap SystemCapability.ArkUI.ArkUI.Full 528 * @since 7 529 */ 530 /** 531 * Called when a sliding container is set. 532 * 533 * @param { SwiperController } controller 534 * @returns { SwiperAttribute } 535 * @syscap SystemCapability.ArkUI.ArkUI.Full 536 * @crossplatform 537 * @since 10 538 * @form 539 */ 540 (controller?: SwiperController): SwiperAttribute; 541} 542 543/** 544 * Setting indicator style navigation. 545 * 546 * @interface IndicatorStyle 547 * @syscap SystemCapability.ArkUI.ArkUI.Full 548 * @since 8 549 * @deprecated since 10 550 */ 551declare interface IndicatorStyle { 552 /** 553 * Set the indicator to the left. 554 * 555 * @type { ?Length } 556 * @syscap SystemCapability.ArkUI.ArkUI.Full 557 * @since 8 558 * @deprecated since 10 559 */ 560 left?: Length; 561 562 /** 563 * Set the indicator to the top. 564 * 565 * @type { ?Length } 566 * @syscap SystemCapability.ArkUI.ArkUI.Full 567 * @since 8 568 * @deprecated since 10 569 */ 570 top?: Length; 571 572 /** 573 * Set the indicator to the right. 574 * 575 * @type { ?Length } 576 * @syscap SystemCapability.ArkUI.ArkUI.Full 577 * @since 8 578 * @deprecated since 10 579 */ 580 right?: Length; 581 582 /** 583 * Set the indicator to the bottom. 584 * 585 * @type { ?Length } 586 * @syscap SystemCapability.ArkUI.ArkUI.Full 587 * @since 8 588 * @deprecated since 10 589 */ 590 bottom?: Length; 591 592 /** 593 * Set the indicator size. 594 * 595 * @type { ?Length } 596 * @syscap SystemCapability.ArkUI.ArkUI.Full 597 * @since 8 598 * @deprecated since 10 599 */ 600 size?: Length; 601 602 /** 603 * Setting indicator style mask. 604 * 605 * @type { ?boolean } 606 * @syscap SystemCapability.ArkUI.ArkUI.Full 607 * @since 8 608 * @deprecated since 10 609 */ 610 mask?: boolean; 611 612 /** 613 * Set the indicator color. 614 * 615 * @type { ?ResourceColor } 616 * @syscap SystemCapability.ArkUI.ArkUI.Full 617 * @since 8 618 * @deprecated since 10 619 */ 620 color?: ResourceColor; 621 622 /** 623 * Set the navigation point color. 624 * 625 * @type { ?ResourceColor } 626 * @syscap SystemCapability.ArkUI.ArkUI.Full 627 * @since 8 628 * @deprecated since 10 629 */ 630 selectedColor?: ResourceColor; 631} 632 633/** 634 * Provides an interface for swiper animation. 635 * 636 * @interface SwiperAnimationEvent 637 * @syscap SystemCapability.ArkUI.ArkUI.Full 638 * @crossplatform 639 * @since 10 640 */ 641declare interface SwiperAnimationEvent { 642 /** 643 * Offset of the current page to the start position of the swiper main axis. The unit is vp. 644 * 645 * @type { number } 646 * @default 0.0 vp 647 * @syscap SystemCapability.ArkUI.ArkUI.Full 648 * @since 10 649 */ 650 currentOffset: number; 651 652 /** 653 * Offset of the target page to the start position of the swiper main axis. The unit is vp. 654 * 655 * @type { number } 656 * @default 0.0 vp 657 * @syscap SystemCapability.ArkUI.ArkUI.Full 658 * @since 10 659 */ 660 targetOffset: number; 661 662 /** 663 * Start speed of the page-turning animation. The unit is vp/s. 664 * 665 * @type { number } 666 * @default 0.0 vp/s 667 * @syscap SystemCapability.ArkUI.ArkUI.Full 668 * @since 10 669 */ 670 velocity: number; 671} 672 673/** 674 * Defines the swiper attribute functions. 675 * 676 * @extends CommonMethod 677 * @syscap SystemCapability.ArkUI.ArkUI.Full 678 * @since 7 679 */ 680/** 681 * Defines the swiper attribute functions. 682 * 683 * @extends CommonMethod 684 * @syscap SystemCapability.ArkUI.ArkUI.Full 685 * @crossplatform 686 * @since 10 687 * @form 688 */ 689declare class SwiperAttribute extends CommonMethod<SwiperAttribute> { 690 /** 691 * Called when the index value of the displayed subcomponent is set in the container. 692 * 693 * @param { number } value 694 * @returns { SwiperAttribute } 695 * @syscap SystemCapability.ArkUI.ArkUI.Full 696 * @since 7 697 */ 698 /** 699 * Called when the index value of the displayed subcomponent is set in the container. 700 * 701 * @param { number } value 702 * @returns { SwiperAttribute } 703 * @syscap SystemCapability.ArkUI.ArkUI.Full 704 * @crossplatform 705 * @since 10 706 * @form 707 */ 708 index(value: number): SwiperAttribute; 709 710 /** 711 * Called when setting whether the subcomponent plays automatically. 712 * 713 * @param { boolean } value 714 * @returns { SwiperAttribute } 715 * @syscap SystemCapability.ArkUI.ArkUI.Full 716 * @since 7 717 */ 718 /** 719 * Called when setting whether the subcomponent plays automatically. 720 * 721 * @param { boolean } value 722 * @returns { SwiperAttribute } 723 * @syscap SystemCapability.ArkUI.ArkUI.Full 724 * @crossplatform 725 * @since 10 726 * @form 727 */ 728 autoPlay(value: boolean): SwiperAttribute; 729 730 /** 731 * Called when the time interval for automatic playback is set. 732 * 733 * @param { number } value 734 * @returns { SwiperAttribute } 735 * @syscap SystemCapability.ArkUI.ArkUI.Full 736 * @since 7 737 */ 738 /** 739 * Called when the time interval for automatic playback is set. 740 * 741 * @param { number } value 742 * @returns { SwiperAttribute } 743 * @syscap SystemCapability.ArkUI.ArkUI.Full 744 * @crossplatform 745 * @since 10 746 * @form 747 */ 748 interval(value: number): SwiperAttribute; 749 750 /** 751 * Called when you set whether the navigation point indicator is enabled. 752 * 753 * @param { DotIndicator | DigitIndicator | boolean } value - show indicator of the swiper indicator. 754 * @returns { SwiperAttribute } 755 * @syscap SystemCapability.ArkUI.ArkUI.Full 756 * @since 7 757 */ 758 /** 759 * Set indicator is enabled, or set type style. 760 * 761 * @param { DotIndicator | DigitIndicator | boolean } value - the style value or show indicator of the swiper indicator. 762 * @returns { SwiperAttribute } 763 * @syscap SystemCapability.ArkUI.ArkUI.Full 764 * @crossplatform 765 * @since 10 766 * @form 767 */ 768 indicator(value: DotIndicator | DigitIndicator | boolean): SwiperAttribute; 769 770 /** 771 * Set arrow is enabled, or set the arrow style. 772 * 773 * @param { ArrowStyle | boolean } value - arrow is displayed or set the arrow style. 774 * @param { boolean } isHoverShow - arrow is display when mouse hover in indicator hotspot. 775 * @returns { SwiperAttribute } return the component attribute. 776 * @syscap SystemCapability.ArkUI.ArkUI.Full 777 * @since 10 778 */ 779 displayArrow(value: ArrowStyle | boolean, isHoverShow?: boolean): SwiperAttribute; 780 781 /** 782 * Called when setting whether to turn on cyclic sliding. 783 * 784 * @param { boolean } value 785 * @returns { SwiperAttribute } 786 * @syscap SystemCapability.ArkUI.ArkUI.Full 787 * @since 7 788 */ 789 /** 790 * Called when setting whether to turn on cyclic sliding. 791 * 792 * @param { boolean } value 793 * @returns { SwiperAttribute } 794 * @syscap SystemCapability.ArkUI.ArkUI.Full 795 * @crossplatform 796 * @since 10 797 * @form 798 */ 799 loop(value: boolean): SwiperAttribute; 800 801 /** 802 * Called when the animation duration of the switch is set. 803 * 804 * @param { number } value 805 * @returns { SwiperAttribute } 806 * @syscap SystemCapability.ArkUI.ArkUI.Full 807 * @since 7 808 */ 809 /** 810 * Called when the animation duration of the switch is set. 811 * 812 * @param { number } value 813 * @returns { SwiperAttribute } 814 * @syscap SystemCapability.ArkUI.ArkUI.Full 815 * @crossplatform 816 * @since 10 817 */ 818 duration(value: number): SwiperAttribute; 819 820 /** 821 * Called when setting whether to slide vertically. 822 * 823 * @param { boolean } value 824 * @returns { SwiperAttribute } 825 * @syscap SystemCapability.ArkUI.ArkUI.Full 826 * @since 7 827 */ 828 /** 829 * Called when setting whether to slide vertically. 830 * 831 * @param { boolean } value 832 * @returns { SwiperAttribute } 833 * @syscap SystemCapability.ArkUI.ArkUI.Full 834 * @crossplatform 835 * @since 10 836 * @form 837 */ 838 vertical(value: boolean): SwiperAttribute; 839 840 /** 841 * Called when the size of the rotation chart is set. 842 * 843 * @param { number | string } value 844 * @returns { SwiperAttribute } 845 * @syscap SystemCapability.ArkUI.ArkUI.Full 846 * @since 7 847 */ 848 /** 849 * Called when the size of the rotation chart is set. 850 * 851 * @param { number | string } value 852 * @returns { SwiperAttribute } 853 * @syscap SystemCapability.ArkUI.ArkUI.Full 854 * @crossplatform 855 * @since 10 856 * @form 857 */ 858 itemSpace(value: number | string): SwiperAttribute; 859 860 /** 861 * Called when setting the size of the swiper container on the spindle. 862 * 863 * @param { SwiperDisplayMode } value 864 * @returns { SwiperAttribute } 865 * @syscap SystemCapability.ArkUI.ArkUI.Full 866 * @since 7 867 */ 868 /** 869 * Called when setting the size of the swiper container on the spindle. 870 * 871 * @param { SwiperDisplayMode } value 872 * @returns { SwiperAttribute } 873 * @syscap SystemCapability.ArkUI.ArkUI.Full 874 * @crossplatform 875 * @since 10 876 * @form 877 */ 878 displayMode(value: SwiperDisplayMode): SwiperAttribute; 879 880 /** 881 * Called when setting the cached count of the swiper container one side. 882 * 883 * @param { number } value 884 * @returns { SwiperAttribute } 885 * @syscap SystemCapability.ArkUI.ArkUI.Full 886 * @since 8 887 */ 888 /** 889 * Called when setting the cached count of the swiper container one side. 890 * 891 * @param { number } value 892 * @returns { SwiperAttribute } 893 * @syscap SystemCapability.ArkUI.ArkUI.Full 894 * @crossplatform 895 * @since 10 896 * @form 897 */ 898 cachedCount(value: number): SwiperAttribute; 899 900 /** 901 * This command is invoked when the number of subcomponents is set. 902 * 903 * @param { number | string | SwiperAutoFill } value 904 * @returns { SwiperAttribute } 905 * @syscap SystemCapability.ArkUI.ArkUI.Full 906 * @since 8 907 */ 908 /** 909 * This command is invoked when the number of subcomponents is set. 910 * 911 * @param { number | string | SwiperAutoFill } value 912 * @returns { SwiperAttribute } 913 * @syscap SystemCapability.ArkUI.ArkUI.Full 914 * @crossplatform 915 * @since 10 916 * @form 917 */ 918 displayCount(value: number | string | SwiperAutoFill): SwiperAttribute; 919 920 /** 921 * Invoked when setting the sliding effect 922 * 923 * @param { EdgeEffect } value 924 * @returns { SwiperAttribute } 925 * @syscap SystemCapability.ArkUI.ArkUI.Full 926 * @since 8 927 */ 928 /** 929 * Invoked when setting the sliding effect 930 * 931 * @param { EdgeEffect } value 932 * @returns { SwiperAttribute } 933 * @syscap SystemCapability.ArkUI.ArkUI.Full 934 * @crossplatform 935 * @since 10 936 * @form 937 */ 938 effectMode(value: EdgeEffect): SwiperAttribute; 939 940 /** 941 * Called when sliding is disableSwipe 942 * 943 * @param { boolean } value 944 * @returns { SwiperAttribute } 945 * @syscap SystemCapability.ArkUI.ArkUI.Full 946 * @since 8 947 */ 948 /** 949 * Called when sliding is disableSwipe 950 * 951 * @param { boolean } value 952 * @returns { SwiperAttribute } 953 * @syscap SystemCapability.ArkUI.ArkUI.Full 954 * @crossplatform 955 * @since 10 956 * @form 957 */ 958 disableSwipe(value: boolean): SwiperAttribute; 959 960 /** 961 * Called when sliding is curve 962 * 963 * @param { Curve | string | ICurve } value 964 * @returns { SwiperAttribute } 965 * @syscap SystemCapability.ArkUI.ArkUI.Full 966 * @since 8 967 */ 968 /** 969 * Called when sliding is curve 970 * Curve is an enumeration type for common curves 971 * ICurve is a curve object 972 * 973 * @param { Curve | string | ICurve } value 974 * @returns { SwiperAttribute } 975 * @syscap SystemCapability.ArkUI.ArkUI.Full 976 * @crossplatform 977 * @since 10 978 * @form 979 */ 980 curve(value: Curve | string | ICurve): SwiperAttribute; 981 982 /** 983 * Called when the index value changes. 984 * 985 * @param { function } event 986 * @returns { SwiperAttribute } 987 * @syscap SystemCapability.ArkUI.ArkUI.Full 988 * @since 7 989 */ 990 /** 991 * Called when the index value changes. 992 * 993 * @param { function } event 994 * @returns { SwiperAttribute } 995 * @syscap SystemCapability.ArkUI.ArkUI.Full 996 * @crossplatform 997 * @since 10 998 * @form 999 */ 1000 onChange(event: (index: number) => void): SwiperAttribute; 1001 1002 /** 1003 * Setting indicator style navigation. 1004 * 1005 * @param { IndicatorStyle } value 1006 * @returns { SwiperAttribute } 1007 * @syscap SystemCapability.ArkUI.ArkUI.Full 1008 * @since 8 1009 * @deprecated since 10 1010 */ 1011 indicatorStyle(value?: IndicatorStyle): SwiperAttribute; 1012 1013 /** 1014 * The previous margin which can be used to expose a small portion of the previous item. 1015 * 1016 * @param { Length } value - The length of previous margin. 1017 * @returns { SwiperAttribute } The attribute of the swiper. 1018 * @syscap SystemCapability.ArkUI.ArkUI.Full 1019 * @since 10 1020 */ 1021 prevMargin(value: Length): SwiperAttribute; 1022 1023 /** 1024 * The next margin which can be used to expose a small portion of the latter item. 1025 * 1026 * @param { Length } value - The length of next margin. 1027 * @returns { SwiperAttribute } The attribute of the swiper. 1028 * @syscap SystemCapability.ArkUI.ArkUI.Full 1029 * @since 10 1030 */ 1031 nextMargin(value: Length): SwiperAttribute; 1032 1033 /** 1034 * Called when the swiper animation start. 1035 * 1036 * @param { function } event - the index value of the swiper page that when animation start. 1037 * @returns { SwiperAttribute } 1038 * @syscap SystemCapability.ArkUI.ArkUI.Full 1039 * @since 9 1040 */ 1041 /** 1042 * Called when the swiper animation start. 1043 * 1044 * @param { function } event 1045 * "index": the index value of the swiper page that when animation start. 1046 * "targetIndex": the target index value of the swiper page that when animation start. 1047 * "extraInfo": the extra callback info. 1048 * @returns { SwiperAttribute } 1049 * @syscap SystemCapability.ArkUI.ArkUI.Full 1050 * @crossplatform 1051 * @since 10 1052 * @form 1053 */ 1054 onAnimationStart(event: (index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => void): SwiperAttribute; 1055 1056 /** 1057 * Called when the swiper animation end. 1058 * 1059 * @param { function } event - the index value of the swiper page that when animation end. 1060 * @returns { SwiperAttribute } 1061 * @syscap SystemCapability.ArkUI.ArkUI.Full 1062 * @since 9 1063 */ 1064 /** 1065 * Called when the swiper animation end. 1066 * 1067 * @param { function } event 1068 * "index": the index value of the swiper page that when animation end. 1069 * "extraInfo": the extra callback info. 1070 * @returns { SwiperAttribute } 1071 * @syscap SystemCapability.ArkUI.ArkUI.Full 1072 * @crossplatform 1073 * @since 10 1074 * @form 1075 */ 1076 onAnimationEnd(event: (index: number, extraInfo: SwiperAnimationEvent) => void): SwiperAttribute; 1077 1078 /** 1079 * Called when the swiper swipe with the gesture. 1080 * 1081 * @param { function } event 1082 * "index": the index value of the swiper page before gesture swipe. 1083 * "extraInfo": the extra callback info. 1084 * @returns { SwiperAttribute } 1085 * @syscap SystemCapability.ArkUI.ArkUI.Full 1086 * @crossplatform 1087 * @since 10 1088 */ 1089 onGestureSwipe(event: (index: number, extraInfo: SwiperAnimationEvent) => void): SwiperAttribute; 1090} 1091 1092/** 1093 * Defines Swiper Component. 1094 * 1095 * @syscap SystemCapability.ArkUI.ArkUI.Full 1096 * @since 7 1097 */ 1098/** 1099 * Defines Swiper Component. 1100 * 1101 * @syscap SystemCapability.ArkUI.ArkUI.Full 1102 * @crossplatform 1103 * @since 10 1104 * @form 1105 */ 1106declare const Swiper: SwiperInterface; 1107 1108/** 1109 * Defines Swiper Component instance. 1110 * 1111 * @syscap SystemCapability.ArkUI.ArkUI.Full 1112 * @since 7 1113 */ 1114/** 1115 * Defines Swiper Component instance. 1116 * 1117 * @syscap SystemCapability.ArkUI.ArkUI.Full 1118 * @crossplatform 1119 * @since 10 1120 * @form 1121 */ 1122declare const SwiperInstance: SwiperAttribute; 1123