@cloudbase/weda-ui 0.2.15 → 0.2.16

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 (112) hide show
  1. package/package.json +10 -7
  2. package/src/configs/components/calendar.json +75 -0
  3. package/src/configs/components/carousel.json +273 -0
  4. package/src/configs/components/chart/statisticsCard.json +331 -0
  5. package/src/configs/components/dataView.json +139 -0
  6. package/src/configs/components/form/location.json +152 -0
  7. package/src/configs/components/form/uploaderFile.json +2 -1
  8. package/src/configs/components/graphicCard.json +399 -0
  9. package/src/configs/components/link.json +2 -2
  10. package/src/configs/components/listView.json +230 -0
  11. package/src/configs/components/navLayout.json +350 -0
  12. package/src/configs/components/swiper.json +3 -3
  13. package/src/configs/index.js +16 -0
  14. package/src/mp/components/button/index.js +12 -13
  15. package/src/mp/components/button/index.wxml +1 -1
  16. package/src/mp/components/calendar/arrowright--line.svg +11 -0
  17. package/src/mp/components/calendar/index.js +238 -0
  18. package/src/mp/components/calendar/index.json +4 -0
  19. package/src/mp/components/calendar/index.wxml +37 -0
  20. package/src/mp/components/calendar/index.wxss +178 -0
  21. package/src/mp/components/carousel/index.js +88 -0
  22. package/src/mp/components/carousel/index.json +7 -0
  23. package/src/mp/components/carousel/index.wxml +6 -0
  24. package/src/mp/components/chart/statisticsCard/index.js +226 -0
  25. package/src/mp/components/chart/statisticsCard/index.json +4 -0
  26. package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
  27. package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
  28. package/src/mp/components/dataView/index.js +34 -0
  29. package/src/mp/components/dataView/index.json +7 -0
  30. package/src/mp/components/dataView/index.wxml +15 -0
  31. package/src/mp/components/dataView/index.wxss +0 -0
  32. package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
  33. package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
  34. package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
  35. package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
  36. package/src/mp/components/form/location/index.js +341 -0
  37. package/src/mp/components/form/location/index.json +6 -0
  38. package/src/mp/components/form/location/index.wxml +25 -0
  39. package/src/mp/components/form/location/index.wxss +91 -0
  40. package/src/mp/components/form/uploader/index.js +39 -35
  41. package/src/mp/components/form/uploaderFile/index.js +61 -14
  42. package/src/mp/components/graphicCard/chevron-right.svg +3 -0
  43. package/src/mp/components/graphicCard/index.js +205 -0
  44. package/src/mp/components/graphicCard/index.json +4 -0
  45. package/src/mp/components/graphicCard/index.wxml +29 -0
  46. package/src/mp/components/graphicCard/index.wxss +157 -0
  47. package/src/mp/components/image/index.js +0 -1
  48. package/src/mp/components/listView/arrow-right-line.svg +3 -0
  49. package/src/mp/components/listView/index.js +286 -0
  50. package/src/mp/components/listView/index.json +4 -0
  51. package/src/mp/components/listView/index.wxml +40 -0
  52. package/src/mp/components/listView/index.wxss +150 -0
  53. package/src/mp/components/listView/more-line.svg +3 -0
  54. package/src/mp/components/navLayout/index.js +123 -0
  55. package/src/mp/components/navLayout/index.json +7 -0
  56. package/src/mp/components/navLayout/index.wxml +25 -0
  57. package/src/mp/components/navLayout/index.wxss +1193 -0
  58. package/src/mp/components/swiper/index.wxml +2 -0
  59. package/src/mp/index.json +9 -1
  60. package/src/mp/utils/debounce.js +133 -0
  61. package/src/mp/utils/dr_square_point.js +25 -0
  62. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
  63. package/src/mp/utils/spark-md5.js +776 -0
  64. package/src/mp/utils/tcb.js +18 -0
  65. package/src/web/components/calendar/index.css +382 -0
  66. package/src/web/components/calendar/index.jsx +312 -0
  67. package/src/web/components/calendar/util.js +90 -0
  68. package/src/web/components/carousel/index.css +119 -0
  69. package/src/web/components/carousel/index.tsx +417 -0
  70. package/src/web/components/chart/statisticsCard/index.css +62 -0
  71. package/src/web/components/chart/statisticsCard/index.tsx +286 -0
  72. package/src/web/components/chart/statisticsCard/interface.ts +14 -0
  73. package/src/web/components/dataView/index.tsx +20 -0
  74. package/src/web/components/dataView/interface.ts +6 -0
  75. package/src/web/components/form/location/common/mapChoose.css +178 -0
  76. package/src/web/components/form/location/common/mapChoose.jsx +343 -0
  77. package/src/web/components/form/location/common/mapView.jsx +190 -0
  78. package/src/web/components/form/location/common/propsConfig.js +54 -0
  79. package/src/web/components/form/location/common/selectModal.css +44 -0
  80. package/src/web/components/form/location/common/selectModal.jsx +82 -0
  81. package/src/web/components/form/location/common/useLocationInfo.js +100 -0
  82. package/src/web/components/form/location/components/LocationH5/index.css +243 -0
  83. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
  84. package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
  85. package/src/web/components/form/location/components/LocationPC/index.css +44 -0
  86. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
  87. package/src/web/components/form/location/constants.js +4 -0
  88. package/src/web/components/form/location/index.css +0 -0
  89. package/src/web/components/form/location/index.jsx +25 -0
  90. package/src/web/components/form/uploader/uploader.h5.tsx +16 -10
  91. package/src/web/components/form/uploader/uploader.pc.tsx +15 -11
  92. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +122 -107
  93. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +22 -19
  94. package/src/web/components/graphicCard/index.css +163 -0
  95. package/src/web/components/graphicCard/index.tsx +309 -0
  96. package/src/web/components/image/image.tsx +0 -1
  97. package/src/web/components/index.js +12 -0
  98. package/src/web/components/listView/arrow-right-line.svg +3 -0
  99. package/src/web/components/listView/index.css +139 -0
  100. package/src/web/components/listView/index.tsx +354 -0
  101. package/src/web/components/listView/interface.ts +98 -0
  102. package/src/web/components/navLayout/index.css +332 -0
  103. package/src/web/components/navLayout/index.tsx +247 -0
  104. package/src/web/components/tabs/index.tsx +2 -2
  105. package/src/web/components/tabs/tabs.h5.tsx +7 -4
  106. package/src/web/components/uploaderFileView/index.css +9 -9
  107. package/src/web/components/uploaderFileView/index.jsx +32 -23
  108. package/src/web/types.d.ts +15 -14
  109. package/src/web/utils/debounce.js +98 -0
  110. package/src/web/utils/platform.js +31 -0
  111. package/src/web/utils/tcb.js +35 -0
  112. package/src/web/utils/tmap.js +4 -0
