@cloudbase/weda-ui 0.2.17 → 2.0.8

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 (269) hide show
  1. package/README.md +3 -0
  2. package/package.json +10 -5
  3. package/src/configs/components/button.json +0 -2
  4. package/src/configs/components/calendar.json +9 -3
  5. package/src/configs/components/carousel.json +18 -9
  6. package/src/configs/components/chart/bar.json +31 -12
  7. package/src/configs/components/chart/line.json +27 -10
  8. package/src/configs/components/chart/pie.json +22 -8
  9. package/src/configs/components/chart/statisticsCard.json +61 -13
  10. package/src/configs/components/container.json +7 -2
  11. package/src/configs/components/dataView.json +31 -11
  12. package/src/configs/components/form/checkbox.json +97 -5
  13. package/src/configs/components/form/radio.json +123 -4
  14. package/src/configs/components/form/select.json +247 -13
  15. package/src/configs/components/graphicCard.json +90 -75
  16. package/src/configs/components/image.json +19 -8
  17. package/src/configs/components/link.json +25 -6
  18. package/src/configs/components/listView.json +83 -27
  19. package/src/configs/components/lottery.json +153 -0
  20. package/src/configs/components/modal.json +37 -5
  21. package/src/configs/components/navLayout.json +97 -79
  22. package/src/configs/components/navigationBar.json +59 -0
  23. package/src/configs/components/richtextview.json +6 -2
  24. package/src/configs/components/scrollVeiw.json +98 -34
  25. package/src/configs/components/swiper.json +22 -10
  26. package/src/configs/components/tabs.json +54 -9
  27. package/src/configs/components/text.json +43 -30
  28. package/src/configs/components/wxOpenApi/phone.json +141 -0
  29. package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
  30. package/src/configs/components/wxOpenApi/share.json +167 -0
  31. package/src/configs/components/wxOpenApi/userInfo.json +174 -0
  32. package/src/configs/index.js +13 -0
  33. package/src/docs/common/format.tsx +112 -0
  34. package/src/docs/common/tableView.css +164 -0
  35. package/src/docs/common/tableView.tsx +273 -0
  36. package/src/docs/compsdocs/chart/Bar.mdx +159 -0
  37. package/src/docs/compsdocs/chart/Line.mdx +100 -0
  38. package/src/docs/compsdocs/chart/Pie.mdx +83 -0
  39. package/src/docs/compsdocs/chart/_category_.json +1 -0
  40. package/src/docs/compsdocs/chart/statisticsCard.mdx +51 -0
  41. package/src/docs/compsdocs/database/DataView.mdx +33 -0
  42. package/src/docs/compsdocs/database/ListView.mdx +33 -0
  43. package/src/docs/compsdocs/database/_category_.json +1 -0
  44. package/src/docs/compsdocs/form/Form.mdx +35 -0
  45. package/src/docs/compsdocs/form/FormCheckbox.mdx +35 -0
  46. package/src/docs/compsdocs/form/FormDate.mdx +30 -0
  47. package/src/docs/compsdocs/form/FormEmail.mdx +30 -0
  48. package/src/docs/compsdocs/form/FormImageUploader.mdx +31 -0
  49. package/src/docs/compsdocs/form/FormInput.mdx +30 -0
  50. package/src/docs/compsdocs/form/FormLocation.mdx +64 -0
  51. package/src/docs/compsdocs/form/FormPhone.mdx +30 -0
  52. package/src/docs/compsdocs/form/FormRadio.mdx +35 -0
  53. package/src/docs/compsdocs/form/FormRegion.mdx +30 -0
  54. package/src/docs/compsdocs/form/FormSelect.mdx +36 -0
  55. package/src/docs/compsdocs/form/FormSwitch.mdx +30 -0
  56. package/src/docs/compsdocs/form/FormTextarea.mdx +30 -0
  57. package/src/docs/compsdocs/form/FormTime.mdx +30 -0
  58. package/src/docs/compsdocs/form/FormUploadFile.mdx +30 -0
  59. package/src/docs/compsdocs/form/FormUrl.mdx +30 -0
  60. package/src/docs/compsdocs/form/_category_.json +1 -0
  61. package/src/docs/compsdocs/grid/Card.mdx +32 -0
  62. package/src/docs/compsdocs/grid/Container.mdx +42 -0
  63. package/src/docs/compsdocs/grid/Footer.mdx +31 -0
  64. package/src/docs/compsdocs/grid/GridLayout.mdx +32 -0
  65. package/src/docs/compsdocs/grid/Header.mdx +31 -0
  66. package/src/docs/compsdocs/grid/Layout.mdx +25 -0
  67. package/src/docs/compsdocs/grid/List.mdx +31 -0
  68. package/src/docs/compsdocs/grid/ScrollView.mdx +37 -0
  69. package/src/docs/compsdocs/grid/Swiper.mdx +58 -0
  70. package/src/docs/compsdocs/grid/_category_.json +1 -0
  71. package/src/docs/compsdocs/media/Icon.mdx +31 -0
  72. package/src/docs/compsdocs/media/Image.mdx +55 -0
  73. package/src/docs/compsdocs/media/_category_.json +1 -0
  74. package/src/docs/compsdocs/model/ModelCreate.mdx +20 -0
  75. package/src/docs/compsdocs/model/ModelDetail.mdx +20 -0
  76. package/src/docs/compsdocs/model/ModelTable.mdx +24 -0
  77. package/src/docs/compsdocs/model/ModelUpdate.mdx +21 -0
  78. package/src/docs/compsdocs/model/PageLayout.mdx +21 -0
  79. package/src/docs/compsdocs/model/_category_.json +1 -0
  80. package/src/docs/compsdocs/navmenu/Classification.mdx +38 -0
  81. package/src/docs/compsdocs/navmenu/NavBar.mdx +43 -0
  82. package/src/docs/compsdocs/navmenu/NavLayout.mdx +30 -0
  83. package/src/docs/compsdocs/navmenu/TabBar.mdx +43 -0
  84. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +29 -0
  85. package/src/docs/compsdocs/navmenu/_category_.json +1 -0
  86. package/src/docs/compsdocs/senior/Lottery.mdx +48 -0
  87. package/src/docs/compsdocs/senior/Modal.mdx +58 -0
  88. package/src/docs/compsdocs/senior/SlotMachine.mdx +52 -0
  89. package/src/docs/compsdocs/senior/_category_.json +1 -0
  90. package/src/docs/compsdocs/show/Calendar.mdx +29 -0
  91. package/src/docs/compsdocs/show/Divider.mdx +31 -0
  92. package/src/docs/compsdocs/show/GraphicCard.mdx +30 -0
  93. package/src/docs/compsdocs/show/Item.mdx +32 -0
  94. package/src/docs/compsdocs/show/ItemList.mdx +47 -0
  95. package/src/docs/compsdocs/show/Media.mdx +25 -0
  96. package/src/docs/compsdocs/show/StatusTip.mdx +25 -0
  97. package/src/docs/compsdocs/show/Swiper.mdx +33 -0
  98. package/src/docs/compsdocs/show/Tabs.mdx +38 -0
  99. package/src/docs/compsdocs/show/_category_.json +1 -0
  100. package/src/docs/compsdocs/show/button.mdx +25 -0
  101. package/src/docs/compsdocs/text/Link.mdx +43 -0
  102. package/src/docs/compsdocs/text/RichTextView.mdx +36 -0
  103. package/src/docs/compsdocs/text/Text.mdx +31 -0
  104. package/src/docs/compsdocs/text/Title.mdx +32 -0
  105. package/src/docs/compsdocs/text/_category_.json +1 -0
  106. package/src/docs/compsdocs/wxOpen/Phone.mdx +60 -0
  107. package/src/docs/compsdocs/wxOpen/Share.mdx +46 -0
  108. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +60 -0
  109. package/src/docs/compsdocs/wxOpen/_category_.json +4 -0
  110. package/src/index.js +2 -0
  111. package/src/mp/components/button/index.js +18 -2
  112. package/src/mp/components/button/index.wxml +7 -4
  113. package/src/mp/components/chart/bar/index.js +6 -2
  114. package/src/mp/components/chart/common/core/eChartBar.js +9 -8
  115. package/src/mp/components/chart/common/core/eChartBase.js +20 -16
  116. package/src/mp/components/chart/common/core/eChartLine.js +6 -5
  117. package/src/mp/components/chart/line/index.js +10 -6
  118. package/src/mp/components/chart/pie/index.js +6 -2
  119. package/src/mp/components/chart/statisticsCard/index.js +33 -6
  120. package/src/mp/components/dataView/index.json +1 -1
  121. package/src/mp/components/form/checkbox/index.js +41 -2
  122. package/src/mp/components/form/checkbox/index.wxml +1 -1
  123. package/src/mp/components/form/form/index.wxml +1 -2
  124. package/src/mp/components/form/formcell/index.wxml +1 -1
  125. package/src/mp/components/form/formcell/index.wxss +17 -0
  126. package/src/mp/components/form/input/index.js +1 -1
  127. package/src/mp/components/form/input/index.wxss +15 -0
  128. package/src/mp/components/form/location/index.js +43 -2
  129. package/src/mp/components/form/location/index.wxss +4 -6
  130. package/src/mp/components/form/radio/index.js +34 -1
  131. package/src/mp/components/form/select/index.js +351 -41
  132. package/src/mp/components/form/select/index.wxml +17 -2
  133. package/src/mp/components/form/select/index.wxss +4 -0
  134. package/src/mp/components/form/select/region/index.js +101 -0
  135. package/src/mp/components/form/textarea/index.js +1 -1
  136. package/src/mp/components/form/textarea/index.wxss +4 -0
  137. package/src/mp/components/form/uploader/index.js +39 -27
  138. package/src/mp/components/form/uploader/index.json +3 -2
  139. package/src/mp/components/form/uploader/index.wxml +11 -7
  140. package/src/mp/components/form/uploader/index.wxss +20 -2
  141. package/src/mp/components/form/uploader/weui-uploader.js +209 -0
  142. package/src/mp/components/form/uploader/weui-uploader.json +7 -0
  143. package/src/mp/components/form/uploader/weui-uploader.wxml +45 -0
  144. package/src/mp/components/form/uploader/weui-uploader.wxss +1 -0
  145. package/src/mp/components/form/uploaderFile/index.js +10 -6
  146. package/src/mp/components/form/uploaderFile/index.wxss +4 -4
  147. package/src/mp/components/image/index.wxss +3 -2
  148. package/src/mp/components/listView/index.js +38 -43
  149. package/src/mp/components/listView/index.wxml +1 -1
  150. package/src/mp/components/listView/index.wxss +5 -0
  151. package/src/mp/components/lottery/index.js +270 -0
  152. package/src/mp/components/{internals/listView → lottery}/index.json +0 -0
  153. package/src/mp/components/lottery/index.wxml +43 -0
  154. package/src/mp/components/lottery/index.wxss +317 -0
  155. package/src/mp/components/navigationBar/index.js +193 -0
  156. package/src/mp/components/navigationBar/index.json +6 -0
  157. package/src/mp/components/navigationBar/index.wxml +88 -0
  158. package/src/mp/components/navigationBar/index.wxss +1257 -0
  159. package/src/mp/components/tabs/index.js +7 -2
  160. package/src/mp/components/tabs/index.wxml +2 -1
  161. package/src/mp/components/text/index.js +0 -25
  162. package/src/mp/components/text/index.wxml +3 -3
  163. package/src/mp/components/wxOpenApi/phone/index.js +117 -0
  164. package/src/mp/components/wxOpenApi/phone/index.json +4 -0
  165. package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
  166. package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
  167. package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
  168. package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
  169. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
  170. package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
  171. package/src/mp/components/wxOpenApi/share/index.js +117 -0
  172. package/src/mp/components/wxOpenApi/share/index.json +4 -0
  173. package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
  174. package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
  175. package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
  176. package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
  177. package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
  178. package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
  179. package/src/mp/index.json +7 -1
  180. package/src/mp/style/weda-ui.wxss +16 -0
  181. package/src/mp/utils/constant.js +15 -0
  182. package/src/mp/utils/destr.js +48 -0
  183. package/src/mp/utils/lodash.js +2 -0
  184. package/src/mp/utils/platform.js +10 -0
  185. package/src/mp/utils/tcb.js +44 -0
  186. package/src/web/components/button/index.css +8 -1
  187. package/src/web/components/button/index.tsx +10 -9
  188. package/src/web/components/calendar/index.jsx +1 -1
  189. package/src/web/components/carousel/index.tsx +8 -8
  190. package/src/web/components/chart/bar/index.tsx +40 -39
  191. package/src/web/components/chart/common/config/line.js +1 -1
  192. package/src/web/components/chart/common/core/eChartBar.js +7 -6
  193. package/src/web/components/chart/common/core/eChartBase.ts +20 -16
  194. package/src/web/components/chart/common/core/eChartLine.js +8 -6
  195. package/src/web/components/chart/line/index.tsx +40 -39
  196. package/src/web/components/chart/statisticsCard/index.tsx +29 -8
  197. package/src/web/components/form/checkbox/index.tsx +61 -23
  198. package/src/web/components/form/form/index.css +5 -1
  199. package/src/web/components/form/form/index.tsx +3 -1
  200. package/src/web/components/form/formcell/index.css +22 -1
  201. package/src/web/components/form/formcell/index.tsx +11 -6
  202. package/src/web/components/form/input/index.css +7 -12
  203. package/src/web/components/form/location/components/LocationH5/index.css +4 -7
  204. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +1 -1
  205. package/src/web/components/form/radio/index.tsx +90 -53
  206. package/src/web/components/form/select/h5.tsx +370 -73
  207. package/src/web/components/form/select/index.css +15 -0
  208. package/src/web/components/form/select/index.tsx +392 -145
  209. package/src/web/components/form/select/region/index.ts +122 -31
  210. package/src/web/components/form/select/time.jsx +89 -0
  211. package/src/web/components/form/select/year.tsx +170 -0
  212. package/src/web/components/form/textarea/index.css +4 -0
  213. package/src/web/components/form/textarea/index.tsx +2 -2
  214. package/src/web/components/form/tips/index.css +4 -0
  215. package/src/web/components/form/tips/index.tsx +4 -3
  216. package/src/web/components/form/uploader/index.css +26 -2
  217. package/src/web/components/form/uploader/uploader.h5.tsx +89 -57
  218. package/src/web/components/form/uploader/uploader.pc.tsx +4 -4
  219. package/src/web/components/form/uploaderFile/index.css +2 -4
  220. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +13 -7
  221. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +13 -5
  222. package/src/web/components/image/image.tsx +1 -1
  223. package/src/web/components/image/index.css +3 -3
  224. package/src/web/components/image/index.tsx +6 -7
  225. package/src/web/components/index.js +8 -0
  226. package/src/web/components/link/index.tsx +7 -4
  227. package/src/web/components/listView/index.css +4 -0
  228. package/src/web/components/listView/index.tsx +12 -20
  229. package/src/web/components/lottery/index.css +327 -0
  230. package/src/web/components/lottery/index.tsx +567 -0
  231. package/src/web/components/lottery/lotteryUtil.ts +130 -0
  232. package/src/web/components/modal/index.tsx +3 -1
  233. package/src/web/components/navLayout/index.tsx +2 -2
  234. package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
  235. package/src/web/components/navigationBar/common.tsx +198 -0
  236. package/src/web/components/navigationBar/h5Menu.tsx +179 -0
  237. package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
  238. package/src/web/components/navigationBar/index.css +762 -0
  239. package/src/web/components/navigationBar/index.tsx +230 -0
  240. package/src/web/components/navigationBar/type.d.ts +111 -0
  241. package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
  242. package/src/web/components/phone/index.css +0 -0
  243. package/src/web/components/phone/index.tsx +22 -0
  244. package/src/web/components/phoneCode/index.css +0 -0
  245. package/src/web/components/phoneCode/index.tsx +22 -0
  246. package/src/web/components/picker/timePicker.tsx +2 -2
  247. package/src/web/components/richTextView/index.tsx +3 -5
  248. package/src/web/components/share/index.css +0 -0
  249. package/src/web/components/share/index.tsx +38 -0
  250. package/src/web/components/slot/index.tsx +1 -1
  251. package/src/web/components/tabs/index.tsx +2 -0
  252. package/src/web/components/tabs/tabs.h5.tsx +43 -33
  253. package/src/web/components/tabs/tabs.pc.tsx +23 -10
  254. package/src/web/components/text/index.tsx +12 -20
  255. package/src/web/components/userInfo/index.css +0 -0
  256. package/src/web/components/userInfo/index.tsx +30 -0
  257. package/src/web/utils/{constant.js → constant.ts} +17 -2
  258. package/src/web/utils/lodash.ts +2 -0
  259. package/src/web/utils/platform.js +9 -0
  260. package/src/web/utils/tcb.js +26 -0
  261. package/src/web/weda-ui.css +7 -1
  262. package/src/mp/components/internals/listView/arrow-right-line.svg +0 -3
  263. package/src/mp/components/internals/listView/index.js +0 -286
  264. package/src/mp/components/internals/listView/index.wxml +0 -40
  265. package/src/mp/components/internals/listView/index.wxss +0 -150
  266. package/src/mp/components/internals/listView/more-line.svg +0 -3
  267. package/src/web/components/form/select/region/cities.ts +0 -2410
  268. package/src/web/components/form/select/region/provinces.ts +0 -240
  269. package/src/web/components/form/select/region/regions.ts +0 -20645
