@cloudbase/weda-ui 3.4.11 → 3.4.13
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/dist/configs/components/common/form-input-required.js +3 -3
- package/dist/configs/components/customer-service.js +3 -0
- package/dist/configs/components/dataView.js +20 -10
- package/dist/configs/components/form-checkbox.js +15 -2
- package/dist/configs/components/form-date.js +1 -1
- package/dist/configs/components/form-depart-tree-select.js +1 -1
- package/dist/configs/components/form-email.js +17 -2
- package/dist/configs/components/form-input.js +17 -2
- package/dist/configs/components/form-location.js +1 -1
- package/dist/configs/components/form-multi-region.js +1 -1
- package/dist/configs/components/form-phone.js +17 -2
- package/dist/configs/components/form-radio.js +15 -2
- package/dist/configs/components/form-rich-text.js +1 -1
- package/dist/configs/components/form-select-multiple.js +362 -0
- package/dist/configs/components/form-select.js +1 -1
- package/dist/configs/components/form-switch.js +16 -3
- package/dist/configs/components/form-text-area.js +15 -2
- package/dist/configs/components/form-time.js +1 -1
- package/dist/configs/components/form-url.js +17 -2
- package/dist/configs/components/form-user-tree-select.js +14 -1
- package/dist/configs/components/listView.js +32 -49
- package/dist/configs/components/table.json +1 -54
- package/dist/configs/components/wd-bubble.js +46 -8
- package/dist/configs/components/wd-button.js +3 -0
- package/dist/configs/components/wd-checkbox.js +464 -0
- package/dist/configs/components/wd-form.js +66 -10
- package/dist/configs/components/wd-input-email.js +37 -0
- package/dist/configs/components/wd-input-phone.js +43 -0
- package/dist/configs/components/wd-input-url.js +37 -0
- package/dist/configs/components/wd-input.js +94 -0
- package/dist/configs/components/wd-official-account.js +87 -0
- package/dist/configs/components/wd-radio.js +443 -0
- package/dist/configs/components/wd-switch.js +315 -0
- package/dist/configs/components/wd-table.js +11 -59
- package/dist/configs/components/wd-textarea.js +82 -0
- package/dist/configs/components/wd-tree.js +443 -0
- package/dist/configs/components/web-view.js +3 -0
- package/dist/configs/index.js +24 -1
- package/dist/configs/type-utils/type-form.js +681 -0
- package/dist/docs/common/components/json-schema-view.js +1 -1
- package/dist/docs/common/components/methods-view.js +1 -1
- package/dist/docs/common/components/properties-view.js +3 -1
- package/dist/docs/common/format.js +7 -7
- package/dist/docs/common/tableView.js +3 -1
- package/dist/enum/index.js +196 -0
- package/dist/style/index.scss +1 -1
- package/dist/web/actions/showMessage/index.js +4 -1
- package/dist/web/components/carousel/index.js +1 -1
- package/dist/web/components/customer-service/customer-service.js +19 -2
- package/dist/web/components/dataView/index.js +16 -3
- package/dist/web/components/flow/common/hooks/useCommonFlowData/flow-get.js +5 -1
- package/dist/web/components/flow/common/request.js +5 -5
- package/dist/web/components/flow/modules/operations/controls-items/flow-task-info-modal.js +90 -0
- package/dist/web/components/form/formcell/index.css +13 -1
- package/dist/web/components/form/formcell/index.js +1 -1
- package/dist/web/components/form/location/components/LocationH5/location.h5.js +1 -1
- package/dist/web/components/form/select/dropdown-select/index.js +9 -3
- package/dist/web/components/form/select/h5.js +18 -8
- package/dist/web/components/form/select/index.js +9 -10
- package/dist/web/components/form/select/region/index.js +1 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/h5.js +111 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/index.css +270 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/index.js +206 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/pc.js +115 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/ui.js +113 -0
- package/dist/web/components/form/selectMultiple/h5.js +40 -0
- package/dist/web/components/form/selectMultiple/index.js +94 -0
- package/dist/web/components/form/selectMultiple/request.js +76 -0
- package/dist/web/components/form/selectMultiple/status/allEmpty.js +5 -0
- package/dist/web/components/form/selectMultiple/status/empty.js +19 -0
- package/dist/web/components/form/selectMultiple/status/index.css +63 -0
- package/dist/web/components/form/selectMultiple/status/index.js +7 -0
- package/dist/web/components/form/selectMultiple/status/loading.js +19 -0
- package/dist/web/components/form/selectMultiple/status/propsType.js +1 -0
- package/dist/web/components/form/selectMultiple/status/retry.js +19 -0
- package/dist/web/components/form/tips/index.css +9 -3
- package/dist/web/components/form/uploader/index.css +10 -0
- package/dist/web/components/form/uploader/uploader.h5.js +60 -62
- package/dist/web/components/form/uploader/uploader.pc.js +48 -41
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +8 -33
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +8 -37
- package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +76 -50
- package/dist/web/components/form/userOrgSelect/common/utils.js +24 -8
- package/dist/web/components/form/userOrgSelect/component/depart-select/depart-select-pc.js +3 -8
- package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +14 -18
- package/dist/web/components/form/userOrgSelect/component/depart-select/org-modal-pc.js +20 -14
- package/dist/web/components/form/userOrgSelect/component/modal-select-h5.js +1 -1
- package/dist/web/components/form/userOrgSelect/component/org-tree.js +21 -9
- package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +76 -15
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +2 -7
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +6 -4
- package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +8 -2
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +25 -51
- package/dist/web/components/form/userOrgSelect/hooks/use-depart-data.js +10 -6
- package/dist/web/components/form-input-hooks/index.js +41 -15
- package/dist/web/components/form-select-multiple/index.js +26 -0
- package/dist/web/components/form-upload-file/index.js +0 -1
- package/dist/web/components/form-user-tree-select/index.js +2 -2
- package/dist/web/components/formdetail/index.css +31 -1
- package/dist/web/components/formdetail/index.js +33 -1
- package/dist/web/components/index.js +27 -11
- package/dist/web/components/listView/index.js +20 -5
- package/dist/web/components/navigationBar/common.js +1 -1
- package/dist/web/components/navigationBar/horizontalMenu.js +1 -1
- package/dist/web/components/navigationBar/index.css +11 -0
- package/dist/web/components/navigationBar/index.js +8 -1
- package/dist/web/components/phone/index.js +26 -1
- package/dist/web/components/phoneCode/index.js +3 -1
- package/dist/web/components/richText/index.css +70 -67
- package/dist/web/components/richText/index.js +311 -251
- package/dist/web/components/richText/richtext.module.css +1 -0
- package/dist/web/components/richTextView/index.css +39 -0
- package/dist/web/components/richTextView/index.js +1 -1
- package/dist/web/components/share/index.js +26 -1
- package/dist/web/components/table/ImportFileModalByApi/uploadCSVFile.js +1 -1
- package/dist/web/components/wd-checkbox/checkbox.js +34 -0
- package/dist/web/components/wd-checkbox/index.js +3 -0
- package/dist/web/components/wd-checkbox-list/checkboxList.js +140 -0
- package/dist/web/components/wd-checkbox-list/index.js +3 -0
- package/dist/web/components/wd-form/hooks/use-remote-value.js +9 -2
- package/dist/web/components/wd-form/index.js +69 -34
- package/dist/web/components/wd-form/wd-form.js +42 -0
- package/dist/web/components/wd-form-cell/index.js +3 -0
- package/dist/web/components/wd-form-cell/wd-form-cell.js +42 -0
- package/dist/web/components/wd-form-item/index.js +4 -0
- package/dist/web/components/wd-form-item/wd-form-item.js +55 -0
- package/dist/web/components/wd-form-item/wd-input-group.js +24 -0
- package/dist/web/components/wd-icon/wd-icon.js +10 -2
- package/dist/web/components/wd-input/index.js +3 -0
- package/dist/web/components/wd-input/wd-input.js +155 -0
- package/dist/web/components/wd-input-email/index.js +3 -0
- package/dist/web/components/wd-input-email/wd-input-email.js +13 -0
- package/dist/web/components/wd-input-group/index.js +3 -0
- package/dist/web/components/wd-input-group/wd-input-group.js +10 -0
- package/dist/web/components/wd-input-phone/index.js +3 -0
- package/dist/web/components/wd-input-phone/wd-input-phone.js +14 -0
- package/dist/web/components/wd-input-url/index.js +3 -0
- package/dist/web/components/wd-input-url/wd-input-url.js +13 -0
- package/dist/web/components/wd-input-wrap/index.js +3 -0
- package/dist/web/components/wd-input-wrap/wd-input-wrap.js +18 -0
- package/dist/web/components/wd-official-account/index.css +29 -0
- package/dist/web/components/wd-official-account/index.js +36 -0
- package/dist/web/components/wd-radio/index.js +3 -0
- package/dist/web/components/wd-radio/wd-radio.js +30 -0
- package/dist/web/components/wd-radio-list/index.js +3 -0
- package/dist/web/components/wd-radio-list/wd-radio-list.js +104 -0
- package/dist/web/components/wd-switch/index.js +3 -0
- package/dist/web/components/wd-switch/wd-switch.js +52 -0
- package/dist/web/components/wd-table/components/FieldRender/index.js +5 -4
- package/dist/web/components/wd-table/components/FilterFieldsPanel/FilterFieldItem.js +4 -0
- package/dist/web/components/wd-table/components/Table/index.js +40 -9
- package/dist/web/components/wd-table/hooks/useQueryParams.js +4 -1
- package/dist/web/components/wd-table/hooks/useTableData.js +6 -1
- package/dist/web/components/wd-table/hooks/useViewFields.js +1 -1
- package/dist/web/components/wd-table/utils/index.js +6 -2
- package/dist/web/components/wd-table/wd-table.js +125 -99
- package/dist/web/components/wd-textarea/index.js +3 -0
- package/dist/web/components/wd-textarea/wd-textarea.js +78 -0
- package/dist/web/components/wd-tree/index.js +3 -0
- package/dist/web/components/wd-tree/utils.js +291 -0
- package/dist/web/components/wd-tree/wd-tree.js +193 -0
- package/dist/web/utils/constant.js +16 -0
- package/dist/web/utils/datasource.js +2 -2
- package/dist/web/utils/date.js +3 -3
- package/dist/web/utils/hooks/useFormLegacy.js +112 -0
- package/dist/web/utils/tool.js +12 -2
- package/dist/web/weda-ui.css +197 -3
- package/package.json +6 -5
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { defineConfig, Type, Tuple } from '../type-utils';
|
|
2
|
+
const Node = Type.Recursive((Node) => Type.Object({
|
|
3
|
+
label: Type.String({ title: 'label' }),
|
|
4
|
+
value: Type.String({ title: 'value' }),
|
|
5
|
+
foldIcon: Type.String({ title: 'foldIcon' }),
|
|
6
|
+
expendIcon: Type.String({ title: 'expendIcon' }),
|
|
7
|
+
leafIcon: Type.String({ title: 'leafIcon' }),
|
|
8
|
+
children: Type.Array(Node),
|
|
9
|
+
disabled: Type.Boolean({ title: 'disabled' }),
|
|
10
|
+
}), {
|
|
11
|
+
$id: 'Node',
|
|
12
|
+
});
|
|
13
|
+
// 属性类型定义
|
|
14
|
+
const data = Type.Object({
|
|
15
|
+
data: Type.Optional(Type.Array(Node, {
|
|
16
|
+
title: '树节点',
|
|
17
|
+
description: '树组件的节点数据',
|
|
18
|
+
default: [
|
|
19
|
+
{
|
|
20
|
+
label: '行政中心',
|
|
21
|
+
value: '0',
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
label: '人力资源部',
|
|
25
|
+
value: '0-0',
|
|
26
|
+
children: [
|
|
27
|
+
{
|
|
28
|
+
label: '招聘组',
|
|
29
|
+
value: '0-0-0',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: '薪酬组',
|
|
33
|
+
value: '0-0-1',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: '培训组',
|
|
37
|
+
value: '0-0-2',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: '行政部',
|
|
43
|
+
value: '0-1',
|
|
44
|
+
disabled: true,
|
|
45
|
+
children: [
|
|
46
|
+
{
|
|
47
|
+
label: '档案管理',
|
|
48
|
+
value: '0-1-0',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: '后勤管理',
|
|
52
|
+
value: '0-1-1',
|
|
53
|
+
disabled: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: '行政管理',
|
|
57
|
+
value: '0-1-2',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: '营销中心',
|
|
65
|
+
value: '1',
|
|
66
|
+
children: [
|
|
67
|
+
{
|
|
68
|
+
label: '市场部',
|
|
69
|
+
value: '1-0',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: '策划部',
|
|
73
|
+
value: '1-1',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: '大客户部',
|
|
77
|
+
value: '1-2',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: '生产中心',
|
|
83
|
+
value: '2',
|
|
84
|
+
children: [
|
|
85
|
+
{
|
|
86
|
+
label: '生产部',
|
|
87
|
+
value: '2-0',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: '采购部',
|
|
91
|
+
value: '2-1',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: '仓储部',
|
|
95
|
+
value: '2-2',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
label: '质检部',
|
|
99
|
+
value: '2-3',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: '物流部',
|
|
103
|
+
value: '2-4',
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
'x-index': 10,
|
|
109
|
+
'x-component': 'jsontext',
|
|
110
|
+
'x-component-props': {
|
|
111
|
+
autoSize: { minRows: 2, maxRows: 10 },
|
|
112
|
+
},
|
|
113
|
+
'x-category': '数据',
|
|
114
|
+
})),
|
|
115
|
+
checkable: Type.Optional(Type.Boolean({
|
|
116
|
+
title: '开启多选',
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
'x-index': 20,
|
|
119
|
+
default: false,
|
|
120
|
+
description: '开启后,将展示复选框,支持多选节点',
|
|
121
|
+
'x-category': '操作控制',
|
|
122
|
+
})),
|
|
123
|
+
checkedCustom: Type.Optional(Type.Array(Type.String(), {
|
|
124
|
+
title: '选中节点',
|
|
125
|
+
default: [],
|
|
126
|
+
'x-index': 30,
|
|
127
|
+
'x-component': 'jsontext',
|
|
128
|
+
'x-category': '操作控制',
|
|
129
|
+
description: '请以数组形式写入选中节点的value,例如["0-0"]',
|
|
130
|
+
'x-helper-text': '请以数组形式写入选中节点的value,例如["0-0"]',
|
|
131
|
+
})),
|
|
132
|
+
expandType: Type.Optional(Type.StringEnum({
|
|
133
|
+
title: '节点展开方式',
|
|
134
|
+
enum: Tuple([
|
|
135
|
+
{
|
|
136
|
+
label: '展开所有节点',
|
|
137
|
+
value: 'all',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
label: '不展开',
|
|
141
|
+
value: 'none',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: '自定义',
|
|
145
|
+
value: 'custom',
|
|
146
|
+
},
|
|
147
|
+
]),
|
|
148
|
+
type: 'string',
|
|
149
|
+
default: 'all',
|
|
150
|
+
description: '设置树组件的节点展开方式',
|
|
151
|
+
'x-index': 40,
|
|
152
|
+
'x-category': '操作控制',
|
|
153
|
+
'x-linkages': [
|
|
154
|
+
{
|
|
155
|
+
type: 'value:visible',
|
|
156
|
+
target: 'expandCustom',
|
|
157
|
+
condition: '{{$self.value === "custom"}}',
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
})),
|
|
161
|
+
expandCustom: Type.Optional(Type.Array(Type.String(), {
|
|
162
|
+
title: '展开的节点',
|
|
163
|
+
default: [],
|
|
164
|
+
'x-index': 50,
|
|
165
|
+
'x-component': 'jsontext',
|
|
166
|
+
'x-category': '操作控制',
|
|
167
|
+
'x-helper-text': '请以数组形式写入展开节点的value,例如["0-0","0-1"]',
|
|
168
|
+
})),
|
|
169
|
+
showIcon: Type.Optional(Type.Boolean({
|
|
170
|
+
title: '显示节点图标',
|
|
171
|
+
type: 'boolean',
|
|
172
|
+
'x-index': 60,
|
|
173
|
+
default: false,
|
|
174
|
+
description: '开启后,各节点左侧将显示图标',
|
|
175
|
+
'x-category': '节点风格',
|
|
176
|
+
'x-linkages': [
|
|
177
|
+
{
|
|
178
|
+
type: 'value:visible',
|
|
179
|
+
target: '*(foldIcon,expendIcon,leafIcon)',
|
|
180
|
+
condition: '{{$self.value === true}}',
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
})),
|
|
184
|
+
foldIcon: Type.Optional(Type.String({
|
|
185
|
+
title: '节点折叠时默认图标',
|
|
186
|
+
type: 'string',
|
|
187
|
+
default: 'https://lowcode-1gk9y5ik310a94df-1307578329.tcloudbaseapp.com/resources/2023-05/lowcode-1177832',
|
|
188
|
+
description: '设置节点在被折叠情况下的默认展示图标,如树节点属性中提供了自定义图标(foldIcon)参数,则其优先级高于该属性',
|
|
189
|
+
'x-category': '节点风格',
|
|
190
|
+
'x-index': 70,
|
|
191
|
+
'x-component': 'image',
|
|
192
|
+
'x-rules': [
|
|
193
|
+
{
|
|
194
|
+
message: '请输入合法的图片地址',
|
|
195
|
+
pattern: '^(((https?)://)|/resources/|(td:))[^\\s]+$',
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
})),
|
|
199
|
+
expendIcon: Type.Optional(Type.String({
|
|
200
|
+
title: '节点展开时默认图标',
|
|
201
|
+
type: 'string',
|
|
202
|
+
default: 'https://lowcode-1gk9y5ik310a94df-1307578329.tcloudbaseapp.com/resources/2023-05/lowcode-1177833',
|
|
203
|
+
description: '设置节点在被展开情况下的默认展示图标,如树节点属性中提供了自定义图标(expendIcon)参数,则其优先级高于该属性',
|
|
204
|
+
'x-category': '节点风格',
|
|
205
|
+
'x-index': 80,
|
|
206
|
+
'x-component': 'image',
|
|
207
|
+
'x-rules': [
|
|
208
|
+
{
|
|
209
|
+
message: '请输入合法的图片地址',
|
|
210
|
+
pattern: '^(((https?)://)|/resources/|(td:))[^\\s]+$',
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
})),
|
|
214
|
+
leafIcon: Type.Optional(Type.String({
|
|
215
|
+
title: '叶子节点默认图标',
|
|
216
|
+
type: 'string',
|
|
217
|
+
default: 'https://lowcode-1gk9y5ik310a94df-1307578329.tcloudbaseapp.com/resources/2023-05/lowcode-1177834',
|
|
218
|
+
description: '设置叶子节点的默认展示图标,如树节点属性中提供了自定义图标(leafIcon)参数,则其优先级高于该属性',
|
|
219
|
+
'x-category': '节点风格',
|
|
220
|
+
'x-index': 90,
|
|
221
|
+
'x-component': 'image',
|
|
222
|
+
'x-rules': [
|
|
223
|
+
{
|
|
224
|
+
message: '请输入合法的图片地址',
|
|
225
|
+
pattern: '^(((https?)://)|/resources/|(td:))[^\\s]+$',
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
})),
|
|
229
|
+
line: Type.Optional(Type.Boolean({
|
|
230
|
+
title: '显示节点连接线',
|
|
231
|
+
type: 'boolean',
|
|
232
|
+
'x-index': 100,
|
|
233
|
+
default: false,
|
|
234
|
+
description: '开启后,各节点间将显示连接线',
|
|
235
|
+
'x-category': '节点风格',
|
|
236
|
+
})),
|
|
237
|
+
});
|
|
238
|
+
const treeInfo = Type.Object({
|
|
239
|
+
checkedState: Type.Optional(Type.Boolean({ title: '当前操作选中状态' })),
|
|
240
|
+
selectedState: Type.Optional(Type.Boolean({ title: '当前操作点击状态' })),
|
|
241
|
+
expandedtate: Type.Optional(Type.Boolean({ title: '当前操作展开状态' })),
|
|
242
|
+
event: Type.StringEnum({
|
|
243
|
+
enum: Tuple([
|
|
244
|
+
{
|
|
245
|
+
label: '初始化',
|
|
246
|
+
value: 'init',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
label: '选中',
|
|
250
|
+
value: 'check',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
label: '点击',
|
|
254
|
+
value: 'select',
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
label: '展开/折叠',
|
|
258
|
+
value: 'expand',
|
|
259
|
+
},
|
|
260
|
+
]),
|
|
261
|
+
}),
|
|
262
|
+
currentNode: Type.Pick(data, ['data']),
|
|
263
|
+
selected: Type.Array(Type.String({ title: '已点击的节点值' }), {
|
|
264
|
+
title: '已点击的节点值列表',
|
|
265
|
+
}),
|
|
266
|
+
selectedPositions: Type.Array(Type.String({ title: '已点击的节点索引值' }), {
|
|
267
|
+
title: '已点击的节点值索引列表',
|
|
268
|
+
}),
|
|
269
|
+
selectedNodes: Type.Array(Node, { title: '已点击的节点列表' }),
|
|
270
|
+
expanded: Type.Array(Type.String({ title: '已展开的节点值' }), {
|
|
271
|
+
title: '已展开的节点值列表',
|
|
272
|
+
}),
|
|
273
|
+
expandedPositions: Type.Array(Type.String({ title: '已展开的节点索引值' }), {
|
|
274
|
+
title: '已展开的节点值索引列表',
|
|
275
|
+
}),
|
|
276
|
+
expandedNodes: Type.Array(Node, { title: '已展开的节点列表' }),
|
|
277
|
+
searched: Type.Array(Type.String({ title: '搜索到的节点值' }), {
|
|
278
|
+
title: '搜索到的节点值列表',
|
|
279
|
+
}),
|
|
280
|
+
searchedPositions: Type.Array(Type.String({ title: '搜索到的节点索引值' }), {
|
|
281
|
+
title: '搜索到的节点值索引列表',
|
|
282
|
+
}),
|
|
283
|
+
searchedNodes: Type.Array(Node, { title: '搜索到的节点列表' }),
|
|
284
|
+
checked: Type.Array(Type.String({ title: '已选中的节点值' }), {
|
|
285
|
+
title: '已选中的节点值列表',
|
|
286
|
+
}),
|
|
287
|
+
checkedPositions: Type.Array(Type.String({ title: '已选中的节点索引值' }), {
|
|
288
|
+
title: '已选中的节点值索引列表',
|
|
289
|
+
}),
|
|
290
|
+
checkedNodes: Type.Array(Node, { title: '已选中的节点列表' }),
|
|
291
|
+
childChecked: Type.Array(Type.String({ title: '有子节点选中的节点值' }), {
|
|
292
|
+
title: '有子节点选中的节点值列表',
|
|
293
|
+
}),
|
|
294
|
+
childCheckedPositions: Type.Array(Type.String({ title: '有子节点选中的节点索引值' }), {
|
|
295
|
+
title: '有子节点选中的节点值索引列表',
|
|
296
|
+
}),
|
|
297
|
+
childCheckedNodes: Type.Array(Node, {
|
|
298
|
+
title: '有子节点选中的节点列表',
|
|
299
|
+
}),
|
|
300
|
+
}, {
|
|
301
|
+
title: '当前树信息',
|
|
302
|
+
description: '用户操作后的相关树信息',
|
|
303
|
+
});
|
|
304
|
+
// 组件对外暴露的只读属性
|
|
305
|
+
const properties = Type.Intersect([
|
|
306
|
+
Type.Pick(data, [
|
|
307
|
+
'data',
|
|
308
|
+
'checkable',
|
|
309
|
+
'checkedCustom',
|
|
310
|
+
'expandType',
|
|
311
|
+
'expandCustom',
|
|
312
|
+
'showIcon',
|
|
313
|
+
'foldIcon',
|
|
314
|
+
'expendIcon',
|
|
315
|
+
'leafIcon',
|
|
316
|
+
'line',
|
|
317
|
+
]),
|
|
318
|
+
Type.Object({ treeInfo }),
|
|
319
|
+
]);
|
|
320
|
+
// export default
|
|
321
|
+
const config = defineConfig({
|
|
322
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
323
|
+
// 属性定义
|
|
324
|
+
data,
|
|
325
|
+
// 只读属性定义
|
|
326
|
+
properties,
|
|
327
|
+
// 样式API
|
|
328
|
+
classes: [
|
|
329
|
+
{
|
|
330
|
+
name: '根元素',
|
|
331
|
+
selector: '.wd-tree',
|
|
332
|
+
description: '树组件根元素',
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: 'PC 端按钮根元素',
|
|
336
|
+
selector: '.wd-pc-tree',
|
|
337
|
+
description: '可以为 PC 端的按钮编写样式',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'H5 端按钮根元素',
|
|
341
|
+
selector: '.wd-h5-tree',
|
|
342
|
+
description: '可以为 H5 端的按钮编写样式',
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: '展开/折叠箭头',
|
|
346
|
+
selector: '.wd-tree__switcher',
|
|
347
|
+
description: '展开/折叠箭头的样式',
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: '显示标签',
|
|
351
|
+
selector: '.wd-tree__label-text',
|
|
352
|
+
description: '显示标签的样式',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: '点击的节点背景',
|
|
356
|
+
selector: '.wd-tree-node.is-selected',
|
|
357
|
+
description: '用户点击后节点标签的样式',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: '连接线',
|
|
361
|
+
selector: '.wd-tree--line',
|
|
362
|
+
description: '展示的连接线的样式',
|
|
363
|
+
},
|
|
364
|
+
],
|
|
365
|
+
// 组件方法
|
|
366
|
+
methods: [
|
|
367
|
+
{
|
|
368
|
+
name: 'searchNode',
|
|
369
|
+
label: '搜索节点',
|
|
370
|
+
'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
371
|
+
description: '搜索值',
|
|
372
|
+
params: Type.Object({
|
|
373
|
+
searchKey: Type.String({ title: '搜索内容', default: '' }),
|
|
374
|
+
}),
|
|
375
|
+
},
|
|
376
|
+
],
|
|
377
|
+
// 组件对外暴露事件
|
|
378
|
+
events: [
|
|
379
|
+
// {
|
|
380
|
+
// title: '有节点变化',
|
|
381
|
+
// name: 'change',
|
|
382
|
+
// description: '用户操作节点变化,包括选中、点击、展开/折叠',
|
|
383
|
+
// 'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
384
|
+
// detail: {treeInfo},
|
|
385
|
+
// },
|
|
386
|
+
{
|
|
387
|
+
title: '选中节点改变',
|
|
388
|
+
name: 'selectNodeChange',
|
|
389
|
+
description: '用户选中的数据发生改变时触发,出参所选节点数据',
|
|
390
|
+
'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
391
|
+
detail: { treeInfo },
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
title: '节点展开/折叠',
|
|
395
|
+
name: 'nodeExpandChange',
|
|
396
|
+
description: '用户展开/折叠某节点时触发,出参被展开/折叠的节点数据',
|
|
397
|
+
'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
398
|
+
detail: { treeInfo },
|
|
399
|
+
},
|
|
400
|
+
// {
|
|
401
|
+
// title: '点击节点',
|
|
402
|
+
// name: 'nodeClick',
|
|
403
|
+
// description:
|
|
404
|
+
// '用户点击节点时触发,出参被点击的节点数据(单选模式下,点击节点和选中节点改变的触发时机一致;多选模式下,点击checkbox触发选中节点改变,点击节点名称,触发点击节点)',
|
|
405
|
+
// 'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
406
|
+
// detail: {treeInfo},
|
|
407
|
+
// },
|
|
408
|
+
],
|
|
409
|
+
// 组件元信息
|
|
410
|
+
meta: {
|
|
411
|
+
name: 'WdTree',
|
|
412
|
+
// 组件别名,用于生成组件 id,例如 Icon1
|
|
413
|
+
componentName: 'Tree',
|
|
414
|
+
title: '树',
|
|
415
|
+
description: '以树形结构展示多层级的数据内容,如组织架构、物料信息、客户分类等',
|
|
416
|
+
icon: '../../icons/Tree.svg',
|
|
417
|
+
category: '展示',
|
|
418
|
+
categoryOrder: 400,
|
|
419
|
+
componentOrder: 250,
|
|
420
|
+
platform: ['MOBILEWEB', 'PCWEB'],
|
|
421
|
+
visible: ['APP'],
|
|
422
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/show/WdTree',
|
|
423
|
+
// 快捷编辑时展示在编辑区的属性
|
|
424
|
+
// shortcut: {
|
|
425
|
+
// props: ['line', 'checkable'],
|
|
426
|
+
// },
|
|
427
|
+
group: {
|
|
428
|
+
['数据']: {
|
|
429
|
+
'x-index': 1,
|
|
430
|
+
expand: true,
|
|
431
|
+
},
|
|
432
|
+
['操作控制']: {
|
|
433
|
+
'x-index': 2,
|
|
434
|
+
expand: true,
|
|
435
|
+
},
|
|
436
|
+
['节点风格']: {
|
|
437
|
+
'x-index': 3,
|
|
438
|
+
expand: true,
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
});
|
|
443
|
+
export default config;
|
|
@@ -54,6 +54,7 @@ const config = defineConfig({
|
|
|
54
54
|
title: '网页加载成功',
|
|
55
55
|
detail: {
|
|
56
56
|
src: Type.String({
|
|
57
|
+
title: '网页链接地址',
|
|
57
58
|
description: '网页链接地址',
|
|
58
59
|
}),
|
|
59
60
|
},
|
|
@@ -63,6 +64,7 @@ const config = defineConfig({
|
|
|
63
64
|
title: '网页加载失败',
|
|
64
65
|
detail: {
|
|
65
66
|
src: Type.String({
|
|
67
|
+
title: '网页链接地址',
|
|
66
68
|
description: '网页链接地址',
|
|
67
69
|
}),
|
|
68
70
|
},
|
|
@@ -72,6 +74,7 @@ const config = defineConfig({
|
|
|
72
74
|
title: '接收网页消息',
|
|
73
75
|
detail: {
|
|
74
76
|
data: Type.Object({}, {
|
|
77
|
+
title: '接收信息内容',
|
|
75
78
|
description: '接收信息内容',
|
|
76
79
|
}),
|
|
77
80
|
},
|
package/dist/configs/index.js
CHANGED
|
@@ -65,6 +65,15 @@ import WdBubble from './components/wd-bubble';
|
|
|
65
65
|
import WdButton from './components/wd-button';
|
|
66
66
|
import WdDivider from './components/wd-divider';
|
|
67
67
|
import WdLink from './components/wd-link';
|
|
68
|
+
import WdForm from './components/wd-form';
|
|
69
|
+
import WdTextarea from './components/wd-textarea';
|
|
70
|
+
import WdInputEmail from './components/wd-input-email';
|
|
71
|
+
import WdInputUrl from './components/wd-input-url';
|
|
72
|
+
import WdInputPhone from './components/wd-input-phone';
|
|
73
|
+
import WdInput from './components/wd-input';
|
|
74
|
+
import WdSwitch from './components/wd-switch';
|
|
75
|
+
import WdRadioList from './components/wd-radio';
|
|
76
|
+
import WdCheckboxList from './components/wd-checkbox';
|
|
68
77
|
import WdIcon from './components/wd-icon';
|
|
69
78
|
import WdText from './components/wd-text';
|
|
70
79
|
import WdImage from './components/wd-image';
|
|
@@ -76,7 +85,6 @@ import Repeater from './components/repeater';
|
|
|
76
85
|
import RepeaterItem from './components/repeater-item.json';
|
|
77
86
|
import WebView from './components/web-view';
|
|
78
87
|
import QrCode from './components/qr_code';
|
|
79
|
-
import WdForm from './components/wd-form';
|
|
80
88
|
import FormInput from './components/form-input';
|
|
81
89
|
import FormTextArea from './components/form-text-area';
|
|
82
90
|
import FormRadio from './components/form-radio';
|
|
@@ -93,18 +101,24 @@ import FormImageUploader from './components/form-image-uploader';
|
|
|
93
101
|
import FormUploadFile from './components/form-upload-file';
|
|
94
102
|
import FormMultiRegion from './components/form-multi-region';
|
|
95
103
|
import FormSelect from './components/form-select';
|
|
104
|
+
import FormSelectMultiple from './components/form-select-multiple';
|
|
96
105
|
import FormDate from './components/form-date';
|
|
97
106
|
import FormRegion from './components/form-region';
|
|
98
107
|
import FormTime from './components/form-time';
|
|
99
108
|
import WdFormDetail from './components/wd-form-detail';
|
|
100
109
|
import CustomerService from './components/customer-service';
|
|
110
|
+
import WdTree from './components/wd-tree';
|
|
111
|
+
import WdOfficialAccount from './components/wd-official-account';
|
|
101
112
|
export const components = {
|
|
113
|
+
WdOfficialAccount,
|
|
114
|
+
WdTree,
|
|
102
115
|
WdFormDetail,
|
|
103
116
|
CustomerService,
|
|
104
117
|
FormTime,
|
|
105
118
|
FormRegion,
|
|
106
119
|
FormDate,
|
|
107
120
|
FormSelect,
|
|
121
|
+
FormSelectMultiple,
|
|
108
122
|
FormMultiRegion,
|
|
109
123
|
FormUploadFile,
|
|
110
124
|
FormImageUploader,
|
|
@@ -189,11 +203,20 @@ export const components = {
|
|
|
189
203
|
WdBubble,
|
|
190
204
|
WdImage,
|
|
191
205
|
WdTable,
|
|
206
|
+
WdTextarea,
|
|
207
|
+
WdInput,
|
|
192
208
|
QrCode,
|
|
193
209
|
// grid
|
|
194
210
|
Grid,
|
|
195
211
|
Row,
|
|
196
212
|
Col,
|
|
213
|
+
WdInputEmail,
|
|
214
|
+
WdInputUrl,
|
|
215
|
+
// WdInputNumber,
|
|
216
|
+
WdSwitch,
|
|
217
|
+
WdRadioList,
|
|
218
|
+
WdCheckboxList,
|
|
219
|
+
WdInputPhone,
|
|
197
220
|
// Repeater
|
|
198
221
|
Repeater,
|
|
199
222
|
RepeaterItem,
|