bulade-ui 1.1.45 → 1.1.47

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 (398) 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 +569 -565
  8. package/miniprogram_dist/assets/font/iconfont.wxss +4 -0
  9. package/miniprogram_dist/assets/style/border.wxss +94 -94
  10. package/miniprogram_dist/bld-action-sheet/index.js.map +1 -1
  11. package/miniprogram_dist/bld-action-sheet/index.json +8 -8
  12. package/miniprogram_dist/bld-action-sheet/index.wxml +56 -56
  13. package/miniprogram_dist/bld-badge/index.js.map +1 -1
  14. package/miniprogram_dist/bld-badge/index.json +3 -3
  15. package/miniprogram_dist/bld-badge/index.wxml +13 -13
  16. package/miniprogram_dist/bld-button/index.js.map +1 -1
  17. package/miniprogram_dist/bld-button/index.json +7 -7
  18. package/miniprogram_dist/bld-button/index.wxml +3 -3
  19. package/miniprogram_dist/bld-button-v2/index.js.map +1 -1
  20. package/miniprogram_dist/bld-button-v2/index.json +3 -3
  21. package/miniprogram_dist/bld-button-v2/index.wxml +41 -41
  22. package/miniprogram_dist/bld-card/index.js.map +1 -1
  23. package/miniprogram_dist/bld-card/index.json +2 -2
  24. package/miniprogram_dist/bld-card/index.wxml +5 -5
  25. package/miniprogram_dist/bld-cell/index.js.map +1 -1
  26. package/miniprogram_dist/bld-cell/index.json +7 -7
  27. package/miniprogram_dist/bld-cell/index.wxml +42 -42
  28. package/miniprogram_dist/bld-cell-field/index.js.map +1 -1
  29. package/miniprogram_dist/bld-cell-field/index.json +6 -6
  30. package/miniprogram_dist/bld-cell-field/index.wxml +8 -8
  31. package/miniprogram_dist/bld-cell-group/index.js.map +1 -1
  32. package/miniprogram_dist/bld-cell-group/index.json +2 -2
  33. package/miniprogram_dist/bld-cell-group/index.wxml +14 -14
  34. package/miniprogram_dist/bld-cell-group-v2/index.js.map +1 -1
  35. package/miniprogram_dist/bld-cell-group-v2/index.json +2 -2
  36. package/miniprogram_dist/bld-cell-group-v2/index.wxml +9 -9
  37. package/miniprogram_dist/bld-cell-v2/index.js.map +1 -1
  38. package/miniprogram_dist/bld-cell-v2/index.json +5 -5
  39. package/miniprogram_dist/bld-cell-v2/index.wxml +24 -24
  40. package/miniprogram_dist/bld-checkbox/index.js.map +1 -1
  41. package/miniprogram_dist/bld-checkbox/index.json +5 -5
  42. package/miniprogram_dist/bld-checkbox/index.wxml +66 -66
  43. package/miniprogram_dist/bld-checkbox-group/index.js.map +1 -1
  44. package/miniprogram_dist/bld-checkbox-group/index.json +3 -3
  45. package/miniprogram_dist/bld-cloud-image/index.js.map +1 -1
  46. package/miniprogram_dist/bld-cloud-image/index.json +2 -2
  47. package/miniprogram_dist/bld-cloud-image/index.wxml +14 -14
  48. package/miniprogram_dist/bld-collapse/index.js.map +1 -1
  49. package/miniprogram_dist/bld-collapse/index.json +3 -3
  50. package/miniprogram_dist/bld-collapse/index.wxml +8 -8
  51. package/miniprogram_dist/bld-dialog-tip/index.js.map +1 -1
  52. package/miniprogram_dist/bld-dialog-tip/index.json +5 -5
  53. package/miniprogram_dist/bld-dialog-tip/index.wxml +23 -23
  54. package/miniprogram_dist/bld-drawer/index.js.map +1 -1
  55. package/miniprogram_dist/bld-drawer/index.json +3 -3
  56. package/miniprogram_dist/bld-drawer/index.wxml +13 -13
  57. package/miniprogram_dist/bld-empty-page/index.js.map +1 -1
  58. package/miniprogram_dist/bld-empty-page/index.json +5 -5
  59. package/miniprogram_dist/bld-empty-page/index.wxml +11 -11
  60. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.js.map +1 -1
  61. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.json +6 -6
  62. package/miniprogram_dist/bld-form/bld-form-item/bld-form-date/index.wxml +43 -43
  63. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.js.map +1 -1
  64. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.json +4 -4
  65. package/miniprogram_dist/bld-form/bld-form-item/bld-form-input/index.wxml +27 -27
  66. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.js.map +1 -1
  67. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.json +6 -6
  68. package/miniprogram_dist/bld-form/bld-form-item/bld-form-select-input/index.wxml +53 -53
  69. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.js.map +1 -1
  70. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.json +4 -4
  71. package/miniprogram_dist/bld-form/bld-form-item/bld-form-step/index.wxml +28 -28
  72. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.js.map +1 -1
  73. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.json +4 -4
  74. package/miniprogram_dist/bld-form/bld-form-item/bld-form-switch/index.wxml +6 -6
  75. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.js.map +1 -1
  76. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.json +4 -4
  77. package/miniprogram_dist/bld-form/bld-form-item/bld-form-textarea/index.wxml +25 -25
  78. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.js.map +1 -1
  79. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.json +6 -6
  80. package/miniprogram_dist/bld-form/bld-form-item/bld-form-time/index.wxml +43 -43
  81. package/miniprogram_dist/bld-half-screen/index.js.map +1 -1
  82. package/miniprogram_dist/bld-half-screen/index.json +4 -4
  83. package/miniprogram_dist/bld-half-screen/index.wxml +36 -36
  84. package/miniprogram_dist/bld-html/index.js.map +1 -1
  85. package/miniprogram_dist/bld-html/index.json +5 -5
  86. package/miniprogram_dist/bld-html/index.wxml +9 -9
  87. package/miniprogram_dist/bld-icon/index.js.map +1 -1
  88. package/miniprogram_dist/bld-icon/index.json +6 -6
  89. package/miniprogram_dist/bld-icon/index.wxml +36 -36
  90. package/miniprogram_dist/bld-icon/index.wxss +4 -0
  91. package/miniprogram_dist/bld-loading/index.js.map +1 -1
  92. package/miniprogram_dist/bld-loading/index.json +6 -6
  93. package/miniprogram_dist/bld-loading/index.wxml +8 -8
  94. package/miniprogram_dist/bld-message/index.js.map +1 -1
  95. package/miniprogram_dist/bld-message/index.json +3 -3
  96. package/miniprogram_dist/bld-message/index.wxml +8 -8
  97. package/miniprogram_dist/bld-message/message.js.map +1 -1
  98. package/miniprogram_dist/bld-modal/index.js.map +1 -1
  99. package/miniprogram_dist/bld-modal/index.json +6 -6
  100. package/miniprogram_dist/bld-modal/index.wxml +22 -22
  101. package/miniprogram_dist/bld-modal/modal.js.map +1 -1
  102. package/miniprogram_dist/bld-nav-bar/index.js.map +1 -1
  103. package/miniprogram_dist/bld-nav-bar/index.json +6 -6
  104. package/miniprogram_dist/bld-nav-bar/index.wxml +43 -43
  105. package/miniprogram_dist/bld-navbar/index.js.map +1 -1
  106. package/miniprogram_dist/bld-navbar/index.json +5 -5
  107. package/miniprogram_dist/bld-navbar/index.wxml +7 -7
  108. package/miniprogram_dist/bld-navbar-group/index.js.map +1 -1
  109. package/miniprogram_dist/bld-navbar-group/index.json +3 -3
  110. package/miniprogram_dist/bld-navbar-group/index.wxml +36 -36
  111. package/miniprogram_dist/bld-notice-bar/index.js.map +1 -1
  112. package/miniprogram_dist/bld-notice-bar/index.json +3 -3
  113. package/miniprogram_dist/bld-notice-bar/index.wxml +29 -29
  114. package/miniprogram_dist/bld-overlay/index.js.map +1 -1
  115. package/miniprogram_dist/bld-overlay/index.json +3 -3
  116. package/miniprogram_dist/bld-overlay/index.wxml +11 -11
  117. package/miniprogram_dist/bld-page/index.js.map +1 -1
  118. package/miniprogram_dist/bld-page/index.json +7 -7
  119. package/miniprogram_dist/bld-page/index.wxml +31 -31
  120. package/miniprogram_dist/bld-pop-up/index.js.map +1 -1
  121. package/miniprogram_dist/bld-pop-up/index.json +6 -6
  122. package/miniprogram_dist/bld-pop-up/index.wxml +18 -18
  123. package/miniprogram_dist/bld-progress/index.js.map +1 -1
  124. package/miniprogram_dist/bld-progress/index.json +3 -3
  125. package/miniprogram_dist/bld-progress/index.wxml +34 -34
  126. package/miniprogram_dist/bld-radio/index.js.map +1 -1
  127. package/miniprogram_dist/bld-radio/index.json +3 -3
  128. package/miniprogram_dist/bld-radio/index.wxml +23 -23
  129. package/miniprogram_dist/bld-radio-group/index.js.map +1 -1
  130. package/miniprogram_dist/bld-radio-group/index.json +3 -3
  131. package/miniprogram_dist/bld-retry/index.js.map +1 -1
  132. package/miniprogram_dist/bld-retry/index.json +2 -2
  133. package/miniprogram_dist/bld-retry/index.wxml +5 -5
  134. package/miniprogram_dist/bld-scroll-view/index.js.map +1 -1
  135. package/miniprogram_dist/bld-scroll-view/index.json +7 -7
  136. package/miniprogram_dist/bld-scroll-view/index.wxml +42 -42
  137. package/miniprogram_dist/bld-tabs/index.js.map +1 -1
  138. package/miniprogram_dist/bld-tabs/index.json +4 -4
  139. package/miniprogram_dist/bld-tabs/index.wxml +13 -13
  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.map +1 -1
  160. package/miniprogram_dist/grid/index.json +3 -3
  161. package/miniprogram_dist/grid/index.wxml +2 -2
  162. package/miniprogram_dist/grid-item/index.js.map +1 -1
  163. package/miniprogram_dist/grid-item/index.json +5 -5
  164. package/miniprogram_dist/grid-item/index.wxml +45 -45
  165. package/miniprogram_dist/timeline/index.js.map +1 -1
  166. package/miniprogram_dist/timeline/index.json +2 -2
  167. package/miniprogram_dist/timeline/index.wxml +1 -1
  168. package/miniprogram_dist/timeline-item/index.js.map +1 -1
  169. package/miniprogram_dist/timeline-item/index.json +5 -5
  170. package/miniprogram_dist/timeline-item/index.wxml +9 -9
  171. package/miniprogram_dist/utils/systemInfo.js +52 -52
  172. package/package.json +72 -72
  173. package/project.config.json +7 -7
  174. package/src/assets/font/iconfont.scss +569 -565
  175. package/src/assets/font/iconfont.wxss +4 -0
  176. package/src/assets/style/border.wxss +94 -94
  177. package/src/bld-action-sheet/index.js +82 -82
  178. package/src/bld-action-sheet/index.json +8 -8
  179. package/src/bld-action-sheet/index.scss +179 -179
  180. package/src/bld-action-sheet/index.wxml +56 -56
  181. package/src/bld-badge/index.js +53 -53
  182. package/src/bld-badge/index.json +3 -3
  183. package/src/bld-badge/index.scss +45 -45
  184. package/src/bld-badge/index.wxml +13 -13
  185. package/src/bld-button/index.js +13 -13
  186. package/src/bld-button/index.json +7 -7
  187. package/src/bld-button/index.scss +44 -44
  188. package/src/bld-button/index.wxml +3 -3
  189. package/src/bld-button-v2/index.js +91 -91
  190. package/src/bld-button-v2/index.json +3 -3
  191. package/src/bld-button-v2/index.scss +206 -206
  192. package/src/bld-button-v2/index.wxml +41 -41
  193. package/src/bld-card/index.js +3 -3
  194. package/src/bld-card/index.json +2 -2
  195. package/src/bld-card/index.scss +6 -6
  196. package/src/bld-card/index.wxml +5 -5
  197. package/src/bld-cell/index.js +29 -29
  198. package/src/bld-cell/index.json +7 -7
  199. package/src/bld-cell/index.scss +42 -42
  200. package/src/bld-cell/index.wxml +42 -42
  201. package/src/bld-cell-field/index.js +11 -11
  202. package/src/bld-cell-field/index.json +6 -6
  203. package/src/bld-cell-field/index.scss +21 -21
  204. package/src/bld-cell-field/index.wxml +8 -8
  205. package/src/bld-cell-group/index.js +12 -12
  206. package/src/bld-cell-group/index.json +2 -2
  207. package/src/bld-cell-group/index.scss +13 -13
  208. package/src/bld-cell-group/index.wxml +14 -14
  209. package/src/bld-cell-group-v2/index.js +70 -70
  210. package/src/bld-cell-group-v2/index.json +2 -2
  211. package/src/bld-cell-group-v2/index.scss +31 -31
  212. package/src/bld-cell-group-v2/index.wxml +9 -9
  213. package/src/bld-cell-v2/index.js +80 -80
  214. package/src/bld-cell-v2/index.json +5 -5
  215. package/src/bld-cell-v2/index.scss +74 -74
  216. package/src/bld-cell-v2/index.wxml +24 -24
  217. package/src/bld-checkbox/index.js +110 -110
  218. package/src/bld-checkbox/index.json +5 -5
  219. package/src/bld-checkbox/index.scss +71 -71
  220. package/src/bld-checkbox/index.wxml +66 -66
  221. package/src/bld-checkbox-group/index.js +84 -84
  222. package/src/bld-checkbox-group/index.json +3 -3
  223. package/src/bld-cloud-image/index.js +79 -79
  224. package/src/bld-cloud-image/index.json +2 -2
  225. package/src/bld-cloud-image/index.scss +3 -3
  226. package/src/bld-cloud-image/index.wxml +14 -14
  227. package/src/bld-collapse/index.js +62 -62
  228. package/src/bld-collapse/index.json +3 -3
  229. package/src/bld-collapse/index.scss +6 -6
  230. package/src/bld-collapse/index.wxml +8 -8
  231. package/src/bld-content-container/index.js +46 -46
  232. package/src/bld-content-container/index.json +2 -2
  233. package/src/bld-content-container/index.wxml +5 -5
  234. package/src/bld-dialog-tip/index.js +60 -60
  235. package/src/bld-dialog-tip/index.json +5 -5
  236. package/src/bld-dialog-tip/index.scss +66 -66
  237. package/src/bld-dialog-tip/index.wxml +23 -23
  238. package/src/bld-drawer/index.js +40 -40
  239. package/src/bld-drawer/index.json +3 -3
  240. package/src/bld-drawer/index.scss +78 -78
  241. package/src/bld-drawer/index.wxml +13 -13
  242. package/src/bld-empty-page/index.js +23 -23
  243. package/src/bld-empty-page/index.json +5 -5
  244. package/src/bld-empty-page/index.scss +15 -15
  245. package/src/bld-empty-page/index.wxml +11 -11
  246. package/src/bld-form/bld-form-item/bld-form-date/index.js +211 -211
  247. package/src/bld-form/bld-form-item/bld-form-date/index.json +6 -6
  248. package/src/bld-form/bld-form-item/bld-form-date/index.scss +53 -53
  249. package/src/bld-form/bld-form-item/bld-form-date/index.wxml +43 -43
  250. package/src/bld-form/bld-form-item/bld-form-input/index.js +53 -53
  251. package/src/bld-form/bld-form-item/bld-form-input/index.json +4 -4
  252. package/src/bld-form/bld-form-item/bld-form-input/index.scss +25 -25
  253. package/src/bld-form/bld-form-item/bld-form-input/index.wxml +27 -27
  254. package/src/bld-form/bld-form-item/bld-form-select-input/index.js +149 -149
  255. package/src/bld-form/bld-form-item/bld-form-select-input/index.json +6 -6
  256. package/src/bld-form/bld-form-item/bld-form-select-input/index.scss +117 -117
  257. package/src/bld-form/bld-form-item/bld-form-select-input/index.wxml +53 -53
  258. package/src/bld-form/bld-form-item/bld-form-step/index.js +58 -58
  259. package/src/bld-form/bld-form-item/bld-form-step/index.json +4 -4
  260. package/src/bld-form/bld-form-item/bld-form-step/index.scss +42 -42
  261. package/src/bld-form/bld-form-item/bld-form-step/index.wxml +28 -28
  262. package/src/bld-form/bld-form-item/bld-form-switch/index.js +37 -37
  263. package/src/bld-form/bld-form-item/bld-form-switch/index.json +4 -4
  264. package/src/bld-form/bld-form-item/bld-form-switch/index.scss +22 -22
  265. package/src/bld-form/bld-form-item/bld-form-switch/index.wxml +6 -6
  266. package/src/bld-form/bld-form-item/bld-form-textarea/index.js +44 -44
  267. package/src/bld-form/bld-form-item/bld-form-textarea/index.json +4 -4
  268. package/src/bld-form/bld-form-item/bld-form-textarea/index.scss +25 -25
  269. package/src/bld-form/bld-form-item/bld-form-textarea/index.wxml +25 -25
  270. package/src/bld-form/bld-form-item/bld-form-time/index.js +108 -108
  271. package/src/bld-form/bld-form-item/bld-form-time/index.json +6 -6
  272. package/src/bld-form/bld-form-item/bld-form-time/index.scss +53 -53
  273. package/src/bld-form/bld-form-item/bld-form-time/index.wxml +43 -43
  274. package/src/bld-half-screen/index.js +166 -166
  275. package/src/bld-half-screen/index.json +4 -4
  276. package/src/bld-half-screen/index.scss +109 -109
  277. package/src/bld-half-screen/index.wxml +36 -36
  278. package/src/bld-html/index.js +46 -46
  279. package/src/bld-html/index.json +5 -5
  280. package/src/bld-html/index.scss +17 -17
  281. package/src/bld-html/index.wxml +9 -9
  282. package/src/bld-icon/index.js +41 -41
  283. package/src/bld-icon/index.json +6 -6
  284. package/src/bld-icon/index.scss +19 -19
  285. package/src/bld-icon/index.wxml +36 -36
  286. package/src/bld-icon/index.wxss +4 -0
  287. package/src/bld-icon-back/index.js +8 -8
  288. package/src/bld-icon-back/index.json +3 -3
  289. package/src/bld-icon-back/index.scss +1 -1
  290. package/src/bld-icon-back/index.wxml +1 -1
  291. package/src/bld-icon-back/index.wxss +4 -0
  292. package/src/bld-loading/index.js +9 -9
  293. package/src/bld-loading/index.json +6 -6
  294. package/src/bld-loading/index.scss +25 -25
  295. package/src/bld-loading/index.wxml +8 -8
  296. package/src/bld-message/index.js +90 -90
  297. package/src/bld-message/index.json +3 -3
  298. package/src/bld-message/index.scss +66 -66
  299. package/src/bld-message/index.wxml +8 -8
  300. package/src/bld-message/message.js +61 -61
  301. package/src/bld-modal/index.js +122 -122
  302. package/src/bld-modal/index.json +6 -6
  303. package/src/bld-modal/index.scss +107 -107
  304. package/src/bld-modal/index.wxml +22 -22
  305. package/src/bld-modal/modal.js +37 -37
  306. package/src/bld-nav-bar/index.js +140 -140
  307. package/src/bld-nav-bar/index.json +6 -6
  308. package/src/bld-nav-bar/index.scss +55 -55
  309. package/src/bld-nav-bar/index.wxml +43 -43
  310. package/src/bld-nav-bar1/index.js +90 -90
  311. package/src/bld-nav-bar1/index.json +5 -5
  312. package/src/bld-nav-bar1/index.scss +39 -39
  313. package/src/bld-nav-bar1/index.wxml +24 -24
  314. package/src/bld-navbar/index.js +62 -62
  315. package/src/bld-navbar/index.json +5 -5
  316. package/src/bld-navbar/index.scss +34 -34
  317. package/src/bld-navbar/index.wxml +7 -7
  318. package/src/bld-navbar-group/index.js +139 -139
  319. package/src/bld-navbar-group/index.json +3 -3
  320. package/src/bld-navbar-group/index.scss +32 -32
  321. package/src/bld-navbar-group/index.wxml +36 -36
  322. package/src/bld-notice-bar/index.js +69 -69
  323. package/src/bld-notice-bar/index.json +3 -3
  324. package/src/bld-notice-bar/index.scss +58 -58
  325. package/src/bld-notice-bar/index.wxml +29 -29
  326. package/src/bld-overlay/index.js +17 -17
  327. package/src/bld-overlay/index.json +3 -3
  328. package/src/bld-overlay/index.scss +11 -11
  329. package/src/bld-overlay/index.wxml +11 -11
  330. package/src/bld-page/index.js +97 -97
  331. package/src/bld-page/index.json +7 -7
  332. package/src/bld-page/index.scss +16 -16
  333. package/src/bld-page/index.wxml +31 -31
  334. package/src/bld-pop-up/index.js +29 -29
  335. package/src/bld-pop-up/index.json +6 -6
  336. package/src/bld-pop-up/index.scss +27 -27
  337. package/src/bld-pop-up/index.wxml +18 -18
  338. package/src/bld-progress/index.js +49 -49
  339. package/src/bld-progress/index.json +3 -3
  340. package/src/bld-progress/index.scss +73 -73
  341. package/src/bld-progress/index.wxml +34 -34
  342. package/src/bld-radio/index.js +64 -64
  343. package/src/bld-radio/index.json +3 -3
  344. package/src/bld-radio/index.scss +67 -67
  345. package/src/bld-radio/index.wxml +23 -23
  346. package/src/bld-radio-group/index.js +82 -82
  347. package/src/bld-radio-group/index.json +3 -3
  348. package/src/bld-retry/index.js +23 -23
  349. package/src/bld-retry/index.json +2 -2
  350. package/src/bld-retry/index.scss +26 -26
  351. package/src/bld-retry/index.wxml +5 -5
  352. package/src/bld-scroll-view/index.js +28 -28
  353. package/src/bld-scroll-view/index.json +7 -7
  354. package/src/bld-scroll-view/index.scss +7 -7
  355. package/src/bld-scroll-view/index.wxml +42 -42
  356. package/src/bld-tabs/index.js +21 -21
  357. package/src/bld-tabs/index.json +4 -4
  358. package/src/bld-tabs/index.scss +32 -32
  359. package/src/bld-tabs/index.wxml +13 -13
  360. package/src/bld-tag/index.js +33 -33
  361. package/src/bld-tag/index.json +3 -3
  362. package/src/bld-tag/index.scss +126 -126
  363. package/src/bld-tag/index.wxml +2 -2
  364. package/src/bld-text/index.js +46 -46
  365. package/src/bld-text/index.json +2 -2
  366. package/src/bld-text/index.scss +30 -30
  367. package/src/bld-text/index.wxml +3 -3
  368. package/src/bld-toast/index.js +113 -113
  369. package/src/bld-toast/index.json +5 -5
  370. package/src/bld-toast/index.scss +111 -111
  371. package/src/bld-toast/index.wxml +26 -26
  372. package/src/bld-toast/toast.js +34 -34
  373. package/src/bld-wrapper/index.js +75 -75
  374. package/src/bld-wrapper/index.json +4 -4
  375. package/src/bld-wrapper/index.scss +7 -7
  376. package/src/bld-wrapper/index.wxml +6 -6
  377. package/src/button/index.js +91 -91
  378. package/src/button/index.json +3 -3
  379. package/src/button/index.scss +206 -206
  380. package/src/button/index.wxml +41 -41
  381. package/src/components-npm/mp-weixin/index.js +7 -7
  382. package/src/grid/index.js +67 -67
  383. package/src/grid/index.json +3 -3
  384. package/src/grid/index.scss +20 -20
  385. package/src/grid/index.wxml +2 -2
  386. package/src/grid-item/index.js +72 -72
  387. package/src/grid-item/index.json +5 -5
  388. package/src/grid-item/index.scss +58 -58
  389. package/src/grid-item/index.wxml +45 -45
  390. package/src/timeline/index.js +49 -49
  391. package/src/timeline/index.json +2 -2
  392. package/src/timeline/index.wxml +1 -1
  393. package/src/timeline-item/index.js +27 -27
  394. package/src/timeline-item/index.json +5 -5
  395. package/src/timeline-item/index.scss +36 -36
  396. package/src/timeline-item/index.wxml +9 -9
  397. package/src/utils/systemInfo.js +52 -52
  398. package/tsconfig.json +25 -25
