@tarojs/taro-h5 3.5.0-theta.1 → 3.5.0

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 (287) hide show
  1. package/dist/api/ad/index.d.ts +6 -0
  2. package/dist/api/ai/facial.d.ts +9 -0
  3. package/dist/api/ai/index.d.ts +2 -0
  4. package/dist/api/ai/visual.d.ts +6 -0
  5. package/dist/api/alipay/index.d.ts +3 -0
  6. package/dist/api/base/crypto.d.ts +3 -0
  7. package/dist/api/base/debug.d.ts +9 -0
  8. package/dist/api/base/index.d.ts +12 -0
  9. package/dist/api/base/performance.d.ts +6 -0
  10. package/dist/api/base/system.d.ts +27 -0
  11. package/dist/api/base/system.js +2 -2
  12. package/dist/api/base/update.d.ts +6 -0
  13. package/dist/api/base/weapp/app-event.d.ts +41 -0
  14. package/dist/api/base/weapp/life-cycle.d.ts +6 -0
  15. package/dist/api/canvas/CanvasContext.d.ts +104 -0
  16. package/dist/api/canvas/canvasGetImageData.d.ts +5 -0
  17. package/dist/api/canvas/canvasPutImageData.d.ts +6 -0
  18. package/dist/api/canvas/canvasToTempFilePath.d.ts +6 -0
  19. package/dist/api/canvas/createCanvasContext.d.ts +5 -0
  20. package/dist/api/canvas/index.d.ts +12 -0
  21. package/dist/api/cloud/index.d.ts +31 -0
  22. package/dist/api/data-analysis/index.d.ts +12 -0
  23. package/dist/api/device/accelerometer.d.ts +17 -0
  24. package/dist/api/device/accessibility.d.ts +3 -0
  25. package/dist/api/device/battery.d.ts +5 -0
  26. package/dist/api/device/bluetooth-ble.d.ts +48 -0
  27. package/dist/api/device/bluetooth-peripheral.d.ts +9 -0
  28. package/dist/api/device/bluetooth.d.ts +39 -0
  29. package/dist/api/device/calendar.d.ts +6 -0
  30. package/dist/api/device/clipboard.d.ts +15 -0
  31. package/dist/api/device/compass.d.ts +17 -0
  32. package/dist/api/device/contact.d.ts +6 -0
  33. package/dist/api/device/crypto.d.ts +3 -0
  34. package/dist/api/device/gyroscope.d.ts +12 -0
  35. package/dist/api/device/iBeacon.d.ts +21 -0
  36. package/dist/api/device/index.d.ts +23 -0
  37. package/dist/api/device/keyboard.d.ts +12 -0
  38. package/dist/api/device/memory.d.ts +6 -0
  39. package/dist/api/device/motion.d.ts +17 -0
  40. package/dist/api/device/network.d.ts +20 -0
  41. package/dist/api/device/nfc.d.ts +21 -0
  42. package/dist/api/device/phone.d.ts +2 -0
  43. package/dist/api/device/scan.d.ts +3 -0
  44. package/dist/api/device/screen.d.ts +18 -0
  45. package/dist/api/device/vibrate.d.ts +9 -0
  46. package/dist/api/device/vibrate.js +5 -7
  47. package/dist/api/device/wifi.d.ts +33 -0
  48. package/dist/api/ext/index.d.ts +6 -0
  49. package/dist/api/files/index.d.ts +24 -0
  50. package/dist/api/framework/index.d.ts +4 -0
  51. package/dist/api/index.d.ts +24 -0
  52. package/dist/api/location/chooseLocation.d.ts +6 -0
  53. package/dist/api/location/getLocation.d.ts +2 -0
  54. package/dist/api/location/index.d.ts +32 -0
  55. package/dist/api/location/index.js +1 -0
  56. package/dist/api/media/EditorContext.d.ts +42 -0
  57. package/dist/api/media/audio/InnerAudioContext.d.ts +58 -0
  58. package/dist/api/media/audio/index.d.ts +29 -0
  59. package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +71 -0
  60. package/dist/api/media/background-audio/index.d.ts +29 -0
  61. package/dist/api/media/camera.d.ts +3 -0
  62. package/dist/api/media/image/chooseImage.d.ts +5 -0
  63. package/dist/api/media/image/getImageInfo.d.ts +5 -0
  64. package/dist/api/media/image/index.d.ts +15 -0
  65. package/dist/api/media/image/previewImage.d.ts +8 -0
  66. package/dist/api/media/index.d.ts +12 -0
  67. package/dist/api/media/live.d.ts +6 -0
  68. package/dist/api/media/map.d.ts +3 -0
  69. package/dist/api/media/media-recorder.d.ts +3 -0
  70. package/dist/api/media/recorder.d.ts +9 -0
  71. package/dist/api/media/video/index.d.ts +24 -0
  72. package/dist/api/media/video-decoder.d.ts +3 -0
  73. package/dist/api/media/video-processing.d.ts +3 -0
  74. package/dist/api/media/voip.d.ts +42 -0
  75. package/dist/api/navigate/index.d.ts +12 -0
  76. package/dist/api/network/download.d.ts +6 -0
  77. package/dist/api/network/index.d.ts +7 -0
  78. package/dist/api/network/mdns.d.ts +30 -0
  79. package/dist/api/network/request/index.d.ts +4 -0
  80. package/dist/api/network/tcp.d.ts +3 -0
  81. package/dist/api/network/udp.d.ts +3 -0
  82. package/dist/api/network/upload.d.ts +5 -0
  83. package/{src/api/network/utils.ts → dist/api/network/utils.d.ts} +44 -72
  84. package/dist/api/network/websocket/index.d.ts +7 -0
  85. package/dist/api/network/websocket/socketTask.d.ts +25 -0
  86. package/dist/api/open-api/account.d.ts +3 -0
  87. package/dist/api/open-api/address.d.ts +3 -0
  88. package/dist/api/open-api/authorize.d.ts +6 -0
  89. package/dist/api/open-api/card.d.ts +6 -0
  90. package/dist/api/open-api/channels-live.d.ts +18 -0
  91. package/dist/api/open-api/customer-service.d.ts +3 -0
  92. package/dist/api/open-api/facial.d.ts +12 -0
  93. package/dist/api/open-api/favorites.d.ts +6 -0
  94. package/dist/api/open-api/group.d.ts +3 -0
  95. package/dist/api/open-api/index.d.ts +18 -0
  96. package/dist/api/open-api/invoice.d.ts +6 -0
  97. package/dist/api/open-api/license-plate.d.ts +3 -0
  98. package/dist/api/open-api/login.d.ts +9 -0
  99. package/dist/api/open-api/red-package.d.ts +3 -0
  100. package/dist/api/open-api/settings.d.ts +6 -0
  101. package/dist/api/open-api/soter.d.ts +9 -0
  102. package/dist/api/open-api/subscribe-message.d.ts +3 -0
  103. package/dist/api/open-api/user-info.d.ts +6 -0
  104. package/dist/api/open-api/werun.d.ts +6 -0
  105. package/dist/api/payment/index.d.ts +6 -0
  106. package/dist/api/route/index.d.ts +1 -0
  107. package/dist/api/share/index.d.ts +30 -0
  108. package/dist/api/storage/background-fetch.d.ts +12 -0
  109. package/dist/api/storage/index.d.ts +18 -0
  110. package/dist/api/swan/index.d.ts +63 -0
  111. package/dist/api/taro.d.ts +12 -0
  112. package/dist/api/ui/animation/index.d.ts +2 -0
  113. package/dist/api/ui/background.d.ts +6 -0
  114. package/dist/api/ui/custom-component.d.ts +1 -0
  115. package/dist/api/ui/fonts.d.ts +2 -0
  116. package/dist/api/ui/index.d.ts +12 -0
  117. package/dist/api/ui/interaction/actionSheet.d.ts +61 -0
  118. package/dist/api/ui/interaction/index.d.ts +14 -0
  119. package/dist/api/ui/interaction/modal.d.ts +69 -0
  120. package/dist/api/ui/interaction/modal.js +1 -0
  121. package/dist/api/ui/interaction/toast.d.ts +85 -0
  122. package/dist/api/ui/menu.d.ts +3 -0
  123. package/dist/api/ui/navigation-bar/index.d.ts +15 -0
  124. package/dist/api/ui/navigation-bar/index.js +2 -3
  125. package/dist/api/ui/pull-down-refresh.d.ts +9 -0
  126. package/dist/api/ui/scroll/index.d.ts +5 -0
  127. package/dist/api/ui/sticky.d.ts +3 -0
  128. package/dist/api/ui/tab-bar.d.ts +34 -0
  129. package/dist/api/ui/window.d.ts +15 -0
  130. package/dist/api/worker/index.d.ts +3 -0
  131. package/dist/api/wxml/index.d.ts +5 -0
  132. package/dist/api/wxml/nodesRef.d.ts +13 -0
  133. package/dist/api/wxml/selectorQuery.d.ts +24 -0
  134. package/dist/api/wxml/selectorQuery.js +1 -1
  135. package/dist/index.cjs.d.ts +1373 -0
  136. package/dist/index.cjs.js +12 -14
  137. package/dist/index.cjs.js.map +1 -1
  138. package/dist/index.d.ts +4 -0
  139. package/dist/index.esm.d.ts +1373 -0
  140. package/dist/index.esm.js +12 -14
  141. package/dist/index.esm.js.map +1 -1
  142. package/dist/taroApis.d.ts +1364 -0
  143. package/dist/taroApis.js +1 -1
  144. package/dist/utils/animation.d.ts +6 -0
  145. package/dist/utils/handler.d.ts +48 -0
  146. package/dist/utils/index.d.ts +39 -0
  147. package/dist/utils/lodash.d.ts +2 -0
  148. package/dist/utils/valid.d.ts +2 -0
  149. package/package.json +6 -7
  150. package/types/api.d.ts +4 -0
  151. package/types/define.d.ts +2 -0
  152. package/types/index.d.ts +33 -0
  153. package/types/overlay.d.ts +9 -0
  154. package/src/api/ad/index.ts +0 -5
  155. package/src/api/ai/facial.ts +0 -6
  156. package/src/api/ai/index.ts +0 -2
  157. package/src/api/ai/visual.ts +0 -7
  158. package/src/api/alipay/index.ts +0 -4
  159. package/src/api/base/crypto.ts +0 -4
  160. package/src/api/base/debug.ts +0 -5
  161. package/src/api/base/index.ts +0 -23
  162. package/src/api/base/performance.ts +0 -5
  163. package/src/api/base/system.ts +0 -207
  164. package/src/api/base/update.ts +0 -5
  165. package/src/api/base/weapp/app-event.ts +0 -79
  166. package/src/api/base/weapp/life-cycle.ts +0 -5
  167. package/src/api/canvas/CanvasContext.ts +0 -233
  168. package/src/api/canvas/canvasGetImageData.ts +0 -28
  169. package/src/api/canvas/canvasPutImageData.ts +0 -25
  170. package/src/api/canvas/canvasToTempFilePath.ts +0 -25
  171. package/src/api/canvas/createCanvasContext.ts +0 -19
  172. package/src/api/canvas/index.ts +0 -18
  173. package/src/api/cloud/index.ts +0 -32
  174. package/src/api/data-analysis/index.ts +0 -6
  175. package/src/api/device/accelerometer.ts +0 -79
  176. package/src/api/device/accessibility.ts +0 -4
  177. package/src/api/device/battery.ts +0 -23
  178. package/src/api/device/bluetooth-ble.ts +0 -19
  179. package/src/api/device/bluetooth-peripheral.ts +0 -6
  180. package/src/api/device/bluetooth.ts +0 -16
  181. package/src/api/device/calendar.ts +0 -5
  182. package/src/api/device/clipboard.ts +0 -68
  183. package/src/api/device/compass.ts +0 -83
  184. package/src/api/device/contact.ts +0 -5
  185. package/src/api/device/crypto.ts +0 -4
  186. package/src/api/device/gyroscope.ts +0 -7
  187. package/src/api/device/iBeacon.ts +0 -10
  188. package/src/api/device/index.ts +0 -23
  189. package/src/api/device/keyboard.ts +0 -7
  190. package/src/api/device/memory.ts +0 -5
  191. package/src/api/device/motion.ts +0 -77
  192. package/src/api/device/network.ts +0 -90
  193. package/src/api/device/nfc.ts +0 -10
  194. package/src/api/device/phone.ts +0 -31
  195. package/src/api/device/scan.ts +0 -11
  196. package/src/api/device/screen.ts +0 -9
  197. package/src/api/device/vibrate.ts +0 -37
  198. package/src/api/device/wifi.ts +0 -14
  199. package/src/api/ext/index.ts +0 -5
  200. package/src/api/files/index.ts +0 -11
  201. package/src/api/framework/index.ts +0 -10
  202. package/src/api/index.ts +0 -24
  203. package/src/api/location/chooseLocation.ts +0 -117
  204. package/src/api/location/getLocation.ts +0 -81
  205. package/src/api/location/index.ts +0 -22
  206. package/src/api/location/style.css +0 -79
  207. package/src/api/media/EditorContext.ts +0 -32
  208. package/src/api/media/audio/InnerAudioContext.ts +0 -99
  209. package/src/api/media/audio/index.ts +0 -21
  210. package/src/api/media/background-audio/BackgroundAudioManager.ts +0 -104
  211. package/src/api/media/background-audio/index.ts +0 -17
  212. package/src/api/media/camera.ts +0 -4
  213. package/src/api/media/image/chooseImage.ts +0 -95
  214. package/src/api/media/image/getImageInfo.ts +0 -50
  215. package/src/api/media/image/index.ts +0 -13
  216. package/src/api/media/image/previewImage.ts +0 -80
  217. package/src/api/media/index.ts +0 -12
  218. package/src/api/media/live.ts +0 -5
  219. package/src/api/media/map.ts +0 -4
  220. package/src/api/media/media-recorder.ts +0 -4
  221. package/src/api/media/recorder.ts +0 -6
  222. package/src/api/media/video/index.ts +0 -82
  223. package/src/api/media/video-decoder.ts +0 -4
  224. package/src/api/media/video-processing.ts +0 -4
  225. package/src/api/media/voip.ts +0 -17
  226. package/src/api/navigate/index.ts +0 -7
  227. package/src/api/network/download.ts +0 -142
  228. package/src/api/network/index.ts +0 -7
  229. package/src/api/network/mdns.ts +0 -13
  230. package/src/api/network/request/index.ts +0 -135
  231. package/src/api/network/tcp.ts +0 -4
  232. package/src/api/network/udp.ts +0 -4
  233. package/src/api/network/upload.ts +0 -170
  234. package/src/api/network/websocket/index.ts +0 -88
  235. package/src/api/network/websocket/socketTask.ts +0 -89
  236. package/src/api/open-api/account.ts +0 -4
  237. package/src/api/open-api/address.ts +0 -4
  238. package/src/api/open-api/authorize.ts +0 -5
  239. package/src/api/open-api/card.ts +0 -5
  240. package/src/api/open-api/channels-live.ts +0 -9
  241. package/src/api/open-api/customer-service.ts +0 -4
  242. package/src/api/open-api/facial.ts +0 -7
  243. package/src/api/open-api/favorites.ts +0 -5
  244. package/src/api/open-api/group.ts +0 -4
  245. package/src/api/open-api/index.ts +0 -18
  246. package/src/api/open-api/invoice.ts +0 -5
  247. package/src/api/open-api/license-plate.ts +0 -4
  248. package/src/api/open-api/login.ts +0 -6
  249. package/src/api/open-api/red-package.ts +0 -4
  250. package/src/api/open-api/settings.ts +0 -5
  251. package/src/api/open-api/soter.ts +0 -6
  252. package/src/api/open-api/subscribe-message.ts +0 -4
  253. package/src/api/open-api/user-info.ts +0 -5
  254. package/src/api/open-api/werun.ts +0 -5
  255. package/src/api/payment/index.ts +0 -5
  256. package/src/api/route/index.ts +0 -10
  257. package/src/api/share/index.ts +0 -13
  258. package/src/api/storage/background-fetch.ts +0 -7
  259. package/src/api/storage/index.ts +0 -182
  260. package/src/api/swan/index.ts +0 -31
  261. package/src/api/taro.ts +0 -84
  262. package/src/api/ui/animation/index.ts +0 -356
  263. package/src/api/ui/background.ts +0 -5
  264. package/src/api/ui/custom-component.ts +0 -4
  265. package/src/api/ui/fonts.ts +0 -64
  266. package/src/api/ui/index.ts +0 -12
  267. package/src/api/ui/interaction/actionSheet.ts +0 -212
  268. package/src/api/ui/interaction/index.ts +0 -302
  269. package/src/api/ui/interaction/modal.ts +0 -237
  270. package/src/api/ui/interaction/toast.ts +0 -220
  271. package/src/api/ui/menu.ts +0 -4
  272. package/src/api/ui/navigation-bar/index.ts +0 -52
  273. package/src/api/ui/pull-down-refresh.ts +0 -28
  274. package/src/api/ui/scroll/index.ts +0 -85
  275. package/src/api/ui/sticky.ts +0 -4
  276. package/src/api/ui/tab-bar.ts +0 -327
  277. package/src/api/ui/window.ts +0 -38
  278. package/src/api/worker/index.ts +0 -4
  279. package/src/api/wxml/index.ts +0 -10
  280. package/src/api/wxml/nodesRef.ts +0 -56
  281. package/src/api/wxml/selectorQuery.ts +0 -220
  282. package/src/index.ts +0 -6
  283. package/src/utils/animation.ts +0 -15
  284. package/src/utils/handler.ts +0 -105
  285. package/src/utils/index.ts +0 -179
  286. package/src/utils/lodash.ts +0 -30
  287. package/src/utils/valid.ts +0 -8
