@tarojs/taro-h5 3.4.8 → 3.5.0-alpha.10

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 (382) hide show
  1. package/dist/api/ad/index.js +1 -1
  2. package/dist/api/ai/facial.js +1 -1
  3. package/dist/api/ai/visual.js +1 -1
  4. package/dist/api/alipay/index.js +1 -1
  5. package/dist/api/base/crypto.js +1 -1
  6. package/dist/api/base/debug.js +1 -1
  7. package/dist/api/base/index.js +1 -1
  8. package/dist/api/base/performance.js +1 -1
  9. package/dist/api/base/system.js +30 -26
  10. package/dist/api/base/update.js +1 -1
  11. package/dist/api/base/weapp/app-event.js +1 -1
  12. package/dist/api/base/weapp/life-cycle.js +1 -1
  13. package/dist/api/canvas/CanvasContext.js +27 -16
  14. package/dist/api/canvas/canvasGetImageData.js +2 -2
  15. package/dist/api/canvas/canvasPutImageData.js +2 -2
  16. package/dist/api/canvas/canvasToTempFilePath.js +2 -2
  17. package/dist/api/canvas/createCanvasContext.js +1 -1
  18. package/dist/api/canvas/index.js +1 -1
  19. package/dist/api/cloud/index.js +1 -1
  20. package/dist/api/data-analysis/index.js +1 -1
  21. package/dist/api/device/accelerometer.js +2 -2
  22. package/dist/api/device/accessibility.js +1 -1
  23. package/dist/api/device/battery.js +14 -5
  24. package/dist/api/device/bluetooth-ble.js +1 -1
  25. package/dist/api/device/bluetooth-peripheral.js +1 -1
  26. package/dist/api/device/bluetooth.js +1 -1
  27. package/dist/api/device/calendar.js +1 -1
  28. package/dist/api/device/clipboard.js +14 -5
  29. package/dist/api/device/compass.js +2 -2
  30. package/dist/api/device/contact.js +1 -1
  31. package/dist/api/device/crypto.js +1 -1
  32. package/dist/api/device/gyroscope.js +1 -1
  33. package/dist/api/device/iBeacon.js +1 -1
  34. package/dist/api/device/keyboard.js +1 -1
  35. package/dist/api/device/memory.js +1 -1
  36. package/dist/api/device/motion.js +2 -2
  37. package/dist/api/device/network.js +14 -5
  38. package/dist/api/device/nfc.js +1 -1
  39. package/dist/api/device/phone.js +2 -2
  40. package/dist/api/device/scan.js +1 -1
  41. package/dist/api/device/screen.js +1 -1
  42. package/dist/api/device/vibrate.js +1 -1
  43. package/dist/api/device/wifi.js +1 -1
  44. package/dist/api/ext/index.js +1 -1
  45. package/dist/api/files/index.js +1 -1
  46. package/dist/api/location/chooseLocation.js +14 -9
  47. package/dist/api/location/getLocation.js +2 -2
  48. package/dist/api/location/index.js +1 -1
  49. package/dist/api/media/EditorContext.js +1 -1
  50. package/dist/api/media/audio/InnerAudioContext.js +2 -2
  51. package/dist/api/media/audio/index.js +1 -1
  52. package/dist/api/media/background-audio/BackgroundAudioManager.js +2 -2
  53. package/dist/api/media/background-audio/index.js +1 -1
  54. package/dist/api/media/camera.js +1 -1
  55. package/dist/api/media/image/chooseImage.js +2 -2
  56. package/dist/api/media/image/getImageInfo.js +2 -2
  57. package/dist/api/media/image/index.js +1 -1
  58. package/dist/api/media/image/previewImage.js +14 -5
  59. package/dist/api/media/live.js +1 -1
  60. package/dist/api/media/map.js +1 -1
  61. package/dist/api/media/media-recorder.js +1 -1
  62. package/dist/api/media/recorder.js +1 -1
  63. package/dist/api/media/video/index.js +2 -2
  64. package/dist/api/media/video-decoder.js +1 -1
  65. package/dist/api/media/video-processing.js +1 -1
  66. package/dist/api/media/voip.js +1 -1
  67. package/dist/api/navigate/index.js +1 -1
  68. package/dist/api/network/download.js +1 -1
  69. package/dist/api/network/mdns.js +1 -1
  70. package/dist/api/network/request/index.js +1 -1
  71. package/dist/api/network/tcp.js +1 -1
  72. package/dist/api/network/udp.js +1 -1
  73. package/dist/api/network/upload.js +1 -1
  74. package/dist/api/network/websocket/index.js +2 -2
  75. package/dist/api/open-api/account.js +1 -1
  76. package/dist/api/open-api/address.js +1 -1
  77. package/dist/api/open-api/authorize.js +1 -1
  78. package/dist/api/open-api/card.js +1 -1
  79. package/dist/api/open-api/channels-live.js +1 -1
  80. package/dist/api/open-api/customer-service.js +1 -1
  81. package/dist/api/open-api/facial.js +1 -1
  82. package/dist/api/open-api/favorites.js +1 -1
  83. package/dist/api/open-api/group.js +1 -1
  84. package/dist/api/open-api/invoice.js +1 -1
  85. package/dist/api/open-api/license-plate.js +1 -1
  86. package/dist/api/open-api/login.js +1 -1
  87. package/dist/api/open-api/red-package.js +1 -1
  88. package/dist/api/open-api/settings.js +1 -1
  89. package/dist/api/open-api/soter.js +1 -1
  90. package/dist/api/open-api/subscribe-message.js +1 -1
  91. package/dist/api/open-api/user-info.js +1 -1
  92. package/dist/api/open-api/werun.js +1 -1
  93. package/dist/api/payment/index.js +1 -1
  94. package/dist/api/share/index.js +1 -1
  95. package/dist/api/storage/background-fetch.js +1 -1
  96. package/dist/api/storage/index.js +2 -2
  97. package/dist/api/swan/index.js +1 -1
  98. package/dist/api/taro.js +3 -4
  99. package/dist/api/ui/background.js +1 -1
  100. package/dist/api/ui/fonts.js +13 -4
  101. package/dist/api/ui/interaction/actionSheet.js +4 -13
  102. package/dist/api/ui/interaction/index.js +19 -10
  103. package/dist/api/ui/interaction/modal.js +7 -28
  104. package/dist/api/ui/interaction/toast.js +15 -41
  105. package/dist/api/ui/menu.js +1 -1
  106. package/dist/api/ui/navigation-bar/index.js +2 -2
  107. package/dist/api/ui/pull-down-refresh.js +1 -1
  108. package/dist/api/ui/scroll/index.js +2 -2
  109. package/dist/api/ui/sticky.js +1 -1
  110. package/dist/api/ui/tab-bar.js +2 -2
  111. package/dist/api/ui/window.js +2 -2
  112. package/dist/api/worker/index.js +1 -1
  113. package/dist/api/wxml/index.js +1 -1
  114. package/dist/api/wxml/selectorQuery.js +1 -1
  115. package/dist/index.cjs.js +326 -156
  116. package/dist/index.cjs.js.map +1 -1
  117. package/dist/index.esm.js +5170 -0
  118. package/dist/index.esm.js.map +1 -0
  119. package/dist/{api/utils → utils}/animation.js +0 -0
  120. package/dist/{api/utils → utils}/handler.js +0 -0
  121. package/dist/{api/utils → utils}/index.js +0 -0
  122. package/dist/{api/utils → utils}/lodash.js +0 -0
  123. package/dist/{api/utils → utils}/valid.js +0 -0
  124. package/package.json +14 -14
  125. package/src/api/ad/index.ts +1 -1
  126. package/src/api/ai/facial.ts +1 -1
  127. package/src/api/ai/visual.ts +1 -1
  128. package/src/api/alipay/index.ts +1 -1
  129. package/src/api/base/crypto.ts +1 -1
  130. package/src/api/base/debug.ts +1 -1
  131. package/src/api/base/index.ts +1 -1
  132. package/src/api/base/performance.ts +1 -1
  133. package/src/api/base/system.ts +2 -2
  134. package/src/api/base/update.ts +1 -1
  135. package/src/api/base/weapp/app-event.ts +1 -1
  136. package/src/api/base/weapp/life-cycle.ts +1 -1
  137. package/src/api/canvas/canvasGetImageData.ts +2 -2
  138. package/src/api/canvas/canvasPutImageData.ts +2 -2
  139. package/src/api/canvas/canvasToTempFilePath.ts +2 -2
  140. package/src/api/canvas/createCanvasContext.ts +1 -1
  141. package/src/api/canvas/index.ts +1 -1
  142. package/src/api/cloud/index.ts +1 -1
  143. package/src/api/data-analysis/index.ts +1 -1
  144. package/src/api/device/accelerometer.ts +2 -2
  145. package/src/api/device/accessibility.ts +1 -1
  146. package/src/api/device/battery.ts +2 -2
  147. package/src/api/device/bluetooth-ble.ts +1 -1
  148. package/src/api/device/bluetooth-peripheral.ts +1 -1
  149. package/src/api/device/bluetooth.ts +1 -1
  150. package/src/api/device/calendar.ts +1 -1
  151. package/src/api/device/clipboard.ts +1 -1
  152. package/src/api/device/compass.ts +2 -2
  153. package/src/api/device/contact.ts +1 -1
  154. package/src/api/device/crypto.ts +1 -1
  155. package/src/api/device/gyroscope.ts +1 -1
  156. package/src/api/device/iBeacon.ts +1 -1
  157. package/src/api/device/keyboard.ts +1 -1
  158. package/src/api/device/memory.ts +1 -1
  159. package/src/api/device/motion.ts +2 -2
  160. package/src/api/device/network.ts +2 -2
  161. package/src/api/device/nfc.ts +1 -1
  162. package/src/api/device/phone.ts +2 -2
  163. package/src/api/device/scan.ts +1 -1
  164. package/src/api/device/screen.ts +1 -1
  165. package/src/api/device/vibrate.ts +1 -1
  166. package/src/api/device/wifi.ts +1 -1
  167. package/src/api/ext/index.ts +1 -1
  168. package/src/api/files/index.ts +1 -1
  169. package/src/api/location/chooseLocation.ts +1 -1
  170. package/src/api/location/getLocation.ts +2 -2
  171. package/src/api/location/index.ts +1 -1
  172. package/src/api/media/EditorContext.ts +1 -1
  173. package/src/api/media/audio/InnerAudioContext.ts +2 -2
  174. package/src/api/media/audio/index.ts +1 -1
  175. package/src/api/media/background-audio/BackgroundAudioManager.ts +2 -2
  176. package/src/api/media/background-audio/index.ts +1 -1
  177. package/src/api/media/camera.ts +1 -1
  178. package/src/api/media/image/chooseImage.ts +2 -2
  179. package/src/api/media/image/getImageInfo.ts +2 -2
  180. package/src/api/media/image/index.ts +1 -1
  181. package/src/api/media/image/previewImage.ts +2 -2
  182. package/src/api/media/live.ts +1 -1
  183. package/src/api/media/map.ts +1 -1
  184. package/src/api/media/media-recorder.ts +1 -1
  185. package/src/api/media/recorder.ts +1 -1
  186. package/src/api/media/video/index.ts +2 -2
  187. package/src/api/media/video-decoder.ts +1 -1
  188. package/src/api/media/video-processing.ts +1 -1
  189. package/src/api/media/voip.ts +1 -1
  190. package/src/api/navigate/index.ts +1 -1
  191. package/src/api/network/download.ts +2 -2
  192. package/src/api/network/mdns.ts +1 -1
  193. package/src/api/network/request/index.ts +1 -1
  194. package/src/api/network/tcp.ts +1 -1
  195. package/src/api/network/udp.ts +1 -1
  196. package/src/api/network/upload.ts +2 -2
  197. package/src/api/network/websocket/index.ts +2 -2
  198. package/src/api/open-api/account.ts +1 -1
  199. package/src/api/open-api/address.ts +1 -1
  200. package/src/api/open-api/authorize.ts +1 -1
  201. package/src/api/open-api/card.ts +1 -1
  202. package/src/api/open-api/channels-live.ts +1 -1
  203. package/src/api/open-api/customer-service.ts +1 -1
  204. package/src/api/open-api/facial.ts +1 -1
  205. package/src/api/open-api/favorites.ts +1 -1
  206. package/src/api/open-api/group.ts +1 -1
  207. package/src/api/open-api/invoice.ts +1 -1
  208. package/src/api/open-api/license-plate.ts +1 -1
  209. package/src/api/open-api/login.ts +1 -1
  210. package/src/api/open-api/red-package.ts +1 -1
  211. package/src/api/open-api/settings.ts +1 -1
  212. package/src/api/open-api/soter.ts +1 -1
  213. package/src/api/open-api/subscribe-message.ts +1 -1
  214. package/src/api/open-api/user-info.ts +1 -1
  215. package/src/api/open-api/werun.ts +1 -1
  216. package/src/api/payment/index.ts +1 -1
  217. package/src/api/share/index.ts +1 -1
  218. package/src/api/storage/background-fetch.ts +1 -1
  219. package/src/api/storage/index.ts +2 -2
  220. package/src/api/swan/index.ts +1 -1
  221. package/src/api/taro.ts +3 -8
  222. package/src/api/ui/background.ts +1 -1
  223. package/src/api/ui/fonts.ts +1 -1
  224. package/src/api/ui/interaction/actionSheet.ts +3 -3
  225. package/src/api/ui/interaction/index.ts +2 -2
  226. package/src/api/ui/interaction/modal.ts +3 -3
  227. package/src/api/ui/interaction/toast.ts +3 -3
  228. package/src/api/ui/menu.ts +1 -1
  229. package/src/api/ui/navigation-bar/index.ts +2 -2
  230. package/src/api/ui/pull-down-refresh.ts +1 -1
  231. package/src/api/ui/scroll/index.ts +3 -3
  232. package/src/api/ui/sticky.ts +1 -1
  233. package/src/api/ui/tab-bar.ts +2 -2
  234. package/src/api/ui/window.ts +2 -2
  235. package/src/api/worker/index.ts +1 -1
  236. package/src/api/wxml/index.ts +1 -1
  237. package/src/api/wxml/selectorQuery.ts +1 -1
  238. package/src/{api/utils → utils}/animation.ts +0 -0
  239. package/src/{api/utils → utils}/handler.ts +0 -0
  240. package/src/{api/utils → utils}/index.ts +0 -0
  241. package/src/{api/utils → utils}/lodash.ts +2 -2
  242. package/src/{api/utils → utils}/valid.ts +0 -0
  243. package/dist/dist/api/ad/index.d.ts +0 -6
  244. package/dist/dist/api/ai/facial.d.ts +0 -9
  245. package/dist/dist/api/ai/index.d.ts +0 -2
  246. package/dist/dist/api/ai/visual.d.ts +0 -6
  247. package/dist/dist/api/alipay/index.d.ts +0 -3
  248. package/dist/dist/api/base/crypto.d.ts +0 -3
  249. package/dist/dist/api/base/debug.d.ts +0 -9
  250. package/dist/dist/api/base/index.d.ts +0 -12
  251. package/dist/dist/api/base/performance.d.ts +0 -6
  252. package/dist/dist/api/base/system.d.ts +0 -25
  253. package/dist/dist/api/base/update.d.ts +0 -6
  254. package/dist/dist/api/base/weapp/app-event.d.ts +0 -48
  255. package/dist/dist/api/base/weapp/life-cycle.d.ts +0 -6
  256. package/dist/dist/api/canvas/CanvasContext.d.ts +0 -104
  257. package/dist/dist/api/canvas/canvasGetImageData.d.ts +0 -5
  258. package/dist/dist/api/canvas/canvasPutImageData.d.ts +0 -6
  259. package/dist/dist/api/canvas/canvasToTempFilePath.d.ts +0 -6
  260. package/dist/dist/api/canvas/createCanvasContext.d.ts +0 -5
  261. package/dist/dist/api/canvas/index.d.ts +0 -12
  262. package/dist/dist/api/cloud/index.d.ts +0 -31
  263. package/dist/dist/api/data-analysis/index.d.ts +0 -12
  264. package/dist/dist/api/device/accelerometer.d.ts +0 -17
  265. package/dist/dist/api/device/accessibility.d.ts +0 -3
  266. package/dist/dist/api/device/battery.d.ts +0 -5
  267. package/dist/dist/api/device/bluetooth-ble.d.ts +0 -48
  268. package/dist/dist/api/device/bluetooth-peripheral.d.ts +0 -9
  269. package/dist/dist/api/device/bluetooth.d.ts +0 -39
  270. package/dist/dist/api/device/calendar.d.ts +0 -6
  271. package/dist/dist/api/device/clipboard.d.ts +0 -15
  272. package/dist/dist/api/device/compass.d.ts +0 -17
  273. package/dist/dist/api/device/contact.d.ts +0 -6
  274. package/dist/dist/api/device/crypto.d.ts +0 -3
  275. package/dist/dist/api/device/gyroscope.d.ts +0 -12
  276. package/dist/dist/api/device/iBeacon.d.ts +0 -21
  277. package/dist/dist/api/device/index.d.ts +0 -23
  278. package/dist/dist/api/device/keyboard.d.ts +0 -12
  279. package/dist/dist/api/device/memory.d.ts +0 -6
  280. package/dist/dist/api/device/motion.d.ts +0 -17
  281. package/dist/dist/api/device/network.d.ts +0 -20
  282. package/dist/dist/api/device/nfc.d.ts +0 -21
  283. package/dist/dist/api/device/phone.d.ts +0 -2
  284. package/dist/dist/api/device/scan.d.ts +0 -3
  285. package/dist/dist/api/device/screen.d.ts +0 -18
  286. package/dist/dist/api/device/vibrate.d.ts +0 -9
  287. package/dist/dist/api/device/wifi.d.ts +0 -33
  288. package/dist/dist/api/ext/index.d.ts +0 -6
  289. package/dist/dist/api/files/index.d.ts +0 -24
  290. package/dist/dist/api/framework/index.d.ts +0 -4
  291. package/dist/dist/api/index.d.ts +0 -24
  292. package/dist/dist/api/location/chooseLocation.d.ts +0 -6
  293. package/dist/dist/api/location/getLocation.d.ts +0 -2
  294. package/dist/dist/api/location/index.d.ts +0 -29
  295. package/dist/dist/api/media/EditorContext.d.ts +0 -42
  296. package/dist/dist/api/media/audio/InnerAudioContext.d.ts +0 -58
  297. package/dist/dist/api/media/audio/index.d.ts +0 -29
  298. package/dist/dist/api/media/background-audio/BackgroundAudioManager.d.ts +0 -71
  299. package/dist/dist/api/media/background-audio/index.d.ts +0 -29
  300. package/dist/dist/api/media/camera.d.ts +0 -3
  301. package/dist/dist/api/media/image/chooseImage.d.ts +0 -5
  302. package/dist/dist/api/media/image/getImageInfo.d.ts +0 -5
  303. package/dist/dist/api/media/image/index.d.ts +0 -15
  304. package/dist/dist/api/media/image/previewImage.d.ts +0 -8
  305. package/dist/dist/api/media/index.d.ts +0 -12
  306. package/dist/dist/api/media/live.d.ts +0 -6
  307. package/dist/dist/api/media/map.d.ts +0 -3
  308. package/dist/dist/api/media/media-recorder.d.ts +0 -3
  309. package/dist/dist/api/media/recorder.d.ts +0 -9
  310. package/dist/dist/api/media/video/index.d.ts +0 -24
  311. package/dist/dist/api/media/video-decoder.d.ts +0 -3
  312. package/dist/dist/api/media/video-processing.d.ts +0 -3
  313. package/dist/dist/api/media/voip.d.ts +0 -42
  314. package/dist/dist/api/navigate/index.d.ts +0 -12
  315. package/dist/dist/api/network/download.d.ts +0 -6
  316. package/dist/dist/api/network/index.d.ts +0 -7
  317. package/dist/dist/api/network/mdns.d.ts +0 -30
  318. package/dist/dist/api/network/request/index.d.ts +0 -4
  319. package/dist/dist/api/network/tcp.d.ts +0 -3
  320. package/dist/dist/api/network/udp.d.ts +0 -3
  321. package/dist/dist/api/network/upload.d.ts +0 -5
  322. package/dist/dist/api/network/utils.d.ts +0 -44
  323. package/dist/dist/api/network/websocket/index.d.ts +0 -7
  324. package/dist/dist/api/network/websocket/socketTask.d.ts +0 -25
  325. package/dist/dist/api/open-api/account.d.ts +0 -3
  326. package/dist/dist/api/open-api/address.d.ts +0 -3
  327. package/dist/dist/api/open-api/authorize.d.ts +0 -6
  328. package/dist/dist/api/open-api/card.d.ts +0 -6
  329. package/dist/dist/api/open-api/channels-live.d.ts +0 -18
  330. package/dist/dist/api/open-api/customer-service.d.ts +0 -3
  331. package/dist/dist/api/open-api/facial.d.ts +0 -12
  332. package/dist/dist/api/open-api/favorites.d.ts +0 -6
  333. package/dist/dist/api/open-api/group.d.ts +0 -3
  334. package/dist/dist/api/open-api/index.d.ts +0 -18
  335. package/dist/dist/api/open-api/invoice.d.ts +0 -6
  336. package/dist/dist/api/open-api/license-plate.d.ts +0 -3
  337. package/dist/dist/api/open-api/login.d.ts +0 -9
  338. package/dist/dist/api/open-api/red-package.d.ts +0 -3
  339. package/dist/dist/api/open-api/settings.d.ts +0 -6
  340. package/dist/dist/api/open-api/soter.d.ts +0 -9
  341. package/dist/dist/api/open-api/subscribe-message.d.ts +0 -3
  342. package/dist/dist/api/open-api/user-info.d.ts +0 -6
  343. package/dist/dist/api/open-api/werun.d.ts +0 -6
  344. package/dist/dist/api/payment/index.d.ts +0 -6
  345. package/dist/dist/api/route/index.d.ts +0 -1
  346. package/dist/dist/api/share/index.d.ts +0 -30
  347. package/dist/dist/api/storage/background-fetch.d.ts +0 -12
  348. package/dist/dist/api/storage/index.d.ts +0 -18
  349. package/dist/dist/api/swan/index.d.ts +0 -63
  350. package/dist/dist/api/taro.d.ts +0 -12
  351. package/dist/dist/api/ui/animation/index.d.ts +0 -2
  352. package/dist/dist/api/ui/background.d.ts +0 -6
  353. package/dist/dist/api/ui/custom-component.d.ts +0 -1
  354. package/dist/dist/api/ui/fonts.d.ts +0 -2
  355. package/dist/dist/api/ui/index.d.ts +0 -12
  356. package/dist/dist/api/ui/interaction/actionSheet.d.ts +0 -61
  357. package/dist/dist/api/ui/interaction/index.d.ts +0 -14
  358. package/dist/dist/api/ui/interaction/modal.d.ts +0 -69
  359. package/dist/dist/api/ui/interaction/toast.d.ts +0 -85
  360. package/dist/dist/api/ui/menu.d.ts +0 -3
  361. package/dist/dist/api/ui/navigation-bar/index.d.ts +0 -15
  362. package/dist/dist/api/ui/pull-down-refresh.d.ts +0 -9
  363. package/dist/dist/api/ui/scroll/index.d.ts +0 -5
  364. package/dist/dist/api/ui/sticky.d.ts +0 -3
  365. package/dist/dist/api/ui/tab-bar.d.ts +0 -34
  366. package/dist/dist/api/ui/window.d.ts +0 -15
  367. package/dist/dist/api/utils/animation.d.ts +0 -6
  368. package/dist/dist/api/utils/handler.d.ts +0 -48
  369. package/dist/dist/api/utils/index.d.ts +0 -39
  370. package/dist/dist/api/utils/lodash.d.ts +0 -2
  371. package/dist/dist/api/utils/valid.d.ts +0 -2
  372. package/dist/dist/api/worker/index.d.ts +0 -3
  373. package/dist/dist/api/wxml/index.d.ts +0 -5
  374. package/dist/dist/api/wxml/nodesRef.d.ts +0 -13
  375. package/dist/dist/api/wxml/selectorQuery.d.ts +0 -24
  376. package/dist/dist/index.d.ts +0 -4
  377. package/dist/dist/types/type.d.ts +0 -29
  378. package/dist/types/type.js +0 -2
  379. package/src/types/api.d.ts +0 -4
  380. package/src/types/define.d.ts +0 -2
  381. package/src/types/index.d.ts +0 -3
  382. package/src/types/type.ts +0 -32