@@ -0,0 +1,350 @@
1
+ {
2
+ "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
+ "data": {
4
+ "properties": {
5
+ "navOption": {
6
+ "type": "array",
7
+ "title": "导航设置",
8
+ "icon":"icon",
9
+ "items": {
10
+ "type": "object",
11
+ "title": "tabs",
12
+ "x-icon": "this.icon !== '自定义图片' ? this.icon : null",
13
+ "x-image": "this.icon === '自定义图片' ? this.iconSrc : null",
14
+ "default": {
15
+ "icon": "自定义图片",
16
+ "title": "导航标题",
17
+ "iconSrc":"https://qcloudimg.tencent-cloud.cn/raw/fe54a986a821473655ba20afe30a543a.png"
18
+ },
19
+ "display": "title",
20
+ "properties": {
21
+ "icon": {
22
+ "type": "string",
23
+ "x-component": "icon2",
24
+ "x-component-props": {
25
+ "footer": {
26
+ "value": "自定义图片",
27
+ "label": "自定义图片"
28
+ }
29
+ },
30
+ "x-linkages": [
31
+ {
32
+ "type": "value:visible",
33
+ "target": "*(dataForm.iconSrc)",
34
+ "condition": "{{$self.value=='自定义图片'}}"
35
+ }
36
+ ],
37
+ "title": "icon",
38
+ "default": "td:image",
39
+ "enum": [
40
+ "nointernet",
41
+ "success",
42
+ "warning",
43
+ "pending",
44
+ "refresh",
45
+ "folder",
46
+ "arrowup",
47
+ "arrowdown",
48
+ "arrowleft",
49
+ "arrowright",
50
+ "chevronup",
51
+ "chevrondown",
52
+ "chevronleft",
53
+ "chevronright",
54
+ "delete",
55
+ "edit",
56
+ "search",
57
+ "check",
58
+ "close",
59
+ "add",
60
+ "download",
61
+ "success-fill",
62
+ "close-fill",
63
+ "info-fill",
64
+ "pending-fill",
65
+ "warning-fill",
66
+ "more",
67
+ "star",
68
+ "star-fill",
69
+ "location",
70
+ "question"
71
+ ],
72
+ "x-index": 30
73
+ },
74
+ "iconSrc": {
75
+ "type": "image",
76
+ "title": "",
77
+ "default": "",
78
+ "x-index": 35
79
+ },
80
+ "title": {
81
+ "type": "string",
82
+ "title": "标题",
83
+ "default": "导航标题",
84
+ "x-index": 10
85
+ },
86
+ "tapStatus":{
87
+ "enum": [
88
+ {
89
+ "value": "tap",
90
+ "label": "无行为",
91
+ "icon": "weda-editor-icon-alert-close"
92
+ },
93
+ {
94
+ "value": "inside",
95
+ "label": "打开页面",
96
+ "icon": "weda-editor-icon-docs"
97
+ },
98
+ {
99
+ "value": "outer",
100
+ "label": "外部链接",
101
+ "icon": "weda-editor-icon-link",
102
+ "tooltip":[{
103
+ "platform":["ALL","MP"],
104
+ "text":"小程序平台不支持跳转外部链接"
105
+ }],
106
+ "disabled": [{
107
+ "platform":["MP"]
108
+ }]
109
+ }
110
+ ],
111
+ "type": "string",
112
+ "title": "点击时",
113
+ "default": "tap",
114
+ "x-index": 40,
115
+ "x-component": "icon-text-radio",
116
+ "x-linkages": [
117
+ {
118
+ "type": "value:visible",
119
+ "target": "*(dataForm.insideUrl)",
120
+ "condition": "{{$self.value=='inside'}}"
121
+ },
122
+ {
123
+ "type": "value:visible",
124
+ "target": "*(dataForm.outerUrl)",
125
+ "condition": "{{$self.value=='outer'}}"
126
+ },
127
+ {
128
+ "type": "value:visible",
129
+ "target": "*(dataForm.withParams)",
130
+ "condition": "{{$self.value=='inside'}}"
131
+ },
132
+ {
133
+ "type": "value:visible",
134
+ "target": "*(dataForm.newPage)",
135
+ "condition": "{{$self.value=='outer'}}"
136
+ }
137
+ ]
138
+ },
139
+ "insideUrl": {
140
+ "type": "string",
141
+ "x-component": "page-list",
142
+ "default": "",
143
+ "title": "应用页面",
144
+ "x-category": "基础属性",
145
+ "x-index": 120,
146
+ "x-component-props": {
147
+ "hideAddPlatform": ["MP"],
148
+ "addHidden":true
149
+ },
150
+ "x-linkages": [
151
+ {
152
+ "type": "value:state",
153
+ "target": "*(dataForm.params)",
154
+ "condition": "{{$self.value && $self.value.length>0}}",
155
+ "state":{
156
+ "pageId":"{{$self.value}}"
157
+ }
158
+ }
159
+
160
+ ]
161
+ },
162
+ "outerUrl": {
163
+ "title": "URL地址",
164
+ "default": "",
165
+ "type": "string"
166
+ },
167
+ "newPage": {
168
+ "title": "打开新页面",
169
+ "default": false,
170
+ "type": "boolean"
171
+ },
172
+ "withParams": {
173
+ "title": "携带参数",
174
+ "default": false,
175
+ "type": "boolean",
176
+ "x-linkages": [
177
+ {
178
+ "type": "value:visible",
179
+ "target": "*(dataForm.params)",
180
+ "condition": "{{$self.value==true}}"
181
+ }
182
+ ]
183
+ },
184
+ "params": {
185
+ "type": "array",
186
+ "title": "参数",
187
+ "pageId":"",
188
+ "x-component":"page-params",
189
+ "default": []
190
+ }
191
+ }
192
+ },
193
+ "default": [
194
+ {
195
+ "icon": "自定义图片",
196
+ "iconSrc":"https://qcloudimg.tencent-cloud.cn/raw/82b92ea0caf05f372f3432bd44764f0a.png",
197
+ "title": "导航标题",
198
+ "tapStatus": "tap"
199
+ },
200
+ {
201
+ "icon": "自定义图片",
202
+ "iconSrc":"https://qcloudimg.tencent-cloud.cn/raw/fe54a986a821473655ba20afe30a543a.png",
203
+ "title": "导航标题",
204
+ "tapStatus": "tap"
205
+ },
206
+ {
207
+ "icon": "自定义图片",
208
+ "iconSrc":"https://qcloudimg.tencent-cloud.cn/raw/12a888a3abe20890894ccf6e73a9eb06.png",
209
+ "title": "导航标题",
210
+ "tapStatus": "tap"
211
+ },
212
+ {
213
+ "icon": "自定义图片",
214
+ "iconSrc":"https://qcloudimg.tencent-cloud.cn/raw/8330f8833919254e6b779fb543a53e39.png",
215
+ "title": "导航标题",
216
+ "tapStatus": "tap"
217
+ }
218
+ ],
219
+ "x-index": 1,
220
+ "x-component": "list"
221
+ },
222
+ "mobileCol": {
223
+ "type": "number",
224
+ "default": 4,
225
+ "title": "移动端列数",
226
+ "x-category": "基础属性",
227
+ "enum": [
228
+ {
229
+ "label": "3",
230
+ "value": 3
231
+ },
232
+ {
233
+ "label": "4",
234
+ "value": 4
235
+ },
236
+ {
237
+ "label": "5",
238
+ "value": 5
239
+ }
240
+ ]
241
+ },
242
+ "pcCol": {
243
+ "type": "number",
244
+ "default": 4,
245
+ "title": "PC端列数",
246
+ "x-category": "基础属性",
247
+ "enum": [
248
+ {
249
+ "label": "3",
250
+ "value": 3
251
+ },
252
+ {
253
+ "label": "4",
254
+ "value": 4
255
+ },
256
+ {
257
+ "label": "5",
258
+ "value": 5
259
+ },
260
+ {
261
+ "label": "6",
262
+ "value": 6
263
+ }
264
+ ]
265
+ },
266
+ "iconSize": {
267
+ "type": "string",
268
+ "default": "medium",
269
+ "title": "icon尺寸",
270
+ "x-category": "基础属性",
271
+ "enum": [
272
+ {
273
+ "label": "小",
274
+ "value": "small"
275
+ },
276
+ {
277
+ "label": "中",
278
+ "value": "medium"
279
+ },
280
+ {
281
+ "label": "大",
282
+ "value": "big"
283
+ }
284
+ ]
285
+ },
286
+ "textColor": {
287
+ "title": "标题颜色",
288
+ "type": "string",
289
+ "x-component": "color",
290
+ "x-index": 50,
291
+ "x-category": "高级属性",
292
+ "default": "rgb(0, 0, 0)"
293
+ },
294
+
295
+ "fontWeight": {
296
+ "type": "string",
297
+ "title": "字重",
298
+ "default": "normal",
299
+ "x-category": "高级属性",
300
+ "x-index": 40,
301
+ "enum": [
302
+ {
303
+ "label": "细",
304
+ "value": "lighter"
305
+ },
306
+ {
307
+ "label": "正常",
308
+ "value": "normal"
309
+ },
310
+ {
311
+ "label": "粗",
312
+ "value": "bolder"
313
+ }
314
+ ]
315
+ },
316
+ "fontSize": {
317
+ "type": "number",
318
+ "title": "字号",
319
+ "default": 14,
320
+ "x-category": "高级属性",
321
+ "x-props":{
322
+ "min":0,
323
+ "max":100
324
+ },
325
+ "x-index":45
326
+ },
327
+ "lineHeight": {
328
+ "title": "行高",
329
+ "type": "string",
330
+ "x-index": 56,
331
+ "x-category": "高级属性",
332
+ "default": "auto"
333
+ },
334
+ "maxLines": {
335
+ "title": "标题行数",
336
+ "type": "number",
337
+ "default": 1,
338
+ "x-index": 60,
339
+ "x-category": "高级属性"
340
+ }
341
+ }
342
+ },
343
+ "meta": {
344
+ "title": "宫格导航",
345
+ "description": "宫格布局导航",
346
+ "category": "导航菜单",
347
+ "componentOrder": 100,
348
+ "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/NavLayout.svg"
349
+ }
350
+ }
@@ -67,9 +67,9 @@
67
67
  }
