@cloudbase/weda-ui 2.0.9 → 2.0.12

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 (235) hide show
  1. package/README.md +1 -0
  2. package/package.json +13 -5
  3. package/src/configs/components/button.json +60 -13
  4. package/src/configs/components/calendar.json +3 -3
  5. package/src/configs/components/carousel.json +57 -47
  6. package/src/configs/components/chart/bar.json +4 -13
  7. package/src/configs/components/chart/line.json +4 -13
  8. package/src/configs/components/chart/pie.json +3 -10
  9. package/src/configs/components/chart/statisticsCard.json +1 -4
  10. package/src/configs/components/container.json +1 -3
  11. package/src/configs/components/dataView.json +7 -15
  12. package/src/configs/components/drawer.json +24 -6
  13. package/src/configs/components/form/form.json +19 -0
  14. package/src/configs/components/form/input.json +20 -5
  15. package/src/configs/components/form/location.json +51 -48
  16. package/src/configs/components/form/radio.json +1 -3
  17. package/src/configs/components/form/richText.json +14 -14
  18. package/src/configs/components/form/select.json +62 -82
  19. package/src/configs/components/form/textarea.json +6 -1
  20. package/src/configs/components/form/uploader.json +64 -64
  21. package/src/configs/components/form/uploaderFile.json +1 -2
  22. package/src/configs/components/graphicCard.json +43 -44
  23. package/src/configs/components/image.json +44 -40
  24. package/src/configs/components/link.json +5 -10
  25. package/src/configs/components/listView.json +2 -8
  26. package/src/configs/components/lottery.json +7 -3
  27. package/src/configs/components/modal.json +26 -21
  28. package/src/configs/components/navLayout.json +66 -67
  29. package/src/configs/components/navigationBar.json +4 -1
  30. package/src/configs/components/richtextview.json +1 -1
  31. package/src/configs/components/scrollVeiw.json +14 -42
  32. package/src/configs/components/swiper.json +9 -9
  33. package/src/configs/components/wedaVideo.json +86 -0
  34. package/src/configs/components/wxOpenApi/phone.json +7 -21
  35. package/src/configs/components/wxOpenApi/phoneCode.json +7 -19
  36. package/src/configs/components/wxOpenApi/share.json +14 -24
  37. package/src/configs/components/wxOpenApi/userInfo.json +9 -27
  38. package/src/configs/index.js +2 -0
  39. package/src/docs/common/format.tsx +4 -1
  40. package/src/docs/common/tableView.css +3 -3
  41. package/src/docs/common/tableView.tsx +18 -8
  42. package/src/docs/compsdocs/form/FormLocation.mdx +1 -1
  43. package/src/docs/compsdocs/form/FormSelect.mdx +0 -1
  44. package/src/docs/compsdocs/grid/Card.mdx +0 -1
  45. package/src/docs/compsdocs/grid/Container.mdx +0 -1
  46. package/src/docs/compsdocs/grid/GridLayout.mdx +0 -1
  47. package/src/docs/compsdocs/grid/ScrollView.mdx +2 -2
  48. package/src/docs/compsdocs/grid/Swiper.mdx +1 -2
  49. package/src/docs/compsdocs/media/Icon.mdx +1 -1
  50. package/src/docs/compsdocs/media/Image.mdx +6 -6
  51. package/src/docs/compsdocs/model/ModelCreate.mdx +24 -0
  52. package/src/docs/compsdocs/model/ModelDetail.mdx +24 -0
  53. package/src/docs/compsdocs/model/ModelTable.mdx +133 -1
  54. package/src/docs/compsdocs/model/ModelUpdate.mdx +24 -1
  55. package/src/docs/compsdocs/navmenu/Classification.mdx +2 -3
  56. package/src/docs/compsdocs/navmenu/NavBar.mdx +14 -5
  57. package/src/docs/compsdocs/navmenu/NavLayout.mdx +0 -1
  58. package/src/docs/compsdocs/navmenu/TabBar.mdx +3 -3
  59. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +1 -1
  60. package/src/docs/compsdocs/senior/Lottery.mdx +3 -6
  61. package/src/docs/compsdocs/senior/Modal.mdx +2 -3
  62. package/src/docs/compsdocs/senior/SlotMachine.mdx +2 -5
  63. package/src/docs/compsdocs/senior/_category_.json +1 -1
  64. package/src/docs/compsdocs/show/GraphicCard.mdx +0 -1
  65. package/src/docs/compsdocs/show/Item.mdx +0 -1
  66. package/src/docs/compsdocs/show/ItemList.mdx +1 -0
  67. package/src/docs/compsdocs/show/Tabs.mdx +2 -3
  68. package/src/docs/compsdocs/text/Link.mdx +1 -1
  69. package/src/docs/compsdocs/text/RichTextView.mdx +1 -2
  70. package/src/docs/compsdocs/text/Text.mdx +1 -1
  71. package/src/docs/compsdocs/text/Title.mdx +1 -2
  72. package/src/docs/compsdocs/wxOpen/Phone.mdx +1 -2
  73. package/src/docs/compsdocs/wxOpen/Share.mdx +0 -1
  74. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +1 -2
  75. package/src/mp/components/button/index.js +1 -1
  76. package/src/mp/components/button/index.wxml +19 -19
  77. package/src/mp/components/calendar/index.js +64 -37
  78. package/src/mp/components/calendar/index.json +1 -1
  79. package/src/mp/components/calendar/index.wxml +4 -6
  80. package/src/mp/components/carousel/index.json +1 -1
  81. package/src/mp/components/carousel/index.wxml +2 -2
  82. package/src/mp/components/chart/bar/index.js +1 -2
  83. package/src/mp/components/chart/bar/index.wxml +1 -1
  84. package/src/mp/components/chart/common/config/bar.js +1 -1
  85. package/src/mp/components/chart/common/core/eChartBar.js +29 -34
  86. package/src/mp/components/chart/common/core/eChartBase.js +46 -32
  87. package/src/mp/components/chart/common/core/eChartLine.js +34 -40
  88. package/src/mp/components/chart/common/core/eChartPie.js +12 -9
  89. package/src/mp/components/chart/ec-canvas/ec-canvas.json +1 -1
  90. package/src/mp/components/chart/ec-canvas/wx-canvas.js +24 -22
  91. package/src/mp/components/chart/line/index.js +2 -2
  92. package/src/mp/components/chart/line/index.wxml +1 -1
  93. package/src/mp/components/chart/pie/index.js +1 -1
  94. package/src/mp/components/chart/pie/index.wxml +1 -2
  95. package/src/mp/components/dataView/index.wxml +2 -14
  96. package/src/mp/components/form/checkbox/index.js +10 -6
  97. package/src/mp/components/form/checkbox/index.wxml +13 -25
  98. package/src/mp/components/form/form/index.wxml +3 -3
  99. package/src/mp/components/form/formcell/index.wxml +9 -9
  100. package/src/mp/components/form/formcell/index.wxss +6 -1
  101. package/src/mp/components/form/input/index.js +3 -3
  102. package/src/mp/components/form/input/index.wxml +24 -31
  103. package/src/mp/components/form/input/index.wxss +9 -3
  104. package/src/mp/components/form/location/components/mapChoose/index.json +1 -1
  105. package/src/mp/components/form/location/components/mapChoose/index.wxml +6 -6
  106. package/src/mp/components/form/location/index.js +7 -1
  107. package/src/mp/components/form/location/index.json +1 -1
  108. package/src/mp/components/form/location/index.wxml +6 -10
  109. package/src/mp/components/form/radio/index.js +9 -5
  110. package/src/mp/components/form/radio/index.wxml +12 -24
  111. package/src/mp/components/form/select/index.js +156 -97
  112. package/src/mp/components/form/select/index.wxml +11 -39
  113. package/src/mp/components/form/select/index.wxss +14 -3
  114. package/src/mp/components/form/select/region/index.js +18 -12
  115. package/src/mp/components/form/switch/index.wxml +11 -18
  116. package/src/mp/components/form/textarea/index.wxml +2 -17
  117. package/src/mp/components/form/textarea/index.wxss +5 -0
  118. package/src/mp/components/form/tips/index.wxml +1 -3
  119. package/src/mp/components/form/uploader/index.js +1 -1
  120. package/src/mp/components/form/uploader/index.wxml +3 -20
  121. package/src/mp/components/form/uploader/weui-uploader.js +210 -200
  122. package/src/mp/components/form/uploader/weui-uploader.json +6 -6
  123. package/src/mp/components/form/uploader/weui-uploader.wxml +38 -38
  124. package/src/mp/components/form/uploaderFile/index.js +5 -4
  125. package/src/mp/components/form/uploaderFile/index.wxml +40 -41
  126. package/src/mp/components/graphicCard/index.js +35 -35
  127. package/src/mp/components/graphicCard/index.wxml +2 -6
  128. package/src/mp/components/image/index.wxml +9 -20
  129. package/src/mp/components/image/index.wxss +3 -1
  130. package/src/mp/components/listView/index.wxml +5 -7
  131. package/src/mp/components/lottery/index.wxml +1 -3
  132. package/src/mp/components/lottery/index.wxss +31 -25
  133. package/src/mp/components/navLayout/index.js +9 -12
  134. package/src/mp/components/navLayout/index.wxml +2 -4
  135. package/src/mp/components/navigationBar/index.json +1 -2
  136. package/src/mp/components/navigationBar/index.wxml +43 -51
  137. package/src/mp/components/swiper/index.wxml +1 -9
  138. package/src/mp/components/tabs/index.js +14 -10
  139. package/src/mp/components/tabs/index.json +1 -1
  140. package/src/mp/components/tabs/index.wxml +3 -21
  141. package/src/mp/components/text/index.wxml +1 -6
  142. package/src/mp/components/text/index.wxss +1 -1
  143. package/src/mp/components/wedaVideo/index.js +86 -0
  144. package/src/mp/components/wedaVideo/index.json +4 -0
  145. package/src/mp/components/wedaVideo/index.wxml +4 -0
  146. package/src/mp/components/wedaVideo/index.wxss +20 -0
  147. package/src/mp/components/wxOpenApi/phone/index.js +1 -9
  148. package/src/mp/components/wxOpenApi/phone/index.wxml +3 -14
  149. package/src/mp/components/wxOpenApi/phoneCode/index.json +1 -1
  150. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +3 -14
  151. package/src/mp/components/wxOpenApi/share/index.wxml +3 -14
  152. package/src/mp/components/wxOpenApi/userInfo/index.wxml +3 -13
  153. package/src/mp/index.json +1 -0
  154. package/src/mp/style/weda-ui.wxss +20 -7
  155. package/src/mp/utils/deepEqual.js +37 -37
  156. package/src/mp/utils/destr.js +41 -40
  157. package/src/mp/utils/dr_square_point.js +10 -6
  158. package/src/setupTests.js +13 -13
  159. package/src/web/actions/showModal/index.tsx +5 -4
  160. package/src/web/components/button/index.tsx +44 -40
  161. package/src/web/components/calendar/index.css +81 -34
  162. package/src/web/components/carousel/index.tsx +1 -1
  163. package/src/web/components/chart/common/config/bar.js +1 -1
  164. package/src/web/components/chart/common/core/eChartBar.js +28 -34
  165. package/src/web/components/chart/common/core/eChartBase.ts +55 -42
  166. package/src/web/components/chart/common/core/eChartLine.js +34 -40
  167. package/src/web/components/chart/common/core/eChartPie.js +12 -9
  168. package/src/web/components/chart/common/core/type.ts +23 -23
  169. package/src/web/components/chart/common/echart.css +12 -12
  170. package/src/web/components/chart/common/echarts.ts +3 -5
  171. package/src/web/components/chart/common/useChart.tsx +34 -16
  172. package/src/web/components/container/index.tsx +3 -4
  173. package/src/web/components/drawer/index.tsx +15 -4
  174. package/src/web/components/form/checkbox/index.tsx +32 -31
  175. package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -2
  176. package/src/web/components/form/form/index.css +3 -6
  177. package/src/web/components/form/form/index.tsx +7 -6
  178. package/src/web/components/form/formcell/index.css +10 -4
  179. package/src/web/components/form/formcell/index.tsx +3 -7
  180. package/src/web/components/form/input/index.css +4 -4
  181. package/src/web/components/form/input/index.tsx +61 -53
  182. package/src/web/components/form/location/common/selectModal.jsx +2 -11
  183. package/src/web/components/form/location/common/useLocationInfo.js +4 -0
  184. package/src/web/components/form/location/components/LocationH5/index.css +0 -1
  185. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +11 -1
  186. package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -13
  187. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +14 -5
  188. package/src/web/components/form/radio/index.tsx +32 -26
  189. package/src/web/components/form/renderDecorator.tsx +23 -26
  190. package/src/web/components/form/select/h5.tsx +154 -103
  191. package/src/web/components/form/select/index.css +9 -3
  192. package/src/web/components/form/select/index.tsx +75 -48
  193. package/src/web/components/form/select/region/index.ts +101 -80
  194. package/src/web/components/form/select/year.tsx +2 -0
  195. package/src/web/components/form/switch/index.tsx +40 -40
  196. package/src/web/components/form/textarea/index.css +4 -0
  197. package/src/web/components/form/textarea/index.tsx +27 -26
  198. package/src/web/components/form/types.d.ts +10 -10
  199. package/src/web/components/form/uploader/uploader.h5.tsx +26 -20
  200. package/src/web/components/form/uploaderFile/index.jsx +0 -5
  201. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +15 -11
  202. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +14 -9
  203. package/src/web/components/image/image.tsx +2 -2
  204. package/src/web/components/image/index.css +9 -7
  205. package/src/web/components/image/index.tsx +29 -12
  206. package/src/web/components/index.js +1 -0
  207. package/src/web/components/link/index.tsx +13 -13
  208. package/src/web/components/lottery/index.css +43 -37
  209. package/src/web/components/lottery/index.tsx +2 -2
  210. package/src/web/components/modal/index.tsx +34 -34
  211. package/src/web/components/navLayout/index.tsx +1 -1
  212. package/src/web/components/navigationBar/index.tsx +2 -2
  213. package/src/web/components/picker/datePicker.tsx +3 -3
  214. package/src/web/components/picker/picker.tsx +3 -3
  215. package/src/web/components/picker/timePicker.tsx +1 -1
  216. package/src/web/components/richText/index.jsx +41 -46
  217. package/src/web/components/richTextView/index.tsx +4 -6
  218. package/src/web/components/scrollView/index.tsx +2 -2
  219. package/src/web/components/slot/index.tsx +3 -4
  220. package/src/web/components/swiper/index.css +1 -1
  221. package/src/web/components/swiper/index.tsx +33 -15
  222. package/src/web/components/tabs/index.css +1 -1
  223. package/src/web/components/tabs/index.tsx +6 -6
  224. package/src/web/components/tabs/tabs.h5.tsx +17 -12
  225. package/src/web/components/tabs/tabs.pc.tsx +45 -34
  226. package/src/web/components/text/index.css +1 -1
  227. package/src/web/components/text/index.tsx +13 -14
  228. package/src/web/components/wedaVideo/index.css +42 -0
  229. package/src/web/components/wedaVideo/index.tsx +198 -0
  230. package/src/web/utils/constant.ts +2 -1
  231. package/src/web/utils/isObjectEqual.js +2 -1
  232. package/src/web/utils/loading-fallback.tsx +2 -2
  233. package/src/web/utils/lodash.ts +1 -1
  234. package/src/web/utils/useSetState.ts +6 -2
  235. package/src/web/weda-ui.css +17 -0
