@cloudbase/weda-ui 1.0.21 → 2.0.9

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 (170) hide show
  1. package/package.json +6 -4
  2. package/src/configs/components/button.json +0 -2
  3. package/src/configs/components/calendar.json +5 -2
  4. package/src/configs/components/carousel.json +18 -9
  5. package/src/configs/components/chart/bar.json +12 -6
  6. package/src/configs/components/chart/line.json +8 -4
  7. package/src/configs/components/chart/pie.json +8 -4
  8. package/src/configs/components/dataView.json +11 -6
  9. package/src/configs/components/form/radio.json +27 -0
  10. package/src/configs/components/form/select.json +2 -2
  11. package/src/configs/components/graphicCard.json +6 -2
  12. package/src/configs/components/image.json +12 -6
  13. package/src/configs/components/link.json +6 -3
  14. package/src/configs/components/listView.json +21 -11
  15. package/src/configs/components/lottery.json +153 -0
  16. package/src/configs/components/navLayout.json +12 -6
  17. package/src/configs/components/richtextview.json +2 -1
  18. package/src/configs/components/scrollVeiw.json +24 -12
  19. package/src/configs/components/swiper.json +18 -9
  20. package/src/configs/components/tabs.json +4 -2
  21. package/src/configs/components/text.json +10 -5
  22. package/src/configs/index.js +2 -0
  23. package/src/docs/common/format.tsx +112 -0
  24. package/src/docs/common/tableView.css +164 -0
  25. package/src/docs/common/tableView.tsx +273 -0
  26. package/src/docs/compsdocs/chart/Bar.mdx +159 -0
  27. package/src/docs/compsdocs/chart/Line.mdx +100 -0
  28. package/src/docs/compsdocs/chart/Pie.mdx +83 -0
  29. package/src/docs/compsdocs/chart/_category_.json +1 -0
  30. package/src/docs/compsdocs/chart/statisticsCard.mdx +51 -0
  31. package/src/docs/compsdocs/database/DataView.mdx +33 -0
  32. package/src/docs/compsdocs/database/ListView.mdx +33 -0
  33. package/src/docs/compsdocs/database/_category_.json +1 -0
  34. package/src/docs/compsdocs/form/Form.mdx +35 -0
  35. package/src/docs/compsdocs/form/FormCheckbox.mdx +35 -0
  36. package/src/docs/compsdocs/form/FormDate.mdx +30 -0
  37. package/src/docs/compsdocs/form/FormEmail.mdx +30 -0
  38. package/src/docs/compsdocs/form/FormImageUploader.mdx +31 -0
  39. package/src/docs/compsdocs/form/FormInput.mdx +30 -0
  40. package/src/docs/compsdocs/form/FormLocation.mdx +64 -0
  41. package/src/docs/compsdocs/form/FormPhone.mdx +30 -0
  42. package/src/docs/compsdocs/form/FormRadio.mdx +35 -0
  43. package/src/docs/compsdocs/form/FormRegion.mdx +30 -0
  44. package/src/docs/compsdocs/form/FormSelect.mdx +36 -0
  45. package/src/docs/compsdocs/form/FormSwitch.mdx +30 -0
  46. package/src/docs/compsdocs/form/FormTextarea.mdx +30 -0
  47. package/src/docs/compsdocs/form/FormTime.mdx +30 -0
  48. package/src/docs/compsdocs/form/FormUploadFile.mdx +30 -0
  49. package/src/docs/compsdocs/form/FormUrl.mdx +30 -0
  50. package/src/docs/compsdocs/form/_category_.json +1 -0
  51. package/src/docs/compsdocs/grid/Card.mdx +32 -0
  52. package/src/docs/compsdocs/grid/Container.mdx +42 -0
  53. package/src/docs/compsdocs/grid/Footer.mdx +31 -0
  54. package/src/docs/compsdocs/grid/GridLayout.mdx +32 -0
  55. package/src/docs/compsdocs/grid/Header.mdx +31 -0
  56. package/src/docs/compsdocs/grid/Layout.mdx +25 -0
  57. package/src/docs/compsdocs/grid/List.mdx +31 -0
  58. package/src/docs/compsdocs/grid/ScrollView.mdx +37 -0
  59. package/src/docs/compsdocs/grid/Swiper.mdx +58 -0
  60. package/src/docs/compsdocs/grid/_category_.json +1 -0
  61. package/src/docs/compsdocs/media/Icon.mdx +31 -0
  62. package/src/docs/compsdocs/media/Image.mdx +55 -0
  63. package/src/docs/compsdocs/media/_category_.json +1 -0
  64. package/src/docs/compsdocs/model/ModelCreate.mdx +20 -0
  65. package/src/docs/compsdocs/model/ModelDetail.mdx +20 -0
  66. package/src/docs/compsdocs/model/ModelTable.mdx +24 -0
  67. package/src/docs/compsdocs/model/ModelUpdate.mdx +21 -0
  68. package/src/docs/compsdocs/model/PageLayout.mdx +21 -0
  69. package/src/docs/compsdocs/model/_category_.json +1 -0
  70. package/src/docs/compsdocs/navmenu/Classification.mdx +38 -0
  71. package/src/docs/compsdocs/navmenu/NavBar.mdx +43 -0
  72. package/src/docs/compsdocs/navmenu/NavLayout.mdx +30 -0
  73. package/src/docs/compsdocs/navmenu/TabBar.mdx +43 -0
  74. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +29 -0
  75. package/src/docs/compsdocs/navmenu/_category_.json +1 -0
  76. package/src/docs/compsdocs/senior/Lottery.mdx +48 -0
  77. package/src/docs/compsdocs/senior/Modal.mdx +58 -0
  78. package/src/docs/compsdocs/senior/SlotMachine.mdx +52 -0
  79. package/src/docs/compsdocs/senior/_category_.json +1 -0
  80. package/src/docs/compsdocs/show/Calendar.mdx +29 -0
  81. package/src/docs/compsdocs/show/Divider.mdx +31 -0
  82. package/src/docs/compsdocs/show/GraphicCard.mdx +30 -0
  83. package/src/docs/compsdocs/show/Item.mdx +32 -0
  84. package/src/docs/compsdocs/show/ItemList.mdx +47 -0
  85. package/src/docs/compsdocs/show/Media.mdx +25 -0
  86. package/src/docs/compsdocs/show/StatusTip.mdx +25 -0
  87. package/src/docs/compsdocs/show/Swiper.mdx +33 -0
  88. package/src/docs/compsdocs/show/Tabs.mdx +38 -0
  89. package/src/docs/compsdocs/show/_category_.json +1 -0
  90. package/src/docs/compsdocs/show/button.mdx +25 -0
  91. package/src/docs/compsdocs/text/Link.mdx +43 -0
  92. package/src/docs/compsdocs/text/RichTextView.mdx +36 -0
  93. package/src/docs/compsdocs/text/Text.mdx +31 -0
  94. package/src/docs/compsdocs/text/Title.mdx +32 -0
  95. package/src/docs/compsdocs/text/_category_.json +1 -0
  96. package/src/docs/compsdocs/wxOpen/Phone.mdx +60 -0
  97. package/src/docs/compsdocs/wxOpen/Share.mdx +46 -0
  98. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +60 -0
  99. package/src/docs/compsdocs/wxOpen/_category_.json +4 -0
  100. package/src/index.js +2 -0
  101. package/src/mp/components/button/index.js +18 -2
  102. package/src/mp/components/button/index.wxml +7 -4
  103. package/src/mp/components/form/form/index.wxml +1 -2
  104. package/src/mp/components/form/formcell/index.wxml +1 -1
  105. package/src/mp/components/form/formcell/index.wxss +17 -0
  106. package/src/mp/components/form/input/index.wxss +15 -0
  107. package/src/mp/components/form/location/index.wxss +4 -6
  108. package/src/mp/components/form/select/index.js +13 -23
  109. package/src/mp/components/form/select/index.wxss +4 -0
  110. package/src/mp/components/form/select/region/index.js +6 -3
  111. package/src/mp/components/form/textarea/index.js +1 -1
  112. package/src/mp/components/form/textarea/index.wxss +4 -0
  113. package/src/mp/components/form/uploader/index.json +3 -2
  114. package/src/mp/components/form/uploader/index.wxml +11 -7
  115. package/src/mp/components/form/uploader/index.wxss +20 -2
  116. package/src/mp/components/form/uploader/weui-uploader.js +209 -0
  117. package/src/mp/components/form/uploader/weui-uploader.json +7 -0
  118. package/src/mp/components/form/uploader/weui-uploader.wxml +45 -0
  119. package/src/mp/components/form/uploader/weui-uploader.wxss +1 -0
  120. package/src/mp/components/form/uploaderFile/index.wxss +4 -4
  121. package/src/mp/components/image/index.wxss +3 -2
  122. package/src/mp/components/listView/index.js +5 -16
  123. package/src/mp/components/lottery/index.js +270 -0
  124. package/src/mp/components/lottery/index.json +4 -0
  125. package/src/mp/components/lottery/index.wxml +43 -0
  126. package/src/mp/components/lottery/index.wxss +317 -0
  127. package/src/mp/components/wxOpenApi/phone/index.js +1 -1
  128. package/src/mp/index.json +4 -3
  129. package/src/mp/style/weda-ui.wxss +14 -0
  130. package/src/mp/utils/constant.js +15 -0
  131. package/src/mp/utils/lodash.js +2 -0
  132. package/src/web/components/button/index.tsx +7 -7
  133. package/src/web/components/calendar/index.jsx +1 -1
  134. package/src/web/components/carousel/index.tsx +8 -8
  135. package/src/web/components/chart/common/config/line.js +1 -1
  136. package/src/web/components/form/checkbox/index.tsx +6 -0
  137. package/src/web/components/form/form/index.css +5 -1
  138. package/src/web/components/form/form/index.tsx +3 -1
  139. package/src/web/components/form/formcell/index.css +22 -1
  140. package/src/web/components/form/formcell/index.tsx +11 -6
  141. package/src/web/components/form/input/index.css +7 -12
  142. package/src/web/components/form/location/components/LocationH5/index.css +4 -7
  143. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +1 -1
  144. package/src/web/components/form/radio/index.tsx +6 -0
  145. package/src/web/components/form/select/h5.tsx +5 -24
  146. package/src/web/components/form/select/index.css +11 -0
  147. package/src/web/components/form/select/index.tsx +4 -17
  148. package/src/web/components/form/textarea/index.css +4 -0
  149. package/src/web/components/form/textarea/index.tsx +2 -2
  150. package/src/web/components/form/tips/index.css +4 -0
  151. package/src/web/components/form/tips/index.tsx +4 -3
  152. package/src/web/components/form/uploader/index.css +26 -2
  153. package/src/web/components/form/uploader/uploader.h5.tsx +81 -56
  154. package/src/web/components/form/uploaderFile/index.css +2 -4
  155. package/src/web/components/image/index.css +5 -5
  156. package/src/web/components/image/index.tsx +6 -7
  157. package/src/web/components/index.js +1 -0
  158. package/src/web/components/link/index.tsx +2 -2
  159. package/src/web/components/listView/index.tsx +6 -19
  160. package/src/web/components/lottery/index.css +327 -0
  161. package/src/web/components/lottery/index.tsx +567 -0
  162. package/src/web/components/lottery/lotteryUtil.ts +130 -0
  163. package/src/web/components/navLayout/index.tsx +2 -2
  164. package/src/web/components/navigationBar/index.tsx +0 -1
  165. package/src/web/components/picker/timePicker.tsx +2 -2
  166. package/src/web/components/slot/index.tsx +1 -1
  167. package/src/web/components/text/index.tsx +6 -6
  168. package/src/web/utils/{constant.js → constant.ts} +17 -2
  169. package/src/web/utils/lodash.ts +2 -0
  170. package/src/web/weda-ui.css +5 -1
