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