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 * Defines the navigation common title. 18 * 19 * @interface NavigationCommonTitle 20 * @syscap SystemCapability.ArkUI.ArkUI.Full 21 * @since 9 22 */ 23/** 24 * Defines the navigation common title. 25 * 26 * @interface NavigationCommonTitle 27 * @syscap SystemCapability.ArkUI.ArkUI.Full 28 * @crossplatform 29 * @since 10 30 */ 31declare interface NavigationCommonTitle { 32 /** 33 * Sets the main title. 34 * 35 * @type { string } 36 * @syscap SystemCapability.ArkUI.ArkUI.Full 37 * @since 9 38 */ 39 /** 40 * Sets the main title. 41 * 42 * @type { string } 43 * @syscap SystemCapability.ArkUI.ArkUI.Full 44 * @crossplatform 45 * @since 10 46 */ 47 main: string; 48 49 /** 50 * Sets the sub title. 51 * 52 * @type { string } 53 * @syscap SystemCapability.ArkUI.ArkUI.Full 54 * @since 9 55 */ 56 /** 57 * Sets the sub title. 58 * 59 * @type { string } 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @crossplatform 62 * @since 10 63 */ 64 sub: string; 65} 66 67/** 68 * Defines the navigation custom title. 69 * 70 * @interface NavigationCustomTitle 71 * @syscap SystemCapability.ArkUI.ArkUI.Full 72 * @since 9 73 */ 74/** 75 * Defines the navigation custom title. 76 * 77 * @interface NavigationCustomTitle 78 * @syscap SystemCapability.ArkUI.ArkUI.Full 79 * @crossplatform 80 * @since 10 81 */ 82declare interface NavigationCustomTitle { 83 /** 84 * Sets the custom title builder. 85 * 86 * @type { CustomBuilder } 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @since 9 89 */ 90 /** 91 * Sets the custom title builder. 92 * 93 * @type { CustomBuilder } 94 * @syscap SystemCapability.ArkUI.ArkUI.Full 95 * @crossplatform 96 * @since 10 97 */ 98 builder: CustomBuilder; 99 100 /** 101 * Sets the custom title height. 102 * 103 * @type { TitleHeight | Length } 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @since 9 106 */ 107 /** 108 * Sets the custom title height. 109 * 110 * @type { TitleHeight | Length } 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @crossplatform 113 * @since 10 114 */ 115 height: TitleHeight | Length; 116} 117 118/** 119 * Navigation mode 120 * 121 * @enum { number } 122 * @syscap SystemCapability.ArkUI.ArkUI.Full 123 * @since 9 124 */ 125/** 126 * Navigation mode 127 * 128 * @enum { number } 129 * @syscap SystemCapability.ArkUI.ArkUI.Full 130 * @crossplatform 131 * @since 10 132 */ 133declare enum NavigationMode { 134 /** 135 * The navigation bar and the content area are displayed in stack. 136 * 137 * @syscap SystemCapability.ArkUI.ArkUI.Full 138 * @since 9 139 */ 140 /** 141 * The navigation bar and the content area are displayed in stack. 142 * 143 * @syscap SystemCapability.ArkUI.ArkUI.Full 144 * @crossplatform 145 * @since 10 146 */ 147 Stack, 148 149 /** 150 * The navigation bar and the content area are displayed side by side. 151 * 152 * @syscap SystemCapability.ArkUI.ArkUI.Full 153 * @since 9 154 */ 155 /** 156 * The navigation bar and the content area are displayed side by side. 157 * 158 * @syscap SystemCapability.ArkUI.ArkUI.Full 159 * @crossplatform 160 * @since 10 161 */ 162 Split, 163 164 /** 165 * If the window width is greater than 520vp, the navigation component is displayed in split mode. 166 * Otherwise it's displayed in stack mode. 167 * 168 * @syscap SystemCapability.ArkUI.ArkUI.Full 169 * @since 9 170 */ 171 /** 172 * If the window width is greater than the sum of minNavBarWidth and minContentWidth, the navigation component is displayed in split mode. 173 * Otherwise it's displayed in stack mode. 174 * 175 * @syscap SystemCapability.ArkUI.ArkUI.Full 176 * @crossplatform 177 * @since 10 178 */ 179 Auto, 180} 181 182/** 183 * Navigation bar position 184 * 185 * @enum { number } 186 * @syscap SystemCapability.ArkUI.ArkUI.Full 187 * @since 9 188 */ 189/** 190 * Navigation bar position 191 * 192 * @enum { number } 193 * @syscap SystemCapability.ArkUI.ArkUI.Full 194 * @crossplatform 195 * @since 10 196 */ 197declare enum NavBarPosition { 198 /** 199 * The navigation bar is on the Start of the container 200 * 201 * @syscap SystemCapability.ArkUI.ArkUI.Full 202 * @since 9 203 */ 204 /** 205 * The navigation bar is on the Start of the container 206 * 207 * @syscap SystemCapability.ArkUI.ArkUI.Full 208 * @crossplatform 209 * @since 10 210 */ 211 Start, 212 213 /** 214 * The navigation bar is on the End of the container 215 * 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @since 9 218 */ 219 /** 220 * The navigation bar is on the End of the container 221 * 222 * @syscap SystemCapability.ArkUI.ArkUI.Full 223 * @crossplatform 224 * @since 10 225 */ 226 End, 227} 228 229/** 230 * Navigation title mode. 231 * 232 * @enum { number } 233 * @syscap SystemCapability.ArkUI.ArkUI.Full 234 * @since 8 235 */ 236/** 237 * Navigation title mode. 238 * 239 * @enum { number } 240 * @syscap SystemCapability.ArkUI.ArkUI.Full 241 * @crossplatform 242 * @since 10 243 */ 244declare enum NavigationTitleMode { 245 /** 246 * The title is free mode. 247 * 248 * @syscap SystemCapability.ArkUI.ArkUI.Full 249 * @since 8 250 */ 251 /** 252 * The title is free mode. 253 * 254 * @syscap SystemCapability.ArkUI.ArkUI.Full 255 * @crossplatform 256 * @since 10 257 */ 258 Free = 0, 259 260 /** 261 * The title is full mode. 262 * 263 * @syscap SystemCapability.ArkUI.ArkUI.Full 264 * @since 8 265 */ 266 /** 267 * The title is full mode. 268 * 269 * @syscap SystemCapability.ArkUI.ArkUI.Full 270 * @crossplatform 271 * @since 10 272 */ 273 Full, 274 275 /** 276 * The title is mini mode. 277 * 278 * @syscap SystemCapability.ArkUI.ArkUI.Full 279 * @since 8 280 */ 281 /** 282 * The title is mini mode. 283 * 284 * @syscap SystemCapability.ArkUI.ArkUI.Full 285 * @crossplatform 286 * @since 10 287 */ 288 Mini, 289} 290 291declare interface NavigationMenuItem { 292 /** 293 * The value of navigation menu item. 294 * 295 * @type { string } 296 * @syscap SystemCapability.ArkUI.ArkUI.Full 297 * @since 8 298 */ 299 /** 300 * The value of navigation menu item. 301 * 302 * @type { string } 303 * @syscap SystemCapability.ArkUI.ArkUI.Full 304 * @crossplatform 305 * @since 10 306 */ 307 value: string; 308 309 /** 310 * The icon of navigation menu item. 311 * 312 * @type { ?string } 313 * @syscap SystemCapability.ArkUI.ArkUI.Full 314 * @since 8 315 */ 316 /** 317 * The icon of navigation menu item. 318 * 319 * @type { ?string } 320 * @syscap SystemCapability.ArkUI.ArkUI.Full 321 * @crossplatform 322 * @since 10 323 */ 324 icon?: string; 325 326 /** 327 * Trigger by navigation menu item click. 328 * 329 * @type { ?(() => void) } 330 * @syscap SystemCapability.ArkUI.ArkUI.Full 331 * @since 8 332 */ 333 /** 334 * Trigger by navigation menu item click. 335 * 336 * @type { ?function } 337 * @syscap SystemCapability.ArkUI.ArkUI.Full 338 * @crossplatform 339 * @since 10 340 */ 341 action?: () => void; 342} 343 344/** 345 * Indicates the information of route page. 346 * 347 * @syscap SystemCapability.ArkUI.ArkUI.Full 348 * @crossplatform 349 * @since 10 350 */ 351declare class NavPathInfo { 352 /** 353 * Creates an instance of NavPathInfo. 354 * 355 * @param { string } name - The name of route page. 356 * @param { unknown } param - The detailed parameter of the route page. 357 * @syscap SystemCapability.ArkUI.ArkUI.Full 358 * @crossplatform 359 * @since 10 360 */ 361 constructor(name: string, param: unknown); 362 363 /** 364 * The name of route page. 365 * 366 * @type { string } 367 * @syscap SystemCapability.ArkUI.ArkUI.Full 368 * @crossplatform 369 * @since 10 370 */ 371 name: string; 372 373 /** 374 * The detailed parameter of the route page. 375 * 376 * @type { ?unknown } 377 * @syscap SystemCapability.ArkUI.ArkUI.Full 378 * @crossplatform 379 * @since 10 380 */ 381 param?: unknown; 382} 383 384declare class NavPathStack { 385 /** 386 * Creates an instance of NavPathStack. 387 * 388 * @syscap SystemCapability.ArkUI.ArkUI.Full 389 * @crossplatform 390 * @since 10 391 */ 392 constructor(); 393 394 /** 395 * Pushes the route page into the stack. 396 * 397 * @param { NavPathInfo } info - Indicates the route page to be pushed. 398 * @syscap SystemCapability.ArkUI.ArkUI.Full 399 * @crossplatform 400 * @since 10 401 */ 402 pushPath(info: NavPathInfo): void; 403 404 /** 405 * Pushes the specified route page into the stack. 406 * 407 * @param { string } name - Indicates the name of the route page to be pushed. 408 * @param { unknown } param - Indicates the detailed parameter of the route page to be pushed. 409 * @syscap SystemCapability.ArkUI.ArkUI.Full 410 * @crossplatform 411 * @since 10 412 */ 413 pushPathByName(name: string, param: unknown): void; 414 415 /** 416 * Pops the top route page out of the stack. 417 * 418 * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, otherwise returns undefined. 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @crossplatform 421 * @since 10 422 */ 423 pop(): NavPathInfo | undefined; 424 425 /** 426 * Pops the specified route page out of the stack. 427 * 428 * @param { string } name - Indicates the name of the route page to be popped. 429 * @returns { number } Returns the index of the route page if it exists in the stack, otherwise returns -1; 430 * @syscap SystemCapability.ArkUI.ArkUI.Full 431 * @crossplatform 432 * @since 10 433 */ 434 popToName(name: string): number; 435 436 /** 437 * Pops the specified route page out of the stack. 438 * 439 * @param { number } index - Indicates the index of the route page to be popped. 440 * @syscap SystemCapability.ArkUI.ArkUI.Full 441 * @crossplatform 442 * @since 10 443 */ 444 popToIndex(index: number): void; 445 446 /** 447 * Moves the specified route page to stack top. 448 * 449 * @param { string } name - Indicates the name of the route page to be moved to the top. 450 * @returns { number } Returns the index of the route page if it exists in the stack, otherwise returns -1; 451 * @syscap SystemCapability.ArkUI.ArkUI.Full 452 * @crossplatform 453 * @since 10 454 */ 455 moveToTop(name: string): number; 456 457 /** 458 * Moves the specified route page to stack top. 459 * 460 * @param { number } index - Indicates the index of the route page to be moved to the top. 461 * @syscap SystemCapability.ArkUI.ArkUI.Full 462 * @crossplatform 463 * @since 10 464 */ 465 moveIndexToTop(index: number): void; 466 467 /** 468 * Clears the stack. 469 * 470 * @syscap SystemCapability.ArkUI.ArkUI.Full 471 * @crossplatform 472 * @since 10 473 */ 474 clear(): void; 475 476 /** 477 * Obtains all the page name in the stack. 478 * 479 * @returns { Array<string> } Returns all the page name in the stack; 480 * @syscap SystemCapability.ArkUI.ArkUI.Full 481 * @crossplatform 482 * @since 10 483 */ 484 getAllPathName(): Array<string>; 485 486 /** 487 * Obtains the param of the specified route page. 488 * 489 * @param { number } index - Indicates the index of the route page. 490 * @returns { unknown | undefined } Returns the detailed parameter of the route page if it exists in the stack, otherwise returns undefined; 491 * @syscap SystemCapability.ArkUI.ArkUI.Full 492 * @crossplatform 493 * @since 10 494 */ 495 getParamByIndex(index: number): unknown | undefined; 496 497 /** 498 * Obtains the param of the specified route page. 499 * 500 * @param { string } name - Indicates the name of the route page. 501 * @returns { Array<unknown> } Returns the detailed parameter of all the route pages named name. 502 * @syscap SystemCapability.ArkUI.ArkUI.Full 503 * @crossplatform 504 * @since 10 505 */ 506 getParamByName(name: string): Array<unknown>; 507 508 /** 509 * Obtains the index of the specified route page. 510 * 511 * @param { string } name - Indicates the name of the route page. 512 * @returns { Array<number> } Returns the index of all the route pages named name. 513 * @syscap SystemCapability.ArkUI.ArkUI.Full 514 * @crossplatform 515 * @since 10 516 */ 517 getIndexByName(name: string): Array<number>; 518 519 /** 520 * Obtains the size of the stack. 521 * 522 * @returns { number } Returns the size of the stack. 523 * @syscap SystemCapability.ArkUI.ArkUI.Full 524 * @crossplatform 525 * @since 10 526 */ 527 size(): number; 528} 529 530/** 531 * Provide navigator view interface 532 * 533 * @interface NavigationInterface 534 * @syscap SystemCapability.ArkUI.ArkUI.Full 535 * @since 8 536 */ 537/** 538 * Provide navigator view interface 539 * 540 * @interface NavigationInterface 541 * @syscap SystemCapability.ArkUI.ArkUI.Full 542 * @crossplatform 543 * @since 10 544 */ 545interface NavigationInterface { 546 /** 547 * Called when the navigator view interface is used. 548 * 549 * @returns { NavigationAttribute } 550 * @syscap SystemCapability.ArkUI.ArkUI.Full 551 * @since 8 552 */ 553 /** 554 * Called when the navigator view interface is used. 555 * 556 * @returns { NavigationAttribute } 557 * @syscap SystemCapability.ArkUI.ArkUI.Full 558 * @crossplatform 559 * @since 10 560 */ 561 (): NavigationAttribute; 562 563 /** 564 * Called when the navigator view interface is used, with route table provided. 565 * 566 * @param { NavPathStack } pathInfos - The stack of the route table. 567 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 568 * @syscap SystemCapability.ArkUI.ArkUI.Full 569 * @crossplatform 570 * @since 10 571 */ 572 (pathInfos: NavPathStack): NavigationAttribute; 573} 574 575/** 576 * Defines the status of toolbar item and it is used in the ToolbarItem interface. 577 * 578 * @enum { number } 579 * @syscap SystemCapability.ArkUI.ArkUI.Full 580 * @since 10 581 */ 582declare enum ToolbarItemStatus { 583 /** 584 * Normal state of toolbar item. 585 * 586 * @syscap SystemCapability.ArkUI.ArkUI.Full 587 * @since 10 588 */ 589 NORMAL = 0, 590 591 /** 592 * Disable state of toolbar item. 593 * 594 * @syscap SystemCapability.ArkUI.ArkUI.Full 595 * @since 10 596 */ 597 DISABLED = 1, 598 599 /** 600 * Active state of toolbar item. 601 * 602 * @syscap SystemCapability.ArkUI.ArkUI.Full 603 * @since 10 604 */ 605 ACTIVE = 2, 606} 607 608/** 609 * Defines configurable parameters for toolbar item. 610 * 611 * @interface ToolbarItem 612 * @syscap SystemCapability.ArkUI.ArkUI.Full 613 * @since 10 614 */ 615declare interface ToolbarItem { 616 /** 617 * The value of navigation toolbar item. 618 * 619 * @type { ResourceStr } 620 * @syscap SystemCapability.ArkUI.ArkUI.Full 621 * @crossplatform 622 * @since 10 623 */ 624 value: ResourceStr; 625 626 /** 627 * The icon of navigation toolbar item. 628 * 629 * @type { ?ResourceStr } 630 * @syscap SystemCapability.ArkUI.ArkUI.Full 631 * @crossplatform 632 * @since 10 633 */ 634 icon?: ResourceStr; 635 636 /** 637 * Trigger by navigation toolbar item click. 638 * 639 * @type { ?function } 640 * @syscap SystemCapability.ArkUI.ArkUI.Full 641 * @crossplatform 642 * @since 10 643 */ 644 action?: () => void; 645 646 /** 647 * The state of navigation toolbar item. 648 * 649 * @type { ?ToolbarItemStatus } 650 * @syscap SystemCapability.ArkUI.ArkUI.Full 651 * @crossplatform 652 * @since 10 653 */ 654 status?: ToolbarItemStatus; 655 656 /** 657 * The icon of navigation toolbar item in active state. 658 * 659 * @type { ?ResourceStr } 660 * @syscap SystemCapability.ArkUI.ArkUI.Full 661 * @crossplatform 662 * @since 10 663 */ 664 activeIcon?: ResourceStr; 665} 666 667/** 668 * Declare Navigation view properties. 669 * 670 * @extends CommonMethod 671 * @syscap SystemCapability.ArkUI.ArkUI.Full 672 * @since 8 673 */ 674/** 675 * Declare Navigation view properties. 676 * 677 * @extends CommonMethod 678 * @syscap SystemCapability.ArkUI.ArkUI.Full 679 * @crossplatform 680 * @since 10 681 */ 682declare class NavigationAttribute extends CommonMethod<NavigationAttribute> { 683 /** 684 * Sets the width of navigation bar. 685 * 686 * @param { Length } value 687 * @returns { NavigationAttribute } 688 * @syscap SystemCapability.ArkUI.ArkUI.Full 689 * @since 9 690 */ 691 /** 692 * Sets the width of navigation bar. 693 * 694 * @param { Length } value 695 * @returns { NavigationAttribute } 696 * @syscap SystemCapability.ArkUI.ArkUI.Full 697 * @crossplatform 698 * @since 10 699 */ 700 navBarWidth(value: Length): NavigationAttribute; 701 702 /** 703 * Sets the position of navigation bar. 704 * 705 * @param { NavBarPosition } value 706 * @returns { NavigationAttribute } 707 * @syscap SystemCapability.ArkUI.ArkUI.Full 708 * @since 9 709 */ 710 /** 711 * Sets the position of navigation bar. 712 * 713 * @param { NavBarPosition } value 714 * @returns { NavigationAttribute } 715 * @syscap SystemCapability.ArkUI.ArkUI.Full 716 * @crossplatform 717 * @since 10 718 */ 719 navBarPosition(value: NavBarPosition): NavigationAttribute; 720 721 /** 722 * Sets the minimum width and the maximum width of navigation bar. 723 * 724 * @param { [Dimension, Dimension] } value - The minimum and the maximum width of navigation bar. 725 * @returns { NavigationAttribute } 726 * @syscap SystemCapability.ArkUI.ArkUI.Full 727 * @crossplatform 728 * @since 10 729 */ 730 navBarWidthRange(value: [Dimension, Dimension]): NavigationAttribute; 731 732 /** 733 * Sets the minimum width of content. 734 * 735 * @param { Dimension } value - The minimum width of content. 736 * @returns { NavigationAttribute } 737 * @syscap SystemCapability.ArkUI.ArkUI.Full 738 * @crossplatform 739 * @since 10 740 */ 741 minContentWidth(value: Dimension): NavigationAttribute; 742 743 /** 744 * Sets the mode of navigation. 745 * 746 * @param { NavigationMode } value 747 * @returns { NavigationAttribute } 748 * @syscap SystemCapability.ArkUI.ArkUI.Full 749 * @since 9 750 */ 751 /** 752 * Sets the mode of navigation. 753 * 754 * @param { NavigationMode } value 755 * @returns { NavigationAttribute } 756 * @syscap SystemCapability.ArkUI.ArkUI.Full 757 * @crossplatform 758 * @since 10 759 */ 760 mode(value: NavigationMode): NavigationAttribute; 761 762 /** 763 * Sets the back button icon. 764 * 765 * @param { string | PixelMap | Resource } value 766 * @returns { NavigationAttribute } 767 * @syscap SystemCapability.ArkUI.ArkUI.Full 768 * @since 9 769 */ 770 /** 771 * Sets the back button icon. 772 * 773 * @param { string | PixelMap | Resource } value 774 * @returns { NavigationAttribute } 775 * @syscap SystemCapability.ArkUI.ArkUI.Full 776 * @crossplatform 777 * @since 10 778 */ 779 backButtonIcon(value: string | PixelMap | Resource): NavigationAttribute; 780 781 /** 782 * Hide the navigation bar. 783 * 784 * @param { boolean } value 785 * @returns { NavigationAttribute } 786 * @syscap SystemCapability.ArkUI.ArkUI.Full 787 * @since 9 788 */ 789 /** 790 * Hide the navigation bar. 791 * 792 * @param { boolean } value 793 * @returns { NavigationAttribute } 794 * @syscap SystemCapability.ArkUI.ArkUI.Full 795 * @crossplatform 796 * @since 10 797 */ 798 hideNavBar(value: boolean): NavigationAttribute; 799 800 /** 801 * Navigation title 802 * 803 * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value 804 * @returns { NavigationAttribute } 805 * @syscap SystemCapability.ArkUI.ArkUI.Full 806 * @since 8 807 */ 808 /** 809 * Navigation title 810 * 811 * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value 812 * @returns { NavigationAttribute } 813 * @syscap SystemCapability.ArkUI.ArkUI.Full 814 * @since 9 815 */ 816 /** 817 * Navigation title 818 * 819 * @param { ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle } value 820 * @returns { NavigationAttribute } 821 * @syscap SystemCapability.ArkUI.ArkUI.Full 822 * @crossplatform 823 * @since 10 824 */ 825 title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle): NavigationAttribute; 826 827 /** 828 * Navigation subtitle 829 * 830 * @param { string } value 831 * @returns { NavigationAttribute } 832 * @syscap SystemCapability.ArkUI.ArkUI.Full 833 * @since 8 834 * @deprecated since 9 835 * @useinstead title 836 */ 837 subTitle(value: string): NavigationAttribute; 838 839 /** 840 * Hide navigation title bar 841 * 842 * @param { boolean } value 843 * @returns { NavigationAttribute } 844 * @syscap SystemCapability.ArkUI.ArkUI.Full 845 * @since 8 846 */ 847 /** 848 * Hide navigation title bar 849 * 850 * @param { boolean } value 851 * @returns { NavigationAttribute } 852 * @syscap SystemCapability.ArkUI.ArkUI.Full 853 * @crossplatform 854 * @since 10 855 */ 856 hideTitleBar(value: boolean): NavigationAttribute; 857 858 /** 859 * Hide navigation back button 860 * 861 * @param { boolean } value 862 * @returns { NavigationAttribute } 863 * @syscap SystemCapability.ArkUI.ArkUI.Full 864 * @since 8 865 */ 866 /** 867 * Hide navigation back button 868 * 869 * @param { boolean } value 870 * @returns { NavigationAttribute } 871 * @syscap SystemCapability.ArkUI.ArkUI.Full 872 * @crossplatform 873 * @since 10 874 */ 875 hideBackButton(value: boolean): NavigationAttribute; 876 877 /** 878 * Navigation title mode 879 * 880 * @param { NavigationTitleMode } value 881 * @returns { NavigationAttribute } 882 * @syscap SystemCapability.ArkUI.ArkUI.Full 883 * @since 8 884 */ 885 /** 886 * Navigation title mode 887 * 888 * @param { NavigationTitleMode } value 889 * @returns { NavigationAttribute } 890 * @syscap SystemCapability.ArkUI.ArkUI.Full 891 * @crossplatform 892 * @since 10 893 */ 894 titleMode(value: NavigationTitleMode): NavigationAttribute; 895 896 /** 897 * Navigation title bar's menus 898 * 899 * @param { Array<NavigationMenuItem> | CustomBuilder } value 900 * @returns { NavigationAttribute } 901 * @syscap SystemCapability.ArkUI.ArkUI.Full 902 * @since 8 903 */ 904 /** 905 * Navigation title bar's menus 906 * 907 * @param { Array<NavigationMenuItem> | CustomBuilder } value 908 * @returns { NavigationAttribute } 909 * @syscap SystemCapability.ArkUI.ArkUI.Full 910 * @crossplatform 911 * @since 10 912 */ 913 menus(value: Array<NavigationMenuItem> | CustomBuilder): NavigationAttribute; 914 915 /** 916 * Tool bar 917 * 918 * @param { object | CustomBuilder } value 919 * @returns { NavigationAttribute } 920 * @syscap SystemCapability.ArkUI.ArkUI.Full 921 * @since 8 922 * @deprecated since 10 923 * @useinstead navigation/NavigationAttribute#toolbarConfiguration 924 */ 925 toolBar(value: object | CustomBuilder): NavigationAttribute; 926 927 /** 928 * Configure toolbar with default style parameter or custom parameter. 929 * 930 * @param { Array<ToolbarItem> | CustomBuilder } value - Toolbar configuration parameters. 931 * @returns { NavigationAttribute } 932 * @syscap SystemCapability.ArkUI.ArkUI.Full 933 * @crossplatform 934 * @since 10 935 * @form 936 */ 937 toolbarConfiguration(value: Array<ToolbarItem> | CustomBuilder): NavigationAttribute; 938 939 /** 940 * Hide tool bar 941 * 942 * @param { boolean } value 943 * @returns { NavigationAttribute } 944 * @syscap SystemCapability.ArkUI.ArkUI.Full 945 * @since 8 946 */ 947 /** 948 * Hide tool bar 949 * 950 * @param { boolean } value 951 * @returns { NavigationAttribute } 952 * @syscap SystemCapability.ArkUI.ArkUI.Full 953 * @crossplatform 954 * @since 10 955 */ 956 hideToolBar(value: boolean): NavigationAttribute; 957 958 /** 959 * Trigger callback when title mode change finished at free mode. 960 * 961 * @param { (titleMode: NavigationTitleMode) => void } callback 962 * @returns { NavigationAttribute } 963 * @syscap SystemCapability.ArkUI.ArkUI.Full 964 * @since 8 965 */ 966 /** 967 * Trigger callback when title mode change finished at free mode. 968 * 969 * @param { function } callback 970 * @returns { NavigationAttribute } 971 * @syscap SystemCapability.ArkUI.ArkUI.Full 972 * @crossplatform 973 * @since 10 974 */ 975 onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; 976 977 /** 978 * Trigger callback when the visibility of navigation bar change. 979 * 980 * @param { (isVisible: boolean) => void } callback 981 * @returns { NavigationAttribute } 982 * @syscap SystemCapability.ArkUI.ArkUI.Full 983 * @since 9 984 */ 985 /** 986 * Trigger callback when the visibility of navigation bar change. 987 * 988 * @param { function } callback 989 * @returns { NavigationAttribute } 990 * @syscap SystemCapability.ArkUI.ArkUI.Full 991 * @crossplatform 992 * @since 10 993 */ 994 onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; 995 996 /** 997 * Set builder for user-defined NavDestination component. 998 * 999 * @param { function } builder - The builder function of NavDestination component. 1000 * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. 1001 * @syscap SystemCapability.ArkUI.ArkUI.Full 1002 * @crossplatform 1003 * @since 10 1004 */ 1005 navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute; 1006} 1007 1008/** 1009 * Defines Navigation Component. 1010 * 1011 * @syscap SystemCapability.ArkUI.ArkUI.Full 1012 * @since 8 1013 */ 1014/** 1015 * Defines Navigation Component. 1016 * 1017 * @syscap SystemCapability.ArkUI.ArkUI.Full 1018 * @crossplatform 1019 * @since 10 1020 */ 1021declare const Navigation: NavigationInterface; 1022 1023/** 1024 * Defines Navigation Component instance. 1025 * 1026 * @syscap SystemCapability.ArkUI.ArkUI.Full 1027 * @since 8 1028 */ 1029/** 1030 * Defines Navigation Component instance. 1031 * 1032 * @syscap SystemCapability.ArkUI.ArkUI.Full 1033 * @crossplatform 1034 * @since 10 1035 */ 1036declare const NavigationInstance: NavigationAttribute; 1037