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 * Declare scroll status 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 7 27 */ 28/** 29 * Declare scroll status 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @form 34 * @since 9 35 */ 36/** 37 * Declare scroll status 38 * 39 * @enum { number } 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @form 43 * @since 10 44 */ 45/** 46 * Declare scroll status 47 * 48 * @enum { number } 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @crossplatform 51 * @form 52 * @atomicservice 53 * @since 11 54 */ 55declare enum ScrollState { 56 /** 57 * Not activated. 58 * 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @since 7 61 */ 62 /** 63 * Not activated. 64 * 65 * @syscap SystemCapability.ArkUI.ArkUI.Full 66 * @form 67 * @since 9 68 */ 69 /** 70 * Not activated. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @form 75 * @since 10 76 */ 77 /** 78 * Not activated. 79 * 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @crossplatform 82 * @form 83 * @atomicservice 84 * @since 11 85 */ 86 Idle, 87 88 /** 89 * Scrolling status. 90 * 91 * @syscap SystemCapability.ArkUI.ArkUI.Full 92 * @since 7 93 */ 94 /** 95 * Scrolling status. 96 * 97 * @syscap SystemCapability.ArkUI.ArkUI.Full 98 * @form 99 * @since 9 100 */ 101 /** 102 * Scrolling status. 103 * 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @crossplatform 106 * @form 107 * @since 10 108 */ 109 /** 110 * Scrolling status. 111 * 112 * @syscap SystemCapability.ArkUI.ArkUI.Full 113 * @crossplatform 114 * @form 115 * @atomicservice 116 * @since 11 117 */ 118 Scroll, 119 120 /** 121 * Drag status. 122 * 123 * @syscap SystemCapability.ArkUI.ArkUI.Full 124 * @since 7 125 */ 126 /** 127 * Drag status. 128 * 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @form 131 * @since 9 132 */ 133 /** 134 * Drag status. 135 * 136 * @syscap SystemCapability.ArkUI.ArkUI.Full 137 * @crossplatform 138 * @form 139 * @since 10 140 */ 141 /** 142 * Drag status. 143 * 144 * @syscap SystemCapability.ArkUI.ArkUI.Full 145 * @crossplatform 146 * @form 147 * @atomicservice 148 * @since 11 149 */ 150 Fling, 151} 152 153/** 154 * Declare list item alignment status 155 * 156 * @enum { number } 157 * @syscap SystemCapability.ArkUI.ArkUI.Full 158 * @form 159 * @since 9 160 */ 161/** 162 * Declare list item alignment status 163 * 164 * @enum { number } 165 * @syscap SystemCapability.ArkUI.ArkUI.Full 166 * @crossplatform 167 * @form 168 * @since 10 169 */ 170/** 171 * Declare list item alignment status 172 * 173 * @enum { number } 174 * @syscap SystemCapability.ArkUI.ArkUI.Full 175 * @crossplatform 176 * @form 177 * @atomicservice 178 * @since 11 179 */ 180declare enum ListItemAlign { 181 /** 182 * Start position in the direction of cross axis. 183 * 184 * @syscap SystemCapability.ArkUI.ArkUI.Full 185 * @form 186 * @since 9 187 */ 188 /** 189 * Start position in the direction of cross axis. 190 * 191 * @syscap SystemCapability.ArkUI.ArkUI.Full 192 * @crossplatform 193 * @form 194 * @since 10 195 */ 196 /** 197 * Start position in the direction of cross axis. 198 * 199 * @syscap SystemCapability.ArkUI.ArkUI.Full 200 * @crossplatform 201 * @form 202 * @atomicservice 203 * @since 11 204 */ 205 Start, 206 207 /** 208 * Center position in the direction of cross axis. 209 * 210 * @syscap SystemCapability.ArkUI.ArkUI.Full 211 * @form 212 * @since 9 213 */ 214 /** 215 * Center position in the direction of cross axis. 216 * 217 * @syscap SystemCapability.ArkUI.ArkUI.Full 218 * @crossplatform 219 * @form 220 * @since 10 221 */ 222 /** 223 * Center position in the direction of cross axis. 224 * 225 * @syscap SystemCapability.ArkUI.ArkUI.Full 226 * @crossplatform 227 * @form 228 * @atomicservice 229 * @since 11 230 */ 231 Center, 232 233 /** 234 * End position in the direction of cross axis 235 * 236 * @syscap SystemCapability.ArkUI.ArkUI.Full 237 * @form 238 * @since 9 239 */ 240 /** 241 * End position in the direction of cross axis 242 * 243 * @syscap SystemCapability.ArkUI.ArkUI.Full 244 * @crossplatform 245 * @form 246 * @since 10 247 */ 248 /** 249 * End position in the direction of cross axis 250 * 251 * @syscap SystemCapability.ArkUI.ArkUI.Full 252 * @crossplatform 253 * @form 254 * @atomicservice 255 * @since 11 256 */ 257 End, 258} 259 260/** 261 * Declare list item group area 262 * 263 * @enum { number } 264 * @syscap SystemCapability.ArkUI.ArkUI.Full 265 * @crossplatform 266 * @atomicservice 267 * @since 12 268 */ 269declare enum ListItemGroupArea { 270 /** 271 * List item group area is none 272 * 273 * @syscap SystemCapability.ArkUI.ArkUI.Full 274 * @crossplatform 275 * @atomicservice 276 * @since 12 277 */ 278 NONE = 0, 279 280 /** 281 * List item group area is list item 282 * 283 * @syscap SystemCapability.ArkUI.ArkUI.Full 284 * @crossplatform 285 * @atomicservice 286 * @since 12 287 */ 288 IN_LIST_ITEM_AREA = 1, 289 290 /** 291 * List item group area is header 292 * 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @crossplatform 295 * @atomicservice 296 * @since 12 297 */ 298 IN_HEADER_AREA = 2, 299 300 /** 301 * List item group area is footer 302 * 303 * @syscap SystemCapability.ArkUI.ArkUI.Full 304 * @crossplatform 305 * @atomicservice 306 * @since 12 307 */ 308 IN_FOOTER_AREA = 3, 309} 310 311/** 312 * Declare item group sticky style. 313 * 314 * @enum { number } 315 * @syscap SystemCapability.ArkUI.ArkUI.Full 316 * @form 317 * @since 9 318 */ 319/** 320 * Declare item group sticky style. 321 * 322 * @enum { number } 323 * @syscap SystemCapability.ArkUI.ArkUI.Full 324 * @crossplatform 325 * @form 326 * @since 10 327 */ 328/** 329 * Declare item group sticky style. 330 * 331 * @enum { number } 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @crossplatform 334 * @form 335 * @atomicservice 336 * @since 11 337 */ 338declare enum StickyStyle { 339 /** 340 * The header and footer of each item group will not be pinned. 341 * 342 * @syscap SystemCapability.ArkUI.ArkUI.Full 343 * @form 344 * @since 9 345 */ 346 /** 347 * The header and footer of each item group will not be pinned. 348 * 349 * @syscap SystemCapability.ArkUI.ArkUI.Full 350 * @crossplatform 351 * @form 352 * @since 10 353 */ 354 /** 355 * The header and footer of each item group will not be pinned. 356 * 357 * @syscap SystemCapability.ArkUI.ArkUI.Full 358 * @crossplatform 359 * @form 360 * @atomicservice 361 * @since 11 362 */ 363 None = 0, 364 365 /** 366 * The header of each item group will be pinned. 367 * 368 * @syscap SystemCapability.ArkUI.ArkUI.Full 369 * @form 370 * @since 9 371 */ 372 /** 373 * The header of each item group will be pinned. 374 * 375 * @syscap SystemCapability.ArkUI.ArkUI.Full 376 * @crossplatform 377 * @form 378 * @since 10 379 */ 380 /** 381 * The header of each item group will be pinned. 382 * 383 * @syscap SystemCapability.ArkUI.ArkUI.Full 384 * @crossplatform 385 * @form 386 * @atomicservice 387 * @since 11 388 */ 389 Header = 1, 390 391 /** 392 * The footer of each item group will be pinned. 393 * 394 * @syscap SystemCapability.ArkUI.ArkUI.Full 395 * @form 396 * @since 9 397 */ 398 /** 399 * The footer of each item group will be pinned. 400 * 401 * @syscap SystemCapability.ArkUI.ArkUI.Full 402 * @crossplatform 403 * @form 404 * @since 10 405 */ 406 /** 407 * The footer of each item group will be pinned. 408 * 409 * @syscap SystemCapability.ArkUI.ArkUI.Full 410 * @crossplatform 411 * @form 412 * @atomicservice 413 * @since 11 414 */ 415 Footer = 2, 416} 417 418/** 419 * Declare edge effect of chain animation. 420 * 421 * @enum { number } 422 * @syscap SystemCapability.ArkUI.ArkUI.Full 423 * @systemapi 424 * @since 10 425 */ 426declare enum ChainEdgeEffect { 427 /** 428 * Default edge effect. Compress the space in the drag direction 429 * and stretch the space in the opposite drag direction. 430 * 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @systemapi 433 * @since 10 434 */ 435 DEFAULT, 436 437 /** 438 * Stretch all space. 439 * 440 * @syscap SystemCapability.ArkUI.ArkUI.Full 441 * @systemapi 442 * @since 10 443 */ 444 STRETCH, 445} 446 447/** 448 * Declare limited position when scroll end. 449 * 450 * @enum { number } 451 * @syscap SystemCapability.ArkUI.ArkUI.Full 452 * @since 10 453 */ 454/** 455 * Declare limited position when scroll end. 456 * 457 * @enum { number } 458 * @syscap SystemCapability.ArkUI.ArkUI.Full 459 * @crossplatform 460 * @atomicservice 461 * @since 11 462 */ 463declare enum ScrollSnapAlign { 464 /** 465 * Default no item scroll snap alignment effect. When scroll end, 466 * list item will stop without limit. 467 * 468 * @syscap SystemCapability.ArkUI.ArkUI.Full 469 * @since 10 470 */ 471 /** 472 * Default no item scroll snap alignment effect. When scroll end, 473 * list item will stop without limit. 474 * 475 * @syscap SystemCapability.ArkUI.ArkUI.Full 476 * @crossplatform 477 * @atomicservice 478 * @since 11 479 */ 480 NONE, 481 482 /** 483 * The first item in view will be aligned at the start of list. 484 * 485 * @syscap SystemCapability.ArkUI.ArkUI.Full 486 * @since 10 487 */ 488 /** 489 * The first item in view will be aligned at the start of list. 490 * 491 * @syscap SystemCapability.ArkUI.ArkUI.Full 492 * @crossplatform 493 * @atomicservice 494 * @since 11 495 */ 496 START, 497 498 /** 499 * The middle item in view will be aligned at the center of list. 500 * 501 * @syscap SystemCapability.ArkUI.ArkUI.Full 502 * @since 10 503 */ 504 /** 505 * The middle item in view will be aligned at the center of list. 506 * 507 * @syscap SystemCapability.ArkUI.ArkUI.Full 508 * @crossplatform 509 * @atomicservice 510 * @since 11 511 */ 512 CENTER, 513 514 /** 515 * The last item in view will be aligned at the end of list. 516 * 517 * @syscap SystemCapability.ArkUI.ArkUI.Full 518 * @since 10 519 */ 520 /** 521 * The last item in view will be aligned at the end of list. 522 * 523 * @syscap SystemCapability.ArkUI.ArkUI.Full 524 * @crossplatform 525 * @atomicservice 526 * @since 11 527 */ 528 END, 529} 530 531/** 532 * Defines the chain animation options. 533 * 534 * @interface ChainAnimationOptions 535 * @syscap SystemCapability.ArkUI.ArkUI.Full 536 * @systemapi 537 * @since 10 538 */ 539declare interface ChainAnimationOptions { 540 /** 541 * Minimum space for chain animation. 542 * 543 * @type { Length } 544 * @syscap SystemCapability.ArkUI.ArkUI.Full 545 * @systemapi 546 * @since 10 547 */ 548 minSpace: Length; 549 550 /** 551 * Maximum space for chain animation. 552 * 553 * @type { Length } 554 * @syscap SystemCapability.ArkUI.ArkUI.Full 555 * @systemapi 556 * @since 10 557 */ 558 maxSpace: Length; 559 560 /** 561 * Conductivity of chain animation. 562 * 563 * @type { ?number } 564 * @default 0.7 565 * @syscap SystemCapability.ArkUI.ArkUI.Full 566 * @systemapi 567 * @since 10 568 */ 569 conductivity?: number; 570 571 /** 572 * Intensity of chain animation. 573 * 574 * @type { ?number } 575 * @default 0.3 576 * @syscap SystemCapability.ArkUI.ArkUI.Full 577 * @systemapi 578 * @since 10 579 */ 580 intensity?: number; 581 582 /** 583 * Edge effect of chain animation. 584 * 585 * @type { ?ChainEdgeEffect } 586 * @default ChainEdgeEffect.DEFAULT 587 * @syscap SystemCapability.ArkUI.ArkUI.Full 588 * @systemapi 589 * @since 10 590 */ 591 edgeEffect?: ChainEdgeEffect; 592 593 /** 594 * Stiffness of chain spring. 595 * 596 * @type { ?number } 597 * @default 228 598 * @syscap SystemCapability.ArkUI.ArkUI.Full 599 * @systemapi 600 * @since 10 601 */ 602 stiffness?: number; 603 604 /** 605 * Damping of chain spring. 606 * 607 * @type { ?number } 608 * @default 30 609 * @syscap SystemCapability.ArkUI.ArkUI.Full 610 * @systemapi 611 * @since 10 612 */ 613 damping?: number; 614} 615 616/** 617 * Defines the close swipe action options. 618 * 619 * @interface CloseSwipeActionOptions 620 * @syscap SystemCapability.ArkUI.ArkUI.Full 621 * @crossplatform 622 * @since 11 623 */ 624/** 625 * Defines the close swipe action options. 626 * 627 * @interface CloseSwipeActionOptions 628 * @syscap SystemCapability.ArkUI.ArkUI.Full 629 * @crossplatform 630 * @atomicservice 631 * @since 12 632 */ 633declare interface CloseSwipeActionOptions { 634 /** 635 * Called after collapse animation completed. 636 * 637 * @type { ?function } 638 * @syscap SystemCapability.ArkUI.ArkUI.Full 639 * @crossplatform 640 * @since 11 641 */ 642 /** 643 * Called after collapse animation completed. 644 * 645 * @type { ?function } 646 * @syscap SystemCapability.ArkUI.ArkUI.Full 647 * @crossplatform 648 * @atomicservice 649 * @since 12 650 */ 651 onFinish?: ()=>void 652} 653 654/** 655 * Defines the visible list content info. 656 * 657 * @interface VisibleListContentInfo 658 * @syscap SystemCapability.ArkUI.ArkUI.Full 659 * @crossplatform 660 * @atomicservice 661 * @since 12 662 */ 663declare interface VisibleListContentInfo { 664 /** 665 * Index number of a child in the list. 666 * 667 * @type { number } 668 * @syscap SystemCapability.ArkUI.ArkUI.Full 669 * @crossplatform 670 * @atomicservice 671 * @since 12 672 */ 673 index: number 674 675 /** 676 * Area of the ListItemGroup. 677 * 678 * @type { ?ListItemGroupArea } 679 * @syscap SystemCapability.ArkUI.ArkUI.Full 680 * @crossplatform 681 * @atomicservice 682 * @since 12 683 */ 684 itemGroupArea?: ListItemGroupArea 685 686 /** 687 * Index number of a ListItem in ListItemGroup. 688 * 689 * @type { ?number } 690 * @syscap SystemCapability.ArkUI.ArkUI.Full 691 * @crossplatform 692 * @atomicservice 693 * @since 12 694 */ 695 itemIndexInGroup?: number 696} 697 698/** 699 * Callback of scroll visible content, using in onScrollVisibleContentChange. 700 * 701 * @typedef {function} OnScrollVisibleContentChangeCallback 702 * @syscap SystemCapability.ArkUI.ArkUI.Full 703 * @crossplatform 704 * @atomicservice 705 * @since 12 706 */ 707declare type OnScrollVisibleContentChangeCallback = (start: VisibleListContentInfo, end: VisibleListContentInfo) => void; 708 709/** 710 * @extends Scroller 711 * @syscap SystemCapability.ArkUI.ArkUI.Full 712 * @crossplatform 713 * @since 11 714 */ 715/** 716 * @extends Scroller 717 * @syscap SystemCapability.ArkUI.ArkUI.Full 718 * @crossplatform 719 * @atomicservice 720 * @since 12 721 */ 722declare class ListScroller extends Scroller { 723 /** 724 * Gets the size and position of a ListItem in a ListItemGroup. 725 * 726 * @param { number } index - Index of the ListItemGroup in List. 727 * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. 728 * @returns { RectResult } Returns the size and position. 729 * @throws { BusinessError } 401 - Parameter error. Possible causes: 730 * <br> 1. Mandatory parameters are left unspecified. 731 * <br> 2. Incorrect parameters types. 732 * <br> 3. Parameter verification failed. 733 * @throws { BusinessError } 100004 - Controller not bound to component. 734 * @syscap SystemCapability.ArkUI.ArkUI.Full 735 * @crossplatform 736 * @since 11 737 */ 738 /** 739 * Gets the size and position of a ListItem in a ListItemGroup. 740 * 741 * @param { number } index - Index of the ListItemGroup in List. 742 * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. 743 * @returns { RectResult } Returns the size and position. 744 * @throws { BusinessError } 401 - Parameter error. Possible causes: 745 * <br> 1. Mandatory parameters are left unspecified. 746 * <br> 2. Incorrect parameters types. 747 * <br> 3. Parameter verification failed. 748 * @throws { BusinessError } 100004 - Controller not bound to component. 749 * @syscap SystemCapability.ArkUI.ArkUI.Full 750 * @crossplatform 751 * @atomicservice 752 * @since 12 753 */ 754 getItemRectInGroup(index: number, indexInGroup: number): RectResult; 755 756 /** 757 * Called when sliding to the specified index in specified ListItemGroup. 758 * 759 * @param { number } index - Index of the ListItemGroup in List. 760 * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. 761 * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. 762 * @param { ScrollAlign } align - Sets the alignment mode of a specified index. 763 * @throws { BusinessError } 401 - Parameter error. Possible causes: 764 * <br> 1. Mandatory parameters are left unspecified. 765 * <br> 2. Incorrect parameters types. 766 * <br> 3. Parameter verification failed. 767 * @throws { BusinessError } 100004 - Controller not bound to component. 768 * @syscap SystemCapability.ArkUI.ArkUI.Full 769 * @crossplatform 770 * @since 11 771 */ 772 /** 773 * Called when sliding to the specified index in specified ListItemGroup. 774 * 775 * @param { number } index - Index of the ListItemGroup in List. 776 * @param { number } indexInGroup - Index of the ListItem in ListItemGroup. 777 * @param { boolean } smooth - If true, scroll to index item with animation. If false, scroll to index item without animation. 778 * @param { ScrollAlign } align - Sets the alignment mode of a specified index. 779 * @throws { BusinessError } 401 - Parameter error. Possible causes: 780 * <br> 1. Mandatory parameters are left unspecified. 781 * <br> 2. Incorrect parameters types. 782 * <br> 3. Parameter verification failed. 783 * @throws { BusinessError } 100004 - Controller not bound to component. 784 * @syscap SystemCapability.ArkUI.ArkUI.Full 785 * @crossplatform 786 * @atomicservice 787 * @since 12 788 */ 789 scrollToItemInGroup(index: number, indexInGroup:number, smooth?: boolean, align?: ScrollAlign): void; 790 791 /** 792 * Collapse all listItem. 793 * 794 * @param { CloseSwipeActionOptions } options - Options of close Swipe items. 795 * @throws { BusinessError } 401 - Parameter error. Possible causes: 796 * <br> 1. Mandatory parameters are left unspecified. 797 * <br> 2. Incorrect parameters types. 798 * <br> 3. Parameter verification failed. 799 * @throws { BusinessError } 100004 - Controller not bound to component. 800 * @syscap SystemCapability.ArkUI.ArkUI.Full 801 * @crossplatform 802 * @since 11 803 */ 804 /** 805 * Collapse all listItem. 806 * 807 * @param { CloseSwipeActionOptions } options - Options of close Swipe items. 808 * @throws { BusinessError } 401 - Parameter error. Possible causes: 809 * <br> 1. Mandatory parameters are left unspecified. 810 * <br> 2. Incorrect parameters types. 811 * <br> 3. Parameter verification failed. 812 * @throws { BusinessError } 100004 - Controller not bound to component. 813 * @syscap SystemCapability.ArkUI.ArkUI.Full 814 * @crossplatform 815 * @atomicservice 816 * @since 12 817 */ 818 closeAllSwipeActions(options?: CloseSwipeActionOptions): void; 819 820 /** 821 * Get visible list content info by position. 822 * 823 * @param { number } x - X coordinate relative to the upper left corner of the list's original area, in vp. 824 * @param { number } y - Y coordinate relative to the upper left corner of the list's original area, in vp. 825 * @returns { VisibleListContentInfo } Visible list content info of the position. 826 * @throws { BusinessError } 401 - Parameter error. Possible causes: 827 * <br> 1. Mandatory parameters are left unspecified. 828 * <br> 2. Incorrect parameters types. 829 * <br> 3. Parameter verification failed. 830 * @throws { BusinessError } 100004 - The controller not bound to component. 831 * @syscap SystemCapability.ArkUI.ArkUI.Full 832 * @crossplatform 833 * @atomicservice 834 * @since 13 835 */ 836 getVisibleListContentInfo(x: number, y: number): VisibleListContentInfo; 837} 838 839/** 840 * Defines List constructor options. 841 * 842 * @interface ListOptions 843 * @syscap SystemCapability.ArkUI.ArkUI.Full 844 * @crossplatform 845 * @form 846 * @atomicservice 847 * @since 13 848 */ 849interface ListOptions { 850 /** 851 * Set initialIndex. 852 * 853 * @type { ?number } 854 * @syscap SystemCapability.ArkUI.ArkUI.Full 855 * @since 7 856 */ 857 /** 858 * Set initialIndex. 859 * 860 * @type { ?number } 861 * @syscap SystemCapability.ArkUI.ArkUI.Full 862 * @form 863 * @since 9 864 */ 865 /** 866 * Set initialIndex. 867 * 868 * @type { ?number } 869 * @syscap SystemCapability.ArkUI.ArkUI.Full 870 * @crossplatform 871 * @form 872 * @since 10 873 */ 874 /** 875 * Set initialIndex. 876 * 877 * @type { ?number } 878 * @syscap SystemCapability.ArkUI.ArkUI.Full 879 * @crossplatform 880 * @form 881 * @atomicservice 882 * @since 11 883 */ 884 initialIndex?: number; 885 /** 886 * Set space. 887 * 888 * @type { ?(number | string) } 889 * @syscap SystemCapability.ArkUI.ArkUI.Full 890 * @since 7 891 */ 892 /** 893 * Set space. 894 * 895 * @type { ?(number | string) } 896 * @syscap SystemCapability.ArkUI.ArkUI.Full 897 * @form 898 * @since 9 899 */ 900 /** 901 * Set space. 902 * 903 * @type { ?(number | string) } 904 * @syscap SystemCapability.ArkUI.ArkUI.Full 905 * @crossplatform 906 * @form 907 * @since 10 908 */ 909 /** 910 * Set space. 911 * 912 * @type { ?(number | string) } 913 * @syscap SystemCapability.ArkUI.ArkUI.Full 914 * @crossplatform 915 * @form 916 * @atomicservice 917 * @since 11 918 */ 919 space?: number | string; 920 /** 921 * Set scroller. 922 * 923 * @type { ?Scroller } 924 * @syscap SystemCapability.ArkUI.ArkUI.Full 925 * @since 7 926 */ 927 /** 928 * Set scroller. 929 * 930 * @type { ?Scroller } 931 * @syscap SystemCapability.ArkUI.ArkUI.Full 932 * @form 933 * @since 9 934 */ 935 /** 936 * Set scroller. 937 * 938 * @type { ?Scroller } 939 * @syscap SystemCapability.ArkUI.ArkUI.Full 940 * @crossplatform 941 * @form 942 * @since 10 943 */ 944 /** 945 * Set scroller. 946 * 947 * @type { ?Scroller } 948 * @syscap SystemCapability.ArkUI.ArkUI.Full 949 * @crossplatform 950 * @form 951 * @atomicservice 952 * @since 11 953 */ 954 scroller?: Scroller; 955} 956 957/** 958 * The list interface is extended. 959 * 960 * @interface ListInterface 961 * @syscap SystemCapability.ArkUI.ArkUI.Full 962 * @since 7 963 */ 964/** 965 * The list interface is extended. 966 * 967 * @interface ListInterface 968 * @syscap SystemCapability.ArkUI.ArkUI.Full 969 * @form 970 * @since 9 971 */ 972/** 973 * The list interface is extended. 974 * 975 * @interface ListInterface 976 * @syscap SystemCapability.ArkUI.ArkUI.Full 977 * @crossplatform 978 * @form 979 * @since 10 980 */ 981/** 982 * The list interface is extended. 983 * 984 * @interface ListInterface 985 * @syscap SystemCapability.ArkUI.ArkUI.Full 986 * @crossplatform 987 * @form 988 * @atomicservice 989 * @since 11 990 */ 991interface ListInterface { 992 /** 993 * Called when interface data is called. 994 * 995 * @param { object } value 996 * @returns { ListAttribute } 997 * @syscap SystemCapability.ArkUI.ArkUI.Full 998 * @since 7 999 */ 1000 /** 1001 * Called when interface data is called. 1002 * 1003 * @param { object } value 1004 * @returns { ListAttribute } 1005 * @syscap SystemCapability.ArkUI.ArkUI.Full 1006 * @form 1007 * @since 9 1008 */ 1009 /** 1010 * Called when interface data is called. 1011 * 1012 * @param { object } value 1013 * @returns { ListAttribute } 1014 * @syscap SystemCapability.ArkUI.ArkUI.Full 1015 * @crossplatform 1016 * @form 1017 * @since 10 1018 */ 1019 /** 1020 * Called when interface data is called. 1021 * 1022 * @param { object } value 1023 * @returns { ListAttribute } 1024 * @syscap SystemCapability.ArkUI.ArkUI.Full 1025 * @crossplatform 1026 * @form 1027 * @atomicservice 1028 * @since 11 1029 */ 1030 /** 1031 * Called when interface data is called. 1032 * 1033 * @param { ListOptions } [options] - list options 1034 * @returns { ListAttribute } 1035 * @syscap SystemCapability.ArkUI.ArkUI.Full 1036 * @crossplatform 1037 * @form 1038 * @atomicservice 1039 * @since 13 1040 */ 1041 (options?: ListOptions): ListAttribute; 1042} 1043 1044/** 1045 * Defines List divider opotions. 1046 * 1047 * @interface ListDividerOptions 1048 * @syscap SystemCapability.ArkUI.ArkUI.Full 1049 * @crossplatform 1050 * @form 1051 * @atomicservice 1052 * @since 13 1053 */ 1054declare interface ListDividerOptions { 1055 /** 1056 * Set strokeWidth. 1057 * 1058 * @type { Length } 1059 * @syscap SystemCapability.ArkUI.ArkUI.Full 1060 * @since 7 1061 */ 1062 /** 1063 * Set strokeWidth. 1064 * 1065 * @type { Length } 1066 * @syscap SystemCapability.ArkUI.ArkUI.Full 1067 * @form 1068 * @since 9 1069 */ 1070 /** 1071 * Set strokeWidth. 1072 * 1073 * @type { Length } 1074 * @syscap SystemCapability.ArkUI.ArkUI.Full 1075 * @crossplatform 1076 * @form 1077 * @since 10 1078 */ 1079 /** 1080 * Set strokeWidth. 1081 * 1082 * @type { Length } 1083 * @syscap SystemCapability.ArkUI.ArkUI.Full 1084 * @crossplatform 1085 * @form 1086 * @atomicservice 1087 * @since 11 1088 */ 1089 strokeWidth: Length; 1090 /** 1091 * Set color. 1092 * 1093 * @type { ?ResourceColor } 1094 * @syscap SystemCapability.ArkUI.ArkUI.Full 1095 * @since 7 1096 */ 1097 /** 1098 * Set color. 1099 * 1100 * @type { ?ResourceColor } 1101 * @syscap SystemCapability.ArkUI.ArkUI.Full 1102 * @form 1103 * @since 9 1104 */ 1105 /** 1106 * Set color. 1107 * 1108 * @type { ?ResourceColor } 1109 * @syscap SystemCapability.ArkUI.ArkUI.Full 1110 * @crossplatform 1111 * @form 1112 * @since 10 1113 */ 1114 /** 1115 * Set color. 1116 * 1117 * @type { ?ResourceColor } 1118 * @syscap SystemCapability.ArkUI.ArkUI.Full 1119 * @crossplatform 1120 * @form 1121 * @atomicservice 1122 * @since 11 1123 */ 1124 color?: ResourceColor; 1125 /** 1126 * Set startMargin. 1127 * 1128 * @type { ?Length } 1129 * @syscap SystemCapability.ArkUI.ArkUI.Full 1130 * @since 7 1131 */ 1132 /** 1133 * Set startMargin. 1134 * 1135 * @type { ?Length } 1136 * @syscap SystemCapability.ArkUI.ArkUI.Full 1137 * @form 1138 * @since 9 1139 */ 1140 /** 1141 * Set startMargin. 1142 * 1143 * @type { ?Length } 1144 * @syscap SystemCapability.ArkUI.ArkUI.Full 1145 * @crossplatform 1146 * @form 1147 * @since 10 1148 */ 1149 /** 1150 * Set startMargin. 1151 * 1152 * @type { ?Length } 1153 * @syscap SystemCapability.ArkUI.ArkUI.Full 1154 * @crossplatform 1155 * @form 1156 * @atomicservice 1157 * @since 11 1158 */ 1159 startMargin?: Length; 1160 /** 1161 * Set endMargin. 1162 * 1163 * @type { ?Length } 1164 * @syscap SystemCapability.ArkUI.ArkUI.Full 1165 * @since 7 1166 */ 1167 /** 1168 * Set endMargin. 1169 * 1170 * @type { ?Length } 1171 * @syscap SystemCapability.ArkUI.ArkUI.Full 1172 * @form 1173 * @since 9 1174 */ 1175 /** 1176 * Set endMargin. 1177 * 1178 * @type { ?Length } 1179 * @syscap SystemCapability.ArkUI.ArkUI.Full 1180 * @crossplatform 1181 * @form 1182 * @since 10 1183 */ 1184 /** 1185 * Set endMargin. 1186 * 1187 * @type { ?Length } 1188 * @syscap SystemCapability.ArkUI.ArkUI.Full 1189 * @crossplatform 1190 * @form 1191 * @atomicservice 1192 * @since 11 1193 */ 1194 endMargin?: Length; 1195} 1196 1197/** 1198 * @extends CommonMethod<ListAttribute> 1199 * @syscap SystemCapability.ArkUI.ArkUI.Full 1200 * @since 7 1201 */ 1202/** 1203 * @extends CommonMethod<ListAttribute> 1204 * @syscap SystemCapability.ArkUI.ArkUI.Full 1205 * @form 1206 * @since 9 1207 */ 1208/** 1209 * @extends CommonMethod<ListAttribute> 1210 * @syscap SystemCapability.ArkUI.ArkUI.Full 1211 * @crossplatform 1212 * @form 1213 * @since 10 1214 */ 1215/** 1216 * @extends ScrollableCommonMethod<ListAttribute> 1217 * @syscap SystemCapability.ArkUI.ArkUI.Full 1218 * @crossplatform 1219 * @form 1220 * @atomicservice 1221 * @since 11 1222 */ 1223declare class ListAttribute extends ScrollableCommonMethod<ListAttribute> { 1224 /** 1225 * Called when need to decide how much lanes the list will show. 1226 * 1227 * @param { number | LengthConstrain } value 1228 * @returns { ListAttribute } 1229 * @syscap SystemCapability.ArkUI.ArkUI.Full 1230 * @form 1231 * @since 9 1232 */ 1233 /** 1234 * Called when need to decide how much lanes the list will show. 1235 * 1236 * @param { number | LengthConstrain } value 1237 * @param { Dimension } gutter 1238 * @returns { ListAttribute } 1239 * @syscap SystemCapability.ArkUI.ArkUI.Full 1240 * @crossplatform 1241 * @form 1242 * @since 10 1243 */ 1244 /** 1245 * Called when need to decide how much lanes the list will show. 1246 * 1247 * @param { number | LengthConstrain } value 1248 * @param { Dimension } gutter 1249 * @returns { ListAttribute } 1250 * @syscap SystemCapability.ArkUI.ArkUI.Full 1251 * @crossplatform 1252 * @form 1253 * @atomicservice 1254 * @since 11 1255 */ 1256 lanes(value: number | LengthConstrain, gutter?: Dimension): ListAttribute; 1257 1258 /** 1259 * Called when need to decide how to align lanes in the direction of the cross axis. 1260 * 1261 * @param { ListItemAlign } value 1262 * @returns { ListAttribute } 1263 * @syscap SystemCapability.ArkUI.ArkUI.Full 1264 * @form 1265 * @since 9 1266 */ 1267 /** 1268 * Called when need to decide how to align lanes in the direction of the cross axis. 1269 * 1270 * @param { ListItemAlign } value 1271 * @returns { ListAttribute } 1272 * @syscap SystemCapability.ArkUI.ArkUI.Full 1273 * @crossplatform 1274 * @form 1275 * @since 10 1276 */ 1277 /** 1278 * Called when need to decide how to align lanes in the direction of the cross axis. 1279 * 1280 * @param { ListItemAlign } value 1281 * @returns { ListAttribute } 1282 * @syscap SystemCapability.ArkUI.ArkUI.Full 1283 * @crossplatform 1284 * @form 1285 * @atomicservice 1286 * @since 11 1287 */ 1288 alignListItem(value: ListItemAlign): ListAttribute; 1289 1290 /** 1291 * Called when the arrangement direction of the list component is set. 1292 * 1293 * @param { Axis } value 1294 * @returns { ListAttribute } 1295 * @syscap SystemCapability.ArkUI.ArkUI.Full 1296 * @since 7 1297 */ 1298 /** 1299 * Called when the arrangement direction of the list component is set. 1300 * 1301 * @param { Axis } value 1302 * @returns { ListAttribute } 1303 * @syscap SystemCapability.ArkUI.ArkUI.Full 1304 * @form 1305 * @since 9 1306 */ 1307 /** 1308 * Called when the arrangement direction of the list component is set. 1309 * 1310 * @param { Axis } value 1311 * @returns { ListAttribute } 1312 * @syscap SystemCapability.ArkUI.ArkUI.Full 1313 * @crossplatform 1314 * @form 1315 * @since 10 1316 */ 1317 /** 1318 * Called when the arrangement direction of the list component is set. 1319 * 1320 * @param { Axis } value 1321 * @returns { ListAttribute } 1322 * @syscap SystemCapability.ArkUI.ArkUI.Full 1323 * @crossplatform 1324 * @form 1325 * @atomicservice 1326 * @since 11 1327 */ 1328 listDirection(value: Axis): ListAttribute; 1329 1330 /** 1331 * Called when the display mode of the side slider is set. 1332 * 1333 * @param { BarState } value 1334 * @returns { ListAttribute } 1335 * @syscap SystemCapability.ArkUI.ArkUI.Full 1336 * @since 7 1337 */ 1338 /** 1339 * Called when the display mode of the side slider is set. 1340 * 1341 * @param { BarState } value 1342 * @returns { ListAttribute } 1343 * @syscap SystemCapability.ArkUI.ArkUI.Full 1344 * @form 1345 * @since 9 1346 */ 1347 /** 1348 * Called when the display mode of the side slider is set. 1349 * 1350 * @param { BarState } value 1351 * @returns { ListAttribute } 1352 * @syscap SystemCapability.ArkUI.ArkUI.Full 1353 * @crossplatform 1354 * @form 1355 * @since 10 1356 */ 1357 /** 1358 * Called when the display mode of the side slider is set. 1359 * 1360 * @param { BarState } value 1361 * @returns { ListAttribute } 1362 * @syscap SystemCapability.ArkUI.ArkUI.Full 1363 * @crossplatform 1364 * @form 1365 * @atomicservice 1366 * @since 11 1367 */ 1368 scrollBar(value: BarState): ListAttribute; 1369 1370 /** 1371 * Called when the sliding effect is set. 1372 * 1373 * @param { EdgeEffect } value 1374 * @returns { ListAttribute } 1375 * @syscap SystemCapability.ArkUI.ArkUI.Full 1376 * @since 7 1377 */ 1378 /** 1379 * Called when the sliding effect is set. 1380 * 1381 * @param { EdgeEffect } value 1382 * @returns { ListAttribute } 1383 * @syscap SystemCapability.ArkUI.ArkUI.Full 1384 * @form 1385 * @since 9 1386 */ 1387 /** 1388 * Called when the sliding effect is set. 1389 * 1390 * @param { EdgeEffect } value 1391 * @returns { ListAttribute } 1392 * @syscap SystemCapability.ArkUI.ArkUI.Full 1393 * @crossplatform 1394 * @form 1395 * @since 10 1396 */ 1397 /** 1398 * Called when the sliding effect is set. 1399 * 1400 * @param { EdgeEffect } value 1401 * @param { EdgeEffectOptions } options 1402 * @returns { ListAttribute } 1403 * @syscap SystemCapability.ArkUI.ArkUI.Full 1404 * @crossplatform 1405 * @form 1406 * @atomicservice 1407 * @since 11 1408 */ 1409 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions): ListAttribute; 1410 1411 /** 1412 * Called when need to decide contentStartOffset the list will show. 1413 * @param { number } value - the value Of startOffset. 1414 * @returns { ListAttribute } the attribute of the list. 1415 * @syscap SystemCapability.ArkUI.ArkUI.Full 1416 * @crossplatform 1417 * @since 11 1418 */ 1419 /** 1420 * Called when need to decide contentStartOffset the list will show. 1421 * @param { number } value - the value Of startOffset. 1422 * @returns { ListAttribute } the attribute of the list. 1423 * @syscap SystemCapability.ArkUI.ArkUI.Full 1424 * @crossplatform 1425 * @atomicservice 1426 * @since 12 1427 */ 1428 contentStartOffset(value: number): ListAttribute; 1429 1430 /** 1431 * Called when need to decide contentEndOffset the list will show. 1432 * @param { number } value - the value Of endOffset. 1433 * @returns { ListAttribute } the attribute of the list. 1434 * @syscap SystemCapability.ArkUI.ArkUI.Full 1435 * @crossplatform 1436 * @since 11 1437 */ 1438 /** 1439 * Called when need to decide contentEndOffset the list will show. 1440 * @param { number } value - the value Of endOffset. 1441 * @returns { ListAttribute } the attribute of the list. 1442 * @syscap SystemCapability.ArkUI.ArkUI.Full 1443 * @crossplatform 1444 * @atomicservice 1445 * @since 12 1446 */ 1447 contentEndOffset(value: number): ListAttribute; 1448 1449 /** 1450 * Called when the ListItem split line style is set. 1451 * 1452 * @param { object | null } value 1453 * @returns { ListAttribute } 1454 * @syscap SystemCapability.ArkUI.ArkUI.Full 1455 * @since 7 1456 */ 1457 /** 1458 * Called when the ListItem split line style is set. 1459 * 1460 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1461 * @returns { ListAttribute } 1462 * @syscap SystemCapability.ArkUI.ArkUI.Full 1463 * @form 1464 * @since 9 1465 */ 1466 /** 1467 * Called when the ListItem split line style is set. 1468 * 1469 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1470 * @returns { ListAttribute } 1471 * @syscap SystemCapability.ArkUI.ArkUI.Full 1472 * @crossplatform 1473 * @form 1474 * @since 10 1475 */ 1476 /** 1477 * Called when the ListItem split line style is set. 1478 * 1479 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1480 * @returns { ListAttribute } 1481 * @syscap SystemCapability.ArkUI.ArkUI.Full 1482 * @crossplatform 1483 * @form 1484 * @atomicservice 1485 * @since 11 1486 */ 1487 /** 1488 * Called when the ListItem split line style is set. 1489 * 1490 * @param { ListDividerOptions | null } value 1491 * @returns { ListAttribute } 1492 * @syscap SystemCapability.ArkUI.ArkUI.Full 1493 * @crossplatform 1494 * @form 1495 * @atomicservice 1496 * @since 13 1497 */ 1498 divider( 1499 value: ListDividerOptions | null, 1500 ): ListAttribute; 1501 1502 /** 1503 * Called when judging whether it is in editable mode. 1504 * 1505 * @param { boolean } value 1506 * @returns { ListAttribute } 1507 * @syscap SystemCapability.ArkUI.ArkUI.Full 1508 * @since 7 1509 * @deprecated since 9 1510 */ 1511 editMode(value: boolean): ListAttribute; 1512 1513 /** 1514 * Called when judging whether it is multiSelectable. 1515 * 1516 * @param { boolean } value 1517 * @returns { ListAttribute } 1518 * @syscap SystemCapability.ArkUI.ArkUI.Full 1519 * @since 8 1520 */ 1521 /** 1522 * Called when judging whether it is multiSelectable. 1523 * 1524 * @param { boolean } value 1525 * @returns { ListAttribute } 1526 * @syscap SystemCapability.ArkUI.ArkUI.Full 1527 * @form 1528 * @since 9 1529 */ 1530 /** 1531 * Called when judging whether it is multiSelectable. 1532 * 1533 * @param { boolean } value 1534 * @returns { ListAttribute } 1535 * @syscap SystemCapability.ArkUI.ArkUI.Full 1536 * @crossplatform 1537 * @form 1538 * @since 10 1539 */ 1540 /** 1541 * Called when judging whether it is multiSelectable. 1542 * 1543 * @param { boolean } value 1544 * @returns { ListAttribute } 1545 * @syscap SystemCapability.ArkUI.ArkUI.Full 1546 * @crossplatform 1547 * @form 1548 * @atomicservice 1549 * @since 11 1550 */ 1551 multiSelectable(value: boolean): ListAttribute; 1552 1553 /** 1554 * Called when the minimum number of list item caches is set for long list deferred loading. 1555 * 1556 * @param { number } value 1557 * @returns { ListAttribute } 1558 * @syscap SystemCapability.ArkUI.ArkUI.Full 1559 * @since 7 1560 */ 1561 /** 1562 * Called when the minimum number of list item caches is set for long list deferred loading. 1563 * 1564 * @param { number } value 1565 * @returns { ListAttribute } 1566 * @syscap SystemCapability.ArkUI.ArkUI.Full 1567 * @form 1568 * @since 9 1569 */ 1570 /** 1571 * Called when the minimum number of list item caches is set for long list deferred loading. 1572 * 1573 * @param { number } value 1574 * @returns { ListAttribute } 1575 * @syscap SystemCapability.ArkUI.ArkUI.Full 1576 * @crossplatform 1577 * @form 1578 * @since 10 1579 */ 1580 /** 1581 * Called when the minimum number of list item caches is set for long list deferred loading. 1582 * 1583 * @param { number } value 1584 * @returns { ListAttribute } 1585 * @syscap SystemCapability.ArkUI.ArkUI.Full 1586 * @crossplatform 1587 * @form 1588 * @atomicservice 1589 * @since 11 1590 */ 1591 cachedCount(value: number): ListAttribute; 1592 1593 /** 1594 * Called when the minimum number of list item caches is set for long list deferred loading. 1595 * 1596 * @param { number } count - cached count. 1597 * @param { boolean } show - whether to show the nodes in the cache. 1598 * @returns { ListAttribute } the attribute of the list. 1599 * @syscap SystemCapability.ArkUI.ArkUI.Full 1600 * @crossplatform 1601 * @form 1602 * @atomicservice 1603 * @since 14 1604 */ 1605 cachedCount(count: number, show: boolean): ListAttribute; 1606 1607 /** 1608 * Called when setting whether to enable chain linkage dynamic effect. 1609 * 1610 * @param { boolean } value 1611 * @returns { ListAttribute } 1612 * @syscap SystemCapability.ArkUI.ArkUI.Full 1613 * @since 7 1614 */ 1615 /** 1616 * Called when setting whether to enable chain linkage dynamic effect. 1617 * 1618 * @param { boolean } value 1619 * @returns { ListAttribute } 1620 * @syscap SystemCapability.ArkUI.ArkUI.Full 1621 * @form 1622 * @since 9 1623 */ 1624 /** 1625 * Called when setting whether to enable chain linkage dynamic effect. 1626 * 1627 * @param { boolean } value 1628 * @returns { ListAttribute } 1629 * @syscap SystemCapability.ArkUI.ArkUI.Full 1630 * @crossplatform 1631 * @form 1632 * @since 10 1633 */ 1634 /** 1635 * Called when setting whether to enable chain linkage dynamic effect. 1636 * 1637 * @param { boolean } value 1638 * @returns { ListAttribute } 1639 * @syscap SystemCapability.ArkUI.ArkUI.Full 1640 * @crossplatform 1641 * @form 1642 * @atomicservice 1643 * @since 11 1644 */ 1645 chainAnimation(value: boolean): ListAttribute; 1646 1647 /** 1648 * Called to setting chain linkage dynamic effect options. 1649 * 1650 * @param { ChainAnimationOptions } value - options of the chain animation. 1651 * @returns { ListAttribute } the attribute of the list. 1652 * @syscap SystemCapability.ArkUI.ArkUI.Full 1653 * @systemapi 1654 * @since 10 1655 */ 1656 chainAnimationOptions(value: ChainAnimationOptions): ListAttribute; 1657 1658 /** 1659 * Called when header or footer of item group will be pinned. 1660 * 1661 * @param { StickyStyle } value 1662 * @returns { ListAttribute } 1663 * @syscap SystemCapability.ArkUI.ArkUI.Full 1664 * @form 1665 * @since 9 1666 */ 1667 /** 1668 * Called when header or footer of item group will be pinned. 1669 * 1670 * @param { StickyStyle } value 1671 * @returns { ListAttribute } 1672 * @syscap SystemCapability.ArkUI.ArkUI.Full 1673 * @crossplatform 1674 * @form 1675 * @since 10 1676 */ 1677 /** 1678 * Called when header or footer of item group will be pinned. 1679 * 1680 * @param { StickyStyle } value 1681 * @returns { ListAttribute } 1682 * @syscap SystemCapability.ArkUI.ArkUI.Full 1683 * @crossplatform 1684 * @form 1685 * @atomicservice 1686 * @since 11 1687 */ 1688 sticky(value: StickyStyle): ListAttribute; 1689 1690 /** 1691 * Called to set list item scroll end alignment effect. 1692 * 1693 * @param { ScrollSnapAlign } value - options of the list alignment effect. 1694 * @returns { ListAttribute } the attribute of the list. 1695 * @syscap SystemCapability.ArkUI.ArkUI.Full 1696 * @since 10 1697 */ 1698 /** 1699 * Called to set list item scroll end alignment effect. 1700 * 1701 * @param { ScrollSnapAlign } value - options of the list alignment effect. 1702 * @returns { ListAttribute } the attribute of the list. 1703 * @syscap SystemCapability.ArkUI.ArkUI.Full 1704 * @crossplatform 1705 * @atomicservice 1706 * @since 11 1707 */ 1708 scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; 1709 1710 /** 1711 * Called to setting the nested scroll options. 1712 * 1713 * @param { NestedScrollOptions } value - options for nested scrolling. 1714 * @returns { ListAttribute } the attribute of the list. 1715 * @syscap SystemCapability.ArkUI.ArkUI.Full 1716 * @since 10 1717 */ 1718 /** 1719 * Called to setting the nested scroll options. 1720 * 1721 * @param { NestedScrollOptions } value - options for nested scrolling. 1722 * @returns { ListAttribute } the attribute of the list. 1723 * @syscap SystemCapability.ArkUI.ArkUI.Full 1724 * @crossplatform 1725 * @atomicservice 1726 * @since 11 1727 */ 1728 nestedScroll(value: NestedScrollOptions): ListAttribute; 1729 1730 /** 1731 * Called when setting whether to enable scroll by gesture or mouse. 1732 * 1733 * @param { boolean } value 1734 * @returns { ListAttribute } The attribute of the list 1735 * @syscap SystemCapability.ArkUI.ArkUI.Full 1736 * @crossplatform 1737 * @since 10 1738 */ 1739 /** 1740 * Called when setting whether to enable scroll by gesture or mouse. 1741 * 1742 * @param { boolean } value 1743 * @returns { ListAttribute } The attribute of the list 1744 * @syscap SystemCapability.ArkUI.ArkUI.Full 1745 * @crossplatform 1746 * @atomicservice 1747 * @since 11 1748 */ 1749 enableScrollInteraction(value: boolean): ListAttribute; 1750 1751 /** 1752 * Called to setting the friction. 1753 * 1754 * @param { number | Resource } value - options for scrolling friction. 1755 * @returns { ListAttribute } the attribute of the list. 1756 * @syscap SystemCapability.ArkUI.ArkUI.Full 1757 * @crossplatform 1758 * @since 10 1759 */ 1760 /** 1761 * Called to setting the friction. 1762 * 1763 * @param { number | Resource } value - options for scrolling friction. 1764 * @returns { ListAttribute } the attribute of the list. 1765 * @syscap SystemCapability.ArkUI.ArkUI.Full 1766 * @crossplatform 1767 * @atomicservice 1768 * @since 11 1769 */ 1770 friction(value: number | Resource): ListAttribute; 1771 1772 /** 1773 * Set children main size for List. 1774 * 1775 * @param { ChildrenMainSize } value - children main size for List 1776 * @returns { ListAttribute } the attribute of the list. 1777 * @syscap SystemCapability.ArkUI.ArkUI.Full 1778 * @crossplatform 1779 * @atomicservice 1780 * @since 12 1781 */ 1782 childrenMainSize(value: ChildrenMainSize): ListAttribute; 1783 1784 /** 1785 * Set maintain visible content position List. 1786 * 1787 * @param { boolean } enabled - maintain visible content position. 1788 * @returns { ListAttribute } the attribute of the list. 1789 * @syscap SystemCapability.ArkUI.ArkUI.Full 1790 * @crossplatform 1791 * @atomicservice 1792 * @since 12 1793 */ 1794 maintainVisibleContentPosition(enabled: boolean): ListAttribute; 1795 1796 /** 1797 * Called when the offset and status callback of the slide are set. 1798 * 1799 * @param { function } event 1800 * @returns { ListAttribute } 1801 * @syscap SystemCapability.ArkUI.ArkUI.Full 1802 * @since 7 1803 */ 1804 /** 1805 * Called when the offset and status callback of the slide are set. 1806 * 1807 * @param { function } event 1808 * @returns { ListAttribute } 1809 * @syscap SystemCapability.ArkUI.ArkUI.Full 1810 * @form 1811 * @since 9 1812 */ 1813 /** 1814 * Called when the offset and status callback of the slide are set. 1815 * 1816 * @param { function } event 1817 * @returns { ListAttribute } 1818 * @syscap SystemCapability.ArkUI.ArkUI.Full 1819 * @crossplatform 1820 * @form 1821 * @since 10 1822 */ 1823 /** 1824 * Called when the offset and status callback of the slide are set. 1825 * 1826 * @param { function } event 1827 * @returns { ListAttribute } 1828 * @syscap SystemCapability.ArkUI.ArkUI.Full 1829 * @crossplatform 1830 * @form 1831 * @atomicservice 1832 * @since 11 1833 * @deprecated since 12 1834 * @useinstead common.ScrollableCommonMethod#onDidScroll 1835 */ 1836 onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): ListAttribute; 1837 1838 /** 1839 * Called when the start and end positions of the display change. 1840 * 1841 * @param { function } event 1842 * @returns { ListAttribute } 1843 * @syscap SystemCapability.ArkUI.ArkUI.Full 1844 * @since 7 1845 */ 1846 /** 1847 * Called when the start and end positions of the display change. 1848 * 1849 * @param { function } event 1850 * @returns { ListAttribute } 1851 * @syscap SystemCapability.ArkUI.ArkUI.Full 1852 * @form 1853 * @since 9 1854 */ 1855 /** 1856 * Called when the start and end positions of the display change. 1857 * 1858 * @param { function } event 1859 * @returns { ListAttribute } 1860 * @syscap SystemCapability.ArkUI.ArkUI.Full 1861 * @crossplatform 1862 * @form 1863 * @since 10 1864 */ 1865 /** 1866 * Called when the start and end positions of the display change. 1867 * 1868 * @param { function } event 1869 * @returns { ListAttribute } 1870 * @syscap SystemCapability.ArkUI.ArkUI.Full 1871 * @crossplatform 1872 * @form 1873 * @atomicservice 1874 * @since 11 1875 */ 1876 onScrollIndex(event: (start: number, end: number, center: number) => void): ListAttribute; 1877 1878 /** 1879 * Called when the list visible content changes. 1880 * 1881 * @param { OnScrollVisibleContentChangeCallback } handler - Callback of Scroll Visible. 1882 * @returns { ListAttribute } 1883 * @syscap SystemCapability.ArkUI.ArkUI.Full 1884 * @crossplatform 1885 * @atomicservice 1886 * @since 12 1887 */ 1888 onScrollVisibleContentChange(handler: OnScrollVisibleContentChangeCallback): ListAttribute; 1889 1890 /** 1891 * Called when the list begins to arrive. 1892 * 1893 * @param { function } event 1894 * @returns { ListAttribute } 1895 * @syscap SystemCapability.ArkUI.ArkUI.Full 1896 * @since 7 1897 */ 1898 /** 1899 * Called when the list begins to arrive. 1900 * 1901 * @param { function } event 1902 * @returns { ListAttribute } 1903 * @syscap SystemCapability.ArkUI.ArkUI.Full 1904 * @form 1905 * @since 9 1906 */ 1907 /** 1908 * Called when the list begins to arrive. 1909 * 1910 * @param { function } event 1911 * @returns { ListAttribute } 1912 * @syscap SystemCapability.ArkUI.ArkUI.Full 1913 * @crossplatform 1914 * @form 1915 * @since 10 1916 */ 1917 /** 1918 * Called when the list begins to arrive. 1919 * 1920 * @param { function } event 1921 * @returns { ListAttribute } 1922 * @syscap SystemCapability.ArkUI.ArkUI.Full 1923 * @crossplatform 1924 * @form 1925 * @atomicservice 1926 * @since 11 1927 */ 1928 onReachStart(event: () => void): ListAttribute; 1929 1930 /** 1931 * Called when the list reaches the end. 1932 * 1933 * @param { function } event 1934 * @returns { ListAttribute } 1935 * @syscap SystemCapability.ArkUI.ArkUI.Full 1936 * @since 7 1937 */ 1938 /** 1939 * Called when the list reaches the end. 1940 * 1941 * @param { function } event 1942 * @returns { ListAttribute } 1943 * @syscap SystemCapability.ArkUI.ArkUI.Full 1944 * @form 1945 * @since 9 1946 */ 1947 /** 1948 * Called when the list reaches the end. 1949 * 1950 * @param { function } event 1951 * @returns { ListAttribute } 1952 * @syscap SystemCapability.ArkUI.ArkUI.Full 1953 * @crossplatform 1954 * @form 1955 * @since 10 1956 */ 1957 /** 1958 * Called when the list reaches the end. 1959 * 1960 * @param { function } event 1961 * @returns { ListAttribute } 1962 * @syscap SystemCapability.ArkUI.ArkUI.Full 1963 * @crossplatform 1964 * @form 1965 * @atomicservice 1966 * @since 11 1967 */ 1968 onReachEnd(event: () => void): ListAttribute; 1969 1970 /** 1971 * Called when the slider start. 1972 * 1973 * @param { function } event 1974 * @returns { ListAttribute } 1975 * @syscap SystemCapability.ArkUI.ArkUI.Full 1976 * @form 1977 * @since 9 1978 */ 1979 /** 1980 * Called when the slider start. 1981 * 1982 * @param { function } event 1983 * @returns { ListAttribute } 1984 * @syscap SystemCapability.ArkUI.ArkUI.Full 1985 * @crossplatform 1986 * @form 1987 * @since 10 1988 */ 1989 /** 1990 * Called when the slider start. 1991 * 1992 * @param { function } event 1993 * @returns { ListAttribute } 1994 * @syscap SystemCapability.ArkUI.ArkUI.Full 1995 * @crossplatform 1996 * @form 1997 * @atomicservice 1998 * @since 11 1999 */ 2000 onScrollStart(event: () => void): ListAttribute; 2001 2002 /** 2003 * Called when the slider stops. 2004 * 2005 * @param { function } event 2006 * @returns { ListAttribute } 2007 * @syscap SystemCapability.ArkUI.ArkUI.Full 2008 * @since 7 2009 */ 2010 /** 2011 * Called when the slider stops. 2012 * 2013 * @param { function } event 2014 * @returns { ListAttribute } 2015 * @syscap SystemCapability.ArkUI.ArkUI.Full 2016 * @form 2017 * @since 9 2018 */ 2019 /** 2020 * Called when the slider stops. 2021 * 2022 * @param { function } event 2023 * @returns { ListAttribute } 2024 * @syscap SystemCapability.ArkUI.ArkUI.Full 2025 * @crossplatform 2026 * @form 2027 * @since 10 2028 */ 2029 /** 2030 * Called when the slider stops. 2031 * 2032 * @param { function } event 2033 * @returns { ListAttribute } 2034 * @syscap SystemCapability.ArkUI.ArkUI.Full 2035 * @crossplatform 2036 * @form 2037 * @atomicservice 2038 * @since 11 2039 */ 2040 onScrollStop(event: () => void): ListAttribute; 2041 2042 /** 2043 * Called when a list item is deleted. 2044 * 2045 * @param { function } event 2046 * @returns { ListAttribute } 2047 * @syscap SystemCapability.ArkUI.ArkUI.Full 2048 * @since 7 2049 * @deprecated since 9 2050 */ 2051 onItemDelete(event: (index: number) => boolean): ListAttribute; 2052 2053 /** 2054 * Called when a list item is moved. 2055 * 2056 * @param { function } event 2057 * @returns { ListAttribute } 2058 * @syscap SystemCapability.ArkUI.ArkUI.Full 2059 * @since 7 2060 */ 2061 /** 2062 * Called when a list item is moved. 2063 * 2064 * @param { function } event 2065 * @returns { ListAttribute } 2066 * @syscap SystemCapability.ArkUI.ArkUI.Full 2067 * @crossplatform 2068 * @since 10 2069 */ 2070 /** 2071 * Called when a list item is moved. 2072 * 2073 * @param { function } event 2074 * @returns { ListAttribute } 2075 * @syscap SystemCapability.ArkUI.ArkUI.Full 2076 * @crossplatform 2077 * @atomicservice 2078 * @since 11 2079 */ 2080 onItemMove(event: (from: number, to: number) => boolean): ListAttribute; 2081 2082 /** 2083 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 2084 * (To be triggered, press and hold for 170 milliseconds (ms)) 2085 * 2086 * @param { function } event 2087 * @returns { ListAttribute } 2088 * @syscap SystemCapability.ArkUI.ArkUI.Full 2089 * @since 8 2090 */ 2091 /** 2092 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 2093 * (To be triggered, press and hold for 170 milliseconds (ms)) 2094 * 2095 * @param { function } event 2096 * @returns { ListAttribute } 2097 * @syscap SystemCapability.ArkUI.ArkUI.Full 2098 * @crossplatform 2099 * @since 10 2100 */ 2101 /** 2102 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 2103 * (To be triggered, press and hold for 170 milliseconds (ms)) 2104 * 2105 * @param { function } event 2106 * @returns { ListAttribute } 2107 * @syscap SystemCapability.ArkUI.ArkUI.Full 2108 * @crossplatform 2109 * @atomicservice 2110 * @since 11 2111 */ 2112 onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): ListAttribute; 2113 2114 /** 2115 * After binding, a callback is triggered when the component is dragged to the range of the component. 2116 * 2117 * @param { function } event 2118 * @returns { ListAttribute } 2119 * @syscap SystemCapability.ArkUI.ArkUI.Full 2120 * @since 8 2121 */ 2122 /** 2123 * After binding, a callback is triggered when the component is dragged to the range of the component. 2124 * 2125 * @param { function } event 2126 * @returns { ListAttribute } 2127 * @syscap SystemCapability.ArkUI.ArkUI.Full 2128 * @crossplatform 2129 * @since 10 2130 */ 2131 /** 2132 * After binding, a callback is triggered when the component is dragged to the range of the component. 2133 * 2134 * @param { function } event 2135 * @returns { ListAttribute } 2136 * @syscap SystemCapability.ArkUI.ArkUI.Full 2137 * @crossplatform 2138 * @atomicservice 2139 * @since 11 2140 */ 2141 onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute; 2142 2143 /** 2144 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 2145 * 2146 * @param { function } event 2147 * @returns { ListAttribute } 2148 * @syscap SystemCapability.ArkUI.ArkUI.Full 2149 * @since 8 2150 */ 2151 /** 2152 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 2153 * 2154 * @param { function } event 2155 * @returns { ListAttribute } 2156 * @syscap SystemCapability.ArkUI.ArkUI.Full 2157 * @crossplatform 2158 * @since 10 2159 */ 2160 /** 2161 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 2162 * 2163 * @param { function } event 2164 * @returns { ListAttribute } 2165 * @syscap SystemCapability.ArkUI.ArkUI.Full 2166 * @crossplatform 2167 * @atomicservice 2168 * @since 11 2169 */ 2170 onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute; 2171 2172 /** 2173 * After binding, a callback is triggered when the component is dragged out of the component range. 2174 * 2175 * @param { function } event 2176 * @returns { ListAttribute } 2177 * @syscap SystemCapability.ArkUI.ArkUI.Full 2178 * @since 8 2179 */ 2180 /** 2181 * After binding, a callback is triggered when the component is dragged out of the component range. 2182 * 2183 * @param { function } event 2184 * @returns { ListAttribute } 2185 * @syscap SystemCapability.ArkUI.ArkUI.Full 2186 * @crossplatform 2187 * @since 10 2188 */ 2189 /** 2190 * After binding, a callback is triggered when the component is dragged out of the component range. 2191 * 2192 * @param { function } event 2193 * @returns { ListAttribute } 2194 * @syscap SystemCapability.ArkUI.ArkUI.Full 2195 * @crossplatform 2196 * @atomicservice 2197 * @since 11 2198 */ 2199 onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute; 2200 2201 /** 2202 * The component bound to this event can be used as the drag release target. 2203 * This callback is triggered when the drag behavior is stopped within the scope of the component. 2204 * 2205 * @param { function } event 2206 * @returns { ListAttribute } 2207 * @syscap SystemCapability.ArkUI.ArkUI.Full 2208 * @since 8 2209 */ 2210 /** 2211 * The component bound to this event can be used as the drag release target. 2212 * This callback is triggered when the drag behavior is stopped within the scope of the component. 2213 * 2214 * @param { function } event 2215 * @returns { ListAttribute } 2216 * @syscap SystemCapability.ArkUI.ArkUI.Full 2217 * @crossplatform 2218 * @since 10 2219 */ 2220 /** 2221 * The component bound to this event can be used as the drag release target. 2222 * This callback is triggered when the drag behavior is stopped within the scope of the component. 2223 * 2224 * @param { function } event 2225 * @returns { ListAttribute } 2226 * @syscap SystemCapability.ArkUI.ArkUI.Full 2227 * @crossplatform 2228 * @atomicservice 2229 * @since 11 2230 */ 2231 onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; 2232 2233 /** 2234 * Called when scrolling begin each frame. 2235 * 2236 * @param { function } event 2237 * @returns { ListAttribute } 2238 * @syscap SystemCapability.ArkUI.ArkUI.Full 2239 * @form 2240 * @since 9 2241 */ 2242 /** 2243 * Called when scrolling begin each frame. 2244 * 2245 * @param { function } event 2246 * @returns { ListAttribute } 2247 * @syscap SystemCapability.ArkUI.ArkUI.Full 2248 * @crossplatform 2249 * @form 2250 * @since 10 2251 */ 2252 /** 2253 * Called when scrolling begin each frame. 2254 * 2255 * @param { function } event 2256 * @returns { ListAttribute } 2257 * @syscap SystemCapability.ArkUI.ArkUI.Full 2258 * @crossplatform 2259 * @form 2260 * @atomicservice 2261 * @since 11 2262 */ 2263 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute; 2264} 2265 2266/** 2267 * Defines List Component. 2268 * 2269 * @syscap SystemCapability.ArkUI.ArkUI.Full 2270 * @since 7 2271 */ 2272/** 2273 * Defines List Component. 2274 * 2275 * @syscap SystemCapability.ArkUI.ArkUI.Full 2276 * @form 2277 * @since 9 2278 */ 2279/** 2280 * Defines List Component. 2281 * 2282 * @syscap SystemCapability.ArkUI.ArkUI.Full 2283 * @crossplatform 2284 * @form 2285 * @since 10 2286 */ 2287/** 2288 * Defines List Component. 2289 * 2290 * @syscap SystemCapability.ArkUI.ArkUI.Full 2291 * @crossplatform 2292 * @form 2293 * @atomicservice 2294 * @since 11 2295 */ 2296declare const List: ListInterface; 2297 2298/** 2299 * Defines List Component instance. 2300 * 2301 * @syscap SystemCapability.ArkUI.ArkUI.Full 2302 * @since 7 2303 */ 2304/** 2305 * Defines List Component instance. 2306 * 2307 * @syscap SystemCapability.ArkUI.ArkUI.Full 2308 * @form 2309 * @since 9 2310 */ 2311/** 2312 * Defines List Component instance. 2313 * 2314 * @syscap SystemCapability.ArkUI.ArkUI.Full 2315 * @crossplatform 2316 * @form 2317 * @since 10 2318 */ 2319/** 2320 * Defines List Component instance. 2321 * 2322 * @syscap SystemCapability.ArkUI.ArkUI.Full 2323 * @crossplatform 2324 * @form 2325 * @atomicservice 2326 * @since 11 2327 */ 2328declare const ListInstance: ListAttribute; 2329