bulade-ui 1.1.26 → 1.1.27

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 (400) hide show
  1. package/.babelrc +11 -11
  2. package/.vscode/extensions.json +7 -7
  3. package/.vscode/settings.json +32 -32
  4. package/LICENSE +21 -21
  5. package/README.md +45 -45
  6. package/gulpfile.js +26 -26
  7. package/miniprogram_dist/assets/font/iconfont.scss +549 -549
  8. package/miniprogram_dist/assets/style/border.wxss +94 -94
  9. package/miniprogram_dist/bld-action-sheet/index.js.map +1 -1
  10. package/miniprogram_dist/bld-action-sheet/index.json +8 -8
  11. package/miniprogram_dist/bld-action-sheet/index.wxml +56 -56
  12. package/miniprogram_dist/bld-badge/index.js.map +1 -1
  13. package/miniprogram_dist/bld-badge/index.json +3 -3
  14. package/miniprogram_dist/bld-badge/index.wxml +13 -13
  15. package/miniprogram_dist/bld-button/index.js.map +1 -1
  16. package/miniprogram_dist/bld-button/index.json +7 -7
  17. package/miniprogram_dist/bld-button/index.wxml +3 -3
  18. package/miniprogram_dist/bld-button-v2/index.js.map +1 -1
  19. package/miniprogram_dist/bld-button-v2/index.json +3 -3
  20. package/miniprogram_dist/bld-button-v2/index.wxml +41 -41
  21. package/miniprogram_dist/bld-card/index.js.map +1 -1
  22. package/miniprogram_dist/bld-card/index.json +2 -2
  23. package/miniprogram_dist/bld-card/index.wxml +5 -5
  24. package/miniprogram_dist/bld-cell/index.js.map +1 -1
  25. package/miniprogram_dist/bld-cell/index.json +7 -7
  26. package/miniprogram_dist/bld-cell/index.wxml +42 -42
  27. package/miniprogram_dist/bld-cell-field/index.js.map +1 -1
  28. package/miniprogram_dist/bld-cell-field/index.json +6 -6
  29. package/miniprogram_dist/bld-cell-field/index.wxml +8 -8
  30. package/miniprogram_dist/bld-cell-group/index.js.map +1 -1
  31. package/miniprogram_dist/bld-cell-group/index.json +2 -2
  32. package/miniprogram_dist/bld-cell-group/index.wxml +14 -14
  33. package/miniprogram_dist/bld-cell-group-v2/index.js.map +1 -1
  34. package/miniprogram_dist/bld-cell-group-v2/index.json +2 -2
  35. package/miniprogram_dist/bld-cell-group-v2/index.wxml +9 -9
  36. package/miniprogram_dist/bld-cell-v2/index.js.map +1 -1
  37. package/miniprogram_dist/bld-cell-v2/index.json +5 -5
  38. package/miniprogram_dist/bld-cell-v2/index.wxml +24 -24
  39. package/miniprogram_dist/bld-checkbox/index.js.map +1 -1
  40. package/miniprogram_dist/bld-checkbox/index.json +5 -5
  41. package/miniprogram_dist/bld-checkbox/index.wxml +66 -66
  42. package/miniprogram_dist/bld-checkbox-group/index.js.map +1 -1
  43. package/miniprogram_dist/bld-checkbox-group/index.json +3 -3
  44. package/miniprogram_dist/bld-cloud-image/index.js.map +1 -1
  45. package/miniprogram_dist/bld-cloud-image/index.json +2 -2
  46. package/miniprogram_dist/bld-cloud-image/index.wxml +14 -14
  47. package/miniprogram_dist/bld-collapse/index.js.map +1 -1
  48. package/miniprogram_dist/bld-collapse/index.json +3 -3
  49. package/miniprogram_dist/bld-collapse/index.wxml +8 -8
  50. package/miniprogram_dist/bld-dialog-tip/index.js.map +1 -1
  51. package/miniprogram_dist/bld-dialog-tip/index.json +5 -5
  52. package/miniprogram_dist/bld-dialog-tip/index.wxml +23 -23
  53. package/miniprogram_dist/bld-drawer/index.js.map +1 -1
  54. package/miniprogram_dist/bld-drawer/index.json +3 -3
  55. package/miniprogram_dist/bld-drawer/index.wxml +13 -13
  56. package/miniprogram_dist/bld-empty-page/index.js.map +1 -1
  57. package/miniprogram_dist/bld-empty-page/index.json +5 -5
  58. package/miniprogram_dist/bld-empty-page/index.wxml +11 -11
  59. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.js.map +1 -1
  60. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.json +6 -6
  61. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.wxml +43 -43
  62. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.js.map +1 -1
  63. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.json +4 -4
  64. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.wxml +27 -27
  65. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.js.map +1 -1
  66. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.json +6 -6
  67. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.wxml +52 -52
  68. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.js.map +1 -1
  69. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.json +4 -4
  70. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.wxml +28 -28
  71. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.js.map +1 -1
  72. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.json +4 -4
  73. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.wxml +6 -6
  74. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.js.map +1 -1
  75. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.json +4 -4
  76. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.wxml +25 -25
  77. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.js.map +1 -1
  78. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.json +6 -6
  79. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.wxml +43 -43
  80. package/miniprogram_dist/bld-half-screen/index.js.map +1 -1
  81. package/miniprogram_dist/bld-half-screen/index.json +4 -4
  82. package/miniprogram_dist/bld-half-screen/index.wxml +36 -36
  83. package/miniprogram_dist/bld-html/index.js.map +1 -1
  84. package/miniprogram_dist/bld-html/index.json +5 -5
  85. package/miniprogram_dist/bld-html/index.wxml +9 -9
  86. package/miniprogram_dist/bld-icon/index.js.map +1 -1
  87. package/miniprogram_dist/bld-icon/index.json +6 -6
  88. package/miniprogram_dist/bld-icon/index.wxml +36 -36
  89. package/miniprogram_dist/bld-loading/index.js.map +1 -1
  90. package/miniprogram_dist/bld-loading/index.json +6 -6
  91. package/miniprogram_dist/bld-loading/index.wxml +8 -8
  92. package/miniprogram_dist/bld-message/index.js.map +1 -1
  93. package/miniprogram_dist/bld-message/index.json +3 -3
  94. package/miniprogram_dist/bld-message/index.wxml +8 -8
  95. package/miniprogram_dist/bld-message/message.js.map +1 -1
  96. package/miniprogram_dist/bld-modal/index.js.map +1 -1
  97. package/miniprogram_dist/bld-modal/index.json +6 -6
  98. package/miniprogram_dist/bld-modal/index.wxml +22 -22
  99. package/miniprogram_dist/bld-modal/modal.js.map +1 -1
  100. package/miniprogram_dist/bld-nav-bar/index.js.map +1 -1
  101. package/miniprogram_dist/bld-nav-bar/index.json +6 -6
  102. package/miniprogram_dist/bld-nav-bar/index.wxml +43 -43
  103. package/miniprogram_dist/bld-navbar/index.js.map +1 -1
  104. package/miniprogram_dist/bld-navbar/index.json +5 -5
  105. package/miniprogram_dist/bld-navbar/index.wxml +7 -7
  106. package/miniprogram_dist/bld-navbar-group/index.js.map +1 -1
  107. package/miniprogram_dist/bld-navbar-group/index.json +3 -3
  108. package/miniprogram_dist/bld-navbar-group/index.wxml +36 -36
  109. package/miniprogram_dist/bld-notice-bar/index.js.map +1 -1
  110. package/miniprogram_dist/bld-notice-bar/index.json +3 -3
  111. package/miniprogram_dist/bld-notice-bar/index.wxml +29 -29
  112. package/miniprogram_dist/bld-overlay/index.js.map +1 -1
  113. package/miniprogram_dist/bld-overlay/index.json +3 -3
  114. package/miniprogram_dist/bld-overlay/index.wxml +11 -11
  115. package/miniprogram_dist/bld-page/index.js.map +1 -1
  116. package/miniprogram_dist/bld-page/index.json +7 -7
  117. package/miniprogram_dist/bld-page/index.wxml +28 -28
  118. package/miniprogram_dist/bld-pop-up/index.js.map +1 -1
  119. package/miniprogram_dist/bld-pop-up/index.json +6 -6
  120. package/miniprogram_dist/bld-pop-up/index.wxml +18 -18
  121. package/miniprogram_dist/bld-progress/index.js.map +1 -1
  122. package/miniprogram_dist/bld-progress/index.json +3 -3
  123. package/miniprogram_dist/bld-progress/index.wxml +34 -34
  124. package/miniprogram_dist/bld-radio/index.js.map +1 -1
  125. package/miniprogram_dist/bld-radio/index.json +3 -3
  126. package/miniprogram_dist/bld-radio/index.wxml +23 -23
  127. package/miniprogram_dist/bld-radio-group/index.js.map +1 -1
  128. package/miniprogram_dist/bld-radio-group/index.json +3 -3
  129. package/miniprogram_dist/bld-retry/index.js.map +1 -1
  130. package/miniprogram_dist/bld-retry/index.json +2 -2
  131. package/miniprogram_dist/bld-retry/index.wxml +5 -5
  132. package/miniprogram_dist/bld-scroll-view/index.js.map +1 -1
  133. package/miniprogram_dist/bld-scroll-view/index.json +7 -7
  134. package/miniprogram_dist/bld-scroll-view/index.wxml +42 -42
  135. package/miniprogram_dist/bld-tabs/index.js +121 -0
  136. package/miniprogram_dist/bld-tabs/index.js.map +1 -0
  137. package/miniprogram_dist/bld-tabs/index.json +5 -0
  138. package/miniprogram_dist/bld-tabs/index.wxml +14 -0
  139. package/miniprogram_dist/bld-tabs/index.wxss +30 -0
  140. package/miniprogram_dist/bld-tag/index.js.map +1 -1
  141. package/miniprogram_dist/bld-tag/index.json +3 -3
  142. package/miniprogram_dist/bld-tag/index.wxml +2 -2
  143. package/miniprogram_dist/bld-text/index.js.map +1 -1
  144. package/miniprogram_dist/bld-text/index.json +2 -2
  145. package/miniprogram_dist/bld-text/index.wxml +3 -3
  146. package/miniprogram_dist/bld-toast/index.js.map +1 -1
  147. package/miniprogram_dist/bld-toast/index.json +5 -5
  148. package/miniprogram_dist/bld-toast/index.wxml +26 -26
  149. package/miniprogram_dist/bld-toast/toast.js.map +1 -1
  150. package/miniprogram_dist/bld-wrapper/index.js.map +1 -1
  151. package/miniprogram_dist/bld-wrapper/index.json +4 -4
  152. package/miniprogram_dist/bld-wrapper/index.wxml +6 -6
  153. package/miniprogram_dist/button/index.js.map +1 -1
  154. package/miniprogram_dist/button/index.json +3 -3
  155. package/miniprogram_dist/button/index.wxml +41 -41
  156. package/miniprogram_dist/components-npm/mp-weixin/index.js +6 -6
  157. package/miniprogram_dist/components-npm/mp-weixin/index.js.map +1 -1
  158. package/miniprogram_dist/components-npm/mp-weixin/node/node.js.map +1 -1
  159. package/miniprogram_dist/grid/index.js +2 -2
  160. package/miniprogram_dist/grid/index.js.map +1 -1
  161. package/miniprogram_dist/grid/index.json +3 -3
  162. package/miniprogram_dist/grid/index.wxml +2 -2
  163. package/miniprogram_dist/grid-item/index.js +2 -2
  164. package/miniprogram_dist/grid-item/index.js.map +1 -1
  165. package/miniprogram_dist/grid-item/index.json +5 -5
  166. package/miniprogram_dist/grid-item/index.wxml +45 -45
  167. package/miniprogram_dist/timeline/index.js +2 -2
  168. package/miniprogram_dist/timeline/index.js.map +1 -1
  169. package/miniprogram_dist/timeline/index.json +2 -2
  170. package/miniprogram_dist/timeline/index.wxml +1 -1
  171. package/miniprogram_dist/timeline-item/index.js +2 -2
  172. package/miniprogram_dist/timeline-item/index.js.map +1 -1
  173. package/miniprogram_dist/timeline-item/index.json +5 -5
  174. package/miniprogram_dist/timeline-item/index.wxml +9 -9
  175. package/miniprogram_dist/utils/systemInfo.js +52 -52
  176. package/package.json +72 -72
  177. package/project.config.json +7 -7
  178. package/src/assets/font/iconfont.scss +549 -549
  179. package/src/assets/style/border.wxss +94 -94
  180. package/src/bld-action-sheet/index.js +82 -82
  181. package/src/bld-action-sheet/index.json +8 -8
  182. package/src/bld-action-sheet/index.scss +179 -179
  183. package/src/bld-action-sheet/index.wxml +56 -56
  184. package/src/bld-badge/index.js +53 -53
  185. package/src/bld-badge/index.json +3 -3
  186. package/src/bld-badge/index.scss +45 -45
  187. package/src/bld-badge/index.wxml +13 -13
  188. package/src/bld-button/index.js +13 -13
  189. package/src/bld-button/index.json +7 -7
  190. package/src/bld-button/index.scss +44 -44
  191. package/src/bld-button/index.wxml +3 -3
  192. package/src/bld-button-v2/index.js +91 -91
  193. package/src/bld-button-v2/index.json +3 -3
  194. package/src/bld-button-v2/index.scss +206 -206
  195. package/src/bld-button-v2/index.wxml +41 -41
  196. package/src/bld-card/index.js +3 -3
  197. package/src/bld-card/index.json +2 -2
  198. package/src/bld-card/index.scss +6 -6
  199. package/src/bld-card/index.wxml +5 -5
  200. package/src/bld-cell/index.js +28 -28
  201. package/src/bld-cell/index.json +7 -7
  202. package/src/bld-cell/index.scss +42 -42
  203. package/src/bld-cell/index.wxml +42 -42
  204. package/src/bld-cell-field/index.js +11 -11
  205. package/src/bld-cell-field/index.json +6 -6
  206. package/src/bld-cell-field/index.scss +21 -21
  207. package/src/bld-cell-field/index.wxml +8 -8
  208. package/src/bld-cell-group/index.js +11 -11
  209. package/src/bld-cell-group/index.json +2 -2
  210. package/src/bld-cell-group/index.scss +13 -13
  211. package/src/bld-cell-group/index.wxml +14 -14
  212. package/src/bld-cell-group-v2/index.js +70 -70
  213. package/src/bld-cell-group-v2/index.json +2 -2
  214. package/src/bld-cell-group-v2/index.scss +31 -31
  215. package/src/bld-cell-group-v2/index.wxml +9 -9
  216. package/src/bld-cell-v2/index.js +80 -80
  217. package/src/bld-cell-v2/index.json +5 -5
  218. package/src/bld-cell-v2/index.scss +74 -74
  219. package/src/bld-cell-v2/index.wxml +24 -24
  220. package/src/bld-checkbox/index.js +110 -110
  221. package/src/bld-checkbox/index.json +5 -5
  222. package/src/bld-checkbox/index.scss +71 -71
  223. package/src/bld-checkbox/index.wxml +66 -66
  224. package/src/bld-checkbox-group/index.js +84 -84
  225. package/src/bld-checkbox-group/index.json +3 -3
  226. package/src/bld-cloud-image/index.js +79 -79
  227. package/src/bld-cloud-image/index.json +2 -2
  228. package/src/bld-cloud-image/index.scss +3 -3
  229. package/src/bld-cloud-image/index.wxml +14 -14
  230. package/src/bld-collapse/index.js +62 -62
  231. package/src/bld-collapse/index.json +3 -3
  232. package/src/bld-collapse/index.scss +6 -6
  233. package/src/bld-collapse/index.wxml +8 -8
  234. package/src/bld-content-container/index.js +46 -46
  235. package/src/bld-content-container/index.json +2 -2
  236. package/src/bld-content-container/index.wxml +5 -5
  237. package/src/bld-dialog-tip/index.js +60 -60
  238. package/src/bld-dialog-tip/index.json +5 -5
  239. package/src/bld-dialog-tip/index.scss +66 -66
  240. package/src/bld-dialog-tip/index.wxml +23 -23
  241. package/src/bld-drawer/index.js +40 -40
  242. package/src/bld-drawer/index.json +3 -3
  243. package/src/bld-drawer/index.scss +78 -78
  244. package/src/bld-drawer/index.wxml +13 -13
  245. package/src/bld-empty-page/index.js +23 -23
  246. package/src/bld-empty-page/index.json +5 -5
  247. package/src/bld-empty-page/index.scss +15 -15
  248. package/src/bld-empty-page/index.wxml +11 -11
  249. package/src/bld-form/bld-form-item/bld-form-date/index.js +211 -211
  250. package/src/bld-form/bld-form-item/bld-form-date/index.json +6 -6
  251. package/src/bld-form/bld-form-item/bld-form-date/index.scss +53 -53
  252. package/src/bld-form/bld-form-item/bld-form-date/index.wxml +43 -43
  253. package/src/bld-form/bld-form-item/bld-form-input/index.js +53 -53
  254. package/src/bld-form/bld-form-item/bld-form-input/index.json +4 -4
  255. package/src/bld-form/bld-form-item/bld-form-input/index.scss +25 -25
  256. package/src/bld-form/bld-form-item/bld-form-input/index.wxml +27 -27
  257. package/src/bld-form/bld-form-item/bld-form-select-input/index.js +145 -145
  258. package/src/bld-form/bld-form-item/bld-form-select-input/index.json +6 -6
  259. package/src/bld-form/bld-form-item/bld-form-select-input/index.scss +117 -117
  260. package/src/bld-form/bld-form-item/bld-form-select-input/index.wxml +52 -52
  261. package/src/bld-form/bld-form-item/bld-form-step/index.js +58 -58
  262. package/src/bld-form/bld-form-item/bld-form-step/index.json +4 -4
  263. package/src/bld-form/bld-form-item/bld-form-step/index.scss +42 -42
  264. package/src/bld-form/bld-form-item/bld-form-step/index.wxml +28 -28
  265. package/src/bld-form/bld-form-item/bld-form-switch/index.js +37 -37
  266. package/src/bld-form/bld-form-item/bld-form-switch/index.json +4 -4
  267. package/src/bld-form/bld-form-item/bld-form-switch/index.scss +22 -22
  268. package/src/bld-form/bld-form-item/bld-form-switch/index.wxml +6 -6
  269. package/src/bld-form/bld-form-item/bld-form-textarea/index.js +44 -44
  270. package/src/bld-form/bld-form-item/bld-form-textarea/index.json +4 -4
  271. package/src/bld-form/bld-form-item/bld-form-textarea/index.scss +25 -25
  272. package/src/bld-form/bld-form-item/bld-form-textarea/index.wxml +25 -25
  273. package/src/bld-form/bld-form-item/bld-form-time/index.js +108 -108
  274. package/src/bld-form/bld-form-item/bld-form-time/index.json +6 -6
  275. package/src/bld-form/bld-form-item/bld-form-time/index.scss +53 -53
  276. package/src/bld-form/bld-form-item/bld-form-time/index.wxml +43 -43
  277. package/src/bld-half-screen/index.js +166 -166
  278. package/src/bld-half-screen/index.json +4 -4
  279. package/src/bld-half-screen/index.scss +109 -109
  280. package/src/bld-half-screen/index.wxml +36 -36
  281. package/src/bld-html/index.js +41 -41
  282. package/src/bld-html/index.json +5 -5
  283. package/src/bld-html/index.scss +13 -13
  284. package/src/bld-html/index.wxml +9 -9
  285. package/src/bld-icon/index.js +41 -41
  286. package/src/bld-icon/index.json +6 -6
  287. package/src/bld-icon/index.scss +19 -19
  288. package/src/bld-icon/index.wxml +36 -36
  289. package/src/bld-icon-back/index.js +8 -8
  290. package/src/bld-icon-back/index.json +3 -3
  291. package/src/bld-icon-back/index.scss +1 -1
  292. package/src/bld-icon-back/index.wxml +1 -1
  293. package/src/bld-loading/index.js +9 -9
  294. package/src/bld-loading/index.json +6 -6
  295. package/src/bld-loading/index.scss +25 -25
  296. package/src/bld-loading/index.wxml +8 -8
  297. package/src/bld-message/index.js +90 -90
  298. package/src/bld-message/index.json +3 -3
  299. package/src/bld-message/index.scss +66 -66
  300. package/src/bld-message/index.wxml +8 -8
  301. package/src/bld-message/message.js +61 -61
  302. package/src/bld-modal/index.js +122 -122
  303. package/src/bld-modal/index.json +6 -6
  304. package/src/bld-modal/index.scss +107 -107
  305. package/src/bld-modal/index.wxml +22 -22
  306. package/src/bld-modal/modal.js +37 -37
  307. package/src/bld-nav-bar/index.js +131 -131
  308. package/src/bld-nav-bar/index.json +6 -6
  309. package/src/bld-nav-bar/index.scss +48 -48
  310. package/src/bld-nav-bar/index.wxml +43 -43
  311. package/src/bld-nav-bar1/index.js +90 -90
  312. package/src/bld-nav-bar1/index.json +5 -5
  313. package/src/bld-nav-bar1/index.scss +39 -39
  314. package/src/bld-nav-bar1/index.wxml +24 -24
  315. package/src/bld-navbar/index.js +62 -62
  316. package/src/bld-navbar/index.json +5 -5
  317. package/src/bld-navbar/index.scss +34 -34
  318. package/src/bld-navbar/index.wxml +7 -7
  319. package/src/bld-navbar-group/index.js +139 -139
  320. package/src/bld-navbar-group/index.json +3 -3
  321. package/src/bld-navbar-group/index.scss +32 -32
  322. package/src/bld-navbar-group/index.wxml +36 -36
  323. package/src/bld-notice-bar/index.js +69 -69
  324. package/src/bld-notice-bar/index.json +3 -3
  325. package/src/bld-notice-bar/index.scss +58 -58
  326. package/src/bld-notice-bar/index.wxml +29 -29
  327. package/src/bld-overlay/index.js +17 -17
  328. package/src/bld-overlay/index.json +3 -3
  329. package/src/bld-overlay/index.scss +11 -11
  330. package/src/bld-overlay/index.wxml +11 -11
  331. package/src/bld-page/index.js +78 -78
  332. package/src/bld-page/index.json +7 -7
  333. package/src/bld-page/index.scss +16 -16
  334. package/src/bld-page/index.wxml +28 -28
  335. package/src/bld-pop-up/index.js +29 -29
  336. package/src/bld-pop-up/index.json +6 -6
  337. package/src/bld-pop-up/index.scss +27 -27
  338. package/src/bld-pop-up/index.wxml +18 -18
  339. package/src/bld-progress/index.js +49 -49
  340. package/src/bld-progress/index.json +3 -3
  341. package/src/bld-progress/index.scss +73 -73
  342. package/src/bld-progress/index.wxml +34 -34
  343. package/src/bld-radio/index.js +64 -64
  344. package/src/bld-radio/index.json +3 -3
  345. package/src/bld-radio/index.scss +67 -67
  346. package/src/bld-radio/index.wxml +23 -23
  347. package/src/bld-radio-group/index.js +82 -82
  348. package/src/bld-radio-group/index.json +3 -3
  349. package/src/bld-retry/index.js +23 -23
  350. package/src/bld-retry/index.json +2 -2
  351. package/src/bld-retry/index.scss +26 -26
  352. package/src/bld-retry/index.wxml +5 -5
  353. package/src/bld-scroll-view/index.js +28 -28
  354. package/src/bld-scroll-view/index.json +7 -7
  355. package/src/bld-scroll-view/index.scss +7 -7
  356. package/src/bld-scroll-view/index.wxml +42 -42
  357. package/src/bld-tabs/index.js +21 -0
  358. package/src/bld-tabs/index.json +5 -0
  359. package/src/bld-tabs/index.scss +33 -0
  360. package/src/bld-tabs/index.wxml +14 -0
  361. package/src/bld-tabs/index.wxss +30 -0
  362. package/src/bld-tag/index.js +33 -33
  363. package/src/bld-tag/index.json +3 -3
  364. package/src/bld-tag/index.scss +126 -126
  365. package/src/bld-tag/index.wxml +2 -2
  366. package/src/bld-text/index.js +46 -46
  367. package/src/bld-text/index.json +2 -2
  368. package/src/bld-text/index.scss +30 -30
  369. package/src/bld-text/index.wxml +3 -3
  370. package/src/bld-toast/index.js +113 -113
  371. package/src/bld-toast/index.json +5 -5
  372. package/src/bld-toast/index.scss +111 -111
  373. package/src/bld-toast/index.wxml +26 -26
  374. package/src/bld-toast/toast.js +34 -34
  375. package/src/bld-wrapper/index.js +75 -75
  376. package/src/bld-wrapper/index.json +4 -4
  377. package/src/bld-wrapper/index.scss +7 -7
  378. package/src/bld-wrapper/index.wxml +6 -6
  379. package/src/button/index.js +91 -91
  380. package/src/button/index.json +3 -3
  381. package/src/button/index.scss +206 -206
  382. package/src/button/index.wxml +41 -41
  383. package/src/components-npm/mp-weixin/index.js +7 -7
  384. package/src/grid/index.js +67 -67
  385. package/src/grid/index.json +3 -3
  386. package/src/grid/index.scss +20 -20
  387. package/src/grid/index.wxml +2 -2
  388. package/src/grid-item/index.js +72 -72
  389. package/src/grid-item/index.json +5 -5
  390. package/src/grid-item/index.scss +58 -58
  391. package/src/grid-item/index.wxml +45 -45
  392. package/src/timeline/index.js +49 -49
  393. package/src/timeline/index.json +2 -2
  394. package/src/timeline/index.wxml +1 -1
  395. package/src/timeline-item/index.js +27 -27
  396. package/src/timeline-item/index.json +5 -5
  397. package/src/timeline-item/index.scss +36 -36
  398. package/src/timeline-item/index.wxml +9 -9
  399. package/src/utils/systemInfo.js +52 -52
  400. package/tsconfig.json +25 -25