@@ -0,0 +1,43 @@
1
+ # 链接
2
+
3
+ <TableLayoutView
4
+ componentKey="Link"
5
+ type="description"
6
+ origin="sourceCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+
11
+ ### 实现基础的超链接功能
12
+
13
+ 通过在配置区对应用页面/外部链接以及文本内容进行配置后,点击链接组件时即可跳转至对应的页面。
14
+
15
+ ![](https://qcloudimg.tencent-cloud.cn/raw/c8665ead872addcad63f4d06edf65a83.png)
16
+
17
+ ### 实现模块化的点击跳转功能
18
+
19
+ 链接组件同样可实现模块化的跳转功能,在大纲树-链接组件的内容插槽中拖入单个/多个组件,即可将内容插槽中的组件作为一个模块并实现点击跳转功能。
20
+
21
+ ![](https://qcloudimg.tencent-cloud.cn/raw/d8a9e45e545f892021959562f73d4893.png)
22
+
23
+ ## 属性介绍
24
+
25
+ import TableLayoutView from '../../common/tableView';
26
+
27
+ <TableLayoutView
28
+ componentKey="Link"
29
+ type="attribute"
30
+ origin="sourceCode"
31
+ ></TableLayoutView>
32
+
33
+ ## 事件介绍
34
+
35
+ <TableLayoutView
36
+ componentKey="Link"
37
+ type="event"
38
+ origin="sourceCode"
39
+ ></TableLayoutView>
40
+
41
+ ## 限制说明
42
+
43
+ 由于小程序仅支持通过webview组件的方式进行外部链接的跳转,因此链接组件不支持在小程序中进行构建使用。
@@ -0,0 +1,36 @@
1
+ # 富文本展示
2
+
3
+ <TableLayoutView
4
+ componentKey="RichTextView"
5
+ type="description"
6
+ origin="sourceCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+
11
+ 富文本展示组件支持对html语言进行渲染,在组件配置区中输入html语言即可实现自定义的页面展示效果。
12
+
13
+ ![](https://qcloudimg.tencent-cloud.cn/raw/2e6e0921ec02486e38cb62cc073989da.png)
14
+
15
+
16
+ ## 属性介绍
17
+
18
+ import TableLayoutView from '../../common/tableView';
19
+
20
+ <TableLayoutView
21
+ componentKey="RichTextView"
22
+ type="attribute"
23
+ origin="sourceCode"
24
+ ></TableLayoutView>
25
+
26
+ ## 事件介绍
27
+
28
+ <TableLayoutView
29
+ componentKey="RichTextView"
30
+ type="event"
31
+ origin="sourceCode"
32
+ ></TableLayoutView>
33
+
34
+ ## 限制说明
35
+
36
+ 通过该功能构建的展示内容可能无法在小程序中生效,请以小程序实际运行效果为准。
@@ -0,0 +1,31 @@
1
+ # 文本
2
+
3
+ <TableLayoutView
4
+ componentKey="Text"
5
+ type="description"
6
+ origin="sourceCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+ 文本组件可以用于在页面中对文本内容进行基础的展示,通过在配置区可以对文本的样式属性进行自定义的调整。
11
+
12
+ ![](https://qcloudimg.tencent-cloud.cn/raw/53e93064ccaf7f6d08889405a5392b04.png)
13
+
14
+
15
+ ## 属性介绍
16
+
17
+ import TableLayoutView from '../../common/tableView';
18
+
19
+ <TableLayoutView
20
+ componentKey="Text"
21
+ type="attribute"
22
+ origin="sourceCode"
23
+ ></TableLayoutView>
24
+
25
+ ## 事件介绍
26
+
27
+ <TableLayoutView
28
+ componentKey="Text"
29
+ type="event"
30
+ origin="sourceCode"
31
+ ></TableLayoutView>
@@ -0,0 +1,32 @@
1
+ # 标题
2
+
3
+ <TableLayoutView
4
+ componentKey="Title"
5
+ type="description"
6
+ origin="lowCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+ 标题组件自带不同的标题级别属性,对编辑区进行简单的配置后即可在页面实现不同的标题层级展示。
11
+
12
+ ![](https://qcloudimg.tencent-cloud.cn/raw/d83d5bbf384a113a4c20371b61cd50f4.png)
13
+
14
+
15
+
16
+ ## 属性介绍
17
+
18
+ import TableLayoutView from '../../common/tableView';
19
+
20
+ <TableLayoutView
21
+ componentKey="Title"
22
+ type="attribute"
23
+ origin="lowCode"
24
+ ></TableLayoutView>
25
+
26
+ ## 事件介绍
27
+
28
+ <TableLayoutView
29
+ componentKey="Title"
30
+ type="event"
31
+ origin="lowCode"
32
+ ></TableLayoutView>
@@ -0,0 +1 @@
1
+ { "label": "文本", "position": 10 }
@@ -0,0 +1,60 @@
1
+ # 获取手机号
2
+
3
+ <TableLayoutView
4
+ componentKey="Phone"
5
+ type="description"
6
+ origin="sourceCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+
11
+ 使用获取手机号组件能够在小程序运行态对用户的手机号进行获取,使用方式如下:
12
+
13
+ 1.创建应用,应用构建类型需要为小程序构建或三端构建。
14
+
15
+ ![](https://qcloudimg.tencent-cloud.cn/raw/b9e5a27263fe0f992618757086010017.png)
16
+
17
+ 2.在编辑器中添加**获取手机号**组件。
18
+
19
+ ![](https://qcloudimg.tencent-cloud.cn/raw/6eac32bcf54b345c5d23ee3ec49de19c.png)
20
+
21
+ 3.为应用创建一个字符串类型的普通变量,用于接收获取到的手机号信息。
22
+
23
+ ![](https://qcloudimg.tencent-cloud.cn/raw/5bd62e877d0a5805368ca55633627403.png)
24
+
25
+ 4.为获取手机号组件配置变量赋值事件,实现当用户授权成功后将返回的手机号信息赋值给步骤3中的普通变量。
26
+
27
+ ![](https://qcloudimg.tencent-cloud.cn/raw/98e456ef06ee76e138dcc13d03705f33.png)
28
+
29
+ 5.该组件仅在小程序真实运行状态下生效,因此我们在编辑器中添加一个文本组件并与普通变量进行绑定,当用户在小程序中点击获取手机号按钮并授权成功时,文本组件便会展示对应的手机号信息。
30
+
31
+ ![](https://qcloudimg.tencent-cloud.cn/raw/9373c76dd92a98cd222eab37e7cca495.png)
32
+
33
+ 6.将应用发布到小程序,可以看到当点击获取手机号按钮并授权时,文本组件便会对获取到的手机号码信息进行展示。
34
+
35
+ ![](https://qcloudimg.tencent-cloud.cn/raw/1b4c8a656ae0298534e9f5c2749c9b04.png)
36
+
37
+
38
+ ## 组件使用限制
39
+
40
+ 1.该组件仅支持在小程序端使用,并且小程序必须为**企业主体**。
41
+
42
+ 2.该组件必须在小程序真实环境使用才能够看到实际效果。
43
+
44
+ ## 属性
45
+
46
+ import TableLayoutView from '../../common/tableView';
47
+
48
+ <TableLayoutView
49
+ componentKey="Phone"
50
+ type="attribute"
51
+ origin="sourceCode"
52
+ ></TableLayoutView>
53
+
54
+ ## 事件
55
+
56
+ <TableLayoutView
57
+ componentKey="Phone"
58
+ type="event"
59
+ origin="sourceCode"
60
+ ></TableLayoutView>
@@ -0,0 +1,46 @@
1
+ # 小程序分享
2
+
3
+ <TableLayoutView
4
+ componentKey="Share"
5
+ type="description"
6
+ origin="sourceCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+
11
+ 小程序分享组件支持快捷实现小程序分享功能,在小程序中点击该组件时,便会根据当前组件配置进行页面的分享,使用方法如下:
12
+
13
+ 1.创建应用,应用构建类型需要为小程序构建或三端构建。
14
+
15
+ ![](https://qcloudimg.tencent-cloud.cn/raw/b9e5a27263fe0f992618757086010017.png)
16
+
17
+ 2.为编辑区中添加**小程序分享**组件,并在右侧配置区进行分享参数的设置。
18
+
19
+ ![](https://qcloudimg.tencent-cloud.cn/raw/500bda4094df6b2c519eec8976ec4acd.png)
20
+
21
+ 3.将应用发布到小程序,可以看到当点击小程序分享按钮时,会自动调起分享弹窗,分享信息与配置区的配置相同。
22
+
23
+ ![](https://qcloudimg.tencent-cloud.cn/raw/5f9add0024c8cb8f65464a4700a12652.png)
24
+
25
+
26
+ ## 组件使用限制
27
+
28
+ 1.该组件必须在小程序真实环境使用才能够看到实际效果。
29
+
30
+ ## 属性
31
+
32
+ import TableLayoutView from '../../common/tableView';
33
+
34
+ <TableLayoutView
35
+ componentKey="Share"
36
+ type="attribute"
37
+ origin="sourceCode"
38
+ ></TableLayoutView>
39
+
40
+ ## 事件
41
+
42
+ <TableLayoutView
43
+ componentKey="Share"
44
+ type="event"
45
+ origin="sourceCode"
46
+ ></TableLayoutView>
@@ -0,0 +1,60 @@
1
+ # 获取用户信息
2
+
3
+ <TableLayoutView
4
+ componentKey="UserInfo"
5
+ type="description"
6
+ origin="sourceCode"
7
+ ></TableLayoutView>
8
+
9
+ ## 使用说明
10
+
11
+ 使用获取用户信息组件能够在小程序运行态对用户的微信头像、微信昵称等信息进行获取,使用方式如下:
12
+
13
+ 1.创建应用,应用构建类型需要为小程序构建或三端构建。
14
+
15
+ ![](https://qcloudimg.tencent-cloud.cn/raw/b9e5a27263fe0f992618757086010017.png)
16
+
17
+ 2.在编辑器中添加**获取用户信息**组件,并且在组件的右侧配置区填写**信息用途**。(若不填写**信息用途**,将导致功能不可用,请注意)
18
+
19
+ ![](https://qcloudimg.tencent-cloud.cn/raw/44d4f6bf1c9aaffa4bf7e3a1c0bcf83e.png)
20
+
21
+ 3.为应用创建一个字符串类型的普通变量,用于接收获取到的用户信息。
22
+
23
+ ![](https://qcloudimg.tencent-cloud.cn/raw/1dd6a703ff51f0fe45059fdb504d25ff.png)
24
+
25
+ 4.为获取用户信息组件配置变量赋值事件,实现当用户授权成功后将返回的用户信息赋值给步骤3中的普通变量。
26
+
27
+ ![](https://qcloudimg.tencent-cloud.cn/raw/ed12e3858ffba97f9ecbae7557ed03db.png)
28
+
29
+ 5.该组件仅在小程序真实运行状态下生效,因此我们在编辑器中添加一个文本组件并与普通变量进行绑定,当用户在小程序中点击获取用户信息按钮并授权成功时,文本组件便会展示对应的用户信息。
30
+
31
+ ![](https://qcloudimg.tencent-cloud.cn/raw/a55e1ab45de33489a1d61557a4f5f1b0.png)
32
+
33
+ 6.将应用发布到小程序,可以看到当点击获取用户信息按钮并授权时,文本组件便会对获取到的用户信息进行展示。
34
+
35
+ ![](https://qcloudimg.tencent-cloud.cn/raw/7aa344e9347a894975598ba1ab7b987e.png)
36
+
37
+
38
+ ## 组件使用限制
39
+
40
+ 1.该组件必须在小程序真实环境使用才能够看到实际效果。
41
+
42
+ 2.组件右侧配置区中**信息用途**必须进行填写,否则组件将无法正常使用。
43
+
44
+ ## 属性
45
+
46
+ import TableLayoutView from '../../common/tableView';
47
+
48
+ <TableLayoutView
49
+ componentKey="UserInfo"
50
+ type="attribute"
51
+ origin="sourceCode"
52
+ ></TableLayoutView>
53
+
54
+ ## 事件
55
+
56
+ <TableLayoutView
57
+ componentKey="UserInfo"
58
+ type="event"
59
+ origin="sourceCode"
60
+ ></TableLayoutView>
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "微信开放能力",
3
+ "position": 100
4
+ }
package/src/index.js CHANGED
@@ -1,2 +1,4 @@
1
+ /* eslint-disable import/export */
2
+
1
3
  export * from './web/index';
2
4
  export { default as default } from './web/index';
@@ -41,6 +41,24 @@ Component({
41
41
  openType: {
42
42
  type: String,
43
43
  },
44
+ sessionFrom: {
45
+ type: String,
46
+ },
47
+ sendMessageTitle: {
48
+ type: String,
49
+ },
50
+ sendMessagePath: {
51
+ type: String,
52
+ },
53
+ sendMessageImg: {
54
+ type: String,
55
+ },
56
+ showMessageCard: {
57
+ type: Boolean,
58
+ },
59
+ appParameter: {
60
+ type: String,
61
+ }
44
62
  },
45
63
  data: {
46
64
  cls: '',
@@ -48,9 +66,7 @@ Component({
48
66
  methods: {
49
67
  ...handleEvents([
50
68
  { title: '点击', name: 'tap' },
51
- { title: '获取手机号', name: 'getPhoneNumber' },
52
69
  { title: '打开客服会话', name: 'contact' },
53
- { title: '获取用户信息', name: 'getUserInfo' },
54
70
  { title: '打开App', name: 'launchApp' },
55
71
  { title: '打开授权设置', name: 'openSetting' },
56
72
  ]),
@@ -7,13 +7,16 @@
7
7
  open-type="{{openType}}"
8
8
  form-type="{{formType}}"
9
9
  bind:tap="tap"
10
- bindgetphonenumber="{{'getP' + 'honeN' + 'umber'}}"
11
10
  bindcontact="contact"
12
- bindgetuserinfo="getUserInfo"
13
11
  bindlaunchapp="launchApp"
14
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}}"
15
19
  >
16
- {{text ? text : ''}}
20
+ <block>{{text ? text : ''}}</block>
17
21
  <slot name="contentSlot" wx:if="{{!text}}" />
18
22
  </button>
19
-
@@ -1,6 +1,5 @@
1
- <view class="weui-form weda-ui {{className}} {{style}}">
1
+ <view class="weui-form weda-ui {{className}}" style="{{style}}">
2
2
  <view class="weui-cells__group weui-cells__group_form">
3
3
  <slot name="contentSlot" />
4
4
  </view>
5
5
  </view>
6
-
@@ -1,8 +1,8 @@
1
1
  <view class="{{className}}" style="{{style}}">
2
2
  <view class="{{cls}}">
3
3
  <view wx:if="{{!!label}}" class="weda-formcells__label weui-cell">
4
- <label wx:if="{{requiredFlag}}" class="weda-formcells__flag">*</label>
5
4
  <label>{{label}}</label>
5
+ <label wx:if="{{requiredFlag}}" class="weda-formcells__flag">*</label>
6
6
  </view>
7
7
  <view class="weda-formcells__content {{isFlex ? 'weui-flex__item' : ''}}">
8
8
  <slot></slot>
@@ -6,4 +6,21 @@
6
6
  font-family: SimSun;
7
7
  font-size: 12px;
8
8
  color: #f60;
9
+ align-self: flex-start;
10
+ }
11
+
12
+ .weda-formcells.weui-flex .weda-formcells__label {
13
+ width: 130px;
14
+ }
15
+
16
+ .weui-cells__group_form .weui-cell {
17
+ padding: 16px 16px;
18
+ }
19
+
20
+ .weda-formcells__content.weui-flex__item .weui-cell_form {
21
+ padding: 0;
22
+ }
23
+
24
+ .weda-formcells__content.weui-flex__item .weui-cell_form {
25
+ padding-right: 16px;
9
26
  }
@@ -1 +1,16 @@
1
1
  @import '../../../style/weda-ui.wxss';
2
+
3
+ /*
4
+ 把weui-cell 的padding还回到input
5
+ */
6
+ .weda-ui .weui-input {
7
+ padding: 28rpx 0;
8
+ }
9
+
10
+ .weui-btn_input-clear {
11
+ align-self: center;
12
+ }
13
+
14
+ /**
15
+ * END
16
+ */
@@ -1,8 +1,5 @@
1
1
  /* components/location/location.wxss */
2
2
 
3
- .form-location {
4
- }
5
-
6
3
  .form-location-warp {
7
4
  display: flex;
8
5
  white-space: nowrap;
@@ -26,10 +23,11 @@
26
23
  bottom: 0;
27
24
  }
28
25
 
29
- .form-location-con {
26
+ .form-location_cell.form-location-con {
30
27
  flex: 1;
31
28
  display: flex;
32
29
  align-items: center;
30
+ padding-left: 0px;
33
31
  }
34
32
 
35
33
  .form-location-label_flag {
@@ -41,7 +39,7 @@
41
39
  }
42
40
 
43
41
  .form-location-label {
44
- max-width: 150px;
42
+ width: 130px;
45
43
  overflow: hidden;
46
44
  white-space: nowrap;
47
45
  text-overflow: ellipsis;
@@ -59,7 +57,7 @@
59
57
  }
60
58
 
61
59
  .form-location_cell {
62
- padding: 16px 32px;
60
+ padding: 16px;
63
61
  line-height: 1.41176471;
64
62
  font-size: 17px;
65
63
  overflow: hidden;
@@ -1,26 +1,11 @@
1
1
  import classNames from '../../../utils/classnames';
2
2
  import dayjs from '../../../utils/dayjs.min.js';
3
- import { getRegionTree, buildDisplayValue } from './region/index';
4
- import { provinces, cities, regions } from './region/index';
3
+ import { getRegionTree, buildDisplayValue , provinces, cities, regions } from './region/index';
5
4
  import destr from '../../../utils/destr';
6
5
  import { callDataSourceApi, callWedaApi } from '../../../utils/tcb';
6
+ import { REL_DICT } from '../../../utils/constant';
7
+ import { isNil } from '../../../utils/lodash';
7
8
 
8
- // 处理where筛选条件
9
- const isNull = (val) => [undefined, null].includes(val);
10
- const REL_DICT = {
11
- equal: 'eq', // 等于
12
- unequal: 'neq', // 不等于
13
- include: 'search', // 包含
14
- exclude: '_exclude', // 不包含
15
- begin_with: '_begin_with', // 开头是
16
- greater: 'gt', // 大于
17
- greater_or_equal: 'gte', // 大于等于
18
- bigger_or_equal: 'gte', //大于等于
19
- less: 'lt', // 小于
20
- less_or_equal: 'lte', // 小于等于
21
- in: 'in', // 多选值
22
- not_in: 'nin', // 不在多选值
23
- };
24
9
  const getWhereList = (where) => {
25
10
  let result = [];
26
11
  Array.isArray(where) &&
@@ -36,7 +21,7 @@ const getWhereList = (where) => {
36
21
  rel = 'regex';
37
22
  val = `^((?!${val}).)*$`;
38
23
  }
39
- if (item2?.logic !== 'or' && item2?.key && rel && !isNull(val)) {
24
+ if (item2?.logic !== 'or' && item2?.key && rel && !isNil(val)) {
40
25
  result.push({ key: item2.key, rel, val });
41
26
  }
42
27
  });
@@ -264,12 +249,14 @@ Component({
264
249
  },
265
250
  },
266
251
  observers: {
267
- 'defaultValue, defaultTime, defaultRegion,defaultMutiRegion': function (
252
+ 'defaultValue, defaultTime, defaultRegion,defaultMutiRegion,defaultDate': function (
268
253
  defaultValue,
269
254
  defaultTime,
270
- defaultRegion
255
+ defaultRegion,
256
+ defaultMutiRegion,
257
+ defaultDate
271
258
  ) {
272
- const { range, mode, separator, placeholder, dateMode, defaultDate, format, option, defaultMutiRegion } =
259
+ const { range, mode, separator, placeholder, dateMode, format, option } =
273
260
  this.properties;
274
261
  let value, displayValue;
275
262
  switch (mode) {
@@ -397,7 +384,10 @@ Component({
397
384
  async getProvince() {
398
385
  const { regionType, defaultMutiRegion } = this.properties;
399
386
  const changeData = await getRegionTree(defaultMutiRegion || '');
400
- this.triggerEvent('change', changeData);
387
+ //限制渲染时change事件触发,否则会有初始数据被覆盖问题
388
+ if (changeData?.result.length > 0) {
389
+ this.triggerEvent('change', changeData);
390
+ }
401
391
  var provinceList = [...provinces];
402
392
  var provinceArr = provinces.map((item) => { return { value: item.Value, code: item.Code }; }); //保存省级名称
403
393
  this.setData({
@@ -1 +1,5 @@
1
1
  @import '../../../style/weda-ui.wxss';
2
+ .weda-ui .weui-cell.weui-check__label {
3
+ padding: 16px;
4
+ padding-left: 0;
5
+ }
@@ -1,8 +1,8 @@
1
1
  import { callWedaApi } from '../../../../utils/tcb';
2
2
 
3
- export const provinces = [];
4
- export const cities = [];
5
- export const regions = [];
3
+ export let provinces = [];
4
+ export let cities = [];
5
+ export let regions = [];
6
6
  export let regionData = [];
7
7
  /**
8
8
  * 获取运行态地区数据
@@ -26,6 +26,9 @@ export const getRegionTree = async function (defaultValue) {
26
26
  return changeResult(defaultValue, regionData);
27
27
  };
28
28
  export const splitAreaData = (areaData) => {
29
+ provinces = [];
30
+ cities = [];
31
+ regions = [];
29
32
  areaData.forEach(item => {
30
33
  if (!item.Deprecated) {
31
34
  if (item?.Type == 1) {
@@ -64,7 +64,7 @@ Component({
64
64
  this.setData({
65
65
  cls: classNames({
66
66
  'weda-ui': true,
67
- 'weda-radio': true,
67
+ 'weda-textarea': true,
68
68
  [className]: className,
69
69
  }),
70
70
  });
@@ -1 +1,5 @@
1
1
  @import '../../../style/weda-ui.wxss';
2
+
3
+ .weda-ui .weda-textarea .weui-cell_form {
4
+ padding: 16px;
5
+ }
@@ -2,8 +2,9 @@
2
2
  "component": true,
3
3
  "styleIsolation": "shared",
4
4
  "usingComponents": {
5
- "mp-uploader": "weui-miniprogram/uploader/uploader",
5
+ "mp-uploader": "./weui-uploader",
6
6
  "mp-cells": "weui-miniprogram/cells/cells",
7
- "mp-cell": "weui-miniprogram/cell/cell"
7
+ "mp-cell": "weui-miniprogram/cell/cell",
8
+ "formcell": "../formcell"
8
9
  }
9
10
  }
@@ -1,20 +1,24 @@
1
- <mp-cells>
2
- <mp-cell>
3
- <mp-uploader
1
+ <view
2
+ class="weda-ui weui-cells weui-cells_form {{className}}"
3
+ id="{{id}}"
4
+ style="{{style}}"
5
+ >
6
+ <mp-uploader
4
7
  max-size="{{maxSize * 1024 * 1024}}"
5
8
  files="{{files}}"
9
+ title="{{title}}"
6
10
  showDelete="{{true}}"
7
11
  ext-class="{{layout}}"
8
12
  bindfail="uploadError"
9
13
  bindsuccess="uploadSuccess"
14
+ layout="{{layout}}"
10
15
  select="{{selectFile}}"
11
16
  upload="{{uploadFile}}"
12
17
  maxCount="{{maxCount}}"
13
- title="{{title}}"
14
18
  binddelete="onDelete">
15
- </mp-uploader>
16
- </mp-cell>
17
- </mp-cells>
19
+ </mp-uploader>
20
+ </view>
21
+
18
22
  <!-- uploader delete 实际代码接受 showDelete
19
23
  https://developers.weixin.qq.com/community/develop/doc/000a4e7b9cc158c110aa3961056400
20
24
  -->
@@ -13,6 +13,24 @@
13
13
  justify-content: space-between;
14
14
  }
15
15
 
16
- .weui-uploader.horizontal .weui-uploader__bd {
17
- padding-left: 32px;
16
+ .weui-uploader.horizontal .weda-formcells__label {
17
+ width: 130px;
18
+ }
19
+
20
+ .weui-uploader__label {
21
+ display: flex;
22
+ flex: 1;
23
+ }
24
+
25
+ .weui-uploader__title {
26
+ flex: unset;
27
+ }
28
+ .weda-ui .weui-uploader.horizontal .weui-uploader__bd {
29
+ padding: 16px 0;
30
+ }
31
+ .weda-ui .weui-uploader.vertical .weui-uploader__bd {
32
+ padding: 16px;
33
+ }
34
+ .weui-uploader__hd.vertical {
35
+ padding-bottom: 0;
18
36
  }