@@ -1,4 +1,4 @@
1
- import { processOpenApi, temporarilyNotSupport } from '../utils/index';
1
+ import { processOpenApi, temporarilyNotSupport } from '../../utils/index';
2
2
  // 位置
3
3
  export const stopLocationUpdate = temporarilyNotSupport('stopLocationUpdate');
4
4
  export const startLocationUpdateBackground = temporarilyNotSupport('startLocationUpdateBackground');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 富文本
3
3
  export class EditorContext {
4
4
  constructor() {
@@ -1,6 +1,6 @@
1
1
  import Taro from '@tarojs/api';
2
- import { permanentlyNotSupport } from '../../utils';
3
- import { CallbackManager } from '../../utils/handler';
2
+ import { permanentlyNotSupport } from '../../../utils';
3
+ import { CallbackManager } from '../../../utils/handler';
4
4
  export class InnerAudioContext {
5
5
  constructor() {
6
6
  this.__startTime = 0;
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../../utils';
2
2
  import { InnerAudioContext } from './InnerAudioContext';
3
3
  // 音频
4
4
  export const stopVoice = temporarilyNotSupport('stopVoice');
@@ -1,5 +1,5 @@
1
- import { permanentlyNotSupport } from '../../utils';
2
- import { CallbackManager } from '../../utils/handler';
1
+ import { permanentlyNotSupport } from '../../../utils';
2
+ import { CallbackManager } from '../../../utils/handler';
3
3
  export class BackgroundAudioManager {
4
4
  constructor() {
5
5
  this.__startTime = 0;
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../../utils';
2
2
  import { BackgroundAudioManager } from './BackgroundAudioManager';
3
3
  // 背景音频
4
4
  export const stopBackgroundAudio = temporarilyNotSupport('stopBackgroundAudio');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 相机
3
3
  export const createCameraContext = temporarilyNotSupport('createCameraContext');
@@ -1,5 +1,5 @@
1
- import { MethodHandler } from '../../utils/handler';
2
- import { shouldBeObject, getParameterError } from '../../utils';
1
+ import { MethodHandler } from '../../../utils/handler';
2
+ import { shouldBeObject, getParameterError } from '../../../utils';
3
3
  /**
4
4
  * 从本地相册选择图片或使用相机拍照。
5
5
  */
@@ -1,5 +1,5 @@
1
- import { shouldBeObject } from '../../utils';
2
- import { MethodHandler } from '../../utils/handler';
1
+ import { shouldBeObject } from '../../../utils';
2
+ import { MethodHandler } from '../../../utils/handler';
3
3
  /**
4
4
  * 获取图片信息。网络图片需先配置download域名才能生效。
5
5
  */
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../../utils';
2
2
  // 图片
3
3
  export const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum');
4
4
  export const previewMedia = temporarilyNotSupport('previewMedia');
@@ -1,12 +1,21 @@
1
- import { shouldBeObject } from '../../utils';
2
- import { MethodHandler } from '../../utils/handler';
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { shouldBeObject } from '../../../utils';
11
+ import { MethodHandler } from '../../../utils/handler';
3
12
  /**
4
13
  * previewImage api基于开源的React组件[react-wx-images-viewer](https://github.com/react-ld/react-wx-images-viewer)开发,感谢!
5
14
  */
6
15
  /**
7
16
  * 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。
8
17
  */
9
- export const previewImage = async (options) => {
18
+ export const previewImage = (options) => __awaiter(void 0, void 0, void 0, function* () {
10
19
  function loadImage(url, loadFail) {
11
20
  return new Promise((resolve) => {
12
21
  const item = document.createElement('taro-swiper-item-core');
@@ -47,7 +56,7 @@ export const previewImage = async (options) => {
47
56
  swiper.full = true;
48
57
  let children = [];
49
58
  try {
50
- children = await Promise.all(urls.map(e => loadImage(e, fail)));
59
+ children = yield Promise.all(urls.map(e => loadImage(e, fail)));
51
60
  }
52
61
  catch (error) {
53
62
  return handle.fail({
@@ -64,4 +73,4 @@ export const previewImage = async (options) => {
64
73
  container.appendChild(swiper);
65
74
  document.body.appendChild(container);
66
75
  return handle.success();
67
- };
76
+ });
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 实时音视频
3
3
  export const createLivePusherContext = temporarilyNotSupport('createLivePusherContext');
4
4
  export const createLivePlayerContext = temporarilyNotSupport('createLivePlayerContext');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 地图
3
3
  export const createMapContext = temporarilyNotSupport('createMapContext');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 画面录制器
3
3
  export const createMediaRecorder = temporarilyNotSupport('createMediaRecorder');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 录音
3
3
  export const stopRecord = temporarilyNotSupport('stopRecord');
4
4
  export const startRecord = temporarilyNotSupport('startRecord');
@@ -1,5 +1,5 @@
1
- import { MethodHandler } from '../../utils/handler';
2
- import { findDOM, shouldBeObject, temporarilyNotSupport } from '../../utils';
1
+ import { MethodHandler } from '../../../utils/handler';
2
+ import { findDOM, shouldBeObject, temporarilyNotSupport } from '../../../utils';
3
3
  // 视频
4
4
  export const saveVideoToPhotosAlbum = temporarilyNotSupport('saveVideoToPhotosAlbum');
5
5
  export const openVideoEditor = temporarilyNotSupport('openVideoEditor');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 视频解码器
3
3
  export const createVideoDecoder = temporarilyNotSupport('createVideoDecoder');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 音视频合成
3
3
  export const createMediaContainer = temporarilyNotSupport('createMediaContainer');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 实时语音
3
3
  export const updateVoIPChatMuteConfig = temporarilyNotSupport('updateVoIPChatMuteConfig');
4
4
  export const subscribeVoIPVideoMembers = temporarilyNotSupport('subscribeVoIPVideoMembers');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 跳转
3
3
  export const openEmbeddedMiniProgram = temporarilyNotSupport('openEmbeddedMiniProgram');
4
4
  export const navigateToMiniProgram = temporarilyNotSupport('navigateToMiniProgram');
@@ -1,4 +1,4 @@
1
- import { CallbackManager } from '../utils/handler';
1
+ import { CallbackManager } from '../../utils/handler';
2
2
  import { NETWORK_TIMEOUT, setHeader, XHR_STATS } from './utils';
3
3
  const createDownloadTask = ({ url, header, success, error }) => {
4
4
  let timeout;
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // mDNS
3
3
  export const stopLocalServiceDiscovery = temporarilyNotSupport('stopLocalServiceDiscovery');
4
4
  export const startLocalServiceDiscovery = temporarilyNotSupport('startLocalServiceDiscovery');
@@ -1,7 +1,7 @@
1
1
  import Taro from '@tarojs/api';
2
2
  import 'whatwg-fetch';
3
3
  import jsonpRetry from 'jsonp-retry';
4
- import { serializeParams } from '../../utils';
4
+ import { serializeParams } from '../../../utils';
5
5
  // @ts-ignore
6
6
  const { Link } = Taro;
7
7
  function generateRequestUrlWithParams(url, params) {
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // TCP 通信
3
3
  export const createTCPSocket = temporarilyNotSupport('createTCPSocket');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // UDP 通信
3
3
  export const createUDPSocket = temporarilyNotSupport('createUDPSocket');
@@ -1,4 +1,4 @@
1
- import { CallbackManager } from '../utils/handler';
1
+ import { CallbackManager } from '../../utils/handler';
2
2
  import { convertObjectUrlToBlob, NETWORK_TIMEOUT, setHeader, XHR_STATS } from './utils';
3
3
  const createUploadTask = ({ url, filePath, formData = {}, name, header, timeout, fileName, success, error }) => {
4
4
  let timeoutInter;
@@ -1,6 +1,6 @@
1
1
  import { SocketTask } from './socketTask';
2
- import { shouldBeObject, getParameterError } from '../../utils';
3
- import { MethodHandler } from '../../utils/handler';
2
+ import { shouldBeObject, getParameterError } from '../../../utils';
3
+ import { MethodHandler } from '../../../utils/handler';
4
4
  let socketTasks = [];
5
5
  let socketsCounter = 1;
6
6
  export function sendSocketMessage() {
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 帐号信息
3
3
  export const getAccountInfoSync = temporarilyNotSupport('getAccountInfoSync');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 收货地址
3
3
  export const chooseAddress = temporarilyNotSupport('chooseAddress');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 授权
3
3
  export const authorizeForMiniProgram = temporarilyNotSupport('authorizeForMiniProgram');
4
4
  export const authorize = temporarilyNotSupport('authorize');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 卡券
3
3
  export const openCard = temporarilyNotSupport('openCard');
4
4
  export const addCard = temporarilyNotSupport('addCard');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 视频号
3
3
  export const reserveChannelsLive = temporarilyNotSupport('reserveChannelsLive');
4
4
  export const openChannelsLive = temporarilyNotSupport('openChannelsLive');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 微信客服
3
3
  export const openCustomerServiceChat = temporarilyNotSupport('openCustomerServiceChat');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 过往接口
3
3
  export const checkIsSupportFacialRecognition = temporarilyNotSupport('checkIsSupportFacialRecognition');
4
4
  export const startFacialRecognitionVerify = temporarilyNotSupport('startFacialRecognitionVerify');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 收藏
3
3
  export const addVideoToFavorites = temporarilyNotSupport('addVideoToFavorites');
4
4
  export const addFileToFavorites = temporarilyNotSupport('addFileToFavorites');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 微信群
3
3
  export const getGroupEnterInfo = temporarilyNotSupport('getGroupEnterInfo');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 发票
3
3
  export const chooseInvoiceTitle = temporarilyNotSupport('chooseInvoiceTitle');
4
4
  export const chooseInvoice = temporarilyNotSupport('chooseInvoice');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 车牌
3
3
  export const chooseLicensePlate = temporarilyNotSupport('chooseLicensePlate');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 帐号信息
3
3
  export const pluginLogin = temporarilyNotSupport('pluginLogin');
4
4
  export const login = temporarilyNotSupport('login');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 微信红包
3
3
  export const showRedPackage = temporarilyNotSupport('showRedPackage');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 设置
3
3
  export const openSetting = temporarilyNotSupport('openSetting');
4
4
  export const getSetting = temporarilyNotSupport('getSetting');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 生物认证
3
3
  export const startSoterAuthentication = temporarilyNotSupport('startSoterAuthentication');
4
4
  export const checkIsSupportSoterAuthentication = temporarilyNotSupport('checkIsSupportSoterAuthentication');
@@ -1,3 +1,3 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 订阅消息
3
3
  export const requestSubscribeMessage = temporarilyNotSupport('requestSubscribeMessage');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 用户信息
3
3
  export const getUserProfile = temporarilyNotSupport('getUserProfile');
4
4
  export const getUserInfo = temporarilyNotSupport('getUserInfo');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 微信运动
3
3
  export const shareToWeRun = temporarilyNotSupport('shareToWeRun');
4
4
  export const getWeRunData = temporarilyNotSupport('getWeRunData');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 支付
3
3
  export const requestPayment = temporarilyNotSupport('requestPayment');
4
4
  export const requestOrderPayment = temporarilyNotSupport('requestOrderPayment');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 转发
3
3
  export const updateShareMenu = temporarilyNotSupport('updateShareMenu');
4
4
  export const showShareMenu = temporarilyNotSupport('showShareMenu');
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 周期性更新
3
3
  export const setBackgroundFetchToken = temporarilyNotSupport('setBackgroundFetchToken');
4
4
  export const onBackgroundFetchData = temporarilyNotSupport('onBackgroundFetchData');
@@ -1,5 +1,5 @@
1
- import { shouldBeObject, getParameterError, temporarilyNotSupport } from '../utils';
2
- import { MethodHandler } from '../utils/handler';
1
+ import { shouldBeObject, getParameterError, temporarilyNotSupport } from '../../utils';
2
+ import { MethodHandler } from '../../utils/handler';
3
3
  function getItem(key) {
4
4
  let item;
5
5
  try {
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  export const setPageInfo = temporarilyNotSupport('setPageInfo');
3
3
  // 百度小程序 AI 相关
4
4
  export const ocrIdCard = temporarilyNotSupport('ocrIdCard');
package/dist/api/taro.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import Taro from '@tarojs/api';
2
- import { history, createRouter } from '@tarojs/router';
2
+ import { history } from '@tarojs/router';
3
3
  import { getApp, getCurrentInstance, getCurrentPages, nextTick, navigateBack, navigateTo, reLaunch, redirectTo, switchTab } from '../api';
4
- import { permanentlyNotSupport } from '../api/utils';
4
+ import { permanentlyNotSupport } from '../utils';
5
5
  const { Behavior, getEnv, ENV_TYPE, Link, interceptors, getInitPxTransform, Current, options, eventCenter, Events, preload } = Taro;
6
6
  const taro = {
7
7
  // @ts-ignore
@@ -18,7 +18,6 @@ const taro = {
18
18
  Events,
19
19
  preload,
20
20
  history,
21
- createRouter,
22
21
  navigateBack,
23
22
  navigateTo,
24
23
  reLaunch,
@@ -44,4 +43,4 @@ taro.initPxTransform = initPxTransform;
44
43
  // @ts-ignore
45
44
  taro.canIUseWebp = canIUseWebp;
46
45
  export default taro;
47
- export { Behavior, getEnv, ENV_TYPE, Link, interceptors, initPxTransform, Current, options, eventCenter, Events, preload, requirePlugin, pxTransform, canIUseWebp, history, createRouter };
46
+ export { Behavior, getEnv, ENV_TYPE, Link, interceptors, initPxTransform, Current, options, eventCenter, Events, preload, requirePlugin, pxTransform, canIUseWebp, history };
@@ -1,4 +1,4 @@
1
- import { temporarilyNotSupport } from '../utils';
1
+ import { temporarilyNotSupport } from '../../utils';
2
2
  // 背景
3
3
  export const setBackgroundTextStyle = temporarilyNotSupport('setBackgroundTextStyle');
4
4
  export const setBackgroundColor = temporarilyNotSupport('setBackgroundColor');
@@ -1,6 +1,15 @@
1
- import { MethodHandler } from '../utils/handler';
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { MethodHandler } from '../../utils/handler';
2
11
  // 字体
3
- export const loadFontFace = async (options) => {
12
+ export const loadFontFace = (options) => __awaiter(void 0, void 0, void 0, function* () {
4
13
  options = Object.assign({ global: false }, options);
5
14
  const { success, fail, complete, family, source, desc = {} } = options;
6
15
  const handle = new MethodHandler({ name: 'loadFontFace', success, fail, complete });
@@ -10,7 +19,7 @@ export const loadFontFace = async (options) => {
10
19
  // @ts-ignore
11
20
  const fontFace = new FontFace(family, source, desc);
12
21
  try {
13
- await fontFace.load();
22
+ yield fontFace.load();
14
23
  fonts.add(fontFace);
15
24
  return handle.success({});
16
25
  }
@@ -48,4 +57,4 @@ export const loadFontFace = async (options) => {
48
57
  document.head.appendChild(style);
49
58
  return handle.success();
50
59
  }
51
- };
60
+ });
@@ -1,4 +1,4 @@
1
- import { inlineStyle, setTransform } from '../../utils';
1
+ import { inlineStyle, setTransform } from '../../../utils';
2
2
  const noop = function () { };
3
3
  export default class ActionSheet {
4
4
  constructor() {
@@ -57,10 +57,7 @@ export default class ActionSheet {
57
57
  // style
58
58
  const { maskStyle, actionSheetStyle, menuStyle, cellStyle, cancelStyle } = this.style;
59
59
  // configuration
60
- const config = {
61
- ...this.options,
62
- ...options
63
- };
60
+ const config = Object.assign(Object.assign({}, this.options), options);
64
61
  this.lastConfig = config;
65
62
  // wrapper
66
63
  this.el = document.createElement('div');
@@ -75,10 +72,7 @@ export default class ActionSheet {
75
72
  this.actionSheet.setAttribute('style', inlineStyle(actionSheetStyle));
76
73
  // menu
77
74
  this.menu = document.createElement('div');
78
- this.menu.setAttribute('style', inlineStyle({
79
- ...menuStyle,
80
- color: config.itemColor
81
- }));
75
+ this.menu.setAttribute('style', inlineStyle(Object.assign(Object.assign({}, menuStyle), { color: config.itemColor })));
82
76
  // cells
83
77
  this.cells = config.itemList.map((item, index) => {
84
78
  const cell = document.createElement('div');
@@ -121,10 +115,7 @@ export default class ActionSheet {
121
115
  }
122
116
  show(options = {}) {
123
117
  return new Promise((resolve) => {
124
- const config = {
125
- ...this.options,
126
- ...options
127
- };
118
+ const config = Object.assign(Object.assign({}, this.options), options);
128
119
  this.lastConfig = config;
129
120
  if (this.hideOpacityTimer)
130
121
  clearTimeout(this.hideOpacityTimer);
@@ -1,6 +1,15 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import Taro from '@tarojs/api';
2
- import { getParameterError, temporarilyNotSupport } from '../../utils';
3
- import { MethodHandler } from '../../utils/handler';
11
+ import { getParameterError, temporarilyNotSupport } from '../../../utils';
12
+ import { MethodHandler } from '../../../utils/handler';
4
13
  import Toast from './toast';
5
14
  import Modal from './modal';
6
15
  import ActionSheet from './actionSheet';
@@ -106,7 +115,7 @@ const hideLoading = ({ success, fail, complete } = {}) => {
106
115
  toast.hide(0, 'loading');
107
116
  return handle.success();
108
117
  };
109
- const showModal = async (options = {}) => {
118
+ const showModal = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
110
119
  init(document);
111
120
  options = Object.assign({
112
121
  title: '',
@@ -186,21 +195,21 @@ const showModal = async (options = {}) => {
186
195
  options.showCancel = !!options.showCancel;
187
196
  let result = '';
188
197
  if (!modal.el) {
189
- result = await modal.create(options);
198
+ result = yield modal.create(options);
190
199
  }
191
200
  else {
192
- result = await modal.show(options);
201
+ result = yield modal.show(options);
193
202
  }
194
203
  const res = { cancel: !1, confirm: !1 };
195
204
  res[result] = !0;
196
205
  return handle.success(res);
197
- };
206
+ });
198
207
  function hideModal() {
199
208
  if (!modal.el)
200
209
  return;
201
210
  modal.hide();
202
211
  }
203
- const showActionSheet = async (options = { itemList: [] }) => {
212
+ const showActionSheet = (options = { itemList: [] }) => __awaiter(void 0, void 0, void 0, function* () {
204
213
  init(document);
205
214
  options = Object.assign({
206
215
  itemColor: '#000000',
@@ -246,10 +255,10 @@ const showActionSheet = async (options = { itemList: [] }) => {
246
255
  }
247
256
  let result = '';
248
257
  if (!actionSheet.el) {
249
- result = await actionSheet.create(options);
258
+ result = yield actionSheet.create(options);
250
259
  }
251
260
  else {
252
- result = await actionSheet.show(options);
261
+ result = yield actionSheet.show(options);
253
262
  }
254
263
  if (typeof result === 'string') {
255
264
  return handle.fail(({ errMsg: result }));
@@ -257,7 +266,7 @@ const showActionSheet = async (options = { itemList: [] }) => {
257
266
  else {
258
267
  return handle.success(({ tapIndex: result }));
259
268
  }
260
- };
269
+ });
261
270
  Taro.eventCenter.on('__taroRouterChange', () => {
262
271
  hideToast();
263
272
  hideLoading();