@@ -1,44 +1,44 @@
1
- <view class="item-box form-item" bind:tap="showSellect">
2
- <view class="item-label-box" wx:if="{{label}}">
3
- <block wx:if="{{ required }}">
4
- <view class="item-label-required">
5
- *
6
- </view>
7
- </block>
8
- <view
9
- class="item-label form-label"
10
- style="width: {{ labelWidth }};"
11
- >
12
- {{ label }}
13
- </view>
14
- </view>
15
- <view class="item-value-box">
16
- <view class="item-value-text form-value {{text?text:'value-placeholder'}}">{{text?text:"请选择"+label}}</view>
17
- <bld-cloud-image
18
- iclass="arrow-icon select-icon"
19
- src="my/arrow.png"
20
- />
21
- </view>
22
- </view>
23
- <bld-half-screen showHalfScreen="{{showActionsheet}}" markClass="mark-box" containerClass="container-box"
24
- containerHeight="800rpx" mark="{{true}}" showClose="{{false}}" canClose="{{true}}">
25
- <view slot="header">
26
- </view>
27
- <view slot="content">
28
- <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{selectValue}}" bindchange="bindChange">
29
- <picker-view-column>
30
- <view wx:for="{{hours}}" wx:key="{{hours}}" style="line-height: 50px; text-align: center;">{{item}}</view>
31
- </picker-view-column>
32
- <picker-view-column>
33
- <view wx:for="{{minutes}}" wx:key="{{minutes}}" style="line-height: 50px; text-align: center;">{{item}}</view>
34
- </picker-view-column>
35
- <picker-view-column>
36
- <view wx:for="{{seconds}}" wx:key="{{seconds}}" style="line-height: 50px; text-align: center;">{{item}}</view>
37
- </picker-view-column>
38
- </picker-view>
39
- </view>
40
-
41
- <view slot="footer">
42
- <view class="sure-button" bind:tap="handelChoose">确定</view>
43
- </view>
1
+ <view class="item-box form-item" bind:tap="showSellect">
2
+ <view class="item-label-box" wx:if="{{label}}">
3
+ <block wx:if="{{ required }}">
4
+ <view class="item-label-required">
5
+ *
6
+ </view>
7
+ </block>
8
+ <view
9
+ class="item-label form-label"
10
+ style="width: {{ labelWidth }};"
11
+ >
12
+ {{ label }}
13
+ </view>
14
+ </view>
15
+ <view class="item-value-box">
16
+ <view class="item-value-text form-value {{text?text:'value-placeholder'}}">{{text?text:"请选择"+label}}</view>
17
+ <bld-cloud-image
18
+ iclass="arrow-icon select-icon"
19
+ src="my/arrow.png"
20
+ />
21
+ </view>
22
+ </view>
23
+ <bld-half-screen showHalfScreen="{{showActionsheet}}" markClass="mark-box" containerClass="container-box"
24
+ containerHeight="800rpx" mark="{{true}}" showClose="{{false}}" canClose="{{true}}">
25
+ <view slot="header">
26
+ </view>
27
+ <view slot="content">
28
+ <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{selectValue}}" bindchange="bindChange">
29
+ <picker-view-column>
30
+ <view wx:for="{{hours}}" wx:key="{{hours}}" style="line-height: 50px; text-align: center;">{{item}}</view>
31
+ </picker-view-column>
32
+ <picker-view-column>
33
+ <view wx:for="{{minutes}}" wx:key="{{minutes}}" style="line-height: 50px; text-align: center;">{{item}}</view>
34
+ </picker-view-column>
35
+ <picker-view-column>
36
+ <view wx:for="{{seconds}}" wx:key="{{seconds}}" style="line-height: 50px; text-align: center;">{{item}}</view>
37
+ </picker-view-column>
38
+ </picker-view>
39
+ </view>
40
+
41
+ <view slot="footer">
42
+ <view class="sure-button" bind:tap="handelChoose">确定</view>
43
+ </view>
44
44
  </bld-half-screen>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-half-screen/index.js"],"names":["wx","worklet","shared","timing","GestureState","POSSIBLE","BEGIN","ACTIVE","END","CANCELLED","Component","externalClasses","properties","showHalfScreen","type","Boolean","value","mark","maskClosable","containerHeight","String","showClose","canClose","options","multipleSlots","data","showMark","observers","newShow","openComment","closeComment","canCloseSelect","lifetimes","created","transY","scrollTop","startPan","commentHeight","setData","ready","query","createSelectorQuery","select","boundingClientRect","exec","res","height","applyAnimatedStyle","transform","methods","scrollToLower","triggerEvent","scrollTouUpPer","onTapOpenComment","changeMask","duration","runOnJS","bind","onTapCloseComment","closeByMark","shouldPanResponse","shouldScrollViewResponse","pointerEvent","deltaY","result","handlePan","gestureEvent","state","curPosition","destination","Math","max","velocityY","adjustDecelerationVelocity","velocity","handleScroll","evt","detail"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;kBClF2BA,GAAGC,O;IAAtBC,M,eAAAA,M;IAAQC,M,eAAAA,M;;;AAEhB,IAAMC,eAAe;AACnBC,YAAU,CADS,EACN;AACbC,SAAO,CAFY,EAET;AACVC,UAAQ,CAHW,EAGR;AACXC,OAAK,CAJc,EAIX;AACRC,aAAW,CALQ,CAKN;AALM,CAArB;;AAQAC,UAAU;AACRC,mBAAiB,CAAC,gBAAD,EAAmB,gBAAnB,EAAqC,aAArC,EAAoD,mBAApD,EAAyE,cAAzE,EAAyF,WAAzF,CADT;AAERC,cAAY;AACVC,oBAAgB;AACdC,YAAMC,OADQ;AAEdC,aAAO;AAFO,KADN;AAKVC,UAAM;AACJH,YAAMC,OADF;AAEJC,aAAO;AA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GAA2B,CAAnD,EAAsD;AAC3D,eAAKc,YAAL;AACD,SAFM,MAEA;AACL,eAAKD,WAAL,CAAiB,GAAjB;AACD;AACF;AACF,KA1EM;AA2EP4C,8BA3EO,sCA2EoBC,QA3EpB,EA2E8B;AACnC;;AACA,UAAMvC,YAAY,KAAKA,SAAL,CAAenB,KAAjC;AACA,aAAOmB,aAAa,CAAb,GAAiB,CAAjB,GAAqBuC,QAA5B;AACD,KA/EM;AAgFPC,gBAhFO,wBAgFMC,GAhFN,EAgFW;AAChB;;AACA,WAAKzC,SAAL,CAAenB,KAAf,GAAuB4D,IAAIC,MAAJ,CAAW1C,SAAlC;AACD;AAnFM;AAvED,CAAV,E","file":"bld-half-screen/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","const { shared, timing } = wx.worklet\n\nconst GestureState = {\n POSSIBLE: 0, // 0 此时手势未识别,如 panDown等\n BEGIN: 1, // 1 手势已识别\n ACTIVE: 2, // 2 连续手势活跃状态\n END: 3, // 3 手势终止\n CANCELLED: 4 // 4 手势取消,\n}\n\nComponent({\n externalClasses: [\"referenceClass\", \"containerClass\", \"headerClass\", \"headerTittleClass\", \"contentClass\", \"markClass\"],\n properties: {\n showHalfScreen: {\n type: Boolean,\n value: false\n },\n mark: {\n type: Boolean,\n value: false\n },\n maskClosable: {\n type: Boolean,\n value: true\n },\n containerHeight: {\n type: String,\n value: \"50vh\"\n },\n showClose: {\n type: Boolean,\n value: true\n },\n canClose: {\n type: Boolean,\n value: true\n }\n },\n options: {\n multipleSlots: true // 在组件定义时的选项中启用多slot支持\n },\n data: {\n showMark: false\n },\n observers: {\n showHalfScreen: function(newShow) {\n if (newShow) {\n this.openComment(300)\n } else {\n this.closeComment()\n }\n },\n canClose: function() {\n this.canCloseSelect = this.properties.canClose\n }\n },\n lifetimes: {\n created() {\n this.transY = shared(1000)\n this.scrollTop = shared(0)\n this.startPan = shared(true)\n this.commentHeight = shared(1000)\n this.canCloseSelect = this.properties.canClose\n this.setData({\n showMark: this.properties.mark\n })\n },\n ready() {\n const query = this.createSelectorQuery()\n // ready 生命周期里才能获取到首屏的布局信息\n query.select(\".comment-container\").boundingClientRect()\n query.exec((res) => {\n this.transY.value = this.commentHeight.value = res[0].height\n })\n // 通过 transY 一个 SharedValue 控制半屏的位置\n this.applyAnimatedStyle(\".comment-container\", () => {\n \"worklet\"\n return { transform: `translateY(${this.transY.value}px)` }\n })\n }\n },\n methods: {\n scrollToLower() {\n this.triggerEvent(\"scrollToLower\")\n\n },\n scrollTouUpPer() {\n this.triggerEvent(\"scrollTouUpPer\")\n\n },\n onTapOpenComment() {\n this.openComment(300)\n },\n changeMask(mark) {\n if (this.properties.mark) {\n this.setData({\n showMark: mark\n })\n } else {\n this.triggerEvent(\"closeHalfScreen\")\n }\n },\n openComment(duration) {\n \"worklet\"\n wx.worklet.runOnJS(this.changeMask.bind(this))(true)\n this.transY.value = timing(0, { duration })\n },\n onTapCloseComment() {\n this.closeComment()\n },\n closeByMark() {\n if (this.properties.maskClosable) {\n this.closeComment()\n }\n },\n closeComment() {\n \"worklet\"\n if (!this.canCloseSelect) return\n wx.worklet.runOnJS(this.changeMask.bind(this))(false)\n this.transY.value = timing(this.commentHeight.value, { duration: 500 })\n },\n shouldPanResponse() {\n \"worklet\"\n return this.startPan.value\n },\n shouldScrollViewResponse(pointerEvent) {\n \"worklet\"\n // transY > 0 说明 pan 手势在移动半屏,此时滚动不应生效\n if (this.transY.value > 0) return false\n const scrollTop = this.scrollTop.value\n const { deltaY } = pointerEvent\n // deltaY > 0 是往上滚动,scrollTop <= 0 是滚动到顶部边界,此时 pan 开始生效,滚动不生效\n const result = scrollTop <= 0 && deltaY > 0\n this.startPan.value = result\n return !result\n },\n handlePan(gestureEvent) {\n \"worklet\"\n if (!this.canCloseSelect) return\n if (gestureEvent.state === GestureState.ACTIVE) {\n const curPosition = this.transY.value\n const destination = Math.max(0, curPosition + gestureEvent.deltaY)\n if (curPosition === destination) return\n this.transY.value = destination\n }\n\n if (gestureEvent.state === GestureState.END || gestureEvent.state === GestureState.CANCELLED) {\n if (gestureEvent.velocityY > 500 && this.transY.value > 50) {\n this.closeComment()\n } else if (this.transY.value > this.commentHeight.value / 2) {\n this.closeComment()\n } else {\n this.openComment(100)\n }\n }\n },\n adjustDecelerationVelocity(velocity) {\n \"worklet\"\n const scrollTop = this.scrollTop.value\n return scrollTop <= 0 ? 0 : velocity\n },\n handleScroll(evt) {\n \"worklet\"\n this.scrollTop.value = evt.detail.scrollTop\n }\n }\n})"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-half-screen/index.js"],"names":["wx","worklet","shared","timing","GestureState","POSSIBLE","BEGIN","ACTIVE","END","CANCELLED","Component","externalClasses","properties","showHalfScreen","type","Boolean","value","mark","maskClosable","containerHeight","String","showClose","canClose","options","multipleSlots","data","showMark","observers","newShow","openComment","closeComment","canCloseSelect","lifetimes","created","transY","scrollTop","startPan","commentHeight","setData","ready","query","createSelectorQuery","select","boundingClientRect","exec","res","height","applyAnimatedStyle","transform","methods","scrollToLower","triggerEvent","scrollTouUpPer","onTapOpenComment","changeMask","duration","runOnJS","bind","onTapCloseComment","closeByMark","shouldPanResponse","shouldScrollViewResponse","pointerEvent","deltaY","result","handlePan","gestureEvent","state","curPosition","destination","Math","max","velocityY","adjustDecelerationVelocity","velocity","handleScroll","evt","detail"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;Q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hFO,wBAgFMC,GAhFN,EAgFW;AAChB;;AACA,WAAKzC,SAAL,CAAenB,KAAf,GAAuB4D,IAAIC,MAAJ,CAAW1C,SAAlC;AACD;AAnFM;AAvED,CAAV,E","file":"bld-half-screen\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","const { shared, timing } = wx.worklet\r\n\r\nconst GestureState = {\r\n POSSIBLE: 0, // 0 此时手势未识别,如 panDown等\r\n BEGIN: 1, // 1 手势已识别\r\n ACTIVE: 2, // 2 连续手势活跃状态\r\n END: 3, // 3 手势终止\r\n CANCELLED: 4 // 4 手势取消,\r\n}\r\n\r\nComponent({\r\n externalClasses: [\"referenceClass\", \"containerClass\", \"headerClass\", \"headerTittleClass\", \"contentClass\", \"markClass\"],\r\n properties: {\r\n showHalfScreen: {\r\n type: Boolean,\r\n value: false\r\n },\r\n mark: {\r\n type: Boolean,\r\n value: false\r\n },\r\n maskClosable: {\r\n type: Boolean,\r\n value: true\r\n },\r\n containerHeight: {\r\n type: String,\r\n value: \"50vh\"\r\n },\r\n showClose: {\r\n type: Boolean,\r\n value: true\r\n },\r\n canClose: {\r\n type: Boolean,\r\n value: true\r\n }\r\n },\r\n options: {\r\n multipleSlots: true // 在组件定义时的选项中启用多slot支持\r\n },\r\n data: {\r\n showMark: false\r\n },\r\n observers: {\r\n showHalfScreen: function(newShow) {\r\n if (newShow) {\r\n this.openComment(300)\r\n } else {\r\n this.closeComment()\r\n }\r\n },\r\n canClose: function() {\r\n this.canCloseSelect = this.properties.canClose\r\n }\r\n },\r\n lifetimes: {\r\n created() {\r\n this.transY = shared(1000)\r\n this.scrollTop = shared(0)\r\n this.startPan = shared(true)\r\n this.commentHeight = shared(1000)\r\n this.canCloseSelect = this.properties.canClose\r\n this.setData({\r\n showMark: this.properties.mark\r\n })\r\n },\r\n ready() {\r\n const query = this.createSelectorQuery()\r\n // ready 生命周期里才能获取到首屏的布局信息\r\n query.select(\".comment-container\").boundingClientRect()\r\n query.exec((res) => {\r\n this.transY.value = this.commentHeight.value = res[0].height\r\n })\r\n // 通过 transY 一个 SharedValue 控制半屏的位置\r\n this.applyAnimatedStyle(\".comment-container\", () => {\r\n \"worklet\"\r\n return { transform: `translateY(${this.transY.value}px)` }\r\n })\r\n }\r\n },\r\n methods: {\r\n scrollToLower() {\r\n this.triggerEvent(\"scrollToLower\")\r\n\r\n },\r\n scrollTouUpPer() {\r\n this.triggerEvent(\"scrollTouUpPer\")\r\n\r\n },\r\n onTapOpenComment() {\r\n this.openComment(300)\r\n },\r\n changeMask(mark) {\r\n if (this.properties.mark) {\r\n this.setData({\r\n showMark: mark\r\n })\r\n } else {\r\n this.triggerEvent(\"closeHalfScreen\")\r\n }\r\n },\r\n openComment(duration) {\r\n \"worklet\"\r\n wx.worklet.runOnJS(this.changeMask.bind(this))(true)\r\n this.transY.value = timing(0, { duration })\r\n },\r\n onTapCloseComment() {\r\n this.closeComment()\r\n },\r\n closeByMark() {\r\n if (this.properties.maskClosable) {\r\n this.closeComment()\r\n }\r\n },\r\n closeComment() {\r\n \"worklet\"\r\n if (!this.canCloseSelect) return\r\n wx.worklet.runOnJS(this.changeMask.bind(this))(false)\r\n this.transY.value = timing(this.commentHeight.value, { duration: 500 })\r\n },\r\n shouldPanResponse() {\r\n \"worklet\"\r\n return this.startPan.value\r\n },\r\n shouldScrollViewResponse(pointerEvent) {\r\n \"worklet\"\r\n // transY > 0 说明 pan 手势在移动半屏,此时滚动不应生效\r\n if (this.transY.value > 0) return false\r\n const scrollTop = this.scrollTop.value\r\n const { deltaY } = pointerEvent\r\n // deltaY > 0 是往上滚动,scrollTop <= 0 是滚动到顶部边界,此时 pan 开始生效,滚动不生效\r\n const result = scrollTop <= 0 && deltaY > 0\r\n this.startPan.value = result\r\n return !result\r\n },\r\n handlePan(gestureEvent) {\r\n \"worklet\"\r\n if (!this.canCloseSelect) return\r\n if (gestureEvent.state === GestureState.ACTIVE) {\r\n const curPosition = this.transY.value\r\n const destination = Math.max(0, curPosition + gestureEvent.deltaY)\r\n if (curPosition === destination) return\r\n this.transY.value = destination\r\n }\r\n\r\n if (gestureEvent.state === GestureState.END || gestureEvent.state === GestureState.CANCELLED) {\r\n if (gestureEvent.velocityY > 500 && this.transY.value > 50) {\r\n this.closeComment()\r\n } else if (this.transY.value > this.commentHeight.value / 2) {\r\n this.closeComment()\r\n } else {\r\n this.openComment(100)\r\n }\r\n }\r\n },\r\n adjustDecelerationVelocity(velocity) {\r\n \"worklet\"\r\n const scrollTop = this.scrollTop.value\r\n return scrollTop <= 0 ? 0 : velocity\r\n },\r\n handleScroll(evt) {\r\n \"worklet\"\r\n this.scrollTop.value = evt.detail.scrollTop\r\n }\r\n }\r\n})"],"sourceRoot":""}
