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 * Content scroll direction. 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 7 27 */ 28/** 29 * Content scroll direction. 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @since 10 35 */ 36/** 37 * Content scroll direction. 38 * 39 * @enum { number } 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @atomicservice 43 * @since 11 44 */ 45declare enum ScrollDirection { 46 /** 47 * Vertical scrolling is supported. 48 * 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @since 7 51 */ 52 /** 53 * Vertical scrolling is supported. 54 * 55 * @syscap SystemCapability.ArkUI.ArkUI.Full 56 * @crossplatform 57 * @since 10 58 */ 59 /** 60 * Vertical scrolling is supported. 61 * 62 * @syscap SystemCapability.ArkUI.ArkUI.Full 63 * @crossplatform 64 * @atomicservice 65 * @since 11 66 */ 67 Vertical, 68 69 /** 70 * Horizontal scrolling is supported. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @since 7 74 */ 75 /** 76 * Horizontal scrolling is supported. 77 * 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @since 10 81 */ 82 /** 83 * Horizontal scrolling is supported. 84 * 85 * @syscap SystemCapability.ArkUI.ArkUI.Full 86 * @crossplatform 87 * @atomicservice 88 * @since 11 89 */ 90 Horizontal, 91 92 /** 93 * Free scrolling is supported. 94 * 95 * @syscap SystemCapability.ArkUI.ArkUI.Full 96 * @since 7 97 * @deprecated since 9 98 */ 99 Free, 100 101 /** 102 * Non-scrollable. 103 * 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @since 7 106 */ 107 /** 108 * Non-scrollable. 109 * 110 * @syscap SystemCapability.ArkUI.ArkUI.Full 111 * @crossplatform 112 * @since 10 113 */ 114 /** 115 * Non-scrollable. 116 * 117 * @syscap SystemCapability.ArkUI.ArkUI.Full 118 * @crossplatform 119 * @atomicservice 120 * @since 11 121 */ 122 None, 123} 124 125/** 126 * ScrollAlign. 127 * 128 * @enum { number } ScrollAlign 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @crossplatform 131 * @since 10 132 */ 133/** 134 * ScrollAlign. 135 * 136 * @enum { number } ScrollAlign 137 * @syscap SystemCapability.ArkUI.ArkUI.Full 138 * @crossplatform 139 * @atomicservice 140 * @since 11 141 */ 142declare enum ScrollAlign { 143 /** 144 * Start position alignment. 145 * 146 * @syscap SystemCapability.ArkUI.ArkUI.Full 147 * @crossplatform 148 * @since 10 149 */ 150 /** 151 * Start position alignment. 152 * 153 * @syscap SystemCapability.ArkUI.ArkUI.Full 154 * @crossplatform 155 * @atomicservice 156 * @since 11 157 */ 158 START, 159 160 /** 161 * Center alignment. 162 * 163 * @syscap SystemCapability.ArkUI.ArkUI.Full 164 * @crossplatform 165 * @since 10 166 */ 167 /** 168 * Center alignment. 169 * 170 * @syscap SystemCapability.ArkUI.ArkUI.Full 171 * @crossplatform 172 * @atomicservice 173 * @since 11 174 */ 175 CENTER, 176 177 /** 178 * End position alignment. 179 * 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @crossplatform 182 * @since 10 183 */ 184 /** 185 * End position alignment. 186 * 187 * @syscap SystemCapability.ArkUI.ArkUI.Full 188 * @crossplatform 189 * @atomicservice 190 * @since 11 191 */ 192 END, 193 194 /** 195 * Scroll the minimum distance to fully display the specified item. 196 * 197 * @syscap SystemCapability.ArkUI.ArkUI.Full 198 * @crossplatform 199 * @since 10 200 */ 201 /** 202 * Scroll the minimum distance to fully display the specified item. 203 * 204 * @syscap SystemCapability.ArkUI.ArkUI.Full 205 * @crossplatform 206 * @atomicservice 207 * @since 11 208 */ 209 AUTO, 210} 211 212/** 213 * OffsetResult info. 214 * 215 * @interface OffsetResult 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @crossplatform 218 * @atomicservice 219 * @since 11 220 */ 221declare interface OffsetResult { 222 /** 223 * The X-axis offset. 224 * 225 * @type { number } 226 * @syscap SystemCapability.ArkUI.ArkUI.Full 227 * @crossplatform 228 * @atomicservice 229 * @since 11 230 */ 231 xOffset: number; 232 233 /** 234 * The y-axis offset. 235 * 236 * @type { number } 237 * @syscap SystemCapability.ArkUI.ArkUI.Full 238 * @crossplatform 239 * @atomicservice 240 * @since 11 241 */ 242 yOffset: number; 243} 244 245/** 246 * Define scroll edge options 247 * 248 * @interface ScrollEdgeOptions 249 * @syscap SystemCapability.ArkUI.ArkUI.Full 250 * @crossplatform 251 * @atomicservice 252 * @since 12 253 */ 254declare interface ScrollEdgeOptions { 255 /** 256 * The fasten speed of scrolling to the edge, unit is vp/s. 257 * 258 * @type { ?number } 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @crossplatform 261 * @atomicservice 262 * @since 12 263 */ 264 velocity?: number; 265} 266 267/** 268 * Define scrollToIndex options 269 * 270 * @interface ScrollToIndexOptions 271 * @syscap SystemCapability.ArkUI.ArkUI.Full 272 * @crossplatform 273 * @atomicservice 274 * @since 12 275 */ 276declare interface ScrollToIndexOptions { 277 /** 278 * The extra offset of scrolling to the index, unit is vp. 279 * 280 * @type { ?LengthMetrics } 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @atomicservice 284 * @since 12 285 */ 286 extraOffset?: LengthMetrics; 287} 288 289/** 290 * Provides custom animation parameters. 291 * 292 * @interface ScrollAnimationOptions 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @crossplatform 295 * @atomicservice 296 * @since 12 297 */ 298declare interface ScrollAnimationOptions { 299 /** 300 * Set the duration of the animation. 301 * 302 * @type { ?number } 303 * @syscap SystemCapability.ArkUI.ArkUI.Full 304 * @crossplatform 305 * @atomicservice 306 * @since 12 307 */ 308 duration?: number; 309 310 /** 311 * Set the curve of the animation. 312 * 313 * @type { ?(Curve | ICurve) } 314 * @syscap SystemCapability.ArkUI.ArkUI.Full 315 * @crossplatform 316 * @atomicservice 317 * @since 12 318 */ 319 curve?: Curve | ICurve; 320 321 /** 322 * Set whether the animation can over the boundary. 323 * 324 * @type { ?boolean } 325 * @default false 326 * @syscap SystemCapability.ArkUI.ArkUI.Full 327 * @crossplatform 328 * @atomicservice 329 * @since 12 330 */ 331 canOverScroll?: boolean; 332} 333 334/** 335 * OffsetOptions info. 336 * 337 * @interface OffsetOptions 338 * @syscap SystemCapability.ArkUI.ArkUI.Full 339 * @crossplatform 340 * @atomicservice 341 * @since 12 342 */ 343declare interface OffsetOptions { 344 /** 345 * The X-axis offset. 346 * 347 * @type { ?Dimension } 348 * @syscap SystemCapability.ArkUI.ArkUI.Full 349 * @crossplatform 350 * @atomicservice 351 * @since 12 352 */ 353 xOffset?: Dimension; 354 355 /** 356 * The y-axis offset. 357 * 358 * @type { ?Dimension } 359 * @syscap SystemCapability.ArkUI.ArkUI.Full 360 * @crossplatform 361 * @atomicservice 362 * @since 12 363 */ 364 yOffset?: Dimension; 365} 366 367/** 368 * Scroller 369 * 370 * @syscap SystemCapability.ArkUI.ArkUI.Full 371 * @since 7 372 */ 373/** 374 * Scroller 375 * 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @crossplatform 378 * @since 10 379 */ 380/** 381 * Scroller 382 * 383 * @syscap SystemCapability.ArkUI.ArkUI.Full 384 * @crossplatform 385 * @atomicservice 386 * @since 11 387 */ 388declare class Scroller { 389 /** 390 * constructor. 391 * 392 * @syscap SystemCapability.ArkUI.ArkUI.Full 393 * @since 7 394 */ 395 /** 396 * constructor. 397 * 398 * @syscap SystemCapability.ArkUI.ArkUI.Full 399 * @crossplatform 400 * @since 10 401 */ 402 /** 403 * constructor. 404 * 405 * @syscap SystemCapability.ArkUI.ArkUI.Full 406 * @crossplatform 407 * @atomicservice 408 * @since 11 409 */ 410 constructor(); 411 412 /** 413 * Called when the setting slides to the specified position. 414 * 415 * @param { object } value 416 * @syscap SystemCapability.ArkUI.ArkUI.Full 417 * @since 7 418 */ 419 /** 420 * Called when the setting slides to the specified position. 421 * 422 * @param { object } value 423 * @syscap SystemCapability.ArkUI.ArkUI.Full 424 * @crossplatform 425 * @since 10 426 */ 427 /** 428 * Called when the setting slides to the specified position. 429 * 430 * @param { object } value 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @crossplatform 433 * @atomicservice 434 * @since 11 435 */ 436 /** 437 * Called when the setting slides to the specified position. 438 * 439 * @param { ScrollOptions } options - scroll options 440 * @syscap SystemCapability.ArkUI.ArkUI.Full 441 * @crossplatform 442 * @atomicservice 443 * @since 13 444 */ 445 scrollTo(options: ScrollOptions); 446 447 /** 448 * Called when scrolling to the edge of the container. 449 * 450 * @param { Edge } value 451 * @syscap SystemCapability.ArkUI.ArkUI.Full 452 * @since 7 453 */ 454 /** 455 * Called when scrolling to the edge of the container. 456 * 457 * @param { Edge } value 458 * @syscap SystemCapability.ArkUI.ArkUI.Full 459 * @crossplatform 460 * @since 10 461 */ 462 /** 463 * Called when scrolling to the edge of the container. 464 * 465 * @param { Edge } value 466 * @syscap SystemCapability.ArkUI.ArkUI.Full 467 * @crossplatform 468 * @atomicservice 469 * @since 11 470 */ 471 /** 472 * Called when scrolling to the edge of the container. 473 * 474 * @param { Edge } value - Edge type of the container. 475 * @param { ScrollEdgeOptions } [options] - Options of scrolling to edge. 476 * @syscap SystemCapability.ArkUI.ArkUI.Full 477 * @crossplatform 478 * @atomicservice 479 * @since 12 480 */ 481 scrollEdge(value: Edge, options?: ScrollEdgeOptions); 482 483 /** 484 * Fling the scroll view. 485 * 486 * @param { number } velocity - initial velocity of fling, in vp/s. 487 * @throws { BusinessError } 401 - Parameter error. Possible causes: 488 * <br> 1. Mandatory parameters are left unspecified. 489 * <br> 2. Incorrect parameters types. 490 * <br> 3. Parameter verification failed. 491 * @throws { BusinessError } 100004 - Controller not bound to component. 492 * @syscap SystemCapability.ArkUI.ArkUI.Full 493 * @crossplatform 494 * @atomicservice 495 * @since 12 496 */ 497 fling(velocity: number): void; 498 499 /** 500 * Called when page turning mode is set. 501 * 502 * @param { object } value 503 * @syscap SystemCapability.ArkUI.ArkUI.Full 504 * @since 9 505 */ 506 /** 507 * Called when page turning mode is set. 508 * 509 * @param { object } value 510 * @syscap SystemCapability.ArkUI.ArkUI.Full 511 * @crossplatform 512 * @since 10 513 */ 514 /** 515 * Called when page turning mode is set. 516 * 517 * @param { object } value 518 * @syscap SystemCapability.ArkUI.ArkUI.Full 519 * @crossplatform 520 * @atomicservice 521 * @since 11 522 */ 523 /** 524 * Called when page turning mode is set. 525 * 526 * @param { ScrollPageOptions } value 527 * @syscap SystemCapability.ArkUI.ArkUI.Full 528 * @crossplatform 529 * @atomicservice 530 * @since 14 531 */ 532 scrollPage(value: ScrollPageOptions); 533 534 /** 535 * Called when page turning mode is set. 536 * 537 * @param { object } value 538 * @syscap SystemCapability.ArkUI.ArkUI.Full 539 * @since 7 540 * @deprecated since 9 541 */ 542 scrollPage(value: { next: boolean; direction?: Axis }); 543 544 /** 545 * Called when viewing the scroll offset. 546 * 547 * @syscap SystemCapability.ArkUI.ArkUI.Full 548 * @since 7 549 */ 550 /** 551 * Called when viewing the scroll offset. 552 * 553 * @syscap SystemCapability.ArkUI.ArkUI.Full 554 * @crossplatform 555 * @since 10 556 */ 557 /** 558 * Called when viewing the scroll offset. 559 * 560 * @returns { OffsetResult } Returns the current scrolling offset. If the scroller not bound to a component, the return value is void. 561 * @syscap SystemCapability.ArkUI.ArkUI.Full 562 * @crossplatform 563 * @atomicservice 564 * @since 11 565 */ 566 currentOffset() : OffsetResult; 567 568 /** 569 * Called when sliding to the specified index. 570 * 571 * @param { number } value 572 * @param { boolean } smooth 573 * @param { ScrollAlign } align 574 * @syscap SystemCapability.ArkUI.ArkUI.Full 575 * @since 7 576 */ 577 /** 578 * Called when sliding to the specified index. 579 * 580 * @param { number } value - Index to jump to. 581 * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. 582 * @param { ScrollAlign } align - Sets the alignment mode of a specified index. 583 * @syscap SystemCapability.ArkUI.ArkUI.Full 584 * @crossplatform 585 * @since 10 586 */ 587 /** 588 * Called when sliding to the specified index. 589 * 590 * @param { number } value - Index to jump to. 591 * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. 592 * @param { ScrollAlign } align - Sets the alignment mode of a specified index. 593 * @syscap SystemCapability.ArkUI.ArkUI.Full 594 * @crossplatform 595 * @atomicservice 596 * @since 11 597 */ 598 /** 599 * Scroll to the specified index. 600 * 601 * @param { number } value - Index to jump to. 602 * @param { boolean } [smooth] - If true, scroll to index item with animation. If false, scroll to index item without animation. 603 * @param { ScrollAlign } [align] - Sets the alignment mode of a specified index. 604 * @param { ScrollToIndexOptions } [options] - Sets the options of a specified index, such as extra offset. 605 * @syscap SystemCapability.ArkUI.ArkUI.Full 606 * @crossplatform 607 * @atomicservice 608 * @since 12 609 */ 610 scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions); 611 612 /** 613 * Called when the setting slides by offset. 614 * 615 * @param { Length } dx 616 * @param { Length } dy 617 * @syscap SystemCapability.ArkUI.ArkUI.Full 618 * @since 9 619 */ 620 /** 621 * Called when the setting slides by offset. 622 * 623 * @param { Length } dx 624 * @param { Length } dy 625 * @syscap SystemCapability.ArkUI.ArkUI.Full 626 * @crossplatform 627 * @since 10 628 */ 629 /** 630 * Called when the setting slides by offset. 631 * 632 * @param { Length } dx 633 * @param { Length } dy 634 * @syscap SystemCapability.ArkUI.ArkUI.Full 635 * @crossplatform 636 * @atomicservice 637 * @since 11 638 */ 639 scrollBy(dx: Length, dy: Length); 640 641 /** 642 * Indicates whether the component scrolls to the end position. 643 * 644 * @returns { boolean } Returns whether the component scrolls to the end position. 645 * @syscap SystemCapability.ArkUI.ArkUI.Full 646 * @crossplatform 647 * @since 10 648 */ 649 /** 650 * Indicates whether the component scrolls to the end position. 651 * 652 * @returns { boolean } Returns whether the component scrolls to the end position. 653 * @syscap SystemCapability.ArkUI.ArkUI.Full 654 * @crossplatform 655 * @atomicservice 656 * @since 11 657 */ 658 isAtEnd(): boolean; 659 660 /** 661 * Get child item size and position. 662 * 663 * @param { number } index - Index of the item. 664 * @returns { RectResult } Returns the size and position. 665 * @throws { BusinessError } 401 - Parameter error. Possible causes: 666 * <br> 1. Mandatory parameters are left unspecified. 667 * <br> 2. Incorrect parameters types. 668 * <br> 3. Parameter verification failed. 669 * @throws { BusinessError } 100004 - Controller not bound to component. 670 * @syscap SystemCapability.ArkUI.ArkUI.Full 671 * @crossplatform 672 * @since 11 673 */ 674 /** 675 * Get child item size and position. 676 * 677 * @param { number } index - Index of the item. 678 * @returns { RectResult } Returns the size and position. 679 * @throws { BusinessError } 401 - Parameter error. Possible causes: 680 * <br> 1. Mandatory parameters are left unspecified. 681 * <br> 2. Incorrect parameters types. 682 * <br> 3. Parameter verification failed. 683 * @throws { BusinessError } 100004 - Controller not bound to component. 684 * @syscap SystemCapability.ArkUI.ArkUI.Full 685 * @crossplatform 686 * @atomicservice 687 * @since 12 688 */ 689 getItemRect(index: number): RectResult; 690 691 /** 692 * Get item index by position. 693 * 694 * @param { number } x - X coordinate relative to the upper left corner of the current component's original area, in vp. 695 * @param { number } y - Y coordinate relative to the upper left corner of the current component's original area, in vp. 696 * @returns { number } Index of the item. 697 * @throws { BusinessError } 401 - Parameter error. Possible causes: 698 * <br> 1. Mandatory parameters are left unspecified. 699 * <br> 2. Incorrect parameters types. 700 * <br> 3. Parameter verification failed. 701 * @throws { BusinessError } 100004 - The controller not bound to component. 702 * @syscap SystemCapability.ArkUI.ArkUI.Full 703 * @crossplatform 704 * @atomicservice 705 * @since 13 706 */ 707 getItemIndex(x: number, y: number): number; 708} 709 710/** 711 * Define scroll options. 712 * 713 * @interface ScrollOptions 714 * @syscap SystemCapability.ArkUI.ArkUI.Full 715 * @crossplatform 716 * @atomicservice 717 * @since 13 718 */ 719declare interface ScrollOptions { 720 /** 721 * The X-axis offset. 722 * 723 * @type { number | string } 724 * @syscap SystemCapability.ArkUI.ArkUI.Full 725 * @crossplatform 726 * @since 10 727 */ 728 /** 729 * The X-axis offset. 730 * 731 * @type { number | string } 732 * @syscap SystemCapability.ArkUI.ArkUI.Full 733 * @crossplatform 734 * @atomicservice 735 * @since 11 736 */ 737 xOffset: number | string; 738 739 /** 740 * The Y-axis offset. 741 * 742 * @type { number | string } 743 * @syscap SystemCapability.ArkUI.ArkUI.Full 744 * @crossplatform 745 * @since 10 746 */ 747 /** 748 * The Y-axis offset. 749 * 750 * @type { number | string } 751 * @syscap SystemCapability.ArkUI.ArkUI.Full 752 * @crossplatform 753 * @atomicservice 754 * @since 11 755 */ 756 yOffset: number | string; 757 758 /** 759 * Descriptive animation. 760 * 761 * @type { ?({ duration?: number; curve?: Curve | ICurve } | boolean) } The object type provides custom animation parameters 762 * and the boolean type enables default spring animation. 763 * @syscap SystemCapability.ArkUI.ArkUI.Full 764 * @crossplatform 765 * @since 10 766 */ 767 /** 768 * Descriptive animation. 769 * 770 * @type { ?({ duration?: number; curve?: Curve | ICurve } | boolean) } The object type provides custom animation parameters 771 * and the boolean type enables default spring animation. 772 * @syscap SystemCapability.ArkUI.ArkUI.Full 773 * @crossplatform 774 * @atomicservice 775 * @since 11 776 */ 777 /** 778 * Descriptive animation. 779 * 780 * @type { ?( ScrollAnimationOptions | boolean) } The ScrollAnimationOptions type provides custom animation parameters 781 * and the boolean type enables default spring animation. 782 * @syscap SystemCapability.ArkUI.ArkUI.Full 783 * @crossplatform 784 * @atomicservice 785 * @since 12 786 */ 787 animation?: ScrollAnimationOptions | boolean; 788} 789 790/** 791 * Define scroll page options 792 * @interface ScrollPageOptions 793 * @syscap SystemCapability.ArkUI.ArkUI.Full 794 * @atomicservice 795 * @since 14 796 */ 797declare interface ScrollPageOptions { 798 /** 799 * Control whether to scroll to the next page or the previous page. 800 * 801 * @type { boolean } 802 * @syscap SystemCapability.ArkUI.ArkUI.Full 803 * @crossplatform 804 * @atomicservice 805 * @since 14 806 */ 807 next: boolean; 808 809 /** 810 * Set whether the scrollPage have animate. 811 * 812 * @type { ?boolean } 813 * @default false 814 * @syscap SystemCapability.ArkUI.ArkUI.Full 815 * @crossplatform 816 * @atomicservice 817 * @since 14 818 */ 819 animation?: boolean; 820} 821 822/** 823 * Define scroll snap options 824 * 825 * @interface ScrollSnapOptions 826 * @syscap SystemCapability.ArkUI.ArkUI.Full 827 * @since 10 828 */ 829/** 830 * Define scroll snap options 831 * 832 * @interface ScrollSnapOptions 833 * @syscap SystemCapability.ArkUI.ArkUI.Full 834 * @atomicservice 835 * @since 11 836 */ 837declare interface ScrollSnapOptions { 838 /** 839 * Set scroll snap alignment. 840 * 841 * @type { ScrollSnapAlign } 842 * @syscap SystemCapability.ArkUI.ArkUI.Full 843 * @since 10 844 */ 845 /** 846 * Set scroll snap alignment. 847 * 848 * @type { ScrollSnapAlign } 849 * @syscap SystemCapability.ArkUI.ArkUI.Full 850 * @atomicservice 851 * @since 11 852 */ 853 snapAlign: ScrollSnapAlign; 854 855 /** 856 * Set snap positions. When the type of snapPositions is Dimension, Scroll content is paginated by an integer 857 * multiple of snapPositions. When the type of snapPositions is Array<number>, Scroll content is paginated based 858 * on the array of snapPositions. 859 * 860 * @type { ?(Dimension | Array<Dimension>) } 861 * @default 100% 862 * @syscap SystemCapability.ArkUI.ArkUI.Full 863 * @since 10 864 */ 865 /** 866 * Set snap positions. When the type of snapPositions is Dimension, Scroll content is paginated by an integer 867 * multiple of snapPositions. When the type of snapPositions is Array<number>, Scroll content is paginated based 868 * on the array of snapPositions. 869 * 870 * @type { ?(Dimension | Array<Dimension>) } 871 * @default 100% 872 * @syscap SystemCapability.ArkUI.ArkUI.Full 873 * @atomicservice 874 * @since 11 875 */ 876 snapPagination?: Dimension | Array<Dimension>; 877 878 /** 879 * Set whether the beginning of the Scroll content counts an a snap. 880 * 881 * @type { ?boolean } 882 * @default true 883 * @syscap SystemCapability.ArkUI.ArkUI.Full 884 * @since 10 885 */ 886 /** 887 * Set whether the beginning of the Scroll content counts an a snap. 888 * 889 * @type { ?boolean } 890 * @default true 891 * @syscap SystemCapability.ArkUI.ArkUI.Full 892 * @atomicservice 893 * @since 11 894 */ 895 enableSnapToStart?: boolean; 896 897 /** 898 * Set whether the end of the Scroll content counts an a snap. 899 * 900 * @type { ?boolean } 901 * @default true 902 * @syscap SystemCapability.ArkUI.ArkUI.Full 903 * @since 10 904 */ 905 /** 906 * Set whether the end of the Scroll content counts an a snap. 907 * 908 * @type { ?boolean } 909 * @default true 910 * @syscap SystemCapability.ArkUI.ArkUI.Full 911 * @atomicservice 912 * @since 11 913 */ 914 enableSnapToEnd?: boolean; 915} 916 917/** 918 * Provides interfaces for scrollable containers. 919 * 920 * @interface ScrollInterface 921 * @syscap SystemCapability.ArkUI.ArkUI.Full 922 * @since 7 923 */ 924/** 925 * Provides interfaces for scrollable containers. 926 * 927 * @interface ScrollInterface 928 * @syscap SystemCapability.ArkUI.ArkUI.Full 929 * @crossplatform 930 * @since 10 931 */ 932/** 933 * Provides interfaces for scrollable containers. 934 * 935 * @interface ScrollInterface 936 * @syscap SystemCapability.ArkUI.ArkUI.Full 937 * @crossplatform 938 * @atomicservice 939 * @since 11 940 */ 941interface ScrollInterface { 942 /** 943 * Called when a scrollable container is set. 944 * 945 * @param { Scroller } scroller 946 * @returns { ScrollAttribute } 947 * @syscap SystemCapability.ArkUI.ArkUI.Full 948 * @since 7 949 */ 950 /** 951 * Called when a scrollable container is set. 952 * 953 * @param { Scroller } scroller 954 * @returns { ScrollAttribute } 955 * @syscap SystemCapability.ArkUI.ArkUI.Full 956 * @crossplatform 957 * @since 10 958 */ 959 /** 960 * Called when a scrollable container is set. 961 * 962 * @param { Scroller } scroller 963 * @returns { ScrollAttribute } 964 * @syscap SystemCapability.ArkUI.ArkUI.Full 965 * @crossplatform 966 * @atomicservice 967 * @since 11 968 */ 969 (scroller?: Scroller): ScrollAttribute; 970} 971 972/** 973 * Defines a Scroll onScrollEdge callback. 974 * 975 * @typedef { function } OnScrollEdgeCallback 976 * @param { Edge } side - the edge position scrolled to 977 * @syscap SystemCapability.ArkUI.ArkUI.Full 978 * @crossplatform 979 * @atomicservice 980 * @since 13 981 */ 982declare type OnScrollEdgeCallback = (side: Edge) => void; 983 984/** 985 * The data returned by the event handler when onScrollFrameBegin. 986 * 987 * @interface OnScrollFrameBeginHandlerResult 988 * @syscap SystemCapability.ArkUI.ArkUI.Full 989 * @crossplatform 990 * @atomicservice 991 * @since 13 992 */ 993interface OnScrollFrameBeginHandlerResult { 994 /** 995 * Actual sliding amount, unit vp. 996 * 997 * @type { number } 998 * @syscap SystemCapability.ArkUI.ArkUI.Full 999 * @since 9 1000 */ 1001 /** 1002 * Actual sliding amount, unit vp. 1003 * 1004 * @type { number } 1005 * @syscap SystemCapability.ArkUI.ArkUI.Full 1006 * @crossplatform 1007 * @since 10 1008 */ 1009 /** 1010 * Actual sliding amount, unit vp. 1011 * 1012 * @type { number } 1013 * @syscap SystemCapability.ArkUI.ArkUI.Full 1014 * @crossplatform 1015 * @atomicservice 1016 * @since 11 1017 */ 1018 offsetRemain: number; 1019} 1020 1021/** 1022 * Defines a Scroll onScrollFrameBegin callback. 1023 * 1024 * @typedef { function } OnScrollFrameBeginCallback 1025 * @param { number } offset - The upcoming sliding amount, unit vp 1026 * @param { ScrollState } state - current sliding status 1027 * @returns { OnScrollFrameBeginHandlerResult } data - the scroll data return by handler 1028 * @syscap SystemCapability.ArkUI.ArkUI.Full 1029 * @crossplatform 1030 * @atomicservice 1031 * @since 13 1032 */ 1033declare type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) => OnScrollFrameBeginHandlerResult; 1034 1035/** 1036 * Defines the scroll attribute functions. 1037 * 1038 * @extends CommonMethod<ScrollAttribute> 1039 * @syscap SystemCapability.ArkUI.ArkUI.Full 1040 * @since 7 1041 */ 1042/** 1043 * Defines the scroll attribute functions. 1044 * 1045 * @extends CommonMethod<ScrollAttribute> 1046 * @syscap SystemCapability.ArkUI.ArkUI.Full 1047 * @crossplatform 1048 * @since 10 1049 */ 1050/** 1051 * Defines the scroll attribute functions. 1052 * 1053 * @extends ScrollableCommonMethod<ScrollAttribute> 1054 * @syscap SystemCapability.ArkUI.ArkUI.Full 1055 * @crossplatform 1056 * @atomicservice 1057 * @since 11 1058 */ 1059declare class ScrollAttribute extends ScrollableCommonMethod<ScrollAttribute> { 1060 /** 1061 * Called when the scroll method is slid. 1062 * 1063 * @param { ScrollDirection } value 1064 * @returns { ScrollAttribute } 1065 * @syscap SystemCapability.ArkUI.ArkUI.Full 1066 * @since 7 1067 */ 1068 /** 1069 * Called when the scroll method is slid. 1070 * 1071 * @param { ScrollDirection } value 1072 * @returns { ScrollAttribute } 1073 * @syscap SystemCapability.ArkUI.ArkUI.Full 1074 * @crossplatform 1075 * @since 10 1076 */ 1077 /** 1078 * Called when the scroll method is slid. 1079 * 1080 * @param { ScrollDirection } value 1081 * @returns { ScrollAttribute } 1082 * @syscap SystemCapability.ArkUI.ArkUI.Full 1083 * @crossplatform 1084 * @atomicservice 1085 * @since 11 1086 */ 1087 scrollable(value: ScrollDirection): ScrollAttribute; 1088 1089 /** 1090 * Called when the setting slides to the specified position. 1091 * 1092 * @param { function } event 1093 * @returns { ScrollAttribute } 1094 * @syscap SystemCapability.ArkUI.ArkUI.Full 1095 * @since 7 1096 */ 1097 /** 1098 * Called when the setting slides to the specified position. 1099 * 1100 * @param { function } event 1101 * @returns { ScrollAttribute } 1102 * @syscap SystemCapability.ArkUI.ArkUI.Full 1103 * @crossplatform 1104 * @since 10 1105 */ 1106 /** 1107 * Called when the setting slides to the specified position. 1108 * 1109 * @param { function } event 1110 * @returns { ScrollAttribute } 1111 * @syscap SystemCapability.ArkUI.ArkUI.Full 1112 * @crossplatform 1113 * @atomicservice 1114 * @since 11 1115 * @deprecated since 12 1116 * @useinstead scroll/Scroll#onWillScroll 1117 * 1118 */ 1119 onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute; 1120 1121 /** 1122 * Called when the Scroll will scroll. 1123 * 1124 * @param { ScrollOnWillScrollCallback } handler - callback of Scroll 1125 * @returns { ScrollAttribute } 1126 * @syscap SystemCapability.ArkUI.ArkUI.Full 1127 * @crossplatform 1128 * @atomicservice 1129 * @since 12 1130 */ 1131 onWillScroll(handler: ScrollOnWillScrollCallback): ScrollAttribute; 1132 1133 /** 1134 * Called when the Scroll did scroll. 1135 * 1136 * @param { ScrollOnScrollCallback } handler - callback of Scroll, 1137 * xOffset and yOffset are offsets this frame did scroll, scrollState is current scroll state. 1138 * @returns { ScrollAttribute } 1139 * @syscap SystemCapability.ArkUI.ArkUI.Full 1140 * @crossplatform 1141 * @atomicservice 1142 * @since 12 1143 */ 1144 onDidScroll(handler: ScrollOnScrollCallback): ScrollAttribute; 1145 1146 /** 1147 * Called when scrolling to the edge of the container. 1148 * 1149 * @param { function } event 1150 * @returns { ScrollAttribute } 1151 * @syscap SystemCapability.ArkUI.ArkUI.Full 1152 * @since 7 1153 */ 1154 /** 1155 * Called when scrolling to the edge of the container. 1156 * 1157 * @param { function } event 1158 * @returns { ScrollAttribute } 1159 * @syscap SystemCapability.ArkUI.ArkUI.Full 1160 * @crossplatform 1161 * @since 10 1162 */ 1163 /** 1164 * Called when scrolling to the edge of the container. 1165 * 1166 * @param { function } event 1167 * @returns { ScrollAttribute } 1168 * @syscap SystemCapability.ArkUI.ArkUI.Full 1169 * @crossplatform 1170 * @atomicservice 1171 * @since 11 1172 */ 1173 /** 1174 * Called when scrolling to the edge of the container. 1175 * 1176 * @param { OnScrollEdgeCallback } event 1177 * @returns { ScrollAttribute } 1178 * @syscap SystemCapability.ArkUI.ArkUI.Full 1179 * @crossplatform 1180 * @atomicservice 1181 * @since 13 1182 */ 1183 onScrollEdge(event: OnScrollEdgeCallback): ScrollAttribute; 1184 1185 /** 1186 * Called when scrolling start. 1187 * 1188 * @param { function } event 1189 * @returns { ScrollAttribute } 1190 * @syscap SystemCapability.ArkUI.ArkUI.Full 1191 * @since 9 1192 */ 1193 /** 1194 * Called when scrolling start. 1195 * 1196 * @param { function } event 1197 * @returns { ScrollAttribute } 1198 * @syscap SystemCapability.ArkUI.ArkUI.Full 1199 * @crossplatform 1200 * @since 10 1201 */ 1202 /** 1203 * Called when scrolling start. 1204 * 1205 * @param { function } event 1206 * @returns { ScrollAttribute } 1207 * @syscap SystemCapability.ArkUI.ArkUI.Full 1208 * @crossplatform 1209 * @atomicservice 1210 * @since 11 1211 */ 1212 /** 1213 * Called when scrolling start. 1214 * 1215 * @param { VoidCallback } event 1216 * @returns { ScrollAttribute } 1217 * @syscap SystemCapability.ArkUI.ArkUI.Full 1218 * @crossplatform 1219 * @atomicservice 1220 * @since 13 1221 */ 1222 onScrollStart(event: VoidCallback): ScrollAttribute; 1223 1224 /** 1225 * Called when scrolling has stopped. 1226 * 1227 * @param { function } event 1228 * @returns { ScrollAttribute } 1229 * @syscap SystemCapability.ArkUI.ArkUI.Full 1230 * @since 7 1231 * @deprecated since 9 1232 * @useinstead scroll/Scroll#onScrollStop 1233 */ 1234 onScrollEnd(event: () => void): ScrollAttribute; 1235 1236 /** 1237 * Called when scrolling has stopped. 1238 * 1239 * @param { function } event 1240 * @returns { ScrollAttribute } 1241 * @syscap SystemCapability.ArkUI.ArkUI.Full 1242 * @since 9 1243 */ 1244 /** 1245 * Called when scrolling has stopped. 1246 * 1247 * @param { function } event 1248 * @returns { ScrollAttribute } 1249 * @syscap SystemCapability.ArkUI.ArkUI.Full 1250 * @crossplatform 1251 * @since 10 1252 */ 1253 /** 1254 * Called when scrolling has stopped. 1255 * 1256 * @param { function } event 1257 * @returns { ScrollAttribute } 1258 * @syscap SystemCapability.ArkUI.ArkUI.Full 1259 * @crossplatform 1260 * @atomicservice 1261 * @since 11 1262 */ 1263 /** 1264 * Called when scrolling has stopped. 1265 * 1266 * @param { VoidCallback } event 1267 * @returns { ScrollAttribute } 1268 * @syscap SystemCapability.ArkUI.ArkUI.Full 1269 * @crossplatform 1270 * @atomicservice 1271 * @since 13 1272 */ 1273 onScrollStop(event: VoidCallback): ScrollAttribute; 1274 1275 /** 1276 * Called when the status of the scroll bar is set. 1277 * 1278 * @param { BarState } barState 1279 * @returns { ScrollAttribute } 1280 * @syscap SystemCapability.ArkUI.ArkUI.Full 1281 * @since 7 1282 */ 1283 /** 1284 * Called when the status of the scroll bar is set. 1285 * 1286 * @param { BarState } barState 1287 * @returns { ScrollAttribute } 1288 * @syscap SystemCapability.ArkUI.ArkUI.Full 1289 * @crossplatform 1290 * @since 10 1291 */ 1292 /** 1293 * Called when the status of the scroll bar is set. 1294 * 1295 * @param { BarState } barState 1296 * @returns { ScrollAttribute } 1297 * @syscap SystemCapability.ArkUI.ArkUI.Full 1298 * @crossplatform 1299 * @atomicservice 1300 * @since 11 1301 */ 1302 scrollBar(barState: BarState): ScrollAttribute; 1303 1304 /** 1305 * Called when the color of the scroll bar is set. 1306 * 1307 * @param { Color | number | string } color 1308 * @returns { ScrollAttribute } 1309 * @syscap SystemCapability.ArkUI.ArkUI.Full 1310 * @since 7 1311 */ 1312 /** 1313 * Called when the color of the scroll bar is set. 1314 * 1315 * @param { Color | number | string } color 1316 * @returns { ScrollAttribute } 1317 * @syscap SystemCapability.ArkUI.ArkUI.Full 1318 * @crossplatform 1319 * @since 10 1320 */ 1321 /** 1322 * Called when the color of the scroll bar is set. 1323 * 1324 * @param { Color | number | string } color 1325 * @returns { ScrollAttribute } 1326 * @syscap SystemCapability.ArkUI.ArkUI.Full 1327 * @crossplatform 1328 * @atomicservice 1329 * @since 11 1330 */ 1331 scrollBarColor(color: Color | number | string): ScrollAttribute; 1332 1333 /** 1334 * Called when the width of the scroll bar is set. 1335 * 1336 * @param { number | string } value 1337 * @returns { ScrollAttribute } 1338 * @syscap SystemCapability.ArkUI.ArkUI.Full 1339 * @since 7 1340 */ 1341 /** 1342 * Called when the width of the scroll bar is set. 1343 * 1344 * @param { number | string } value 1345 * @returns { ScrollAttribute } 1346 * @syscap SystemCapability.ArkUI.ArkUI.Full 1347 * @crossplatform 1348 * @since 10 1349 */ 1350 /** 1351 * Called when the width of the scroll bar is set. 1352 * 1353 * @param { number | string } value 1354 * @returns { ScrollAttribute } 1355 * @syscap SystemCapability.ArkUI.ArkUI.Full 1356 * @crossplatform 1357 * @atomicservice 1358 * @since 11 1359 */ 1360 scrollBarWidth(value: number | string): ScrollAttribute; 1361 1362 /** 1363 * Called when the sliding effect is set. 1364 * 1365 * @param { EdgeEffect } edgeEffect 1366 * @returns { ScrollAttribute } 1367 * @syscap SystemCapability.ArkUI.ArkUI.Full 1368 * @since 7 1369 */ 1370 /** 1371 * Called when the sliding effect is set. 1372 * 1373 * @param { EdgeEffect } edgeEffect 1374 * @returns { ScrollAttribute } 1375 * @syscap SystemCapability.ArkUI.ArkUI.Full 1376 * @crossplatform 1377 * @since 10 1378 */ 1379 /** 1380 * Called when the sliding effect is set. 1381 * 1382 * @param { EdgeEffect } edgeEffect 1383 * @param { EdgeEffectOptions } options 1384 * @returns { ScrollAttribute } 1385 * @syscap SystemCapability.ArkUI.ArkUI.Full 1386 * @crossplatform 1387 * @atomicservice 1388 * @since 11 1389 */ 1390 edgeEffect(edgeEffect: EdgeEffect, options?: EdgeEffectOptions): ScrollAttribute; 1391 1392 /** 1393 * Called when scrolling begin each frame. 1394 * 1395 * @param { function } event 1396 * @returns { ScrollAttribute } 1397 * @syscap SystemCapability.ArkUI.ArkUI.Full 1398 * @since 9 1399 */ 1400 /** 1401 * Called when scrolling begin each frame. 1402 * 1403 * @param { function } event 1404 * @returns { ScrollAttribute } 1405 * @syscap SystemCapability.ArkUI.ArkUI.Full 1406 * @crossplatform 1407 * @since 10 1408 */ 1409 /** 1410 * Called when scrolling begin each frame. 1411 * 1412 * @param { function } event 1413 * @returns { ScrollAttribute } 1414 * @syscap SystemCapability.ArkUI.ArkUI.Full 1415 * @crossplatform 1416 * @atomicservice 1417 * @since 11 1418 */ 1419 /** 1420 * Called when scrolling begin each frame. 1421 * 1422 * @param { OnScrollFrameBeginCallback } event 1423 * @returns { ScrollAttribute } 1424 * @syscap SystemCapability.ArkUI.ArkUI.Full 1425 * @crossplatform 1426 * @atomicservice 1427 * @since 13 1428 */ 1429 onScrollFrameBegin(event: OnScrollFrameBeginCallback): ScrollAttribute; 1430 1431 /** 1432 * Called to setting the nested scroll options. 1433 * 1434 * @param { NestedScrollOptions } value - options for nested scrolling. 1435 * @returns { ScrollAttribute } the attribute of the scroll. 1436 * @syscap SystemCapability.ArkUI.ArkUI.Full 1437 * @since 10 1438 */ 1439 /** 1440 * Called to setting the nested scroll options. 1441 * 1442 * @param { NestedScrollOptions } value - options for nested scrolling. 1443 * @returns { ScrollAttribute } the attribute of the scroll. 1444 * @syscap SystemCapability.ArkUI.ArkUI.Full 1445 * @crossplatform 1446 * @atomicservice 1447 * @since 11 1448 */ 1449 nestedScroll(value: NestedScrollOptions): ScrollAttribute; 1450 1451 /** 1452 * Called when setting whether to enable scroll by gesture or mouse. 1453 * 1454 * @param { boolean } value 1455 * @returns { ScrollAttribute } The attribute of the scroll 1456 * @syscap SystemCapability.ArkUI.ArkUI.Full 1457 * @crossplatform 1458 * @since 10 1459 */ 1460 /** 1461 * Called when setting whether to enable scroll by gesture or mouse. 1462 * 1463 * @param { boolean } value 1464 * @returns { ScrollAttribute } The attribute of the scroll 1465 * @syscap SystemCapability.ArkUI.ArkUI.Full 1466 * @crossplatform 1467 * @atomicservice 1468 * @since 11 1469 */ 1470 enableScrollInteraction(value: boolean): ScrollAttribute; 1471 1472 /** 1473 * Called to setting the friction. 1474 * 1475 * @param { number | Resource } value - options for scrolling friction. 1476 * @returns { ScrollAttribute } the attribute of the scroll. 1477 * @syscap SystemCapability.ArkUI.ArkUI.Full 1478 * @crossplatform 1479 * @since 10 1480 */ 1481 /** 1482 * Called to setting the friction. 1483 * 1484 * @param { number | Resource } value - options for scrolling friction. 1485 * @returns { ScrollAttribute } the attribute of the scroll. 1486 * @syscap SystemCapability.ArkUI.ArkUI.Full 1487 * @crossplatform 1488 * @atomicservice 1489 * @since 11 1490 */ 1491 friction(value: number | Resource): ScrollAttribute; 1492 1493 /** 1494 * Called to setting the scroll snap options. 1495 * 1496 * @param { ScrollSnapOptions } value - options for scroll snap. 1497 * @returns { ScrollAttribute } the attribute of the scroll. 1498 * @syscap SystemCapability.ArkUI.ArkUI.Full 1499 * @since 10 1500 */ 1501 /** 1502 * Called to setting the scroll snap options. 1503 * 1504 * @param { ScrollSnapOptions } value - options for scroll snap. 1505 * @returns { ScrollAttribute } the attribute of the scroll. 1506 * @syscap SystemCapability.ArkUI.ArkUI.Full 1507 * @atomicservice 1508 * @since 11 1509 */ 1510 scrollSnap(value: ScrollSnapOptions): ScrollAttribute; 1511 1512 /** 1513 * Determines whether the scroll view stops on multiples of the content size when the user scrolls. 1514 * 1515 * @param { boolean } value - A boolean value determines whether paging is enabled for scroll. 1516 * @returns { ScrollAttribute } the attribute of the scroll. 1517 * @syscap SystemCapability.ArkUI.ArkUI.Full 1518 * @crossplatform 1519 * @since 11 1520 */ 1521 /** 1522 * Determines whether the scroll view stops on multiples of the content size when the user scrolls. 1523 * 1524 * @param { boolean } value - A boolean value determines whether paging is enabled for scroll. 1525 * @returns { ScrollAttribute } the attribute of the scroll. 1526 * @syscap SystemCapability.ArkUI.ArkUI.Full 1527 * @crossplatform 1528 * @atomicservice 1529 * @since 12 1530 */ 1531 enablePaging(value: boolean): ScrollAttribute; 1532 1533 /** 1534 * Called to setting the initial offset 1535 * 1536 * @param { OffsetOptions } value - options for scroll initial offset. 1537 * @returns { ScrollAttribute } the attribute of the scroll. 1538 * @syscap SystemCapability.ArkUI.ArkUI.Full 1539 * @crossplatform 1540 * @atomicservice 1541 * @since 12 1542 */ 1543 initialOffset(value: OffsetOptions): ScrollAttribute; 1544} 1545 1546/** 1547 * callback of Scroll, using in onDidScroll. 1548 * 1549 * @typedef { function } ScrollOnScrollCallback 1550 * @param { number } xOffset - horizontal offset this frame did scroll. 1551 * @param { number } yOffset - vertical offset this frame did scroll. 1552 * @param { ScrollState } scrollState - current scroll state. 1553 * @syscap SystemCapability.ArkUI.ArkUI.Full 1554 * @crossplatform 1555 * @atomicservice 1556 * @since 12 1557 */ 1558declare type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState) => void; 1559 1560/** 1561 * Called before scroll to allow developer to control real offset the Scroll can scroll. 1562 * 1563 * @typedef { function } ScrollOnWillScrollCallback 1564 * @param { number } xOffset - horizontal offset this frame will scroll, which may or may not be reached. 1565 * @param { number } yOffset - vertical offset this frame will scroll, which may or may not be reached. 1566 * @param { ScrollState } scrollState - current scroll state. 1567 * @param { ScrollSource } scrollSource - source of current scroll. 1568 * @returns { void | OffsetResult } the remain offset for the Scroll, 1569 * same as (xOffset, yOffset) when no OffsetResult is returned. 1570 * @syscap SystemCapability.ArkUI.ArkUI.Full 1571 * @crossplatform 1572 * @atomicservice 1573 * @since 12 1574 */ 1575declare type ScrollOnWillScrollCallback = 1576 (xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => void | OffsetResult; 1577 1578/** 1579 * Defines Scroll Component. 1580 * 1581 * @syscap SystemCapability.ArkUI.ArkUI.Full 1582 * @since 7 1583 */ 1584/** 1585 * Defines Scroll Component. 1586 * 1587 * @syscap SystemCapability.ArkUI.ArkUI.Full 1588 * @crossplatform 1589 * @since 10 1590 */ 1591/** 1592 * Defines Scroll Component. 1593 * 1594 * @syscap SystemCapability.ArkUI.ArkUI.Full 1595 * @crossplatform 1596 * @atomicservice 1597 * @since 11 1598 */ 1599declare const Scroll: ScrollInterface; 1600 1601/** 1602 * Defines Scroll Component instance. 1603 * 1604 * @syscap SystemCapability.ArkUI.ArkUI.Full 1605 * @since 7 1606 */ 1607/** 1608 * Defines Scroll Component instance. 1609 * 1610 * @syscap SystemCapability.ArkUI.ArkUI.Full 1611 * @crossplatform 1612 * @since 10 1613 */ 1614/** 1615 * Defines Scroll Component instance. 1616 * 1617 * @syscap SystemCapability.ArkUI.ArkUI.Full 1618 * @crossplatform 1619 * @atomicservice 1620 * @since 11 1621 */ 1622declare const ScrollInstance: ScrollAttribute; 1623