1/* 2 * Copyright (c) 2021-2024 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 the type of input box 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 7 27 */ 28/** 29 * Declare the type of input box 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @since 10 35 */ 36/** 37 * Declare the type of input box 38 * 39 * @enum { number } 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @atomicservice 43 * @since 11 44 */ 45declare enum InputType { 46 /** 47 * Basic input mode. 48 * 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @since 7 51 */ 52 /** 53 * Basic input mode. 54 * 55 * @syscap SystemCapability.ArkUI.ArkUI.Full 56 * @crossplatform 57 * @since 10 58 */ 59 /** 60 * Basic input mode. 61 * 62 * @syscap SystemCapability.ArkUI.ArkUI.Full 63 * @crossplatform 64 * @atomicservice 65 * @since 11 66 */ 67 Normal, 68 69 /** 70 * Pure digital input mode. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @since 7 74 */ 75 /** 76 * Pure digital input mode. 77 * 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @since 10 81 */ 82 /** 83 * Pure digital input mode. 84 * 85 * @syscap SystemCapability.ArkUI.ArkUI.Full 86 * @crossplatform 87 * @atomicservice 88 * @since 11 89 */ 90 Number, 91 92 /** 93 * Phone number entry mode. 94 * 95 * @syscap SystemCapability.ArkUI.ArkUI.Full 96 * @since 9 97 */ 98 /** 99 * Phone number entry mode. 100 * 101 * @syscap SystemCapability.ArkUI.ArkUI.Full 102 * @crossplatform 103 * @since 10 104 */ 105 /** 106 * Phone number entry mode. 107 * 108 * @syscap SystemCapability.ArkUI.ArkUI.Full 109 * @crossplatform 110 * @atomicservice 111 * @since 11 112 */ 113 PhoneNumber, 114 115 /** 116 * E-mail address input mode. 117 * 118 * @syscap SystemCapability.ArkUI.ArkUI.Full 119 * @since 7 120 */ 121 /** 122 * E-mail address input mode. 123 * 124 * @syscap SystemCapability.ArkUI.ArkUI.Full 125 * @crossplatform 126 * @since 10 127 */ 128 /** 129 * E-mail address input mode. 130 * 131 * @syscap SystemCapability.ArkUI.ArkUI.Full 132 * @crossplatform 133 * @atomicservice 134 * @since 11 135 */ 136 Email, 137 138 /** 139 * Password entry mode. 140 * 141 * @syscap SystemCapability.ArkUI.ArkUI.Full 142 * @since 7 143 */ 144 /** 145 * Password entry mode. 146 * 147 * @syscap SystemCapability.ArkUI.ArkUI.Full 148 * @crossplatform 149 * @since 10 150 */ 151 /** 152 * Password entry mode. 153 * 154 * @syscap SystemCapability.ArkUI.ArkUI.Full 155 * @crossplatform 156 * @atomicservice 157 * @since 11 158 */ 159 Password, 160 161 /** 162 * Number Password entry mode. 163 * 164 * @syscap SystemCapability.ArkUI.ArkUI.Full 165 * @crossplatform 166 * @since 11 167 */ 168 /** 169 * Number Password entry mode. 170 * 171 * @syscap SystemCapability.ArkUI.ArkUI.Full 172 * @crossplatform 173 * @atomicservice 174 * @since 12 175 */ 176 NUMBER_PASSWORD = 8, 177 178 /** 179 * Screen Lock Password entry mode. 180 * 181 * @syscap SystemCapability.ArkUI.ArkUI.Full 182 * @systemapi 183 * @since 11 184 */ 185 SCREEN_LOCK_PASSWORD = 9, 186 187 /* 188 * UserName entry mode. 189 * 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @since 11 192 */ 193 /** 194 * UserName entry mode. 195 * 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @atomicservice 198 * @since 12 199 */ 200 USER_NAME = 10, 201 202 /** 203 * NewPassword entry mode. 204 * 205 * @syscap SystemCapability.ArkUI.ArkUI.Full 206 * @since 11 207 */ 208 /** 209 * NewPassword entry mode. 210 * 211 * @syscap SystemCapability.ArkUI.ArkUI.Full 212 * @atomicservice 213 * @since 12 214 */ 215 NEW_PASSWORD = 11, 216 217 /** 218 * Number decimal entry mode. 219 * 220 * @syscap SystemCapability.ArkUI.ArkUI.Full 221 * @crossplatform 222 * @atomicservice 223 * @since 11 224 */ 225 NUMBER_DECIMAL = 12, 226 227 /** 228 * URL entry mode. 229 * 230 * @syscap SystemCapability.ArkUI.ArkUI.Full 231 * @crossplatform 232 * @atomicservice 233 * @since 12 234 */ 235 URL = 13, 236} 237 238/** 239 * Declare the type of input content 240 * 241 * @enum { number } 242 * @syscap SystemCapability.ArkUI.ArkUI.Full 243 * @atomicservice 244 * @since 12 245 */ 246declare enum ContentType { 247 /** 248 * User name content type. 249 * 250 * @syscap SystemCapability.ArkUI.ArkUI.Full 251 * @atomicservice 252 * @since 12 253 */ 254 USER_NAME = 0, 255 256 /** 257 * Password content type. 258 * 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @atomicservice 261 * @since 12 262 */ 263 PASSWORD = 1, 264 265 /** 266 * New password content type. 267 * 268 * @syscap SystemCapability.ArkUI.ArkUI.Full 269 * @atomicservice 270 * @since 12 271 */ 272 NEW_PASSWORD = 2, 273 274 /** 275 * Full street address content type. 276 * 277 * @syscap SystemCapability.ArkUI.ArkUI.Full 278 * @atomicservice 279 * @since 12 280 */ 281 FULL_STREET_ADDRESS = 3, 282 283 /** 284 * House number content type. 285 * 286 * @syscap SystemCapability.ArkUI.ArkUI.Full 287 * @atomicservice 288 * @since 12 289 */ 290 HOUSE_NUMBER = 4, 291 292 /** 293 * District address content type. 294 * 295 * @syscap SystemCapability.ArkUI.ArkUI.Full 296 * @atomicservice 297 * @since 12 298 */ 299 DISTRICT_ADDRESS = 5, 300 301 /** 302 * City address content type. 303 * 304 * @syscap SystemCapability.ArkUI.ArkUI.Full 305 * @atomicservice 306 * @since 12 307 */ 308 CITY_ADDRESS = 6, 309 310 /** 311 * Province address content type. 312 * 313 * @syscap SystemCapability.ArkUI.ArkUI.Full 314 * @atomicservice 315 * @since 12 316 */ 317 PROVINCE_ADDRESS = 7, 318 319 /** 320 * Country address content type. 321 * 322 * @syscap SystemCapability.ArkUI.ArkUI.Full 323 * @atomicservice 324 * @since 12 325 */ 326 COUNTRY_ADDRESS = 8, 327 328 /** 329 * Person full name content type. 330 * 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @atomicservice 333 * @since 12 334 */ 335 PERSON_FULL_NAME = 9, 336 337 /** 338 * Person last name content type. 339 * 340 * @syscap SystemCapability.ArkUI.ArkUI.Full 341 * @atomicservice 342 * @since 12 343 */ 344 PERSON_LAST_NAME = 10, 345 346 /** 347 * Person first name content type. 348 * 349 * @syscap SystemCapability.ArkUI.ArkUI.Full 350 * @atomicservice 351 * @since 12 352 */ 353 PERSON_FIRST_NAME = 11, 354 355 /** 356 * Phone number content type. 357 * 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @atomicservice 360 * @since 12 361 */ 362 PHONE_NUMBER = 12, 363 364 /** 365 * Phone country code content type. 366 * 367 * @syscap SystemCapability.ArkUI.ArkUI.Full 368 * @atomicservice 369 * @since 12 370 */ 371 PHONE_COUNTRY_CODE = 13, 372 373 /** 374 * Full phone number content type. 375 * 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @atomicservice 378 * @since 12 379 */ 380 FULL_PHONE_NUMBER = 14, 381 382 /** 383 * Email address content type. 384 * 385 * @syscap SystemCapability.ArkUI.ArkUI.Full 386 * @atomicservice 387 * @since 12 388 */ 389 EMAIL_ADDRESS = 15, 390 391 /** 392 * Bank card number content type. 393 * 394 * @syscap SystemCapability.ArkUI.ArkUI.Full 395 * @atomicservice 396 * @since 12 397 */ 398 BANK_CARD_NUMBER = 16, 399 400 /** 401 * ID card number content type. 402 * 403 * @syscap SystemCapability.ArkUI.ArkUI.Full 404 * @atomicservice 405 * @since 12 406 */ 407 ID_CARD_NUMBER = 17, 408 409 /** 410 * Nickname content type. 411 * 412 * @syscap SystemCapability.ArkUI.ArkUI.Full 413 * @atomicservice 414 * @since 12 415 */ 416 NICKNAME = 23, 417 418 /** 419 * Detail info without street content type. 420 * 421 * @syscap SystemCapability.ArkUI.ArkUI.Full 422 * @atomicservice 423 * @since 12 424 */ 425 DETAIL_INFO_WITHOUT_STREET = 24, 426 427 /** 428 * Format address content type. 429 * 430 * @syscap SystemCapability.ArkUI.ArkUI.Full 431 * @atomicservice 432 * @since 12 433 */ 434 FORMAT_ADDRESS = 25 435} 436 437/** 438 * Declare the type of soft keyboard. 439 * 440 * @enum { number } 441 * @syscap SystemCapability.ArkUI.ArkUI.Full 442 * @since 7 443 */ 444/** 445 * Declare the type of soft keyboard. 446 * 447 * @enum { number } 448 * @syscap SystemCapability.ArkUI.ArkUI.Full 449 * @crossplatform 450 * @since 10 451 */ 452/** 453 * Declare the type of soft keyboard. 454 * 455 * @enum { number } 456 * @syscap SystemCapability.ArkUI.ArkUI.Full 457 * @crossplatform 458 * @atomicservice 459 * @since 11 460 */ 461declare enum EnterKeyType { 462 /** 463 * Go. 464 * 465 * @syscap SystemCapability.ArkUI.ArkUI.Full 466 * @since 7 467 */ 468 /** 469 * Go. 470 * 471 * @syscap SystemCapability.ArkUI.ArkUI.Full 472 * @crossplatform 473 * @since 10 474 */ 475 /** 476 * Go. 477 * 478 * @syscap SystemCapability.ArkUI.ArkUI.Full 479 * @crossplatform 480 * @atomicservice 481 * @since 11 482 */ 483 Go = 2, 484 485 /** 486 * Search. 487 * 488 * @syscap SystemCapability.ArkUI.ArkUI.Full 489 * @since 7 490 */ 491 /** 492 * Search. 493 * 494 * @syscap SystemCapability.ArkUI.ArkUI.Full 495 * @crossplatform 496 * @since 10 497 */ 498 /** 499 * Search. 500 * 501 * @syscap SystemCapability.ArkUI.ArkUI.Full 502 * @crossplatform 503 * @atomicservice 504 * @since 11 505 */ 506 Search = 3, 507 508 /** 509 * Send. 510 * 511 * @syscap SystemCapability.ArkUI.ArkUI.Full 512 * @since 7 513 */ 514 /** 515 * Send. 516 * 517 * @syscap SystemCapability.ArkUI.ArkUI.Full 518 * @crossplatform 519 * @since 10 520 */ 521 /** 522 * Send. 523 * 524 * @syscap SystemCapability.ArkUI.ArkUI.Full 525 * @crossplatform 526 * @atomicservice 527 * @since 11 528 */ 529 Send = 4, 530 531 /** 532 * Next. 533 * 534 * @syscap SystemCapability.ArkUI.ArkUI.Full 535 * @since 7 536 */ 537 /** 538 * Next. 539 * 540 * @syscap SystemCapability.ArkUI.ArkUI.Full 541 * @crossplatform 542 * @since 10 543 */ 544 /** 545 * Next. 546 * 547 * @syscap SystemCapability.ArkUI.ArkUI.Full 548 * @crossplatform 549 * @atomicservice 550 * @since 11 551 */ 552 Next = 5, 553 554 /** 555 * Done. 556 * 557 * @syscap SystemCapability.ArkUI.ArkUI.Full 558 * @since 7 559 */ 560 /** 561 * Done. 562 * 563 * @syscap SystemCapability.ArkUI.ArkUI.Full 564 * @crossplatform 565 * @since 10 566 */ 567 /** 568 * Done. 569 * 570 * @syscap SystemCapability.ArkUI.ArkUI.Full 571 * @crossplatform 572 * @atomicservice 573 * @since 11 574 */ 575 Done = 6, 576 577 /** 578 * Showed as 'previous' pattern. 579 * 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @crossplatform 582 * @since 11 583 */ 584 /** 585 * Showed as 'previous' pattern. 586 * 587 * @syscap SystemCapability.ArkUI.ArkUI.Full 588 * @crossplatform 589 * @atomicservice 590 * @since 12 591 */ 592 PREVIOUS = 7, 593 594 /** 595 * Showed as 'new line' pattern. 596 * 597 * @syscap SystemCapability.ArkUI.ArkUI.Full 598 * @crossplatform 599 * @since 11 600 */ 601 /** 602 * Showed as 'new line' pattern. 603 * 604 * @syscap SystemCapability.ArkUI.ArkUI.Full 605 * @crossplatform 606 * @atomicservice 607 * @since 12 608 */ 609 NEW_LINE = 8, 610} 611 612/** 613 * Defines the underline color width property. 614 * 615 * @interface UnderlineColor 616 * @syscap SystemCapability.ArkUI.ArkUI.Full 617 * @crossplatform 618 * @atomicservice 619 * @since 12 620 */ 621declare interface UnderlineColor { 622 /** 623 * Typing underline color width property. 624 * 625 * @type { ?(ResourceColor | undefined) } 626 * @syscap SystemCapability.ArkUI.ArkUI.Full 627 * @crossplatform 628 * @atomicservice 629 * @since 12 630 */ 631 typing?: ResourceColor | undefined; 632 /** 633 * Normal underline color width property. 634 * 635 * @type { ?(ResourceColor | undefined) } 636 * @syscap SystemCapability.ArkUI.ArkUI.Full 637 * @crossplatform 638 * @atomicservice 639 * @since 12 640 */ 641 normal?: ResourceColor | undefined; 642 /** 643 * Error underline color width property. 644 * 645 * @type { ?(ResourceColor | undefined) } 646 * @syscap SystemCapability.ArkUI.ArkUI.Full 647 * @crossplatform 648 * @atomicservice 649 * @since 12 650 */ 651 error?: ResourceColor | undefined; 652 /** 653 * Disable underline color width property. 654 * 655 * @type { ?(ResourceColor | undefined) } 656 * @syscap SystemCapability.ArkUI.ArkUI.Full 657 * @crossplatform 658 * @atomicservice 659 * @since 12 660 */ 661 disable?: ResourceColor | undefined; 662} 663 664/** 665 * Provides the method of keeping TextInput editable state when submitted. 666 * 667 * @interface SubmitEvent 668 * @syscap SystemCapability.ArkUI.ArkUI.Full 669 * @crossplatform 670 * @atomicservice 671 * @since 11 672 */ 673declare interface SubmitEvent { 674 /** 675 * Keeps TextInput editable state when submitted 676 * 677 * @syscap SystemCapability.ArkUI.ArkUI.Full 678 * @crossplatform 679 * @atomicservice 680 * @since 11 681 */ 682 keepEditableState(): void; 683 684 /** 685 * Sets the current value of TextInput. 686 * 687 * @type { string } 688 * @syscap SystemCapability.ArkUI.ArkUI.Full 689 * @crossplatform 690 * @atomicservice 691 * @since 11 692 */ 693 text: string; 694} 695 696/** 697 * Provides the method of switching the cursor position. 698 * 699 * @extends TextContentControllerBase 700 * @since 8 701 */ 702/** 703 * Provides the method of switching the cursor position. 704 * 705 * @extends TextContentControllerBase 706 * @syscap SystemCapability.ArkUI.ArkUI.Full 707 * @crossplatform 708 * @since 10 709 */ 710/** 711 * Provides the method of switching the cursor position. 712 * 713 * @extends TextContentControllerBase 714 * @syscap SystemCapability.ArkUI.ArkUI.Full 715 * @crossplatform 716 * @atomicservice 717 * @since 11 718 */ 719declare class TextInputController extends TextContentControllerBase { 720 /** 721 * constructor. 722 * 723 * @syscap SystemCapability.ArkUI.ArkUI.Full 724 * @since 8 725 */ 726 /** 727 * constructor. 728 * 729 * @syscap SystemCapability.ArkUI.ArkUI.Full 730 * @crossplatform 731 * @since 10 732 */ 733 /** 734 * constructor. 735 * 736 * @syscap SystemCapability.ArkUI.ArkUI.Full 737 * @crossplatform 738 * @atomicservice 739 * @since 11 740 */ 741 constructor(); 742 743 /** 744 * Called when the position of the insertion cursor is set. 745 * 746 * @param { number } value 747 * @syscap SystemCapability.ArkUI.ArkUI.Full 748 * @since 8 749 */ 750 /** 751 * Called when the position of the insertion cursor is set. 752 * 753 * @param { number } value 754 * @syscap SystemCapability.ArkUI.ArkUI.Full 755 * @crossplatform 756 * @since 10 757 */ 758 /** 759 * Called when the position of the insertion cursor is set. 760 * 761 * @param { number } value 762 * @syscap SystemCapability.ArkUI.ArkUI.Full 763 * @crossplatform 764 * @atomicservice 765 * @since 11 766 */ 767 caretPosition(value: number): void; 768 769 /** 770 * Text selection is achieved by specifying the start and end positions of the text. 771 * 772 * @param { number } selectionStart - The start position of the selected text. 773 * @param { number } selectionEnd - The end position of the selected text. 774 * @syscap SystemCapability.ArkUI.ArkUI.Full 775 * @crossplatform 776 * @since 10 777 */ 778 /** 779 * Text selection is achieved by specifying the start and end positions of the text. 780 * 781 * @param { number } selectionStart - The start position of the selected text. 782 * @param { number } selectionEnd - The end position of the selected text. 783 * @syscap SystemCapability.ArkUI.ArkUI.Full 784 * @crossplatform 785 * @atomicservice 786 * @since 11 787 */ 788 /** 789 * Text selection is achieved by specifying the start and end positions of the text. 790 * 791 * @param { number } selectionStart - The start position of the selected text. 792 * @param { number } selectionEnd - The end position of the selected text. 793 * @param { SelectionOptions } [options] - Indicates the options of the text selection. 794 * @syscap SystemCapability.ArkUI.ArkUI.Full 795 * @crossplatform 796 * @atomicservice 797 * @since 12 798 */ 799 setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; 800 801 /** 802 * Exit edit state. 803 * 804 * @syscap SystemCapability.ArkUI.ArkUI.Full 805 * @crossplatform 806 * @since 10 807 */ 808 /** 809 * Exit edit state. 810 * 811 * @syscap SystemCapability.ArkUI.ArkUI.Full 812 * @crossplatform 813 * @atomicservice 814 * @since 11 815 */ 816 stopEditing(): void; 817} 818 819/** 820 * Defines the options of TextInput. 821 * 822 * @interface TextInputOptions 823 * @syscap SystemCapability.ArkUI.ArkUI.Full 824 * @since 7 825 */ 826/** 827 * Defines the options of TextInput. 828 * 829 * @interface TextInputOptions 830 * @syscap SystemCapability.ArkUI.ArkUI.Full 831 * @crossplatform 832 * @since 10 833 */ 834/** 835 * Defines the options of TextInput. 836 * 837 * @interface TextInputOptions 838 * @syscap SystemCapability.ArkUI.ArkUI.Full 839 * @crossplatform 840 * @atomicservice 841 * @since 11 842 */ 843declare interface TextInputOptions { 844 /** 845 * The place holder text string. 846 * 847 * @type { ?ResourceStr } 848 * @syscap SystemCapability.ArkUI.ArkUI.Full 849 * @since 7 850 */ 851 /** 852 * The place holder text string. 853 * 854 * @type { ?ResourceStr } 855 * @syscap SystemCapability.ArkUI.ArkUI.Full 856 * @crossplatform 857 * @since 10 858 */ 859 /** 860 * The place holder text string. 861 * 862 * @type { ?ResourceStr } 863 * @syscap SystemCapability.ArkUI.ArkUI.Full 864 * @crossplatform 865 * @atomicservice 866 * @since 11 867 */ 868 placeholder?: ResourceStr; 869 870 /** 871 * Sets the current value of TextInput. 872 * 873 * @type { ?ResourceStr } 874 * @syscap SystemCapability.ArkUI.ArkUI.Full 875 * @since 7 876 */ 877 /** 878 * Sets the current value of TextInput. 879 * 880 * @type { ?ResourceStr } 881 * @syscap SystemCapability.ArkUI.ArkUI.Full 882 * @crossplatform 883 * @since 10 884 */ 885 /** 886 * Sets the current value of TextInput. 887 * 888 * @type { ?ResourceStr } 889 * @syscap SystemCapability.ArkUI.ArkUI.Full 890 * @crossplatform 891 * @atomicservice 892 * @since 11 893 */ 894 text?: ResourceStr; 895 896 /** 897 * Called when the position of the insertion cursor is set. 898 * 899 * @type { ?TextInputController } 900 * @syscap SystemCapability.ArkUI.ArkUI.Full 901 * @since 8 902 */ 903 /** 904 * Called when the position of the insertion cursor is set. 905 * 906 * @type { ?TextInputController } 907 * @syscap SystemCapability.ArkUI.ArkUI.Full 908 * @crossplatform 909 * @since 10 910 */ 911 /** 912 * Called when the position of the insertion cursor is set. 913 * 914 * @type { ?TextInputController } 915 * @syscap SystemCapability.ArkUI.ArkUI.Full 916 * @crossplatform 917 * @atomicservice 918 * @since 11 919 */ 920 controller?: TextInputController; 921} 922 923/** 924 * Text input style. 925 * 926 * @enum { number } 927 * @syscap SystemCapability.ArkUI.ArkUI.Full 928 * @since 9 929 */ 930/** 931 * Text input style. 932 * 933 * @enum { number } 934 * @syscap SystemCapability.ArkUI.ArkUI.Full 935 * @crossplatform 936 * @since 10 937 */ 938/** 939 * Text input style. 940 * 941 * @enum { number } 942 * @syscap SystemCapability.ArkUI.ArkUI.Full 943 * @crossplatform 944 * @atomicservice 945 * @since 11 946 */ 947declare enum TextInputStyle { 948 /** 949 * Text input default style. 950 * 951 * @syscap SystemCapability.ArkUI.ArkUI.Full 952 * @since 9 953 */ 954 /** 955 * Text input default style. 956 * 957 * @syscap SystemCapability.ArkUI.ArkUI.Full 958 * @crossplatform 959 * @since 10 960 */ 961 /** 962 * Text input default style. 963 * 964 * @syscap SystemCapability.ArkUI.ArkUI.Full 965 * @crossplatform 966 * @atomicservice 967 * @since 11 968 */ 969 Default, 970 971 /** 972 * Text input inline style. 973 * 974 * @syscap SystemCapability.ArkUI.ArkUI.Full 975 * @since 9 976 */ 977 /** 978 * Text input inline style. 979 * 980 * @syscap SystemCapability.ArkUI.ArkUI.Full 981 * @crossplatform 982 * @since 10 983 */ 984 /** 985 * Text input inline style. 986 * 987 * @syscap SystemCapability.ArkUI.ArkUI.Full 988 * @crossplatform 989 * @atomicservice 990 * @since 11 991 */ 992 Inline 993} 994 995/** 996 * Provides a single-line text input component interface. 997 * 998 * @interface TextInputInterface 999 * @syscap SystemCapability.ArkUI.ArkUI.Full 1000 * @since 7 1001 */ 1002/** 1003 * Provides a single-line text input component interface. 1004 * 1005 * @interface TextInputInterface 1006 * @syscap SystemCapability.ArkUI.ArkUI.Full 1007 * @crossplatform 1008 * @since 10 1009 */ 1010/** 1011 * Provides a single-line text input component interface. 1012 * 1013 * @interface TextInputInterface 1014 * @syscap SystemCapability.ArkUI.ArkUI.Full 1015 * @crossplatform 1016 * @atomicservice 1017 * @since 11 1018 */ 1019interface TextInputInterface { 1020 /** 1021 * Called when writing a single line of text. 1022 * 1023 * @param { TextInputOptions } value 1024 * @returns { TextInputAttribute } 1025 * @syscap SystemCapability.ArkUI.ArkUI.Full 1026 * @since 7 1027 */ 1028 /** 1029 * Called when writing a single line of text. 1030 * 1031 * @param { TextInputOptions } value 1032 * @returns { TextInputAttribute } 1033 * @syscap SystemCapability.ArkUI.ArkUI.Full 1034 * @crossplatform 1035 * @since 10 1036 */ 1037 /** 1038 * Called when writing a single line of text. 1039 * 1040 * @param { TextInputOptions } value 1041 * @returns { TextInputAttribute } 1042 * @syscap SystemCapability.ArkUI.ArkUI.Full 1043 * @crossplatform 1044 * @atomicservice 1045 * @since 11 1046 */ 1047 (value?: TextInputOptions): TextInputAttribute; 1048} 1049 1050/** 1051 * PasswordIcon object. 1052 * 1053 * @interface PasswordIcon 1054 * @syscap SystemCapability.ArkUI.ArkUI.Full 1055 * @since 10 1056 */ 1057/** 1058 * PasswordIcon object. 1059 * 1060 * @interface PasswordIcon 1061 * @syscap SystemCapability.ArkUI.ArkUI.Full 1062 * @crossplatform 1063 * @atomicservice 1064 * @since 11 1065 */ 1066interface PasswordIcon { 1067 /** 1068 * Define the on icon source of PasswordIcon. 1069 * 1070 * @type { ?(string | Resource) } 1071 * @syscap SystemCapability.ArkUI.ArkUI.Full 1072 * @since 10 1073 */ 1074 /** 1075 * Define the on icon source of PasswordIcon. 1076 * 1077 * @type { ?(string | Resource) } 1078 * @syscap SystemCapability.ArkUI.ArkUI.Full 1079 * @crossplatform 1080 * @atomicservice 1081 * @since 11 1082 */ 1083 onIconSrc?: string | Resource; 1084 1085 /** 1086 * Define the off icon source of PasswordIcon. 1087 * 1088 * @type { ?(string | Resource) } 1089 * @syscap SystemCapability.ArkUI.ArkUI.Full 1090 * @since 10 1091 */ 1092 /** 1093 * Define the off icon source of PasswordIcon. 1094 * 1095 * @type { ?(string | Resource) } 1096 * @syscap SystemCapability.ArkUI.ArkUI.Full 1097 * @crossplatform 1098 * @atomicservice 1099 * @since 11 1100 */ 1101 offIconSrc?: string | Resource; 1102} 1103 1104/** 1105 * Defines the TextInput attribute functions. 1106 * 1107 * @extends CommonMethod<TextInputAttribute> 1108 * @syscap SystemCapability.ArkUI.ArkUI.Full 1109 * @since 7 1110 */ 1111/** 1112 * Defines the TextInput attribute functions. 1113 * 1114 * @extends CommonMethod<TextInputAttribute> 1115 * @syscap SystemCapability.ArkUI.ArkUI.Full 1116 * @crossplatform 1117 * @since 10 1118 */ 1119/** 1120 * Defines the TextInput attribute functions. 1121 * 1122 * @extends CommonMethod<TextInputAttribute> 1123 * @syscap SystemCapability.ArkUI.ArkUI.Full 1124 * @crossplatform 1125 * @atomicservice 1126 * @since 11 1127 */ 1128declare class TextInputAttribute extends CommonMethod<TextInputAttribute> { 1129 /** 1130 * Called when the input type is set. 1131 * 1132 * @param { InputType } value 1133 * @returns { TextInputAttribute } 1134 * @syscap SystemCapability.ArkUI.ArkUI.Full 1135 * @since 7 1136 */ 1137 /** 1138 * Called when the input type is set. 1139 * 1140 * @param { InputType } value 1141 * @returns { TextInputAttribute } 1142 * @syscap SystemCapability.ArkUI.ArkUI.Full 1143 * @crossplatform 1144 * @since 10 1145 */ 1146 /** 1147 * Called when the input type is set. 1148 * 1149 * @param { InputType } value 1150 * @returns { TextInputAttribute } 1151 * @syscap SystemCapability.ArkUI.ArkUI.Full 1152 * @crossplatform 1153 * @atomicservice 1154 * @since 11 1155 */ 1156 type(value: InputType): TextInputAttribute; 1157 1158 /** 1159 * Called when the content type is set. 1160 * 1161 * @param { ContentType } value 1162 * @returns { TextInputAttribute } 1163 * @syscap SystemCapability.ArkUI.ArkUI.Full 1164 * @atomicservice 1165 * @since 12 1166 */ 1167 contentType(value: ContentType): TextInputAttribute; 1168 1169 /** 1170 * Called when the color of the placeholder is set. 1171 * 1172 * @param { ResourceColor } value 1173 * @returns { TextInputAttribute } 1174 * @syscap SystemCapability.ArkUI.ArkUI.Full 1175 * @since 7 1176 */ 1177 /** 1178 * Called when the color of the placeholder is set. 1179 * 1180 * @param { ResourceColor } value 1181 * @returns { TextInputAttribute } 1182 * @syscap SystemCapability.ArkUI.ArkUI.Full 1183 * @crossplatform 1184 * @since 10 1185 */ 1186 /** 1187 * Called when the color of the placeholder is set. 1188 * 1189 * @param { ResourceColor } value 1190 * @returns { TextInputAttribute } 1191 * @syscap SystemCapability.ArkUI.ArkUI.Full 1192 * @crossplatform 1193 * @atomicservice 1194 * @since 11 1195 */ 1196 placeholderColor(value: ResourceColor): TextInputAttribute; 1197 1198 /** 1199 * Called when the overflow mode of the font is set. 1200 * 1201 * @param { TextOverflow } value 1202 * @returns { TextInputAttribute } 1203 * @syscap SystemCapability.ArkUI.ArkUI.Full 1204 * @crossplatform 1205 * @atomicservice 1206 * @since 12 1207 */ 1208 textOverflow(value: TextOverflow): TextInputAttribute; 1209 1210 /** 1211 * Specify the indentation of the first line in a text-block. 1212 * 1213 * @param { Dimension } value - The length of text indent. 1214 * @returns { TextInputAttribute } The attribute of the text. 1215 * @syscap SystemCapability.ArkUI.ArkUI.Full 1216 * @crossplatform 1217 * @atomicservice 1218 * @since 12 1219 */ 1220 textIndent(value: Dimension): TextInputAttribute; 1221 1222 /** 1223 * Called when the font property of the placeholder is set. 1224 * 1225 * @param { Font } value 1226 * @returns { TextInputAttribute } 1227 * @syscap SystemCapability.ArkUI.ArkUI.Full 1228 * @since 7 1229 */ 1230 /** 1231 * Called when the font property of the placeholder is set. 1232 * 1233 * @param { Font } value 1234 * @returns { TextInputAttribute } 1235 * @syscap SystemCapability.ArkUI.ArkUI.Full 1236 * @crossplatform 1237 * @since 10 1238 */ 1239 /** 1240 * Called when the font property of the placeholder is set. 1241 * 1242 * @param { Font } value 1243 * @returns { TextInputAttribute } 1244 * @syscap SystemCapability.ArkUI.ArkUI.Full 1245 * @crossplatform 1246 * @atomicservice 1247 * @since 11 1248 */ 1249 placeholderFont(value?: Font): TextInputAttribute; 1250 1251 /** 1252 * Called when the type of soft keyboard input button is set. 1253 * 1254 * @param { EnterKeyType } value 1255 * @returns { TextInputAttribute } 1256 * @syscap SystemCapability.ArkUI.ArkUI.Full 1257 * @since 7 1258 */ 1259 /** 1260 * Called when the type of soft keyboard input button is set. 1261 * 1262 * @param { EnterKeyType } value 1263 * @returns { TextInputAttribute } 1264 * @syscap SystemCapability.ArkUI.ArkUI.Full 1265 * @crossplatform 1266 * @since 10 1267 */ 1268 /** 1269 * Called when the type of soft keyboard input button is set. 1270 * 1271 * @param { EnterKeyType } value 1272 * @returns { TextInputAttribute } 1273 * @syscap SystemCapability.ArkUI.ArkUI.Full 1274 * @crossplatform 1275 * @atomicservice 1276 * @since 11 1277 */ 1278 enterKeyType(value: EnterKeyType): TextInputAttribute; 1279 1280 /** 1281 * Called when the color of the insertion cursor is set. 1282 * 1283 * @param { ResourceColor } value 1284 * @returns { TextInputAttribute } 1285 * @syscap SystemCapability.ArkUI.ArkUI.Full 1286 * @since 7 1287 */ 1288 /** 1289 * Called when the color of the insertion cursor is set. 1290 * 1291 * @param { ResourceColor } value 1292 * @returns { TextInputAttribute } 1293 * @syscap SystemCapability.ArkUI.ArkUI.Full 1294 * @crossplatform 1295 * @since 10 1296 */ 1297 /** 1298 * Called when the color of the insertion cursor is set. 1299 * 1300 * @param { ResourceColor } value 1301 * @returns { TextInputAttribute } 1302 * @syscap SystemCapability.ArkUI.ArkUI.Full 1303 * @crossplatform 1304 * @atomicservice 1305 * @since 11 1306 */ 1307 caretColor(value: ResourceColor): TextInputAttribute; 1308 1309 /** 1310 * Called when judging whether the text editing change finished. 1311 * 1312 * @param { function } callback 1313 * @returns { TextInputAttribute } 1314 * @syscap SystemCapability.ArkUI.ArkUI.Full 1315 * @since 7 1316 * @deprecated since 8 1317 * @useinstead onEditChange 1318 */ 1319 onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute; 1320 1321 /** 1322 * Called when judging whether the text editing change finished. 1323 * 1324 * @param { function } callback 1325 * @returns { TextInputAttribute } 1326 * @syscap SystemCapability.ArkUI.ArkUI.Full 1327 * @since 8 1328 */ 1329 /** 1330 * Called when judging whether the text editing change finished. 1331 * 1332 * @param { function } callback 1333 * @returns { TextInputAttribute } 1334 * @syscap SystemCapability.ArkUI.ArkUI.Full 1335 * @crossplatform 1336 * @since 10 1337 */ 1338 /** 1339 * Called when judging whether the text editing change finished. 1340 * 1341 * @param { function } callback 1342 * @returns { TextInputAttribute } 1343 * @syscap SystemCapability.ArkUI.ArkUI.Full 1344 * @crossplatform 1345 * @atomicservice 1346 * @since 11 1347 */ 1348 onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute; 1349 1350 /** 1351 * Called when submitted. 1352 * 1353 * @param { function } callback 1354 * @returns { TextInputAttribute } 1355 * @syscap SystemCapability.ArkUI.ArkUI.Full 1356 * @since 7 1357 */ 1358 /** 1359 * Called when submitted. 1360 * 1361 * @param { function } callback 1362 * @returns { TextInputAttribute } 1363 * @syscap SystemCapability.ArkUI.ArkUI.Full 1364 * @crossplatform 1365 * @since 10 1366 */ 1367 /** 1368 * Called when submitted. 1369 * 1370 * @param { function } callback - callback of the listened event. 1371 * @returns { TextInputAttribute } 1372 * @syscap SystemCapability.ArkUI.ArkUI.Full 1373 * @crossplatform 1374 * @atomicservice 1375 * @since 11 1376 */ 1377 onSubmit(callback: (enterKey: EnterKeyType, event: SubmitEvent) => void): TextInputAttribute; 1378 1379 /** 1380 * Called when the input of the input box changes. 1381 * 1382 * @param { function } callback 1383 * @returns { TextInputAttribute } 1384 * @syscap SystemCapability.ArkUI.ArkUI.Full 1385 * @since 7 1386 */ 1387 /** 1388 * Called when the input of the input box changes. 1389 * 1390 * @param { function } callback 1391 * @returns { TextInputAttribute } 1392 * @syscap SystemCapability.ArkUI.ArkUI.Full 1393 * @crossplatform 1394 * @since 10 1395 */ 1396 /** 1397 * Called when the input of the input box changes. 1398 * 1399 * @param { function } callback 1400 * @returns { TextInputAttribute } 1401 * @syscap SystemCapability.ArkUI.ArkUI.Full 1402 * @crossplatform 1403 * @atomicservice 1404 * @since 11 1405 */ 1406 /** 1407 * Called when the input of the input box changes. 1408 * 1409 * @param { EditableTextOnChangeCallback } callback 1410 * @returns { TextInputAttribute } 1411 * @syscap SystemCapability.ArkUI.ArkUI.Full 1412 * @crossplatform 1413 * @atomicservice 1414 * @since 12 1415 */ 1416 onChange(callback: EditableTextOnChangeCallback): TextInputAttribute; 1417 1418 /** 1419 * Called when the text selection changes. 1420 * 1421 * @param { function } callback - callback of the listened event. 1422 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 1423 * @syscap SystemCapability.ArkUI.ArkUI.Full 1424 * @crossplatform 1425 * @since 10 1426 */ 1427 /** 1428 * Called when the text selection changes. 1429 * 1430 * @param { function } callback - callback of the listened event. 1431 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 1432 * @syscap SystemCapability.ArkUI.ArkUI.Full 1433 * @crossplatform 1434 * @atomicservice 1435 * @since 11 1436 */ 1437 onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextInputAttribute; 1438 1439 /** 1440 * Called when the content scrolls. 1441 * 1442 * @param { function } callback - callback of the listened event. 1443 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 1444 * @syscap SystemCapability.ArkUI.ArkUI.Full 1445 * @crossplatform 1446 * @since 10 1447 */ 1448 /** 1449 * Called when the content scrolls. 1450 * 1451 * @param { function } callback - callback of the listened event. 1452 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 1453 * @syscap SystemCapability.ArkUI.ArkUI.Full 1454 * @crossplatform 1455 * @atomicservice 1456 * @since 11 1457 */ 1458 onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextInputAttribute; 1459 1460 /** 1461 * Called when the input of maximum text length is set. 1462 * 1463 * @param { number } value 1464 * @returns { TextInputAttribute } 1465 * @syscap SystemCapability.ArkUI.ArkUI.Full 1466 * @since 7 1467 */ 1468 /** 1469 * Called when the input of maximum text length is set. 1470 * 1471 * @param { number } value 1472 * @returns { TextInputAttribute } 1473 * @syscap SystemCapability.ArkUI.ArkUI.Full 1474 * @crossplatform 1475 * @since 10 1476 */ 1477 /** 1478 * Called when the input of maximum text length is set. 1479 * 1480 * @param { number } value 1481 * @returns { TextInputAttribute } 1482 * @syscap SystemCapability.ArkUI.ArkUI.Full 1483 * @crossplatform 1484 * @atomicservice 1485 * @since 11 1486 */ 1487 maxLength(value: number): TextInputAttribute; 1488 1489 /** 1490 * Called when the font color is set. 1491 * 1492 * @param { ResourceColor } value 1493 * @returns { TextInputAttribute } 1494 * @syscap SystemCapability.ArkUI.ArkUI.Full 1495 * @since 7 1496 */ 1497 /** 1498 * Called when the font color is set. 1499 * 1500 * @param { ResourceColor } value 1501 * @returns { TextInputAttribute } 1502 * @syscap SystemCapability.ArkUI.ArkUI.Full 1503 * @crossplatform 1504 * @since 10 1505 */ 1506 /** 1507 * Called when the font color is set. 1508 * 1509 * @param { ResourceColor } value 1510 * @returns { TextInputAttribute } 1511 * @syscap SystemCapability.ArkUI.ArkUI.Full 1512 * @crossplatform 1513 * @atomicservice 1514 * @since 11 1515 */ 1516 fontColor(value: ResourceColor): TextInputAttribute; 1517 1518 /** 1519 * Called when the font size is set. 1520 * 1521 * @param { Length } value 1522 * @returns { TextInputAttribute } 1523 * @syscap SystemCapability.ArkUI.ArkUI.Full 1524 * @since 7 1525 */ 1526 /** 1527 * Called when the font size is set. 1528 * 1529 * @param { Length } value 1530 * @returns { TextInputAttribute } 1531 * @syscap SystemCapability.ArkUI.ArkUI.Full 1532 * @crossplatform 1533 * @since 10 1534 */ 1535 /** 1536 * Called when the font size is set. 1537 * 1538 * @param { Length } value 1539 * @returns { TextInputAttribute } 1540 * @syscap SystemCapability.ArkUI.ArkUI.Full 1541 * @crossplatform 1542 * @atomicservice 1543 * @since 11 1544 */ 1545 fontSize(value: Length): TextInputAttribute; 1546 1547 /** 1548 * Called when the font style of a font is set. 1549 * 1550 * @param { FontStyle } value 1551 * @returns { TextInputAttribute } 1552 * @syscap SystemCapability.ArkUI.ArkUI.Full 1553 * @since 7 1554 */ 1555 /** 1556 * Called when the font style of a font is set. 1557 * 1558 * @param { FontStyle } value 1559 * @returns { TextInputAttribute } 1560 * @syscap SystemCapability.ArkUI.ArkUI.Full 1561 * @crossplatform 1562 * @since 10 1563 */ 1564 /** 1565 * Called when the font style of a font is set. 1566 * 1567 * @param { FontStyle } value 1568 * @returns { TextInputAttribute } 1569 * @syscap SystemCapability.ArkUI.ArkUI.Full 1570 * @crossplatform 1571 * @atomicservice 1572 * @since 11 1573 */ 1574 fontStyle(value: FontStyle): TextInputAttribute; 1575 1576 /** 1577 * Called when the font weight is set. 1578 * 1579 * @param { number | FontWeight | string } value 1580 * @returns { TextInputAttribute } 1581 * @syscap SystemCapability.ArkUI.ArkUI.Full 1582 * @since 7 1583 */ 1584 /** 1585 * Called when the font weight is set. 1586 * 1587 * @param { number | FontWeight | string } value 1588 * @returns { TextInputAttribute } 1589 * @syscap SystemCapability.ArkUI.ArkUI.Full 1590 * @crossplatform 1591 * @since 10 1592 */ 1593 /** 1594 * Called when the font weight is set. 1595 * 1596 * @param { number | FontWeight | string } value 1597 * @returns { TextInputAttribute } 1598 * @syscap SystemCapability.ArkUI.ArkUI.Full 1599 * @crossplatform 1600 * @atomicservice 1601 * @since 11 1602 */ 1603 fontWeight(value: number | FontWeight | string): TextInputAttribute; 1604 1605 /** 1606 * Called when the font list of text is set. 1607 * 1608 * @param { ResourceStr } value 1609 * @returns { TextInputAttribute } 1610 * @syscap SystemCapability.ArkUI.ArkUI.Full 1611 * @since 7 1612 */ 1613 /** 1614 * Called when the font list of text is set. 1615 * 1616 * @param { ResourceStr } value 1617 * @returns { TextInputAttribute } 1618 * @syscap SystemCapability.ArkUI.ArkUI.Full 1619 * @crossplatform 1620 * @since 10 1621 */ 1622 /** 1623 * Called when the font list of text is set. 1624 * 1625 * @param { ResourceStr } value 1626 * @returns { TextInputAttribute } 1627 * @syscap SystemCapability.ArkUI.ArkUI.Full 1628 * @crossplatform 1629 * @atomicservice 1630 * @since 11 1631 */ 1632 fontFamily(value: ResourceStr): TextInputAttribute; 1633 1634 /** 1635 * Called when the inputFilter of text is set. 1636 * 1637 * @param { ResourceStr } value 1638 * @param { function } error 1639 * @returns { TextInputAttribute } 1640 * @syscap SystemCapability.ArkUI.ArkUI.Full 1641 * @since 8 1642 */ 1643 /** 1644 * Called when the inputFilter of text is set. 1645 * 1646 * @param { ResourceStr } value 1647 * @param { function } error 1648 * @returns { TextInputAttribute } 1649 * @syscap SystemCapability.ArkUI.ArkUI.Full 1650 * @crossplatform 1651 * @since 10 1652 */ 1653 /** 1654 * Called when the inputFilter of text is set. 1655 * 1656 * @param { ResourceStr } value 1657 * @param { function } error 1658 * @returns { TextInputAttribute } 1659 * @syscap SystemCapability.ArkUI.ArkUI.Full 1660 * @crossplatform 1661 * @atomicservice 1662 * @since 11 1663 */ 1664 inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute; 1665 1666 /** 1667 * Called when using the Clipboard menu 1668 * 1669 * @param { function } callback 1670 * @returns { TextInputAttribute } 1671 * @syscap SystemCapability.ArkUI.ArkUI.Full 1672 * @since 8 1673 */ 1674 /** 1675 * Called when using the Clipboard menu 1676 * 1677 * @param { function } callback 1678 * @returns { TextInputAttribute } 1679 * @syscap SystemCapability.ArkUI.ArkUI.Full 1680 * @crossplatform 1681 * @since 10 1682 */ 1683 /** 1684 * Called when using the Clipboard menu 1685 * 1686 * @param { function } callback 1687 * @returns { TextInputAttribute } 1688 * @syscap SystemCapability.ArkUI.ArkUI.Full 1689 * @crossplatform 1690 * @atomicservice 1691 * @since 11 1692 */ 1693 onCopy(callback: (value: string) => void): TextInputAttribute; 1694 1695 /** 1696 * Called when using the Clipboard menu 1697 * 1698 * @param { function } callback 1699 * @returns { TextInputAttribute } 1700 * @syscap SystemCapability.ArkUI.ArkUI.Full 1701 * @since 8 1702 */ 1703 /** 1704 * Called when using the Clipboard menu 1705 * 1706 * @param { function } callback 1707 * @returns { TextInputAttribute } 1708 * @syscap SystemCapability.ArkUI.ArkUI.Full 1709 * @crossplatform 1710 * @since 10 1711 */ 1712 /** 1713 * Called when using the Clipboard menu 1714 * 1715 * @param { function } callback 1716 * @returns { TextInputAttribute } 1717 * @syscap SystemCapability.ArkUI.ArkUI.Full 1718 * @crossplatform 1719 * @atomicservice 1720 * @since 11 1721 */ 1722 onCut(callback: (value: string) => void): TextInputAttribute; 1723 1724 /** 1725 * Called when using the Clipboard menu 1726 * 1727 * @param { function } callback 1728 * @returns { TextInputAttribute } 1729 * @syscap SystemCapability.ArkUI.ArkUI.Full 1730 * @since 8 1731 */ 1732 /** 1733 * Called when using the Clipboard menu 1734 * 1735 * @param { function } callback 1736 * @returns { TextInputAttribute } 1737 * @syscap SystemCapability.ArkUI.ArkUI.Full 1738 * @crossplatform 1739 * @since 10 1740 */ 1741 /** 1742 * Called when using the Clipboard menu 1743 * 1744 * @param { function } callback 1745 * Executed when a paste operation is performed. 1746 * { string } value - The text content to be pasted. 1747 * { PasteEvent } event - The user-defined paste event. 1748 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 1749 * @syscap SystemCapability.ArkUI.ArkUI.Full 1750 * @crossplatform 1751 * @atomicservice 1752 * @since 11 1753 */ 1754 onPaste(callback: (value: string, event: PasteEvent) => void): TextInputAttribute; 1755 1756 /** 1757 * Called when the copy option is set. 1758 * 1759 * @param { CopyOptions } value 1760 * @returns { TextInputAttribute } 1761 * @syscap SystemCapability.ArkUI.ArkUI.Full 1762 * @since 9 1763 */ 1764 /** 1765 * Called when the copy option is set. 1766 * 1767 * @param { CopyOptions } value 1768 * @returns { TextInputAttribute } 1769 * @syscap SystemCapability.ArkUI.ArkUI.Full 1770 * @crossplatform 1771 * @since 10 1772 */ 1773 /** 1774 * Called when the copy option is set. 1775 * 1776 * @param { CopyOptions } value 1777 * @returns { TextInputAttribute } 1778 * @syscap SystemCapability.ArkUI.ArkUI.Full 1779 * @crossplatform 1780 * @atomicservice 1781 * @since 11 1782 */ 1783 copyOption(value: CopyOptions): TextInputAttribute; 1784 1785 /** 1786 * Called when the password show/hide icon is set. 1787 * 1788 * @param { boolean } value 1789 * @returns { TextInputAttribute } 1790 * @syscap SystemCapability.ArkUI.ArkUI.Full 1791 * @since 9 1792 */ 1793 /** 1794 * Called when the password show/hide icon is set. 1795 * 1796 * @param { boolean } value 1797 * @returns { TextInputAttribute } 1798 * @syscap SystemCapability.ArkUI.ArkUI.Full 1799 * @crossplatform 1800 * @since 10 1801 */ 1802 /** 1803 * Called when the password show/hide icon is set. 1804 * 1805 * @param { boolean } value 1806 * @returns { TextInputAttribute } 1807 * @syscap SystemCapability.ArkUI.ArkUI.Full 1808 * @crossplatform 1809 * @atomicservice 1810 * @since 11 1811 */ 1812 showPasswordIcon(value: boolean): TextInputAttribute; 1813 1814 /** 1815 * Called when the text align is set. 1816 * 1817 * @param { TextAlign } value 1818 * @returns { TextInputAttribute } 1819 * @syscap SystemCapability.ArkUI.ArkUI.Full 1820 * @since 9 1821 */ 1822 /** 1823 * Called when the text align is set. 1824 * 1825 * @param { TextAlign } value 1826 * @returns { TextInputAttribute } 1827 * @syscap SystemCapability.ArkUI.ArkUI.Full 1828 * @crossplatform 1829 * @since 10 1830 */ 1831 /** 1832 * Called when the text align is set. 1833 * 1834 * @param { TextAlign } value 1835 * @returns { TextInputAttribute } 1836 * @syscap SystemCapability.ArkUI.ArkUI.Full 1837 * @crossplatform 1838 * @atomicservice 1839 * @since 11 1840 */ 1841 textAlign(value: TextAlign): TextInputAttribute; 1842 1843 /** 1844 * Text input style 1845 * 1846 * @param { TextInputStyle | TextContentStyle } value - Text input style 1847 * @returns { TextInputAttribute } 1848 * @syscap SystemCapability.ArkUI.ArkUI.Full 1849 * @since 9 1850 */ 1851 /** 1852 * Text input style 1853 * 1854 * @param { TextInputStyle | TextContentStyle } value - Text input style 1855 * @returns { TextInputAttribute } 1856 * @syscap SystemCapability.ArkUI.ArkUI.Full 1857 * @crossplatform 1858 * @since 10 1859 */ 1860 /** 1861 * Text input style 1862 * 1863 * @param { TextInputStyle | TextContentStyle } value - Text input style 1864 * @returns { TextInputAttribute } 1865 * @syscap SystemCapability.ArkUI.ArkUI.Full 1866 * @crossplatform 1867 * @atomicservice 1868 * @since 11 1869 */ 1870 style(value: TextInputStyle | TextContentStyle): TextInputAttribute; 1871 1872 /** 1873 * Define the caret style of the text input 1874 * 1875 * @param { CaretStyle } value 1876 * @returns { TextInputAttribute } 1877 * @syscap SystemCapability.ArkUI.ArkUI.Full 1878 * @crossplatform 1879 * @since 10 1880 */ 1881 /** 1882 * Define the caret style of the text input 1883 * 1884 * @param { CaretStyle } value 1885 * @returns { TextInputAttribute } 1886 * @syscap SystemCapability.ArkUI.ArkUI.Full 1887 * @crossplatform 1888 * @atomicservice 1889 * @since 11 1890 */ 1891 caretStyle(value: CaretStyle): TextInputAttribute; 1892 1893 /** 1894 * Define the text selected background color of the text input. 1895 * 1896 * @param { ResourceColor } value 1897 * @returns { TextInputAttribute } 1898 * @syscap SystemCapability.ArkUI.ArkUI.Full 1899 * @crossplatform 1900 * @since 10 1901 */ 1902 /** 1903 * Define the text selected background color of the text input. 1904 * 1905 * @param { ResourceColor } value 1906 * @returns { TextInputAttribute } 1907 * @syscap SystemCapability.ArkUI.ArkUI.Full 1908 * @crossplatform 1909 * @atomicservice 1910 * @since 11 1911 */ 1912 selectedBackgroundColor(value: ResourceColor): TextInputAttribute; 1913 1914 /** 1915 * Define the caret position of the text input. 1916 * 1917 * @param { number } value 1918 * @returns { TextInputAttribute } 1919 * @syscap SystemCapability.ArkUI.ArkUI.Full 1920 * @crossplatform 1921 * @since 10 1922 */ 1923 /** 1924 * Define the caret position of the text input. 1925 * 1926 * @param { number } value 1927 * @returns { TextInputAttribute } 1928 * @syscap SystemCapability.ArkUI.ArkUI.Full 1929 * @crossplatform 1930 * @atomicservice 1931 * @since 11 1932 */ 1933 caretPosition(value: number): TextInputAttribute; 1934 1935 /** 1936 * Sets whether request keyboard or not when on focus. 1937 * 1938 * @param { boolean } value 1939 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 1940 * @syscap SystemCapability.ArkUI.ArkUI.Full 1941 * @crossplatform 1942 * @since 10 1943 */ 1944 /** 1945 * Sets whether request keyboard or not when on focus. 1946 * 1947 * @param { boolean } value 1948 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 1949 * @syscap SystemCapability.ArkUI.ArkUI.Full 1950 * @crossplatform 1951 * @atomicservice 1952 * @since 11 1953 */ 1954 enableKeyboardOnFocus(value: boolean): TextInputAttribute; 1955 1956 /** 1957 * Define the password icon of the text input. 1958 * 1959 * @param { PasswordIcon } value 1960 * @returns { TextInputAttribute } 1961 * @syscap SystemCapability.ArkUI.ArkUI.Full 1962 * @since 10 1963 */ 1964 /** 1965 * Define the password icon of the text input. 1966 * 1967 * @param { PasswordIcon } value 1968 * @returns { TextInputAttribute } 1969 * @syscap SystemCapability.ArkUI.ArkUI.Full 1970 * @crossplatform 1971 * @atomicservice 1972 * @since 11 1973 */ 1974 passwordIcon(value: PasswordIcon): TextInputAttribute; 1975 1976 /** 1977 * Define the show error of the text input. 1978 * 1979 * @param { string | undefined } value 1980 * @returns { TextInputAttribute } 1981 * @syscap SystemCapability.ArkUI.ArkUI.Full 1982 * @since 10 1983 */ 1984 /** 1985 * Define the show error of the text input. 1986 * 1987 * @param { string | undefined } value 1988 * @returns { TextInputAttribute } 1989 * @syscap SystemCapability.ArkUI.ArkUI.Full 1990 * @crossplatform 1991 * @atomicservice 1992 * @since 11 1993 */ 1994 /** 1995 * Define the show error of the text input. 1996 * 1997 * @param { ResourceStr | undefined } [value] 1998 * @returns { TextInputAttribute } 1999 * @syscap SystemCapability.ArkUI.ArkUI.Full 2000 * @crossplatform 2001 * @atomicservice 2002 * @since 12 2003 */ 2004 showError(value?: ResourceStr | undefined): TextInputAttribute; 2005 2006 /** 2007 * Define the show unit of the text input. 2008 * 2009 * @param { CustomBuilder } value 2010 * @returns { TextInputAttribute } 2011 * @syscap SystemCapability.ArkUI.ArkUI.Full 2012 * @since 10 2013 */ 2014 /** 2015 * Define the show unit of the text input. 2016 * 2017 * @param { CustomBuilder } value 2018 * @returns { TextInputAttribute } 2019 * @syscap SystemCapability.ArkUI.ArkUI.Full 2020 * @crossplatform 2021 * @atomicservice 2022 * @since 11 2023 */ 2024 showUnit(value: CustomBuilder): TextInputAttribute; 2025 2026 /** 2027 * Define the show underline of the text input. 2028 * 2029 * @param { boolean } value 2030 * @returns { TextInputAttribute } 2031 * @syscap SystemCapability.ArkUI.ArkUI.Full 2032 * @since 10 2033 */ 2034 /** 2035 * Define the show underline of the text input. 2036 * 2037 * @param { boolean } value 2038 * @returns { TextInputAttribute } 2039 * @syscap SystemCapability.ArkUI.ArkUI.Full 2040 * @crossplatform 2041 * @atomicservice 2042 * @since 11 2043 */ 2044 showUnderline(value: boolean): TextInputAttribute; 2045 2046 /** 2047 * Define the underline color of the text input. 2048 * 2049 * @param { ResourceColor | UnderlineColor | undefined } value 2050 * @returns { TextInputAttribute } 2051 * @syscap SystemCapability.ArkUI.ArkUI.Full 2052 * @crossplatform 2053 * @atomicservice 2054 * @since 12 2055 */ 2056 underlineColor(value: ResourceColor | UnderlineColor | undefined): TextInputAttribute; 2057 2058 /** 2059 * Controls whether the selection menu pops up. 2060 * 2061 * @param { boolean } value 2062 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2063 * @syscap SystemCapability.ArkUI.ArkUI.Full 2064 * @crossplatform 2065 * @since 10 2066 */ 2067 /** 2068 * Controls whether the selection menu pops up. 2069 * 2070 * @param { boolean } value 2071 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2072 * @syscap SystemCapability.ArkUI.ArkUI.Full 2073 * @crossplatform 2074 * @atomicservice 2075 * @since 11 2076 */ 2077 selectionMenuHidden(value: boolean): TextInputAttribute; 2078 2079 /** 2080 * Define bar state of the text input. 2081 * 2082 * @param { BarState } value 2083 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2084 * @syscap SystemCapability.ArkUI.ArkUI.Full 2085 * @since 10 2086 */ 2087 /** 2088 * Define bar state of the text input. 2089 * 2090 * @param { BarState } value 2091 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2092 * @syscap SystemCapability.ArkUI.ArkUI.Full 2093 * @atomicservice 2094 * @since 11 2095 */ 2096 barState(value: BarState): TextInputAttribute; 2097 2098 /** 2099 * Define max lines of the text input. 2100 * 2101 * @param { number } value 2102 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2103 * @syscap SystemCapability.ArkUI.ArkUI.Full 2104 * @since 10 2105 */ 2106 /** 2107 * Define max lines of the text input. 2108 * 2109 * @param { number } value 2110 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2111 * @syscap SystemCapability.ArkUI.ArkUI.Full 2112 * @crossplatform 2113 * @atomicservice 2114 * @since 11 2115 */ 2116 maxLines(value: number): TextInputAttribute; 2117 2118 /** 2119 * Set the text inline style word break type. 2120 * 2121 * @param { WordBreak } value - The word break type. 2122 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2123 * @syscap SystemCapability.ArkUI.ArkUI.Full 2124 * @crossplatform 2125 * @atomicservice 2126 * @since 12 2127 */ 2128 wordBreak(value: WordBreak): TextInputAttribute; 2129 2130 /** 2131 * Set the text line break strategy type. 2132 * 2133 * @param { LineBreakStrategy } strategy - The text line break strategy type. 2134 * @returns { TextInputAttribute } The attribute of the TextInputAttribute. 2135 * @syscap SystemCapability.ArkUI.ArkUI.Full 2136 * @crossplatform 2137 * @atomicservice 2138 * @since 12 2139 */ 2140 lineBreakStrategy(strategy: LineBreakStrategy): TextInputAttribute; 2141 2142 /** 2143 * Define custom keyboard of the text input. 2144 * 2145 * @param { CustomBuilder } value 2146 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2147 * @syscap SystemCapability.ArkUI.ArkUI.Full 2148 * @since 10 2149 */ 2150 /** 2151 * Define custom keyboard of the text input. 2152 * 2153 * @param { CustomBuilder } value 2154 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2155 * @syscap SystemCapability.ArkUI.ArkUI.Full 2156 * @crossplatform 2157 * @atomicservice 2158 * @since 11 2159 */ 2160 2161 /** 2162 * Define custom keyboard of the text input. 2163 * 2164 * @param { CustomBuilder } value - Set up a custom keyboard of TextInput 2165 * @param { KeyboardOptions } [options] - Indicates the custom keyboard options of TextInput 2166 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2167 * @syscap SystemCapability.ArkUI.ArkUI.Full 2168 * @crossplatform 2169 * @atomicservice 2170 * @since 12 2171 */ 2172 customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextInputAttribute; 2173 2174 /** 2175 * Show the counter when the number of characters entered exceeds the threshold through InputCounterOptions. 2176 * 2177 * @param { boolean } value - Set showcounter of the text input. 2178 * @param { InputCounterOptions } options - Set the percentage of counter. 2179 * @returns { TextInputAttribute } 2180 * @syscap SystemCapability.ArkUI.ArkUI.Full 2181 * @crossplatform 2182 * @atomicservice 2183 * @since 11 2184 */ 2185 showCounter(value: boolean, options?: InputCounterOptions): TextInputAttribute; 2186 2187 /** 2188 * Set the cancel button style 2189 * 2190 * @param { object } value - indicates the style of the cancel button. 2191 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2192 * @syscap SystemCapability.ArkUI.ArkUI.Full 2193 * @crossplatform 2194 * @since 11 2195 */ 2196 /** 2197 * Set the cancel button style 2198 * 2199 * @param { object } value - indicates the style of the cancel button. 2200 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2201 * @syscap SystemCapability.ArkUI.ArkUI.Full 2202 * @crossplatform 2203 * @atomicservice 2204 * @since 12 2205 */ 2206 cancelButton(value: { style?: CancelButtonStyle, icon?: IconOptions }): TextInputAttribute; 2207 2208 /** 2209 * Sets selection when on focus. 2210 * 2211 * @param { boolean } value - Sets selection or not. 2212 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2213 * @syscap SystemCapability.ArkUI.ArkUI.Full 2214 * @crossplatform 2215 * @since 11 2216 */ 2217 /** 2218 * Sets selection when on focus. 2219 * 2220 * @param { boolean } value - Sets selection or not. 2221 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2222 * @syscap SystemCapability.ArkUI.ArkUI.Full 2223 * @crossplatform 2224 * @atomicservice 2225 * @since 12 2226 */ 2227 selectAll(value: boolean): TextInputAttribute; 2228 2229 /** 2230 * Called when the minimum font size of the font is set. 2231 * 2232 * @param { number | string | Resource } value 2233 * @returns { TextInputAttribute } 2234 * @syscap SystemCapability.ArkUI.ArkUI.Full 2235 * @crossplatform 2236 * @atomicservice 2237 * @since 12 2238 */ 2239 minFontSize(value: number | string | Resource): TextInputAttribute; 2240 2241 /** 2242 * Called when the maximum font size of the font is set. 2243 * 2244 * @param { number | string | Resource } value 2245 * @returns { TextInputAttribute } 2246 * @syscap SystemCapability.ArkUI.ArkUI.Full 2247 * @crossplatform 2248 * @atomicservice 2249 * @since 12 2250 */ 2251 maxFontSize(value: number | string | Resource): TextInputAttribute; 2252 2253 /** 2254 * Called when the height adaptive policy is set. 2255 * 2256 * @param { TextHeightAdaptivePolicy } value - The height adaptive policy. 2257 * @returns { TextInputAttribute } 2258 * @syscap SystemCapability.ArkUI.ArkUI.Full 2259 * @crossplatform 2260 * @atomicservice 2261 * @since 12 2262 */ 2263 heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextInputAttribute; 2264 2265 /** 2266 * Sets whether enable auto fill or not. 2267 * 2268 * @param { boolean } value - Indicates the flag whether autofill is enabled. 2269 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 2270 * @syscap SystemCapability.ArkUI.ArkUI.Full 2271 * @since 11 2272 */ 2273 /** 2274 * Sets whether enable auto fill or not. 2275 * 2276 * @param { boolean } value - Indicates the flag whether autofill is enabled. 2277 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 2278 * @syscap SystemCapability.ArkUI.ArkUI.Full 2279 * @atomicservice 2280 * @since 12 2281 */ 2282 enableAutoFill(value: boolean): TextInputAttribute; 2283 2284 /** 2285 * Called when the text decoration of the text is set. 2286 * 2287 * @param { TextDecorationOptions } value 2288 * @returns { TextInputAttribute } 2289 * @syscap SystemCapability.ArkUI.ArkUI.Full 2290 * @crossplatform 2291 * @atomicservice 2292 * @since 12 2293 */ 2294 decoration(value: TextDecorationOptions): TextInputAttribute; 2295 2296 /** 2297 * Called when the distance between text fonts is set. 2298 * 2299 * @param { number | string | Resource } value 2300 * @returns { TextInputAttribute } 2301 * @syscap SystemCapability.ArkUI.ArkUI.Full 2302 * @crossplatform 2303 * @atomicservice 2304 * @since 12 2305 */ 2306 letterSpacing(value: number | string | Resource): TextInputAttribute; 2307 2308 /** 2309 * Called when the line height of the font is set. 2310 * 2311 * @param { number | string | Resource } value 2312 * @returns { TextInputAttribute } 2313 * @syscap SystemCapability.ArkUI.ArkUI.Full 2314 * @crossplatform 2315 * @atomicservice 2316 * @since 12 2317 */ 2318 lineHeight(value: number | string | Resource): TextInputAttribute; 2319 2320 /** 2321 * Define the password rules of the text input. 2322 * 2323 * @param { string } value - Indicates the password rules. 2324 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 2325 * @syscap SystemCapability.ArkUI.ArkUI.Full 2326 * @since 11 2327 */ 2328 /** 2329 * Define the password rules of the text input. 2330 * 2331 * @param { string } value - Indicates the password rules. 2332 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 2333 * @syscap SystemCapability.ArkUI.ArkUI.Full 2334 * @atomicservice 2335 * @since 12 2336 */ 2337 passwordRules(value: string): TextInputAttribute; 2338 2339 /** 2340 * Set font feature. 2341 * 2342 * @param { string } value - The fontFeature. 2343 * normal | <feature-tag-value>, 2344 * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0 2345 * the values of <feature-tag-value> reference to doc of TextInput component 2346 * number of <feature-tag-value> can be single or multiple, and separated by comma ','. 2347 * @returns { TextInputAttribute } 2348 * @syscap SystemCapability.ArkUI.ArkUI.Full 2349 * @crossplatform 2350 * @atomicservice 2351 * @since 12 2352 */ 2353 fontFeature(value: string): TextInputAttribute; 2354 2355 /** 2356 * Define the password visible mode of the text input. 2357 * 2358 * @param { boolean } visible - Indicates the password visible mode. 2359 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 2360 * @syscap SystemCapability.ArkUI.ArkUI.Full 2361 * @crossplatform 2362 * @atomicservice 2363 * @since 12 2364 */ 2365 showPassword(visible: boolean): TextInputAttribute; 2366 2367 /** 2368 * Called when changing the password visible mode of the text input. 2369 * 2370 * @param { Callback<boolean> } callback - callback of the password visible mode change event. 2371 * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. 2372 * @syscap SystemCapability.ArkUI.ArkUI.Full 2373 * @crossplatform 2374 * @atomicservice 2375 * @since 12 2376 */ 2377 onSecurityStateChange(callback: Callback<boolean>): TextInputAttribute; 2378 2379 /** 2380 * Get text value information when about to input. 2381 * 2382 * @param { Callback<InsertValue, boolean> } callback - The triggered function when text content is about to insert. 2383 * @returns { TextInputAttribute } 2384 * @syscap SystemCapability.ArkUI.ArkUI.Full 2385 * @crossplatform 2386 * @atomicservice 2387 * @since 12 2388 */ 2389 onWillInsert(callback: Callback<InsertValue, boolean>): TextInputAttribute; 2390 2391 /** 2392 * Get text value information when completed input. 2393 * 2394 * @param { Callback<InsertValue> } callback - The triggered function when text content has been inserted. 2395 * @returns { TextInputAttribute } 2396 * @syscap SystemCapability.ArkUI.ArkUI.Full 2397 * @crossplatform 2398 * @atomicservice 2399 * @since 12 2400 */ 2401 onDidInsert(callback: Callback<InsertValue>): TextInputAttribute; 2402 2403 /** 2404 * Get text value information when about to delete. 2405 * 2406 * @param { Callback<DeleteValue, boolean> } callback - The triggered function when text content is about to delete. 2407 * @returns { TextInputAttribute } 2408 * @syscap SystemCapability.ArkUI.ArkUI.Full 2409 * @crossplatform 2410 * @atomicservice 2411 * @since 12 2412 */ 2413 onWillDelete(callback: Callback<DeleteValue, boolean>): TextInputAttribute; 2414 2415 /** 2416 * Get text value information when the deletion has been completed 2417 * 2418 * @param { Callback<DeleteValue> } callback - The triggered function when text content has been deleted. 2419 * @returns { TextInputAttribute } 2420 * @syscap SystemCapability.ArkUI.ArkUI.Full 2421 * @crossplatform 2422 * @atomicservice 2423 * @since 12 2424 */ 2425 onDidDelete(callback: Callback<DeleteValue>): TextInputAttribute; 2426 2427 /** 2428 * Set the custom text menu. 2429 * 2430 * @param { EditMenuOptions } editMenu - Customize text menu options. 2431 * @returns { TextInputAttribute } 2432 * @syscap SystemCapability.ArkUI.ArkUI.Full 2433 * @crossplatform 2434 * @atomicservice 2435 * @since 12 2436 */ 2437 editMenuOptions(editMenu: EditMenuOptions): TextInputAttribute; 2438 2439 /** 2440 * Define the preview text mode of the text input. 2441 * 2442 * @param { boolean } enable - Indicates the preview text mode. 2443 * @returns { TextInputAttribute } 2444 * @syscap SystemCapability.ArkUI.ArkUI.Full 2445 * @crossplatform 2446 * @atomicservice 2447 * @since 12 2448 */ 2449 enablePreviewText(enable: boolean): TextInputAttribute; 2450 2451 /** 2452 * Enable or disable haptic feedback. 2453 * 2454 * @param { boolean } isEnabled - Default value is true, set false to disable haptic feedback. 2455 * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. 2456 * @syscap SystemCapability.ArkUI.ArkUI.Full 2457 * @crossplatform 2458 * @atomicservice 2459 * @since 13 2460 */ 2461 enableHapticFeedback(isEnabled: boolean): TextInputAttribute; 2462} 2463 2464/** 2465 * Defines TextInput Component. 2466 * 2467 * @syscap SystemCapability.ArkUI.ArkUI.Full 2468 * @since 7 2469 */ 2470/** 2471 * Defines TextInput Component. 2472 * 2473 * @syscap SystemCapability.ArkUI.ArkUI.Full 2474 * @crossplatform 2475 * @since 10 2476 */ 2477/** 2478 * Defines TextInput Component. 2479 * 2480 * @syscap SystemCapability.ArkUI.ArkUI.Full 2481 * @crossplatform 2482 * @atomicservice 2483 * @since 11 2484 */ 2485declare const TextInput: TextInputInterface; 2486 2487/** 2488 * Defines TextInput Component instance. 2489 * 2490 * @syscap SystemCapability.ArkUI.ArkUI.Full 2491 * @since 7 2492 */ 2493/** 2494 * Defines TextInput Component instance. 2495 * 2496 * @syscap SystemCapability.ArkUI.ArkUI.Full 2497 * @crossplatform 2498 * @since 10 2499 */ 2500/** 2501 * Defines TextInput Component instance. 2502 * 2503 * @syscap SystemCapability.ArkUI.ArkUI.Full 2504 * @crossplatform 2505 * @atomicservice 2506 * @since 11 2507 */ 2508declare const TextInputInstance: TextInputAttribute; 2509