@@ -10,6 +10,10 @@
10
10
  -moz-osx-font-smoothing: grayscale;
11
11
  }
12
12
 
13
+ .icon-chooseImg:before {
14
+ content: "\e653";
15
+ }
16
+
13
17
  .icon-plus-circle:before {
14
18
  content: "\e709";
15
19
  }
@@ -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;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ACA,QAAID,OAAJ,EAAa;AACZD,kBAAaC,QAAQE,MAAR,GAAiBJ,eAAjB,GAAmC,CAAhD;AACA;;AAEDvB,kBAAcK,GAAd,GAAoBmB,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 = {\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;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,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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;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,MAAM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","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;;QA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R;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":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-modal/index.js"],"names":["Component","externalClasses","options","addGlobalClass","properties","visible","type","Boolean","value","title","String","content","closeOnClickModal","showConfirmButton","showCancelButton","confirmButtonText","cancelButtonText","confirmTextColor","loading","asyncClose","methods","_reset","setData","onConfirm","data","_confirm","close","triggerEvent","onCancel","_cancel","onMaskClick","_show"],"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,cAAD,EAAiB,mBAAjB,EAAsC,mBAAtC,CADT;;AAGRC,WAAS;AACPC,oBAAgB;AADT,GAHD;;AAOR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,KA/BM;AAiCPC,YAjCO,sBAiCI;AACT,UAAI,KAAKJ,IAAL,CAAUN,OAAd,EAAuB;;AAEvB,WAAKI,OAAL,CAAa;AACXjB,iBAAS;AADE,OAAb;AAGA,WAAKsB,YAAL,CAAkB,QAAlB;;AAEA,UAAI,KAAKE,OAAT,EAAkB;AAChB,aAAKA,OAAL;AACA,aAAKH,KAAL;AACD;AACF,KA7CM;AA+CPI,eA/CO,yBA+CO;AACZ,UAAI,CAAC,KAAKN,IAAL,CAAUZ,iBAAf,EAAkC;AAClC,WAAKc,KAAL;AACD,KAlDM;AAoDPK,SApDO,iBAoDD7B,OApDC,EAoDQ;AACb,WAAKoB,OAAL,cACKpB,OADL;AAEEG,iBAAS;AAFX;AAID,KAzDM;;;AA2DP;AACAqB,SA5DO,mBA4DC;AACN,WAAKJ,OAAL,CAAa;AACXjB,iBAAS;AADE,OAAb;;AAIA,WAAKsB,YAAL,CAAkB,OAAlB;AACD;AAlEM;AAtDD,CAAV,E","file":"bld-modal/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 = 41);\n","Component({\n externalClasses: ['custom-class', 'custom-mask-class', 'custom-body-class'],\n\n options: {\n addGlobalClass: true,\n },\n\n properties: {\n visible: {\n type: Boolean,\n value: false\n },\n title: {\n type: String,\n value: ''\n },\n content: {\n type: String,\n value: ''\n },\n closeOnClickModal: {\n type: Boolean,\n value: true\n },\n showConfirmButton: {\n type: Boolean,\n value: true\n },\n showCancelButton: {\n type: Boolean,\n value: true\n },\n confirmButtonText: {\n type: String,\n value: '确定'\n },\n cancelButtonText: {\n type: String,\n value: '取消'\n },\n confirmTextColor: {\n type: String,\n value: '#409EFF'\n },\n loading: {\n type: Boolean,\n value: false\n },\n asyncClose: {\n type: Boolean,\n value: false\n }\n },\n\n methods: {\n _reset() {\n this.setData({\n title: '',\n content: '',\n showConfirmButton: true,\n showCancelButton: true,\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n confirmTextColor: '#409EFF',\n loading: false,\n asyncClose: false\n })\n },\n\n // 确定\n onConfirm() {\n // 异步\n if (this.data.asyncClose) {\n this.setData({\n loading: true\n })\n if (this._confirm) {\n this._confirm()\n }\n } else {\n if (this._confirm) {\n this.close()\n }\n }\n this.triggerEvent('confirm')\n },\n\n onCancel() {\n if (this.data.loading) return\n\n this.setData({\n visible: false\n })\n this.triggerEvent('cancel')\n\n if (this._cancel) {\n this._cancel()\n this.close()\n }\n },\n\n onMaskClick() {\n if (!this.data.closeOnClickModal) return;\n this.close()\n },\n\n _show(options) {\n this.setData({\n ...options,\n visible: true\n })\n },\n\n // 关闭并重置默认参数\n close() {\n this.setData({\n visible: false\n })\n\n this.triggerEvent('close')\n }\n }\n})"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-modal/index.js"],"names":["Component","externalClasses","options","addGlobalClass","properties","visible","type","Boolean","value","title","String","content","closeOnClickModal","showConfirmButton","showCancelButton","confirmButtonText","cancelButtonText","confirmTextColor","loading","asyncClose","methods","_reset","setData","onConfirm","data","_confirm","close","triggerEvent","onCancel","_cancel","onMaskClick","_show"],"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;QAC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IAHR;AAIXC,0BAAkB,IAJP;AAKXC,2BAAmB,IALR;AAMXC,0BAAkB,IANP;AAOXC,0BAAkB,SAPP;AAQXC,iBAAS,KARE;AASXC,oBAAY;AATD,OAAb;AAWD,KAbM;;;AAeP;AACAI,aAhBO,uBAgBK;AACV;AACA,UAAI,KAAKC,IAAL,CAAUL,UAAd,EAA0B;AACxB,aAAKG,OAAL,CAAa;AACXJ,mBAAS;AADE,SAAb;AAGA,YAAI,KAAKO,QAAT,EAAmB;AACjB,eAAKA,QAAL;AACD;AACF,OAPD,MAOO;AACL,YAAI,KAAKA,QAAT,EAAmB;AACjB,eAAKC,KAAL;AACD;AACF;AACD,WAAKC,YAAL,CAAkB,SAAlB;AACD,KA/BM;AAiCPC,YAjCO,sBAiCI;AACT,UAAI,KAAKJ,IAAL,CAAUN,OAAd,EAAuB;;AAEvB,WAAKI,OAAL,CAAa;AACXjB,iBAAS;AADE,OAAb;AAGA,WAAKsB,YAAL,CAAkB,QAAlB;;AAEA,UAAI,KAAKE,OAAT,EAAkB;AAChB,aAAKA,OAAL;AACA,aAAKH,KAAL;AACD;AACF,KA7CM;AA+CPI,eA/CO,yBA+CO;AACZ,UAAI,CAAC,KAAKN,IAAL,CAAUZ,iBAAf,EAAkC;AAClC,WAAKc,KAAL;AACD,KAlDM;AAoDPK,SApDO,iBAoDD7B,OApDC,EAoDQ;AACb,WAAKoB,OAAL,cACKpB,OADL;AAEEG,iBAAS;AAFX;AAID,KAzDM;;;AA2DP;AACAqB,SA5DO,mBA4DC;AACN,WAAKJ,OAAL,CAAa;AACXjB,iBAAS;AADE,OAAb;;AAIA,WAAKsB,YAAL,CAAkB,OAAlB;AACD;AAlEM;AAtDD,CAAV,E","file":"bld-modal\\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 = 41);\n","Component({\r\n externalClasses: ['custom-class', 'custom-mask-class', 'custom-body-class'],\r\n\r\n options: {\r\n addGlobalClass: true,\r\n },\r\n\r\n properties: {\r\n visible: {\r\n type: Boolean,\r\n value: false\r\n },\r\n title: {\r\n type: String,\r\n value: ''\r\n },\r\n content: {\r\n type: String,\r\n value: ''\r\n },\r\n closeOnClickModal: {\r\n type: Boolean,\r\n value: true\r\n },\r\n showConfirmButton: {\r\n type: Boolean,\r\n value: true\r\n },\r\n showCancelButton: {\r\n type: Boolean,\r\n value: true\r\n },\r\n confirmButtonText: {\r\n type: String,\r\n value: '确定'\r\n },\r\n cancelButtonText: {\r\n type: String,\r\n value: '取消'\r\n },\r\n confirmTextColor: {\r\n type: String,\r\n value: '#409EFF'\r\n },\r\n loading: {\r\n type: Boolean,\r\n value: false\r\n },\r\n asyncClose: {\r\n type: Boolean,\r\n value: false\r\n }\r\n },\r\n\r\n methods: {\r\n _reset() {\r\n this.setData({\r\n title: '',\r\n content: '',\r\n showConfirmButton: true,\r\n showCancelButton: true,\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n confirmTextColor: '#409EFF',\r\n loading: false,\r\n asyncClose: false\r\n })\r\n },\r\n\r\n // 确定\r\n onConfirm() {\r\n // 异步\r\n if (this.data.asyncClose) {\r\n this.setData({\r\n loading: true\r\n })\r\n if (this._confirm) {\r\n this._confirm()\r\n }\r\n } else {\r\n if (this._confirm) {\r\n this.close()\r\n }\r\n }\r\n this.triggerEvent('confirm')\r\n },\r\n\r\n onCancel() {\r\n if (this.data.loading) return\r\n\r\n this.setData({\r\n visible: false\r\n })\r\n this.triggerEvent('cancel')\r\n\r\n if (this._cancel) {\r\n this._cancel()\r\n this.close()\r\n }\r\n },\r\n\r\n onMaskClick() {\r\n if (!this.data.closeOnClickModal) return;\r\n this.close()\r\n },\r\n\r\n _show(options) {\r\n this.setData({\r\n ...options,\r\n visible: true\r\n })\r\n },\r\n\r\n // 关闭并重置默认参数\r\n close() {\r\n this.setData({\r\n visible: false\r\n })\r\n\r\n this.triggerEvent('close')\r\n }\r\n }\r\n})"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "m-button": "../button/index"
5
- }
6
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "m-button": "../button/index"
5
+ }
6
+ }
@@ -1,23 +1,23 @@
1
- <view class="m-mask custom-mask-class {{ visible ? '' : 'is-hidden' }}" bindtap="onMaskClick"></view>
2
-
3
- <view class="m-modal-wrap custom-class {{ visible ? '' : 'is-hidden' }}">
4
- <view class="m-modal {{ visible ? 'is-show' : '' }}">
5
- <view class="m-modal__content">
6
- <view class="m-modal__title" wx:if="{{ title }}">{{ title }}</view>
7
- <view class="m-modal__body custom-body-class" wx:if="{{ content }}">{{ content }}</view>
8
- <view class="m-modal__body custom-body-class" wx:else>
9
- <slot />
10
- </view>
11
- <view class="m-modal__btn-group">
12
- <view class="m-modal__btn m-modal__btn--cancel" wx:if="{{ showCancelButton }}">
13
- <m-button full type="ghost" bind:click="onCancel">{{ cancelButtonText }}</m-button>
14
- </view>
15
- <view class="m-modal__btn" wx:if="{{ showConfirmButton }}">
16
- <m-button full type="ghost" loading="{{ loading }}" bind:click="onConfirm" color="{{ confirmTextColor }}">
17
- {{ confirmButtonText }}
18
- </m-button>
19
- </view>
20
- </view>
21
- </view>
22
- </view>
1
+ <view class="m-mask custom-mask-class {{ visible ? '' : 'is-hidden' }}" bindtap="onMaskClick"></view>
2
+
3
+ <view class="m-modal-wrap custom-class {{ visible ? '' : 'is-hidden' }}">
4
+ <view class="m-modal {{ visible ? 'is-show' : '' }}">
5
+ <view class="m-modal__content">
6
+ <view class="m-modal__title" wx:if="{{ title }}">{{ title }}</view>
7
+ <view class="m-modal__body custom-body-class" wx:if="{{ content }}">{{ content }}</view>
8
+ <view class="m-modal__body custom-body-class" wx:else>
9
+ <slot />
10
+ </view>
11
+ <view class="m-modal__btn-group">
12
+ <view class="m-modal__btn m-modal__btn--cancel" wx:if="{{ showCancelButton }}">
13
+ <m-button full type="ghost" bind:click="onCancel">{{ cancelButtonText }}</m-button>
14
+ </view>
15
+ <view class="m-modal__btn" wx:if="{{ showConfirmButton }}">
16
+ <m-button full type="ghost" loading="{{ loading }}" bind:click="onConfirm" color="{{ confirmTextColor }}">
17
+ {{ confirmButtonText }}
18
+ </m-button>
19
+ </view>
20
+ </view>
21
+ </view>
22
+ </view>
23
23
  </view>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-modal/modal.js"],"names":["getCtx","selector","pages","getCurrentPages","ctx","length","componentCtx","selectComponent","console","error","Modal","Promise","resolve","reject","options","modal","_reset","_confirm","_cancel","_show","alert","Object","assign","showCancelButton","confirm","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,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;;AAEA,MAAI,CAACK,YAAL,EAAmB;AACjBE,YAAQC,KAAR,CAAc,sBAAd;AACA,WAAO,IAAP;AACD;AACD,SAAOH,YAAP;AACD;;AAED,IAAMI,QAAQ,SAARA,KAAQ,UAAW;;AAEvB,SAAO,IAAIC,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AAAA,4BACNC,OADM,CAC9Bb,QAD8B;AAAA,QAC9BA,QAD8B,qCACnB,QADmB;;AAEtC,QAAMc,QAAQf,OAAOC,QAAP,CAAd;AACAc,UAAMC,MAAN;;AAEAD,UAAME,QAAN,GAAiBL,OAAjB;AACAG,UAAMG,OAAN,GAAgBL,MAAhB;AACAE,UAAMI,KAAN,CAAYL,OAAZ;;AAEA,WAAOC,KAAP;AACD,GAVM,CAAP;AAWD,CAbD;;AAeAL,MAAMU,KAAN,GAAc;AAAA,SAAWV,MAAMW,OAAOC,MAAP,CAAc;AAC3CC,sBAAkB;AADyB,GAAd,EAE5BT,OAF4B,CAAN,CAAX;AAAA,CAAd;AAGAJ,MAAMc,OAAN,GAAgB;AAAA,SAAWd,MAAMI,OAAN,CAAX;AAAA,CAAhB;;AAEAJ,MAAMe,KAAN,GAAc,YAAyB;AAAA,MAAxBxB,QAAwB,uEAAb,QAAa;;AACrC,MAAMG,MAAMJ,OAAOC,QAAP,CAAZ;AACAG,MAAIqB,KAAJ;AACD,CAHD;;kBAKef,K","file":"bld-modal/modal.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 = 42);\n","function getCtx(selector) {\n const pages = getCurrentPages()\n const ctx = pages[pages.length - 1]\n const componentCtx = ctx.selectComponent(selector)\n\n if (!componentCtx) {\n console.error('无法找到对应的组件,请按文档说明使用组件')\n return null\n }\n return componentCtx\n}\n\nconst Modal = options => {\n\n return new Promise((resolve, reject) => {\n const { selector = '#modal' } = options\n const modal = getCtx(selector)\n modal._reset()\n\n modal._confirm = resolve\n modal._cancel = reject\n modal._show(options)\n\n return modal\n })\n}\n\nModal.alert = options => Modal(Object.assign({\n showCancelButton: false\n}, options))\nModal.confirm = options => Modal(options)\n\nModal.close = (selector = '#modal') => {\n const ctx = getCtx(selector)\n ctx.close()\n}\n\nexport default Modal"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-modal/modal.js"],"names":["getCtx","selector","pages","getCurrentPages","ctx","length","componentCtx","selectComponent","console","error","Modal","Promise","resolve","reject","options","modal","_reset","_confirm","_cancel","_show","alert","Object","assign","showCancelButton","confirm","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;Q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ar 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 = 42);\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\r\n if (!componentCtx) {\r\n console.error('无法找到对应的组件,请按文档说明使用组件')\r\n return null\r\n }\r\n return componentCtx\r\n}\r\n\r\nconst Modal = options => {\r\n\r\n return new Promise((resolve, reject) => {\r\n const { selector = '#modal' } = options\r\n const modal = getCtx(selector)\r\n modal._reset()\r\n\r\n modal._confirm = resolve\r\n modal._cancel = reject\r\n modal._show(options)\r\n\r\n return modal\r\n })\r\n}\r\n\r\nModal.alert = options => Modal(Object.assign({\r\n showCancelButton: false\r\n}, options))\r\nModal.confirm = options => Modal(options)\r\n\r\nModal.close = (selector = '#modal') => {\r\n const ctx = getCtx(selector)\r\n ctx.close()\r\n}\r\n\r\nexport default Modal"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-nav-bar/index.js"],"names":["app","getApp","deviceInfo","globalData","systemInfo","noticeText","menuButtonInfo","menuButtonDistance","screenWidth","statusBarHeight","gap","top","padding","right","_baseStyle","height","width","res","wx","getMenuButtonBoundingClientRect","Component","externalClasses","options","multipleSlots","properties","bgColor","type","String","goBack","Boolean","value","showTitle","showShare","textAlign","callBack","data","style","join","titleStyle","lifetimes","ready","totalHeight","triggerEvent","observers","_style","push","setData","createSelectorQuery","select","boundingClientRect","exec","methods","navigateHome","switchTab","url","navigateBack","pages","getCurrentPages","length"],"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,MAAMC,QAAZ;;AAEA,IAAMC,aAAaF,IAAIG,UAAJ,CAAeD,UAAlC;AACA,IAAME,aAAaJ,IAAIG,UAAJ,CAAeC,UAAlC;AACA,IAAMC,aAAaL,IAAIG,UAAJ,CAAeE,UAAlC;AACA,IAAMC,iBAAiBN,IAAIG,UAAJ,CAAeI,kBAAtC;AACA,IAAMC,cAAcJ,WAAWI,WAA/B;;AAEA,IAAMC,kBAAkBL,WAAWK,eAAnC;AACA,IAAMC,MAAMJ,eAAeK,GAAf,GAAqBF,eAAjC;AACA,IAAMG,UAAUJ,cAAcF,eAAeO,KAA7C;AACA,IAAMC,aAAa,mBACDR,eAAeK,GADd,8BAEED,GAFF,2BAGDJ,eAAeS,MAHd,sBAINT,eAAeS,MAJT,4BAKAH,OALA,8BAMCA,UAAU,CAAV,GAAcN,eAAeU,KAN9B,mCAOK,IAAIJ,OAAJ,GAAcN,eAAeU,KAPlC,UAAnB;AASA,IAAMC,MAAMC,GAAGC,+BAAH,EAAZ;AACAC,UAAU;AACRC,mBAAiB,C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AACjC,aAAKa,OAAL,CAAa;AACXR,sEAA0D,CAAC,KAAK1B,OAAN,IAAiB,CAA3E;AADW,SAAb;AAGA;AACD;;AAED,UAAIgB,OAAJ,EAAY;AACV,aAAKmB,mBAAL,GACGC,MADH,CACU,aADV,EAEGC,kBAFH,CAEsB,UAAChC,GAAD,EAAS;AAC3B,gBAAK6B,OAAL,CAAa;AACXR,2CAA6B,CAAChC,eAAeU,KAAf,GAAuBJ,OAAvB,GAAiCK,IAAIF,MAAtC,IAAgD,CAA7E;AADW,WAAb;AAGD,SANH,EAOGmC,IAPH;AAQD,OATD,MASO;AACL,aAAKJ,OAAL,CAAa;AACXR,yCAA6B,CAAChC,eAAeU,KAAf,GAAuBJ,OAAxB,IAAmC,CAAhE;AADW,SAAb;AAGD;AACF;AAtCQ,GAtDH;AA8FRuC,WAAS;AACPC,gBADO,0BACQ;AACblC,SAAGmC,SAAH,CAAa;AACXC,aAAK;AADM,OAAb;AAGD,KALM;AAOPC,gBAPO,0BAOQ;AACb,UAAMrB,WAAW,KAAKV,UAAL,CAAgBU,QAAjC;AACA,UAAGA,QAAH,EAAY;AACTA;AACA;AACF;AACD,UAAMsB,QAAQC,iBAAd;;AAEA,UAAID,MAAME,MAAN,GAAe,CAAnB,EAAsB;AACpBxC,WAAGqC,YAAH;;AAEA;AACD;;AAED,WAAKH,YAAL;AACD;AAtBM;AA9FD,CAAV,E","file":"bld-nav-bar/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 = 22);\n","const app = getApp();\n\nconst deviceInfo = app.globalData.deviceInfo;\nconst systemInfo = app.globalData.systemInfo;\nconst noticeText = app.globalData.noticeText;\nconst menuButtonInfo = app.globalData.menuButtonDistance;\nconst screenWidth = systemInfo.screenWidth;\n\nconst statusBarHeight = systemInfo.statusBarHeight;\nconst gap = menuButtonInfo.top - statusBarHeight;\nconst padding = screenWidth - menuButtonInfo.right;\nconst _baseStyle = [\n `padding-top: ${menuButtonInfo.top}px`,\n `padding-bottom: ${gap}px`,\n `line-height: ${menuButtonInfo.height}px`,\n `height: ${menuButtonInfo.height}px`,\n `padding-left: ${padding}px`,\n `padding-right: ${padding * 2 + menuButtonInfo.width}px`,\n `width: calc(100% - ${3 * padding + menuButtonInfo.width}px)`,\n];\nconst res = wx.getMenuButtonBoundingClientRect();\nComponent({\n externalClasses: [\"iclass\"],\n options: {\n multipleSlots: true, // 在组件定义时的选项中启用多slot支持\n },\n properties: {\n bgColor: {\n type: String,\n },\n goBack: {\n type: Boolean,\n value: false,\n },\n showTitle: {\n type: Boolean,\n value: true,\n },\n showShare: {\n type: Boolean,\n value: false,\n },\n textAlign: {\n type: String,\n value: \"left\",\n },\n callBack:{\n type:null,\n value:null\n }\n },\n data: {\n style: _baseStyle.join(\";\"),\n titleStyle: \"\",\n top: res.height + res.top,\n noticeText\n },\n lifetimes: {\n ready() {\n const totalHeight = menuButtonInfo.top + menuButtonInfo.height + gap;\n\n this.triggerEvent(\"height-change\", totalHeight);\n // let version = systemInfo.SDKVersion\n // version = version.replace(/\\./g, \"\")\n // if(version.length == 3) {\n // version =version + \"0\"\n // }\n // console.log('该版本号为: '+ version)\n // if (parseInt(version) <= 3700) {\n // this.setData({\n // noticeText:\"检测到您的微信版本过低,部分功能或许无法使用,请升级微信至最新版本!!!\"\n // })\n // }\n },\n },\n observers: {\n bgColor: function (bgColor) {\n if (bgColor) {\n const _style = [..._baseStyle];\n\n _style.push(`background-color: ${bgColor}`);\n this.setData({\n style: _style.join(\";\"),\n });\n } else {\n this.setData({\n style: _baseStyle.join(\";\"),\n });\n }\n },\n\n goBack: function (goBack) {\n if (this.data.textAlign == \"left\") {\n this.setData({\n titleStyle: `justify-content: flex-start; padding-left: ${(12 - padding) * 2}rpx;`,\n });\n return;\n }\n\n if (goBack) {\n this.createSelectorQuery()\n .select(\".operations\")\n .boundingClientRect((res) => {\n this.setData({\n titleStyle: `padding-left: ${(menuButtonInfo.width - padding - res.height) * 2}rpx`,\n });\n })\n .exec();\n } else {\n this.setData({\n titleStyle: `padding-left: ${(menuButtonInfo.width - padding) * 2}rpx`,\n });\n }\n },\n },\n methods: {\n navigateHome() {\n wx.switchTab({\n url: \"/pages/home/index\",\n });\n },\n\n navigateBack() {\n const callBack = this.properties.callBack\n if(callBack){\n callBack()\n return\n }\n const pages = getCurrentPages();\n\n if (pages.length > 1) {\n wx.navigateBack();\n\n return;\n }\n\n this.navigateHome();\n },\n },\n});\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-nav-bar/index.js"],"names":["app","getApp","deviceInfo","globalData","systemInfo","noticeText","menuButtonInfo","menuButtonDistance","screenWidth","statusBarHeight","gap","top","padding","right","_baseStyle","height","width","res","wx","getMenuButtonBoundingClientRect","Component","externalClasses","options","multipleSlots","properties","bgColor","type","String","goBack","Boolean","value","showTitle","showShare","textAlign","callBack","data","style","join","titleStyle","lifetimes","ready","totalHeight","triggerEvent","observers","_style","push","setData","createSelectorQuery","select","boundingClientRect","exec","methods","navigateHome","switchTab","url","navigateBack","pages","getCurrentPages","length"],"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;QAC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vB,GAAiCK,IAAIF,MAAtC,IAAgD,CAA7E;AADW,WAAb;AAGD,SANH,EAOGmC,IAPH;AAQD,OATD,MASO;AACL,aAAKJ,OAAL,CAAa;AACXR,yCAA6B,CAAChC,eAAeU,KAAf,GAAuBJ,OAAxB,IAAmC,CAAhE;AADW,SAAb;AAGD;AACF;AAtCQ,GAtDH;AA8FRuC,WAAS;AACPC,gBADO,0BACQ;AACblC,SAAGmC,SAAH,CAAa;AACXC,aAAK;AADM,OAAb;AAGD,KALM;AAOPC,gBAPO,0BAOQ;AACb,UAAMrB,WAAW,KAAKV,UAAL,CAAgBU,QAAjC;AACA,UAAGA,QAAH,EAAY;AACTA;AACA;AACF;AACD,UAAMsB,QAAQC,iBAAd;;AAEA,UAAID,MAAME,MAAN,GAAe,CAAnB,EAAsB;AACpBxC,WAAGqC,YAAH;;AAEA;AACD;;AAED,WAAKH,YAAL;AACD;AAtBM;AA9FD,CAAV,E","file":"bld-nav-bar\\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 = 22);\n","const app = getApp();\r\n\r\nconst deviceInfo = app.globalData.deviceInfo;\r\nconst systemInfo = app.globalData.systemInfo;\r\nconst noticeText = app.globalData.noticeText;\r\nconst menuButtonInfo = app.globalData.menuButtonDistance;\r\nconst screenWidth = systemInfo.screenWidth;\r\n\r\nconst statusBarHeight = systemInfo.statusBarHeight;\r\nconst gap = menuButtonInfo.top - statusBarHeight;\r\nconst padding = screenWidth - menuButtonInfo.right;\r\nconst _baseStyle = [\r\n `padding-top: ${menuButtonInfo.top}px`,\r\n `padding-bottom: ${gap}px`,\r\n `line-height: ${menuButtonInfo.height}px`,\r\n `height: ${menuButtonInfo.height}px`,\r\n `padding-left: ${padding}px`,\r\n `padding-right: ${padding * 2 + menuButtonInfo.width}px`,\r\n `width: calc(100% - ${3 * padding + menuButtonInfo.width}px)`,\r\n];\r\nconst res = wx.getMenuButtonBoundingClientRect();\r\nComponent({\r\n externalClasses: [\"iclass\"],\r\n options: {\r\n multipleSlots: true, // 在组件定义时的选项中启用多slot支持\r\n },\r\n properties: {\r\n bgColor: {\r\n type: String,\r\n },\r\n goBack: {\r\n type: Boolean,\r\n value: false,\r\n },\r\n showTitle: {\r\n type: Boolean,\r\n value: true,\r\n },\r\n showShare: {\r\n type: Boolean,\r\n value: false,\r\n },\r\n textAlign: {\r\n type: String,\r\n value: \"left\",\r\n },\r\n callBack:{\r\n type:null,\r\n value:null\r\n }\r\n },\r\n data: {\r\n style: _baseStyle.join(\";\"),\r\n titleStyle: \"\",\r\n top: res.height + res.top,\r\n noticeText\r\n },\r\n lifetimes: {\r\n ready() {\r\n const totalHeight = menuButtonInfo.top + menuButtonInfo.height + gap;\r\n\r\n this.triggerEvent(\"height-change\", totalHeight);\r\n // let version = systemInfo.SDKVersion\r\n // version = version.replace(/\\./g, \"\")\r\n // if(version.length == 3) {\r\n // version =version + \"0\"\r\n // }\r\n // console.log('该版本号为: '+ version)\r\n // if (parseInt(version) <= 3700) {\r\n // this.setData({\r\n // noticeText:\"检测到您的微信版本过低,部分功能或许无法使用,请升级微信至最新版本!!!\"\r\n // })\r\n // }\r\n },\r\n },\r\n observers: {\r\n bgColor: function (bgColor) {\r\n if (bgColor) {\r\n const _style = [..._baseStyle];\r\n\r\n _style.push(`background-color: ${bgColor}`);\r\n this.setData({\r\n style: _style.join(\";\"),\r\n });\r\n } else {\r\n this.setData({\r\n style: _baseStyle.join(\";\"),\r\n });\r\n }\r\n },\r\n\r\n goBack: function (goBack) {\r\n if (this.data.textAlign == \"left\") {\r\n this.setData({\r\n titleStyle: `justify-content: flex-start; padding-left: ${(12 - padding) * 2}rpx;`,\r\n });\r\n return;\r\n }\r\n\r\n if (goBack) {\r\n this.createSelectorQuery()\r\n .select(\".operations\")\r\n .boundingClientRect((res) => {\r\n this.setData({\r\n titleStyle: `padding-left: ${(menuButtonInfo.width - padding - res.height) * 2}rpx`,\r\n });\r\n })\r\n .exec();\r\n } else {\r\n this.setData({\r\n titleStyle: `padding-left: ${(menuButtonInfo.width - padding) * 2}rpx`,\r\n });\r\n }\r\n },\r\n },\r\n methods: {\r\n navigateHome() {\r\n wx.switchTab({\r\n url: \"/pages/home/index\",\r\n });\r\n },\r\n\r\n navigateBack() {\r\n const callBack = this.properties.callBack\r\n if(callBack){\r\n callBack()\r\n return\r\n }\r\n const pages = getCurrentPages();\r\n\r\n if (pages.length > 1) {\r\n wx.navigateBack();\r\n\r\n return;\r\n }\r\n\r\n this.navigateHome();\r\n },\r\n },\r\n});\r\n"],"sourceRoot":""}