@@ -1,5 +1,5 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ }
5
5
  }
@@ -1,36 +1,36 @@
1
- <root-portal>
2
- <view class="mask-box markClass" wx:if="{{showHalfScreen&&mark && showMark}}" bind:tap="closeByMark"></view>
3
- <view class="comment-container containerClass" style="height:{{containerHeight}};">
4
-
5
- <!-- 顶部不参与手势协商,单独控制 -->
6
- <pan-gesture-handler worklet:ongesture="handlePan" style="flex-shrink: 0;">
7
- <view class="comment-header headerClass">
8
- <view class="close-comment" wx:if="{{showClose}}"
9
- bind:tap="onTapCloseComment">×
10
- </view>
11
- <view class="comment-header-title headerTittleClass">
12
- <slot name="header" />
13
- </view>
14
- </view>
15
- </pan-gesture-handler>
16
- <!-- 滚动区要与 pan 手势协商 -->
17
- <pan-gesture-handler id="pan" worklet:should-response-on-move="shouldPanResponse"
18
- simultaneous-handlers="{{['scroll']}}" worklet:ongesture="handlePan">
19
- <vertical-drag-gesture-handler id="scroll" native-view="scroll-view"
20
- worklet:should-response-on-move="shouldScrollViewResponse"
21
- simultaneous-handlers="{{['pan']}}">
22
- <scroll-view class="comment-list contentClass" scroll-y
23
- worklet:adjust-deceleration-velocity="adjustDecelerationVelocity"
24
- worklet:onscrollupdate="handleScroll" type="list" show-scrollbar="{{false}}"
25
- bind:scrolltolower="scrollToLower" bind:scrolltoupper="scrollTouUpPer"
26
- >
27
- <slot name="content" />
28
- </scroll-view>
29
- </vertical-drag-gesture-handler>
30
- </pan-gesture-handler>
31
- <view class="safe-area-inset-bottom">
32
- <slot name="footer"></slot>
33
- </view>
34
-
35
- </view>
36
- </root-portal>
1
+ <root-portal>
2
+ <view class="mask-box markClass" wx:if="{{showHalfScreen&&mark && showMark}}" bind:tap="closeByMark"></view>
3
+ <view class="comment-container containerClass" style="height:{{containerHeight}};">
4
+
5
+ <!-- 顶部不参与手势协商,单独控制 -->
6
+ <pan-gesture-handler worklet:ongesture="handlePan" style="flex-shrink: 0;">
7
+ <view class="comment-header headerClass">
8
+ <view class="close-comment" wx:if="{{showClose}}"
9
+ bind:tap="onTapCloseComment">×
10
+ </view>
11
+ <view class="comment-header-title headerTittleClass">
12
+ <slot name="header" />
13
+ </view>
14
+ </view>
15
+ </pan-gesture-handler>
16
+ <!-- 滚动区要与 pan 手势协商 -->
17
+ <pan-gesture-handler id="pan" worklet:should-response-on-move="shouldPanResponse"
18
+ simultaneous-handlers="{{['scroll']}}" worklet:ongesture="handlePan">
19
+ <vertical-drag-gesture-handler id="scroll" native-view="scroll-view"
20
+ worklet:should-response-on-move="shouldScrollViewResponse"
21
+ simultaneous-handlers="{{['pan']}}">
22
+ <scroll-view class="comment-list contentClass" scroll-y
23
+ worklet:adjust-deceleration-velocity="adjustDecelerationVelocity"
24
+ worklet:onscrollupdate="handleScroll" type="list" show-scrollbar="{{false}}"
25
+ bind:scrolltolower="scrollToLower" bind:scrolltoupper="scrollTouUpPer"
26
+ >
27
+ <slot name="content" />
28
+ </scroll-view>
29
+ </vertical-drag-gesture-handler>
30
+ </pan-gesture-handler>
31
+ <view class="safe-area-inset-bottom">
32
+ <slot name="footer"></slot>
33
+ </view>
34
+
35
+ </view>
36
+ </root-portal>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-html/index.js"],"names":["Component","externalClasses","properties","html","type","String","value","loseStyle","Boolean","data","content","tagStyle","p","img","containerStyle","observers","newValue","setData"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,QAAD,CADT;AAERC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,aAAO;AAFH,KADI;AAKVC,eAAU;AACRH,YAAMI,OADE;AAERF,aAAM;AAFE;AALA,GAFJ;AAYRG,QAAM;AACJC,aAAS,QADL;AAEJC,cAAU;AACRC,SAAG,qBADK;AAERC,WAAK;AAFG,KAFN;AAMJC,oBAAgB;AANZ,GAZE;AAoBRC,aAAW;AACT;AACE;;AAEF;AACA;AACA;;AAEE;AACA;AACA;AACF;AACAR,eAAW,mBAASS,QAAT,EAAmB;AAC5B,UAAIA,QAAJ,EAAc;AACZ,aAAKC,OAAL,CAAa;AACXN,oBAAS;AADE,SAAb;AAGD;AACF;AAlBQ;AApBH,CAAV,E","file":"bld-html/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 34);\n","Component({\n externalClasses: [\"iclass\"],\n properties: {\n html: {\n type: String,\n value: \"加载中...\",\n },\n loseStyle:{\n type: Boolean,\n value:false\n }\n },\n data: {\n content: \"加载中...\",\n tagStyle: {\n p: \"margin-bottom: 14px\",\n img: \"margin-bottom: 14px\"\n },\n containerStyle: \"padding: 0;\",\n },\n observers: {\n // html() {\n // let content = this.data.html;\n\n // content = content.replace(/style=\"(.*?)\"/gm, \"\");\n // content = content.replace(/class=\"(.*?)\"/gm, \"\");\n // content = content.replaceAll(\"<p><br></p>\", \"\");\n\n // this.setData({\n // content,\n // });\n // },\n loseStyle: function(newValue) {\n if (newValue) {\n this.setData({\n tagStyle:{}\n })\n } \n },\n },\n});\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-html/index.js"],"names":["Component","externalClasses","properties","html","type","String","value","loseStyle","Boolean","data","content","tagStyle","p","img","containerStyle","observers","newValue","setData"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,QAAD,CADT;AAERC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,aAAO;AAFH,KADI;AAKVC,eAAU;AACRH,YAAMI,OADE;AAERF,aAAM;AAFE;AALA,GAFJ;AAYRG,QAAM;AACJC,aAAS,QADL;AAEJC,cAAU;AACRC,SAAG,qBADK;AAERC,WAAK;AAFG,KAFN;AAMJC,oBAAgB;AANZ,GAZE;AAoBRC,aAAW;AACT;AACE;;AAEF;AACA;AACA;;AAEE;AACA;AACA;AACF;AACAR,eAAW,mBAASS,QAAT,EAAmB;AAC5B,UAAIA,QAAJ,EAAc;AACZ,aAAKC,OAAL,CAAa;AACXN,oBAAS;AADE,SAAb;AAGD;AACF;AAlBQ;AApBH,CAAV,E","file":"bld-html\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 34);\n","Component({\r\n externalClasses: [\"iclass\"],\r\n properties: {\r\n html: {\r\n type: String,\r\n value: \"加载中...\",\r\n },\r\n loseStyle:{\r\n type: Boolean,\r\n value:false\r\n }\r\n },\r\n data: {\r\n content: \"加载中...\",\r\n tagStyle: {\r\n p: \"margin-bottom: 14px\",\r\n img: \"margin-bottom: 14px\"\r\n },\r\n containerStyle: \"padding: 0;\",\r\n },\r\n observers: {\r\n // html() {\r\n // let content = this.data.html;\r\n\r\n // content = content.replace(/style=\"(.*?)\"/gm, \"\");\r\n // content = content.replace(/class=\"(.*?)\"/gm, \"\");\r\n // content = content.replaceAll(\"<p><br></p>\", \"\");\r\n\r\n // this.setData({\r\n // content,\r\n // });\r\n // },\r\n loseStyle: function(newValue) {\r\n if (newValue) {\r\n this.setData({\r\n tagStyle:{}\r\n })\r\n } \r\n },\r\n },\r\n});\r\n"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "mp-html": "../components-npm/mp-weixin/index"
5
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "mp-html": "../components-npm/mp-weixin/index"
5
+ }
6
6
  }
@@ -1,9 +1,9 @@
1
- <view class="{{ loseStyle ? '' : 'content-wrapper' }} iclass">
2
- <!-- <mp-html
3
- content="{{ content }}"
4
- preview-img="{{ false }}"
5
- tag-style="{{ tagStyle }}"
6
- container-style="{{ containerStyle }}"
7
- /> -->
8
- <rich-text nodes="{{html}}" bindtap="tap" mode="web-static"></rich-text>
9
- </view>
1
+ <view class="{{ loseStyle ? '' : 'content-wrapper' }} iclass">
2
+ <!-- <mp-html
3
+ content="{{ content }}"
4
+ preview-img="{{ false }}"
5
+ tag-style="{{ tagStyle }}"
6
+ container-style="{{ containerStyle }}"
7
+ /> -->
8
+ <rich-text nodes="{{html}}" bindtap="tap" mode="web-static"></rich-text>
9
+ </view>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-icon/index.js"],"names":["Component","externalClasses","options","addGlobalClass","properties","name","type","String","observer","val","setData","isImage","indexOf","size","Number","optionalTypes","value","fsize","parseInt","color","customStyle","data"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,QAAD,CADT;;AAGRC,WAAS;AACPC,oBAAgB;AADT,GAHD;;AAORC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,cAFI,oBAEKC,GAFL,EAEU;AACZ,aAAKC,OAAL,CAAa;AACXC,mBAASF,IAAIG,OAAJ,CAAY,GAAZ,IAAmB,CAAC;AADlB,SAAb;AAGD;AANG,KADI;;AAUVC,UAAM;AACJP,YAAMQ,MADF;AAEJC,qBAAe,CAACD,MAAD,EAASP,MAAT,CAFX;AAGJS,aAAO,EAHH;AAIJR,cAJI,oBAIKC,GAJL,EAIU;AACZ,aAAKC,OAAL,CAAa;AACXO,iBAAOC,SAAST,GAAT;AADI,SAAb;AAGD;AARG,KAVI;AAoBVU,WAAO;AACLb,YAAMC,MADD;AAELS,aAAO;AAFF,KApBG;AAwBVI,iBAAa;AACXd,YAAMC,MADK;AAEXS,aAAO;AAFI;AAxBH,GAPJ;;AAqCRK,QAAM;AACJV,aAAS,KADL;AAEJM,WAAO;AAFH;AArCE,CAAV,E","file":"bld-icon/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","Component({\n externalClasses: ['iclass'],\n\n options: {\n addGlobalClass: true,\n },\n\n properties: {\n name: {\n type: String,\n observer(val) {\n this.setData({\n isImage: val.indexOf('/') > -1\n })\n }\n },\n \n size: {\n type: Number,\n optionalTypes: [Number, String],\n value: '',\n observer(val) {\n this.setData({\n fsize: parseInt(val)\n }) \n }\n },\n color: {\n type: String,\n value: ''\n },\n customStyle: {\n type: String,\n value: ''\n }\n },\n \n data: {\n isImage: false,\n fsize: ''\n }\n})"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-icon/index.js"],"names":["Component","externalClasses","options","addGlobalClass","properties","name","type","String","observer","val","setData","isImage","indexOf","size","Number","optionalTypes","value","fsize","parseInt","color","customStyle","data"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,QAAD,CADT;;AAGRC,WAAS;AACPC,oBAAgB;AADT,GAHD;;AAORC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,cAFI,oBAEKC,GAFL,EAEU;AACZ,aAAKC,OAAL,CAAa;AACXC,mBAASF,IAAIG,OAAJ,CAAY,GAAZ,IAAmB,CAAC;AADlB,SAAb;AAGD;AANG,KADI;;AAUVC,UAAM;AACJP,YAAMQ,MADF;AAEJC,qBAAe,CAACD,MAAD,EAASP,MAAT,CAFX;AAGJS,aAAO,EAHH;AAIJR,cAJI,oBAIKC,GAJL,EAIU;AACZ,aAAKC,OAAL,CAAa;AACXO,iBAAOC,SAAST,GAAT;AADI,SAAb;AAGD;AARG,KAVI;AAoBVU,WAAO;AACLb,YAAMC,MADD;AAELS,aAAO;AAFF,KApBG;AAwBVI,iBAAa;AACXd,YAAMC,MADK;AAEXS,aAAO;AAFI;AAxBH,GAPJ;;AAqCRK,QAAM;AACJV,aAAS,KADL;AAEJM,WAAO;AAFH;AArCE,CAAV,E","file":"bld-icon\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","Component({\r\n externalClasses: ['iclass'],\r\n\r\n options: {\r\n addGlobalClass: true,\r\n },\r\n\r\n properties: {\r\n name: {\r\n type: String,\r\n observer(val) {\r\n this.setData({\r\n isImage: val.indexOf('/') > -1\r\n })\r\n }\r\n },\r\n \r\n size: {\r\n type: Number,\r\n optionalTypes: [Number, String],\r\n value: '',\r\n observer(val) {\r\n this.setData({\r\n fsize: parseInt(val)\r\n }) \r\n }\r\n },\r\n color: {\r\n type: String,\r\n value: ''\r\n },\r\n customStyle: {\r\n type: String,\r\n value: ''\r\n }\r\n },\r\n \r\n data: {\r\n isImage: false,\r\n fsize: ''\r\n }\r\n})"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "bld-cloud-image": "../bld-cloud-image/index"
5
- }
6
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "bld-cloud-image": "../bld-cloud-image/index"
5
+ }
6
+ }
@@ -1,36 +1,36 @@
1
- <view
2
- class="iclass bld-iconfont icon-{{ name }} m-icon"
3
- style="{{ icon.setIconStyle(isImage, fsize, color) }} {{ customStyle }}"
4
- >
5
- <bld-cloud-image
6
- class="c-image__wrap"
7
- wx:if="{{ isImage }}"
8
- iclass="m-icon__image"
9
- src="{{ name }}"
10
- />
11
- </view>
12
-
13
- <wxs module="icon">
14
- function setIconStyle(isImage, size, color) {
15
- var styles = []
16
- var imgSize = size || 32
17
-
18
- if(size) {
19
- styles.push('font-size:' + size +'rpx')
20
- }
21
- if(isImage) {
22
- styles.push('width:' + imgSize +'rpx')
23
- styles.push('height:' + imgSize +'rpx')
24
- }
25
-
26
- if(color) {
27
- styles.push('color:' + color)
28
- }
29
- return styles.join(";")
30
- }
31
-
32
- module.exports = {
33
- setIconStyle: setIconStyle
34
- }
35
- </wxs>
36
-
1
+ <view
2
+ class="iclass bld-iconfont icon-{{ name }} m-icon"
3
+ style="{{ icon.setIconStyle(isImage, fsize, color) }} {{ customStyle }}"
4
+ >
5
+ <bld-cloud-image
6
+ class="c-image__wrap"
7
+ wx:if="{{ isImage }}"
8
+ iclass="m-icon__image"
9
+ src="{{ name }}"
10
+ />
11
+ </view>
12
+
13
+ <wxs module="icon">
14
+ function setIconStyle(isImage, size, color) {
15
+ var styles = []
16
+ var imgSize = size || 32
17
+
18
+ if(size) {
19
+ styles.push('font-size:' + size +'rpx')
20
+ }
21
+ if(isImage) {
22
+ styles.push('width:' + imgSize +'rpx')
23
+ styles.push('height:' + imgSize +'rpx')
24
+ }
25
+
26
+ if(color) {
27
+ styles.push('color:' + color)
28
+ }
29
+ return styles.join(";")
30
+ }
31
+
32
+ module.exports = {
33
+ setIconStyle: setIconStyle
34
+ }
35
+ </wxs>
36
+
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-loading/index.js"],"names":["Component","externalClasses","properties","text","type","String","value"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,YAAD,EAAe,WAAf,CADT;AAERC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,aAAO;AAFH;AADI;AAFJ,CAAV,E","file":"bld-loading/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","Component({\n externalClasses: [\"icon-class\", \"tip-class\"],\n properties: {\n text: {\n type: String,\n value: \"努力加载中\",\n },\n },\n});\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-loading/index.js"],"names":["Component","externalClasses","properties","text","type","String","value"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;AClFAA,UAAU;AACRC,mBAAiB,CAAC,YAAD,EAAe,WAAf,CADT;AAERC,cAAY;AACVC,UAAM;AACJC,YAAMC,MADF;AAEJC,aAAO;AAFH;AADI;AAFJ,CAAV,E","file":"bld-loading\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","Component({\r\n externalClasses: [\"icon-class\", \"tip-class\"],\r\n properties: {\r\n text: {\r\n type: String,\r\n value: \"努力加载中\",\r\n },\r\n },\r\n});\r\n"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "bld-icon": "../bld-icon/index"
5
- }
6
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "bld-icon": "../bld-icon/index"
5
+ }
6
+ }
@@ -1,8 +1,8 @@
1
- <view class="loading-wrapper">
2
- <view class="icon-class icon">
3
- <bld-icon name="loading" />
4
- </view>
5
- <view class="tip-class tip">
6
- {{ text }}
7
- </view>
8
- </view>
1
+ <view class="loading-wrapper">
2
+ <view class="icon-class icon">
3
+ <bld-icon name="loading" />
4
+ </view>
5
+ <view class="tip-class tip">
6
+ {{ text }}
7
+ </view>
8
+ </view>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-message/index.js"],"names":["defaults_data","visible","content","duration","zIndex","top","timer","Component","externalClasses","options","addGlobalClass","data","ready","wx","canIUse","windowInfo","getWindowInfo","computedBarH","getSystemInfo","success","methods","screenHeight","windowHeight","statusBarHeight","customBarH","capsule","getMenuButtonBoundingClientRect","bottom","setData","open","type","showClose","clearTimeout","setTimeout","close"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA,IAAMA,gBAAgB;AACrBC,UAAS,KADY;AAErBC,UAAS,EAFY;AAGrBC,WAAU,IAHW;AAIrBC,SAAQ,CAAC,CAJY;AAKrBC,MAAK;AALgB,CAAtB;;AAQA,IAAIC,QAAQ,IAAZ;;AAEAC,UAAU;AACTC,kBAAiB,CAAC,cAAD,CADR;;AAGTC,UAAS;AACRC,kBAAgB;AADR,EAHA;;AAOTC,OAAMX,aAPG;;AASTY,MATS,mBASD;AAAA;;AACP,MAAIC,GAAGC,OAAH,CAAW,eAAX,CAAJ,EAAiC;AAChC,OAAMC,aAAaF,GAAGG,aAAH,EAAnB;AACA,QAAKC,YAAL,CAAkBF,UAAlB;AACA,GAHD,MAGO;AACN;AACAF,MAAGK,aAAH,CAAiB;AAChBC,aAAS,iBAACJ,UAA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GAjDO;AAmDR+B,OAnDQ,mBAmDA;AACP,QAAKN,OAAL,cACI5B,aADJ;AAGA;AAvDO;AAvBA,CAAV,E","file":"bld-message/index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 35);\n","const defaults_data = {\n\tvisible: false,\n\tcontent: '',\n\tduration: 2000,\n\tzIndex: -1,\n\ttop: '0px'\n}\n\nlet timer = null\n\nComponent({\n\texternalClasses: ['custom-class'],\n\n\toptions: {\n\t\taddGlobalClass: true,\n\t},\n\n\tdata: defaults_data,\n\n\tready() {\n\t\tif (wx.canIUse('getWindowInfo')) {\n\t\t\tconst windowInfo = wx.getWindowInfo()\n\t\t\tthis.computedBarH(windowInfo)\n\t\t} else {\n\t\t\t// 该方法为同步\n\t\t\twx.getSystemInfo({\n\t\t\t\tsuccess: (windowInfo) => {\n\t\t\t\t\tthis.computedBarH(windowInfo)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t},\n\n\tmethods: {\n\t\tcomputedBarH(windowInfo) {\n\t\t\tconst {\n\t\t\t\tscreenHeight,\n\t\t\t\twindowHeight,\n\t\t\t\tstatusBarHeight\n\t\t\t} = windowInfo;\n\n\t\t\t// 自定义导航栏\n\t\t\tif (screenHeight === windowHeight) {\n\t\t\t\tlet customBarH = 44;\n\t\t\t\tlet capsule = wx.getMenuButtonBoundingClientRect();\n\t\t\t\tif (capsule) {\n\t\t\t\t\tcustomBarH = capsule.bottom - statusBarHeight + 4;\n\t\t\t\t}\n\n\t\t\t\tdefaults_data.top = customBarH + statusBarHeight + 'px'\n\t\t\t\tthis.setData({\n\t\t\t\t\ttop: customBarH + statusBarHeight + 'px'\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\n\t\topen(options) {\n\t\t\tconst {\n\t\t\t\ttype = 'primary',\n\t\t\t\t\tduration = 2000,\n\t\t\t\t\tzIndex = 2000,\n\t\t\t\t\tshowClose = false\n\t\t\t} = options\n\n\t\t\tthis.setData({\n\t\t\t\t...options,\n\t\t\t\ttype,\n\t\t\t\tduration,\n\t\t\t\tzIndex,\n\t\t\t\tshowClose,\n\t\t\t\tvisible: true\n\t\t\t})\n\n\t\t\tif (timer) clearTimeout(timer)\n\n\t\t\tif (duration) {\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tthis.close()\n\t\t\t\t\ttimer = null\n\t\t\t\t}, duration)\n\t\t\t}\n\t\t},\n\n\t\tclose() {\n\t\t\tthis.setData({\n\t\t\t\t...defaults_data\n\t\t\t})\n\t\t}\n\t}\n})"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-message/index.js"],"names":["defaults_data","visible","content","duration","zIndex","top","timer","Component","externalClasses","options","addGlobalClass","data","ready","wx","canIUse","windowInfo","getWindowInfo","computedBarH","getSystemInfo","success","methods","screenHeight","windowHeight","statusBarHeight","customBarH","capsule","getMenuButtonBoundingClientRect","bottom","setData","open","type","showClose","clearTimeout","setTimeout","close"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;Q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oBmB,aAAaD,eAAb,GAA+B,IAAnD;AACA,SAAKK,OAAL,CAAa;AACZvB,UAAKmB,aAAaD,eAAb,GAA+B;AADxB,KAAb;AAGA;AACD,GArBO;AAwBRM,MAxBQ,gBAwBHpB,OAxBG,EAwBM;AAAA;;AAAA,uBAMTA,OANS,CAEZqB,IAFY;AAAA,OAEZA,IAFY,iCAEL,SAFK;AAAA,2BAMTrB,OANS,CAGXN,QAHW;AAAA,OAGXA,QAHW,qCAGA,IAHA;AAAA,yBAMTM,OANS,CAIXL,MAJW;AAAA,OAIXA,MAJW,mCAIF,IAJE;AAAA,4BAMTK,OANS,CAKXsB,SALW;AAAA,OAKXA,SALW,sCAKC,KALD;;;AAQb,QAAKH,OAAL,cACInB,OADJ;AAECqB,cAFD;AAGC3B,sBAHD;AAICC,kBAJD;AAKC2B,wBALD;AAMC9B,aAAS;AANV;;AASA,OAAIK,KAAJ,EAAW0B,aAAa1B,KAAb;;AAEX,OAAIH,QAAJ,EAAc;AACbG,YAAQ2B,WAAW,YAAM;AACxB,YAAKC,KAAL;AACA5B,aAAQ,IAAR;AACA,KAHO,EAGLH,QAHK,CAAR;AAIA;AACD,GAjDO;AAmDR+B,OAnDQ,mBAmDA;AACP,QAAKN,OAAL,cACI5B,aADJ;AAGA;AAvDO;AAvBA,CAAV,E","file":"bld-message\\index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 35);\n","const defaults_data = {\r\n\tvisible: false,\r\n\tcontent: '',\r\n\tduration: 2000,\r\n\tzIndex: -1,\r\n\ttop: '0px'\r\n}\r\n\r\nlet timer = null\r\n\r\nComponent({\r\n\texternalClasses: ['custom-class'],\r\n\r\n\toptions: {\r\n\t\taddGlobalClass: true,\r\n\t},\r\n\r\n\tdata: defaults_data,\r\n\r\n\tready() {\r\n\t\tif (wx.canIUse('getWindowInfo')) {\r\n\t\t\tconst windowInfo = wx.getWindowInfo()\r\n\t\t\tthis.computedBarH(windowInfo)\r\n\t\t} else {\r\n\t\t\t// 该方法为同步\r\n\t\t\twx.getSystemInfo({\r\n\t\t\t\tsuccess: (windowInfo) => {\r\n\t\t\t\t\tthis.computedBarH(windowInfo)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t}\r\n\t},\r\n\r\n\tmethods: {\r\n\t\tcomputedBarH(windowInfo) {\r\n\t\t\tconst {\r\n\t\t\t\tscreenHeight,\r\n\t\t\t\twindowHeight,\r\n\t\t\t\tstatusBarHeight\r\n\t\t\t} = windowInfo;\r\n\r\n\t\t\t// 自定义导航栏\r\n\t\t\tif (screenHeight === windowHeight) {\r\n\t\t\t\tlet customBarH = 44;\r\n\t\t\t\tlet capsule = wx.getMenuButtonBoundingClientRect();\r\n\t\t\t\tif (capsule) {\r\n\t\t\t\t\tcustomBarH = capsule.bottom - statusBarHeight + 4;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdefaults_data.top = customBarH + statusBarHeight + 'px'\r\n\t\t\t\tthis.setData({\r\n\t\t\t\t\ttop: customBarH + statusBarHeight + 'px'\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\topen(options) {\r\n\t\t\tconst {\r\n\t\t\t\ttype = 'primary',\r\n\t\t\t\t\tduration = 2000,\r\n\t\t\t\t\tzIndex = 2000,\r\n\t\t\t\t\tshowClose = false\r\n\t\t\t} = options\r\n\r\n\t\t\tthis.setData({\r\n\t\t\t\t...options,\r\n\t\t\t\ttype,\r\n\t\t\t\tduration,\r\n\t\t\t\tzIndex,\r\n\t\t\t\tshowClose,\r\n\t\t\t\tvisible: true\r\n\t\t\t})\r\n\r\n\t\t\tif (timer) clearTimeout(timer)\r\n\r\n\t\t\tif (duration) {\r\n\t\t\t\ttimer = setTimeout(() => {\r\n\t\t\t\t\tthis.close()\r\n\t\t\t\t\ttimer = null\r\n\t\t\t\t}, duration)\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tclose() {\r\n\t\t\tthis.setData({\r\n\t\t\t\t...defaults_data\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n})"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
- {
2
- "component": true
3
- }
1
+ {
2
+ "component": true
3
+ }
@@ -1,9 +1,9 @@
1
- <view
2
- class="m-message m-message--{{type}} {{ visible ? '' : 'is-hidden' }} custom-class"
3
- style="{{ 'top:' + top }};{{ 'z-index:' + zIndex }}"
4
- >
5
- {{ content }}
6
- <view class="m-message__close" wx:if="{{showClose}}">
7
- <view class="m-message__close-btn" bindtap="close"></view>
8
- </view>
1
+ <view
2
+ class="m-message m-message--{{type}} {{ visible ? '' : 'is-hidden' }} custom-class"
3
+ style="{{ 'top:' + top }};{{ 'z-index:' + zIndex }}"
4
+ >
5
+ {{ content }}
6
+ <view class="m-message__close" wx:if="{{showClose}}">
7
+ <view class="m-message__close-btn" bindtap="close"></view>
8
+ </view>
9
9
  </view>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-message/message.js"],"names":["getCtx","selector","pages","getCurrentPages","ctx","length","componentCtx","selectComponent","console","error","Message","options","content","open","primary","success","Object","assign","type","warning"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QAC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OR,OAAP,KAAmB,QAAvB,EAAiC;AAC/BA,cAAU;AACRC,eAASD;AADD,KAAV;AAGD;AACDD,UAAQM,OAAOC,MAAP,CAAc;AACpBC,UAAM;AADc,GAAd,EAELP,OAFK,CAAR;AAGD,CATD;;AAWAD,QAAQD,KAAR,GAAgB,mBAAW;AACzB,MAAI,OAAOE,OAAP,KAAmB,QAAvB,EAAiC;AAC/BA,cAAU;AACRC,eAASD;AADD,KAAV;AAGD;AACDD,UAAQM,OAAOC,MAAP,CAAc;AACpBC,UAAM;AADc,GAAd,EAELP,OAFK,CAAR;AAGD,CATD;;kBAWeD,O","file":"bld-message/message.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","function getCtx(selector) {\n const pages = getCurrentPages()\n const ctx = pages[pages.length - 1]\n const componentCtx = ctx.selectComponent(selector)\n if (!componentCtx) {\n console.error('无法找到对应的组件,请按文档说明使用组件')\n return null\n }\n return componentCtx\n}\n\nconst Message = options => {\n const {\n selector = '#message'\n } = options\n const ctx = getCtx(selector)\n if (typeof options === \"string\") {\n options = {\n content: options\n }\n }\n ctx.open(options)\n\n return ctx\n}\n\nMessage.primary = Message\n\nMessage.success = options => {\n if (typeof options === \"string\") {\n options = {\n content: options\n }\n }\n Message(Object.assign({\n type: 'success'\n }, options))\n}\n\nMessage.warning = options => {\n if (typeof options === \"string\") {\n options = {\n content: options\n }\n }\n Message(Object.assign({\n type: 'warning'\n }, options))\n}\n\nMessage.error = options => {\n if (typeof options === \"string\") {\n options = {\n content: options\n }\n }\n Message(Object.assign({\n type: 'error'\n }, options))\n}\n\nexport default Message"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-message/message.js"],"names":["getCtx","selector","pages","getCurrentPages","ctx","length","componentCtx","selectComponent","console","error","Message","options","content","open","primary","success","Object","assign","type","warning"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA,SAASA,MAAT,CAAgBC,QAAhB,EAA0B;AACxB,MAAMC,QAAQC,iBAAd;AACA,MAAMC,MAAMF,MAAMA,MAAMG,MAAN,GAAe,CAArB,CAAZ;AACA,MAAMC,eAAeF,IAAIG,eAAJ,CAAoBN,QAApB,CAArB;AACA,MAAI,CAACK,YAAL,EAAmB;AACjBE,YAAQC,KAAR,CAAc,sBAAd;AACA,WAAO,IAAP;AACD;AACD,SAAOH,YAAP;AACD;;AAED,IAAMI,UAAU,SAAVA,OAAU,UAAW;AAAA,iBAGrBC,OAHqB;AAAA,mCAEvBV,QAFuB;AAAA,MAEvBA,QAFuB,qCAEZ,UAFY;;AAIzB,MAAMG,MAAMJ,OAAOC,QAAP,CAAZ;AACA,MAAI,OAAOU,OAAP,KAAmB,QAAvB,EAAiC;AAC/BA,cAAU;AACRC,eAASD;AADD,KAAV;AAGD;AACDP,MAAIS,IAAJ,CAASF,OAAT;;AAEA,SAAOP,GAAP;AACD,CAbD;;AAeAM,QAAQI,OAAR,GAAkBJ,OAAlB;;AAEAA,QAAQK,OAAR,GAAkB,mBAAW;AAC3B,MAAI,OAAOJ,OAAP,KAAmB,QAAvB,EAAiC;AAC/BA,cAAU;AACRC,eAASD;AADD,KAAV;AAGD;AACDD,UAAQM,OAAOC,MAAP,CAAc;AACpBC,UAAM;AADc,GAAd,EAELP,OAFK,CAAR;AAGD,CATD;;AAWAD,QAAQS,OAAR,GAAkB,mBAAW;AAC3B,MAAI,OAAOR,OAAP,KAAmB,QAAvB,EAAiC;AAC/BA,cAAU;AACRC,eAASD;AADD,KAAV;AAGD;AACDD,UAAQM,OAAOC,MAAP,CAAc;AACpBC,UAAM;AADc,GAAd,EAELP,OAFK,CAAR;AAGD,CATD;;AAWAD,QAAQD,KAAR,GAAgB,mBAAW;AACzB,MAAI,OAAOE,OAAP,KAAmB,QAAvB,EAAiC;AAC/BA,cAAU;AACRC,eAASD;AADD,KAAV;AAGD;AACDD,UAAQM,OAAOC,MAAP,CAAc;AACpBC,UAAM;AADc,GAAd,EAELP,OAFK,CAAR;AAGD,CATD;;kBAWeD,O","file":"bld-message\\message.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","function getCtx(selector) {\r\n const pages = getCurrentPages()\r\n const ctx = pages[pages.length - 1]\r\n const componentCtx = ctx.selectComponent(selector)\r\n if (!componentCtx) {\r\n console.error('无法找到对应的组件,请按文档说明使用组件')\r\n return null\r\n }\r\n return componentCtx\r\n}\r\n\r\nconst Message = options => {\r\n const {\r\n selector = '#message'\r\n } = options\r\n const ctx = getCtx(selector)\r\n if (typeof options === \"string\") {\r\n options = {\r\n content: options\r\n }\r\n }\r\n ctx.open(options)\r\n\r\n return ctx\r\n}\r\n\r\nMessage.primary = Message\r\n\r\nMessage.success = options => {\r\n if (typeof options === \"string\") {\r\n options = {\r\n content: options\r\n }\r\n }\r\n Message(Object.assign({\r\n type: 'success'\r\n }, options))\r\n}\r\n\r\nMessage.warning = options => {\r\n if (typeof options === \"string\") {\r\n options = {\r\n content: options\r\n }\r\n }\r\n Message(Object.assign({\r\n type: 'warning'\r\n }, options))\r\n}\r\n\r\nMessage.error = options => {\r\n if (typeof options === \"string\") {\r\n options = {\r\n content: options\r\n }\r\n }\r\n Message(Object.assign({\r\n type: 'error'\r\n }, options))\r\n}\r\n\r\nexport default Message"],"sourceRoot":""}