interface.uts 24.2 KB
Newer Older
DCloud-yyl's avatar
DCloud-yyl 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919
export type SetTabBarBadgeSuccess = AsyncApiSuccessResult
export type SetTabBarBadgeSuccessCallback = (
    result: SetTabBarBadgeSuccess,
) => void
/**
 * 错误码
 * - 100: TabBar 不存在
 * - 200: 参数错误
 */
export type SetTabBarErrorCode = 100 | 200
export interface SetTabBarFail extends IUniError {
    errCode: SetTabBarErrorCode
}
export type SetTabBarBadgeFail = SetTabBarFail
export type SetTabBarBadgeFailCallback = (result: SetTabBarBadgeFail) => void
export type SetTabBarBadgeComplete = AsyncApiResult
export type SetTabBarBadgeCompleteCallback = (
    result: SetTabBarBadgeComplete,
) => void
export type SetTabBarBadgeOptions = {
    /**
     * tabBar的哪一项,从左边算起,索引从0开始
     */
    index: number
    /**
     * 显示的文本,不超过 3 个半角字符
     */
    text: string
    /**
     * 接口调用成功的回调函数
     */
    success?: SetTabBarBadgeSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: SetTabBarBadgeFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: SetTabBarBadgeCompleteCallback
}

export type RemoveTabBarBadgeSuccess = AsyncApiSuccessResult
export type RemoveTabBarBadgeSuccessCallback = (
    result: RemoveTabBarBadgeSuccess,
) => void
export type RemoveTabBarBadgeFail = SetTabBarFail
export type RemoveTabBarBadgeFailCallback = (
    result: RemoveTabBarBadgeFail,
) => void
export type RemoveTabBarBadgeComplete = AsyncApiResult
export type RemoveTabBarBadgeCompleteCallback = (
    result: RemoveTabBarBadgeComplete,
) => void
export type RemoveTabBarBadgeOptions = {
    /**
     * tabBar的哪一项,从左边算起,索引从0开始
     */
    index: number
    /**
     * 接口调用成功的回调函数
     */
    success?: RemoveTabBarBadgeSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: RemoveTabBarBadgeFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: RemoveTabBarBadgeCompleteCallback
}

export type SetTabBarItemSuccess = AsyncApiSuccessResult
export type SetTabBarItemSuccessCallback = (
    result: SetTabBarItemSuccess,
) => void
export type SetTabBarItemFail = SetTabBarFail
export type SetTabBarItemFailCallback = (result: SetTabBarItemFail) => void
export type SetTabBarItemComplete = AsyncApiResult
export type SetTabBarItemCompleteCallback = (
    result: SetTabBarItemComplete,
) => void
export type SetTabBarItemIconFontOptions = {
    /**
     * 字库 Unicode 码
     */
    text: string
    /**
     * 选中后字库 Unicode 码
     */
    selectedText: string
    /**
     * 字体图标字号(px)
     */
    fontSize?: string
    /**
     * 字体图标颜色
     */
    color?: string
    /**
     * 字体图标选中颜色
     */
    selectedColor?: string
}
export type SetTabBarItemOptions = {
    /**
     * tabBar 的哪一项,从左边算起,索引从0开始
     */
    index: number
    /**
     * tab 上按钮文字
     */
    text?: string
    /**
     * 图片路径
     */
    iconPath?: string
    /**
     * 选中时的图片路径
     */
    selectedIconPath?: string
    /**
     * 页面绝对路径
     */
    pagePath?: string
    /**
     * 字体图标,优先级高于 iconPath
     */
    iconfont?: SetTabBarItemIconFontOptions
    /**
     * tab 是否显示
     */
    visible?: boolean
    /**
     * 接口调用成功的回调函数
     */
    success?: SetTabBarItemSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: SetTabBarItemFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: SetTabBarItemCompleteCallback
}

export type MidButtonIconFont = {
    /**
     * 字库 Unicode 码
     */
    text?: string
    /**
     * 选中后字库 Unicode 码
     */
    selectedText?: string
    /**
     * 字体图标字号(px)
     */
    fontSize?: string
    /**
     * 字体图标颜色
     */
    color?: string
    /**
     * 字体图标选中颜色
     */
    selectedColor?: string
}

