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 * Defines List constructor options. 841 * 842 * @interface ListOptions 843 * @syscap SystemCapability.ArkUI.ArkUI.Full 844 * @crossplatform 845 * @form 846 * @atomicservice 847 * @since 18 848 */ 849interface ListOptions { 850 /** 851 * Set initialIndex. 852 * 853 * @type { ?number } 854 * @syscap SystemCapability.ArkUI.ArkUI.Full 855 * @since 7 856 */ 857 /** 858 * Set initialIndex. 859 * 860 * @type { ?number } 861 * @syscap SystemCapability.ArkUI.ArkUI.Full 862 * @form 863 * @since 9 864 */ 865 /** 866 * Set initialIndex. 867 * 868 * @type { ?number } 869 * @syscap SystemCapability.ArkUI.ArkUI.Full 870 * @crossplatform 871 * @form 872 * @since 10 873 */ 874 /** 875 * Set initialIndex. 876 * 877 * @type { ?number } 878 * @syscap SystemCapability.ArkUI.ArkUI.Full 879 * @crossplatform 880 * @form 881 * @atomicservice 882 * @since 11 883 */ 884 /** 885 * Set initialIndex. 886 * Anonymous Object Rectification. 887 * 888 * @type { ?number } 889 * @syscap SystemCapability.ArkUI.ArkUI.Full 890 * @crossplatform 891 * @form 892 * @atomicservice 893 * @since 18 894 */ 895 initialIndex?: number; 896 /** 897 * Set space. 898 * 899 * @type { ?(number | string) } 900 * @syscap SystemCapability.ArkUI.ArkUI.Full 901 * @since 7 902 */ 903 /** 904 * Set space. 905 * 906 * @type { ?(number | string) } 907 * @syscap SystemCapability.ArkUI.ArkUI.Full 908 * @form 909 * @since 9 910 */ 911 /** 912 * Set space. 913 * 914 * @type { ?(number | string) } 915 * @syscap SystemCapability.ArkUI.ArkUI.Full 916 * @crossplatform 917 * @form 918 * @since 10 919 */ 920 /** 921 * Set space. 922 * 923 * @type { ?(number | string) } 924 * @syscap SystemCapability.ArkUI.ArkUI.Full 925 * @crossplatform 926 * @form 927 * @atomicservice 928 * @since 11 929 */ 930 /** 931 * Set space. 932 * Anonymous Object Rectification. 933 * 934 * @type { ?(number | string) } 935 * @syscap SystemCapability.ArkUI.ArkUI.Full 936 * @crossplatform 937 * @form 938 * @atomicservice 939 * @since 18 940 */ 941 space?: number | string; 942 /** 943 * Set scroller. 944 * 945 * @type { ?Scroller } 946 * @syscap SystemCapability.ArkUI.ArkUI.Full 947 * @since 7 948 */ 949 /** 950 * Set scroller. 951 * 952 * @type { ?Scroller } 953 * @syscap SystemCapability.ArkUI.ArkUI.Full 954 * @form 955 * @since 9 956 */ 957 /** 958 * Set scroller. 959 * 960 * @type { ?Scroller } 961 * @syscap SystemCapability.ArkUI.ArkUI.Full 962 * @crossplatform 963 * @form 964 * @since 10 965 */ 966 /** 967 * Set scroller. 968 * 969 * @type { ?Scroller } 970 * @syscap SystemCapability.ArkUI.ArkUI.Full 971 * @crossplatform 972 * @form 973 * @atomicservice 974 * @since 11 975 */ 976 /** 977 * Set scroller. 978 * Anonymous Object Rectification. 979 * 980 * @type { ?Scroller } 981 * @syscap SystemCapability.ArkUI.ArkUI.Full 982 * @crossplatform 983 * @form 984 * @atomicservice 985 * @since 18 986 */ 987 scroller?: Scroller; 988} 989 990/** 991 * The list interface is extended. 992 * 993 * @interface ListInterface 994 * @syscap SystemCapability.ArkUI.ArkUI.Full 995 * @since 7 996 */ 997/** 998 * The list interface is extended. 999 * 1000 * @interface ListInterface 1001 * @syscap SystemCapability.ArkUI.ArkUI.Full 1002 * @form 1003 * @since 9 1004 */ 1005/** 1006 * The list interface is extended. 1007 * 1008 * @interface ListInterface 1009 * @syscap SystemCapability.ArkUI.ArkUI.Full 1010 * @crossplatform 1011 * @form 1012 * @since 10 1013 */ 1014/** 1015 * The list interface is extended. 1016 * 1017 * @interface ListInterface 1018 * @syscap SystemCapability.ArkUI.ArkUI.Full 1019 * @crossplatform 1020 * @form 1021 * @atomicservice 1022 * @since 11 1023 */ 1024interface ListInterface { 1025 /** 1026 * Called when interface data is called. 1027 * 1028 * @param { object } value 1029 * @returns { ListAttribute } 1030 * @syscap SystemCapability.ArkUI.ArkUI.Full 1031 * @since 7 1032 */ 1033 /** 1034 * Called when interface data is called. 1035 * 1036 * @param { object } value 1037 * @returns { ListAttribute } 1038 * @syscap SystemCapability.ArkUI.ArkUI.Full 1039 * @form 1040 * @since 9 1041 */ 1042 /** 1043 * Called when interface data is called. 1044 * 1045 * @param { object } value 1046 * @returns { ListAttribute } 1047 * @syscap SystemCapability.ArkUI.ArkUI.Full 1048 * @crossplatform 1049 * @form 1050 * @since 10 1051 */ 1052 /** 1053 * Called when interface data is called. 1054 * 1055 * @param { object } value 1056 * @returns { ListAttribute } 1057 * @syscap SystemCapability.ArkUI.ArkUI.Full 1058 * @crossplatform 1059 * @form 1060 * @atomicservice 1061 * @since 11 1062 */ 1063 /** 1064 * Called when interface data is called. 1065 * Anonymous Object Rectification. 1066 * 1067 * @param { ListOptions } [options] - list options 1068 * @returns { ListAttribute } 1069 * @syscap SystemCapability.ArkUI.ArkUI.Full 1070 * @crossplatform 1071 * @form 1072 * @atomicservice 1073 * @since 18 1074 */ 1075 (options?: ListOptions): ListAttribute; 1076} 1077 1078/** 1079 * Defines List divider opotions. 1080 * 1081 * @interface ListDividerOptions 1082 * @syscap SystemCapability.ArkUI.ArkUI.Full 1083 * @crossplatform 1084 * @form 1085 * @atomicservice 1086 * @since 18 1087 */ 1088declare interface ListDividerOptions { 1089 /** 1090 * Set strokeWidth. 1091 * 1092 * @type { Length } 1093 * @syscap SystemCapability.ArkUI.ArkUI.Full 1094 * @since 7 1095 */ 1096 /** 1097 * Set strokeWidth. 1098 * 1099 * @type { Length } 1100 * @syscap SystemCapability.ArkUI.ArkUI.Full 1101 * @form 1102 * @since 9 1103 */ 1104 /** 1105 * Set strokeWidth. 1106 * 1107 * @type { Length } 1108 * @syscap SystemCapability.ArkUI.ArkUI.Full 1109 * @crossplatform 1110 * @form 1111 * @since 10 1112 */ 1113 /** 1114 * Set strokeWidth. 1115 * 1116 * @type { Length } 1117 * @syscap SystemCapability.ArkUI.ArkUI.Full 1118 * @crossplatform 1119 * @form 1120 * @atomicservice 1121 * @since 11 1122 */ 1123 /** 1124 * Set strokeWidth. 1125 * Anonymous Object Rectification. 1126 * 1127 * @type { Length } 1128 * @syscap SystemCapability.ArkUI.ArkUI.Full 1129 * @crossplatform 1130 * @form 1131 * @atomicservice 1132 * @since 18 1133 */ 1134 strokeWidth: Length; 1135 /** 1136 * Set color. 1137 * 1138 * @type { ?ResourceColor } 1139 * @syscap SystemCapability.ArkUI.ArkUI.Full 1140 * @since 7 1141 */ 1142 /** 1143 * Set color. 1144 * 1145 * @type { ?ResourceColor } 1146 * @syscap SystemCapability.ArkUI.ArkUI.Full 1147 * @form 1148 * @since 9 1149 */ 1150 /** 1151 * Set color. 1152 * 1153 * @type { ?ResourceColor } 1154 * @syscap SystemCapability.ArkUI.ArkUI.Full 1155 * @crossplatform 1156 * @form 1157 * @since 10 1158 */ 1159 /** 1160 * Set color. 1161 * 1162 * @type { ?ResourceColor } 1163 * @syscap SystemCapability.ArkUI.ArkUI.Full 1164 * @crossplatform 1165 * @form 1166 * @atomicservice 1167 * @since 11 1168 */ 1169 /** 1170 * Set color. 1171 * Anonymous Object Rectification. 1172 * 1173 * @type { ?ResourceColor } 1174 * @syscap SystemCapability.ArkUI.ArkUI.Full 1175 * @crossplatform 1176 * @form 1177 * @atomicservice 1178 * @since 18 1179 */ 1180 color?: ResourceColor; 1181 /** 1182 * Set startMargin. 1183 * 1184 * @type { ?Length } 1185 * @syscap SystemCapability.ArkUI.ArkUI.Full 1186 * @since 7 1187 */ 1188 /** 1189 * Set startMargin. 1190 * 1191 * @type { ?Length } 1192 * @syscap SystemCapability.ArkUI.ArkUI.Full 1193 * @form 1194 * @since 9 1195 */ 1196 /** 1197 * Set startMargin. 1198 * 1199 * @type { ?Length } 1200 * @syscap SystemCapability.ArkUI.ArkUI.Full 1201 * @crossplatform 1202 * @form 1203 * @since 10 1204 */ 1205 /** 1206 * Set startMargin. 1207 * 1208 * @type { ?Length } 1209 * @syscap SystemCapability.ArkUI.ArkUI.Full 1210 * @crossplatform 1211 * @form 1212 * @atomicservice 1213 * @since 11 1214 */ 1215 /** 1216 * Set startMargin. 1217 * Anonymous Object Rectification. 1218 * 1219 * @type { ?Length } 1220 * @syscap SystemCapability.ArkUI.ArkUI.Full 1221 * @crossplatform 1222 * @form 1223 * @atomicservice 1224 * @since 18 1225 */ 1226 startMargin?: Length; 1227 /** 1228 * Set endMargin. 1229 * 1230 * @type { ?Length } 1231 * @syscap SystemCapability.ArkUI.ArkUI.Full 1232 * @since 7 1233 */ 1234 /** 1235 * Set endMargin. 1236 * 1237 * @type { ?Length } 1238 * @syscap SystemCapability.ArkUI.ArkUI.Full 1239 * @form 1240 * @since 9 1241 */ 1242 /** 1243 * Set endMargin. 1244 * 1245 * @type { ?Length } 1246 * @syscap SystemCapability.ArkUI.ArkUI.Full 1247 * @crossplatform 1248 * @form 1249 * @since 10 1250 */ 1251 /** 1252 * Set endMargin. 1253 * 1254 * @type { ?Length } 1255 * @syscap SystemCapability.ArkUI.ArkUI.Full 1256 * @crossplatform 1257 * @form 1258 * @atomicservice 1259 * @since 11 1260 */ 1261 /** 1262 * Set endMargin. 1263 * Anonymous Object Rectification. 1264 * 1265 * @type { ?Length } 1266 * @syscap SystemCapability.ArkUI.ArkUI.Full 1267 * @crossplatform 1268 * @form 1269 * @atomicservice 1270 * @since 18 1271 */ 1272 endMargin?: Length; 1273} 1274 1275/** 1276 * @extends CommonMethod<ListAttribute> 1277 * @syscap SystemCapability.ArkUI.ArkUI.Full 1278 * @since 7 1279 */ 1280/** 1281 * @extends CommonMethod<ListAttribute> 1282 * @syscap SystemCapability.ArkUI.ArkUI.Full 1283 * @form 1284 * @since 9 1285 */ 1286/** 1287 * @extends CommonMethod<ListAttribute> 1288 * @syscap SystemCapability.ArkUI.ArkUI.Full 1289 * @crossplatform 1290 * @form 1291 * @since 10 1292 */ 1293/** 1294 * @extends ScrollableCommonMethod<ListAttribute> 1295 * @syscap SystemCapability.ArkUI.ArkUI.Full 1296 * @crossplatform 1297 * @form 1298 * @atomicservice 1299 * @since 11 1300 */ 1301declare class ListAttribute extends ScrollableCommonMethod<ListAttribute> { 1302 /** 1303 * Called when need to decide how much lanes the list will show. 1304 * 1305 * @param { number | LengthConstrain } value 1306 * @returns { ListAttribute } 1307 * @syscap SystemCapability.ArkUI.ArkUI.Full 1308 * @form 1309 * @since 9 1310 */ 1311 /** 1312 * Called when need to decide how much lanes the list will show. 1313 * 1314 * @param { number | LengthConstrain } value 1315 * @param { Dimension } gutter 1316 * @returns { ListAttribute } 1317 * @syscap SystemCapability.ArkUI.ArkUI.Full 1318 * @crossplatform 1319 * @form 1320 * @since 10 1321 */ 1322 /** 1323 * Called when need to decide how much lanes the list will show. 1324 * 1325 * @param { number | LengthConstrain } value 1326 * @param { Dimension } gutter 1327 * @returns { ListAttribute } 1328 * @syscap SystemCapability.ArkUI.ArkUI.Full 1329 * @crossplatform 1330 * @form 1331 * @atomicservice 1332 * @since 11 1333 */ 1334 lanes(value: number | LengthConstrain, gutter?: Dimension): ListAttribute; 1335 1336 /** 1337 * Called when need to decide how to align lanes in the direction of the cross axis. 1338 * 1339 * @param { ListItemAlign } value 1340 * @returns { ListAttribute } 1341 * @syscap SystemCapability.ArkUI.ArkUI.Full 1342 * @form 1343 * @since 9 1344 */ 1345 /** 1346 * Called when need to decide how to align lanes in the direction of the cross axis. 1347 * 1348 * @param { ListItemAlign } value 1349 * @returns { ListAttribute } 1350 * @syscap SystemCapability.ArkUI.ArkUI.Full 1351 * @crossplatform 1352 * @form 1353 * @since 10 1354 */ 1355 /** 1356 * Called when need to decide how to align lanes in the direction of the cross axis. 1357 * 1358 * @param { ListItemAlign } value 1359 * @returns { ListAttribute } 1360 * @syscap SystemCapability.ArkUI.ArkUI.Full 1361 * @crossplatform 1362 * @form 1363 * @atomicservice 1364 * @since 11 1365 */ 1366 alignListItem(value: ListItemAlign): ListAttribute; 1367 1368 /** 1369 * Called when the arrangement direction of the list component is set. 1370 * 1371 * @param { Axis } value 1372 * @returns { ListAttribute } 1373 * @syscap SystemCapability.ArkUI.ArkUI.Full 1374 * @since 7 1375 */ 1376 /** 1377 * Called when the arrangement direction of the list component is set. 1378 * 1379 * @param { Axis } value 1380 * @returns { ListAttribute } 1381 * @syscap SystemCapability.ArkUI.ArkUI.Full 1382 * @form 1383 * @since 9 1384 */ 1385 /** 1386 * Called when the arrangement direction of the list component is set. 1387 * 1388 * @param { Axis } value 1389 * @returns { ListAttribute } 1390 * @syscap SystemCapability.ArkUI.ArkUI.Full 1391 * @crossplatform 1392 * @form 1393 * @since 10 1394 */ 1395 /** 1396 * Called when the arrangement direction of the list component is set. 1397 * 1398 * @param { Axis } value 1399 * @returns { ListAttribute } 1400 * @syscap SystemCapability.ArkUI.ArkUI.Full 1401 * @crossplatform 1402 * @form 1403 * @atomicservice 1404 * @since 11 1405 */ 1406 listDirection(value: Axis): ListAttribute; 1407 1408 /** 1409 * Called when the display mode of the side slider is set. 1410 * 1411 * @param { BarState } value 1412 * @returns { ListAttribute } 1413 * @syscap SystemCapability.ArkUI.ArkUI.Full 1414 * @since 7 1415 */ 1416 /** 1417 * Called when the display mode of the side slider is set. 1418 * 1419 * @param { BarState } value 1420 * @returns { ListAttribute } 1421 * @syscap SystemCapability.ArkUI.ArkUI.Full 1422 * @form 1423 * @since 9 1424 */ 1425 /** 1426 * Called when the display mode of the side slider is set. 1427 * 1428 * @param { BarState } value 1429 * @returns { ListAttribute } 1430 * @syscap SystemCapability.ArkUI.ArkUI.Full 1431 * @crossplatform 1432 * @form 1433 * @since 10 1434 */ 1435 /** 1436 * Called when the display mode of the side slider is set. 1437 * 1438 * @param { BarState } value 1439 * @returns { ListAttribute } 1440 * @syscap SystemCapability.ArkUI.ArkUI.Full 1441 * @crossplatform 1442 * @form 1443 * @atomicservice 1444 * @since 11 1445 */ 1446 scrollBar(value: BarState): ListAttribute; 1447 1448 /** 1449 * Called when the sliding effect is set. 1450 * 1451 * @param { EdgeEffect } value 1452 * @returns { ListAttribute } 1453 * @syscap SystemCapability.ArkUI.ArkUI.Full 1454 * @since 7 1455 */ 1456 /** 1457 * Called when the sliding effect is set. 1458 * 1459 * @param { EdgeEffect } value 1460 * @returns { ListAttribute } 1461 * @syscap SystemCapability.ArkUI.ArkUI.Full 1462 * @form 1463 * @since 9 1464 */ 1465 /** 1466 * Called when the sliding effect is set. 1467 * 1468 * @param { EdgeEffect } value 1469 * @returns { ListAttribute } 1470 * @syscap SystemCapability.ArkUI.ArkUI.Full 1471 * @crossplatform 1472 * @form 1473 * @since 10 1474 */ 1475 /** 1476 * Called when the sliding effect is set. 1477 * 1478 * @param { EdgeEffect } value 1479 * @param { EdgeEffectOptions } options 1480 * @returns { ListAttribute } 1481 * @syscap SystemCapability.ArkUI.ArkUI.Full 1482 * @crossplatform 1483 * @form 1484 * @atomicservice 1485 * @since 11 1486 */ 1487 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions): ListAttribute; 1488 1489 1490 /** 1491 * Called when need to decide contentStartOffset the list will show. 1492 * @param { number } value - the value Of startOffset. 1493 * @returns { ListAttribute } the attribute of the list. 1494 * @syscap SystemCapability.ArkUI.ArkUI.Full 1495 * @crossplatform 1496 * @since 11 1497 */ 1498 /** 1499 * Called when need to decide contentStartOffset the list will show. 1500 * @param { number } value - the value Of startOffset. 1501 * @returns { ListAttribute } the attribute of the list. 1502 * @syscap SystemCapability.ArkUI.ArkUI.Full 1503 * @crossplatform 1504 * @atomicservice 1505 * @since 12 1506 */ 1507 contentStartOffset(value: number): ListAttribute; 1508 1509 /** 1510 * Called when need to decide contentEndOffset the list will show. 1511 * @param { number } value - the value Of endOffset. 1512 * @returns { ListAttribute } the attribute of the list. 1513 * @syscap SystemCapability.ArkUI.ArkUI.Full 1514 * @crossplatform 1515 * @since 11 1516 */ 1517 /** 1518 * Called when need to decide contentEndOffset the list will show. 1519 * @param { number } value - the value Of endOffset. 1520 * @returns { ListAttribute } the attribute of the list. 1521 * @syscap SystemCapability.ArkUI.ArkUI.Full 1522 * @crossplatform 1523 * @atomicservice 1524 * @since 12 1525 */ 1526 contentEndOffset(value: number): ListAttribute; 1527 1528 /** 1529 * Called when the ListItem split line style is set. 1530 * 1531 * @param { object | null } value 1532 * @returns { ListAttribute } 1533 * @syscap SystemCapability.ArkUI.ArkUI.Full 1534 * @since 7 1535 */ 1536 /** 1537 * Called when the ListItem split line style is set. 1538 * 1539 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1540 * @returns { ListAttribute } 1541 * @syscap SystemCapability.ArkUI.ArkUI.Full 1542 * @form 1543 * @since 9 1544 */ 1545 /** 1546 * Called when the ListItem split line style is set. 1547 * 1548 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1549 * @returns { ListAttribute } 1550 * @syscap SystemCapability.ArkUI.ArkUI.Full 1551 * @crossplatform 1552 * @form 1553 * @since 10 1554 */ 1555 /** 1556 * Called when the ListItem split line style is set. 1557 * 1558 * @param { {strokeWidth: Length;color?: ResourceColor;startMargin?: Length;endMargin?: Length;} | null } value 1559 * @returns { ListAttribute } 1560 * @syscap SystemCapability.ArkUI.ArkUI.Full 1561 * @crossplatform 1562 * @form 1563 * @atomicservice 1564 * @since 11 1565 */ 1566 /** 1567 * Called when the ListItem split line style is set. 1568 * Anonymous Object Rectification. 1569 * 1570 * @param { ListDividerOptions | null } value 1571 * @returns { ListAttribute } 1572 * @syscap SystemCapability.ArkUI.ArkUI.Full 1573 * @crossplatform 1574 * @form 1575 * @atomicservice 1576 * @since 18 1577 */ 1578 divider( 1579 value: ListDividerOptions | null, 1580 ): ListAttribute; 1581 1582 /** 1583 * Called when judging whether it is in editable mode. 1584 * 1585 * @param { boolean } value 1586 * @returns { ListAttribute } 1587 * @syscap SystemCapability.ArkUI.ArkUI.Full 1588 * @since 7 1589 * @deprecated since 9 1590 */ 1591 editMode(value: boolean): ListAttribute; 1592 1593 /** 1594 * Called when judging whether it is multiSelectable. 1595 * 1596 * @param { boolean } value 1597 * @returns { ListAttribute } 1598 * @syscap SystemCapability.ArkUI.ArkUI.Full 1599 * @since 8 1600 */ 1601 /** 1602 * Called when judging whether it is multiSelectable. 1603 * 1604 * @param { boolean } value 1605 * @returns { ListAttribute } 1606 * @syscap SystemCapability.ArkUI.ArkUI.Full 1607 * @form 1608 * @since 9 1609 */ 1610 /** 1611 * Called when judging whether it is multiSelectable. 1612 * 1613 * @param { boolean } value 1614 * @returns { ListAttribute } 1615 * @syscap SystemCapability.ArkUI.ArkUI.Full 1616 * @crossplatform 1617 * @form 1618 * @since 10 1619 */ 1620 /** 1621 * Called when judging whether it is multiSelectable. 1622 * 1623 * @param { boolean } value 1624 * @returns { ListAttribute } 1625 * @syscap SystemCapability.ArkUI.ArkUI.Full 1626 * @crossplatform 1627 * @form 1628 * @atomicservice 1629 * @since 11 1630 */ 1631 multiSelectable(value: boolean): ListAttribute; 1632 1633 /** 1634 * Called when the minimum number of list item caches is set for long list deferred loading. 1635 * 1636 * @param { number } value 1637 * @returns { ListAttribute } 1638 * @syscap SystemCapability.ArkUI.ArkUI.Full 1639 * @since 7 1640 */ 1641 /** 1642 * Called when the minimum number of list item caches is set for long list deferred loading. 1643 * 1644 * @param { number } value 1645 * @returns { ListAttribute } 1646 * @syscap SystemCapability.ArkUI.ArkUI.Full 1647 * @form 1648 * @since 9 1649 */ 1650 /** 1651 * Called when the minimum number of list item caches is set for long list deferred loading. 1652 * 1653 * @param { number } value 1654 * @returns { ListAttribute } 1655 * @syscap SystemCapability.ArkUI.ArkUI.Full 1656 * @crossplatform 1657 * @form 1658 * @since 10 1659 */ 1660 /** 1661 * Called when the minimum number of list item caches is set for long list deferred loading. 1662 * 1663 * @param { number } value 1664 * @returns { ListAttribute } 1665 * @syscap SystemCapability.ArkUI.ArkUI.Full 1666 * @crossplatform 1667 * @form 1668 * @atomicservice 1669 * @since 11 1670 */ 1671 cachedCount(value: number): ListAttribute; 1672 1673 /** 1674 * Called when the minimum number of list item caches is set for long list deferred loading. 1675 * 1676 * @param { number } count - cached count. 1677 * @param { boolean } show - whether to show the nodes in the cache. 1678 * @returns { ListAttribute } the attribute of the list. 1679 * @syscap SystemCapability.ArkUI.ArkUI.Full 1680 * @crossplatform 1681 * @form 1682 * @atomicservice 1683 * @since 14 1684 */ 1685 cachedCount(count: number, show: boolean): ListAttribute; 1686 1687 /** 1688 * Called when setting whether to enable chain linkage dynamic effect. 1689 * 1690 * @param { boolean } value 1691 * @returns { ListAttribute } 1692 * @syscap SystemCapability.ArkUI.ArkUI.Full 1693 * @since 7 1694 */ 1695 /** 1696 * Called when setting whether to enable chain linkage dynamic effect. 1697 * 1698 * @param { boolean } value 1699 * @returns { ListAttribute } 1700 * @syscap SystemCapability.ArkUI.ArkUI.Full 1701 * @form 1702 * @since 9 1703 */ 1704 /** 1705 * Called when setting whether to enable chain linkage dynamic effect. 1706 * 1707 * @param { boolean } value 1708 * @returns { ListAttribute } 1709 * @syscap SystemCapability.ArkUI.ArkUI.Full 1710 * @crossplatform 1711 * @form 1712 * @since 10 1713 */ 1714 /** 1715 * Called when setting whether to enable chain linkage dynamic effect. 1716 * 1717 * @param { boolean } value 1718 * @returns { ListAttribute } 1719 * @syscap SystemCapability.ArkUI.ArkUI.Full 1720 * @crossplatform 1721 * @form 1722 * @atomicservice 1723 * @since 11 1724 */ 1725 chainAnimation(value: boolean): ListAttribute; 1726 1727 /** 1728 * Called to setting chain linkage dynamic effect options. 1729 * 1730 * @param { ChainAnimationOptions } value - options of the chain animation. 1731 * @returns { ListAttribute } the attribute of the list. 1732 * @syscap SystemCapability.ArkUI.ArkUI.Full 1733 * @systemapi 1734 * @since 10 1735 */ 1736 chainAnimationOptions(value: ChainAnimationOptions): ListAttribute; 1737 1738 /** 1739 * Called when header or footer of item group will be pinned. 1740 * 1741 * @param { StickyStyle } value 1742 * @returns { ListAttribute } 1743 * @syscap SystemCapability.ArkUI.ArkUI.Full 1744 * @form 1745 * @since 9 1746 */ 1747 /** 1748 * Called when header or footer of item group will be pinned. 1749 * 1750 * @param { StickyStyle } value 1751 * @returns { ListAttribute } 1752 * @syscap SystemCapability.ArkUI.ArkUI.Full 1753 * @crossplatform 1754 * @form 1755 * @since 10 1756 */ 1757 /** 1758 * Called when header or footer of item group will be pinned. 1759 * 1760 * @param { StickyStyle } value 1761 * @returns { ListAttribute } 1762 * @syscap SystemCapability.ArkUI.ArkUI.Full 1763 * @crossplatform 1764 * @form 1765 * @atomicservice 1766 * @since 11 1767 */ 1768 sticky(value: StickyStyle): ListAttribute; 1769 1770 /** 1771 * Called to set list item scroll end alignment effect. 1772 * 1773 * @param { ScrollSnapAlign } value - options of the list alignment effect. 1774 * @returns { ListAttribute } the attribute of the list. 1775 * @syscap SystemCapability.ArkUI.ArkUI.Full 1776 * @since 10 1777 */ 1778 /** 1779 * Called to set list item scroll end alignment effect. 1780 * 1781 * @param { ScrollSnapAlign } value - options of the list alignment effect. 1782 * @returns { ListAttribute } the attribute of the list. 1783 * @syscap SystemCapability.ArkUI.ArkUI.Full 1784 * @crossplatform 1785 * @atomicservice 1786 * @since 11 1787 */ 1788 scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; 1789 1790 /** 1791 * Called to setting the nested scroll options. 1792 * 1793 * @param { NestedScrollOptions } value - options for nested scrolling. 1794 * @returns { ListAttribute } the attribute of the list. 1795 * @syscap SystemCapability.ArkUI.ArkUI.Full 1796 * @since 10 1797 */ 1798 /** 1799 * Called to setting the nested scroll options. 1800 * 1801 * @param { NestedScrollOptions } value - options for nested scrolling. 1802 * @returns { ListAttribute } the attribute of the list. 1803 * @syscap SystemCapability.ArkUI.ArkUI.Full 1804 * @crossplatform 1805 * @atomicservice 1806 * @since 11 1807 */ 1808 nestedScroll(value: NestedScrollOptions): ListAttribute; 1809 1810 /** 1811 * Called when setting whether to enable scroll by gesture or mouse. 1812 * 1813 * @param { boolean } value 1814 * @returns { ListAttribute } The attribute of the list 1815 * @syscap SystemCapability.ArkUI.ArkUI.Full 1816 * @crossplatform 1817 * @since 10 1818 */ 1819 /** 1820 * Called when setting whether to enable scroll by gesture or mouse. 1821 * 1822 * @param { boolean } value 1823 * @returns { ListAttribute } The attribute of the list 1824 * @syscap SystemCapability.ArkUI.ArkUI.Full 1825 * @crossplatform 1826 * @atomicservice 1827 * @since 11 1828 */ 1829 enableScrollInteraction(value: boolean): ListAttribute; 1830 1831 /** 1832 * Called to setting the friction. 1833 * 1834 * @param { number | Resource } value - options for scrolling friction. 1835 * @returns { ListAttribute } the attribute of the list. 1836 * @syscap SystemCapability.ArkUI.ArkUI.Full 1837 * @crossplatform 1838 * @since 10 1839 */ 1840 /** 1841 * Called to setting the friction. 1842 * 1843 * @param { number | Resource } value - options for scrolling friction. 1844 * @returns { ListAttribute } the attribute of the list. 1845 * @syscap SystemCapability.ArkUI.ArkUI.Full 1846 * @crossplatform 1847 * @atomicservice 1848 * @since 11 1849 */ 1850 friction(value: number | Resource): ListAttribute; 1851 1852 /** 1853 * Set children main size for List. 1854 * 1855 * @param { ChildrenMainSize } value - children main size for List 1856 * @returns { ListAttribute } the attribute of the list. 1857 * @syscap SystemCapability.ArkUI.ArkUI.Full 1858 * @crossplatform 1859 * @atomicservice 1860 * @since 12 1861 */ 1862 childrenMainSize(value: ChildrenMainSize): ListAttribute; 1863 1864 /** 1865 * Set maintain visible content position List. 1866 * 1867 * @param { boolean } enabled - maintain visible content position. 1868 * @returns { ListAttribute } the attribute of the list. 1869 * @syscap SystemCapability.ArkUI.ArkUI.Full 1870 * @crossplatform 1871 * @atomicservice 1872 * @since 12 1873 */ 1874 maintainVisibleContentPosition(enabled: boolean): ListAttribute; 1875 1876 /** 1877 * Called when the offset and status callback of the slide are set. 1878 * 1879 * @param { function } event 1880 * @returns { ListAttribute } 1881 * @syscap SystemCapability.ArkUI.ArkUI.Full 1882 * @since 7 1883 */ 1884 /** 1885 * Called when the offset and status callback of the slide are set. 1886 * 1887 * @param { function } event 1888 * @returns { ListAttribute } 1889 * @syscap SystemCapability.ArkUI.ArkUI.Full 1890 * @form 1891 * @since 9 1892 */ 1893 /** 1894 * Called when the offset and status callback of the slide are set. 1895 * 1896 * @param { function } event 1897 * @returns { ListAttribute } 1898 * @syscap SystemCapability.ArkUI.ArkUI.Full 1899 * @crossplatform 1900 * @form 1901 * @since 10 1902 */ 1903 /** 1904 * Called when the offset and status callback of the slide are set. 1905 * 1906 * @param { function } event 1907 * @returns { ListAttribute } 1908 * @syscap SystemCapability.ArkUI.ArkUI.Full 1909 * @crossplatform 1910 * @form 1911 * @atomicservice 1912 * @since 11 1913 * @deprecated since 12 1914 * @useinstead common.ScrollableCommonMethod#onDidScroll 1915 */ 1916 onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): ListAttribute; 1917 1918 /** 1919 * Called when the start and end positions of the display change. 1920 * 1921 * @param { function } event 1922 * @returns { ListAttribute } 1923 * @syscap SystemCapability.ArkUI.ArkUI.Full 1924 * @since 7 1925 */ 1926 /** 1927 * Called when the start and end positions of the display change. 1928 * 1929 * @param { function } event 1930 * @returns { ListAttribute } 1931 * @syscap SystemCapability.ArkUI.ArkUI.Full 1932 * @form 1933 * @since 9 1934 */ 1935 /** 1936 * Called when the start and end positions of the display change. 1937 * 1938 * @param { function } event 1939 * @returns { ListAttribute } 1940 * @syscap SystemCapability.ArkUI.ArkUI.Full 1941 * @crossplatform 1942 * @form 1943 * @since 10 1944 */ 1945 /** 1946 * Called when the start and end positions of the display change. 1947 * 1948 * @param { function } event 1949 * @returns { ListAttribute } 1950 * @syscap SystemCapability.ArkUI.ArkUI.Full 1951 * @crossplatform 1952 * @form 1953 * @atomicservice 1954 * @since 11 1955 */ 1956 onScrollIndex(event: (start: number, end: number, center: number) => void): ListAttribute; 1957 1958 /** 1959 * Called when the list visible content changes. 1960 * 1961 * @param { OnScrollVisibleContentChangeCallback } handler - Callback of Scroll Visible. 1962 * @returns { ListAttribute } 1963 * @syscap SystemCapability.ArkUI.ArkUI.Full 1964 * @crossplatform 1965 * @atomicservice 1966 * @since 12 1967 */ 1968 onScrollVisibleContentChange(handler: OnScrollVisibleContentChangeCallback): ListAttribute; 1969 1970 /** 1971 * Called when the list begins to arrive. 1972 * 1973 * @param { function } event 1974 * @returns { ListAttribute } 1975 * @syscap SystemCapability.ArkUI.ArkUI.Full 1976 * @since 7 1977 */ 1978 /** 1979 * Called when the list begins to arrive. 1980 * 1981 * @param { function } event 1982 * @returns { ListAttribute } 1983 * @syscap SystemCapability.ArkUI.ArkUI.Full 1984 * @form 1985 * @since 9 1986 */ 1987 /** 1988 * Called when the list begins to arrive. 1989 * 1990 * @param { function } event 1991 * @returns { ListAttribute } 1992 * @syscap SystemCapability.ArkUI.ArkUI.Full 1993 * @crossplatform 1994 * @form 1995 * @since 10 1996 */ 1997 /** 1998 * Called when the list begins to arrive. 1999 * 2000 * @param { function } event 2001 * @returns { ListAttribute } 2002 * @syscap SystemCapability.ArkUI.ArkUI.Full 2003 * @crossplatform 2004 * @form 2005 * @atomicservice 2006 * @since 11 2007 */ 2008 onReachStart(event: () => void): ListAttribute; 2009 2010 /** 2011 * Called when the list reaches the end. 2012 * 2013 * @param { function } event 2014 * @returns { ListAttribute } 2015 * @syscap SystemCapability.ArkUI.ArkUI.Full 2016 * @since 7 2017 */ 2018 /** 2019 * Called when the list reaches the end. 2020 * 2021 * @param { function } event 2022 * @returns { ListAttribute } 2023 * @syscap SystemCapability.ArkUI.ArkUI.Full 2024 * @form 2025 * @since 9 2026 */ 2027 /** 2028 * Called when the list reaches the end. 2029 * 2030 * @param { function } event 2031 * @returns { ListAttribute } 2032 * @syscap SystemCapability.ArkUI.ArkUI.Full 2033 * @crossplatform 2034 * @form 2035 * @since 10 2036 */ 2037 /** 2038 * Called when the list reaches the end. 2039 * 2040 * @param { function } event 2041 * @returns { ListAttribute } 2042 * @syscap SystemCapability.ArkUI.ArkUI.Full 2043 * @crossplatform 2044 * @form 2045 * @atomicservice 2046 * @since 11 2047 */ 2048 onReachEnd(event: () => void): ListAttribute; 2049 2050 /** 2051 * Called when the slider start. 2052 * 2053 * @param { function } event 2054 * @returns { ListAttribute } 2055 * @syscap SystemCapability.ArkUI.ArkUI.Full 2056 * @form 2057 * @since 9 2058 */ 2059 /** 2060 * Called when the slider start. 2061 * 2062 * @param { function } event 2063 * @returns { ListAttribute } 2064 * @syscap SystemCapability.ArkUI.ArkUI.Full 2065 * @crossplatform 2066 * @form 2067 * @since 10 2068 */ 2069 /** 2070 * Called when the slider start. 2071 * 2072 * @param { function } event 2073 * @returns { ListAttribute } 2074 * @syscap SystemCapability.ArkUI.ArkUI.Full 2075 * @crossplatform 2076 * @form 2077 * @atomicservice 2078 * @since 11 2079 */ 2080 onScrollStart(event: () => void): ListAttribute; 2081 2082 /** 2083 * Called when the slider stops. 2084 * 2085 * @param { function } event 2086 * @returns { ListAttribute } 2087 * @syscap SystemCapability.ArkUI.ArkUI.Full 2088 * @since 7 2089 */ 2090 /** 2091 * Called when the slider stops. 2092 * 2093 * @param { function } event 2094 * @returns { ListAttribute } 2095 * @syscap SystemCapability.ArkUI.ArkUI.Full 2096 * @form 2097 * @since 9 2098 */ 2099 /** 2100 * Called when the slider stops. 2101 * 2102 * @param { function } event 2103 * @returns { ListAttribute } 2104 * @syscap SystemCapability.ArkUI.ArkUI.Full 2105 * @crossplatform 2106 * @form 2107 * @since 10 2108 */ 2109 /** 2110 * Called when the slider stops. 2111 * 2112 * @param { function } event 2113 * @returns { ListAttribute } 2114 * @syscap SystemCapability.ArkUI.ArkUI.Full 2115 * @crossplatform 2116 * @form 2117 * @atomicservice 2118 * @since 11 2119 */ 2120 onScrollStop(event: () => void): ListAttribute; 2121 2122 /** 2123 * Called when a list item is deleted. 2124 * 2125 * @param { function } event 2126 * @returns { ListAttribute } 2127 * @syscap SystemCapability.ArkUI.ArkUI.Full 2128 * @since 7 2129 * @deprecated since 9 2130 */ 2131 onItemDelete(event: (index: number) => boolean): ListAttribute; 2132 2133 /** 2134 * Called when a list item is moved. 2135 * 2136 * @param { function } event 2137 * @returns { ListAttribute } 2138 * @syscap SystemCapability.ArkUI.ArkUI.Full 2139 * @since 7 2140 */ 2141 /** 2142 * Called when a list item is moved. 2143 * 2144 * @param { function } event 2145 * @returns { ListAttribute } 2146 * @syscap SystemCapability.ArkUI.ArkUI.Full 2147 * @crossplatform 2148 * @since 10 2149 */ 2150 /** 2151 * Called when a list item is moved. 2152 * 2153 * @param { function } event 2154 * @returns { ListAttribute } 2155 * @syscap SystemCapability.ArkUI.ArkUI.Full 2156 * @crossplatform 2157 * @atomicservice 2158 * @since 11 2159 */ 2160 onItemMove(event: (from: number, to: number) => boolean): ListAttribute; 2161 2162 /** 2163 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 2164 * (To be triggered, press and hold for 170 milliseconds (ms)) 2165 * 2166 * @param { function } event 2167 * @returns { ListAttribute } 2168 * @syscap SystemCapability.ArkUI.ArkUI.Full 2169 * @since 8 2170 */ 2171 /** 2172 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 2173 * (To be triggered, press and hold for 170 milliseconds (ms)) 2174 * 2175 * @param { function } event 2176 * @returns { ListAttribute } 2177 * @syscap SystemCapability.ArkUI.ArkUI.Full 2178 * @crossplatform 2179 * @since 10 2180 */ 2181 /** 2182 * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. 2183 * (To be triggered, press and hold for 170 milliseconds (ms)) 2184 * 2185 * @param { function } event 2186 * @returns { ListAttribute } 2187 * @syscap SystemCapability.ArkUI.ArkUI.Full 2188 * @crossplatform 2189 * @atomicservice 2190 * @since 11 2191 */ 2192 onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): ListAttribute; 2193 2194 /** 2195 * After binding, a callback is triggered when the component is dragged to the range of the component. 2196 * 2197 * @param { function } event 2198 * @returns { ListAttribute } 2199 * @syscap SystemCapability.ArkUI.ArkUI.Full 2200 * @since 8 2201 */ 2202 /** 2203 * After binding, a callback is triggered when the component is dragged to the range of the component. 2204 * 2205 * @param { function } event 2206 * @returns { ListAttribute } 2207 * @syscap SystemCapability.ArkUI.ArkUI.Full 2208 * @crossplatform 2209 * @since 10 2210 */ 2211 /** 2212 * After binding, a callback is triggered when the component is dragged to the range of the component. 2213 * 2214 * @param { function } event 2215 * @returns { ListAttribute } 2216 * @syscap SystemCapability.ArkUI.ArkUI.Full 2217 * @crossplatform 2218 * @atomicservice 2219 * @since 11 2220 */ 2221 onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute; 2222 2223 /** 2224 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 2225 * 2226 * @param { function } event 2227 * @returns { ListAttribute } 2228 * @syscap SystemCapability.ArkUI.ArkUI.Full 2229 * @since 8 2230 */ 2231 /** 2232 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 2233 * 2234 * @param { function } event 2235 * @returns { ListAttribute } 2236 * @syscap SystemCapability.ArkUI.ArkUI.Full 2237 * @crossplatform 2238 * @since 10 2239 */ 2240 /** 2241 * After binding, a callback is triggered when the drag moves within the range of a placeable component. 2242 * 2243 * @param { function } event 2244 * @returns { ListAttribute } 2245 * @syscap SystemCapability.ArkUI.ArkUI.Full 2246 * @crossplatform 2247 * @atomicservice 2248 * @since 11 2249 */ 2250 onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute; 2251 2252 /** 2253 * After binding, a callback is triggered when the component is dragged out of the component range. 2254 * 2255 * @param { function } event 2256 * @returns { ListAttribute } 2257 * @syscap SystemCapability.ArkUI.ArkUI.Full 2258 * @since 8 2259 */ 2260 /** 2261 * After binding, a callback is triggered when the component is dragged out of the component range. 2262 * 2263 * @param { function } event 2264 * @returns { ListAttribute } 2265 * @syscap SystemCapability.ArkUI.ArkUI.Full 2266 * @crossplatform 2267 * @since 10 2268 */ 2269 /** 2270 * After binding, a callback is triggered when the component is dragged out of the component range. 2271 * 2272 * @param { function } event 2273 * @returns { ListAttribute } 2274 * @syscap SystemCapability.ArkUI.ArkUI.Full 2275 * @crossplatform 2276 * @atomicservice 2277 * @since 11 2278 */ 2279 onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute; 2280 2281 /** 2282 * The component bound to this event can be used as the drag release target. 2283 * This callback is triggered when the drag behavior is stopped within the scope of the component. 2284 * 2285 * @param { function } event 2286 * @returns { ListAttribute } 2287 * @syscap SystemCapability.ArkUI.ArkUI.Full 2288 * @since 8 2289 */ 2290 /** 2291 * The component bound to this event can be used as the drag release target. 2292 * This callback is triggered when the drag behavior is stopped within the scope of the component. 2293 * 2294 * @param { function } event 2295 * @returns { ListAttribute } 2296 * @syscap SystemCapability.ArkUI.ArkUI.Full 2297 * @crossplatform 2298 * @since 10 2299 */ 2300 /** 2301 * The component bound to this event can be used as the drag release target. 2302 * This callback is triggered when the drag behavior is stopped within the scope of the component. 2303 * 2304 * @param { function } event 2305 * @returns { ListAttribute } 2306 * @syscap SystemCapability.ArkUI.ArkUI.Full 2307 * @crossplatform 2308 * @atomicservice 2309 * @since 11 2310 */ 2311 onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; 2312 2313 /** 2314 * Called when scrolling begin each frame. 2315 * 2316 * @param { function } event 2317 * @returns { ListAttribute } 2318 * @syscap SystemCapability.ArkUI.ArkUI.Full 2319 * @form 2320 * @since 9 2321 */ 2322 /** 2323 * Called when scrolling begin each frame. 2324 * 2325 * @param { function } event 2326 * @returns { ListAttribute } 2327 * @syscap SystemCapability.ArkUI.ArkUI.Full 2328 * @crossplatform 2329 * @form 2330 * @since 10 2331 */ 2332 /** 2333 * Called when scrolling begin each frame. 2334 * 2335 * @param { function } event 2336 * @returns { ListAttribute } 2337 * @syscap SystemCapability.ArkUI.ArkUI.Full 2338 * @crossplatform 2339 * @form 2340 * @atomicservice 2341 * @since 11 2342 */ 2343 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute; 2344} 2345 2346/** 2347 * Defines List Component. 2348 * 2349 * @syscap SystemCapability.ArkUI.ArkUI.Full 2350 * @since 7 2351 */ 2352/** 2353 * Defines List Component. 2354 * 2355 * @syscap SystemCapability.ArkUI.ArkUI.Full 2356 * @form 2357 * @since 9 2358 */ 2359/** 2360 * Defines List Component. 2361 * 2362 * @syscap SystemCapability.ArkUI.ArkUI.Full 2363 * @crossplatform 2364 * @form 2365 * @since 10 2366 */ 2367/** 2368 * Defines List Component. 2369 * 2370 * @syscap SystemCapability.ArkUI.ArkUI.Full 2371 * @crossplatform 2372 * @form 2373 * @atomicservice 2374 * @since 11 2375 */ 2376declare const List: ListInterface; 2377 2378/** 2379 * Defines List Component instance. 2380 * 2381 * @syscap SystemCapability.ArkUI.ArkUI.Full 2382 * @since 7 2383 */ 2384/** 2385 * Defines List Component instance. 2386 * 2387 * @syscap SystemCapability.ArkUI.ArkUI.Full 2388 * @form 2389 * @since 9 2390 */ 2391/** 2392 * Defines List Component instance. 2393 * 2394 * @syscap SystemCapability.ArkUI.ArkUI.Full 2395 * @crossplatform 2396 * @form 2397 * @since 10 2398 */ 2399/** 2400 * Defines List Component instance. 2401 * 2402 * @syscap SystemCapability.ArkUI.ArkUI.Full 2403 * @crossplatform 2404 * @form 2405 * @atomicservice 2406 * @since 11 2407 */ 2408declare const ListInstance: ListAttribute; 2409