@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.
- package/package.json +6 -4
- package/src/configs/components/button.json +0 -2
- package/src/configs/components/calendar.json +5 -2
- package/src/configs/components/carousel.json +18 -9
- package/src/configs/components/chart/bar.json +12 -6
- package/src/configs/components/chart/line.json +8 -4
- package/src/configs/components/chart/pie.json +8 -4
- package/src/configs/components/dataView.json +11 -6
- package/src/configs/components/form/radio.json +27 -0
- package/src/configs/components/form/select.json +2 -2
- package/src/configs/components/graphicCard.json +6 -2
- package/src/configs/components/image.json +12 -6
- package/src/configs/components/link.json +6 -3
- package/src/configs/components/listView.json +21 -11
- package/src/configs/components/lottery.json +153 -0
- package/src/configs/components/navLayout.json +12 -6
- package/src/configs/components/richtextview.json +2 -1
- package/src/configs/components/scrollVeiw.json +24 -12
- package/src/configs/components/swiper.json +18 -9
- package/src/configs/components/tabs.json +4 -2
- package/src/configs/components/text.json +10 -5
- package/src/configs/index.js +2 -0
- package/src/docs/common/format.tsx +112 -0
- package/src/docs/common/tableView.css +164 -0
- package/src/docs/common/tableView.tsx +273 -0
- package/src/docs/compsdocs/chart/Bar.mdx +159 -0
- package/src/docs/compsdocs/chart/Line.mdx +100 -0
- package/src/docs/compsdocs/chart/Pie.mdx +83 -0
- package/src/docs/compsdocs/chart/_category_.json +1 -0
- package/src/docs/compsdocs/chart/statisticsCard.mdx +51 -0
- package/src/docs/compsdocs/database/DataView.mdx +33 -0
- package/src/docs/compsdocs/database/ListView.mdx +33 -0
- package/src/docs/compsdocs/database/_category_.json +1 -0
- package/src/docs/compsdocs/form/Form.mdx +35 -0
- package/src/docs/compsdocs/form/FormCheckbox.mdx +35 -0
- package/src/docs/compsdocs/form/FormDate.mdx +30 -0
- package/src/docs/compsdocs/form/FormEmail.mdx +30 -0
- package/src/docs/compsdocs/form/FormImageUploader.mdx +31 -0
- package/src/docs/compsdocs/form/FormInput.mdx +30 -0
- package/src/docs/compsdocs/form/FormLocation.mdx +64 -0
- package/src/docs/compsdocs/form/FormPhone.mdx +30 -0
- package/src/docs/compsdocs/form/FormRadio.mdx +35 -0
- package/src/docs/compsdocs/form/FormRegion.mdx +30 -0
- package/src/docs/compsdocs/form/FormSelect.mdx +36 -0
- package/src/docs/compsdocs/form/FormSwitch.mdx +30 -0
- package/src/docs/compsdocs/form/FormTextarea.mdx +30 -0
- package/src/docs/compsdocs/form/FormTime.mdx +30 -0
- package/src/docs/compsdocs/form/FormUploadFile.mdx +30 -0
- package/src/docs/compsdocs/form/FormUrl.mdx +30 -0
- package/src/docs/compsdocs/form/_category_.json +1 -0
- package/src/docs/compsdocs/grid/Card.mdx +32 -0
- package/src/docs/compsdocs/grid/Container.mdx +42 -0
- package/src/docs/compsdocs/grid/Footer.mdx +31 -0
- package/src/docs/compsdocs/grid/GridLayout.mdx +32 -0
- package/src/docs/compsdocs/grid/Header.mdx +31 -0
- package/src/docs/compsdocs/grid/Layout.mdx +25 -0
- package/src/docs/compsdocs/grid/List.mdx +31 -0
- package/src/docs/compsdocs/grid/ScrollView.mdx +37 -0
- package/src/docs/compsdocs/grid/Swiper.mdx +58 -0
- package/src/docs/compsdocs/grid/_category_.json +1 -0
- package/src/docs/compsdocs/media/Icon.mdx +31 -0
- package/src/docs/compsdocs/media/Image.mdx +55 -0
- package/src/docs/compsdocs/media/_category_.json +1 -0
- package/src/docs/compsdocs/model/ModelCreate.mdx +20 -0
- package/src/docs/compsdocs/model/ModelDetail.mdx +20 -0
- package/src/docs/compsdocs/model/ModelTable.mdx +24 -0
- package/src/docs/compsdocs/model/ModelUpdate.mdx +21 -0
- package/src/docs/compsdocs/model/PageLayout.mdx +21 -0
- package/src/docs/compsdocs/model/_category_.json +1 -0
- package/src/docs/compsdocs/navmenu/Classification.mdx +38 -0
- package/src/docs/compsdocs/navmenu/NavBar.mdx +43 -0
- package/src/docs/compsdocs/navmenu/NavLayout.mdx +30 -0
- package/src/docs/compsdocs/navmenu/TabBar.mdx +43 -0
- package/src/docs/compsdocs/navmenu/TabBarItem.mdx +29 -0
- package/src/docs/compsdocs/navmenu/_category_.json +1 -0
- package/src/docs/compsdocs/senior/Lottery.mdx +48 -0
- package/src/docs/compsdocs/senior/Modal.mdx +58 -0
- package/src/docs/compsdocs/senior/SlotMachine.mdx +52 -0
- package/src/docs/compsdocs/senior/_category_.json +1 -0
- package/src/docs/compsdocs/show/Calendar.mdx +29 -0
- package/src/docs/compsdocs/show/Divider.mdx +31 -0
- package/src/docs/compsdocs/show/GraphicCard.mdx +30 -0
- package/src/docs/compsdocs/show/Item.mdx +32 -0
- package/src/docs/compsdocs/show/ItemList.mdx +47 -0
- package/src/docs/compsdocs/show/Media.mdx +25 -0
- package/src/docs/compsdocs/show/StatusTip.mdx +25 -0
- package/src/docs/compsdocs/show/Swiper.mdx +33 -0
- package/src/docs/compsdocs/show/Tabs.mdx +38 -0
- package/src/docs/compsdocs/show/_category_.json +1 -0
- package/src/docs/compsdocs/show/button.mdx +25 -0
- package/src/docs/compsdocs/text/Link.mdx +43 -0
- package/src/docs/compsdocs/text/RichTextView.mdx +36 -0
- package/src/docs/compsdocs/text/Text.mdx +31 -0
- package/src/docs/compsdocs/text/Title.mdx +32 -0
- package/src/docs/compsdocs/text/_category_.json +1 -0
- package/src/docs/compsdocs/wxOpen/Phone.mdx +60 -0
- package/src/docs/compsdocs/wxOpen/Share.mdx +46 -0
- package/src/docs/compsdocs/wxOpen/UserInfo.mdx +60 -0
- package/src/docs/compsdocs/wxOpen/_category_.json +4 -0
- package/src/index.js +2 -0
- package/src/mp/components/button/index.js +18 -2
- package/src/mp/components/button/index.wxml +7 -4
- package/src/mp/components/form/form/index.wxml +1 -2
- package/src/mp/components/form/formcell/index.wxml +1 -1
- package/src/mp/components/form/formcell/index.wxss +17 -0
- package/src/mp/components/form/input/index.wxss +15 -0
- package/src/mp/components/form/location/index.wxss +4 -6
- package/src/mp/components/form/select/index.js +13 -23
- package/src/mp/components/form/select/index.wxss +4 -0
- package/src/mp/components/form/select/region/index.js +6 -3
- package/src/mp/components/form/textarea/index.js +1 -1
- package/src/mp/components/form/textarea/index.wxss +4 -0
- package/src/mp/components/form/uploader/index.json +3 -2
- package/src/mp/components/form/uploader/index.wxml +11 -7
- package/src/mp/components/form/uploader/index.wxss +20 -2
- package/src/mp/components/form/uploader/weui-uploader.js +209 -0
- package/src/mp/components/form/uploader/weui-uploader.json +7 -0
- package/src/mp/components/form/uploader/weui-uploader.wxml +45 -0
- package/src/mp/components/form/uploader/weui-uploader.wxss +1 -0
- package/src/mp/components/form/uploaderFile/index.wxss +4 -4
- package/src/mp/components/image/index.wxss +3 -2
- package/src/mp/components/listView/index.js +5 -16
- package/src/mp/components/lottery/index.js +270 -0
- package/src/mp/components/lottery/index.json +4 -0
- package/src/mp/components/lottery/index.wxml +43 -0
- package/src/mp/components/lottery/index.wxss +317 -0
- package/src/mp/components/wxOpenApi/phone/index.js +1 -1
- package/src/mp/index.json +4 -3
- package/src/mp/style/weda-ui.wxss +14 -0
- package/src/mp/utils/constant.js +15 -0
- package/src/mp/utils/lodash.js +2 -0
- package/src/web/components/button/index.tsx +7 -7
- package/src/web/components/calendar/index.jsx +1 -1
- package/src/web/components/carousel/index.tsx +8 -8
- package/src/web/components/chart/common/config/line.js +1 -1
- package/src/web/components/form/checkbox/index.tsx +6 -0
- package/src/web/components/form/form/index.css +5 -1
- package/src/web/components/form/form/index.tsx +3 -1
- package/src/web/components/form/formcell/index.css +22 -1
- package/src/web/components/form/formcell/index.tsx +11 -6
- package/src/web/components/form/input/index.css +7 -12
- package/src/web/components/form/location/components/LocationH5/index.css +4 -7
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +1 -1
- package/src/web/components/form/radio/index.tsx +6 -0
- package/src/web/components/form/select/h5.tsx +5 -24
- package/src/web/components/form/select/index.css +11 -0
- package/src/web/components/form/select/index.tsx +4 -17
- package/src/web/components/form/textarea/index.css +4 -0
- package/src/web/components/form/textarea/index.tsx +2 -2
- package/src/web/components/form/tips/index.css +4 -0
- package/src/web/components/form/tips/index.tsx +4 -3
- package/src/web/components/form/uploader/index.css +26 -2
- package/src/web/components/form/uploader/uploader.h5.tsx +81 -56
- package/src/web/components/form/uploaderFile/index.css +2 -4
- package/src/web/components/image/index.css +5 -5
- package/src/web/components/image/index.tsx +6 -7
- package/src/web/components/index.js +1 -0
- package/src/web/components/link/index.tsx +2 -2
- package/src/web/components/listView/index.tsx +6 -19
- package/src/web/components/lottery/index.css +327 -0
- package/src/web/components/lottery/index.tsx +567 -0
- package/src/web/components/lottery/lotteryUtil.ts +130 -0
- package/src/web/components/navLayout/index.tsx +2 -2
- package/src/web/components/navigationBar/index.tsx +0 -1
- package/src/web/components/picker/timePicker.tsx +2 -2
- package/src/web/components/slot/index.tsx +1 -1
- package/src/web/components/text/index.tsx +6 -6
- package/src/web/utils/{constant.js → constant.ts} +17 -2
- package/src/web/utils/lodash.ts +2 -0
- package/src/web/weda-ui.css +5 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
|
|
3
|
+
"data": {
|
|
4
|
+
"properties": {
|
|
5
|
+
"prizeList": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"title": "奖品设置",
|
|
8
|
+
"description": "仅前8项奖品会展示在组件中",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"title": "prizeList",
|
|
12
|
+
"default": {
|
|
13
|
+
"title": "奖品名称",
|
|
14
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/0aa4dc06-e375-45c2-8ec2-0461a83d5d4a.png"
|
|
15
|
+
},
|
|
16
|
+
"properties": {
|
|
17
|
+
"title": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"title": "奖品名称",
|
|
20
|
+
"default": "一等奖"
|
|
21
|
+
},
|
|
22
|
+
"image": {
|
|
23
|
+
"type": "image",
|
|
24
|
+
"title": "奖品图片",
|
|
25
|
+
"default": ""
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"default": [
|
|
30
|
+
{
|
|
31
|
+
"title": "8元优惠券",
|
|
32
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/70122750-ba8b-4ac7-be71-c2300f1f8c6f.png"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"title": "劳动节水杯",
|
|
36
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/c2842881-5e15-409d-8dd3-352205abe38c.png"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"title": "10元优惠券",
|
|
40
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/b99c4350-c619-4fff-90e0-1980075e0417.png"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/7cefce40-73e4-4cdd-aa30-d178a4cb6624.png",
|
|
44
|
+
"title": "旅行背包"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"title": "谢谢参与",
|
|
48
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/0aa4dc06-e375-45c2-8ec2-0461a83d5d4a.png"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"title": "20积分",
|
|
52
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/de35f413-6971-4ab3-a816-9c488e169d46.png"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"title": "流量券",
|
|
56
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/3c0ff8a2-8362-4219-875d-0778d65bba80.png"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"title": "10元优惠券",
|
|
60
|
+
"image": "https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/d11056cc-b8a1-4d50-b993-65d8a434802f.png"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"x-index": 10,
|
|
64
|
+
"x-component": "list-bind-switch",
|
|
65
|
+
"x-component-props": {
|
|
66
|
+
"origin-component": "list"
|
|
67
|
+
},
|
|
68
|
+
"x-props": {
|
|
69
|
+
"data-withBindMeta": true
|
|
70
|
+
},
|
|
71
|
+
"x-linkages": [
|
|
72
|
+
{
|
|
73
|
+
"type": "value:schema",
|
|
74
|
+
"schema": {
|
|
75
|
+
"x-component-props": {
|
|
76
|
+
"options": "{{ $value.map((title, index) => ({label: '奖品名称' + (index + 1), value: index}) ) }}"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"target": "selectedIndex"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"enablePrize": {
|
|
84
|
+
"type": "boolean",
|
|
85
|
+
"title": "启动抽奖",
|
|
86
|
+
"x-index": 20,
|
|
87
|
+
"default": true
|
|
88
|
+
},
|
|
89
|
+
"prizeResult": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"title": "抽奖结果",
|
|
92
|
+
"x-index": 30,
|
|
93
|
+
"default": "1",
|
|
94
|
+
"description": "以左上角为起始位置,顺时针确定8个奖品位置分别1-8",
|
|
95
|
+
"enum": [
|
|
96
|
+
{
|
|
97
|
+
"label": "1",
|
|
98
|
+
"value": "1"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"label": "2",
|
|
102
|
+
"value": "2"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"label": "3",
|
|
106
|
+
"value": "3"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"label": "4",
|
|
110
|
+
"value": "4"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"label": "5",
|
|
114
|
+
"value": "5"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"label": "6",
|
|
118
|
+
"value": "6"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"label": "7",
|
|
122
|
+
"value": "7"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"label": "8",
|
|
126
|
+
"value": "8"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"events": [
|
|
133
|
+
{
|
|
134
|
+
"name": "clickLotteryButton",
|
|
135
|
+
"title": "开始抽奖"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "finishLottery",
|
|
139
|
+
"title": "开奖",
|
|
140
|
+
"value": "event.detail.prize"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"meta": {
|
|
144
|
+
"title": "九宫格抽奖",
|
|
145
|
+
"description": "用于实现简单的活动抽奖功能。",
|
|
146
|
+
"category": "高级",
|
|
147
|
+
"componentOrder": 101,
|
|
148
|
+
"icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/NavLayout.svg",
|
|
149
|
+
"visible": [
|
|
150
|
+
"APP"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"type": "string",
|
|
82
82
|
"title": "标题",
|
|
83
83
|
"default": "导航标题",
|
|
84
|
-
"x-index": 10
|
|
84
|
+
"x-index": 10,
|
|
85
|
+
"remarks": "配置宫格导航项目的详细内容"
|
|
85
86
|
},
|
|
86
87
|
"tapStatus": {
|
|
87
88
|
"enum": [
|
|
@@ -247,7 +248,8 @@
|
|
|
247
248
|
"label": "5",
|
|
248
249
|
"value": 5
|
|
249
250
|
}
|
|
250
|
-
]
|
|
251
|
+
],
|
|
252
|
+
"remarks": "移动端每行导航列数"
|
|
251
253
|
},
|
|
252
254
|
"pcCol": {
|
|
253
255
|
"type": "number",
|
|
@@ -271,7 +273,8 @@
|
|
|
271
273
|
"label": "6",
|
|
272
274
|
"value": 6
|
|
273
275
|
}
|
|
274
|
-
]
|
|
276
|
+
],
|
|
277
|
+
"remarks": "PC端每行导航列数"
|
|
275
278
|
},
|
|
276
279
|
"iconSize": {
|
|
277
280
|
"type": "string",
|
|
@@ -320,7 +323,8 @@
|
|
|
320
323
|
"label": "粗",
|
|
321
324
|
"value": "bolder"
|
|
322
325
|
}
|
|
323
|
-
]
|
|
326
|
+
],
|
|
327
|
+
"remarks": "标题字重"
|
|
324
328
|
},
|
|
325
329
|
"fontSize": {
|
|
326
330
|
"type": "number",
|
|
@@ -331,14 +335,16 @@
|
|
|
331
335
|
"min": 0,
|
|
332
336
|
"max": 100
|
|
333
337
|
},
|
|
334
|
-
"x-index": 45
|
|
338
|
+
"x-index": 45,
|
|
339
|
+
"remarks": "标题字号"
|
|
335
340
|
},
|
|
336
341
|
"lineHeight": {
|
|
337
342
|
"title": "行高",
|
|
338
343
|
"type": "string",
|
|
339
344
|
"x-index": 56,
|
|
340
345
|
"x-category": "高级属性",
|
|
341
|
-
"default": "auto"
|
|
346
|
+
"default": "auto",
|
|
347
|
+
"remarks": "标题行高"
|
|
342
348
|
},
|
|
343
349
|
"maxLines": {
|
|
344
350
|
"title": "标题行数",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"condition": "{{ $self.value }}"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
|
-
"x-category": "基础属性"
|
|
16
|
+
"x-category": "基础属性",
|
|
17
|
+
"remarks": "开启后,将开启纵向滚动条,组件支持上下滚动"
|
|
17
18
|
},
|
|
18
19
|
"scrollX": {
|
|
19
20
|
"title": "允许横向滚动",
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
"condition": "{{ $self.value }}"
|
|
27
28
|
}
|
|
28
29
|
],
|
|
29
|
-
"x-category": "基础属性"
|
|
30
|
+
"x-category": "基础属性",
|
|
31
|
+
"remarks": "开启后,将开启横向滚动条,组件支持左右滚动"
|
|
30
32
|
},
|
|
31
33
|
"upperThreshold": {
|
|
32
34
|
"title": "距顶部/左边多远时,触发scrolltoupper事件",
|
|
@@ -43,17 +45,20 @@
|
|
|
43
45
|
"scrollTop": {
|
|
44
46
|
"title": "竖向滚动条位置",
|
|
45
47
|
"type": "number",
|
|
46
|
-
"x-category": "高级属性"
|
|
48
|
+
"x-category": "高级属性",
|
|
49
|
+
"remarks": "输入默认值,竖向滚动条将默认移动到该位置"
|
|
47
50
|
},
|
|
48
51
|
"scrollLeft": {
|
|
49
52
|
"title": "横向滚动条位置",
|
|
50
53
|
"type": "number",
|
|
51
|
-
"x-category": "高级属性"
|
|
54
|
+
"x-category": "高级属性",
|
|
55
|
+
"remarks": "输入默认值,横向滚动条将默认移动到该位置"
|
|
52
56
|
},
|
|
53
57
|
"scrollIntoView": {
|
|
54
58
|
"title": "滚到的元素ID",
|
|
55
59
|
"type": "string",
|
|
56
|
-
"x-category": "高级属性"
|
|
60
|
+
"x-category": "高级属性",
|
|
61
|
+
"remarks": "将当前的元素滚动到浏览器窗口的可视区域内"
|
|
57
62
|
},
|
|
58
63
|
"scrollWithAnimation": {
|
|
59
64
|
"title": "在设置滚动条位置时使用动画过渡",
|
|
@@ -62,7 +67,8 @@
|
|
|
62
67
|
"x-platforms": [
|
|
63
68
|
"MP"
|
|
64
69
|
],
|
|
65
|
-
"x-category": "高级属性"
|
|
70
|
+
"x-category": "高级属性",
|
|
71
|
+
"remarks": "开启滚动条动画"
|
|
66
72
|
},
|
|
67
73
|
"enableBackToTop": {
|
|
68
74
|
"title": "iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向",
|
|
@@ -71,7 +77,8 @@
|
|
|
71
77
|
"x-platforms": [
|
|
72
78
|
"MP"
|
|
73
79
|
],
|
|
74
|
-
"x-category": "高级属性"
|
|
80
|
+
"x-category": "高级属性",
|
|
81
|
+
"remarks": "开启后当执行对应操作后滚动条将自动返回顶部"
|
|
75
82
|
},
|
|
76
83
|
"enableFlex": {
|
|
77
84
|
"title": "启用 flexbox 布局",
|
|
@@ -80,7 +87,8 @@
|
|
|
80
87
|
"x-platforms": [
|
|
81
88
|
"MP"
|
|
82
89
|
],
|
|
83
|
-
"x-category": "高级属性"
|
|
90
|
+
"x-category": "高级属性",
|
|
91
|
+
"remarks": "开启flexbox布局"
|
|
84
92
|
},
|
|
85
93
|
"scrollAnchoring": {
|
|
86
94
|
"title": "开启 scroll anchoring 特性",
|
|
@@ -89,7 +97,8 @@
|
|
|
89
97
|
"x-platforms": [
|
|
90
98
|
"MP"
|
|
91
99
|
],
|
|
92
|
-
"x-category": "高级属性"
|
|
100
|
+
"x-category": "高级属性",
|
|
101
|
+
"remarks": "开启scroll-anchoring特性"
|
|
93
102
|
},
|
|
94
103
|
"refresherEnabled": {
|
|
95
104
|
"title": "开启自定义下拉刷新",
|
|
@@ -105,7 +114,8 @@
|
|
|
105
114
|
"x-platforms": [
|
|
106
115
|
"MP"
|
|
107
116
|
],
|
|
108
|
-
"x-category": "高级属性"
|
|
117
|
+
"x-category": "高级属性",
|
|
118
|
+
"remarks": "开启后可自定义对下拉刷新进行相关配置"
|
|
109
119
|
},
|
|
110
120
|
"refresherThreshold": {
|
|
111
121
|
"title": "设置自定义下拉刷新阈值",
|
|
@@ -172,7 +182,8 @@
|
|
|
172
182
|
"x-platforms": [
|
|
173
183
|
"MP"
|
|
174
184
|
],
|
|
175
|
-
"x-category": "高级属性"
|
|
185
|
+
"x-category": "高级属性",
|
|
186
|
+
"remarks": "开启scroll-view增强特性 "
|
|
176
187
|
},
|
|
177
188
|
"bounces": {
|
|
178
189
|
"title": "iOS 下 scroll-view 边界弹性控制",
|
|
@@ -190,7 +201,8 @@
|
|
|
190
201
|
"x-platforms": [
|
|
191
202
|
"MP"
|
|
192
203
|
],
|
|
193
|
-
"x-category": "基础属性"
|
|
204
|
+
"x-category": "基础属性",
|
|
205
|
+
"remarks": "控制滚动条是否显示/隐藏"
|
|
194
206
|
},
|
|
195
207
|
"pagingEnabled": {
|
|
196
208
|
"title": "分页滑动效果",
|
|
@@ -6,57 +6,66 @@
|
|
|
6
6
|
"title": "自动切换",
|
|
7
7
|
"default": true,
|
|
8
8
|
"type": "boolean",
|
|
9
|
-
"x-category": "基础属性"
|
|
9
|
+
"x-category": "基础属性",
|
|
10
|
+
"remarks":"开启后,轮播图将会自动根据配置的时间间隔进行自动滚动,关闭后则轮播图仅支持通过点击锚点的方式进行切换"
|
|
10
11
|
},
|
|
11
12
|
"indicatorDots": {
|
|
12
13
|
"title": "导航锚点",
|
|
13
14
|
"default": true,
|
|
14
15
|
"type": "boolean",
|
|
15
|
-
"x-category": "高级属性"
|
|
16
|
+
"x-category": "高级属性",
|
|
17
|
+
"remarks":"开启/关闭轮播图锚点"
|
|
16
18
|
},
|
|
17
19
|
"current": {
|
|
18
20
|
"title": "当前所在滑块的 index",
|
|
19
21
|
"default": 0,
|
|
20
22
|
"type": "number",
|
|
21
|
-
"x-category": "高级属性"
|
|
23
|
+
"x-category": "高级属性",
|
|
24
|
+
"remarks":"更改轮播图的默认展示位置,0为默认展示第一张轮播图,以此类推"
|
|
22
25
|
},
|
|
23
26
|
"interval": {
|
|
24
27
|
"title": "自动切换时间间隔",
|
|
25
28
|
"default": 5000,
|
|
26
29
|
"type": "number",
|
|
27
|
-
"x-category": "基础属性"
|
|
30
|
+
"x-category": "基础属性",
|
|
31
|
+
"remarks":"配置轮播图滚动的时间间隔,时间单位为ms"
|
|
28
32
|
},
|
|
29
33
|
"duration": {
|
|
30
34
|
"title": "滑动动画时长",
|
|
31
35
|
"default": 500,
|
|
32
36
|
"type": "number",
|
|
33
|
-
"x-category": "高级属性"
|
|
37
|
+
"x-category": "高级属性",
|
|
38
|
+
"remarks":"更改轮播图切换时的滑动动画时长"
|
|
34
39
|
},
|
|
35
40
|
"circular": {
|
|
36
41
|
"title": "衔接滑动",
|
|
37
42
|
"default": true,
|
|
38
43
|
"type": "boolean",
|
|
39
|
-
"x-category": "高级属性"
|
|
44
|
+
"x-category": "高级属性",
|
|
45
|
+
"remarks":"更改轮播图切换时动画的滑动方式"
|
|
40
46
|
},
|
|
41
47
|
"vertical": {
|
|
42
48
|
"title": "纵向轮播",
|
|
43
49
|
"default": false,
|
|
44
50
|
"type": "boolean",
|
|
45
|
-
"x-category": "基础属性"
|
|
51
|
+
"x-category": "基础属性",
|
|
52
|
+
"remarks":"开启后,轮播的滚动方式将会由横向滚动变更为纵向滚动"
|
|
46
53
|
},
|
|
47
54
|
"indicatorColor": {
|
|
48
55
|
"title": "锚点颜色",
|
|
49
56
|
"type": "string",
|
|
50
57
|
"x-component": "color",
|
|
51
58
|
"default": "rgba(200, 200, 200, 0.9)",
|
|
52
|
-
"x-category": "高级属性"
|
|
59
|
+
"x-category": "高级属性",
|
|
60
|
+
"remarks":"更改锚点普通状态下的颜色"
|
|
53
61
|
},
|
|
54
62
|
"indicatorActiveColor": {
|
|
55
63
|
"title": "锚点激活色",
|
|
56
64
|
"type": "string",
|
|
57
65
|
"x-component": "color",
|
|
58
66
|
"default": "rgba(0, 0, 0, 0.9)",
|
|
59
|
-
"x-category": "高级属性"
|
|
67
|
+
"x-category": "高级属性",
|
|
68
|
+
"remarks":"更改锚点选中时的颜色"
|
|
60
69
|
}
|
|
61
70
|
}
|
|
62
71
|
},
|
|
@@ -79,7 +79,8 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
],
|
|
82
|
-
"x-component": "list-bind-switch"
|
|
82
|
+
"x-component": "list-bind-switch",
|
|
83
|
+
"remarks": "更改选项卡标签的标题"
|
|
83
84
|
},
|
|
84
85
|
"selectedIndex": {
|
|
85
86
|
"title": "选中标签",
|
|
@@ -87,7 +88,8 @@
|
|
|
87
88
|
"default": 0,
|
|
88
89
|
"x-index": 30,
|
|
89
90
|
"x-category": "基础属性",
|
|
90
|
-
"x-component": "select"
|
|
91
|
+
"x-component": "select",
|
|
92
|
+
"remarks": "更改默认选中的选项卡标签"
|
|
91
93
|
},
|
|
92
94
|
"panel": {
|
|
93
95
|
"title": "面板1",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"x-component": "textarea",
|
|
9
9
|
"default": "文本内容",
|
|
10
10
|
"x-category": "基础属性",
|
|
11
|
-
"x-index": 1
|
|
11
|
+
"x-index": 1,
|
|
12
|
+
"remarks": "更改显示的文本内容"
|
|
12
13
|
},
|
|
13
14
|
"level": {
|
|
14
15
|
"enum": [
|
|
@@ -45,7 +46,8 @@
|
|
|
45
46
|
"title": "文本格式",
|
|
46
47
|
"default": "0",
|
|
47
48
|
"x-index": 2,
|
|
48
|
-
"description": "标题级别,H1 - H6"
|
|
49
|
+
"description": "标题级别,H1 - H6",
|
|
50
|
+
"remarks": "更改文本的展示级别"
|
|
49
51
|
},
|
|
50
52
|
"maxLines": {
|
|
51
53
|
"title": "最大行数",
|
|
@@ -53,21 +55,24 @@
|
|
|
53
55
|
"description": "应用发布为小程序时,该属性不生效",
|
|
54
56
|
"default": 2,
|
|
55
57
|
"x-index": 5,
|
|
56
|
-
"x-category": "高级属性"
|
|
58
|
+
"x-category": "高级属性",
|
|
59
|
+
"remarks": "更改文本支持展示的最大行数,若最大行数无法承载当前文本内容,则会将超出内容用省略号来替代"
|
|
57
60
|
},
|
|
58
61
|
"space": {
|
|
59
62
|
"title": "连续空格",
|
|
60
63
|
"type": "boolean",
|
|
61
64
|
"description": "是否显示连续空格",
|
|
62
65
|
"default": false,
|
|
63
|
-
"x-category": "高级属性"
|
|
66
|
+
"x-category": "高级属性",
|
|
67
|
+
"remarks": "开启后文本组件将支持识别多个空格字符,关闭后文本组件仅支持识别单个空格字符(多空格字符会自动转换成单个空格字符)"
|
|
64
68
|
},
|
|
65
69
|
"userSelect": {
|
|
66
70
|
"title": "是否可选中",
|
|
67
71
|
"type": "boolean",
|
|
68
72
|
"description": "是否可选中文本",
|
|
69
73
|
"default": true,
|
|
70
|
-
"x-category": "高级属性"
|
|
74
|
+
"x-category": "高级属性",
|
|
75
|
+
"remarks": "关闭后文本将不支持进行选中,无法进行复制等常见文本操作"
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
78
|
},
|
package/src/configs/index.js
CHANGED
|
@@ -48,6 +48,7 @@ import PhoneCode from './components/wxOpenApi/phoneCode.json';
|
|
|
48
48
|
import Share from './components/wxOpenApi/share.json';
|
|
49
49
|
import UserInfo from './components/wxOpenApi/userInfo.json';
|
|
50
50
|
|
|
51
|
+
import Lottery from './components/lottery.json';
|
|
51
52
|
export const components = {
|
|
52
53
|
Button,
|
|
53
54
|
Text,
|
|
@@ -94,6 +95,7 @@ export const components = {
|
|
|
94
95
|
PhoneCode,
|
|
95
96
|
Share,
|
|
96
97
|
UserInfo,
|
|
98
|
+
Lottery,
|
|
97
99
|
};
|
|
98
100
|
|
|
99
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
|
+
}
|