export type MidButtonOptions = {
    /**
     * 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度。默认 80px
     */
    width?: string
    /**
     * 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果。默认 50px
     */
    height?: string
    /**
     * 中间按钮的文字
     */
    text?: string
    /**
     * 中间按钮的图片路径
     */
    iconPath?: string
    /**
     * 图片宽度(高度等比例缩放)。默认 24px
     */
    iconWidth?: string
    /**
     * 中间按钮的背景图片路径
     */
    backgroundImage?: string
    /**
     * 字体图标,优先级高于 iconPath
     */
    iconfont?: MidButtonIconFont
}

export type SetTabBarStyleSuccess = AsyncApiSuccessResult
export type SetTabBarStyleSuccessCallback = (
    result: SetTabBarStyleSuccess,
) => void
export type SetTabBarStyleFail = SetTabBarFail
export type SetTabBarStyleFailCallback = (result: SetTabBarStyleFail) => void
export type SetTabBarStyleComplete = AsyncApiResult
export type SetTabBarStyleCompleteCallback = (
    result: SetTabBarStyleComplete,
) => void
export type SetTabBarStyleOptions = {
    /**
     * tab 上的文字默认颜色
     */
    color?: string | string.ColorString
    /**
     * tab 上的文字选中时的颜色
     */
    selectedColor?: string | string.ColorString
    /**
     * tab 的背景色
     */
    backgroundColor?: string | string.ColorString
    /**
     * 图片背景
     */
    backgroundImage?: string
    /**
     * 背景图平铺方式
     * - repeat: 背景图片在垂直方向和水平方向平铺
     * - repeat-x: 背景图片在水平方向平铺,垂直方向拉伸
     * - repeat-y: 背景图片在垂直方向平铺,水平方向拉伸
     * - no-repeat: 背景图片在垂直方向和水平方向都拉伸
     */
    backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
    /**
     * tabbar上边框的颜色
     */
    borderStyle?: string
    /**
     * tabbar 中间按钮 仅在 list 项为偶数时有效
     * @internal
     */
    midButton?: MidButtonOptions
    /**
     * 接口调用成功的回调函数
     */
    success?: SetTabBarStyleSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: SetTabBarStyleFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: SetTabBarStyleCompleteCallback
}

export type HideTabBarSuccess = AsyncApiSuccessResult
export type HideTabBarSuccessCallback = (result: HideTabBarSuccess) => void
export type HideTabBarFail = SetTabBarFail
export type HideTabBarFailCallback = (result: HideTabBarFail) => void
export type HideTabBarComplete = AsyncApiResult
export type HideTabBarCompleteCallback = (result: HideTabBarComplete) => void
export type HideTabBarOptions = {
    /**
     * 是否需要动画效果
     */
    animation?: boolean
    /**
     * 接口调用成功的回调函数
     */
    success?: HideTabBarSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: HideTabBarFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: HideTabBarCompleteCallback
}

export type ShowTabBarSuccess = AsyncApiSuccessResult
export type ShowTabBarSuccessCallback = (result: ShowTabBarSuccess) => void
export type ShowTabBarFail = SetTabBarFail
export type ShowTabBarFailCallback = (result: ShowTabBarFail) => void
export type ShowTabBarComplete = AsyncApiResult
export type ShowTabBarCompleteCallback = (result: ShowTabBarComplete) => void
export type ShowTabBarOptions = {
    /**
     * 是否需要动画效果
     */
    animation?: boolean
    /**
     * 接口调用成功的回调函数
     */
    success?: ShowTabBarSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: ShowTabBarFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: ShowTabBarCompleteCallback
}

export type ShowTabBarRedDotSuccess = AsyncApiSuccessResult
export type ShowTabBarRedDotSuccessCallback = (
    result: ShowTabBarRedDotSuccess,
) => void
export type ShowTabBarRedDotFail = SetTabBarFail
export type ShowTabBarRedDotFailCallback = (
    result: ShowTabBarRedDotFail,
) => void
export type ShowTabBarRedDotComplete = AsyncApiResult
export type ShowTabBarRedDotCompleteCallback = (
    result: ShowTabBarRedDotComplete,
) => void
export type ShowTabBarRedDotOptions = {
    /**
     * tabBar的哪一项,从左边算起,索引从0开始
     */
    index: number
    /**
     * 接口调用成功的回调函数
     */
    success?: ShowTabBarRedDotSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: ShowTabBarRedDotFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: ShowTabBarRedDotCompleteCallback
}

