@tarojs/components 3.3.14 → 3.5.0-canary.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 (242) hide show
  1. package/dist/cjs/{index-cde74e58.js → index-b9715722.js} +0 -0
  2. package/dist/cjs/{index-7464647f.js → index-dd4b7ba3.js} +0 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
  5. package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
  6. package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
  7. package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
  9. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
  10. package/dist/cjs/taro-components.cjs.js +2 -2
  11. package/dist/cjs/taro-cover-image-core.cjs.entry.js +18 -4
  12. package/dist/cjs/taro-cover-view-core.cjs.entry.js +50 -4
  13. package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
  14. package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
  15. package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
  16. package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
  17. package/dist/cjs/taro-input-core.cjs.entry.js +5 -5
  18. package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
  19. package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
  20. package/dist/cjs/taro-movable-view-core.cjs.entry.js +1 -1
  21. package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -2
  22. package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
  23. package/dist/cjs/taro-picker-core_2.cjs.entry.js +2 -2
  24. package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +1 -1
  25. package/dist/cjs/taro-picker-view-core.cjs.entry.js +1 -1
  26. package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
  27. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +2 -2
  28. package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
  29. package/dist/cjs/taro-rich-text-core.cjs.entry.js +1 -1
  30. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
  31. package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
  32. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -2
  33. package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
  34. package/dist/cjs/taro-tabbar.cjs.entry.js +70 -22
  35. package/dist/cjs/taro-text-core.cjs.entry.js +2 -2
  36. package/dist/cjs/taro-textarea-core.cjs.entry.js +64 -4
  37. package/dist/cjs/taro-video-control_3.cjs.entry.js +183 -100
  38. package/dist/cjs/taro-view-core.cjs.entry.js +2 -2
  39. package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
  40. package/dist/collection/collection-manifest.json +1 -1
  41. package/dist/collection/components/cover-image/cover-image.js +94 -0
  42. package/dist/collection/components/cover-image/style/index.css +5 -0
  43. package/dist/collection/components/cover-view/cover-view.js +166 -4
  44. package/dist/collection/components/cover-view/style/cover-view.css +3 -0
  45. package/dist/collection/components/input/input.js +4 -4
  46. package/dist/collection/components/tabbar/tabbar.js +72 -20
  47. package/dist/collection/components/textarea/style/index.css +6 -2
  48. package/dist/collection/components/textarea/textarea.js +98 -3
  49. package/dist/collection/components/video/video-control.js +39 -22
  50. package/dist/collection/components/video/video-danmu.js +52 -39
  51. package/dist/collection/components/video/video.js +60 -37
  52. package/dist/esm/{index-85e10859.js → index-3c78bcaf.js} +0 -0
  53. package/dist/esm/{index-165a6222.js → index-5bd7cbab.js} +0 -0
  54. package/dist/esm/loader.js +2 -2
  55. package/dist/esm/taro-audio-core.entry.js +1 -1
  56. package/dist/esm/taro-block-core.entry.js +1 -1
  57. package/dist/esm/taro-button-core.entry.js +2 -2
  58. package/dist/esm/taro-camera-core.entry.js +1 -1
  59. package/dist/esm/taro-canvas-core.entry.js +1 -1
  60. package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
  61. package/dist/esm/taro-components.js +2 -2
  62. package/dist/esm/taro-cover-image-core.entry.js +18 -4
  63. package/dist/esm/taro-cover-view-core.entry.js +50 -4
  64. package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
  65. package/dist/esm/taro-form-core.entry.js +1 -1
  66. package/dist/esm/taro-icon-core.entry.js +2 -2
  67. package/dist/esm/taro-image-core.entry.js +2 -2
  68. package/dist/esm/taro-input-core.entry.js +5 -5
  69. package/dist/esm/taro-label-core.entry.js +1 -1
  70. package/dist/esm/taro-movable-area-core.entry.js +1 -1
  71. package/dist/esm/taro-movable-view-core.entry.js +1 -1
  72. package/dist/esm/taro-navigator-core.entry.js +2 -2
  73. package/dist/esm/taro-open-data-core.entry.js +1 -1
  74. package/dist/esm/taro-picker-core_2.entry.js +2 -2
  75. package/dist/esm/taro-picker-view-column-core.entry.js +1 -1
  76. package/dist/esm/taro-picker-view-core.entry.js +1 -1
  77. package/dist/esm/taro-progress-core.entry.js +1 -1
  78. package/dist/esm/taro-pull-to-refresh.entry.js +2 -2
  79. package/dist/esm/taro-radio-core_2.entry.js +1 -1
  80. package/dist/esm/taro-rich-text-core.entry.js +1 -1
  81. package/dist/esm/taro-scroll-view-core.entry.js +2 -2
  82. package/dist/esm/taro-slider-core.entry.js +1 -1
  83. package/dist/esm/taro-swiper-core_2.entry.js +2 -2
  84. package/dist/esm/taro-switch-core.entry.js +1 -1
  85. package/dist/esm/taro-tabbar.entry.js +70 -22
  86. package/dist/esm/taro-text-core.entry.js +2 -2
  87. package/dist/esm/taro-textarea-core.entry.js +64 -4
  88. package/dist/esm/taro-video-control_3.entry.js +183 -100
  89. package/dist/esm/taro-view-core.entry.js +2 -2
  90. package/dist/esm/taro-web-view-core.entry.js +1 -1
  91. package/dist/esm-es5/{index-85e10859.js → index-3c78bcaf.js} +0 -0
  92. package/dist/esm-es5/{index-165a6222.js → index-5bd7cbab.js} +0 -0
  93. package/dist/esm-es5/loader.js +1 -1
  94. package/dist/esm-es5/taro-audio-core.entry.js +1 -1
  95. package/dist/esm-es5/taro-block-core.entry.js +1 -1
  96. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  97. package/dist/esm-es5/taro-camera-core.entry.js +1 -1
  98. package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
  99. package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
  100. package/dist/esm-es5/taro-components.js +1 -1
  101. package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
  102. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
  103. package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
  104. package/dist/esm-es5/taro-form-core.entry.js +1 -1
  105. package/dist/esm-es5/taro-icon-core.entry.js +1 -1
  106. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  107. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  108. package/dist/esm-es5/taro-label-core.entry.js +1 -1
  109. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  110. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  111. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  112. package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
  113. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  114. package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -1
  115. package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
  116. package/dist/esm-es5/taro-progress-core.entry.js +1 -1
  117. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  118. package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
  119. package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
  120. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  121. package/dist/esm-es5/taro-slider-core.entry.js +1 -1
  122. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  123. package/dist/esm-es5/taro-switch-core.entry.js +1 -1
  124. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  125. package/dist/esm-es5/taro-text-core.entry.js +1 -1
  126. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  127. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  128. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  129. package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
  130. package/dist/taro-components/{p-3e2d4793.entry.js → p-06bffead.entry.js} +1 -1
  131. package/dist/taro-components/{p-b685a487.system.entry.js → p-10a6c489.system.entry.js} +1 -1
  132. package/dist/taro-components/p-11932905.entry.js +1 -0
  133. package/dist/taro-components/{p-2ef4681b.system.entry.js → p-12638ebc.system.entry.js} +1 -1
  134. package/dist/taro-components/p-12ae0a33.entry.js +1 -0
  135. package/dist/taro-components/{p-8d905ff5.system.entry.js → p-13c1404f.system.entry.js} +1 -1
  136. package/dist/taro-components/{p-d6269b5e.system.entry.js → p-17039974.system.entry.js} +1 -1
  137. package/dist/taro-components/{p-7a5be745.entry.js → p-17cf8b5b.entry.js} +1 -1
  138. package/dist/taro-components/{p-5a13bd63.system.entry.js → p-1b790eb0.system.entry.js} +1 -1
  139. package/dist/taro-components/{p-2eda9121.system.entry.js → p-1e4f1702.system.entry.js} +1 -1
  140. package/dist/taro-components/p-2438fcd4.system.entry.js +1 -0
  141. package/dist/taro-components/{p-00328ebf.system.entry.js → p-264b7229.system.entry.js} +1 -1
  142. package/dist/taro-components/p-33ee636a.system.js +1 -0
  143. package/dist/taro-components/{p-1507bcbf.entry.js → p-3633bb84.entry.js} +1 -1
  144. package/dist/taro-components/{p-2ce9bc65.system.entry.js → p-3643d8f7.system.entry.js} +1 -1
  145. package/dist/taro-components/{p-6967e577.js → p-37cfdd8f.js} +0 -0
  146. package/dist/taro-components/{p-098f4931.system.entry.js → p-3aac5746.system.entry.js} +1 -1
  147. package/dist/taro-components/{p-d52009d1.system.entry.js → p-3eebeb1c.system.entry.js} +1 -1
  148. package/dist/taro-components/p-431197bc.entry.js +1 -0
  149. package/dist/taro-components/{p-2de1a146.system.entry.js → p-43de2f12.system.entry.js} +1 -1
  150. package/dist/taro-components/{p-69be8189.system.entry.js → p-46cf6431.system.entry.js} +1 -1
  151. package/dist/taro-components/{p-f4158e42.entry.js → p-4dbed323.entry.js} +1 -1
  152. package/dist/taro-components/{p-bd922592.system.entry.js → p-50066d5e.system.entry.js} +1 -1
  153. package/dist/taro-components/p-554e1039.entry.js +1 -0
  154. package/dist/taro-components/{p-0da88b1b.entry.js → p-55b0a30b.entry.js} +1 -1
  155. package/dist/taro-components/p-5c420456.entry.js +1 -0
  156. package/dist/taro-components/{p-d12592f1.entry.js → p-5f8b5f62.entry.js} +1 -1
  157. package/dist/taro-components/p-627a5064.system.entry.js +1 -0
  158. package/dist/taro-components/{p-8cf16235.entry.js → p-64993f48.entry.js} +1 -1
  159. package/dist/taro-components/p-66237ac0.entry.js +1 -0
  160. package/dist/taro-components/{p-923c6e08.entry.js → p-6965567d.entry.js} +1 -1
  161. package/dist/taro-components/{p-a34988ff.system.entry.js → p-703dfad8.system.entry.js} +1 -1
  162. package/dist/taro-components/p-71de9bd6.entry.js +1 -0
  163. package/dist/taro-components/p-74540410.entry.js +1 -0
  164. package/dist/taro-components/{p-0fb7f599.entry.js → p-7a64a3d2.entry.js} +1 -1
  165. package/dist/taro-components/{p-1ed219a6.system.entry.js → p-7d848382.system.entry.js} +1 -1
  166. package/dist/taro-components/{p-ca67c759.entry.js → p-83dedaa2.entry.js} +1 -1
  167. package/dist/taro-components/{p-81588c19.entry.js → p-865c21b5.entry.js} +1 -1
  168. package/dist/taro-components/{p-26c08f44.entry.js → p-8a5e67cb.entry.js} +1 -1
  169. package/dist/taro-components/p-8bc82aaa.entry.js +1 -0
  170. package/dist/taro-components/p-8db237e0.entry.js +1 -0
  171. package/dist/taro-components/{p-5c8ba192.system.entry.js → p-8f90fca9.system.entry.js} +1 -1
  172. package/dist/taro-components/{p-696f0d1c.system.js → p-94c20f60.system.js} +0 -0
  173. package/dist/taro-components/p-95529dc0.entry.js +1 -0
  174. package/dist/taro-components/p-964692f7.system.entry.js +1 -0
  175. package/dist/taro-components/p-99ed3ed2.system.entry.js +1 -0
  176. package/dist/taro-components/{p-ce49e2f4.system.entry.js → p-9a618935.system.entry.js} +1 -1
  177. package/dist/taro-components/p-9d0ab7c4.entry.js +1 -0
  178. package/dist/taro-components/{p-9e807bd6.system.entry.js → p-9fc88fc1.system.entry.js} +1 -1
  179. package/dist/taro-components/p-a1423df9.entry.js +1 -0
  180. package/dist/taro-components/{p-93748645.system.js → p-b2d01686.system.js} +0 -0
  181. package/dist/taro-components/p-b75d8a65.entry.js +1 -0
  182. package/dist/taro-components/{p-5d84eaf0.entry.js → p-b8e0ad7d.entry.js} +1 -1
  183. package/dist/taro-components/p-b9280444.entry.js +1 -0
  184. package/dist/taro-components/{p-4462dca4.system.entry.js → p-bd3fa355.system.entry.js} +1 -1
  185. package/dist/taro-components/p-c218c298.entry.js +1 -0
  186. package/dist/taro-components/p-c362734b.entry.js +1 -0
  187. package/dist/taro-components/{p-d52bf5f5.system.entry.js → p-cea9a198.system.entry.js} +1 -1
  188. package/dist/taro-components/{p-321aeeec.system.entry.js → p-cfbdd4e3.system.entry.js} +1 -1
  189. package/dist/taro-components/p-d394a61f.system.entry.js +1 -0
  190. package/dist/taro-components/{p-7b021c48.entry.js → p-d567b95e.entry.js} +1 -1
  191. package/dist/taro-components/{p-de3a4828.entry.js → p-d5971476.entry.js} +1 -1
  192. package/dist/taro-components/{p-26d8c60a.system.entry.js → p-e0af1d0d.system.entry.js} +1 -1
  193. package/dist/taro-components/p-e27798a4.entry.js +1 -0
  194. package/dist/taro-components/{p-37cfef64.entry.js → p-e6298500.entry.js} +1 -1
  195. package/dist/taro-components/{p-49ae5efb.js → p-f05e1558.js} +0 -0
  196. package/dist/taro-components/p-f98e0224.entry.js +1 -0
  197. package/dist/taro-components/{p-5e6feca6.system.entry.js → p-fb0959c1.system.entry.js} +1 -1
  198. package/dist/taro-components/{p-4168e24d.system.entry.js → p-fb2252b7.system.entry.js} +1 -1
  199. package/dist/taro-components/{p-5412a1d2.system.entry.js → p-fc4939c6.system.entry.js} +1 -1
  200. package/dist/taro-components/{p-9d6a7a70.system.entry.js → p-fd8312e5.system.entry.js} +1 -1
  201. package/dist/taro-components/{p-7ffcfb05.system.entry.js → p-fdd73355.system.entry.js} +1 -1
  202. package/dist/taro-components/{p-016f56cc.system.entry.js → p-fde3a009.system.entry.js} +1 -1
  203. package/dist/taro-components/{p-9e912454.system.entry.js → p-fe156231.system.entry.js} +1 -1
  204. package/dist/taro-components/{p-2b6a2449.system.entry.js → p-ffe63ce9.system.entry.js} +1 -1
  205. package/dist/taro-components/taro-components.esm.js +1 -1
  206. package/dist/taro-components/taro-components.js +1 -1
  207. package/dist/types/components/cover-image/cover-image.d.ts +11 -0
  208. package/dist/types/components/cover-view/cover-view.d.ts +14 -2
  209. package/dist/types/components/tabbar/tabbar.d.ts +20 -1
  210. package/dist/types/components/textarea/textarea.d.ts +6 -0
  211. package/dist/types/components.d.ts +18 -0
  212. package/dist-h5/vue/createComponent.js +4 -0
  213. package/dist-h5/vue/createFormsComponent.js +8 -1
  214. package/dist-h5/vue/simpleComponents.js +1 -1
  215. package/package.json +4 -4
  216. package/dist/collection/components/cover-view/cover-image.js +0 -11
  217. package/dist/taro-components/p-17c0731f.entry.js +0 -1
  218. package/dist/taro-components/p-2c5d57af.entry.js +0 -1
  219. package/dist/taro-components/p-30bfacb9.system.js +0 -1
  220. package/dist/taro-components/p-3554df41.entry.js +0 -1
  221. package/dist/taro-components/p-382cabbc.system.entry.js +0 -1
  222. package/dist/taro-components/p-4a2ffc1c.entry.js +0 -1
  223. package/dist/taro-components/p-4ff67760.entry.js +0 -1
  224. package/dist/taro-components/p-6daacf48.entry.js +0 -1
  225. package/dist/taro-components/p-70f40e3a.entry.js +0 -1
  226. package/dist/taro-components/p-72f2b6f5.entry.js +0 -1
  227. package/dist/taro-components/p-76c00960.entry.js +0 -1
  228. package/dist/taro-components/p-7f3e5f09.entry.js +0 -1
  229. package/dist/taro-components/p-9767491b.entry.js +0 -1
  230. package/dist/taro-components/p-a895db87.entry.js +0 -1
  231. package/dist/taro-components/p-af9ec312.system.entry.js +0 -1
  232. package/dist/taro-components/p-b6e0dca6.entry.js +0 -1
  233. package/dist/taro-components/p-c221cebb.system.entry.js +0 -1
  234. package/dist/taro-components/p-c5722042.entry.js +0 -1
  235. package/dist/taro-components/p-ce093936.entry.js +0 -1
  236. package/dist/taro-components/p-d6a37b93.entry.js +0 -1
  237. package/dist/taro-components/p-f6c7f07c.system.entry.js +0 -1
  238. package/dist/taro-components/p-f7b6c1a6.entry.js +0 -1
  239. package/dist/taro-components/p-f8d0dabb.entry.js +0 -1
  240. package/dist/taro-components/p-f9013b36.system.entry.js +0 -1
  241. package/dist/taro-components/p-f991bc7b.entry.js +0 -1
  242. package/dist/types/components/cover-view/cover-image.d.ts +0 -4
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7464647f.js');
6
- const index$1 = require('./index-cde74e58.js');
5
+ const index = require('./index-dd4b7ba3.js');
6
+ const index$1 = require('./index-b9715722.js');
7
7
 