68
68
  ],
69
69
  "meta": {
70
- "title": "轮播",
71
- "description": "轮播图组件",
72
- "category": "展示",
70
+ "title": "轮播容器",
71
+ "description": "轮播容器",
72
+ "category": "布局容器",
73
73
  "componentOrder": 80,
74
74
  "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Swiper.svg"
75
75
  },
@@ -7,6 +7,7 @@ import Link from './components/link.json';
7
7
  // import DatePicker from './components/picker/datePicker.json';
8
8
  // import TimePicker from './components/picker/timePicker.json';
9
9
  import Input from './components/form/input.json';
10
+ import Location from './components/form/location.json';
10
11
  import Textarea from './components/form/textarea.json';
11
12
  import Radio from './components/form/radio.json';
12
13
  import Checkbox from './components/form/checkbox.json';
@@ -19,6 +20,7 @@ import Uploader from './components/form/uploader.json';
19
20
  import UploaderFile from './components/form/uploaderFile.json';
20
21
  import ScrollView from './components/scrollVeiw.json';
21
22
  import Swiper from './components/swiper.json';
23
+ import Carousel from './components/carousel.json';
22
24
  // import Label from './components/form/label.json';
23
25
  import Tips from './components/form/tips.json';
24
26
  import Modal from './components/modal.json';