export type HideTabBarRedDotSuccess = AsyncApiSuccessResult
export type HideTabBarRedDotSuccessCallback = (
    result: HideTabBarRedDotSuccess,
) => void
export type HideTabBarRedDotFail = SetTabBarFail
export type HideTabBarRedDotFailCallback = (
    result: HideTabBarRedDotFail,
) => void
export type HideTabBarRedDotComplete = AsyncApiResult
export type HideTabBarRedDotCompleteCallback = (
    result: HideTabBarRedDotComplete,
) => void
export type HideTabBarRedDotOptions = {
    /**
     * tabBar的哪一项,从左边算起,索引从0开始
     */
    index: number
    /**
     * 接口调用成功的回调函数
     */
    success?: HideTabBarRedDotSuccessCallback
    /**
     * 接口调用失败的回调函数
     */
    fail?: HideTabBarRedDotFailCallback
    /**
     * 接口调用结束的回调函数(调用成功、失败都会执行)
     */
    complete?: HideTabBarRedDotCompleteCallback
}

export type OnTabBarMidButtonTapCallback = () => void

export interface Uni {
    /**
     * 为 tabBar 某一项的右上角添加文本
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbarbadge
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    setTabBarBadge(
        options: SetTabBarBadgeOptions,
    ): Promise<SetTabBarBadgeSuccess> | null
    /**
     * 移除 tabBar 某一项右上角的文本
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#removetabbarbadge
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    removeTabBarBadge(
        options: RemoveTabBarBadgeOptions,
    ): Promise<RemoveTabBarBadgeSuccess> | null
    /**
     * 动态设置 tabBar 某一项的内容
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbaritem
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    setTabBarItem(
        options: SetTabBarItemOptions,
    ): Promise<SetTabBarItemSuccess> | null
    /**
     * 动态设置 tabBar 的整体样式
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbarstyle
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    setTabBarStyle(
        options: SetTabBarStyleOptions,
    ): Promise<SetTabBarStyleSuccess> | null
    /**
     * 隐藏 tabBar
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#hidetabbar
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    hideTabBar(
        options?: HideTabBarOptions | null,
    ): Promise<HideTabBarSuccess> | null
    /**
     * 显示 tabBar
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#showtabbar
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    showTabBar(
        options?: ShowTabBarOptions | null,
    ): Promise<ShowTabBarSuccess> | null
    /**
     * 显示 tabBar 某一项的右上角的红点
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#showtabbarreddot
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    showTabBarRedDot(
        options: ShowTabBarRedDotOptions,
    ): Promise<ShowTabBarRedDotSuccess> | null
    /**
     * 隐藏 tabBar 某一项的右上角的红点
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#hidetabbarreddot
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "4.11"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    hideTabBarRedDot(
        options: HideTabBarRedDotOptions,
    ): Promise<HideTabBarRedDotSuccess> | null
DCloud-yyl's avatar
DCloud-yyl 已提交
920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985
    /**
     * 监听中间按钮的点击事件
     *
     * @tutorial https://doc.dcloud.net.cn/uni-app-x/tabbar?id=ontabbarmidbuttontap
     * @uniPlatform {
     *  "app": {
     *    "android": {
     *      "osVer": "5.0",
     *      "uniVer": "√",
     *      "unixVer": "3.91"
     *    },
     *    "ios": {
     *      "osVer": "12.0",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    }
     *  },
     *  "mp": {
     *    "weixin": {
     *      "hostVer": "x",
     *      "uniVer": "x",
     *      "unixVer": "x"
     *    },
     *    "alipay": {
     *      "hostVer": "x",
     *      "uniVer": "x",
     *      "unixVer": "x"
     *    },
     *    "baidu": {
     *      "hostVer": "x",
     *      "uniVer": "x",
     *      "unixVer": "x"
     *    },
     *    "toutiao": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "lark": {
     *      "hostVer": "x",
     *      "uniVer": "x",
     *      "unixVer": "x"
     *    },
     *    "qq": {
     *      "hostVer": "√",
     *      "uniVer": "√",
     *      "unixVer": "x"
     *    },
     *    "kuaishou": {
     *      "hostVer": "x",
     *      "uniVer": "x",
     *      "unixVer": "x"
     *    },
     *    "jd": {
     *      "hostVer": "x",
     *      "uniVer": "x",
     *      "unixVer": "x"
     *    }
     *  },
     *  "web": {
     *    "uniVer": "√",
     *    "unixVer": "4.0"
     *  }
     * }
     */
    onTabBarMidButtonTap(options: OnTabBarMidButtonTapCallback): void
DCloud-yyl's avatar
DCloud-yyl 已提交
986
}