8
8
  const formatTime = time => {
9
9
  if (time == null) return ''
@@ -115,6 +115,25 @@ const screenFn = (function () {
115
115
  return ret
116
116
  })();
117
117
 
118
+ var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
119
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
120
+ return new (P || (P = Promise))(function (resolve, reject) {
121
+ function fulfilled(value) { try {
122
+ step(generator.next(value));
123
+ }
124
+ catch (e) {
125
+ reject(e);
126
+ } }
127
+ function rejected(value) { try {
128
+ step(generator["throw"](value));
129
+ }
130
+ catch (e) {
131
+ reject(e);
132
+ } }
133
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
134
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
135
+ });
136
+ };
118
137
  let VideoControl = class {
119
138
  constructor(hostRef) {
120
139
  index.registerInstance(this, hostRef);
@@ -157,32 +176,40 @@ let VideoControl = class {
157
176
  this.seekFunc(this.percentage * this.duration);
158
177
  this.toggleVisibility(true);
159
178
  }
160
- async setProgressBall(percentage) {
161
- if (this.progressBallRef) {
162
- this.progressBallRef.style.left = `${percentage * 100}%`;
163
- }
179
+ setProgressBall(percentage) {
180
+ return __awaiter$2(this, void 0, void 0, function* () {
181
+ if (this.progressBallRef) {
182
+ this.progressBallRef.style.left = `${percentage * 100}%`;
183
+ }
184
+ });
164
185
  }
165
- async toggleVisibility(nextVisible) {
166
- const visible = nextVisible === undefined ? !this.visible : nextVisible;
167
- if (visible) {
168
- this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
169
- if (this.isPlaying) {
170
- this.hideControlsTimer = setTimeout(() => {
171
- this.toggleVisibility(false);
172
- }, 2000);
186
+ toggleVisibility(nextVisible) {
187
+ return __awaiter$2(this, void 0, void 0, function* () {
188
+ const visible = nextVisible === undefined ? !this.visible : nextVisible;
189
+ if (visible) {
190
+ this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
191
+ if (this.isPlaying) {
192
+ this.hideControlsTimer = setTimeout(() => {
193
+ this.toggleVisibility(false);
194
+ }, 2000);
195
+ }
196
+ this.controlsRef.style.visibility = 'visible';
173
197
  }
174
- this.controlsRef.style.visibility = 'visible';
175
- }
176
- else {
177
- this.controlsRef.style.visibility = 'hidden';
178
- }
179
- this.visible = !!visible;
198
+ else {
199
+ this.controlsRef.style.visibility = 'hidden';
200
+ }
201
+ this.visible = !!visible;
202
+ });
180
203
  }
181
- async getIsDraggingProgressBall() {
182
- return this.isDraggingProgressBall;
204
+ getIsDraggingProgressBall() {
205
+ return __awaiter$2(this, void 0, void 0, function* () {
206
+ return this.isDraggingProgressBall;
207
+ });
183
208
  }
184
- async setCurrentTime(time) {
185
- this.currentTimeRef.innerHTML = formatTime(time);
209
+ setCurrentTime(time) {
210
+ return __awaiter$2(this, void 0, void 0, function* () {
211
+ this.currentTimeRef.innerHTML = formatTime(time);
212
+ });
186
213
  }
187
214
  render() {
188
215
  const { controls, currentTime, duration, isPlaying, pauseFunc, playFunc, showPlayBtn, showProgress } = this;
@@ -212,6 +239,25 @@ let VideoControl = class {
212
239
 
213
240
  const indexCss = ".taro-video{width:100%;height:225px;display:inline-block;line-height:0;overflow:hidden;position:relative}.taro-video[hidden]{display:none}.taro-video-container{width:100%;height:100%;background-color:#000;display:inline-block;position:absolute;top:0;left:0;overflow:hidden;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{position:absolute;top:0;left:0;bottom:0;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:rgba(1, 1, 1, 0.5);z-index:1}.taro-video-cover-play-button{width:40px;height:40px;background-size:50%;background-repeat:no-repeat;background-position:50% 50%}.taro-video-cover-duration{color:#fff;font-size:16px;line-height:1;margin-top:10px}.taro-video-bar{visibility:hidden;height:44px;background-color:rgba(0, 0, 0, 0.5);overflow:hidden;position:absolute;bottom:0;right:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:0 10px;z-index:1}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{width:13px;height:15px;padding:14.5px 12.5px 14.5px 12.5px;margin-left:-8.5px;-webkit-box-sizing:content-box;box-sizing:content-box}.taro-video-control-button:after{content:\"\";display:block;width:100%;height:100%;background-size:100%;background-position:50% 50%;background-repeat:no-repeat}.taro-video-control-button.taro-video-control-button-play:after,.taro-video-cover-play-button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==)}.taro-video-control-button.taro-video-control-button-pause:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC)}.taro-video-current-time,.taro-video-duration{height:14.5px;line-height:14.5px;margin-top:15px;margin-bottom:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{-webkit-box-flex:2;-webkit-flex-grow:2;-ms-flex-positive:2;flex-grow:2;position:relative}.taro-video-progress{height:2px;margin:21px 12px;background-color:rgba(255, 255, 255, 0.4);position:relative}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;-webkit-transition:width 0.1s;transition:width 0.1s;background-color:rgba(255, 255, 255, 0.8)}.taro-video-ball{width:16px;height:16px;padding:14px;position:absolute;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;left:0;margin-left:-22px}.taro-video-inner{width:100%;height:100%;background-color:#fff;border-radius:50%}.taro-video-danmu-button{white-space:nowrap;line-height:1;padding:2px 10px;border:1px solid #fff;border-radius:5px;font-size:13px;color:#fff;margin:0 8.5px}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{width:17px;height:17px;padding:8.5px;-webkit-box-sizing:content-box;box-sizing:content-box;background-size:50%;background-position:50% 50%;background-repeat:no-repeat}.taro-video-fullscreen{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==)}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABz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ZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5PmxYVAAACLklEQVRYhc2XP2sVQRRHz40hKoqaQgVBCy1EozFlGiVFxMLGh4piYWEh+hkEP4YKAVFEEFTyughaCH6DqIVpAhYWEgIxoJE8cywyi5tNHu/tJmvyg2WZO3dmzt47/zZUtoJ6Nhsg09YDiYhKDzACTAFNYH9lEpUq80TdrT5wpV5n/ZV9KoGoo+pXV2uyKkipOaLuUceAt8DhUvQd1FsCYhR4ChzaSIBMHSOi7lOfsByFWiCgEBH1GHAF2JlMPcBt4GC3HUYEaj9wF3gVEVPtfNVTwAXgWX7CDKq/1piAZTSZBmim8qJ6sQ3EgDqb/L7kU3MH2NHtl3dQX3r3Ak21UYAYAj4A/cl0JB+RF+uMRj4iQ+p8zt7KYFLdXKHuRi0gacBhV6a6pd5bA6KRNagFJPU9qv5u47toLmW1HnoR8Q5oAK1CVQu4FBHj/wUkaXsb+4pzpVaQFPqXrN7Be4Fx9VztIOr1BLEtmX4A94E/qdwHTKjDWYM6lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC)}.taro-video-danmu{position:absolute;top:0;left:0;bottom:0;width:100%;margin-top:14px;margin-bottom:44px;font-size:14px;line-height:14px;overflow:visible}.taro-video-danmu-item{line-height:1;position:absolute;color:#fff;white-space:nowrap;left:100%;-webkit-transform:translatex(0);transform:translatex(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{pointer-events:none;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border-radius:5px;background-color:rgba(255, 255, 255, 0.8);color:#000;display:block;visibility:hidden}.taro-video-toast.taro-video-toast-volume{width:100px;height:100px;display:block}.taro-video-toast-volume .taro-video-toast-title{width:100%;font-size:12px;line-height:16px;text-align:center;margin-top:10px;display:block}.taro-video-toast-volume .taro-video-toast-icon{fill:#000;width:50%;height:50%;margin-left:25%;display:block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w58YTsDZwKzChA189PbTRBGwKzAYO6iT4srbAMHfTfAksjulS1iG4JzAH2Dy2YKS/qAVcCdzi1vgZOBZ4PWvNGAG6wgYCW0IwctzNmf06BcEXtYABwOeA4otEfgEOdnGGqV6IAAUopwM6zDYuAVjeKYpYwCjgCWOhH513+b2lhE+Avrj89NPyalzyuCIE6EN9BfQ1dHoPOAD40+9LE6D/5aoqSqtLsgiQC60DTiHzfGCFoaSsQAexZdlTgEuyCDgLuK8u5G7dEAHyKN8CBrtxLwDHAX8Z+l4N3GS0L3db4aN0X5opmc+2XZQAfb2LPd2eciG1lUSRJZ9qYHkZONwiYAjw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Pe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==);background-size:50%;background-position:50% 50%;background-repeat:no-repeat}.taro-video-toast-volume .taro-video-toast-value{width:80px;height:5px;margin-top:5px;margin-left:10px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{background-color:rgba(0, 0, 0, 0.8);color:#fff;font-size:14px;line-height:18px;padding:6px}";
214
241
 
242
+ var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
243
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
244
+ return new (P || (P = Promise))(function (resolve, reject) {
245
+ function fulfilled(value) { try {
246
+ step(generator.next(value));
247
+ }
248
+ catch (e) {
249
+ reject(e);
250
+ } }
251
+ function rejected(value) { try {
252
+ step(generator["throw"](value));
253
+ }
254
+ catch (e) {
255
+ reject(e);
256
+ } }
257
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
258
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
259
+ });
260
+ };
215
261
  let Video = class {
216
262
  constructor(hostRef) {
217
263
  index.registerInstance(this, hostRef);
@@ -360,11 +406,11 @@ let Video = class {
360
406
  this.controlsRef.toggleVisibility();
361
407
  this.onEnded.emit();
362
408
  };
363
- this.handleTimeUpdate = throttle(async (e) => {
409
+ this.handleTimeUpdate = throttle((e) => __awaiter$1(this, void 0, void 0, function* () {
364
410
  var _a, _b;
365
411
  this.currentTime = this.videoRef.currentTime;
366
412
  const duration = this.duration || this._duration;
367
- const isControlDragging = await this.controlsRef.getIsDraggingProgressBall();
413
+ const isControlDragging = yield this.controlsRef.getIsDraggingProgressBall();
368
414
  if (this.controls && this.showProgress) {
369
415
  if (!isControlDragging && !this.isDraggingProgress) {
370
416
  this.controlsRef.setProgressBall(this.currentTime / duration);
@@ -382,7 +428,7 @@ let Video = class {
382
428
  this.handleEnded();
383
429
  }
384
430
  }
385
- }, 250);
431
+ }), 250);
386
432
  this.handleError = e => {
387
433
  var _a, _b;
388
434
  this.onError.emit({
@@ -487,29 +533,31 @@ let Video = class {
487
533
  watchEnableDanmu(newVal) {
488
534
  this._enableDanmu = newVal;
489
535
  }
490
- async onDocumentTouchMove(e) {
491
- if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
492
- return;
493
- if (await this.controlsRef.getIsDraggingProgressBall())
494
- return;
495
- const gestureObj = this.analyseGesture(e);
496
- if (gestureObj.type === 'adjustVolume') {
497
- this.toastVolumeRef.style.visibility = 'visible';
498
- const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
499
- this.videoRef.volume = nextVolume;
500
- this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
501
- }
502
- else if (gestureObj.type === 'adjustProgress') {
503
- this.isDraggingProgress = true;
504
- this.nextPercentage = Math.max(Math.min(this.lastPercentage + gestureObj.dataX, 1), 0);
505
- if (this.controls && this.showProgress) {
506
- this.controlsRef.setProgressBall(this.nextPercentage);
507
- this.controlsRef.toggleVisibility(true);
536
+ onDocumentTouchMove(e) {
537
+ return __awaiter$1(this, void 0, void 0, function* () {
538
+ if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
539
+ return;
540
+ if (yield this.controlsRef.getIsDraggingProgressBall())
541
+ return;
542
+ const gestureObj = this.analyseGesture(e);
543
+ if (gestureObj.type === 'adjustVolume') {
544
+ this.toastVolumeRef.style.visibility = 'visible';
545
+ const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
546
+ this.videoRef.volume = nextVolume;
547
+ this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
508
548
  }
509
- const duration = this.duration || this._duration;
510
- this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
511
- this.toastProgressRef.style.visibility = 'visible';
512
- }
549
+ else if (gestureObj.type === 'adjustProgress') {
550
+ this.isDraggingProgress = true;
551
+ this.nextPercentage = Math.max(Math.min(this.lastPercentage + gestureObj.dataX, 1), 0);
552
+ if (this.controls && this.showProgress) {
553
+ this.controlsRef.setProgressBall(this.nextPercentage);
554
+ this.controlsRef.toggleVisibility(true);
555
+ }
556
+ const duration = this.duration || this._duration;
557
+ this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
558
+ this.toastProgressRef.style.visibility = 'visible';
559
+ }
560
+ });
513
561
  }
514
562
  onDocumentTouchEnd() {
515
563
  var _a;
@@ -528,28 +576,40 @@ let Video = class {
528
576
  this.lastTouchScreenY = undefined;
529
577
  }
530
578
  /** 播放视频 */
531
- async play() {
532
- this._play();
579
+ play() {
580
+ return __awaiter$1(this, void 0, void 0, function* () {
581
+ this._play();
582
+ });
533
583
  }
534
584
  /** 暂停视频 */
535
- async pause() {
536
- this._pause();
585
+ pause() {
586
+ return __awaiter$1(this, void 0, void 0, function* () {
587
+ this._pause();
588
+ });
537
589
  }
538
590
  /** 停止视频 */
539
- async stop() {
540
- this._stop();
591
+ stop() {
592
+ return __awaiter$1(this, void 0, void 0, function* () {
593
+ this._stop();
594
+ });
541
595
  }
542
596
  /** 跳转到指定位置 */
543
- async seek(position) {
544
- this._seek(position);
597
+ seek(position) {
598
+ return __awaiter$1(this, void 0, void 0, function* () {
599
+ this._seek(position);
600
+ });
545
601
  }
546
602
  /** 进入全屏。若有自定义内容需在全屏时展示,需将内容节点放置到 video 节点内。 */
547
- async requestFullScreen() {
548
- this.toggleFullScreen(true);
603
+ requestFullScreen() {
604
+ return __awaiter$1(this, void 0, void 0, function* () {
605
+ this.toggleFullScreen(true);
606
+ });
549
607
  }
550
608
  /** 退出全屏 */
551
- async exitFullScreen() {
552
- this.toggleFullScreen(false);
609
+ exitFullScreen() {
610
+ return __awaiter$1(this, void 0, void 0, function* () {
611
+ this.toggleFullScreen(false);
612
+ });
553
613
  }
554
614
  render() {
555
615
  const { src, controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, duration, _duration, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
@@ -601,6 +661,25 @@ let Video = class {
601
661
  };
602
662
  Video.style = indexCss;
603
663
 
664
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
665
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
666
+ return new (P || (P = Promise))(function (resolve, reject) {
667
+ function fulfilled(value) { try {
668
+ step(generator.next(value));
669
+ }
670
+ catch (e) {
671
+ reject(e);
672
+ } }
673
+ function rejected(value) { try {
674
+ step(generator["throw"](value));
675
+ }
676
+ catch (e) {
677
+ reject(e);
678
+ } }
679
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
680
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
681
+ });
682
+ };
604
683
  let VideoDanmu = class {
605
684
  constructor(hostRef) {
606
685
  index.registerInstance(this, hostRef);
@@ -619,47 +698,51 @@ let VideoDanmu = class {
619
698
  clonedDanmu.bottom = `${Math.random() * 90 + 5}%`;
620
699
  return clonedDanmu;
621
700
  }
622
- async sendDanmu(danmuList = []) {
623
- if (Array.isArray(danmuList)) {
624
- this.list = [
625
- ...this.list,
626
- ...danmuList.map(danmu => this.ensureProperties(danmu))
627
- ];
628
- }
629
- else {
630
- const danmu = danmuList;
631
- this.list = [
632
- ...this.list,
633
- Object.assign({}, this.ensureProperties(danmu))
634
- ];
635
- }
636
- }
637
- async tick(currentTime) {
638
- this.currentTime = currentTime;
639
- if (!this.enable)
640
- return;
641
- const danmuList = this.list;
642
- /**
643
- * @todo 这个判断对拖拽进度的处理不严谨
644
- */
645
- const newDanmuList = danmuList.filter(({ time }) => {
646
- return currentTime - time < 4 && currentTime > time;
701
+ sendDanmu(danmuList = []) {
702
+ return __awaiter(this, void 0, void 0, function* () {
703
+ if (Array.isArray(danmuList)) {
704
+ this.list = [
705
+ ...this.list,
706
+ ...danmuList.map(danmu => this.ensureProperties(danmu))
707
+ ];
708
+ }
709
+ else {
710
+ const danmu = danmuList;
711
+ this.list = [
712
+ ...this.list,
713
+ Object.assign({}, this.ensureProperties(danmu))
714
+ ];
715
+ }
647
716
  });
648
- let shouldUpdate = false;
649
- const oldDanmuList = this.danmuList;
650
- if (newDanmuList.length !== oldDanmuList.length) {
651
- shouldUpdate = true;
652
- }
653
- else {
654
- shouldUpdate = newDanmuList.some(({ key }) => {
655
- return oldDanmuList.every((danmu) => {
656
- return key !== danmu.key;
657
- });
717
+ }
718
+ tick(currentTime) {
719
+ return __awaiter(this, void 0, void 0, function* () {
720
+ this.currentTime = currentTime;
721
+ if (!this.enable)
722
+ return;
723
+ const danmuList = this.list;
724
+ /**
725
+ * @todo 这个判断对拖拽进度的处理不严谨
726
+ */
727
+ const newDanmuList = danmuList.filter(({ time }) => {
728
+ return currentTime - time < 4 && currentTime > time;
658
729
  });
659
- }
660
- if (shouldUpdate) {
661
- this.danmuList = newDanmuList;
662
- }
730
+ let shouldUpdate = false;
731
+ const oldDanmuList = this.danmuList;
732
+ if (newDanmuList.length !== oldDanmuList.length) {
733
+ shouldUpdate = true;
734
+ }
735
+ else {
736
+ shouldUpdate = newDanmuList.some(({ key }) => {
737
+ return oldDanmuList.every((danmu) => {
738
+ return key !== danmu.key;
739
+ });
740
+ });
741
+ }
742
+ if (shouldUpdate) {
743
+ this.danmuList = newDanmuList;
744
+ }
745
+ });
663
746
  }
664
747
  componentDidUpdate() {
665
748
  requestAnimationFrame(() => {
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7464647f.js');
6
- const index$1 = require('./index-cde74e58.js');
5
+ const index = require('./index-dd4b7ba3.js');
6
+ const index$1 = require('./index-b9715722.js');
7
7
 
8
8
  const indexCss = "body,html{-webkit-tap-highlight-color:rgba(0, 0, 0, 0);user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}taro-view-core{display:block}";
9
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-7464647f.js');
5
+ const index = require('./index-dd4b7ba3.js');
6
6
 
7
7
  const indexCss = "iframe{border:none}.taro-webview{position:fixed;top:0;bottom:0;width:100%;height:100%;z-index:999}";
8
8
 
@@ -7,7 +7,7 @@
7
7
  "./components/canvas/canvas.js",
8
8
  "./components/checkbox/checkbox-group.js",
9
9
  "./components/checkbox/checkbox.js",
10
- "./components/cover-view/cover-image.js",
10
+ "./components/cover-image/cover-image.js",
11
11
  "./components/cover-view/cover-view.js",
12
12
  "./components/custom-wrapper/custom-wrapper.js",
13
13
  "./components/form/form.js",
@@ -0,0 +1,94 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, Prop, Event, h } from '@stencil/core';
3
+ export class CoverImage {
4
+ constructor() {
5
+ this.nativeProps = {};
6
+ }
7
+ imageOnLoad() {
8
+ const { width, height, } = this.imgRef;
9
+ this.onLoad.emit({
10
+ width,
11
+ height
12
+ });
13
+ }
14
+ imageOnError() {
15
+ this.onError.emit();
16
+ }
17
+ render() {
18
+ const { src, imageOnLoad, imageOnError, nativeProps } = this;
19
+ return (h("img", Object.assign({ ref: img => (this.imgRef = img), src: src, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }, nativeProps)));
20
+ }
21
+ static get is() { return "taro-cover-image-core"; }
22
+ static get originalStyleUrls() { return {
23
+ "$": ["./style/index.scss"]
24
+ }; }
25
+ static get styleUrls() { return {
26
+ "$": ["./style/index.css"]
27
+ }; }
28
+ static get properties() { return {
29
+ "src": {
30
+ "type": "string",
31
+ "mutable": false,
32
+ "complexType": {
33
+ "original": "string",
34
+ "resolved": "string",
35
+ "references": {}
36
+ },
37
+ "required": false,
38
+ "optional": false,
39
+ "docs": {
40
+ "tags": [],
41
+ "text": ""
42
+ },
43
+ "attribute": "src",
44
+ "reflect": false
45
+ },
46
+ "nativeProps": {
47
+ "type": "unknown",
48
+ "mutable": false,
49
+ "complexType": {
50
+ "original": "{}",
51
+ "resolved": "{}",
52
+ "references": {}
53
+ },
54
+ "required": false,
55
+ "optional": false,
56
+ "docs": {
57
+ "tags": [],
58
+ "text": ""
59
+ },
60
+ "defaultValue": "{}"
61
+ }
62
+ }; }
63
+ static get events() { return [{
64
+ "method": "onLoad",
65
+ "name": "load",
66
+ "bubbles": true,
67
+ "cancelable": true,
68
+ "composed": true,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": ""
72
+ },
73
+ "complexType": {
74
+ "original": "any",
75
+ "resolved": "any",
76
+ "references": {}
77
+ }
78
+ }, {
79
+ "method": "onError",
80
+ "name": "error",
81
+ "bubbles": true,
82
+ "cancelable": true,
83
+ "composed": true,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "complexType": {
89
+ "original": "any",
90
+ "resolved": "any",
91
+ "references": {}
92
+ }
93
+ }]; }
94
+ }
@@ -0,0 +1,5 @@
1
+ taro-cover-image-core {
2
+ overflow: hidden;
3
+ width: 320px;
4
+ height: 240px;
5
+ }