@@ -0,0 +1,167 @@
1
+ {
2
+ "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
+ "data": {
4
+ "properties": {
5
+ "text": {
6
+ "title": "按钮标题",
7
+ "default": "小程序分享",
8
+ "remarks": "按钮组件的标题",
9
+ "type": "string",
10
+ "x-category": "基础属性",
11
+ "x-platforms": [
12
+ "MP"
13
+ ],
14
+ "x-index": 1
15
+ },
16
+ "type": {
17
+ "title": "按钮风格",
18
+ "type": "string",
19
+ "default": "wechat",
20
+ "remarks": "按钮组件的风格,相对于普通按钮组件,新增“微信”按钮风格",
21
+ "enum": [
22
+ {
23
+ "label": "默认",
24
+ "value": "default"
25
+ },
26
+ {
27
+ "label": "微信",
28
+ "value": "wechat"
29
+ },
30
+ {
31
+ "label": "主要",
32
+ "value": "primary"
33
+ },
34
+ {
35
+ "label": "警告",
36
+ "value": "warn"
37
+ }
38
+ ],
39
+ "x-category": "基础属性",
40
+ "x-platforms": [
41
+ "MP"
42
+ ],
43
+ "x-index": 2
44
+ },
45
+ "size": {
46
+ "title": "按钮大小",
47
+ "type": "string",
48
+ "default": "default",
49
+ "remarks": "按钮的大小",
50
+ "enum": [
51
+ {
52
+ "label": "中",
53
+ "value": "default"
54
+ },
55
+ {
56
+ "label": "小",
57
+ "value": "mini"
58
+ },
59
+ {
60
+ "label": "大",
61
+ "value": "large"
62
+ }
63
+ ],
64
+ "x-category": "基础属性",
65
+ "x-platforms": [
66
+ "MP"
67
+ ],
68
+ "x-index": 3
69
+ },
70
+ "title": {
71
+ "title": "{{text('分享标题', help('分享(转发)卡片的标题'))}}",
72
+ "type": "string",
73
+ "default": "",
74
+ "x-category": "基础属性",
75
+ "description": "",
76
+ "remarks": "分享(转发)卡片的标题",
77
+ "x-component": "textarea",
78
+ "x-platforms": [
79
+ "MP"
80
+ ],
81
+ "x-index": 4
82
+ },
83
+ "image": {
84
+ "title": "{{text('分享图片', help('分享(转发)卡片的图片'))}}",
85
+ "type": "string",
86
+ "x-component": "image",
87
+ "default": "",
88
+ "x-platforms": [
89
+ "MP"
90
+ ],
91
+ "description": "",
92
+ "remarks": "分享(转发)卡片的图片",
93
+ "x-category": "基础属性",
94
+ "x-index": 5
95
+ },
96
+ "path": {
97
+ "type": "string",
98
+ "title": "{{text('选择页面', help('选择分享(转发)的页面'))}}",
99
+ "default": "",
100
+ "x-index": 6,
101
+ "addHidden": true,
102
+ "x-category": "基础属性",
103
+ "remarks": "选择分享(转发)的页面",
104
+ "x-linkages": [
105
+ {
106
+ "type": "value:state",
107
+ "state": {
108
+ "pageId": "{{$self.value}}"
109
+ },
110
+ "target": "*(params)",
111
+ "condition": "{{$self.value && $self.value.length>0}}"
112
+ }
113
+ ],
114
+ "description": "",
115
+ "x-component": "page-list",
116
+ "x-component-props": {
117
+ "hideAddPlatform": [
118
+ "MP"
119
+ ]
120
+ }
121
+ },
122
+ "withParams": {
123
+ "type": "boolean",
124
+ "title": "携带参数",
125
+ "x-category": "基础属性",
126
+ "default": false,
127
+ "remarks": "分享(转发)的页面path是否携带参数",
128
+ "x-index": 7,
129
+ "x-linkages": [
130
+ {
131
+ "type": "value:visible",
132
+ "target": "params",
133
+ "condition": "{{$self.value===true}}"
134
+ }
135
+ ]
136
+ },
137
+ "params": {
138
+ "type": "array",
139
+ "title": "参数",
140
+ "x-category": "基础属性",
141
+ "remarks": "分享(转发)的页面的参数,会自动获取到当前选择页面内存在的页面参数并自动根据页面参数进行展开,当用户通过转发的链接进入小程序时,页面便会按照配置的参数进行渲染。如果采用绑定数据的方式,数据格式参考如下:[{key: 'paramKey1', value: 'paramValue1'}, {key: 'paramKey2', value: 'paramValue2'}]",
142
+ "pageId": "",
143
+ "default": [],
144
+ "x-index": 8,
145
+ "x-component": "page-params"
146
+ }
147
+ }
148
+ },
149
+ "events": [],
150
+ "meta": {
151
+ "title": "小程序分享",
152
+ "description": "支持快捷实现小程序分享功能。",
153
+ "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Share.svg",
154
+ "category": "微信开放能力",
155
+ "categoryOrder": 100,
156
+ "componentOrder": 3,
157
+ "platform": [
158
+ "MP"
159
+ ],
160
+ "visible": [
161
+ "APP"
162
+ ]
163
+ },
164
+ "configMeta": {
165
+ "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/wxOpen/Share"
166
+ }
167
+ }
@@ -0,0 +1,174 @@
1
+ {
2
+ "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
+ "data": {
4
+ "properties": {
5
+ "text": {
6
+ "title": "按钮标题",
7
+ "default": "获取用户信息",
8
+ "type": "string",
9
+ "x-category": "基础属性",
10
+ "remarks": "按钮组件的标题",
11
+ "x-platforms": [
12
+ "MP"
13
+ ],
14
+ "x-index": 1
15
+ },
16
+ "type": {
17
+ "title": "按钮风格",
18
+ "type": "string",
19
+ "default": "wechat",
20
+ "remarks": "按钮组件的风格,相对于普通按钮组件,新增“微信”按钮风格",
21
+ "enum": [
22
+ {
23
+ "label": "默认",
24
+ "value": "default"
25
+ },
26
+ {
27
+ "label": "微信",
28
+ "value": "wechat"
29
+ },
30
+ {
31
+ "label": "主要",
32
+ "value": "primary"
33
+ },
34
+ {
35
+ "label": "警告",
36
+ "value": "warn"
37
+ }
38
+ ],
39
+ "x-category": "基础属性",
40
+ "x-platforms": [
41
+ "MP"
42
+ ],
43
+ "x-index": 2
44
+ },
45
+ "size": {
46
+ "title": "按钮大小",
47
+ "type": "string",
48
+ "default": "default",
49
+ "remarks": "按钮的大小",
50
+ "enum": [
51
+ {
52
+ "label": "中",
53
+ "value": "default"
54
+ },
55
+ {
56
+ "label": "小",
57
+ "value": "mini"
58
+ },
59
+ {
60
+ "label": "大",
61
+ "value": "large"
62
+ }
63
+ ],
64
+ "x-category": "基础属性",
65
+ "x-platforms": [
66
+ "MP"
67
+ ],
68
+ "x-index": 3
69
+ },
70
+ "usage": {
71
+ "title": "{{text('信息用途', help('声明获取用户个人信息的用途\\n不超过30个字符'))}}",
72
+ "type": "string",
73
+ "default": "",
74
+ "x-category": "基础属性",
75
+ "remarks": "声明获取用户个人信息的用途,不超过30个字符,若不填写将导致功能失效",
76
+ "required": true,
77
+ "x-rules": [
78
+ {
79
+ "message": "该字段必填",
80
+ "required": true
81
+ },
82
+ {
83
+ "message": "不超过30个字符",
84
+ "pattern": "^.{0,30}$"
85
+ }
86
+ ],
87
+ "description": "声明获取用户个人信息的用途,不超过30个字符,若不填写将导致功能失效",
88
+ "x-component": "textarea",
89
+ "x-platforms": [
90
+ "MP"
91
+ ],
92
+ "x-index": 4
93
+ },
94
+ "language": {
95
+ "title": "语言",
96
+ "type": "string",
97
+ "default": "zh_CN",
98
+ "description": "",
99
+ "remarks": "用户当前国家、省份、城市所使用的语言",
100
+ "enum": [
101
+ {
102
+ "label": "简体中文",
103
+ "value": "zh_CN"
104
+ },
105
+ {
106
+ "label": "繁体中文",
107
+ "value": "zh_TW"
108
+ },
109
+ {
110
+ "label": "英文",
111
+ "value": "en"
112
+ }
113
+ ],
114
+ "x-category": "基础属性",
115
+ "x-platforms": [
116
+ "MP"
117
+ ],
118
+ "x-index": 5
119
+ }
120
+ }
121
+ },
122
+ "events": [
123
+ {
124
+ "title": "用户信息授权成功",
125
+ "name": "userinfosuccess",
126
+ "remarks": "弹窗中点击了允许按钮后触发的事件",
127
+ "x-platforms": [
128
+ "MP"
129
+ ],
130
+ "detail": {
131
+ "avatarUrl": {
132
+ "type": "string",
133
+ "title": "用户头像",
134
+ "x-index": 1
135
+ },
136
+ "nickName": {
137
+ "type": "string",
138
+ "title": "微信昵称",
139
+ "x-index": 2
140
+ },
141
+ "language": {
142
+ "type": "string",
143
+ "title": "语言",
144
+ "x-index": 4
145
+ }
146
+ }
147
+ },
148
+ {
149
+ "title": "用户信息授权失败",
150
+ "name": "userinfofail",
151
+ "remarks": "弹窗中点击了拒绝按钮后触发的事件",
152
+ "x-platforms": [
153
+ "MP"
154
+ ]
155
+ }
156
+ ],
157
+ "meta": {
158
+ "title": "获取用户信息",
159
+ "description": "能够在小程序运行态对用户的微信头像、微信昵称等信息进行获取。",
160
+ "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/UserInfo.svg",
161
+ "category": "微信开放能力",
162
+ "categoryOrder": 100,
163
+ "componentOrder": 1,
164
+ "platform": [
165
+ "MP"
166
+ ],
167
+ "visible": [
168
+ "APP"
169
+ ]
170
+ },
171
+ "configMeta": {
172
+ "docsUrl": "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/wxOpen/UserInfo"
173
+ }
174
+ }
@@ -35,6 +35,7 @@ import showToast from './actions/showToast.json';
35
35
  import showModal from './actions/showModal.json';
