@dcloudio/uni-app-x 0.7.7 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +1 -1
  3. package/options.d.ts +9 -9
  4. package/package.json +27 -27
  5. package/types/app.d.ts +843 -843
  6. package/types/index.d.ts +7 -7
  7. package/types/native/AsyncApiResult.d.ts +7 -7
  8. package/types/native/CSSStyleDeclaration.d.ts +25 -25
  9. package/types/native/DOMRect.d.ts +56 -56
  10. package/types/native/DrawableContext.d.ts +162 -162
  11. package/types/native/INavigationBar.d.ts +22 -22
  12. package/types/native/IUniElement.d.ts +777 -755
  13. package/types/native/IUniError.d.ts +20 -20
  14. package/types/native/IUniForm.d.ts +9 -9
  15. package/types/native/NativeLoadFontFaceOptions.d.ts +11 -11
  16. package/types/native/NodeData.d.ts +22 -22
  17. package/types/native/PageNode.d.ts +6 -6
  18. package/types/native/SnapshotOptions.d.ts +63 -63
  19. package/types/native/SourceError.d.ts +46 -46
  20. package/types/native/UTSAndroidHookProxy.d.ts +14 -14
  21. package/types/native/UniAggregateError.d.ts +19 -19
  22. package/types/native/UniApp.d.ts +66 -66
  23. package/types/native/UniCallbackWrapper.d.ts +7 -7
  24. package/types/native/UniCustomEvent.d.ts +24 -24
  25. package/types/native/UniDocument.d.ts +35 -35
  26. package/types/native/UniElement.d.ts +74 -74
  27. package/types/native/UniError.d.ts +70 -70
  28. package/types/native/UniEvent.d.ts +62 -62
  29. package/types/native/UniFormControl.d.ts +8 -8
  30. package/types/native/UniFormControlElement.d.ts +14 -14
  31. package/types/native/UniImageErrorEvent.d.ts +33 -15
  32. package/types/native/UniImageLoadEvent.d.ts +37 -19
  33. package/types/native/UniInputBlurEvent.d.ts +37 -20
  34. package/types/native/UniInputConfirmEvent.d.ts +31 -16
  35. package/types/native/UniInputEvent.d.ts +38 -24
  36. package/types/native/UniInputFocusEvent.d.ts +48 -33
  37. package/types/native/UniInputKeyboardHeightChangeEvent.d.ts +26 -11
  38. package/types/native/{UniPage.d.ts → UniNativePage.d.ts} +153 -96
  39. package/types/native/UniPageEvent.d.ts +10 -10
  40. package/types/native/UniPageManager.d.ts +17 -17
  41. package/types/native/UniPageScrollEvent.d.ts +13 -13
  42. package/types/native/UniPointerEvent.d.ts +74 -73
  43. package/types/native/UniRefresherEvent.d.ts +18 -14
  44. package/types/native/UniResizeEvent.d.ts +34 -34
  45. package/types/native/UniRichTextItemClickEvent.d.ts +41 -23
  46. package/types/native/UniScrollEvent.d.ts +42 -36
  47. package/types/native/UniScrollToLowerEvent.d.ts +23 -16
  48. package/types/native/UniScrollToUpperEvent.d.ts +23 -16
  49. package/types/native/UniStartNestedScrollEvent.d.ts +33 -33
  50. package/types/native/UniStopNestedScrollEvent.d.ts +28 -28
  51. package/types/native/UniSwiperAnimationFinishEvent.d.ts +22 -20
  52. package/types/native/UniSwiperChangeEvent.d.ts +22 -20
  53. package/types/native/UniSwiperTransitionEvent.d.ts +24 -20
  54. package/types/native/UniTabTapEvent.d.ts +18 -18
  55. package/types/native/UniTabsElement.d.ts +29 -29
  56. package/types/native/UniTextElement.d.ts +17 -17
  57. package/types/native/UniTextareaBlurEvent.d.ts +26 -11
  58. package/types/native/UniTextareaFocusEvent.d.ts +49 -34
  59. package/types/native/UniTextareaLineChangeEvent.d.ts +30 -15
  60. package/types/native/UniTouchEvent.d.ts +64 -60
  61. package/types/native/UniVideoElement.d.ts +70 -70
  62. package/types/native/UniWebViewDownloadEvent.d.ts +52 -42
  63. package/types/native/UniWebViewElement.d.ts +10 -10
  64. package/types/native/UniWebViewErrorEvent.d.ts +47 -37
  65. package/types/native/UniWebViewLoadEvent.d.ts +36 -26
  66. package/types/native/UniWebViewLoadingEvent.d.ts +36 -27
  67. package/types/native/UniWebViewMessageEvent.d.ts +36 -26
  68. package/types/native/UniWebViewServiceMessageEvent.d.ts +8 -8
  69. package/types/native/ViewToTempFilePathOptions.d.ts +47 -47
  70. package/types/native/WebViewStyles.d.ts +20 -20
  71. package/types/native/global.d.ts +519 -429
  72. package/types/native/index.d.ts +65 -65
  73. package/types/native-global/index.d.ts +1 -1
  74. package/types/page.d.ts +1593 -1593
  75. package/types/process.d.ts +5 -5
  76. package/types/uni/base/index.d.ts +3 -3
  77. package/types/uni/core/global.d.ts +13 -13
  78. package/types/uni/core/index.d.ts +13 -13
  79. package/types/uni/core/lib/base/event/global.d.ts +16 -16
  80. package/types/uni/core/lib/base/event/index.d.ts +7 -7
  81. package/types/uni/core/lib/base/event/interface.d.ts +277 -277
  82. package/types/uni/core/lib/base/interceptor/global.d.ts +18 -18
  83. package/types/uni/core/lib/base/interceptor/index.d.ts +8 -8
  84. package/types/uni/core/lib/base/interceptor/interface.d.ts +150 -150
  85. package/types/uni/core/lib/interface.d.ts +28 -28
  86. package/types/uni/core/lib/lifecycle/global.d.ts +10 -10
  87. package/types/uni/core/lib/lifecycle/index.d.ts +4 -4
  88. package/types/uni/core/lib/lifecycle/interface.d.ts +37 -37
  89. package/types/uni/core/lib/performance/global.d.ts +22 -22
  90. package/types/uni/core/lib/performance/index.d.ts +10 -10
  91. package/types/uni/core/lib/performance/interface.d.ts +157 -157
  92. package/types/uni/core/lib/route/global.d.ts +68 -68
  93. package/types/uni/core/lib/route/index.d.ts +33 -33
  94. package/types/uni/core/lib/route/interface.d.ts +2031 -2031
  95. package/types/uni/core/lib/ui/create-selector-query/global.d.ts +20 -20
  96. package/types/uni/core/lib/ui/create-selector-query/index.d.ts +9 -9
  97. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +412 -412
  98. package/types/uni/core/lib/ui/get-element-by-id/global.d.ts +10 -10
  99. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +4 -4
  100. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +73 -73
  101. package/types/uni/core/lib/ui/load-font-face/global.d.ts +26 -26
  102. package/types/uni/core/lib/ui/load-font-face/index.d.ts +12 -12
  103. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +560 -560
  104. package/types/uni/core/lib/ui/page-scroll-to/global.d.ts +26 -26
  105. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +12 -12
  106. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +145 -145
  107. package/types/uni/core/lib/ui/pull-down-refresh/global.d.ts +28 -28
  108. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +13 -13
  109. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +176 -176
  110. package/types/uni/core/lib/ui/set-navigation-bar-color/global.d.ts +28 -28
  111. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +13 -13
  112. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +431 -431
  113. package/types/uni/core/lib/ui/set-navigation-bar-title/global.d.ts +28 -28
  114. package/types/uni/core/lib/ui/set-navigation-bar-title/index.d.ts +13 -13
  115. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +368 -368
  116. package/types/uni/core/lib/ui/tab-bar/global.d.ts +130 -130
  117. package/types/uni/core/lib/ui/tab-bar/index.d.ts +64 -64
  118. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +928 -928
  119. package/types/uni/env/index.d.ts +64 -64
  120. package/types/uni/global.d.ts +6 -6
  121. package/types/uni/index.d.ts +3 -3
  122. package/types/uni/uts-plugin-api/global.d.ts +23 -22
  123. package/types/uni/uts-plugin-api/index.d.ts +23 -22
  124. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/global.d.ts +18 -18
  125. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/index.d.ts +8 -8
  126. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +43 -43
  127. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/global.d.ts +12 -12
  128. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +5 -5
  129. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +99 -101
  130. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/global.d.ts +26 -26
  131. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/index.d.ts +12 -12
  132. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +82 -82
  133. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +66 -66
  134. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +32 -32
  135. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +423 -423
  136. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/global.d.ts +10 -10
  137. package/types/uni/uts-plugin-api/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +4 -4
  138. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/global.d.ts +12 -12
  139. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +5 -5
  140. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/global.d.ts +14 -14
  141. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/index.d.ts +6 -6
  142. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +350 -350
  143. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/global.d.ts +14 -14
  144. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/index.d.ts +6 -6
  145. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/global.d.ts +20 -20
  146. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/index.d.ts +9 -9
  147. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +151 -151
  148. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/global.d.ts +24 -24
  149. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/index.d.ts +11 -11
  150. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/global.d.ts +24 -0
  151. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/index.d.ts +11 -0
  152. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +88 -0
  153. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/global.d.ts +30 -30
  154. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/index.d.ts +14 -14
  155. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/global.d.ts +12 -12
  156. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/index.d.ts +5 -5
  157. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/global.d.ts +24 -24
  158. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/index.d.ts +11 -11
  159. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +158 -158
  160. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +78 -78
  161. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +906 -906
  162. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +68 -68
  163. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +33 -33
  164. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts +72 -72
  165. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/index.d.ts +35 -35
  166. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/global.d.ts +24 -24
  167. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +11 -11
  168. package/types/uni/uts-plugin-api/lib/{uni-requestPayment-alipay → uni-payment}/utssdk/global.d.ts +30 -28
  169. package/types/uni/uts-plugin-api/lib/{uni-requestPayment-alipay → uni-payment}/utssdk/index.d.ts +14 -13
  170. package/types/uni/uts-plugin-api/lib/{uni-requestPayment-alipay → uni-payment}/utssdk/interface.d.ts +6 -3
  171. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts +74 -62
  172. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/index.d.ts +36 -30
  173. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +46 -14
  174. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/global.d.ts +10 -10
  175. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/index.d.ts +4 -4
  176. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +33 -33
  177. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts +78 -78
  178. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/index.d.ts +38 -38
  179. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +531 -531
  180. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/global.d.ts +58 -58
  181. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/index.d.ts +28 -28
  182. package/types/uni/uts-plugin-biz/global.d.ts +4 -4
  183. package/types/uni/uts-plugin-biz/index.d.ts +4 -4
  184. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +36 -36
  185. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +17 -17
  186. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +132 -132
  187. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/global.d.ts +28 -28
  188. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/index.d.ts +13 -13
  189. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +141 -141
  190. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/global.d.ts +56 -56
  191. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/index.d.ts +27 -27
  192. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +46 -46
  193. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +22 -22
  194. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +203 -203
  195. package/types/uni/uts-plugin-component/global.d.ts +1 -1
  196. package/types/uni/uts-plugin-component/index.d.ts +1 -1
  197. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +64 -64
  198. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +31 -31
  199. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +354 -356
  200. package/types/uni-cloud/index.d.ts +59 -59
  201. package/types/uni-cloud/interface.d.ts +801 -801
  202. package/types/uni-cloud/unicloud-db/index.ts +313 -313
  203. package/types/uni-global/index.d.ts +1 -1
  204. package/types/vue/CheckboxGroupChangeEvent.d.ts +36 -36
  205. package/types/vue/LifeCycle.d.ts +55 -55
  206. package/types/vue/PickerViewChangeEvent.d.ts +36 -36
  207. package/types/vue/ProgressActiveendEvent.d.ts +30 -30
  208. package/types/vue/RadioGroupChangeEvent.d.ts +36 -36
  209. package/types/vue/SliderChangeEvent.d.ts +32 -32
  210. package/types/vue/SwitchChangeEvent.d.ts +30 -30
  211. package/types/vue/UniCanvasElement.d.ts +270 -270
  212. package/types/vue/UniCloudDBElement.d.ts +215 -215
  213. package/types/vue/UniFormElement.d.ts +51 -51
  214. package/types/vue/UniNavigatorElement.d.ts +7 -7
  215. package/types/vue/index.d.ts +11 -11
  216. package/uts-plugin.d.ts +26 -26
  217. package/types/uni-cloud/unicloud-db/index.d.ts +0 -81
  218. package/types/vue/UniButtonElement.d.ts +0 -7