@@ -0,0 +1,61 @@
1
+ export default class ActionSheet {
2
+ options: {
3
+ itemList: never[];
4
+ itemColor: string;
5
+ success: () => void;
6
+ fail: () => void;
7
+ complete: () => void;
8
+ };
9
+ style: {
10
+ maskStyle: {
11
+ position: string;
12
+ 'z-index': string;
13
+ top: string;
14
+ right: string;
15
+ left: string;
16
+ bottom: string;
17
+ background: string;
18
+ };
19
+ actionSheetStyle: {
20
+ 'z-index': string;
21
+ position: string;
22
+ left: string;
23
+ bottom: string;
24
+ '-webkit-transform': string;
25
+ transform: string;
26
+ width: string;
27
+ 'line-height': string;
28
+ background: string;
29
+ '-webkit-transition': string;
30
+ transition: string;
31
+ };
32
+ menuStyle: {
33
+ 'background-color': string;
34
+ };
35
+ cellStyle: {
36
+ position: string;
37
+ padding: string;
38
+ 'text-align': string;
39
+ 'font-size': string;
40
+ };
41
+ cancelStyle: {
42
+ 'margin-top': string;
43
+ padding: string;
44
+ 'text-align': string;
45
+ 'font-size': string;
46
+ color: string;
47
+ 'background-color': string;
48
+ };
49
+ };
50
+ lastConfig: {};
51
+ el: HTMLDivElement;
52
+ actionSheet: HTMLDivElement;
53
+ menu: HTMLDivElement;
54
+ cells: HTMLDivElement[];
55
+ cancel: HTMLDivElement;
56
+ hideOpacityTimer: ReturnType<typeof setTimeout>;
57
+ hideDisplayTimer: ReturnType<typeof setTimeout>;
58
+ create(options?: {}): Promise<string | number>;
59
+ show(options?: {}): Promise<string | number>;
60
+ hide(): void;
61
+ }
@@ -0,0 +1,14 @@
1
+ import Taro from '@tarojs/api';
2
+ declare const showToast: typeof Taro.showToast;
3
+ declare const hideToast: typeof Taro.hideToast;
4
+ declare const showLoading: typeof Taro.showLoading;
5
+ declare const hideLoading: typeof Taro.hideLoading;
6
+ declare const showModal: typeof Taro.showModal;
7
+ declare const showActionSheet: typeof Taro.showActionSheet;
8
+ declare const enableAlertBeforeUnload: () => Promise<{
9
+ errMsg: string;
10
+ }>;
11
+ declare const disableAlertBeforeUnload: () => Promise<{
12
+ errMsg: string;
13
+ }>;
14
+ export { disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast };
@@ -0,0 +1,69 @@
1
+ export default class Modal {
2
+ options: {
3
+ title: string;
4
+ content: string;
5
+ showCancel: boolean;
6
+ cancelText: string;
7
+ cancelColor: string;
8
+ confirmText: string;
9
+ confirmColor: string;
10
+ };
11
+ style: {
12
+ maskStyle: {
13
+ position: string;
14
+ 'z-index': string;
15
+ top: string;
16
+ right: string;
17
+ left: string;
18
+ bottom: string;
19
+ background: string;
20
+ };
21
+ modalStyle: {
22
+ 'z-index': string;
23
+ position: string;
24
+ top: string;
25
+ left: string;
26
+ transform: string;
27
+ width: string;
28
+ 'max-width': string;
29
+ 'border-radius': string;
30
+ 'text-align': string;
31
+ 'line-height': string;
32
+ overflow: string;
33
+ background: string;
34
+ };
35
+ titleStyle: {
36
+ padding: string;
37
+ 'font-size': string;
38
+ };
39
+ textStyle: {
40
+ padding: string;
41
+ 'min-height': string;
42
+ 'font-size': string;
43
+ 'line-height': string;
44
+ color: string;
45
+ };
46
+ footStyle: {
47
+ position: string;
48
+ 'line-height': string;
49
+ 'font-size': string;
50
+ display: string;
51
+ };
52
+ btnStyle: {
53
+ position: string;
54
+ '-webkit-box-flex': string;
55
+ '-webkit-flex': string;
56
+ flex: string;
57
+ };
58
+ };
59
+ el: HTMLDivElement;
60
+ title: HTMLDivElement;
61
+ text: HTMLDivElement;
62
+ cancel: HTMLDivElement;
63
+ confirm: HTMLDivElement;
64
+ hideOpacityTimer: ReturnType<typeof setTimeout>;
65
+ hideDisplayTimer: ReturnType<typeof setTimeout>;
66
+ create(options?: {}): Promise<string>;
67
+ show(options?: {}): Promise<string>;
68
+ hide(): void;
69
+ }
@@ -143,6 +143,7 @@ export default class Modal {
143
143
  this.text.setAttribute('style', inlineStyle(textStyle));
144
144
  }