36
36
 
37
37
  import ListView from './components/listView.json';
38
+ import NavigationBar from './components/navigationBar.json';
38
39
  import Line from './components/chart/line.json';
39
40
  import Bar from './components/chart/bar.json';
40
41
  import Pie from './components/chart/pie.json';
@@ -42,6 +43,12 @@ import Pie from './components/chart/pie.json';
42
43
  import DataView from './components/dataView.json';
43
44
  import StatisticsCard from './components/chart/statisticsCard.json';
44
45
  import GraphicCard from './components/graphicCard.json';
46
+ import Phone from './components/wxOpenApi/phone.json';
47
+ import PhoneCode from './components/wxOpenApi/phoneCode.json';
48
+ import Share from './components/wxOpenApi/share.json';
49
+ import UserInfo from './components/wxOpenApi/userInfo.json';
50
+
51
+ import Lottery from './components/lottery.json';
45
52
  export const components = {
46
53
  Button,
47
54
  Text,
@@ -78,11 +85,17 @@ export const components = {
78
85
  ListView,
79
86
  DataView,
80
87
  NavLayout,
88
+ NavigationBar,
81
89
  Line,
82
90
  Bar,
83
91
  Pie,
84
92
  StatisticsCard,
85
93
  GraphicCard,
94
+ Phone,
95
+ PhoneCode,
96
+ Share,
97
+ UserInfo,
98
+ Lottery,
86
99
  };
87
100
 
88
101
  export const actions = {
@@ -0,0 +1,112 @@
1
+ export interface ICompsConfig {
2
+ type: String;
3
+ name: string;
4
+ title: string;
5
+ description: string;
6
+ 'x-platforms': string[];
7
+ default: string;
8
+ platforms: string;
9
+ 'x-index': number;
10
+ }
11
+ export type TCompsConfig = ICompsConfig;
12
+
13
+ export const sortBy = (props) => {
14
+ return function (a, b) {
15
+ return a[props] - b[props];
16
+ };
17
+ };
18
+
19
+ export const objFormat = (args: any, type, origin) => {
20
+ //判断属性title值是否为拓展写法
21
+ const uuidReg = /(?<=text)\('(.*)(?=',)/;
22
+ let transformData: any = [];
23
+ for (let i in args) {
24
+ if (type && type == 'event') {
25
+ transformData.push({
26
+ name: origin == 'lowCode' ? args[i]?.name : args[i]?.title,
27
+ title: origin == 'lowCode' ? args[i]?.eventName : args[i]?.name,
28
+ description: args[i]?.remarks || '-',
29
+ platforms: args[i]['x-platforms']
30
+ ? args[i]['x-platforms'].indexOf('MP') > -1
31
+ ? '小程序端'
32
+ : args[i]['x-platforms'].indexOf('WEB') > -1
33
+ ? 'web端'
34
+ : '兼容三端'
35
+ : '兼容三端',
36
+ });
37
+ } else if (type && type == 'attribute' && args[i].type != 'slot') {
38
+ if (
39
+ args[i]?.display == false ||
40
+ args[i]?.isReactNode == true ||
41
+ args[i]['x-component'] == 'sub-category-title' ||
42
+ args[i]['x-component'] == 'Divider'
43
+ ) {
44
+ continue;
45
+ }
46
+ transformData.push({
47
+ code: i,
48
+ title: args[i].title.indexOf('{{')!=-1?args[i]?.title.match(uuidReg)[1]:args[i]?.title,
49
+ description: args[i]?.remarks || '-',
50
+ type: args[i]?.type || '-',
51
+ default: JSON.stringify(args[i]?.default) || '-',
52
+ 'x-index': args[i]['x-index'] ? args[i]['x-index'] : 999999,
53
+ 'x-category': args[i]['x-category']
54
+ ? args[i]['x-category']
55
+ : '基础属性',
56
+ });
57
+ } else if (type && type == 'slot' && args[i].type == 'slot') {
58
+ transformData.push({
59
+ code: i,
60
+ title: args[i]?.title,
61
+ description: args[i]?.description || '-',
62
+ });
63
+ }
64
+ }
65
+
66
+ if (type && type == 'attribute') transformData.sort(sortBy('x-index'));
67
+
68
+ if (type && type == 'attribute') {
69
+ transformData = groupByType(transformData, 'x-category');
70
+ }
71
+ return transformData;
72
+ };
73
+ function groupByType(arr, param) {
74
+ var map = {};
75
+ var dest = [];
76
+ var structureMap = [];
77
+ var storgeType = [];
78
+ for (var i = 0; i < arr.length; i++) {
79
+ var ai = arr[i];
80
+ if (ai[param] && !map[ai[param]]) {
81
+ dest.push({
82
+ name: ai[param],
83
+ data: [ai],
84
+ });
85
+ map[ai[param]] = ai;
86
+ } else if (!ai[param]) {
87
+ dest.push({
88
+ name: '基础属性',
89
+ data: [ai],
90
+ });
91
+ map[ai[param]] = ai;
92
+ } else {
93
+ for (var j = 0; j < dest.length; j++) {
94
+ var dj = dest[j];
95
+ if (dj.name == ai[param]) {
96
+ dj.data.push(ai);
97
+ break;
98
+ }
99
+ }
100
+ }
101
+ }
102
+ for (var k = 0; k < dest.length; k++) {
103
+ if (k == 0 && dest[k]?.name != '基础属性') {
104
+ storgeType = storgeType.concat(dest[k]?.data);
105
+ continue;
106
+ }
107
+ structureMap = structureMap.concat(dest[k]?.data);
108
+ }
109
+
110
+ storgeType.length != 0 ? structureMap.push(...storgeType) : null;
111
+ return structureMap;
112
+ }
@@ -0,0 +1,164 @@
1
+ .tableview {
2
+ width: 700px;
3
+ table-layout: fixed;
4
+ }
5
+ .tr-width-1 {
6
+ width: 100px;
7
+ }
8
+ .tr-width-2 {
9
+ width: 200px;
10
+ }
11
+ .tr-width-3 {
12
+ width: 300px;
13
+ }
14
+ .tr-width-4 {
15
+ width: 400px;
16
+ }
17
+ .tr-width-6 {
18
+ width: 600px;
19
+ }
20
+ .tr-width-7 {
21
+ width: 700px;
22
+ }
23
+ .custom-table--body-wrapper.is-fixed {
24
+ overflow-y: hidden;
25
+ }
26
+
27
+ .custom-table--fixed-wrapper {
28
+ box-shadow: 4px 0px 4px rgba(0, 0, 0, 0.1);
29
+
30
+ left: 0;
31
+ top: 0;
32
+ bottom: 0;
33
+ width: 800px;
34
+ background-color: #fff;
35
+ }
36
+
37
+ .custom-table td,
38
+ .custom-table th {
39
+ white-space: nowrap;
40
+ overflow: hidden;
41
+ height: 42px;
42
+ padding: 2px !important;
43
+ }
44
+ .custom-table .table {
45
+ table-layout: fixed;
46
+ margin-bottom: 0;
47
+ }
48
+ /** 底部边框 */
49
+ .custom-table::after {
50
+ content: '';
51
+ display: block;
52
+ height: 0px;
53
+ position: relative;
54
+ top: -1px;
55
+ border-bottom: 1px solid #ddd;
56
+ }
57
+ /** 右侧边框 */
58
+ .custom-table::before {
59
+ content: '';
60
+ display: block;
61
+ position: absolute;
62
+ top: 0;
63
+ bottom: 0;
64
+ right: 0;
65
+ border-right: 1px solid #ddd;
66
+ }
67
+ .custom-table th.gutter {
68
+ width: 15px;
69
+ padding: 0;
70
+ }
71
+ .tea-table__header {
72
+ overflow: hidden;
73
+ margin-bottom: -18px;
74
+ }
75
+ .tea-table__box {
76
+ border-collapse: collapse;
77
+ table-layout: fixed;
78
+ width: 100%;
79
+ position: relative;
80
+ border-spacing: 0px;
81
+ }
82
+ .tea-text-overflow,
83
+ .tea-text-truncate {
84
+ display: flex;
85
+ vertical-align: middle;
86
+ white-space: nowrap;
87
+ text-overflow: ellipsis;
88
+ max-width: 100%;
89
+ overflow: hidden;
90
+ }
91
+ .tea-table__header thead {
92
+ background-color: transparent;
93
+ border-width: 0px;
94
+ border-style: initial;
95
+ border-color: initial;
96
+ border-image: initial;
97
+ }
98
+ colgroup {
99
+ display: table-column-group;
100
+ }
101
+ .tea-table__box tr {
102
+ outline: none 0px;
103
+ transition: background-color 0.1s linear 0s;
104
+ }
105
+ .tea-table__box th {
106
+ position: relative;
107
+ padding: 10px;
108
+ border-bottom: 1px solid rgb(231, 234, 239);
109
+ }
110
+ .tea-table__box th > div {
111
+ position: relative;
112
+ color: rgb(0 0 0 / 77%);
113
+ padding: 0px;
114
+ display: inline-block;
115
+ vertical-align: middle;
116
+ font-size: 16px;
117
+ width: 100%;
118
+ overflow-wrap: break-word;
119
+ word-break: break-word;
120
+ }
121
+ .tea-table__box tr > td {
122
+ color: rgb(0 0 0);
123
+ padding: 10px;
124
+ vertical-align: middle;
125
+ font-size: 16px;
126
+ vertical-align: top;
127
+ }
128
+ .tea-table__box tr > td > code {
129
+ color: #c7254e;
130
+ font-size: 85%;
131
+ border: none;
132
+ }
133
+ .tea-text-overflow,
134
+ .tea-text-truncate {
135
+ display: flex;
136
+ vertical-align: middle;
137
+ white-space: nowrap;
138
+ text-overflow: ellipsis;
139
+ max-width: 100%;
140
+ overflow: hidden;
141
+ }
142
+ table {
143
+ display: table;
144
+ border-collapse: separate;
145
+ box-sizing: border-box;
146
+ text-indent: initial;
147
+ border-spacing: 2px;
148
+ border-color: grey;
149
+ }
150
+ .tea-table__body {
151
+ border-bottom: 1px solid rgb(207, 213, 222);
152
+ overflow: auto;
153
+ }
154
+ colgroup {
155
+ display: table-column-group;
156
+ }
157
+ col {
158
+ display: table-column;
159
+ }
160
+ .hash-link{
161
+ opacity: 0;
162
+ padding-left: 0.5rem;
163
+ transition: opacity var(--ifm-transition-fast);
164
+ }