@@ -1,928 +1,928 @@
1
- import { AsyncApiSuccessResult } from '../../interface'
2
-
3
- export type SetTabBarBadgeSuccess = AsyncApiSuccessResult
4
- export type SetTabBarBadgeSuccessCallback = (
5
- result: SetTabBarBadgeSuccess
6
- ) => void
7
- /**
8
- * 错误码
9
- * - 100: TabBar 不存在
10
- * - 200: 参数错误
11
- */
12
- export type SetTabBarErrCode = 100 | 200
13
- export abstract class SetTabBarError extends UniError {
14
- abstract override errCode: SetTabBarErrCode
15
- }
16
- export type SetTabBarBadgeFail = SetTabBarError
17
- export type SetTabBarBadgeFailCallback = (result: SetTabBarError) => void
18
- export type SetTabBarBadgeComplete = AsyncApiResult
19
- export type SetTabBarBadgeCompleteCallback = (
20
- result: SetTabBarBadgeComplete
21
- ) => void
22
- export type SetTabBarBadgeOptions = {
23
- /**
24
- * tabBar的哪一项,从左边算起,索引从0开始
25
- */
26
- index: number
27
- /**
28
- * 显示的文本,不超过 3 个半角字符
29
- */
30
- text: string
31
- /**
32
- * 接口调用成功的回调函数
33
- */
34
- success?: SetTabBarBadgeSuccessCallback
35
- /**
36
- * 接口调用失败的回调函数
37
- */
38
- fail?: SetTabBarBadgeFailCallback
39
- /**
40
- * 接口调用结束的回调函数(调用成功、失败都会执行)
41
- */
42
- complete?: SetTabBarBadgeCompleteCallback
43
- }
44
-
45
- export type RemoveTabBarBadgeSuccess = AsyncApiSuccessResult
46
- export type RemoveTabBarBadgeSuccessCallback = (
47
- result: RemoveTabBarBadgeSuccess
48
- ) => void
49
- export type RemoveTabBarBadgeFail = SetTabBarError
50
- export type RemoveTabBarBadgeFailCallback = (
51
- result: RemoveTabBarBadgeFail
52
- ) => void
53
- export type RemoveTabBarBadgeComplete = AsyncApiResult
54
- export type RemoveTabBarBadgeCompleteCallback = (
55
- result: RemoveTabBarBadgeComplete
56
- ) => void
57
- export type RemoveTabBarBadgeOptions = {
58
- /**
59
- * tabBar的哪一项,从左边算起,索引从0开始
60
- */
61
- index: number
62
- /**
63
- * 接口调用成功的回调函数
64
- */
65
- success?: RemoveTabBarBadgeSuccessCallback
66
- /**
67
- * 接口调用失败的回调函数
68
- */
69
- fail?: RemoveTabBarBadgeFailCallback
70
- /**
71
- * 接口调用结束的回调函数(调用成功、失败都会执行)
72
- */
73
- complete?: RemoveTabBarBadgeCompleteCallback
74
- }
75
-
76
- export type SetTabBarItemSuccess = AsyncApiSuccessResult
77
- export type SetTabBarItemSuccessCallback = (
78
- result: SetTabBarItemSuccess
79
- ) => void
80
- export type SetTabBarItemFail = SetTabBarError
81
- export type SetTabBarItemFailCallback = (result: SetTabBarItemFail) => void
82
- export type SetTabBarItemComplete = AsyncApiResult
83
- export type SetTabBarItemCompleteCallback = (
84
- result: SetTabBarItemComplete
85
- ) => void
86
- export type SetTabBarItemIconFontOptions = {
87
- /**
88
- * 字库 Unicode 码
89
- */
90
- text: string
91
- /**
92
- * 选中后字库 Unicode 码
93
- */
94
- selectedText: string
95
- /**
96
- * 字体图标字号(px)
97
- */
98
- fontSize?: string
99
- /**
100
- * 字体图标颜色
101
- */
102
- color?: string
103
- /**
104
- * 字体图标选中颜色
105
- */
106
- selectedColor?: string
107
- }
108
- export type SetTabBarItemOptions = {
109
- /**
110
- * tabBar 的哪一项,从左边算起,索引从0开始
111
- */
112
- index: number
113
- /**
114
- * tab 上按钮文字
115
- */
116
- text?: string
117
- /**
118
- * 图片路径
119
- */
120
- iconPath?: string
121
- /**
122
- * 选中时的图片路径
123
- */
124
- selectedIconPath?: string
125
- /**
126
- * 页面绝对路径
127
- */
128
- pagePath?: string
129
- /**
130
- * 字体图标,优先级高于 iconPath
131
- */
132
- iconfont?: SetTabBarItemIconFontOptions
133
- /**
134
- * tab 是否显示
135
- */
136
- visible?: boolean
137
- /**
138
- * 接口调用成功的回调函数
139
- */
140
- success?: SetTabBarItemSuccessCallback
141
- /**
142
- * 接口调用失败的回调函数
143
- */
144
- fail?: SetTabBarItemFailCallback
145
- /**
146
- * 接口调用结束的回调函数(调用成功、失败都会执行)
147
- */
148
- complete?: SetTabBarItemCompleteCallback
149
- }
150
-
151
- export type MidButtonIconFont = {
152
- /**
153
- * 字库 Unicode 码
154
- */
155
- text?: string
156
- /**
157
- * 选中后字库 Unicode 码
158
- */
159
- selectedText?: string
160
- /**
161
- * 字体图标字号(px)
162
- */
163
- fontSize?: string
164
- /**
165
- * 字体图标颜色
166
- */
167
- color?: string
168
- /**
169
- * 字体图标选中颜色
170
- */
171
- selectedColor?: string
172
- }
173
-
174
- export type MidButtonOptions = {
175
- /**
176
- * 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度。默认 80px
177
- */
178
- width?: string
179
- /**
180
- * 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果。默认 50px
181
- */
182
- height?: string
183
- /**
184
- * 中间按钮的文字
185
- */
186
- text?: string
187
- /**
188
- * 中间按钮的图片路径
189
- */
190
- iconPath?: string
191
- /**
192
- * 图片宽度(高度等比例缩放)。默认 24px
193
- */
194
- iconWidth?: string
195
- /**
196
- * 中间按钮的背景图片路径
197
- */
198
- backgroundImage?: string
199
- /**
200
- * 字体图标,优先级高于 iconPath
201
- */
202
- iconfont?: MidButtonIconFont
203
- }
204
-
205
- export type SetTabBarStyleSuccess = AsyncApiSuccessResult
206
- export type SetTabBarStyleSuccessCallback = (
207
- result: SetTabBarStyleSuccess
208
- ) => void
209
- export type SetTabBarStyleFail = SetTabBarError
210
- export type SetTabBarStyleFailCallback = (result: SetTabBarStyleFail) => void
211
- export type SetTabBarStyleComplete = AsyncApiResult
212
- export type SetTabBarStyleCompleteCallback = (
213
- result: SetTabBarStyleComplete
214
- ) => void
215
- export type SetTabBarStyleOptions = {
216
- /**
217
- * tab 上的文字默认颜色
218
- */
219
- color?: string | string.ColorString
220
- /**
221
- * tab 上的文字选中时的颜色
222
- */
223
- selectedColor?: string | string.ColorString
224
- /**
225
- * tab 的背景色
226
- */
227
- backgroundColor?: string | string.ColorString
228
- /**
229
- * 图片背景
230
- */
231
- backgroundImage?: string
232
- /**
233
- * 背景图平铺方式
234
- * - repeat: 背景图片在垂直方向和水平方向平铺
235
- * - repeat-x: 背景图片在水平方向平铺,垂直方向拉伸
236
- * - repeat-y: 背景图片在垂直方向平铺,水平方向拉伸
237
- * - no-repeat: 背景图片在垂直方向和水平方向都拉伸
238
- */
239
- backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
240
- /**
241
- * tabbar上边框的颜色
242
- */
243
- borderStyle?: string
244
- /**
245
- * tabbar 中间按钮 仅在 list 项为偶数时有效
246
- * @internal
247
- */
248
- midButton?: MidButtonOptions
249
- /**
250
- * 接口调用成功的回调函数
251
- */
252
- success?: SetTabBarStyleSuccessCallback
253
- /**
254
- * 接口调用失败的回调函数
255
- */
256
- fail?: SetTabBarStyleFailCallback
257
- /**
258
- * 接口调用结束的回调函数(调用成功、失败都会执行)
259
- */
260
- complete?: SetTabBarStyleCompleteCallback
261
- }
262
-
263
- export type HideTabBarSuccess = AsyncApiSuccessResult
264
- export type HideTabBarSuccessCallback = (result: HideTabBarSuccess) => void
265
- export type HideTabBarFail = SetTabBarError
266
- export type HideTabBarFailCallback = (result: HideTabBarFail) => void
267
- export type HideTabBarComplete = AsyncApiResult
268
- export type HideTabBarCompleteCallback = (result: HideTabBarComplete) => void
269
- export type HideTabBarOptions = {
270
- /**
271
- * 是否需要动画效果
272
- */
273
- animation?: boolean
274
- /**
275
- * 接口调用成功的回调函数
276
- */
277
- success?: HideTabBarSuccessCallback
278
- /**
279
- * 接口调用失败的回调函数
280
- */
281
- fail?: HideTabBarFailCallback
282
- /**
283
- * 接口调用结束的回调函数(调用成功、失败都会执行)
284
- */
285
- complete?: HideTabBarCompleteCallback
286
- }
287
-
288
- export type ShowTabBarSuccess = AsyncApiSuccessResult
289
- export type ShowTabBarSuccessCallback = (result: ShowTabBarSuccess) => void
290
- export type ShowTabBarFail = SetTabBarError
291
- export type ShowTabBarFailCallback = (result: ShowTabBarFail) => void
292
- export type ShowTabBarComplete = AsyncApiResult
293
- export type ShowTabBarCompleteCallback = (result: ShowTabBarComplete) => void
294
- export type ShowTabBarOptions = {
295
- /**
296
- * 是否需要动画效果
297
- */
298
- animation?: boolean
299
- /**
300
- * 接口调用成功的回调函数
301
- */
302
- success?: ShowTabBarSuccessCallback
303
- /**
304
- * 接口调用失败的回调函数
305
- */
306
- fail?: ShowTabBarFailCallback
307
- /**
308
- * 接口调用结束的回调函数(调用成功、失败都会执行)
309
- */
310
- complete?: ShowTabBarCompleteCallback
311
- }
312
-
313
- export type ShowTabBarRedDotSuccess = AsyncApiSuccessResult
314
- export type ShowTabBarRedDotSuccessCallback = (
315
- result: ShowTabBarRedDotSuccess
316
- ) => void
317
- export type ShowTabBarRedDotFail = SetTabBarError
318
- export type ShowTabBarRedDotFailCallback = (
319
- result: ShowTabBarRedDotFail
320
- ) => void
321
- export type ShowTabBarRedDotComplete = AsyncApiResult
322
- export type ShowTabBarRedDotCompleteCallback = (
323
- result: ShowTabBarRedDotComplete
324
- ) => void
325
- export type ShowTabBarRedDotOptions = {
326
- /**
327
- * tabBar的哪一项,从左边算起,索引从0开始
328
- */
329
- index: number
330
- /**
331
- * 接口调用成功的回调函数
332
- */
333
- success?: ShowTabBarRedDotSuccessCallback
334
- /**
335
- * 接口调用失败的回调函数
336
- */
337
- fail?: ShowTabBarRedDotFailCallback
338
- /**
339
- * 接口调用结束的回调函数(调用成功、失败都会执行)
340
- */
341
- complete?: ShowTabBarRedDotCompleteCallback
342
- }
343
-
344
- export type HideTabBarRedDotSuccess = AsyncApiSuccessResult
345
- export type HideTabBarRedDotSuccessCallback = (
346
- result: HideTabBarRedDotSuccess
347
- ) => void
348
- export type HideTabBarRedDotFail = SetTabBarError
349
- export type HideTabBarRedDotFailCallback = (
350
- result: HideTabBarRedDotFail
351
- ) => void
352
- export type HideTabBarRedDotComplete = AsyncApiResult
353
- export type HideTabBarRedDotCompleteCallback = (
354
- result: HideTabBarRedDotComplete
355
- ) => void
356
- export type HideTabBarRedDotOptions = {
357
- /**
358
- * tabBar的哪一项,从左边算起,索引从0开始
359
- */
360
- index: number
361
- /**
362
- * 接口调用成功的回调函数
363
- */
364
- success?: HideTabBarRedDotSuccessCallback
365
- /**
366
- * 接口调用失败的回调函数
367
- */
368
- fail?: HideTabBarRedDotFailCallback
369
- /**
370
- * 接口调用结束的回调函数(调用成功、失败都会执行)
371
- */
372
- complete?: HideTabBarRedDotCompleteCallback
373
- }
374
-
375
- export type OnTabBarMidButtonTapCallback = () => void
376
-
377
- export interface Uni {
378
- /**
379
- * 为 tabBar 某一项的右上角添加文本
380
- *
381
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbarbadge
382
- * @uniPlatform {
383
- * "app": {
384
- * "android": {
385
- * "osVer": "5.0",
386
- * "uniVer": "√",
387
- * "unixVer": "3.91"
388
- * },
389
- * "ios": {
390
- * "osVer": "10.0",
391
- * "uniVer": "√",
392
- * "unixVer": "x"
393
- * }
394
- * },
395
- * "mp": {
396
- * "weixin": {
397
- * "hostVer": "√",
398
- * "uniVer": "√",
399
- * "unixVer": "x"
400
- * },
401
- * "alipay": {
402
- * "hostVer": "√",
403
- * "uniVer": "√",
404
- * "unixVer": "x"
405
- * },
406
- * "baidu": {
407
- * "hostVer": "√",
408
- * "uniVer": "√",
409
- * "unixVer": "x"
410
- * },
411
- * "toutiao": {
412
- * "hostVer": "√",
413
- * "uniVer": "√",
414
- * "unixVer": "x"
415
- * },
416
- * "lark": {
417
- * "hostVer": "√",
418
- * "uniVer": "√",
419
- * "unixVer": "x"
420
- * },
421
- * "qq": {
422
- * "hostVer": "√",
423
- * "uniVer": "√",
424
- * "unixVer": "x"
425
- * },
426
- * "kuaishou": {
427
- * "hostVer": "√",
428
- * "uniVer": "√",
429
- * "unixVer": "x"
430
- * },
431
- * "jd": {
432
- * "hostVer": "√",
433
- * "uniVer": "√",
434
- * "unixVer": "x"
435
- * }
436
- * },
437
- * "web": {
438
- * "uniVer": "√",
439
- * "unixVer": "4.0"
440
- * }
441
- * }
442
- */
443
- setTabBarBadge(
444
- options: SetTabBarBadgeOptions
445
- ): Promise<SetTabBarBadgeSuccess> | null
446
- /**
447
- * 移除 tabBar 某一项右上角的文本
448
- *
449
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#removetabbarbadge
450
- * @uniPlatform {
451
- * "app": {
452
- * "android": {
453
- * "osVer": "5.0",
454
- * "uniVer": "√",
455
- * "unixVer": "3.91"
456
- * },
457
- * "ios": {
458
- * "osVer": "10.0",
459
- * "uniVer": "√",
460
- * "unixVer": "x"
461
- * }
462
- * },
463
- * "mp": {
464
- * "weixin": {
465
- * "hostVer": "√",
466
- * "uniVer": "√",
467
- * "unixVer": "x"
468
- * },
469
- * "alipay": {
470
- * "hostVer": "√",
471
- * "uniVer": "√",
472
- * "unixVer": "x"
473
- * },
474
- * "baidu": {
475
- * "hostVer": "√",
476
- * "uniVer": "√",
477
- * "unixVer": "x"
478
- * },
479
- * "toutiao": {
480
- * "hostVer": "√",
481
- * "uniVer": "√",
482
- * "unixVer": "x"
483
- * },
484
- * "lark": {
485
- * "hostVer": "√",
486
- * "uniVer": "√",
487
- * "unixVer": "x"
488
- * },
489
- * "qq": {
490
- * "hostVer": "√",
491
- * "uniVer": "√",
492
- * "unixVer": "x"
493
- * },
494
- * "kuaishou": {
495
- * "hostVer": "√",
496
- * "uniVer": "√",
497
- * "unixVer": "x"
498
- * },
499
- * "jd": {
500
- * "hostVer": "√",
501
- * "uniVer": "√",
502
- * "unixVer": "x"
503
- * }
504
- * },
505
- * "web": {
506
- * "uniVer": "√",
507
- * "unixVer": "4.0"
508
- * }
509
- * }
510
- */
511
- removeTabBarBadge(
512
- options: RemoveTabBarBadgeOptions
513
- ): Promise<RemoveTabBarBadgeSuccess> | null
514
- /**
515
- * 动态设置 tabBar 某一项的内容
516
- *
517
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbaritem
518
- * @uniPlatform {
519
- * "app": {
520
- * "android": {
521
- * "osVer": "5.0",
522
- * "uniVer": "√",
523
- * "unixVer": "3.91"
524
- * },
525
- * "ios": {
526
- * "osVer": "10.0",
527
- * "uniVer": "√",
528
- * "unixVer": "x"
529
- * }
530
- * },
531
- * "mp": {
532
- * "weixin": {
533
- * "hostVer": "√",
534
- * "uniVer": "√",
535
- * "unixVer": "x"
536
- * },
537
- * "alipay": {
538
- * "hostVer": "√",
539
- * "uniVer": "√",
540
- * "unixVer": "x"
541
- * },
542
- * "baidu": {
543
- * "hostVer": "√",
544
- * "uniVer": "√",
545
- * "unixVer": "x"
546
- * },
547
- * "toutiao": {
548
- * "hostVer": "√",
549
- * "uniVer": "√",
550
- * "unixVer": "x"
551
- * },
552
- * "lark": {
553
- * "hostVer": "√",
554
- * "uniVer": "√",
555
- * "unixVer": "x"
556
- * },
557
- * "qq": {
558
- * "hostVer": "√",
559
- * "uniVer": "√",
560
- * "unixVer": "x"
561
- * },
562
- * "kuaishou": {
563
- * "hostVer": "√",
564
- * "uniVer": "√",
565
- * "unixVer": "x"
566
- * },
567
- * "jd": {
568
- * "hostVer": "√",
569
- * "uniVer": "√",
570
- * "unixVer": "x"
571
- * }
572
- * },
573
- * "web": {
574
- * "uniVer": "√",
575
- * "unixVer": "4.0"
576
- * }
577
- * }
578
- */
579
- setTabBarItem(
580
- options: SetTabBarItemOptions
581
- ): Promise<SetTabBarItemSuccess> | null
582
- /**
583
- * 动态设置 tabBar 的整体样式
584
- *
585
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbarstyle
586
- * @uniPlatform {
587
- * "app": {
588
- * "android": {
589
- * "osVer": "5.0",
590
- * "uniVer": "√",
591
- * "unixVer": "3.91"
592
- * },
593
- * "ios": {
594
- * "osVer": "10.0",
595
- * "uniVer": "√",
596
- * "unixVer": "x"
597
- * }
598
- * },
599
- * "mp": {
600
- * "weixin": {
601
- * "hostVer": "√",
602
- * "uniVer": "√",
603
- * "unixVer": "x"
604
- * },
605
- * "alipay": {
606
- * "hostVer": "√",
607
- * "uniVer": "√",
608
- * "unixVer": "x"
609
- * },
610
- * "baidu": {
611
- * "hostVer": "√",
612
- * "uniVer": "√",
613
- * "unixVer": "x"
614
- * },
615
- * "toutiao": {
616
- * "hostVer": "√",
617
- * "uniVer": "√",
618
- * "unixVer": "x"
619
- * },
620
- * "lark": {
621
- * "hostVer": "√",
622
- * "uniVer": "√",
623
- * "unixVer": "x"
624
- * },
625
- * "qq": {
626
- * "hostVer": "√",
627
- * "uniVer": "√",
628
- * "unixVer": "x"
629
- * },
630
- * "kuaishou": {
631
- * "hostVer": "√",
632
- * "uniVer": "√",
633
- * "unixVer": "x"
634
- * },
635
- * "jd": {
636
- * "hostVer": "√",
637
- * "uniVer": "√",
638
- * "unixVer": "x"
639
- * }
640
- * },
641
- * "web": {
642
- * "uniVer": "√",
643
- * "unixVer": "4.0"
644
- * }
645
- * }
646
- */
647
- setTabBarStyle(
648
- options: SetTabBarStyleOptions
649
- ): Promise<SetTabBarStyleSuccess> | null
650
- /**
651
- * 隐藏 tabBar
652
- *
653
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#hidetabbar
654
- * @uniPlatform {
655
- * "app": {
656
- * "android": {
657
- * "osVer": "5.0",
658
- * "uniVer": "√",
659
- * "unixVer": "3.91"
660
- * },
661
- * "ios": {
662
- * "osVer": "10.0",
663
- * "uniVer": "√",
664
- * "unixVer": "x"
665
- * }
666
- * },
667
- * "mp": {
668
- * "weixin": {
669
- * "hostVer": "√",
670
- * "uniVer": "√",
671
- * "unixVer": "x"
672
- * },
673
- * "alipay": {
674
- * "hostVer": "√",
675
- * "uniVer": "√",
676
- * "unixVer": "x"
677
- * },
678
- * "baidu": {
679
- * "hostVer": "√",
680
- * "uniVer": "√",
681
- * "unixVer": "x"
682
- * },
683
- * "toutiao": {
684
- * "hostVer": "√",
685
- * "uniVer": "√",
686
- * "unixVer": "x"
687
- * },
688
- * "lark": {
689
- * "hostVer": "√",
690
- * "uniVer": "√",
691
- * "unixVer": "x"
692
- * },
693
- * "qq": {
694
- * "hostVer": "√",
695
- * "uniVer": "√",
696
- * "unixVer": "x"
697
- * },
698
- * "kuaishou": {
699
- * "hostVer": "√",
700
- * "uniVer": "√",
701
- * "unixVer": "x"
702
- * },
703
- * "jd": {
704
- * "hostVer": "√",
705
- * "uniVer": "√",
706
- * "unixVer": "x"
707
- * }
708
- * },
709
- * "web": {
710
- * "uniVer": "√",
711
- * "unixVer": "4.0"
712
- * }
713
- * }
714
- */
715
- hideTabBar(
716
- options?: HideTabBarOptions | null
717
- ): Promise<HideTabBarSuccess> | null
718
- /**
719
- * 显示 tabBar
720
- *
721
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#showtabbar
722
- * @uniPlatform {
723
- * "app": {
724
- * "android": {
725
- * "osVer": "5.0",
726
- * "uniVer": "√",
727
- * "unixVer": "3.91"
728
- * },
729
- * "ios": {
730
- * "osVer": "10.0",
731
- * "uniVer": "√",
732
- * "unixVer": "x"
733
- * }
734
- * },
735
- * "mp": {
736
- * "weixin": {
737
- * "hostVer": "√",
738
- * "uniVer": "√",
739
- * "unixVer": "x"
740
- * },
741
- * "alipay": {
742
- * "hostVer": "√",
743
- * "uniVer": "√",
744
- * "unixVer": "x"
745
- * },
746
- * "baidu": {
747
- * "hostVer": "√",
748
- * "uniVer": "√",
749
- * "unixVer": "x"
750
- * },
751
- * "toutiao": {
752
- * "hostVer": "√",
753
- * "uniVer": "√",
754
- * "unixVer": "x"
755
- * },
756
- * "lark": {
757
- * "hostVer": "√",
758
- * "uniVer": "√",
759
- * "unixVer": "x"
760
- * },
761
- * "qq": {
762
- * "hostVer": "√",
763
- * "uniVer": "√",
764
- * "unixVer": "x"
765
- * },
766
- * "kuaishou": {
767
- * "hostVer": "√",
768
- * "uniVer": "√",
769
- * "unixVer": "x"
770
- * },
771
- * "jd": {
772
- * "hostVer": "√",
773
- * "uniVer": "√",
774
- * "unixVer": "x"
775
- * }
776
- * },
777
- * "web": {
778
- * "uniVer": "√",
779
- * "unixVer": "4.0"
780
- * }
781
- * }
782
- */
783
- showTabBar(
784
- options?: ShowTabBarOptions | null
785
- ): Promise<ShowTabBarSuccess> | null
786
- /**
787
- * 显示 tabBar 某一项的右上角的红点
788
- *
789
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#showtabbarreddot
790
- * @uniPlatform {
791
- * "app": {
792
- * "android": {
793
- * "osVer": "5.0",
794
- * "uniVer": "√",
795
- * "unixVer": "3.91"
796
- * },
797
- * "ios": {
798
- * "osVer": "10.0",
799
- * "uniVer": "√",
800
- * "unixVer": "x"
801
- * }
802
- * },
803
- * "mp": {
804
- * "weixin": {
805
- * "hostVer": "√",
806
- * "uniVer": "√",
807
- * "unixVer": "x"
808
- * },
809
- * "alipay": {
810
- * "hostVer": "√",
811
- * "uniVer": "√",
812
- * "unixVer": "x"
813
- * },
814
- * "baidu": {
815
- * "hostVer": "√",
816
- * "uniVer": "√",
817
- * "unixVer": "x"
818
- * },
819
- * "toutiao": {
820
- * "hostVer": "√",
821
- * "uniVer": "√",
822
- * "unixVer": "x"
823
- * },
824
- * "lark": {
825
- * "hostVer": "√",
826
- * "uniVer": "√",
827
- * "unixVer": "x"
828
- * },
829
- * "qq": {
830
- * "hostVer": "√",
831
- * "uniVer": "√",
832
- * "unixVer": "x"
833
- * },
834
- * "kuaishou": {
835
- * "hostVer": "√",
836
- * "uniVer": "√",
837
- * "unixVer": "x"
838
- * },
839
- * "jd": {
840
- * "hostVer": "√",
841
- * "uniVer": "√",
842
- * "unixVer": "x"
843
- * }
844
- * },
845
- * "web": {
846
- * "uniVer": "√",
847
- * "unixVer": "4.0"
848
- * }
849
- * }
850
- */
851
- showTabBarRedDot(
852
- options: ShowTabBarRedDotOptions
853
- ): Promise<ShowTabBarRedDotSuccess> | null
854
- /**
855
- * 隐藏 tabBar 某一项的右上角的红点
856
- *
857
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#hidetabbarreddot
858
- * @uniPlatform {
859
- * "app": {
860
- * "android": {
861
- * "osVer": "5.0",
862
- * "uniVer": "√",
863
- * "unixVer": "3.91"
864
- * },
865
- * "ios": {
866
- * "osVer": "10.0",
867
- * "uniVer": "√",
868
- * "unixVer": "x"
869
- * }
870
- * },
871
- * "mp": {
872
- * "weixin": {
873
- * "hostVer": "√",
874
- * "uniVer": "√",
875
- * "unixVer": "x"
876
- * },
877
- * "alipay": {
878
- * "hostVer": "√",
879
- * "uniVer": "√",
880
- * "unixVer": "x"
881
- * },
882
- * "baidu": {
883
- * "hostVer": "√",
884
- * "uniVer": "√",
885
- * "unixVer": "x"
886
- * },
887
- * "toutiao": {
888
- * "hostVer": "√",
889
- * "uniVer": "√",
890
- * "unixVer": "x"
891
- * },
892
- * "lark": {
893
- * "hostVer": "√",
894
- * "uniVer": "√",
895
- * "unixVer": "x"
896
- * },
897
- * "qq": {
898
- * "hostVer": "√",
899
- * "uniVer": "√",
900
- * "unixVer": "x"
901
- * },
902
- * "kuaishou": {
903
- * "hostVer": "√",
904
- * "uniVer": "√",
905
- * "unixVer": "x"
906
- * },
907
- * "jd": {
908
- * "hostVer": "√",
909
- * "uniVer": "√",
910
- * "unixVer": "x"
911
- * }
912
- * },
913
- * "web": {
914
- * "uniVer": "√",
915
- * "unixVer": "4.0"
916
- * }
917
- * }
918
- */
919
- hideTabBarRedDot(
920
- options: HideTabBarRedDotOptions
921
- ): Promise<HideTabBarRedDotSuccess> | null
922
- // /**
923
- // * 监听中间按钮的点击事件
924
- // *
925
- // * @tutorial https://doc.dcloud.net.cn/uni-app-x/tabbar?id=ontabbarmidbuttontap
926
- // */
927
- // onTabBarMidButtonTap(options: OnTabBarMidButtonTapCallback): void
928
- }
1
+ import { AsyncApiSuccessResult } from '../../interface'
2
+
3
+ export type SetTabBarBadgeSuccess = AsyncApiSuccessResult
4
+ export type SetTabBarBadgeSuccessCallback = (
5
+ result: SetTabBarBadgeSuccess
6
+ ) => void
7
+ /**
8
+ * 错误码
9
+ * - 100: TabBar 不存在
10
+ * - 200: 参数错误
11
+ */
12
+ export type SetTabBarErrCode = 100 | 200
13
+ export abstract class SetTabBarError extends UniError {
14
+ abstract override errCode: SetTabBarErrCode
15
+ }
16
+ export type SetTabBarBadgeFail = SetTabBarError
17
+ export type SetTabBarBadgeFailCallback = (result: SetTabBarError) => void
18
+ export type SetTabBarBadgeComplete = AsyncApiResult
19
+ export type SetTabBarBadgeCompleteCallback = (
20
+ result: SetTabBarBadgeComplete
21
+ ) => void
22
+ export type SetTabBarBadgeOptions = {
23
+ /**
24
+ * tabBar的哪一项,从左边算起,索引从0开始
25
+ */
26
+ index: number
27
+ /**
28
+ * 显示的文本,不超过 3 个半角字符
29
+ */
30
+ text: string
31
+ /**
32
+ * 接口调用成功的回调函数
33
+ */
34
+ success?: SetTabBarBadgeSuccessCallback
35
+ /**
36
+ * 接口调用失败的回调函数
37
+ */
38
+ fail?: SetTabBarBadgeFailCallback
39
+ /**
40
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
41
+ */
42
+ complete?: SetTabBarBadgeCompleteCallback
43
+ }
44
+
45
+ export type RemoveTabBarBadgeSuccess = AsyncApiSuccessResult
46
+ export type RemoveTabBarBadgeSuccessCallback = (
47
+ result: RemoveTabBarBadgeSuccess
48
+ ) => void
49
+ export type RemoveTabBarBadgeFail = SetTabBarError
50
+ export type RemoveTabBarBadgeFailCallback = (
51
+ result: RemoveTabBarBadgeFail
52
+ ) => void
53
+ export type RemoveTabBarBadgeComplete = AsyncApiResult
54
+ export type RemoveTabBarBadgeCompleteCallback = (
55
+ result: RemoveTabBarBadgeComplete
56
+ ) => void
57
+ export type RemoveTabBarBadgeOptions = {
58
+ /**
59
+ * tabBar的哪一项,从左边算起,索引从0开始
60
+ */
61
+ index: number
62
+ /**
63
+ * 接口调用成功的回调函数
64
+ */
65
+ success?: RemoveTabBarBadgeSuccessCallback
66
+ /**
67
+ * 接口调用失败的回调函数
68
+ */
69
+ fail?: RemoveTabBarBadgeFailCallback
70
+ /**
71
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
72
+ */
73
+ complete?: RemoveTabBarBadgeCompleteCallback
74
+ }
75
+
76
+ export type SetTabBarItemSuccess = AsyncApiSuccessResult
77
+ export type SetTabBarItemSuccessCallback = (
78
+ result: SetTabBarItemSuccess
79
+ ) => void
80
+ export type SetTabBarItemFail = SetTabBarError
81
+ export type SetTabBarItemFailCallback = (result: SetTabBarItemFail) => void
82
+ export type SetTabBarItemComplete = AsyncApiResult
83
+ export type SetTabBarItemCompleteCallback = (
84
+ result: SetTabBarItemComplete
85
+ ) => void
86
+ export type SetTabBarItemIconFontOptions = {
87
+ /**
88
+ * 字库 Unicode 码
89
+ */
90
+ text: string
91
+ /**
92
+ * 选中后字库 Unicode 码
93
+ */
94
+ selectedText: string
95
+ /**
96
+ * 字体图标字号(px)
97
+ */
98
+ fontSize?: string
99
+ /**
100
+ * 字体图标颜色
101
+ */
102
+ color?: string
103
+ /**
104
+ * 字体图标选中颜色
105
+ */
106
+ selectedColor?: string
107
+ }
108
+ export type SetTabBarItemOptions = {
109
+ /**
110
+ * tabBar 的哪一项,从左边算起,索引从0开始
111
+ */
112
+ index: number
113
+ /**
114
+ * tab 上按钮文字
115
+ */
116
+ text?: string
117
+ /**
118
+ * 图片路径
119
+ */
120
+ iconPath?: string
121
+ /**
122
+ * 选中时的图片路径
123
+ */
124
+ selectedIconPath?: string
125
+ /**
126
+ * 页面绝对路径
127
+ */
128
+ pagePath?: string
129
+ /**
130
+ * 字体图标,优先级高于 iconPath
131
+ */
132
+ iconfont?: SetTabBarItemIconFontOptions
133
+ /**
134
+ * tab 是否显示
135
+ */
136
+ visible?: boolean
137
+ /**
138
+ * 接口调用成功的回调函数
139
+ */
140
+ success?: SetTabBarItemSuccessCallback
141
+ /**
142
+ * 接口调用失败的回调函数
143
+ */
144
+ fail?: SetTabBarItemFailCallback
145
+ /**
146
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
147
+ */
148
+ complete?: SetTabBarItemCompleteCallback
149
+ }
150
+
151
+ export type MidButtonIconFont = {
152
+ /**
153
+ * 字库 Unicode 码
154
+ */
155
+ text?: string
156
+ /**
157
+ * 选中后字库 Unicode 码
158
+ */
159
+ selectedText?: string
160
+ /**
161
+ * 字体图标字号(px)
162
+ */
163
+ fontSize?: string
164
+ /**
165
+ * 字体图标颜色
166
+ */
167
+ color?: string
168
+ /**
169
+ * 字体图标选中颜色
170
+ */
171
+ selectedColor?: string
172
+ }
173
+
174
+ export type MidButtonOptions = {
175
+ /**
176
+ * 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度。默认 80px
177
+ */
178
+ width?: string
179
+ /**
180
+ * 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果。默认 50px
181
+ */
182
+ height?: string
183
+ /**
184
+ * 中间按钮的文字
185
+ */
186
+ text?: string
187
+ /**
188
+ * 中间按钮的图片路径
189
+ */
190
+ iconPath?: string
191
+ /**
192
+ * 图片宽度(高度等比例缩放)。默认 24px
193
+ */
194
+ iconWidth?: string
195
+ /**
196
+ * 中间按钮的背景图片路径
197
+ */
198
+ backgroundImage?: string
199
+ /**
200
+ * 字体图标,优先级高于 iconPath
201
+ */
202
+ iconfont?: MidButtonIconFont
203
+ }
204
+
205
+ export type SetTabBarStyleSuccess = AsyncApiSuccessResult
206
+ export type SetTabBarStyleSuccessCallback = (
207
+ result: SetTabBarStyleSuccess
208
+ ) => void
209
+ export type SetTabBarStyleFail = SetTabBarError
210
+ export type SetTabBarStyleFailCallback = (result: SetTabBarStyleFail) => void
211
+ export type SetTabBarStyleComplete = AsyncApiResult
212
+ export type SetTabBarStyleCompleteCallback = (
213
+ result: SetTabBarStyleComplete
214
+ ) => void
215
+ export type SetTabBarStyleOptions = {
216
+ /**
217
+ * tab 上的文字默认颜色
218
+ */
219
+ color?: string | string.ColorString
220
+ /**
221
+ * tab 上的文字选中时的颜色
222
+ */
223
+ selectedColor?: string | string.ColorString
224
+ /**
225
+ * tab 的背景色
226
+ */
227
+ backgroundColor?: string | string.ColorString
228
+ /**
229
+ * 图片背景
230
+ */
231
+ backgroundImage?: string
232
+ /**
233
+ * 背景图平铺方式
234
+ * - repeat: 背景图片在垂直方向和水平方向平铺
235
+ * - repeat-x: 背景图片在水平方向平铺,垂直方向拉伸
236
+ * - repeat-y: 背景图片在垂直方向平铺,水平方向拉伸
237
+ * - no-repeat: 背景图片在垂直方向和水平方向都拉伸
238
+ */
239
+ backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
240
+ /**
241
+ * tabbar上边框的颜色
242
+ */
243
+ borderStyle?: string
244
+ /**
245
+ * tabbar 中间按钮 仅在 list 项为偶数时有效
246
+ * @internal
247
+ */
248
+ midButton?: MidButtonOptions
249
+ /**
250
+ * 接口调用成功的回调函数
251
+ */
252
+ success?: SetTabBarStyleSuccessCallback
253
+ /**
254
+ * 接口调用失败的回调函数
255
+ */
256
+ fail?: SetTabBarStyleFailCallback
257
+ /**
258
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
259
+ */
260
+ complete?: SetTabBarStyleCompleteCallback
261
+ }
262
+
263
+ export type HideTabBarSuccess = AsyncApiSuccessResult
264
+ export type HideTabBarSuccessCallback = (result: HideTabBarSuccess) => void
265
+ export type HideTabBarFail = SetTabBarError
266
+ export type HideTabBarFailCallback = (result: HideTabBarFail) => void
267
+ export type HideTabBarComplete = AsyncApiResult
268
+ export type HideTabBarCompleteCallback = (result: HideTabBarComplete) => void
269
+ export type HideTabBarOptions = {
270
+ /**
271
+ * 是否需要动画效果
272
+ */
273
+ animation?: boolean
274
+ /**
275
+ * 接口调用成功的回调函数
276
+ */
277
+ success?: HideTabBarSuccessCallback
278
+ /**
279
+ * 接口调用失败的回调函数
280
+ */
281
+ fail?: HideTabBarFailCallback
282
+ /**
283
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
284
+ */
285
+ complete?: HideTabBarCompleteCallback
286
+ }
287
+
288
+ export type ShowTabBarSuccess = AsyncApiSuccessResult
289
+ export type ShowTabBarSuccessCallback = (result: ShowTabBarSuccess) => void
290
+ export type ShowTabBarFail = SetTabBarError
291
+ export type ShowTabBarFailCallback = (result: ShowTabBarFail) => void
292
+ export type ShowTabBarComplete = AsyncApiResult
293
+ export type ShowTabBarCompleteCallback = (result: ShowTabBarComplete) => void
294
+ export type ShowTabBarOptions = {
295
+ /**
296
+ * 是否需要动画效果
297
+ */
298
+ animation?: boolean
299
+ /**
300
+ * 接口调用成功的回调函数
301
+ */
302
+ success?: ShowTabBarSuccessCallback
303
+ /**
304
+ * 接口调用失败的回调函数
305
+ */
306
+ fail?: ShowTabBarFailCallback
307
+ /**
308
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
309
+ */
310
+ complete?: ShowTabBarCompleteCallback
311
+ }
312
+
313
+ export type ShowTabBarRedDotSuccess = AsyncApiSuccessResult
314
+ export type ShowTabBarRedDotSuccessCallback = (
315
+ result: ShowTabBarRedDotSuccess
316
+ ) => void
317
+ export type ShowTabBarRedDotFail = SetTabBarError
318
+ export type ShowTabBarRedDotFailCallback = (
319
+ result: ShowTabBarRedDotFail
320
+ ) => void
321
+ export type ShowTabBarRedDotComplete = AsyncApiResult
322
+ export type ShowTabBarRedDotCompleteCallback = (
323
+ result: ShowTabBarRedDotComplete
324
+ ) => void
325
+ export type ShowTabBarRedDotOptions = {
326
+ /**
327
+ * tabBar的哪一项,从左边算起,索引从0开始
328
+ */
329
+ index: number
330
+ /**
331
+ * 接口调用成功的回调函数
332
+ */
333
+ success?: ShowTabBarRedDotSuccessCallback
334
+ /**
335
+ * 接口调用失败的回调函数
336
+ */
337
+ fail?: ShowTabBarRedDotFailCallback
338
+ /**
339
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
340
+ */
341
+ complete?: ShowTabBarRedDotCompleteCallback
342
+ }
343
+
344
+ export type HideTabBarRedDotSuccess = AsyncApiSuccessResult
345
+ export type HideTabBarRedDotSuccessCallback = (
346
+ result: HideTabBarRedDotSuccess
347
+ ) => void
348
+ export type HideTabBarRedDotFail = SetTabBarError
349
+ export type HideTabBarRedDotFailCallback = (
350
+ result: HideTabBarRedDotFail
351
+ ) => void
352
+ export type HideTabBarRedDotComplete = AsyncApiResult
353
+ export type HideTabBarRedDotCompleteCallback = (
354
+ result: HideTabBarRedDotComplete
355
+ ) => void
356
+ export type HideTabBarRedDotOptions = {
357
+ /**
358
+ * tabBar的哪一项,从左边算起,索引从0开始
359
+ */
360
+ index: number
361
+ /**
362
+ * 接口调用成功的回调函数
363
+ */
364
+ success?: HideTabBarRedDotSuccessCallback
365
+ /**
366
+ * 接口调用失败的回调函数
367
+ */
368
+ fail?: HideTabBarRedDotFailCallback
369
+ /**
370
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
371
+ */
372
+ complete?: HideTabBarRedDotCompleteCallback
373
+ }
374
+
375
+ export type OnTabBarMidButtonTapCallback = () => void
376
+
377
+ export interface Uni {
378
+ /**
379
+ * 为 tabBar 某一项的右上角添加文本
380
+ *
381
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbarbadge
382
+ * @uniPlatform {
383
+ * "app": {
384
+ * "android": {
385
+ * "osVer": "5.0",
386
+ * "uniVer": "√",
387
+ * "unixVer": "3.91"
388
+ * },
389
+ * "ios": {
390
+ * "osVer": "10.0",
391
+ * "uniVer": "√",
392
+ * "unixVer": "x"
393
+ * }
394
+ * },
395
+ * "mp": {
396
+ * "weixin": {
397
+ * "hostVer": "√",
398
+ * "uniVer": "√",
399
+ * "unixVer": "x"
400
+ * },
401
+ * "alipay": {
402
+ * "hostVer": "√",
403
+ * "uniVer": "√",
404
+ * "unixVer": "x"
405
+ * },
406
+ * "baidu": {
407
+ * "hostVer": "√",
408
+ * "uniVer": "√",
409
+ * "unixVer": "x"
410
+ * },
411
+ * "toutiao": {
412
+ * "hostVer": "√",
413
+ * "uniVer": "√",
414
+ * "unixVer": "x"
415
+ * },
416
+ * "lark": {
417
+ * "hostVer": "√",
418
+ * "uniVer": "√",
419
+ * "unixVer": "x"
420
+ * },
421
+ * "qq": {
422
+ * "hostVer": "√",
423
+ * "uniVer": "√",
424
+ * "unixVer": "x"
425
+ * },
426
+ * "kuaishou": {
427
+ * "hostVer": "√",
428
+ * "uniVer": "√",
429
+ * "unixVer": "x"
430
+ * },
431
+ * "jd": {
432
+ * "hostVer": "√",
433
+ * "uniVer": "√",
434
+ * "unixVer": "x"
435
+ * }
436
+ * },
437
+ * "web": {
438
+ * "uniVer": "√",
439
+ * "unixVer": "4.0"
440
+ * }
441
+ * }
442
+ */
443
+ setTabBarBadge(
444
+ options: SetTabBarBadgeOptions
445
+ ): Promise<SetTabBarBadgeSuccess> | null
446
+ /**
447
+ * 移除 tabBar 某一项右上角的文本
448
+ *
449
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#removetabbarbadge
450
+ * @uniPlatform {
451
+ * "app": {
452
+ * "android": {
453
+ * "osVer": "5.0",
454
+ * "uniVer": "√",
455
+ * "unixVer": "3.91"
456
+ * },
457
+ * "ios": {
458
+ * "osVer": "10.0",
459
+ * "uniVer": "√",
460
+ * "unixVer": "x"
461
+ * }
462
+ * },
463
+ * "mp": {
464
+ * "weixin": {
465
+ * "hostVer": "√",
466
+ * "uniVer": "√",
467
+ * "unixVer": "x"
468
+ * },
469
+ * "alipay": {
470
+ * "hostVer": "√",
471
+ * "uniVer": "√",
472
+ * "unixVer": "x"
473
+ * },
474
+ * "baidu": {
475
+ * "hostVer": "√",
476
+ * "uniVer": "√",
477
+ * "unixVer": "x"
478
+ * },
479
+ * "toutiao": {
480
+ * "hostVer": "√",
481
+ * "uniVer": "√",
482
+ * "unixVer": "x"
483
+ * },
484
+ * "lark": {
485
+ * "hostVer": "√",
486
+ * "uniVer": "√",
487
+ * "unixVer": "x"
488
+ * },
489
+ * "qq": {
490
+ * "hostVer": "√",
491
+ * "uniVer": "√",
492
+ * "unixVer": "x"
493
+ * },
494
+ * "kuaishou": {
495
+ * "hostVer": "√",
496
+ * "uniVer": "√",
497
+ * "unixVer": "x"
498
+ * },
499
+ * "jd": {
500
+ * "hostVer": "√",
501
+ * "uniVer": "√",
502
+ * "unixVer": "x"
503
+ * }
504
+ * },
505
+ * "web": {
506
+ * "uniVer": "√",
507
+ * "unixVer": "4.0"
508
+ * }
509
+ * }
510
+ */
511
+ removeTabBarBadge(
512
+ options: RemoveTabBarBadgeOptions
513
+ ): Promise<RemoveTabBarBadgeSuccess> | null
514
+ /**
515
+ * 动态设置 tabBar 某一项的内容
516
+ *
517
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbaritem
518
+ * @uniPlatform {
519
+ * "app": {
520
+ * "android": {
521
+ * "osVer": "5.0",
522
+ * "uniVer": "√",
523
+ * "unixVer": "3.91"
524
+ * },
525
+ * "ios": {
526
+ * "osVer": "10.0",
527
+ * "uniVer": "√",
528
+ * "unixVer": "x"
529
+ * }
530
+ * },
531
+ * "mp": {
532
+ * "weixin": {
533
+ * "hostVer": "√",
534
+ * "uniVer": "√",
535
+ * "unixVer": "x"
536
+ * },
537
+ * "alipay": {
538
+ * "hostVer": "√",
539
+ * "uniVer": "√",
540
+ * "unixVer": "x"
541
+ * },
542
+ * "baidu": {
543
+ * "hostVer": "√",
544
+ * "uniVer": "√",
545
+ * "unixVer": "x"
546
+ * },
547
+ * "toutiao": {
548
+ * "hostVer": "√",
549
+ * "uniVer": "√",
550
+ * "unixVer": "x"
551
+ * },
552
+ * "lark": {
553
+ * "hostVer": "√",
554
+ * "uniVer": "√",
555
+ * "unixVer": "x"
556
+ * },
557
+ * "qq": {
558
+ * "hostVer": "√",
559
+ * "uniVer": "√",
560
+ * "unixVer": "x"
561
+ * },
562
+ * "kuaishou": {
563
+ * "hostVer": "√",
564
+ * "uniVer": "√",
565
+ * "unixVer": "x"
566
+ * },
567
+ * "jd": {
568
+ * "hostVer": "√",
569
+ * "uniVer": "√",
570
+ * "unixVer": "x"
571
+ * }
572
+ * },
573
+ * "web": {
574
+ * "uniVer": "√",
575
+ * "unixVer": "4.0"
576
+ * }
577
+ * }
578
+ */
579
+ setTabBarItem(
580
+ options: SetTabBarItemOptions
581
+ ): Promise<SetTabBarItemSuccess> | null
582
+ /**
583
+ * 动态设置 tabBar 的整体样式
584
+ *
585
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#settabbarstyle
586
+ * @uniPlatform {
587
+ * "app": {
588
+ * "android": {
589
+ * "osVer": "5.0",
590
+ * "uniVer": "√",
591
+ * "unixVer": "3.91"
592
+ * },
593
+ * "ios": {
594
+ * "osVer": "10.0",
595
+ * "uniVer": "√",
596
+ * "unixVer": "x"
597
+ * }
598
+ * },
599
+ * "mp": {
600
+ * "weixin": {
601
+ * "hostVer": "√",
602
+ * "uniVer": "√",
603
+ * "unixVer": "x"
604
+ * },
605
+ * "alipay": {
606
+ * "hostVer": "√",
607
+ * "uniVer": "√",
608
+ * "unixVer": "x"
609
+ * },
610
+ * "baidu": {
611
+ * "hostVer": "√",
612
+ * "uniVer": "√",
613
+ * "unixVer": "x"
614
+ * },
615
+ * "toutiao": {
616
+ * "hostVer": "√",
617
+ * "uniVer": "√",
618
+ * "unixVer": "x"
619
+ * },
620
+ * "lark": {
621
+ * "hostVer": "√",
622
+ * "uniVer": "√",
623
+ * "unixVer": "x"
624
+ * },
625
+ * "qq": {
626
+ * "hostVer": "√",
627
+ * "uniVer": "√",
628
+ * "unixVer": "x"
629
+ * },
630
+ * "kuaishou": {
631
+ * "hostVer": "√",
632
+ * "uniVer": "√",
633
+ * "unixVer": "x"
634
+ * },
635
+ * "jd": {
636
+ * "hostVer": "√",
637
+ * "uniVer": "√",
638
+ * "unixVer": "x"
639
+ * }
640
+ * },
641
+ * "web": {
642
+ * "uniVer": "√",
643
+ * "unixVer": "4.0"
644
+ * }
645
+ * }
646
+ */
647
+ setTabBarStyle(
648
+ options: SetTabBarStyleOptions
649
+ ): Promise<SetTabBarStyleSuccess> | null
650
+ /**
651
+ * 隐藏 tabBar
652
+ *
653
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#hidetabbar
654
+ * @uniPlatform {
655
+ * "app": {
656
+ * "android": {
657
+ * "osVer": "5.0",
658
+ * "uniVer": "√",
659
+ * "unixVer": "3.91"
660
+ * },
661
+ * "ios": {
662
+ * "osVer": "10.0",
663
+ * "uniVer": "√",
664
+ * "unixVer": "x"
665
+ * }
666
+ * },
667
+ * "mp": {
668
+ * "weixin": {
669
+ * "hostVer": "√",
670
+ * "uniVer": "√",
671
+ * "unixVer": "x"
672
+ * },
673
+ * "alipay": {
674
+ * "hostVer": "√",
675
+ * "uniVer": "√",
676
+ * "unixVer": "x"
677
+ * },
678
+ * "baidu": {
679
+ * "hostVer": "√",
680
+ * "uniVer": "√",
681
+ * "unixVer": "x"
682
+ * },
683
+ * "toutiao": {
684
+ * "hostVer": "√",
685
+ * "uniVer": "√",
686
+ * "unixVer": "x"
687
+ * },
688
+ * "lark": {
689
+ * "hostVer": "√",
690
+ * "uniVer": "√",
691
+ * "unixVer": "x"
692
+ * },
693
+ * "qq": {
694
+ * "hostVer": "√",
695
+ * "uniVer": "√",
696
+ * "unixVer": "x"
697
+ * },
698
+ * "kuaishou": {
699
+ * "hostVer": "√",
700
+ * "uniVer": "√",
701
+ * "unixVer": "x"
702
+ * },
703
+ * "jd": {
704
+ * "hostVer": "√",
705
+ * "uniVer": "√",
706
+ * "unixVer": "x"
707
+ * }
708
+ * },
709
+ * "web": {
710
+ * "uniVer": "√",
711
+ * "unixVer": "4.0"
712
+ * }
713
+ * }
714
+ */
715
+ hideTabBar(
716
+ options?: HideTabBarOptions | null
717
+ ): Promise<HideTabBarSuccess> | null
718
+ /**
719
+ * 显示 tabBar
720
+ *
721
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#showtabbar
722
+ * @uniPlatform {
723
+ * "app": {
724
+ * "android": {
725
+ * "osVer": "5.0",
726
+ * "uniVer": "√",
727
+ * "unixVer": "3.91"
728
+ * },
729
+ * "ios": {
730
+ * "osVer": "10.0",
731
+ * "uniVer": "√",
732
+ * "unixVer": "x"
733
+ * }
734
+ * },
735
+ * "mp": {
736
+ * "weixin": {
737
+ * "hostVer": "√",
738
+ * "uniVer": "√",
739
+ * "unixVer": "x"
740
+ * },
741
+ * "alipay": {
742
+ * "hostVer": "√",
743
+ * "uniVer": "√",
744
+ * "unixVer": "x"
745
+ * },
746
+ * "baidu": {
747
+ * "hostVer": "√",
748
+ * "uniVer": "√",
749
+ * "unixVer": "x"
750
+ * },
751
+ * "toutiao": {
752
+ * "hostVer": "√",
753
+ * "uniVer": "√",
754
+ * "unixVer": "x"
755
+ * },
756
+ * "lark": {
757
+ * "hostVer": "√",
758
+ * "uniVer": "√",
759
+ * "unixVer": "x"
760
+ * },
761
+ * "qq": {
762
+ * "hostVer": "√",
763
+ * "uniVer": "√",
764
+ * "unixVer": "x"
765
+ * },
766
+ * "kuaishou": {
767
+ * "hostVer": "√",
768
+ * "uniVer": "√",
769
+ * "unixVer": "x"
770
+ * },
771
+ * "jd": {
772
+ * "hostVer": "√",
773
+ * "uniVer": "√",
774
+ * "unixVer": "x"
775
+ * }
776
+ * },
777
+ * "web": {
778
+ * "uniVer": "√",
779
+ * "unixVer": "4.0"
780
+ * }
781
+ * }
782
+ */
783
+ showTabBar(
784
+ options?: ShowTabBarOptions | null
785
+ ): Promise<ShowTabBarSuccess> | null
786
+ /**
787
+ * 显示 tabBar 某一项的右上角的红点
788
+ *
789
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#showtabbarreddot
790
+ * @uniPlatform {
791
+ * "app": {
792
+ * "android": {
793
+ * "osVer": "5.0",
794
+ * "uniVer": "√",
795
+ * "unixVer": "3.91"
796
+ * },
797
+ * "ios": {
798
+ * "osVer": "10.0",
799
+ * "uniVer": "√",
800
+ * "unixVer": "x"
801
+ * }
802
+ * },
803
+ * "mp": {
804
+ * "weixin": {
805
+ * "hostVer": "√",
806
+ * "uniVer": "√",
807
+ * "unixVer": "x"
808
+ * },
809
+ * "alipay": {
810
+ * "hostVer": "√",
811
+ * "uniVer": "√",
812
+ * "unixVer": "x"
813
+ * },
814
+ * "baidu": {
815
+ * "hostVer": "√",
816
+ * "uniVer": "√",
817
+ * "unixVer": "x"
818
+ * },
819
+ * "toutiao": {
820
+ * "hostVer": "√",
821
+ * "uniVer": "√",
822
+ * "unixVer": "x"
823
+ * },
824
+ * "lark": {
825
+ * "hostVer": "√",
826
+ * "uniVer": "√",
827
+ * "unixVer": "x"
828
+ * },
829
+ * "qq": {
830
+ * "hostVer": "√",
831
+ * "uniVer": "√",
832
+ * "unixVer": "x"
833
+ * },
834
+ * "kuaishou": {
835
+ * "hostVer": "√",
836
+ * "uniVer": "√",
837
+ * "unixVer": "x"
838
+ * },
839
+ * "jd": {
840
+ * "hostVer": "√",
841
+ * "uniVer": "√",
842
+ * "unixVer": "x"
843
+ * }
844
+ * },
845
+ * "web": {
846
+ * "uniVer": "√",
847
+ * "unixVer": "4.0"
848
+ * }
849
+ * }
850
+ */
851
+ showTabBarRedDot(
852
+ options: ShowTabBarRedDotOptions
853
+ ): Promise<ShowTabBarRedDotSuccess> | null
854
+ /**
855
+ * 隐藏 tabBar 某一项的右上角的红点
856
+ *
857
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/set-tabbar.html#hidetabbarreddot
858
+ * @uniPlatform {
859
+ * "app": {
860
+ * "android": {
861
+ * "osVer": "5.0",
862
+ * "uniVer": "√",
863
+ * "unixVer": "3.91"
864
+ * },
865
+ * "ios": {
866
+ * "osVer": "10.0",
867
+ * "uniVer": "√",
868
+ * "unixVer": "4.05"
869
+ * }
870
+ * },
871
+ * "mp": {
872
+ * "weixin": {
873
+ * "hostVer": "√",
874
+ * "uniVer": "√",
875
+ * "unixVer": "x"
876
+ * },
877
+ * "alipay": {
878
+ * "hostVer": "√",
879
+ * "uniVer": "√",
880
+ * "unixVer": "x"
881
+ * },
882
+ * "baidu": {
883
+ * "hostVer": "√",
884
+ * "uniVer": "√",
885
+ * "unixVer": "x"
886
+ * },
887
+ * "toutiao": {
888
+ * "hostVer": "√",
889
+ * "uniVer": "√",
890
+ * "unixVer": "x"
891
+ * },
892
+ * "lark": {
893
+ * "hostVer": "√",
894
+ * "uniVer": "√",
895
+ * "unixVer": "x"
896
+ * },
897
+ * "qq": {
898
+ * "hostVer": "√",
899
+ * "uniVer": "√",
900
+ * "unixVer": "x"
901
+ * },
902
+ * "kuaishou": {
903
+ * "hostVer": "√",
904
+ * "uniVer": "√",
905
+ * "unixVer": "x"
906
+ * },
907
+ * "jd": {
908
+ * "hostVer": "√",
909
+ * "uniVer": "√",
910
+ * "unixVer": "x"
911
+ * }
912
+ * },
913
+ * "web": {
914
+ * "uniVer": "√",
915
+ * "unixVer": "4.0"
916
+ * }
917
+ * }
918
+ */
919
+ hideTabBarRedDot(
920
+ options: HideTabBarRedDotOptions
921
+ ): Promise<HideTabBarRedDotSuccess> | null
922
+ // /**
923
+ // * 监听中间按钮的点击事件
924
+ // *
925
+ // * @tutorial https://doc.dcloud.net.cn/uni-app-x/tabbar?id=ontabbarmidbuttontap
926
+ // */
927
+ // onTabBarMidButtonTap(options: OnTabBarMidButtonTapCallback): void
928
+ }