@cloudbase/weda-ui 3.4.11 → 3.4.12
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-email.js +17 -2
- package/dist/configs/components/form-input.js +17 -2
- package/dist/configs/components/form-phone.js +17 -2
- package/dist/configs/components/form-radio.js +15 -2
- package/dist/configs/components/form-select-multiple.js +362 -0
- package/dist/configs/components/form-switch.js +15 -2
- package/dist/configs/components/form-text-area.js +15 -2
- package/dist/configs/components/form-url.js +17 -2
- package/dist/configs/components/form-user-tree-select.js +13 -0
- 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 +8 -56
- 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 +7 -1
- package/dist/web/components/form/select/h5.js +18 -8
- package/dist/web/components/form/select/index.js +9 -9
- 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 +57 -10
- 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 +3 -3
- package/dist/web/components/form-input-hooks/index.js +39 -14
- package/dist/web/components/form-select-multiple/index.js +26 -0
- 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 +30 -0
- package/dist/web/components/index.js +17 -1
- package/dist/web/components/listView/index.js +20 -5
- 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/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/index.js +25 -12
- 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-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/Table/index.js +12 -2
- package/dist/web/components/wd-table/hooks/useQueryParams.js +4 -1
- package/dist/web/components/wd-table/utils/index.js +6 -2
- package/dist/web/components/wd-table/wd-table.js +70 -57
- 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 +111 -0
- package/dist/web/utils/tool.js +12 -2
- package/dist/web/weda-ui.css +193 -3
- package/package.json +6 -5
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { defineConfig, Tuple, Type } from '../type-utils';
|
|
2
|
+
import { FORM_ITEM_DATA_TITLE, FORM_ITEM_METHODS, FORM_ITEM_META, ItemData, } from '../type-utils/type-form';
|
|
3
|
+
// 属性分类
|
|
4
|
+
const X_CATEGORY = {
|
|
5
|
+
COMMON: '通用',
|
|
6
|
+
TITLE: '标题',
|
|
7
|
+
SWITCH_BUTTON: '开关按钮',
|
|
8
|
+
VERIFY: '状态/校验',
|
|
9
|
+
};
|
|
10
|
+
// 输入组件状态
|
|
11
|
+
export const WD_SWITCH_STATUS = [
|
|
12
|
+
{
|
|
13
|
+
label: '编辑',
|
|
14
|
+
value: 'edit',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: '禁用',
|
|
18
|
+
value: 'disabled',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: '只读',
|
|
22
|
+
value: 'readOnly',
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
const WD_SWITCH_SIZE = [
|
|
26
|
+
{
|
|
27
|
+
label: '默认',
|
|
28
|
+
value: '',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: '大',
|
|
32
|
+
value: 'lg',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: '中',
|
|
36
|
+
value: 'md',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: '小',
|
|
40
|
+
value: 'sm',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
// 属性类型定义
|
|
44
|
+
const data = Type.Object({
|
|
45
|
+
name: Type.String({
|
|
46
|
+
title: '绑定字段',
|
|
47
|
+
type: 'string',
|
|
48
|
+
'x-index': 10,
|
|
49
|
+
default: 'formSwitch',
|
|
50
|
+
'x-category': X_CATEGORY.COMMON,
|
|
51
|
+
'x-rules': [
|
|
52
|
+
{
|
|
53
|
+
message: '该字段必填',
|
|
54
|
+
required: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
message: '必须以字母开头,仅能输入字母或下划线或数字',
|
|
58
|
+
pattern: '^[a-zA-Z][0-9a-zA-Z_]*$',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
required: true,
|
|
62
|
+
description: '表单字段的Key值,用于提交数据时,匹配数据模型字段标识。页面内需保证唯一。',
|
|
63
|
+
}),
|
|
64
|
+
value: Type.Boolean({
|
|
65
|
+
title: '开关状态',
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
'x-index': 20,
|
|
68
|
+
default: false,
|
|
69
|
+
description: '默认开关状态',
|
|
70
|
+
remarks: '默认开关状态',
|
|
71
|
+
'x-category': X_CATEGORY.COMMON,
|
|
72
|
+
}),
|
|
73
|
+
size: Type.StringEnum({
|
|
74
|
+
title: '组件尺寸',
|
|
75
|
+
type: 'string',
|
|
76
|
+
'x-index': 30,
|
|
77
|
+
default: '',
|
|
78
|
+
description: '开关的尺寸大小,仅在PC端生效',
|
|
79
|
+
enum: Tuple(WD_SWITCH_SIZE),
|
|
80
|
+
'x-category': X_CATEGORY.COMMON,
|
|
81
|
+
'x-platforms': ['PCWEB'],
|
|
82
|
+
}),
|
|
83
|
+
...FORM_ITEM_DATA_TITLE,
|
|
84
|
+
extra: Type.String({
|
|
85
|
+
title: '下方提示',
|
|
86
|
+
type: 'string',
|
|
87
|
+
description: '配置后提示内容常显在组件下方',
|
|
88
|
+
'x-index': 115,
|
|
89
|
+
'x-category': X_CATEGORY.SWITCH_BUTTON,
|
|
90
|
+
}),
|
|
91
|
+
borderedH5: Type.Boolean({
|
|
92
|
+
title: '移动端显示下划线',
|
|
93
|
+
type: 'boolean',
|
|
94
|
+
default: true,
|
|
95
|
+
description: '关闭后移动端不显示底部下划线',
|
|
96
|
+
'x-index': 120,
|
|
97
|
+
'x-category': X_CATEGORY.SWITCH_BUTTON,
|
|
98
|
+
}),
|
|
99
|
+
required: Type.Boolean({
|
|
100
|
+
title: '必填',
|
|
101
|
+
type: 'boolean',
|
|
102
|
+
'x-index': 140,
|
|
103
|
+
default: false,
|
|
104
|
+
remarks: '启用后该组件强制必填,值不可为空',
|
|
105
|
+
description: '启用后该组件强制必填,值不可为空',
|
|
106
|
+
'x-category': X_CATEGORY.VERIFY,
|
|
107
|
+
'x-linkages': [
|
|
108
|
+
{
|
|
109
|
+
type: 'value:visible',
|
|
110
|
+
target: '*(requiredFlag,requiredMsg)',
|
|
111
|
+
condition: '{{$self.value}}',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
}),
|
|
115
|
+
requiredFlag: Type.Boolean({
|
|
116
|
+
title: '必填标识',
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
'x-index': 150,
|
|
119
|
+
default: true,
|
|
120
|
+
description: '启用后,组件若要求必填,则会显示必填星号标记',
|
|
121
|
+
remarks: '启用后,组件若要求必填,则会显示必填星号标记',
|
|
122
|
+
'x-category': X_CATEGORY.VERIFY,
|
|
123
|
+
}),
|
|
124
|
+
requiredMsg: Type.String({
|
|
125
|
+
title: '必填校验提示',
|
|
126
|
+
type: 'string',
|
|
127
|
+
'x-index': 160,
|
|
128
|
+
default: '该项为必填项',
|
|
129
|
+
'x-category': X_CATEGORY.VERIFY,
|
|
130
|
+
description: '启用必填,但组件值为空时的提示信息',
|
|
131
|
+
remarks: '启用必填,但组件值为空时的提示信息',
|
|
132
|
+
}),
|
|
133
|
+
// 新增且需兼容 disabled
|
|
134
|
+
status: Type.StringEnum({
|
|
135
|
+
title: '状态',
|
|
136
|
+
enum: Tuple(WD_SWITCH_STATUS),
|
|
137
|
+
default: 'edit',
|
|
138
|
+
type: 'string',
|
|
139
|
+
'x-index': 170,
|
|
140
|
+
'x-category': X_CATEGORY.VERIFY,
|
|
141
|
+
}),
|
|
142
|
+
});
|
|
143
|
+
const properties = Type.Pick(ItemData, [
|
|
144
|
+
'name',
|
|
145
|
+
'value',
|
|
146
|
+
'label',
|
|
147
|
+
'required',
|
|
148
|
+
'visible',
|
|
149
|
+
'disabled',
|
|
150
|
+
'readOnly',
|
|
151
|
+
]);
|
|
152
|
+
// export default
|
|
153
|
+
const config = defineConfig({
|
|
154
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
155
|
+
// 属性定义
|
|
156
|
+
data,
|
|
157
|
+
// 只读属性定义
|
|
158
|
+
properties,
|
|
159
|
+
// 样式API
|
|
160
|
+
classes: [
|
|
161
|
+
{
|
|
162
|
+
name: '根元素',
|
|
163
|
+
selector: `.wd-switch-root`,
|
|
164
|
+
description: '组件最外层元素',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'H5 端根元素',
|
|
168
|
+
selector: `.wd-h5-switch-root`,
|
|
169
|
+
description: '可设定 H5 端的根元素样式',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'PC 端根元素',
|
|
173
|
+
selector: `.wd-pc-switch-root`,
|
|
174
|
+
description: '可设定 PC 端的根元素样式',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: '小程序端根元素',
|
|
178
|
+
selector: `.wd-mp-switch-root`,
|
|
179
|
+
description: '可设定小程序端的根元素样式',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: '无边框状态',
|
|
183
|
+
selector: `.wd-switch-root.is-borderless`,
|
|
184
|
+
description: '设置组件无边框状态样式',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: '必填状态',
|
|
188
|
+
selector: `.wd-switch-root.is-required`,
|
|
189
|
+
description: '设置组件必填状态样式',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: '标题',
|
|
193
|
+
selector: `.wd-switch__label`,
|
|
194
|
+
description: '组件标题元素',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: '标题禁用状态',
|
|
198
|
+
selector: `.wd-switch__label.is-disabled`,
|
|
199
|
+
description: '设置组件标题禁用状态样式',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: '标题不换行',
|
|
203
|
+
selector: `.wd-switch__label.is-nowrap`,
|
|
204
|
+
description: '设置组件标题不换行时状态样式',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: '提示文字',
|
|
208
|
+
selector: `.wd-switch__help`,
|
|
209
|
+
description: '设置组件提示文字样式',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: '校验信息',
|
|
213
|
+
selector: `.wd-switch__error`,
|
|
214
|
+
description: '设置组件校验信息样式',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: '组件本身',
|
|
218
|
+
selector: '.wd-switch',
|
|
219
|
+
description: '组件本身元素',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: '禁用状态',
|
|
223
|
+
selector: '.wd-switch.is-disabled',
|
|
224
|
+
description: '组件禁用状态',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: '只读状态',
|
|
228
|
+
selector: '.wd-switch.is-disabled',
|
|
229
|
+
description: '组件只读状态',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: '勾选状态',
|
|
233
|
+
selector: '.wd-switch.is-checked',
|
|
234
|
+
description: '勾选状态',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: '小尺寸',
|
|
238
|
+
selector: '.wd-switch.size-sm',
|
|
239
|
+
description: '小尺寸样式(仅PC端有效)',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: '默认尺寸',
|
|
243
|
+
selector: '.wd-switch.size-md',
|
|
244
|
+
description: '默认、中尺寸样式(仅PC端有效)',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: '大尺寸',
|
|
248
|
+
selector: '.wd-switch.size-lg',
|
|
249
|
+
description: '大尺寸样式',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: '开关背景',
|
|
253
|
+
selector: '.wd-switch__box',
|
|
254
|
+
description: '开关内部背景元素',
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: '开关按钮',
|
|
258
|
+
selector: '.wd-switch__box::before',
|
|
259
|
+
description: '开关内部按钮元素',
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
// 组件方法
|
|
263
|
+
methods: [
|
|
264
|
+
{
|
|
265
|
+
...FORM_ITEM_METHODS.setValue,
|
|
266
|
+
params: {
|
|
267
|
+
properties: {
|
|
268
|
+
value: {
|
|
269
|
+
title: '值',
|
|
270
|
+
type: 'boolean',
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
FORM_ITEM_METHODS.setVisible,
|
|
276
|
+
FORM_ITEM_METHODS.setDisabled,
|
|
277
|
+
FORM_ITEM_METHODS.clearValue,
|
|
278
|
+
FORM_ITEM_METHODS.setReadOnly,
|
|
279
|
+
FORM_ITEM_METHODS.handleValidate,
|
|
280
|
+
FORM_ITEM_METHODS.clearValidate,
|
|
281
|
+
],
|
|
282
|
+
// 组件对外暴露事件
|
|
283
|
+
events: [
|
|
284
|
+
{
|
|
285
|
+
title: '值改变',
|
|
286
|
+
name: 'change',
|
|
287
|
+
detail: {
|
|
288
|
+
value: Type.BasicTypeUnion({
|
|
289
|
+
type: 'boolean',
|
|
290
|
+
description: '所选开关状态',
|
|
291
|
+
}),
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
// 组件元信息
|
|
296
|
+
meta: {
|
|
297
|
+
name: 'WdSwitch',
|
|
298
|
+
title: '开关',
|
|
299
|
+
// 组件别名,用于生成组件 id,例如 Icon1
|
|
300
|
+
componentName: 'Switch',
|
|
301
|
+
description: '用于控制打开/关闭',
|
|
302
|
+
icon: '../../icons/Switch.svg',
|
|
303
|
+
categoryOrder: 500,
|
|
304
|
+
componentOrder: 440,
|
|
305
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/WdSwitch',
|
|
306
|
+
category: FORM_ITEM_META.category,
|
|
307
|
+
shortcut: FORM_ITEM_META.shortcut,
|
|
308
|
+
group: FORM_ITEM_META.group,
|
|
309
|
+
visible: FORM_ITEM_META.visible,
|
|
310
|
+
},
|
|
311
|
+
compConfig: {
|
|
312
|
+
componentType: 'formField',
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
export default config;
|
|
@@ -580,65 +580,12 @@ const data = Type.Object({
|
|
|
580
580
|
paramsSchema: {
|
|
581
581
|
type: 'object',
|
|
582
582
|
properties: {
|
|
583
|
-
inParams: {
|
|
584
|
-
type: 'object',
|
|
585
|
-
properties: {
|
|
586
|
-
properties: {
|
|
587
|
-
type: 'object',
|
|
588
|
-
properties: {
|
|
589
|
-
pageNo: {
|
|
590
|
-
type: 'object',
|
|
591
|
-
properties: {
|
|
592
|
-
type: {
|
|
593
|
-
const: 'number',
|
|
594
|
-
},
|
|
595
|
-
},
|
|
596
|
-
required: ['type'],
|
|
597
|
-
},
|
|
598
|
-
pageSize: {
|
|
599
|
-
type: 'object',
|
|
600
|
-
properties: {
|
|
601
|
-
type: {
|
|
602
|
-
const: 'number',
|
|
603
|
-
},
|
|
604
|
-
},
|
|
605
|
-
required: ['type'],
|
|
606
|
-
},
|
|
607
|
-
orderBy: {
|
|
608
|
-
type: 'object',
|
|
609
|
-
properties: {
|
|
610
|
-
type: {
|
|
611
|
-
const: 'string',
|
|
612
|
-
},
|
|
613
|
-
},
|
|
614
|
-
},
|
|
615
|
-
orderType: {
|
|
616
|
-
type: 'object',
|
|
617
|
-
properties: {
|
|
618
|
-
type: {
|
|
619
|
-
const: 'string',
|
|
620
|
-
},
|
|
621
|
-
},
|
|
622
|
-
},
|
|
623
|
-
},
|
|
624
|
-
required: ['pageNo', 'pageSize'],
|
|
625
|
-
},
|
|
626
|
-
},
|
|
627
|
-
},
|
|
628
583
|
outParams: {
|
|
629
584
|
type: 'object',
|
|
630
585
|
properties: {
|
|
631
586
|
properties: {
|
|
632
587
|
type: 'object',
|
|
633
588
|
properties: {
|
|
634
|
-
total: {
|
|
635
|
-
type: 'object',
|
|
636
|
-
properties: {
|
|
637
|
-
type: {
|
|
638
|
-
const: 'number',
|
|
639
|
-
},
|
|
640
|
-
},
|
|
641
|
-
},
|
|
642
589
|
records: {
|
|
643
590
|
type: 'object',
|
|
644
591
|
properties: {
|
|
@@ -669,7 +616,7 @@ const data = Type.Object({
|
|
|
669
616
|
},
|
|
670
617
|
},
|
|
671
618
|
},
|
|
672
|
-
required: ['
|
|
619
|
+
required: ['records'],
|
|
673
620
|
},
|
|
674
621
|
},
|
|
675
622
|
},
|
|
@@ -1028,14 +975,17 @@ const config = defineConfig({
|
|
|
1028
975
|
name: 'tabTableRow',
|
|
1029
976
|
detail: {
|
|
1030
977
|
record: Type.BasicTypeUnion({
|
|
978
|
+
title: '选中行记录',
|
|
1031
979
|
type: 'array',
|
|
1032
980
|
description: '选中行记录',
|
|
1033
981
|
}),
|
|
1034
|
-
rowKey: Type.
|
|
982
|
+
rowKey: Type.String({
|
|
983
|
+
title: '选中行记录id',
|
|
1035
984
|
type: 'string',
|
|
1036
985
|
description: '选中行记录id',
|
|
1037
986
|
}),
|
|
1038
|
-
recordIndex: Type.
|
|
987
|
+
recordIndex: Type.Number({
|
|
988
|
+
title: '选中行index',
|
|
1039
989
|
type: 'number',
|
|
1040
990
|
description: '选中行index',
|
|
1041
991
|
}),
|
|
@@ -1048,6 +998,7 @@ const config = defineConfig({
|
|
|
1048
998
|
name: 'rowsSelect',
|
|
1049
999
|
detail: {
|
|
1050
1000
|
data: Type.BasicTypeUnion({
|
|
1001
|
+
title: '选中行记录',
|
|
1051
1002
|
type: 'array',
|
|
1052
1003
|
description: '选中行记录',
|
|
1053
1004
|
}),
|
|
@@ -1062,6 +1013,7 @@ const config = defineConfig({
|
|
|
1062
1013
|
'x-platforms': ['MOBILEWEB', 'PCWEB'],
|
|
1063
1014
|
detail: {
|
|
1064
1015
|
data: Type.BasicTypeUnion({
|
|
1016
|
+
title: '查询结果,查询条件',
|
|
1065
1017
|
type: 'object',
|
|
1066
1018
|
description: '查询结果,查询条件',
|
|
1067
1019
|
}),
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineConfig, Type } from '../type-utils';
|
|
2
|
+
import { FORM_ITEM_DATA, FORM_ITEM_DATA_TITLE, FORM_ITEM_EVENTS, FORM_ITEM_METHODS, FORM_ITEM_META, getFormItemClasses, ItemData, } from '../type-utils/type-form';
|
|
3
|
+
// 属性类型定义
|
|
4
|
+
const data = Type.Partial(Type.Object({
|
|
5
|
+
// 通用
|
|
6
|
+
name: { ...FORM_ITEM_DATA.name, default: 'formTextarea' },
|
|
7
|
+
value: FORM_ITEM_DATA.value,
|
|
8
|
+
placeholder: FORM_ITEM_DATA.placeholder,
|
|
9
|
+
size: FORM_ITEM_DATA.size,
|
|
10
|
+
block: FORM_ITEM_DATA.block,
|
|
11
|
+
// 标题
|
|
12
|
+
...FORM_ITEM_DATA_TITLE,
|
|
13
|
+
// 输入框
|
|
14
|
+
extra: FORM_ITEM_DATA.extra,
|
|
15
|
+
counterVisible: { ...FORM_ITEM_DATA.counterVisible, default: true },
|
|
16
|
+
focus: FORM_ITEM_DATA.focus,
|
|
17
|
+
borderedH5: FORM_ITEM_DATA.borderedH5,
|
|
18
|
+
borderedPc: FORM_ITEM_DATA.borderedPc,
|
|
19
|
+
// 状态校验
|
|
20
|
+
maxLength: FORM_ITEM_DATA.maxLength,
|
|
21
|
+
status: FORM_ITEM_DATA.status,
|
|
22
|
+
required: FORM_ITEM_DATA.required,
|
|
23
|
+
requiredMsg: FORM_ITEM_DATA.requiredMsg,
|
|
24
|
+
requiredFlag: FORM_ITEM_DATA.requiredFlag,
|
|
25
|
+
}));
|
|
26
|
+
const properties = Type.Pick(ItemData, [
|
|
27
|
+
'name',
|
|
28
|
+
'label',
|
|
29
|
+
'required',
|
|
30
|
+
'value',
|
|
31
|
+
'visible',
|
|
32
|
+
'disabled',
|
|
33
|
+
'readOnly',
|
|
34
|
+
]);
|
|
35
|
+
const classes = getFormItemClasses('textarea');
|
|
36
|
+
// export default
|
|
37
|
+
const config = defineConfig({
|
|
38
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
39
|
+
data,
|
|
40
|
+
properties,
|
|
41
|
+
classes: [
|
|
42
|
+
...classes,
|
|
43
|
+
{
|
|
44
|
+
name: '字数',
|
|
45
|
+
selector: '.wd-textarea__count-text',
|
|
46
|
+
description: '多行输入框字数',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
methods: [
|
|
50
|
+
FORM_ITEM_METHODS.setValue,
|
|
51
|
+
FORM_ITEM_METHODS.setVisible,
|
|
52
|
+
FORM_ITEM_METHODS.setDisabled,
|
|
53
|
+
FORM_ITEM_METHODS.clearValue,
|
|
54
|
+
FORM_ITEM_METHODS.setReadOnly,
|
|
55
|
+
FORM_ITEM_METHODS.handleValidate,
|
|
56
|
+
FORM_ITEM_METHODS.clearValidate,
|
|
57
|
+
],
|
|
58
|
+
events: [
|
|
59
|
+
FORM_ITEM_EVENTS.change,
|
|
60
|
+
FORM_ITEM_EVENTS.focus,
|
|
61
|
+
FORM_ITEM_EVENTS.blur,
|
|
62
|
+
],
|
|
63
|
+
meta: {
|
|
64
|
+
description: '用于输入/查看较长文本内容。',
|
|
65
|
+
icon: '../../icons/TextArea.svg',
|
|
66
|
+
title: '多行输入',
|
|
67
|
+
name: 'WdTextarea',
|
|
68
|
+
componentName: 'TextArea',
|
|
69
|
+
ctype: 2,
|
|
70
|
+
categoryOrder: 500,
|
|
71
|
+
componentOrder: 360,
|
|
72
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/WdTextarea',
|
|
73
|
+
category: FORM_ITEM_META.category,
|
|
74
|
+
shortcut: FORM_ITEM_META.shortcut,
|
|
75
|
+
group: FORM_ITEM_META.group,
|
|
76
|
+
visible: FORM_ITEM_META.visible,
|
|
77
|
+
},
|
|
78
|
+
compConfig: {
|
|
79
|
+
componentType: 'formField',
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
export default config;
|