145
145
  else {
146
+ this.title.textContent = '';
146
147
  // block => none
147
148
  this.title.style.display = 'none';
148
149
  const textCSS = Object.assign(Object.assign({}, textStyle), { padding: '40px 20px 26px', color: '#353535' });
@@ -0,0 +1,85 @@
1
+ export default class Toast {
2
+ options: {
3
+ title: string;
4
+ icon: string;
5
+ image: string;
6
+ duration: number;
7
+ mask: boolean;
8
+ };
9
+ style: {
10
+ maskStyle: {
11
+ position: string;
12
+ 'z-index': string;
13
+ top: string;
14
+ right: string;
15
+ left: string;
16
+ bottom: string;
17
+ };
18
+ toastStyle: {
19
+ 'z-index': string;
20
+ 'box-sizing': string;
21
+ display: string;
22
+ 'flex-direction': string;
23
+ 'justify-content': string;
24
+ '-webkit-justify-content': string;
25
+ position: string;
26
+ top: string;
27
+ left: string;
28
+ 'min-width': string;
29
+ 'max-width': string;
30
+ 'min-height': string;
31
+ padding: string;
32
+ transform: string;
33
+ 'border-radius': string;
34
+ 'text-align': string;
35
+ 'line-height': string;
36
+ color: string;
37
+ background: string;
38
+ };
39
+ successStyle: {
40
+ margin: string;
41
+ width: string;
42
+ height: string;
43
+ background: string;
44
+ 'background-size': string;
45
+ };
46
+ errrorStyle: {
47
+ margin: string;
48
+ width: string;
49
+ height: string;
50
+ background: string;
51
+ 'background-size': string;
52
+ };
53
+ loadingStyle: {
54
+ margin: string;
55
+ width: string;
56
+ height: string;
57
+ '-webkit-animation': string;
58
+ animation: string;
59
+ background: string;
60
+ 'background-size': string;
61
+ };
62
+ imageStyle: {
63
+ margin: string;
64
+ width: string;
65
+ height: string;
66
+ background: string;
67
+ 'background-size': string;
68
+ };
69
+ textStyle: {
70
+ margin: string;
71
+ 'font-size': string;
72
+ };
73
+ };
74
+ el: HTMLDivElement;
75
+ mask: HTMLDivElement;
76
+ icon: HTMLParagraphElement;
77
+ toast: HTMLDivElement;
78
+ title: HTMLParagraphElement;
79
+ type: any;
80
+ hideOpacityTimer: ReturnType<typeof setTimeout>;
81
+ hideDisplayTimer: ReturnType<typeof setTimeout>;
82
+ create(options?: {}, _type?: 'loading' | 'toast'): string;
83
+ show(options?: {}, _type?: 'loading' | 'toast'): string;
84
+ hide(duration: number | undefined, type: any): void;
85
+ }
@@ -0,0 +1,3 @@
1
+ export declare const getMenuButtonBoundingClientRect: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,15 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const showNavigationBarLoading: () => Promise<{
3
+ errMsg: string;
4
+ }>;
5
+ export declare function setNavigationBarTitle(options: any): Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
+ /**
7
+ * 设置页面导航条颜色
8
+ */
9
+ export declare const setNavigationBarColor: typeof Taro.setNavigationBarColor;
10
+ export declare const hideNavigationBarLoading: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const hideHomeButton: () => Promise<{
14
+ errMsg: string;
15
+ }>;
@@ -1,3 +1,4 @@
1
+ import { setTitle } from '@tarojs/router/dist/utils/navigate';
1
2
  import { getParameterError, shouldBeObject, temporarilyNotSupport } from '../../../utils';
2
3
  import { MethodHandler } from '../../../utils/handler';
3
4
  // 导航栏
@@ -21,9 +22,7 @@ export function setNavigationBarTitle(options) {
21
22
  })
