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 14 835 */ 836 getVisibleListContentInfo(x: number, y: number): VisibleListContentInfo; 837} 838 839/** 840 * The list interface is extended. 841 * 842 * @interface ListInterface 843 * @syscap SystemCapability.ArkUI.ArkUI.Full 844 * @since 7 845 */ 846/** 847 * The list interface is extended. 848 * 849 * @interface ListInterface 850 * @syscap SystemCapability.ArkUI.ArkUI.Full 851 * @form 852 * @since 9 853 */ 854/** 855 * The list interface is extended. 856 * 857 * @interface ListInterface 858 * @syscap SystemCapability.ArkUI.ArkUI.Full 859 * @crossplatform 860 * @form 861 * @since 10 862 */ 863/** 864 * The list interface is extended. 865 * 866 * @interface ListInterface 867 * @syscap SystemCapability.ArkUI.ArkUI.Full 868 * @crossplatform 869 * @form 870 * @atomicservice 871 * @since 11 872 */ 873interface ListInterface { 874 /** 875 * Called when interface data is called. 876 * 877 * @param { object } value 878 * @returns { ListAttribute } 879 * @syscap SystemCapability.ArkUI.ArkUI.Full 880 * @since 7 881 */ 882 /** 883 * Called when interface data is called. 884 * 885 * @param { object } value 886 * @returns { ListAttribute } 887 * @syscap SystemCapability.ArkUI.ArkUI.Full 888 * @form 889 * @since 9 890 */ 891 /** 892 * Called when interface data is called. 893 * 894 * @param { object } value 895 * @returns { ListAttribute } 896 * @syscap SystemCapability.ArkUI.ArkUI.Full 897 * @crossplatform 898 * @form 899 * @since 10 900 */ 901 /** 902 * Called when interface data is called. 903 * 904 * @param { object } value 905 * @returns { ListAttribute } 906 * @syscap SystemCapability.ArkUI.ArkUI.Full 907 * @crossplatform 908 * @form 909 * @atomicservice 910 * @since 11 911 */ 912 (value?: { initialIndex?: number; space?: number | string; scroller?: Scroller }): ListAttribute; 913} 914 915/** 916 * @extends CommonMethod<ListAttribute> 917 * @syscap SystemCapability.ArkUI.ArkUI.Full 918 * @since 7 919 */ 920/** 921 * @extends CommonMethod<ListAttribute> 922 * @syscap SystemCapability.ArkUI.ArkUI.Full 923 * @form 924 * @since 9 925 */ 926/** 927 * @extends CommonMethod<ListAttribute> 928 * @syscap SystemCapability.ArkUI.ArkUI.Full 929 * @crossplatform 930 * @form 931 * @since 10 932 */ 933/** 934 * @extends ScrollableCommonMethod<ListAttribute> 935 * @syscap SystemCapability.ArkUI.ArkUI.Full 936 * @crossplatform 937 * @form 938 * @atomicservice 939 * @since 11 940 */ 941declare class ListAttribute extends ScrollableCommonMethod<ListAttribute> { 942 /** 943 * Called when need to decide how much lanes the list will show. 944 * 945 * @param { number | LengthConstrain } value 946 * @returns { ListAttribute } 947 * @syscap SystemCapability.ArkUI.ArkUI.Full 948 * @form 949 * @since 9 950 */ 951 /** 952 * Called when need to decide how much lanes the list will show. 953 * 954 * @param { number | LengthConstrain } value 955 * @param { Dimension } gutter 956 * @returns { ListAttribute } 957 * @syscap SystemCapability.ArkUI.ArkUI.Full 958 * @crossplatform 959 * @form 960 * @since 10 961 */ 962 /** 963 * Called when need to decide how much lanes the list will show. 964 * 965 * @param { number | LengthConstrain } value 966 * @param { Dimension } gutter 967 * @returns { ListAttribute } 968 * @syscap SystemCapability.ArkUI.ArkUI.Full 969 * @crossplatform 970 * @form 971 * @atomicservice 972 * @since 11 973 */ 974 lanes(value: number | LengthConstrain, gutter?: Dimension): ListAttribute; 975 976 /** 977 * Called when need to decide how to align lanes in the direction of the cross axis. 978 * 979 * @param { ListItemAlign } value 980 * @returns { ListAttribute } 981 * @syscap SystemCapability.ArkUI.ArkUI.Full 982 * @form 983 * @since 9 984 */ 985 /** 986 * Called when need to decide how to align lanes in the direction of the cross axis. 987 * 988 * @param { ListItemAlign } value 989 * @returns { ListAttribute } 990 * @syscap SystemCapability.ArkUI.ArkUI.Full 991 * @crossplatform 992 * @form 993 * @since 10 994 */ 995 /** 996 * Called when need to decide how to align lanes in the direction of the cross axis. 997 * 998 * @param { ListItemAlign } value 999 * @returns { ListAttribute } 1000 * @syscap SystemCapability.ArkUI.ArkUI.Full 1001 * @crossplatform 1002 * @form 1003 * @atomicservice 1004 * @since 11 1005 */ 1006 alignListItem(value: ListItemAlign): ListAttribute; 1007 1008 /** 1009 * Called when the arrangement direction of the list component is set. 1010 * 1011 * @param { Axis } value 1012 * @returns { ListAttribute } 1013 * @syscap SystemCapability.ArkUI.ArkUI.Full 1014 * @since 7 1015 */ 1016 /** 1017 * Called when the arrangement direction of the list component is set. 1018 * 1019 * @param { Axis } value 1020 * @returns { ListAttribute } 1021 * @syscap SystemCapability.ArkUI.ArkUI.Full 1022 * @form 1023 * @since 9 1024 */ 1025 /** 1026 * Called when the arrangement direction of the list component is set. 1027 * 1028 * @param { Axis } value 1029 * @returns { ListAttribute } 1030 * @syscap SystemCapability.ArkUI.ArkUI.Full 1031 * @crossplatform 1032 * @form 1033 * @since 10 1034 */ 1035 /** 1036 * Called when the arrangement direction of the list component is set. 1037 * 1038 * @param { Axis } value 1039 * @returns { ListAttribute } 1040 * @syscap SystemCapability.ArkUI.ArkUI.Full 1041 * @crossplatform 1042 * @form 1043 * @atomicservice 1044 * @since 11 1045 */ 1046 listDirection(value: Axis): ListAttribute; 1047 1048 /** 1049 * Called when the display mode of the side slider is set. 1050 * 1051 * @param { BarState } value 1052 * @returns { ListAttribute } 1053 * @syscap SystemCapability.ArkUI.ArkUI.Full 1054 * @since 7 1055 */ 1056 /** 1057 * Called when the display mode of the side slider is set. 1058 * 1059 * @param { BarState } value 1060 * @returns { ListAttribute } 1061 * @syscap SystemCapability.ArkUI.ArkUI.Full 1062 * @form 1063 * @since 9 1064 */ 1065 /** 1066 * Called when the display mode of the side slider is set. 1067 * 1068 * @param { BarState } value 1069 * @returns { ListAttribute } 1070 * @syscap SystemCapability.ArkUI.ArkUI.Full 1071 * @crossplatform 1072 * @form 1073 * @since 10 1074 */ 1075 /** 1076 * Called when the display mode of the side slider is set. 1077 * 1078 * @param { BarState } value 1079 * @returns { ListAttribute } 1080 * @syscap SystemCapability.ArkUI.ArkUI.Full 1081 * @crossplatform 1082 * @form 1083 * @atomicservice 1084 * @since 11 1085 */ 1086 scrollBar(value: BarState): ListAttribute; 1087 1088 /** 1089 * Called when the sliding effect is set. 1090 * 1091 * @param { EdgeEffect } value 1092 * @returns { ListAttribute } 1093 * @syscap SystemCapability.ArkUI.ArkUI.Full 1094 * @since 7 1095 */ 1096 /** 1097 * Called when the sliding effect is set. 1098 * 1099 * @param { EdgeEffect } value 1100 * @returns { ListAttribute } 1101 * @syscap SystemCapability.ArkUI.ArkUI.Full 1102 * @form 1103 * @since 9 1104 */ 1105 /** 1106 * Called when the sliding effect is set. 1107 * 1108 * @param { EdgeEffect } value 1109 * @returns { ListAttribute } 1110 * @syscap SystemCapability.ArkUI.ArkUI.Full 1111 * @crossplatform 1112 * @form 1113 * @since 10 1114 */ 1115 /** 1116 * Called when the sliding effect is set. 1117 * 1118 * @param { EdgeEffect } value 1119 * @param { EdgeEffectOptions } options 1120 * @returns { ListAttribute } 1121 * @syscap SystemCapability.ArkUI.ArkUI.Full 1122 * @crossplatform 1123 * @form 1124 * @atomicservice 1125 * @since 11 1126 */ 1127 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions): ListAttribute; 1128 1129 /** 1130 * Called when need to decide contentStartOffset the list will show. 1131 * @param { number } value - the value Of startOffset. 1132 * @returns { ListAttribute } the attribute of the list. 1133 * @syscap SystemCapability.ArkUI.ArkUI.Full 1134 * @crossplatform 1135 * @since 11 1136 */ 1137 /** 1138 * Called when need to decide contentStartOffset the list will show. 1139 * @param { number } value - the value Of startOffset. 1140 * @returns { ListAttribute } the attribute of the list. 1141 * @syscap SystemCapability.ArkUI.ArkUI.Full 1142 * @crossplatform 1143 * @atomicservice 1144 * @since 12 1145 */ 1146 contentStartOffset(value: number): ListAttribute; 1147 1148 /** 1149 * Called when need to decide contentEndOffset the list will show. 1150 * @param { number } value - the value Of endOffset. 1151 * @returns { ListAttribute } the attribute of the list. 1152 * @syscap SystemCapability.ArkUI.ArkUI.Full 1153 * @crossplatform 1154 * @since 11 1155 */ 1156 /** 1157 * Called when need to decide contentEndOffset the list will show. 1158 * @param { number } value - the value Of endOffset. 1159 * @returns { ListAttribute } the attribute of the list. 1160 * @syscap SystemCapability.ArkUI.ArkUI.Full 1161 * @crossplatform 1162 * @atomicservice 1163 * @since 12 1164 */ 1165 contentEndOffset(value: number): ListAttribute; 1166 1167 /** 1168 * Called when the ListItem split line style is set. 1169 * 1170 * @param { object | null } value 1171 * @returns { ListAttribute } 1172 * @syscap SystemCapability.ArkUI.ArkUI.Full 1173 * @since 7 1174 */ 1175 /** 1176 * Called when the ListItem split line style is set. 1177 * 1178 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1179 * @returns { ListAttribute } 1180 * @syscap SystemCapability.ArkUI.ArkUI.Full 1181 * @form 1182 * @since 9 1183 */ 1184 /** 1185 * Called when the ListItem split line style is set. 1186 * 1187 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1188 * @returns { ListAttribute } 1189 * @syscap SystemCapability.ArkUI.ArkUI.Full 1190 * @crossplatform 1191 * @form 1192 * @since 10 1193 */ 1194 /** 1195 * Called when the ListItem split line style is set. 1196 * 1197 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1198 * @returns { ListAttribute } 1199 * @syscap SystemCapability.ArkUI.ArkUI.Full 1200 * @crossplatform 1201 * @form 1202 * @atomicservice 1203 * @since 11 1204 */ 1205 divider( 1206 value: { 1207 strokeWidth: Length; 1208 color?: ResourceColor; 1209 startMargin?: Length; 1210 endMargin?: Length; 1211 } | null, 1212 ): ListAttribute; 1213 1214 /** 1215 * Called when judging whether it is in editable mode. 1216 * 1217 * @param { boolean } value 1218 * @returns { ListAttribute } 1219 * @syscap SystemCapability.ArkUI.ArkUI.Full 1220 * @since 7 1221 * @deprecated since 9 1222 */ 1223 editMode(value: boolean): ListAttribute; 1224 1225 /** 1226 * Called when judging whether it is multiSelectable. 1227 * 1228 * @param { boolean } value 1229 * @returns { ListAttribute } 1230 * @syscap SystemCapability.ArkUI.ArkUI.Full 1231 * @since 8 1232 */ 1233 /** 1234 * Called when judging whether it is multiSelectable. 1235 * 1236 * @param { boolean } value 1237 * @returns { ListAttribute } 1238 * @syscap SystemCapability.ArkUI.ArkUI.Full 1239 * @form 1240 * @since 9 1241 */ 1242 /** 1243 * Called when judging whether it is multiSelectable. 1244 * 1245 * @param { boolean } value 1246 * @returns { ListAttribute } 1247 * @syscap SystemCapability.ArkUI.ArkUI.Full 1248 * @crossplatform 1249 * @form 1250 * @since 10 1251 */ 1252 /** 1253 * Called when judging whether it is multiSelectable. 1254 * 1255 * @param { boolean } value 1256 * @returns { ListAttribute } 1257 * @syscap SystemCapability.ArkUI.ArkUI.Full 1258 * @crossplatform 1259 * @form 1260 * @atomicservice 1261 * @since 11 1262 */ 1263 multiSelectable(value: boolean): ListAttribute; 1264 1265 /** 1266 * Called when the minimum number of list item caches is set for long list deferred loading. 1267 * 1268 * @param { number } value 1269 * @returns { ListAttribute } 1270 * @syscap SystemCapability.ArkUI.ArkUI.Full 1271 * @since 7 1272 */ 1273 /** 1274 * Called when the minimum number of list item caches is set for long list deferred loading. 1275 * 1276 * @param { number } value 1277 * @returns { ListAttribute } 1278 * @syscap SystemCapability.ArkUI.ArkUI.Full 1279 * @form 1280 * @since 9 1281 */ 1282 /** 1283 * Called when the minimum number of list item caches is set for long list deferred loading. 1284 * 1285 * @param { number } value 1286 * @returns { ListAttribute } 1287 * @syscap SystemCapability.ArkUI.ArkUI.Full 1288 * @crossplatform 1289 * @form 1290 * @since 10 1291 */ 1292 /** 1293 * Called when the minimum number of list item caches is set for long list deferred loading. 1294 * 1295 * @param { number } value 1296 * @returns { ListAttribute } 1297 * @syscap SystemCapability.ArkUI.ArkUI.Full 1298 * @crossplatform 1299 * @form 1300 * @atomicservice 1301 * @since 11 1302 */ 1303 cachedCount(value: number): ListAttribute; 1304 1305 /** 1306 * Called when the minimum number of list item caches is set for long list deferred loading. 1307 * 1308 * @param { number } count - cached count. 1309 * @param { boolean } show - whether to show the nodes in the cache. 1310 * @returns { ListAttribute } the attribute of the list. 1311 * @syscap SystemCapability.ArkUI.ArkUI.Full 1312 * @crossplatform 1313 * @form 1314 * @atomicservice 1315 * @since 14 1316 */ 1317 cachedCount(count: number, show: boolean): ListAttribute; 1318 1319 /** 1320 * Called when setting whether to enable chain linkage dynamic effect. 1321 * 1322 * @param { boolean } value 1323 * @returns { ListAttribute } 1324 * @syscap SystemCapability.ArkUI.ArkUI.Full 1325 * @since 7 1326 */ 1327 /** 1328 * Called when setting whether to enable chain linkage dynamic effect. 1329 * 1330 * @param { boolean } value 1331 * @returns { ListAttribute } 1332 * @syscap SystemCapability.ArkUI.ArkUI.Full 1333 * @form 1334 * @since 9 1335 */ 1336 /** 1337 * Called when setting whether to enable chain linkage dynamic effect. 1338 * 1339 * @param { boolean } value 1340 * @returns { ListAttribute } 1341 * @syscap SystemCapability.ArkUI.ArkUI.Full 1342 * @crossplatform 1343 * @form 1344 * @since 10 1345 */ 1346 /** 1347 * Called when setting whether to enable chain linkage dynamic effect. 1348 * 1349 * @param { boolean } value 1350 * @returns { ListAttribute } 1351 * @syscap SystemCapability.ArkUI.ArkUI.Full 1352 * @crossplatform 1353 * @form 1354 * @atomicservice 1355 * @since 11 1356 */ 1357 chainAnimation(value: boolean): ListAttribute; 1358 1359 /** 1360 * Called to setting chain linkage dynamic effect options. 1361 * 1362 * @param { ChainAnimationOptions } value - options of the chain animation. 1363 * @returns { ListAttribute } the attribute of the list. 1364 * @syscap SystemCapability.ArkUI.ArkUI.Full 1365 * @systemapi 1366 * @since 10 1367 */ 1368 chainAnimationOptions(value: ChainAnimationOptions): ListAttribute; 1369 1370 /** 1371 * Called when header or footer of item group will be pinned. 1372 * 1373 * @param { StickyStyle } value 1374 * @returns { ListAttribute } 1375 * @syscap SystemCapability.ArkUI.ArkUI.Full 1376 * @form 1377 * @since 9 1378 */ 1379 /** 1380 * Called when header or footer of item group will be pinned. 1381 * 1382 * @param { StickyStyle } value 1383 * @returns { ListAttribute } 1384 * @syscap SystemCapability.ArkUI.ArkUI.Full 1385 * @crossplatform 1386 * @form 1387 * @since 10 1388 */ 1389 /** 1390 * Called when header or footer of item group will be pinned. 1391 * 1392 * @param { StickyStyle } value 1393 * @returns { ListAttribute } 1394 * @syscap SystemCapability.ArkUI.ArkUI.Full 1395 * @crossplatform 1396 * @form 1397 * @atomicservice 1398 * @since 11 1399 */ 1400 sticky(value: StickyStyle): ListAttribute; 1401 1402 /** 1403 * Called to set list item scroll end alignment effect. 1404 * 1405 * @param { ScrollSnapAlign } value - options of the list alignment effect. 1406 * @returns { ListAttribute } the attribute of the list. 1407 * @syscap SystemCapability.ArkUI.ArkUI.Full 1408 * @since 10 1409 */ 1410 /** 1411 * Called to set list item scroll end alignment effect. 1412 * 1413 * @param { ScrollSnapAlign } value - options of the list alignment effect. 1414 * @returns { ListAttribute } the attribute of the list. 1415 * @syscap SystemCapability.ArkUI.ArkUI.Full 1416 * @crossplatform 1417 * @atomicservice 1418 * @since 11 1419 */ 1420 scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; 1421 1422 /** 1423 * Called to setting the nested scroll options. 1424 * 1425 * @param { NestedScrollOptions } value - options for nested scrolling. 1426 * @returns { ListAttribute } the attribute of the list. 1427 * @syscap SystemCapability.ArkUI.ArkUI.Full 1428 * @since 10 1429 */ 1430 /** 1431 * Called to setting the nested scroll options. 1432 * 1433 * @param { NestedScrollOptions } value - options for nested scrolling. 1434 * @returns { ListAttribute } the attribute of the list. 1435 * @syscap SystemCapability.ArkUI.ArkUI.Full 1436 * @crossplatform 1437 * @atomicservice 1438 * @since 11 1439 */ 1440 nestedScroll(value: NestedScrollOptions): ListAttribute; 1441 1442 /** 1443 * Called when setting whether to enable scroll by gesture or mouse. 1444 * 1445 * @param { boolean } value 1446 * @returns { ListAttribute } The attribute of the list 1447 * @syscap SystemCapability.ArkUI.ArkUI.Full 1448 * @crossplatform 1449 * @since 10 1450 */ 1451 /** 1452 * Called when setting whether to enable scroll by gesture or mouse. 1453 * 1454 * @param { boolean } value 1455 * @returns { ListAttribute } The attribute of the list 1456 * @syscap SystemCapability.ArkUI.ArkUI.Full 1457 * @crossplatform 1458 * @atomicservice 1459 * @since 11 1460 */ 1461 enableScrollInteraction(value: boolean): ListAttribute; 1462 1463 /** 1464 * Called to setting the friction. 1465 * 1466 * @param { number | Resource } value - options for scrolling friction. 1467 * @returns { ListAttribute } the attribute of the list. 1468 * @syscap SystemCapability.ArkUI.ArkUI.Full 1469 * @crossplatform 1470 * @since 10 1471 */ 1472 /** 1473 * Called to setting the friction. 1474 * 1475 * @param { number | Resource } value - options for scrolling friction. 1476 * @returns { ListAttribute } the attribute of the list. 1477 * @syscap SystemCapability.ArkUI.ArkUI.Full 1478 * @crossplatform 1479 * @atomicservice 1480 * @since 11 1481 */ 1482 friction(value: number | Resource): ListAttribute; 1483 1484 /** 1485 * Set children main size for List. 1486 * 1487 * @param { ChildrenMainSize } value - children main size for List 1488 * @returns { ListAttribute } the attribute of the list. 1489 * @syscap SystemCapability.ArkUI.ArkUI.Full 1490 * @crossplatform 1491 * @atomicservice 1492 * @since 12 1493 */ 1494 childrenMainSize(value: ChildrenMainSize): ListAttribute; 1495 1496 /** 1497 * Set maintain visible content position List. 1498 * 1499 * @param { boolean } enabled - maintain visible content position. 1500 * @returns { ListAttribute } the attribute of the list. 1501 * @syscap SystemCapability.ArkUI.ArkUI.Full 1502 * @crossplatform 1503 * @atomicservice 1504 * @since 12 1505 */ 1506 maintainVisibleContentPosition(enabled: boolean): ListAttribute; 1507 1508 /** 1509 * Called when the offset and status callback of the slide are set. 1510 * 1511 * @param { function } event 1512 * @returns { ListAttribute } 1513 * @syscap SystemCapability.ArkUI.ArkUI.Full 1514 * @since 7 1515 */ 1516 /** 1517 * Called when the offset and status callback of the slide are set. 1518 * 1519 * @param { function } event 1520 * @returns { ListAttribute } 1521 * @syscap SystemCapability.ArkUI.ArkUI.Full 1522 * @form 1523 * @since 9 1524 */ 1525 /** 1526 * Called when the offset and status callback of the slide are set. 1527 * 1528 * @param { function } event 1529 * @returns { ListAttribute } 1530 * @syscap SystemCapability.ArkUI.ArkUI.Full 1531 * @crossplatform 1532 * @form 1533 * @since 10 1534 */ 1535 /** 1536 * Called when the offset and status callback of the slide are set. 1537 * 1538 * @param { function } event 1539 * @returns { ListAttribute } 1540 * @syscap SystemCapability.ArkUI.ArkUI.Full 1541 * @crossplatform 1542 * @form 1543 * @atomicservice 1544 * @since 11 1545 * @deprecated since 12 1546 * @useinstead common.ScrollableCommonMethod#onDidScroll 1547 */ 1548 onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): ListAttribute; 1549 1550 /** 1551 * Called when the start and end positions of the display change. 1552 * 1553 * @param { function } event 1554 * @returns { ListAttribute } 1555 * @syscap SystemCapability.ArkUI.ArkUI.Full 1556 * @since 7 1557 */ 1558 /** 1559 * Called when the start and end positions of the display change. 1560 * 1561 * @param { function } event 1562 * @returns { ListAttribute } 1563 * @syscap SystemCapability.ArkUI.ArkUI.Full 1564 * @form 1565 * @since 9 1566 */ 1567 /** 1568 * Called when the start and end positions of the display change. 1569 * 1570 * @param { function } event 1571 * @returns { ListAttribute } 1572 * @syscap SystemCapability.ArkUI.ArkUI.Full 1573 * @crossplatform 1574 * @form 1575 * @since 10 1576 */ 1577 /** 1578 * Called when the start and end positions of the display change. 1579 * 1580 * @param { function } event 1581 * @returns { ListAttribute } 1582 * @syscap SystemCapability.ArkUI.ArkUI.Full 1583 * @crossplatform 1584 * @form 1585 * @atomicservice 1586 * @since 11 1587 */ 1588 onScrollIndex(event: (start: number, end: number, center: number) => void): ListAttribute; 1589 1590 /** 1591 * Called when the list visible content changes. 1592 * 1593 * @param { OnScrollVisibleContentChangeCallback } handler - Callback of Scroll Visible. 1594 * @returns { ListAttribute } 1595 * @syscap SystemCapability.ArkUI.ArkUI.Full 1596 * @crossplatform 1597 * @atomicservice 1598 * @since 12 1599 */ 1600 onScrollVisibleContentChange(handler: OnScrollVisibleContentChangeCallback): ListAttribute; 1601 1602 /** 1603 * Called when the list begins to arrive. 1604 * 1605 * @param { function } event 1606 * @returns { ListAttribute } 1607 * @syscap SystemCapability.ArkUI.ArkUI.Full 1608 * @since 7 1609 */ 1610 /** 1611 * Called when the list begins to arrive. 1612 * 1613 * @param { function } event 1614 * @returns { ListAttribute } 1615 * @syscap SystemCapability.ArkUI.ArkUI.Full 1616 * @form 1617 * @since 9 1618 */ 1619 /** 1620 * Called when the list begins to arrive. 1621 * 1622 * @param { function } event 1623 * @returns { ListAttribute } 1624 * @syscap SystemCapability.ArkUI.ArkUI.Full 1625 * @crossplatform 1626 * @form 1627 * @since 10 1628 */ 1629 /** 1630 * Called when the list begins to arrive. 1631 * 1632 * @param { function } event 1633 * @returns { ListAttribute } 1634 * @syscap SystemCapability.ArkUI.ArkUI.Full 1635 * @crossplatform 1636 * @form 1637 * @atomicservice 1638 * @since 11 1639 */ 1640 onReachStart(event: () => void): ListAttribute; 1641 1642 /** 1643 * Called when the list reaches the end. 1644 * 1645 * @param { function } event 1646 * @returns { ListAttribute } 1647 * @syscap SystemCapability.ArkUI.ArkUI.Full 1648 * @since 7 1649 */ 1650 /** 1651 * Called when the list reaches the end. 1652 * 1653 * @param { function } event 1654 * @returns { ListAttribute } 1655 * @syscap SystemCapability.ArkUI.ArkUI.Full 1656 * @form 1657 * @since 9 1658 */ 1659 /** 1660 * Called when the list reaches the end. 1661 * 1662 * @param { function } event 1663 * @returns { ListAttribute } 1664 * @syscap SystemCapability.ArkUI.ArkUI.Full 1665 * @crossplatform 1666 * @form 1667 * @since 10 1668 */ 1669 /** 1670 * Called when the list reaches the end. 1671 * 1672 * @param { function } event 1673 * @returns { ListAttribute } 1674 * @syscap SystemCapability.ArkUI.ArkUI.Full 1675 * @crossplatform 1676 * @form 1677 * @atomicservice 1678 * @since 11 1679 */ 1680 onReachEnd(event: () => void): ListAttribute; 1681 1682 /** 1683 * Called when the slider start. 1684 * 1685 * @param { function } event 1686 * @returns { ListAttribute } 1687 * @syscap SystemCapability.ArkUI.ArkUI.Full 1688 * @form 1689 * @since 9 1690 */ 1691 /** 1692 * Called when the slider start. 1693 * 1694 * @param { function } event 1695 * @returns { ListAttribute } 1696 * @syscap SystemCapability.ArkUI.ArkUI.Full 1697 * @crossplatform 1698 * @form 1699 * @since 10 1700 */ 1701 /** 1702 * Called when the slider start. 1703 * 1704 * @param { function } event 1705 * @returns { ListAttribute } 1706 * @syscap SystemCapability.ArkUI.ArkUI.Full 1707 * @crossplatform 1708 * @form 1709 * @atomicservice 1710 * @since 11 1711 */ 1712 onScrollStart(event: () => void): ListAttribute; 1713 1714 /** 1715 * Called when the slider stops. 1716 * 1717 * @param { function } event 1718 * @returns { ListAttribute } 1719 * @syscap SystemCapability.ArkUI.ArkUI.Full 1720 * @since 7 1721 */ 1722 /** 1723 * Called when the slider stops. 1724 * 1725 * @param { function } event 1726 * @returns { ListAttribute } 1727 * @syscap SystemCapability.ArkUI.ArkUI.Full 1728 * @form 1729 * @since 9 1730 */ 1731 /** 1732 * Called when the slider stops. 1733 * 1734 * @param { function } event 1735 * @returns { ListAttribute } 1736 * @syscap SystemCapability.ArkUI.ArkUI.Full 1737 * @crossplatform 1738 * @form 1739 * @since 10 1740 */ 1741 /** 1742 * Called when the slider stops. 1743 * 1744 * @param { function } event 1745 * @returns { ListAttribute } 1746 * @syscap SystemCapability.ArkUI.ArkUI.Full 1747 * @crossplatform 1748 * @form 1749 * @atomicservice 1750 * @since 11 1751 */ 1752 onScrollStop(event: () => void): ListAttribute; 1753 1754 /** 1755 * Called when a list item is deleted. 1756 * 1757 * @param { function } event 1758 * @returns { ListAttribute } 1759 * @syscap SystemCapability.ArkUI.ArkUI.Full 1760 * @since 7 1761 * @deprecated since 9 1762 */ 1763 onItemDelete(event: (index: number) => boolean): ListAttribute; 1764 1765 /** 1766 * Called when a list item is moved. 1767 * 1768 * @param { function } event 1769 * @returns { ListAttribute } 1770 * @syscap SystemCapability.ArkUI.ArkUI.Full 1771 * @since 7 1772 */ 1773 /** 1774 * Called when a list item is moved. 1775 * 1776 * @param { function } event 1777 * @returns { ListAttribute } 1778 * @syscap SystemCapability.ArkUI.ArkUI.Full 1779 * @crossplatform 1780 * @since 10 1781 */ 1782 /** 1783 * Called when a list item is moved. 1784 * 1785 * @param { function } event 1786 * @returns { ListAttribute } 1787 * @syscap SystemCapability.ArkUI.ArkUI.Full 1788 * @crossplatform 1789 * @atomicservice 1790 * @since 11 1791 */ 1792 onItemMove(event: (from: number, to: number) => boolean): ListAttribute; 1793 1794 /** 1795 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 1796 * (To be triggered, press and hold for 170 milliseconds (ms)) 1797 * 1798 * @param { function } event 1799 * @returns { ListAttribute } 1800 * @syscap SystemCapability.ArkUI.ArkUI.Full 1801 * @since 8 1802 */ 1803 /** 1804 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 1805 * (To be triggered, press and hold for 170 milliseconds (ms)) 1806 * 1807 * @param { function } event 1808 * @returns { ListAttribute } 1809 * @syscap SystemCapability.ArkUI.ArkUI.Full 1810 * @crossplatform 1811 * @since 10 1812 */ 1813 /** 1814 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 1815 * (To be triggered, press and hold for 170 milliseconds (ms)) 1816 * 1817 * @param { function } event 1818 * @returns { ListAttribute } 1819 * @syscap SystemCapability.ArkUI.ArkUI.Full 1820 * @crossplatform 1821 * @atomicservice 1822 * @since 11 1823 */ 1824 onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): ListAttribute; 1825 1826 /** 1827 * After binding, a callback is triggered when the component is dragged to the range of the component. 1828 * 1829 * @param { function } event 1830 * @returns { ListAttribute } 1831 * @syscap SystemCapability.ArkUI.ArkUI.Full 1832 * @since 8 1833 */ 1834 /** 1835 * After binding, a callback is triggered when the component is dragged to the range of the component. 1836 * 1837 * @param { function } event 1838 * @returns { ListAttribute } 1839 * @syscap SystemCapability.ArkUI.ArkUI.Full 1840 * @crossplatform 1841 * @since 10 1842 */ 1843 /** 1844 * After binding, a callback is triggered when the component is dragged to the range of the component. 1845 * 1846 * @param { function } event 1847 * @returns { ListAttribute } 1848 * @syscap SystemCapability.ArkUI.ArkUI.Full 1849 * @crossplatform 1850 * @atomicservice 1851 * @since 11 1852 */ 1853 onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute; 1854 1855 /** 1856 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 1857 * 1858 * @param { function } event 1859 * @returns { ListAttribute } 1860 * @syscap SystemCapability.ArkUI.ArkUI.Full 1861 * @since 8 1862 */ 1863 /** 1864 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 1865 * 1866 * @param { function } event 1867 * @returns { ListAttribute } 1868 * @syscap SystemCapability.ArkUI.ArkUI.Full 1869 * @crossplatform 1870 * @since 10 1871 */ 1872 /** 1873 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 1874 * 1875 * @param { function } event 1876 * @returns { ListAttribute } 1877 * @syscap SystemCapability.ArkUI.ArkUI.Full 1878 * @crossplatform 1879 * @atomicservice 1880 * @since 11 1881 */ 1882 onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute; 1883 1884 /** 1885 * After binding, a callback is triggered when the component is dragged out of the component range. 1886 * 1887 * @param { function } event 1888 * @returns { ListAttribute } 1889 * @syscap SystemCapability.ArkUI.ArkUI.Full 1890 * @since 8 1891 */ 1892 /** 1893 * After binding, a callback is triggered when the component is dragged out of the component range. 1894 * 1895 * @param { function } event 1896 * @returns { ListAttribute } 1897 * @syscap SystemCapability.ArkUI.ArkUI.Full 1898 * @crossplatform 1899 * @since 10 1900 */ 1901 /** 1902 * After binding, a callback is triggered when the component is dragged out of the component range. 1903 * 1904 * @param { function } event 1905 * @returns { ListAttribute } 1906 * @syscap SystemCapability.ArkUI.ArkUI.Full 1907 * @crossplatform 1908 * @atomicservice 1909 * @since 11 1910 */ 1911 onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute; 1912 1913 /** 1914 * The component bound to this event can be used as the drag release target. 1915 * This callback is triggered when the drag behavior is stopped within the scope of the component. 1916 * 1917 * @param { function } event 1918 * @returns { ListAttribute } 1919 * @syscap SystemCapability.ArkUI.ArkUI.Full 1920 * @since 8 1921 */ 1922 /** 1923 * The component bound to this event can be used as the drag release target. 1924 * This callback is triggered when the drag behavior is stopped within the scope of the component. 1925 * 1926 * @param { function } event 1927 * @returns { ListAttribute } 1928 * @syscap SystemCapability.ArkUI.ArkUI.Full 1929 * @crossplatform 1930 * @since 10 1931 */ 1932 /** 1933 * The component bound to this event can be used as the drag release target. 1934 * This callback is triggered when the drag behavior is stopped within the scope of the component. 1935 * 1936 * @param { function } event 1937 * @returns { ListAttribute } 1938 * @syscap SystemCapability.ArkUI.ArkUI.Full 1939 * @crossplatform 1940 * @atomicservice 1941 * @since 11 1942 */ 1943 onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; 1944 1945 /** 1946 * Called when scrolling begin each frame. 1947 * 1948 * @param { function } event 1949 * @returns { ListAttribute } 1950 * @syscap SystemCapability.ArkUI.ArkUI.Full 1951 * @form 1952 * @since 9 1953 */ 1954 /** 1955 * Called when scrolling begin each frame. 1956 * 1957 * @param { function } event 1958 * @returns { ListAttribute } 1959 * @syscap SystemCapability.ArkUI.ArkUI.Full 1960 * @crossplatform 1961 * @form 1962 * @since 10 1963 */ 1964 /** 1965 * Called when scrolling begin each frame. 1966 * 1967 * @param { function } event 1968 * @returns { ListAttribute } 1969 * @syscap SystemCapability.ArkUI.ArkUI.Full 1970 * @crossplatform 1971 * @form 1972 * @atomicservice 1973 * @since 11 1974 */ 1975 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute; 1976} 1977 1978/** 1979 * Defines List Component. 1980 * 1981 * @syscap SystemCapability.ArkUI.ArkUI.Full 1982 * @since 7 1983 */ 1984/** 1985 * Defines List Component. 1986 * 1987 * @syscap SystemCapability.ArkUI.ArkUI.Full 1988 * @form 1989 * @since 9 1990 */ 1991/** 1992 * Defines List Component. 1993 * 1994 * @syscap SystemCapability.ArkUI.ArkUI.Full 1995 * @crossplatform 1996 * @form 1997 * @since 10 1998 */ 1999/** 2000 * Defines List Component. 2001 * 2002 * @syscap SystemCapability.ArkUI.ArkUI.Full 2003 * @crossplatform 2004 * @form 2005 * @atomicservice 2006 * @since 11 2007 */ 2008declare const List: ListInterface; 2009 2010/** 2011 * Defines List Component instance. 2012 * 2013 * @syscap SystemCapability.ArkUI.ArkUI.Full 2014 * @since 7 2015 */ 2016/** 2017 * Defines List Component instance. 2018 * 2019 * @syscap SystemCapability.ArkUI.ArkUI.Full 2020 * @form 2021 * @since 9 2022 */ 2023/** 2024 * Defines List Component instance. 2025 * 2026 * @syscap SystemCapability.ArkUI.ArkUI.Full 2027 * @crossplatform 2028 * @form 2029 * @since 10 2030 */ 2031/** 2032 * Defines List Component instance. 2033 * 2034 * @syscap SystemCapability.ArkUI.ArkUI.Full 2035 * @crossplatform 2036 * @form 2037 * @atomicservice 2038 * @since 11 2039 */ 2040declare const ListInstance: ListAttribute; 2041