@@ -10,7 +10,6 @@
10
10
 
11
11
  支持灵活定义各个导航项目的图标文字内容、跳转交互、PC/移动多端列数和各项细致完备的样式属性![](https://qcloudimg.tencent-cloud.cn/raw/85be8cc619042f1e16f58e4015ee0e67.png)
12
12
 
13
-
14
13
  ## 属性介绍
15
14
 
16
15
  import TableLayoutView from '../../common/tableView';
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## 使用说明
10
10
 
11
- 通过组件配置区即可快速实现Tab栏的实现,Tab栏除了基础的标题、图标配置外也可以通过配置区快速的实现页面跳转逻辑。
11
+ 通过组件配置区即可快速实现 Tab 栏的实现,Tab 栏除了基础的标题、图标配置外也可以通过配置区快速的实现页面跳转逻辑。
12
12
 
13
13
  ### 设置选中页面
14
14
 
@@ -16,11 +16,11 @@
16
16
 
17
17
  ![](https://qcloudimg.tencent-cloud.cn/raw/291b8e10bd0efd58add639e2aae6d700.png)
18
18
 
19
- 2. 随后为第一个Tab进行跳转页面-首页的相关配置
19
+ 2. 随后为第一个 Tab 进行跳转页面-首页的相关配置
20
20
 
21
21
  ![](https://qcloudimg.tencent-cloud.cn/raw/904e0f94800150671ac0bc7fc149f3d5.png)
22
22
 
23
- 3. 可以看到,因为Tab的跳转页面与步骤1中设置的选中页面相同,该Tab的标题与图标便会变为激活状态。
23
+ 3. 可以看到,因为 Tab 的跳转页面与步骤 1 中设置的选中页面相同,该 Tab 的标题与图标便会变为激活状态。
24
24
 
25
25
  ![](https://qcloudimg.tencent-cloud.cn/raw/a2b7c6f347ab8889bdcefdb7a80702fa.png)
26
26
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## 使用说明
10
10
 
11
- 用于放置于Tab栏组件的插槽中使用
11
+ 用于放置于 Tab 栏组件的插槽中使用
12
12
 
13
13
  ## 属性介绍
14
14
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  ## 使用说明
10
10
 
11
- 1. 奖品配置,支持手动配置和数据源配置,最多支持8个奖品,不足8个奖品会有占位图显示,超过8个的无效。
11
+ 1. 奖品配置,支持手动配置和数据源配置,最多支持 8 个奖品,不足 8 个奖品会有占位图显示,超过 8 个的无效。
12
12
 
13
13
  手动配置:
14
14
 
@@ -18,9 +18,9 @@
18
18
 
19
19
  ![https://qcloudimg.tencent-cloud.cn/raw/d93012934fbb222dbafbf7e3bb981260.png](https://qcloudimg.tencent-cloud.cn/raw/d93012934fbb222dbafbf7e3bb981260.png)
20
20
 
21
- 2. 设置启动抽奖为开始开关,如果设置为关闭则不会触发抽奖动作,抽奖过程成如果绑定数据源返回false,立马停止。
21
+ 2. 设置启动抽奖为开始开关,如果设置为关闭则不会触发抽奖动作,抽奖过程成如果绑定数据源返回 false,立马停止。
22
22
 
23
- 3. 设置抽奖希望的结果,支持1-8,从左上角第一个奖品位置开始为1,2,3……的奖品顺序,
23
+ 3. 设置抽奖希望的结果,支持 1-8,从左上角第一个奖品位置开始为 1,2,3……的奖品顺序,
24
24
 
25
25
  4. 点击开始抽奖页面,触发抽奖动画,开始后收到绑定数据抽奖的结果后动画逐渐停止,并且显示中奖的位置,如果收不到则超时后自动停止动画。
26
26
 
@@ -43,6 +43,3 @@ import TableLayoutView from '../../common/tableView';
43
43
  type="event"
44
44
  origin="sourceCode"
45
45
  ></TableLayoutView>
46
-
47
-
48
-
@@ -14,7 +14,7 @@
14
14
 
15
15
  在实际应用搭建过程中,我们经常会遇到点击按钮后弹出弹窗的场景,实现方式如下:
16
16
 
17
- 1. 创建一个boolean类型的普通变量,并将默认值设置为false
17
+ 1. 创建一个 boolean 类型的普通变量,并将默认值设置为 false
18
18
 
19
19
  ![](https://qcloudimg.tencent-cloud.cn/raw/d0936c280bf26e86b192228eabe0d6ba.png)
20
20
 
@@ -34,11 +34,10 @@
34
34
 
35
35
  ![](https://qcloudimg.tencent-cloud.cn/raw/07e104490813cfe2b36a98d46da67d96.png)
36
36
 
37
- 弹窗组件同样需要通过变量实现关闭,实现方式与上文相似,通过弹窗的close事件进行变量赋值,实现弹窗的关闭
37
+ 弹窗组件同样需要通过变量实现关闭,实现方式与上文相似,通过弹窗的 close 事件进行变量赋值,实现弹窗的关闭
38
38
 
39
39
  ![](https://qcloudimg.tencent-cloud.cn/raw/bce3e0097b032eafb9f4369561cf726f.png)
40
40
 
41
-
42
41
  ## 属性介绍
43
42
 
44
43
  import TableLayoutView from '../../common/tableView';
@@ -10,7 +10,7 @@
10
10
 
11
11
  ### 点击按钮实现抽奖机滚动
12
12
 
13
- 1. 创建一个boolean类型的普通变量,并将初始值设为false
13
+ 1. 创建一个 boolean 类型的普通变量,并将初始值设为 false
14
14
 
15
15
  ![](https://qcloudimg.tencent-cloud.cn/raw/ed5449e3a45eb731829250a660f85233.png)
16
16
 
@@ -18,13 +18,11 @@
18
18
 
19
19
  ![](https://qcloudimg.tencent-cloud.cn/raw/91ab3e5aabdbf866c381c209c1bcdd66.png)
20
20
 
21
-
22
-
23
21
  3. 在抽奖机的组件配置区中将"立即开始滚动"绑定刚刚刚刚创建的模型变量并且将"刷新后重置"配置项开启
24
22
 
25
23
  ![](https://qcloudimg.tencent-cloud.cn/raw/f5ae5c3482111168be601f4eb0609257.png)
26
24
 
27
- 4. 为按钮组件配置点击时变量赋值的事件,将控制滚动的变量赋值为true,如下图所示
25
+ 4. 为按钮组件配置点击时变量赋值的事件,将控制滚动的变量赋值为 true,如下图所示
28
26
 
29
27
  ![](https://qcloudimg.tencent-cloud.cn/raw/05165c2b7b15309909aaf6e36129a3f9.png)
30
28
 
@@ -32,7 +30,6 @@
32
30
 
33
31
  ![](https://qcloudimg.tencent-cloud.cn/raw/00e6ef563e9b1a94d9a22b05fd98ac2c.png)
34
32
 
35
-
36
33
  ## 属性介绍
37
34
 
38
35
  import TableLayoutView from '../../common/tableView';
@@ -1 +1 @@
1
- { "label": "高级", "position": 70}
1
+ { "label": "高级", "position": 70 }
@@ -10,7 +10,6 @@
10
10
 
11
11
  支持灵活定义各个卡片的图片内容、跳转交互、PC/移动多端列数和各项细致完备的样式属性![](https://qcloudimg.tencent-cloud.cn/raw/b8f17cb3082fae4c432b2ff6646906a5.png)
12
12
 
13
-
14
13
  ## 属性介绍
15
14
 
16
15
  import TableLayoutView from '../../common/tableView';
@@ -12,7 +12,6 @@
12
12
 
13
13
  ![](https://qcloudimg.tencent-cloud.cn/raw/a2c76cf309c1b2146fbccc4a473ceaae.png)
14
14
 
15
-
16
15
  ## 属性介绍
17
16
 
18
17
  import TableLayoutView from '../../common/tableView';
@@ -21,6 +21,7 @@
21
21
  1. 点击配置区的**绑定数据源**按钮,进入数据源绑定模式![](https://qcloudimg.tencent-cloud.cn/raw/f22a5edf1163c5fc247ead58c8152c58.png)
22
22
 
23
23
  2. 推荐绑定以下格式的变量以实现从数据模型中获取列表数据
24
+
24
25
  1. 变量类型:模型变量
25
26
  2. 变量初始化方法:查询列表-内置
26
27
  3. 绑定节点![](https://qcloudimg.tencent-cloud.cn/raw/113fbd81692a6c2f144a10fd0df69940.png)
@@ -8,17 +8,16 @@
8
8
 
9
9
  ## 使用说明
10
10
 
11
- 使用选项卡组件可以实现页面的Tab切换效果,当在组件配置区点击新增选项卡标签时,在大纲树中会生成对应的**内容插槽**,我们可以通过在内容插槽中放置对应组件实现不同Tab的的内容构建,以下文为例:
11
+ 使用选项卡组件可以实现页面的 Tab 切换效果,当在组件配置区点击新增选项卡标签时,在大纲树中会生成对应的**内容插槽**,我们可以通过在内容插槽中放置对应组件实现不同 Tab 的的内容构建,以下文为例:
12
12
 
13
13
  1. 在选项卡的两个内容插槽中分别添加两个文本组件,并为两个文本组件设置不同的内容
14
14
 
15
15
  ![](https://qcloudimg.tencent-cloud.cn/raw/3c658b5899774da254d48c4098e4fa1e.png)
16
16
 
17
- 2. 可以看到,当进行Tab切换时,不同的Tab便呈现出了不同的文本组件内容
17
+ 2. 可以看到,当进行 Tab 切换时,不同的 Tab 便呈现出了不同的文本组件内容
18
18
 
19
19
  ![](https://qcloudimg.tencent-cloud.cn/raw/e9a778473b16f915f72a075fb69625b5.png)
20
20
 
21
-
22
21
  ## 属性介绍
23
22
 
24
23
  import TableLayoutView from '../../common/tableView';
@@ -40,4 +40,4 @@ import TableLayoutView from '../../common/tableView';
40
40
 
41
41
  ## 限制说明
42
42
 
43
- 由于小程序仅支持通过webview组件的方式进行外部链接的跳转,因此链接组件不支持在小程序中进行构建使用。
43
+ 由于小程序仅支持通过 webview 组件的方式进行外部链接的跳转,因此链接组件不支持在小程序中进行构建使用。
@@ -8,11 +8,10 @@
8
8
 
9
9
  ## 使用说明
10
10
 
11
- 富文本展示组件支持对html语言进行渲染,在组件配置区中输入html语言即可实现自定义的页面展示效果。
11
+ 富文本展示组件支持对 html 语言进行渲染,在组件配置区中输入 html 语言即可实现自定义的页面展示效果。
12
12
 
13
13
  ![](https://qcloudimg.tencent-cloud.cn/raw/2e6e0921ec02486e38cb62cc073989da.png)
14
14
 
15
-
16
15
  ## 属性介绍
17
16
 
18
17
  import TableLayoutView from '../../common/tableView';
@@ -7,11 +7,11 @@
7
7
  ></TableLayoutView>
8
8
 
9
9
  ## 使用说明
10
+
10
11
  文本组件可以用于在页面中对文本内容进行基础的展示,通过在配置区可以对文本的样式属性进行自定义的调整。
11
12
 
12
13
  ![](https://qcloudimg.tencent-cloud.cn/raw/53e93064ccaf7f6d08889405a5392b04.png)
13
14
 
14
-
15
15
  ## 属性介绍
16
16
 
17
17
  import TableLayoutView from '../../common/tableView';
@@ -7,12 +7,11 @@
7
7
  ></TableLayoutView>
8
8
 
9
9
  ## 使用说明
10
+
10
11
  标题组件自带不同的标题级别属性,对编辑区进行简单的配置后即可在页面实现不同的标题层级展示。
11
12
 
12
13
  ![](https://qcloudimg.tencent-cloud.cn/raw/d83d5bbf384a113a4c20371b61cd50f4.png)
13
14
 
14
-
15
-
16
15
  ## 属性介绍
17
16
 
18
17
  import TableLayoutView from '../../common/tableView';
@@ -22,7 +22,7 @@
22
22
 
23
23
  ![](https://qcloudimg.tencent-cloud.cn/raw/5bd62e877d0a5805368ca55633627403.png)
24
24
 
25
- 4.为获取手机号组件配置变量赋值事件,实现当用户授权成功后将返回的手机号信息赋值给步骤3中的普通变量。
25
+ 4.为获取手机号组件配置变量赋值事件,实现当用户授权成功后将返回的手机号信息赋值给步骤 3 中的普通变量。
26
26
 
27
27
  ![](https://qcloudimg.tencent-cloud.cn/raw/98e456ef06ee76e138dcc13d03705f33.png)
28
28
 
@@ -34,7 +34,6 @@
34
34
 
35
35
  ![](https://qcloudimg.tencent-cloud.cn/raw/1b4c8a656ae0298534e9f5c2749c9b04.png)
36
36
 
37
-
38
37
  ## 组件使用限制
39
38
 
40
39
  1.该组件仅支持在小程序端使用,并且小程序必须为**企业主体**。
@@ -22,7 +22,6 @@
22
22
 
23
23
  ![](https://qcloudimg.tencent-cloud.cn/raw/5f9add0024c8cb8f65464a4700a12652.png)
24
24
 
25
-
26
25
  ## 组件使用限制
27
26
 
28
27
  1.该组件必须在小程序真实环境使用才能够看到实际效果。
@@ -22,7 +22,7 @@
22
22
 
23
23
  ![](https://qcloudimg.tencent-cloud.cn/raw/1dd6a703ff51f0fe45059fdb504d25ff.png)
24
24
 
25
- 4.为获取用户信息组件配置变量赋值事件,实现当用户授权成功后将返回的用户信息赋值给步骤3中的普通变量。
25
+ 4.为获取用户信息组件配置变量赋值事件,实现当用户授权成功后将返回的用户信息赋值给步骤 3 中的普通变量。
26
26
 
27
27
  ![](https://qcloudimg.tencent-cloud.cn/raw/ed12e3858ffba97f9ecbae7557ed03db.png)
28
28
 
@@ -34,7 +34,6 @@
34
34
 
35
35
  ![](https://qcloudimg.tencent-cloud.cn/raw/7aa344e9347a894975598ba1ab7b987e.png)
36
36
 
37
-
38
37
  ## 组件使用限制
39
38
 
40
39
  1.该组件必须在小程序真实环境使用才能够看到实际效果。
@@ -58,7 +58,7 @@ Component({
58
58
  },
59
59
  appParameter: {
60
60
  type: String,
61
- }
61
+ },
62
62
  },
63
63
  data: {
64
64
  cls: '',
@@ -1,22 +1,22 @@
1
1
  <button
2
- class="{{cls}}"
3
- style="{{style}}"
4
- size="{{size}}"
5
- loading="{{loading}}"
6
- disabled="{{disabled}}"
7
- open-type="{{openType}}"
8
- form-type="{{formType}}"
9
- bind:tap="tap"
10
- bindcontact="contact"
11
- bindlaunchapp="launchApp"
12
- bindopensetting="openSetting"
13
- session-from="{{sessionFrom}}"
14
- send-message-title="{{sendMessageTitle}}"
15
- send-message-path="{{sendMessagePath}}"
16
- send-message-img="{{sendMessageImg}}"
17
- show-message-card="{{showMessageCard}}"
18
- app-parameter="{{appParameter}}"
2
+ class="{{cls}}"
3
+ style="{{style}}"
4
+ size="{{size}}"
5
+ loading="{{loading}}"
6
+ disabled="{{disabled}}"
7
+ open-type="{{openType}}"
8
+ form-type="{{formType}}"
9
+ bind:tap="tap"
10
+ bindcontact="contact"
11
+ bindlaunchapp="launchApp"
12
+ bindopensetting="openSetting"
13
+ session-from="{{sessionFrom}}"
14
+ send-message-title="{{sendMessageTitle}}"
15
+ send-message-path="{{sendMessagePath}}"
16
+ send-message-img="{{sendMessageImg}}"
17
+ show-message-card="{{showMessageCard}}"
18
+ app-parameter="{{appParameter}}"
19
19
  >
20
- <block>{{text ? text : ''}}</block>
21
- <slot name="contentSlot" wx:if="{{!text}}" />
20
+ <block>{{text ? text : ''}}</block>
21
+ <slot name="contentSlot" wx:if="{{!text}}" />
22
22
  </button>
@@ -7,27 +7,27 @@ Component({
7
7
  properties: {
8
8
  className: {
9
9
  type: String,
10
- value: ''
10
+ value: '',
11
11
  },
12
12
  style: {
13
13
  type: Object,
14
- value: {}
14
+ value: {},
15
15
  },
16
16
  // 控制器显示隐藏
17
17
  initVisible: {
18
18
  type: String,
19
- value: 'true'
19
+ value: 'true',
20
20
  },
21
21
  // 初始化日历值
22
22
  initValue: {
23
23
  type: String,
24
- value: ''
24
+ value: '',
25
25
  },
26
26
  // 展示配置
27
27
  configData: {
28
28
  type: Array,
29
29
  value: [],
30
- }
30
+ },
31
31
  },
32
32
  /** 页面的初始数据 */
33
33
  data: {
@@ -45,18 +45,17 @@ Component({
45
45
  year: 0,
46
46
  month: 0,
47
47
  datalist: [],
48
- headerlist: []
48
+ headerlist: [],
49
49
  },
50
50
 
51
51
  lifetimes: {
52
- created: function () {
53
- },
52
+ created: function () {},
54
53
  attached: function () {
55
- const {initVisible, initValue} = this.properties;
56
- const {firstDayOfWeek, initFormat} = this.data;
54
+ const { initVisible, initValue } = this.properties;
55
+ const { firstDayOfWeek, initFormat } = this.data;
57
56
  if (initVisible !== null) {
58
57
  this.setData({
59
- visible: initVisible
58
+ visible: initVisible,
60
59
  });
61
60
  }
62
61
  if (initValue !== null && initValue !== '') {
@@ -67,8 +66,14 @@ Component({
67
66
  value,
68
67
  year,
69
68
  month,
70
- datalist: this.getDateLis(year, month, firstDayOfWeek, value, initFormat),
71
- headerlist: this.colHeaderList()
69
+ datalist: this.getDateLis(
70
+ year,
71
+ month,
72
+ firstDayOfWeek,
73
+ value,
74
+ initFormat
75
+ ),
76
+ headerlist: this.colHeaderList(),
72
77
  });
73
78
  } else {
74
79
  const _dayjsDate = dayjs(dayjs().format('YYYY-MM-DD'));
@@ -79,16 +84,28 @@ Component({
79
84
  value,
80
85
  year,
81
86
  month,
82
- datalist: this.getDateLis(year, month, firstDayOfWeek, value, initFormat),
83
- headerlist: this.colHeaderList()
87
+ datalist: this.getDateLis(
88
+ year,
89
+ month,
90
+ firstDayOfWeek,
91
+ value,
92
+ initFormat
93
+ ),
94
+ headerlist: this.colHeaderList(),
84
95
  });
85
96
  }
86
- }
97
+ },
87
98
  },
88
99
  methods: {
89
100
  // 传入参数,修改展示列表
90
101
  getDateLis: function (year, month, firstDayOfWeek, value, initFormat) {
91
- const datalist = this.createDateList(year, month, firstDayOfWeek, value, initFormat);
102
+ const datalist = this.createDateList(
103
+ year,
104
+ month,
105
+ firstDayOfWeek,
106
+ value,
107
+ initFormat
108
+ );
92
109
  return this._dataList(datalist);
93
110
  },
94
111
  // 获取一个日期是周几(1~7)
@@ -100,13 +117,7 @@ Component({
100
117
  return day;
101
118
  },
102
119
  // 获取日期数组
103
- createDateList: function (
104
- year,
105
- month,
106
- firstDayOfWeek,
107
- value,
108
- initFormat
109
- ) {
120
+ createDateList: function (year, month, firstDayOfWeek, value, initFormat) {
110
121
  const createCellData = (belongTo, isCurrent, date, weekOrder) => {
111
122
  const day = this.getDay(date);
112
123
  return {
@@ -132,7 +143,8 @@ Component({
132
143
 
133
144
  // 添加上个月中会在本月显示的最后几天日期
134
145
  // getDay(monthFirstDay.toDate()) 获取每月第一天是周几
135
- const lastMonthDaysCount = (this.getDay(monthFirstDay.toDate()) - firstDayOfWeek + 7) % 7;
146
+ const lastMonthDaysCount =
147
+ (this.getDay(monthFirstDay.toDate()) - firstDayOfWeek + 7) % 7;
136
148
  for (let i = 0; i < lastMonthDaysCount; i++) {
137
149
  // 获取显示在当前月的日历中,上月日期数据
138
150
  // monthFirstDay.subtract(num, 'day' | 'month' | 'year') 表示以当月第一天日期为基准,在 日|月|年 数字上减去num
@@ -144,7 +156,9 @@ Component({
144
156
  const monthDaysCount = monthFirstDay.endOf('month').daysInMonth();
145
157
  for (let i = 0; i < monthDaysCount; i++) {
146
158
  const dayObj = monthFirstDay.add(i, 'day');
147
- list.push(createCellData(0, value.isSame(dayObj), dayObj.toDate(), weekCount));
159
+ list.push(
160
+ createCellData(0, value.isSame(dayObj), dayObj.toDate(), weekCount)
161
+ );
148
162
  if (list.length === 7) {
149
163
  rowList.push(list);
150
164
  list = [];
@@ -168,17 +182,18 @@ Component({
168
182
  },
169
183
  // 混合数据
170
184
  _dataList: function (configList) {
171
- const {configData} = this.properties;
185
+ const { configData } = this.properties;
172
186
  const _map = new Map();
173
187
  for (const item of configData) {
174
188
  _map.set(item.matchDate, item);
175
189
  }
176
- return configList.map(item => {
190
+ return configList.map((item) => {
177
191
  return item.reduce((res, i) => {
178
192
  if (_map.has(i.formattedDate)) {
179
193
  const _disabled = _map.get(i.formattedDate)['disabled'];
180
194
  const _marked = _map.get(i.formattedDate)['marked'];
181
- i['disabled'] = _disabled !== undefined ? JSON.parse(_disabled) : false;
195
+ i['disabled'] =
196
+ _disabled !== undefined ? JSON.parse(_disabled) : false;
182
197
  i['marked'] = _marked;
183
198
  }
184
199
  res.push(i);
@@ -188,7 +203,7 @@ Component({
188
203
  },
189
204
  // 表头数组
190
205
  colHeaderList: function () {
191
- const {week, firstDayOfWeek, isShowWeekend} = this.data;
206
+ const { week, firstDayOfWeek, isShowWeekend } = this.data;
192
207
  const list = [];
193
208
  for (let i = firstDayOfWeek; i <= 7; i++) {
194
209
  if (!isShowWeekend && i > 5) {
@@ -214,25 +229,37 @@ Component({
214
229
  },
215
230
  // 上一个月
216
231
  handlePrevMonth: function () {
217
- const {year, month, firstDayOfWeek, value, initFormat} = this.data;
232
+ const { year, month, firstDayOfWeek, value, initFormat } = this.data;
218
233
  const _month = month == 1 ? 12 : month - 1;
219
234
  const _year = month === 1 ? year - 1 : year;
220
235
  this.setData({
221
236
  year: _year,
222
237
  month: _month,
223
- datalist: this.getDateLis(_year, _month, firstDayOfWeek, value, initFormat)
238
+ datalist: this.getDateLis(
239
+ _year,
240
+ _month,
241
+ firstDayOfWeek,
242
+ value,
243
+ initFormat
244
+ ),
224
245
  });
225
246
  },
226
247
  // 下一个月
227
248
  handleNextMonth: function () {
228
- const {year, month, firstDayOfWeek, value, initFormat} = this.data;
249
+ const { year, month, firstDayOfWeek, value, initFormat } = this.data;
229
250
  const _month = month == 12 ? 1 : month + 1;
230
251
  const _year = month === 12 ? year + 1 : year;
231
252
  this.setData({
232
253
  year: _year,
233
254
  month: _month,
234
- datalist: this.getDateLis(_year, _month, firstDayOfWeek, value, initFormat)
235
- });
236
- }
255
+ datalist: this.getDateLis(
256
+ _year,
257
+ _month,
258
+ firstDayOfWeek,
259
+ value,
260
+ initFormat
261
+ ),
262
+ });
263
+ },
237
264
  },
238
- });
265
+ });
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "component": true,
3
3
  "usingComponents": {}
4
- }
4
+ }
@@ -1,20 +1,18 @@
1
1
  <view class="{{className}} weda-calendar ext-class">
2
2
  <view class="weda-calendar__control">
3
3
  <view class="weda-calendar__prevMonth" wx:if="{{visible}}" bindtap="handlePrevMonth">
4
- <image class="weda-calendar__prevMonth-icon" src='arrowright--line.svg' />
4
+ <image class="weda-calendar__prevMonth-icon" src="arrowright--line.svg" />
5
5
  </view>
6
6
  <view class="weda-calendar__current-date">{{year}}年{{month}}月</view>
7
7
  <view class="weda-calendar__nextMonth" wx:if="{{visible}}" bindtap="handleNextMonth">
8
- <image class="weda-calendar__nextMonth-icon" src='arrowright--line.svg' />
8
+ <image class="weda-calendar__nextMonth-icon" src="arrowright--line.svg" />
9
9
  </view>
10
10
  </view>
11
11
  <view class="weda-calendar__panel">
12
12
  <view class="weda-calendar__table">
13
13
  <view class="weda-calendar__table-head">
14
14
  <view class="weda-calendar__table-head-row">
15
- <view class="weda-calendar__table-head-cell" wx:for="{{headerlist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
16
- {{item.text}}
17
- </view>
15
+ <view class="weda-calendar__table-head-cell" wx:for="{{headerlist}}" wx:for-index="index" wx:for-item="item" wx:key="index"> {{item.text}} </view>
18
16
  </view>
19
17
  </view>
20
18
  <view class="weda-calendar__table-body">
@@ -34,4 +32,4 @@
34
32
  </view>
35
33
  </view>
36
34
  </view>
37
- </view>
35
+ </view>
@@ -2,6 +2,6 @@
2
2
  "component": true,
3
3
  "styleIsolation": "shared",
4
4
  "usingComponents": {
5
- "Img":"../image"
5
+ "img": "../image"
6
6
  }
7
7
  }
@@ -1,6 +1,6 @@
1
1
  <!--components/carousel/index.wxml-->
2
2
  <swiper id="{{id}}" class="weda-ui {{className}}" style="{{style}}" indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current="{{current}}" interval="{{interval}}" duration="{{duration}}" circular="{{circular}}" vertical="{{vertical}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{indicatorActiveColor}}" bindchange="changeCurrent">
3
- <swiper-item class="carousle-swiper-item" bindtap="tapImg" wx:for="{{images}}" wx:key="index" data-tapMode="{{item.tapMode}}" data-insideUrl="{{item.insideUrl}}" data-params="{{item.params}}" >
4
- <Img class="carousle-image" src="{{item.image}}" fit="{{item.fit}}" style="{{'height:'+item.height+';'+'width:'+item.width}}" />
3
+ <swiper-item class="carousle-swiper-item" bindtap="tapImg" wx:for="{{images}}" wx:key="index" data-tapMode="{{item.tapMode}}" data-insideUrl="{{item.insideUrl}}" data-params="{{item.params}}">
4
+ <img class="carousle-image" src="{{item.image}}" fit="{{item.fit}}" style="{{'height:'+item.height+';'+'width:'+item.width}}" />
5
5
  </swiper-item>
6
6
  </swiper>
@@ -195,7 +195,6 @@ Component({
195
195
  type: String,
196
196
  value: '',
197
197
  },
198
-
199
198
  },
200
199
  data: {
201
200
  ec: {},
@@ -223,7 +222,7 @@ Component({
223
222
  },
224
223
  observers: {
225
224
  // 当参数变化时
226
- '**': async function() {
225
+ '**': async function () {
227
226
  const objEChartBar = new EchartBar();
228
227
  await objEChartBar.setOptions(this.properties);
229
228
  const options = await objEChartBar.getOptions();
@@ -1,3 +1,3 @@
1
1
  <view wx:if="ec" class="{{className}} ec_container" style="{{style}}" id="{{id}}">
2
- <ec-canvas canvas-id="{{canvas_id}}" ec="{{ ec }}"></ec-canvas>
2
+ <ec-canvas canvas-id="{{canvas_id}}" ec="{{ ec }}"></ec-canvas>
3
3
  </view>
@@ -13,7 +13,7 @@ const getConfig = () => {
13
13
  },
14
14
  type: 'category',
15
15
  data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
16
- inverse:false,
16
+ inverse: false,
17
17
  },
18
18
  yAxis: {
19
19
  type: 'value',