22
23
  });
23
24
  }
24
- if (document.title !== title) {
25
- document.title = title;
26
- }
25
+ setTitle(title);
27
26
  return handle.success();
28
27
  }
29
28
  /**
@@ -0,0 +1,9 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 开始下拉刷新。调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。
4
+ */
5
+ export declare const startPullDownRefresh: typeof Taro.startPullDownRefresh;
6
+ /**
7
+ * 停止当前页面下拉刷新。
8
+ */
9
+ export declare const stopPullDownRefresh: typeof Taro.stopPullDownRefresh;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 将页面滚动到目标位置
4
+ */
5
+ export declare const pageScrollTo: typeof Taro.pageScrollTo;
@@ -0,0 +1,3 @@
1
+ export declare const setTopBarText: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,34 @@
1
+ import Taro, { AppConfig } from '@tarojs/api';
2
+ export declare function initTabBarApis(config?: AppConfig): void;
3
+ /**
4
+ * 显示 tabBar 某一项的右上角的红点
5
+ */
6
+ export declare const showTabBarRedDot: typeof Taro.showTabBarRedDot;
7
+ /**
8
+ * 显示 tabBar
9
+ */
10
+ export declare const showTabBar: typeof Taro.showTabBar;
11
+ /**
12
+ * 动态设置 tabBar 的整体样式
13
+ */
14
+ export declare const setTabBarStyle: typeof Taro.setTabBarStyle;
15
+ /**
16
+ * 动态设置 tabBar 某一项的内容
17
+ */
18
+ export declare const setTabBarItem: typeof Taro.setTabBarItem;
19
+ /**
20
+ * 为 tabBar 某一项的右上角添加文本
21
+ */
22
+ export declare const setTabBarBadge: typeof Taro.setTabBarBadge;
23
+ /**
24
+ * 移除 tabBar 某一项右上角的文本
25
+ */
26
+ export declare const removeTabBarBadge: typeof Taro.removeTabBarBadge;
27
+ /**
28
+ * 隐藏 tabBar 某一项的右上角的红点
29
+ */
30
+ export declare const hideTabBarRedDot: typeof Taro.hideTabBarRedDot;
31
+ /**
32
+ * 隐藏 tabBar
33
+ */
34
+ export declare const hideTabBar: typeof Taro.hideTabBar;
@@ -0,0 +1,15 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 设置窗口大小,该接口仅适用于 PC 平台,使用细则请参见指南
4
+ */
5
+ export declare const setWindowSize: () => Promise<{
6
+ errMsg: string;
7
+ }>;
8
+ /**
9
+ * 监听窗口尺寸变化事件
10
+ */
11
+ export declare const onWindowResize: typeof Taro.onWindowResize;
12
+ /**
13
+ * 取消监听窗口尺寸变化事件
14
+ */
15
+ export declare const offWindowResize: typeof Taro.offWindowResize;
@@ -0,0 +1,3 @@
1
+ export declare const createWorker: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const createSelectorQuery: typeof Taro.createSelectorQuery;
3
+ export declare const createIntersectionObserver: () => Promise<{
4
+ errMsg: string;
5
+ }>;
@@ -0,0 +1,13 @@
1
+ import { SelectorQuery } from './selectorQuery';
2
+ export declare class NodesRef implements Taro.NodesRef {
3
+ _component?: TaroGeneral.IAnyObject;
4
+ _selector: string;
5
+ _selectorQuery: SelectorQuery;
6
+ _single: boolean;
7
+ constructor(selector: string, querySelectorQuery: SelectorQuery, single: boolean);
8
+ context(cb: any): SelectorQuery;
9
+ node(cb: any): SelectorQuery;
10
+ boundingClientRect(cb: any): SelectorQuery;
11
+ scrollOffset(cb: any): SelectorQuery;
12
+ fields(fields: any, cb: any): SelectorQuery;
13
+ }
@@ -0,0 +1,24 @@
1
+ import Taro from '@tarojs/api';
2
+ import { NodesRef } from './nodesRef';
3
+ interface ISelectorQueryQueue {
4
+ component: TaroGeneral.IAnyObject;
5
+ selector: string;
6
+ single: boolean;
7
+ fields: any;
8
+ }
9
+ declare type TSelectorQueryQueueCallback = (res: ISelectorQueryQueue) => void;
10
+ export declare class SelectorQuery implements Taro.SelectorQuery {
11
+ _defaultWebviewId: string | null;
12
+ _webviewId: string | null;
13
+ _queue: ISelectorQueryQueue[];
14
+ _queueCb: (TSelectorQueryQueueCallback | null)[];
15
+ _component?: TaroGeneral.IAnyObject;
16
+ constructor();
17
+ in(component: TaroGeneral.IAnyObject): this;
18
+ select(selector: string): NodesRef;
19
+ selectAll(selector: string): NodesRef;
20
+ selectViewport(): NodesRef;
21
+ exec(cb: any): Taro.NodesRef;
22
+ _push(selector: string, component: any, single: any, fields: any, callback?: TSelectorQueryQueueCallback | null): void;
23
+ }
24
+ export {};
@@ -25,7 +25,7 @@ function filter(fields, dom, selector) {
25
25
  }
26
26
  }
27
27
  else {
28
- // TODO https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html
28
+ // TODO https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/ScrollViewContext.html
29
29
  // if (/^taro-scroll-view-core/i.test(tagName))
30
30
  res.nodeCanvasType = '';
31
31
  res.node = dom;