@cloudbase/weda-ui 1.0.24 → 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.
- package/package.json +2 -2
- 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 +10 -5
- 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 +20 -10
- package/src/configs/components/lottery.json +4 -2
- 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/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/mp/components/button/index.js +18 -2
- package/src/mp/components/button/index.wxml +6 -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 +5 -3
- package/src/mp/components/form/select/index.wxss +4 -0
- 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/style/weda-ui.wxss +14 -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/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 +2 -2
- 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/select/index.css +5 -0
- 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/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 +3 -3
- package/src/web/components/image/index.tsx +6 -7
- package/src/web/components/link/index.tsx +2 -2
- package/src/web/components/listView/index.tsx +2 -2
- 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/weda-ui.css +5 -1
|
@@ -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
|
},
|
|
@@ -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
|
+
}
|