@@ -26,10 +28,16 @@ import Drawer from './components/drawer.json';
26
28
  import RichText from './components/form/richText.json';
27
29
  import RichTextView from './components/richtextview.json';
28
30
  import Tabs from './components/tabs.json';
31
+ import Calendar from './components/calendar.json';
32
+ import NavLayout from './components/navLayout.json';
29
33
 
30
34
  import showToast from './actions/showToast.json';
31
35
  import showModal from './actions/showModal.json';
32
36
 
37
+ import ListView from './components/listView.json';
38
+ import DataView from './components/dataView.json';
39
+ import StatisticsCard from './components/chart/statisticsCard.json';
40
+ import GraphicCard from './components/graphicCard.json';
33
41
  export const components = {
34
42
  Button,
35
43
  Text,
@@ -44,6 +52,7 @@ export const components = {
44
52
  Switch,
45
53
  Form,
46
54
  Textarea,
55
+ Location,
47
56
  // Cells,
48
57
  Select,
49
58
  Auth,
@@ -52,6 +61,7 @@ export const components = {
52
61
  UploaderFile,
53
62
  ScrollView,
54
63
  Swiper,
64
+ Carousel,
55
65
  // Label,
56
66
  Tips,
57
67
  Modal,
@@ -60,6 +70,12 @@ export const components = {
60
70
  Link,
61
71
  Drawer,
62
72
  Tabs,
73
+ Calendar,
74
+ ListView,
75
+ DataView,
76
+ NavLayout,
77
+ StatisticsCard,
78
+ GraphicCard,
63
79
  };
64
80
 
65
81
  export const actions = {
@@ -45,9 +45,18 @@ Component({
45
45
  data: {
46
46
  cls: '',
47
47
  },
48
- lifetimes: {
49
- attached() {
50
- const { className, size, type, disabled } = this.properties;
48
+ methods: {
49
+ ...handleEvents([
50
+ { title: '点击', name: 'tap' },
51
+ { title: '获取手机号', name: 'getPhoneNumber' },
52
+ { title: '打开客服会话', name: 'contact' },
53
+ { title: '获取用户信息', name: 'getUserInfo' },
54
+ { title: '打开App', name: 'launchApp' },
55
+ { title: '打开授权设置', name: 'openSetting' },
56
+ ]),
57
+ },
58
+ observers: {
59
+ 'className,size,type,disabled': function (className, size, type, disabled) {
51
60
  const cls = classNames('weda-ui', {
52
61
  'weda-button': true,
53
62
  'weui-btn': true,
@@ -63,14 +72,4 @@ Component({
63
72
  this.setData({ cls });
64
73
  },
65
74
  },
66
- methods: {
67
- ...handleEvents([
68
- { title: '点击', name: 'tap' },
69
- { title: '获取手机号', name: 'getPhoneNumber' },
70
- { title: '打开客服会话', name: 'contact' },
71
- { title: '获取用户信息', name: 'getUserInfo' },
72
- { title: '打开App', name: 'launchApp' },
73
- { title: '打开授权设置', name: 'openSetting' },
74
- ]),
75
- },
76
75
  });
@@ -7,7 +7,7 @@
7
7
  open-type="{{openType}}"
8
8
  form-type="{{formType}}"
9
9
  bind:tap="tap"
10
- bindgetphonenumber="getPhoneNumber"
10
+ bindgetphonenumber="{{'getP' + 'honeN' + 'umber'}}"
11
11
  bindcontact="contact"
12
12
  bindgetuserinfo="getUserInfo"
13
13
  bindlaunchapp="launchApp"
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
2
+ <title>chevron-right</title>
3
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
4
+ <g id="Icons" transform="translate(-320.000000, -951.000000)">
5
+ <g id="chevron-right" transform="translate(320.000000, 951.000000)">
6
+ <path d="M16,0 L16,16 L0,16 L0,0 L16,0 Z" id="矩形" opacity="0.600000024" transform="translate(8.000000, 8.000000) scale(-1, -1) rotate(90.000003) translate(-8.000000, -8.000000) "/>
7
+ <path d="M4.68942324,5.31054639 L8.22980396,8.85092687 L11.7701844,5.31054639 L12.6894235,6.2297852 L8.22980396,10.6894045 L3.77018443,6.2297852 L4.68942324,5.31054639 Z" id="路径-4-(Stroke)" fill="#000000" transform="translate(8.229804, 7.999975) scale(-1, -1) rotate(90.000003) translate(-8.229804, -7.999975) "/>
8
+ </g>
9
+ </g>
10
+ </g>
11
+ </svg>