@@ -1,7 +1,7 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "bld-icon": "../bld-icon/index",
5
- "bld-notice-bar":"../bld-notice-bar/index"
6
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "bld-icon": "../bld-icon/index",
5
+ "bld-notice-bar":"../bld-notice-bar/index"
6
+ }
7
7
  }
@@ -1,43 +1,43 @@
1
- <view
2
- class="iclass nav-bar"
3
- style="{{ style }}"
4
- >
5
- <view class="operations">
6
- <view
7
- wx:if="{{ goBack }}"
8
- class="operation"
9
- bind:tap="navigateBack"
10
- >
11
- <bld-icon name="backward" />
12
- </view>
13
- </view>
14
- <view
15
- class="title {{ showTitle ?'showTitle':'' }}"
16
- style="{{ titleStyle }}"
17
- >
18
- <slot />
19
- </view>
20
- <view class="operations right">
21
- <button
22
- wx:if="{{ showShare }}"
23
- class="operation"
24
- open-type="share"
25
- >
26
- <bld-icon name="share" />
27
- </button>
28
- </view>
29
- <view wx:if="{{noticeText}}" class="notice-wrap" style="top:{{ top }}px;">
30
- <bld-notice-bar>
31
- <view class="preifx" slot="preifx">
32
- <bld-icon name="notice" size="32" color="#ed6a0c" />
33
- </view>
34
-
35
- <view>{{noticeText}}</view>
36
-
37
- <view class="suffix" slot="suffix">
38
- <bld-icon name="cross" size="32" color="#ed6a0c" />
39
- </view>
40
- </bld-notice-bar>
41
- </view>
42
-
43
- </view>
1
+ <view
2
+ class="iclass nav-bar"
3
+ style="{{ style }}"
4
+ >
5
+ <view class="operations">
6
+ <view
7
+ wx:if="{{ goBack }}"
8
+ class="operation"
9
+ bind:tap="navigateBack"
10
+ >
11
+ <bld-icon name="backward" />
12
+ </view>
13
+ </view>
14
+ <view
15
+ class="title {{ showTitle ?'showTitle':'' }}"
16
+ style="{{ titleStyle }}"
17
+ >
18
+ <slot />
19
+ </view>
20
+ <view class="operations right">
21
+ <button
22
+ wx:if="{{ showShare }}"
23
+ class="operation"
24
+ open-type="share"
25
+ >
26
+ <bld-icon name="share" />
27
+ </button>
28
+ </view>
29
+ <view wx:if="{{noticeText}}" class="notice-wrap" style="top:{{ top }}px;">
30
+ <bld-notice-bar>
31
+ <view class="preifx" slot="preifx">
32
+ <bld-icon name="notice" size="32" color="#ed6a0c" />
33
+ </view>
34
+
35
+ <view>{{noticeText}}</view>
36
+
37
+ <view class="suffix" slot="suffix">
38
+ <bld-icon name="cross" size="32" color="#ed6a0c" />
39
+ </view>
40
+ </bld-notice-bar>
41
+ </view>
42
+
43
+ </view>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-navbar/index.js"],"names":["Component","externalClasses","options","addGlobalClass","relations","type","linked","target","parent","unlinked","properties","name","String","value","title","optionalTypes","Number","data","activeName","activeColor","methods","onClick","ev","triggerEvent","baseLeft","query","createSelectorQuery","select","boundingClientRect","exec","offsetLeft","currentTarget","res","left","itemWidth","width","textWidth","updateScrollPositon"],"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A,aAAOe,YAAP,CAAoB,OAApB,EAA6B,KAAKN,IAAL,CAAUN,IAAvC;;AAEA,UAAMa,WAAWhB,OAAOS,IAAP,CAAYO,QAA7B;;AAEA,UAAMC,QAAQ,KAAKC,mBAAL,EAAd;;AAEAD,YAAME,MAAN,CAAa,aAAb,EAA4BC,kBAA5B;AACAH,YAAME,MAAN,CAAa,mBAAb,EAAkCC,kBAAlC;;AAEAH,YAAMI,IAAN,CAAW,eAAO;AAChB,YAAMC,aAAaR,KAAKA,GAAGS,aAAH,CAAiBD,UAAtB,GAAmCE,IAAI,CAAJ,EAAOC,IAAP,GAAcT,QAApE;AACA,YAAMU,YAAYF,IAAI,CAAJ,EAAOG,KAAzB;AACA,YAAMC,YAAYJ,IAAI,CAAJ,EAAOG,KAAzB;;AAEA3B,eAAO6B,mBAAP,CAA2BP,UAA3B,EAAuCI,SAAvC,EAAkDE,SAAlD,EAA6D,MAAKnB,IAAL,CAAUN,IAAvE;AACD,OAND;AAOD;AApBM;AAxCD,CAAV,E","file":"bld-navbar/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 = 45);\n","Component({\n externalClasses: ['custom-class'],\n\n options: {\n addGlobalClass: true,\n },\n\n relations: {\n '../bld-navbar-group/index': {\n type: 'parent',\n linked(target) {\n this.parent = target\n },\n unlinked() {\n this.parent = null\n }\n }\n },\n\n properties: {\n name: {\n type: String,\n value: ''\n },\n title: {\n type: String,\n value: ''\n },\n value: {\n type: String,\n optionalTypes: [Number, String],\n value: ''\n }\n },\n\n data: {\n activeName: '',\n activeColor: ''\n },\n\n methods: {\n onClick(ev = null) {\n const parent = this.parent\n\n parent.triggerEvent('click', this.data.name)\n\n const baseLeft = parent.data.baseLeft\n\n const query = this.createSelectorQuery()\n\n query.select('.m-tab-item').boundingClientRect()\n query.select('.m-tab-item__text').boundingClientRect()\n\n query.exec(res => {\n const offsetLeft = ev ? ev.currentTarget.offsetLeft : res[0].left - baseLeft\n const itemWidth = res[0].width\n const textWidth = res[1].width\n\n parent.updateScrollPositon(offsetLeft, itemWidth, textWidth, this.data.name)\n })\n }\n }\n})"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-navbar/index.js"],"names":["Component","externalClasses","options","addGlobalClass","relations","type","linked","target","parent","unlinked","properties","name","String","value","title","optionalTypes","Number","data","activeName","activeColor","methods","onClick","ev","triggerEvent","baseLeft","query","createSelectorQuery","select","boundingClientRect","exec","offsetLeft","currentTarget","res","left","itemWidth","width","textWidth","updateScrollPositon"],"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,cAA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nB,IAAL,CAAUN,IAAvE;AACD,OAND;AAOD;AApBM;AAxCD,CAAV,E","file":"bld-navbar\\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 = 45);\n","Component({\r\n externalClasses: ['custom-class'],\r\n\r\n options: {\r\n addGlobalClass: true,\r\n },\r\n\r\n relations: {\r\n '../bld-navbar-group/index': {\r\n type: 'parent',\r\n linked(target) {\r\n this.parent = target\r\n },\r\n unlinked() {\r\n this.parent = null\r\n }\r\n }\r\n },\r\n\r\n properties: {\r\n name: {\r\n type: String,\r\n value: ''\r\n },\r\n title: {\r\n type: String,\r\n value: ''\r\n },\r\n value: {\r\n type: String,\r\n optionalTypes: [Number, String],\r\n value: ''\r\n }\r\n },\r\n\r\n data: {\r\n activeName: '',\r\n activeColor: ''\r\n },\r\n\r\n methods: {\r\n onClick(ev = null) {\r\n const parent = this.parent\r\n\r\n parent.triggerEvent('click', this.data.name)\r\n\r\n const baseLeft = parent.data.baseLeft\r\n\r\n const query = this.createSelectorQuery()\r\n\r\n query.select('.m-tab-item').boundingClientRect()\r\n query.select('.m-tab-item__text').boundingClientRect()\r\n\r\n query.exec(res => {\r\n const offsetLeft = ev ? ev.currentTarget.offsetLeft : res[0].left - baseLeft\r\n const itemWidth = res[0].width\r\n const textWidth = res[1].width\r\n\r\n parent.updateScrollPositon(offsetLeft, itemWidth, textWidth, this.data.name)\r\n })\r\n }\r\n }\r\n})"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
- {
2
- "component": true,
3
- "usingComponents": {
4
- "bld-badge": "../bld-badge/index"
5
- }
1
+ {
2
+ "component": true,
3
+ "usingComponents": {
4
+ "bld-badge": "../bld-badge/index"
5
+ }
6
6
  }
@@ -1,8 +1,8 @@
1
- <view class="m-tab-item {{activeName === name ? 'is-active': ''}}" bind:tap="onClick">
2
- <view class="m-tab-item__content">
3
- <view class="m-tab-item__text" style="{{ activeColor ? 'color:' + activeColor: '' }}">
4
- {{ title }}
5
- <bld-badge wx:if="{{ value }}" custom-class="m-badge-custom" value="{{ value }}" static />
6
- </view>
7
- </view>
1
+ <view class="m-tab-item {{activeName === name ? 'is-active': ''}}" bind:tap="onClick">
2
+ <view class="m-tab-item__content">
3
+ <view class="m-tab-item__text" style="{{ activeColor ? 'color:' + activeColor: '' }}">
4
+ {{ title }}
5
+ <bld-badge wx:if="{{ value }}" custom-class="m-badge-custom" value="{{ value }}" static />
6
+ </view>
7
+ </view>
8
8
  </view>
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-navbar-group/index.js"],"names":["Component","externalClasses","options","addGlobalClass","relations","type","linked","_updateChildren","unlinked","properties","activeName","String","optionalTypes","Number","value","activeColor","lineWidth","lineColor","lineHeight","data","baseLeft","scrollLeft","lineLeft","activeLineWidth","tabWidth","methods","timer","clearTimeout","setTimeout","children","getRelationNodes","len","length","_updateWrapInfo","wx","nextTick","query","createSelectorQuery","select","boundingClientRect","scrollOffset","exec","res","left","width","forEach","child","index","name","onClick","updateScrollPositon","domWidth","color","setData","custonLineWidth","Math","floor","parseInt","triggerEvent"],"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,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;AAKnD,UAAIA,WAAJ,EAAiB;AACf,aAAKc,QAAL,CAAcgB,OAAd,CAAsB,UAACC,KAAD,EAAQC,KAAR,EAAkB;AACtC,cAAIK,QAAQN,MAAM3B,IAAN,CAAW6B,IAAX,KAAoBA,IAApB,GAA2BjC,WAA3B,GAAyC,EAArD;AACA+B,gBAAMO,OAAN,CAAc;AACZ3C,wBAAYsC,IADA;AAEZjC,yBAAaqC;AAFD,WAAd;AAID,SAND;AAOD;;AAED,UAAM/B,aAAasB,OAAO,KAAKxB,IAAL,CAAUK,QAAV,GAAqB,CAA5B,GAAgC2B,WAAW,CAA9D;;AAEA,UAAMG,kBAAkBC,KAAKC,KAAL,CAAWC,SAAS,KAAKtC,IAAL,CAAUH,SAAnB,KAAiC,KAAKG,IAAL,CAAUK,QAAV,GAAqB,GAAtD,CAAX,CAAxB;;AAEA,UAAMD,kBAAkB+B,kBAAkBA,mBAAmBH,QAAnB,GAA8BG,eAA9B,GAAgDH,QAAlE,GAA6EnC,SAArG;;AAEA,UAAMM,WAAWqB,OAAOQ,WAAW,CAAlB,GAAsB5B,kBAAkB,CAAzD;;AAEA,WAAK8B,OAAL,CAAa;AACXhC,8BADW;AAEXC,0BAFW;AAGXC;AAHW,OAAb,EAIG,YAAM;AACP,eAAKmC,YAAL,CAAkB,QAAlB,EAA4BV,IAA5B;AACD,OAND;AAOD;AAhFM;AAxDD,CAAV,E","file":"bld-navbar-group/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 = 46);\n","Component({\n externalClasses: ['custom-class'],\n\n options: {\n addGlobalClass: true,\n },\n\n relations: {\n '../bld-navbar/index': {\n type: 'child',\n linked() {\n this._updateChildren()\n },\n unlinked() {\n this._updateChildren()\n }\n }\n },\n\n properties: {\n activeName: {\n type: String,\n optionalTypes: [Number, String],\n value: ''\n },\n\n activeColor: {\n type: String,\n value: ''\n },\n\n lineWidth: {\n type: Number,\n optionalTypes: [Number, String],\n value: 0\n },\n\n lineColor: {\n type: String,\n value: ''\n },\n\n lineHeight: {\n type: Number,\n value: 6\n }\n },\n\n data: {\n baseLeft: 0,\n scrollLeft: 0,\n lineLeft: 0,\n activeLineWidth: 0,\n tabWidth: 0,\n },\n\n methods: {\n _updateChildren() {\n // 防抖减少重复触发\n if (this.timer) {\n clearTimeout(this.timer)\n this.timer = null\n }\n\n this.timer = setTimeout(() => {\n let children = this.getRelationNodes('../navbar/index')\n this.children = children\n const len = children.length\n\n // 渲染完成后更新内容区域宽度\n if (len) {\n this._updateWrapInfo(children)\n }\n }, 60)\n },\n\n\n // 渲染完成后更新内容区域宽度\n _updateWrapInfo(children) {\n wx.nextTick(() => {\n const query = this.createSelectorQuery()\n query.select('.m-tabs').boundingClientRect()\n query.select('.m-tabs__scroll').scrollOffset()\n query.exec(res => {\n this.data.baseLeft = res[0].left\n\n const tabWidth = res[0].width // 选项卡总宽度 \n this.data.tabWidth = tabWidth\n\n const { activeName } = this.data\n\n if (activeName) {\n children.forEach((child, index) => {\n if (child.data.name === activeName) {\n child.onClick()\n }\n })\n } else {\n children[0].onClick()\n }\n\n })\n })\n },\n\n\n updateScrollPositon(left, domWidth, lineWidth, name) {\n\n // 设置选中标签的字体颜色\n const { activeColor } = this.data\n\n if (activeColor) {\n this.children.forEach((child, index) => {\n let color = child.data.name === name ? activeColor : ''\n child.setData({\n activeName: name,\n activeColor: color\n })\n })\n }\n\n const scrollLeft = left - this.data.tabWidth / 2 + domWidth / 2\n\n const custonLineWidth = Math.floor(parseInt(this.data.lineWidth) * (this.data.tabWidth / 750))\n\n const activeLineWidth = custonLineWidth ? custonLineWidth <= domWidth ? custonLineWidth : domWidth : lineWidth\n\n const lineLeft = left + domWidth / 2 - activeLineWidth / 2\n\n this.setData({\n scrollLeft,\n lineLeft,\n activeLineWidth\n }, () => {\n this.triggerEvent('change', name)\n })\n }\n }\n})\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/bld-navbar-group/index.js"],"names":["Component","externalClasses","options","addGlobalClass","relations","type","linked","_updateChildren","unlinked","properties","activeName","String","optionalTypes","Number","value","activeColor","lineWidth","lineColor","lineHeight","data","baseLeft","scrollLeft","lineLeft","activeLineWidth","tabWidth","methods","timer","clearTimeout","setTimeout","children","getRelationNodes","len","length","_updateWrapInfo","wx","nextTick","query","createSelectorQuery","select","boundingClientRect","scrollOffset","exec","res","left","width","forEach","child","index","name","onClick","updateScrollPositon","domWidth","color","setData","custonLineWidth","Math","floor","parseInt","triggerEvent"],"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,cAAD,CADT;;AAGRC,WAAS;AACPC,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WAAW,CAA9D;;AAEA,UAAMG,kBAAkBC,KAAKC,KAAL,CAAWC,SAAS,KAAKtC,IAAL,CAAUH,SAAnB,KAAiC,KAAKG,IAAL,CAAUK,QAAV,GAAqB,GAAtD,CAAX,CAAxB;;AAEA,UAAMD,kBAAkB+B,kBAAkBA,mBAAmBH,QAAnB,GAA8BG,eAA9B,GAAgDH,QAAlE,GAA6EnC,SAArG;;AAEA,UAAMM,WAAWqB,OAAOQ,WAAW,CAAlB,GAAsB5B,kBAAkB,CAAzD;;AAEA,WAAK8B,OAAL,CAAa;AACXhC,8BADW;AAEXC,0BAFW;AAGXC;AAHW,OAAb,EAIG,YAAM;AACP,eAAKmC,YAAL,CAAkB,QAAlB,EAA4BV,IAA5B;AACD,OAND;AAOD;AAhFM;AAxDD,CAAV,E","file":"bld-navbar-group\\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 = 46);\n","Component({\r\n externalClasses: ['custom-class'],\r\n\r\n options: {\r\n addGlobalClass: true,\r\n },\r\n\r\n relations: {\r\n '../bld-navbar/index': {\r\n type: 'child',\r\n linked() {\r\n this._updateChildren()\r\n },\r\n unlinked() {\r\n this._updateChildren()\r\n }\r\n }\r\n },\r\n\r\n properties: {\r\n activeName: {\r\n type: String,\r\n optionalTypes: [Number, String],\r\n value: ''\r\n },\r\n\r\n activeColor: {\r\n type: String,\r\n value: ''\r\n },\r\n\r\n lineWidth: {\r\n type: Number,\r\n optionalTypes: [Number, String],\r\n value: 0\r\n },\r\n\r\n lineColor: {\r\n type: String,\r\n value: ''\r\n },\r\n\r\n lineHeight: {\r\n type: Number,\r\n value: 6\r\n }\r\n },\r\n\r\n data: {\r\n baseLeft: 0,\r\n scrollLeft: 0,\r\n lineLeft: 0,\r\n activeLineWidth: 0,\r\n tabWidth: 0,\r\n },\r\n\r\n methods: {\r\n _updateChildren() {\r\n // 防抖减少重复触发\r\n if (this.timer) {\r\n clearTimeout(this.timer)\r\n this.timer = null\r\n }\r\n\r\n this.timer = setTimeout(() => {\r\n let children = this.getRelationNodes('../navbar/index')\r\n this.children = children\r\n const len = children.length\r\n\r\n // 渲染完成后更新内容区域宽度\r\n if (len) {\r\n this._updateWrapInfo(children)\r\n }\r\n }, 60)\r\n },\r\n\r\n\r\n // 渲染完成后更新内容区域宽度\r\n _updateWrapInfo(children) {\r\n wx.nextTick(() => {\r\n const query = this.createSelectorQuery()\r\n query.select('.m-tabs').boundingClientRect()\r\n query.select('.m-tabs__scroll').scrollOffset()\r\n query.exec(res => {\r\n this.data.baseLeft = res[0].left\r\n\r\n const tabWidth = res[0].width // 选项卡总宽度 \r\n this.data.tabWidth = tabWidth\r\n\r\n const { activeName } = this.data\r\n\r\n if (activeName) {\r\n children.forEach((child, index) => {\r\n if (child.data.name === activeName) {\r\n child.onClick()\r\n }\r\n })\r\n } else {\r\n children[0].onClick()\r\n }\r\n\r\n })\r\n })\r\n },\r\n\r\n\r\n updateScrollPositon(left, domWidth, lineWidth, name) {\r\n\r\n // 设置选中标签的字体颜色\r\n const { activeColor } = this.data\r\n\r\n if (activeColor) {\r\n this.children.forEach((child, index) => {\r\n let color = child.data.name === name ? activeColor : ''\r\n child.setData({\r\n activeName: name,\r\n activeColor: color\r\n })\r\n })\r\n }\r\n\r\n const scrollLeft = left - this.data.tabWidth / 2 + domWidth / 2\r\n\r\n const custonLineWidth = Math.floor(parseInt(this.data.lineWidth) * (this.data.tabWidth / 750))\r\n\r\n const activeLineWidth = custonLineWidth ? custonLineWidth <= domWidth ? custonLineWidth : domWidth : lineWidth\r\n\r\n const lineLeft = left + domWidth / 2 - activeLineWidth / 2\r\n\r\n this.setData({\r\n scrollLeft,\r\n lineLeft,\r\n activeLineWidth\r\n }, () => {\r\n this.triggerEvent('change', name)\r\n })\r\n }\r\n }\r\n})\r\n"],"sourceRoot":""}