@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
|
@@ -5,7 +5,7 @@ export const commonRequiredDataForm = {
|
|
|
5
5
|
default: false,
|
|
6
6
|
remarks: '启用后该组件强制必填,值不可为空',
|
|
7
7
|
'x-index': 6,
|
|
8
|
-
'x-
|
|
8
|
+
'x-group': '基础属性',
|
|
9
9
|
'x-linkages': [
|
|
10
10
|
{
|
|
11
11
|
type: 'value:visible',
|
|
@@ -19,7 +19,7 @@ export const commonRequiredDataForm = {
|
|
|
19
19
|
default: true,
|
|
20
20
|
remarks: '启用后,组件若要求必填,则会显示必填星号标记',
|
|
21
21
|
'x-index': 7,
|
|
22
|
-
'x-
|
|
22
|
+
'x-group': '基础属性',
|
|
23
23
|
}),
|
|
24
24
|
requiredMsg: Type.String({
|
|
25
25
|
type: 'string',
|
|
@@ -27,7 +27,7 @@ export const commonRequiredDataForm = {
|
|
|
27
27
|
default: '该项为必填项',
|
|
28
28
|
remarks: '启用必填,但组件值为空时的提示信息',
|
|
29
29
|
'x-index': 8,
|
|
30
|
-
'x-
|
|
30
|
+
'x-group': '基础属性',
|
|
31
31
|
}),
|
|
32
32
|
};
|
|
33
33
|
// "rules": {
|
|
@@ -210,12 +210,15 @@ const config = defineConfig({
|
|
|
210
210
|
'x-platforms': ['MP'],
|
|
211
211
|
detail: {
|
|
212
212
|
errMsg: Type.String({
|
|
213
|
+
title: '错误信息',
|
|
213
214
|
description: '错误信息',
|
|
214
215
|
}),
|
|
215
216
|
path: Type.String({
|
|
217
|
+
title: '小程序消息指定的路径',
|
|
216
218
|
description: '小程序消息指定的路径',
|
|
217
219
|
}),
|
|
218
220
|
query: Type.Object({}, {
|
|
221
|
+
title: '小程序消息指定的查询参数',
|
|
219
222
|
description: '小程序消息指定的查询参数',
|
|
220
223
|
}),
|
|
221
224
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Type } from '../type-utils';
|
|
1
2
|
const rawTemplate = `
|
|
2
3
|
{{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
|
|
3
4
|
{{#with (helper_utils 'concat' 'string' 'number' 'boolean') as |_rangeTypes|}}
|
|
@@ -63,9 +64,9 @@ component='Col'
|
|
|
63
64
|
component = 'Repeater'
|
|
64
65
|
[template.items.items.items.items.attributes]
|
|
65
66
|
{{#if (helper_utils 'isEqual' _name '_departmentList')}}
|
|
66
|
-
':data' = '$
|
|
67
|
+
':data' = '$w.{{$self.id}}.record[\`##SHOW\`]._departmentList'
|
|
67
68
|
{{else}}
|
|
68
|
-
':data' = '$
|
|
69
|
+
':data' = '$w.{{$self.id}}.record.{{_name}}'
|
|
69
70
|
{{/if}}
|
|
70
71
|
suffix = '{{repeater_suffix}}'
|
|
71
72
|
forItem = 'item_{{repeater_suffix}}'
|
|
@@ -106,25 +107,25 @@ whiteSpace = 'pre-line'
|
|
|
106
107
|
[[template.items.items.items.items]]
|
|
107
108
|
component='WdImage'
|
|
108
109
|
[template.items.items.items.items.attributes]
|
|
109
|
-
':src'='$
|
|
110
|
+
':src'='$w.{{$self.id}}.record.{{_name}}'
|
|
110
111
|
{{else}}
|
|
111
112
|
[[template.items.items.items.items]]
|
|
112
113
|
component='WdText'
|
|
113
114
|
[template.items.items.items.items.attributes]
|
|
114
115
|
{{#if (helper_utils 'isEqual' _type 'boolean')}}
|
|
115
|
-
':text'='$
|
|
116
|
+
':text'='$w.{{$self.id}}.record.{{_name}} ? \`是\` : \`否\`'
|
|
116
117
|
{{else if (helper_utils 'isEqual' _format 'datetime')}}
|
|
117
|
-
':text'='app.utils.formatDate($
|
|
118
|
+
':text'='app.utils.formatDate($w.{{$self.id}}.record.{{_name}}, \`yyyy-mm-dd HH:MM:ss\`)'
|
|
118
119
|
{{else if (helper_utils 'isEqual' _format 'date')}}
|
|
119
|
-
':text'='app.utils.formatDate($
|
|
120
|
+
':text'='app.utils.formatDate($w.{{$self.id}}.record.{{_name}}, \`yyyy-mm-dd\`)'
|
|
120
121
|
{{else if (helper_utils 'isEqual' _format 'time')}}
|
|
121
|
-
':text'='app.utils.formatDate($
|
|
122
|
+
':text'='app.utils.formatDate($w.{{$self.id}}.record.{{_name}}, \`HH:MM:ss\`, true)'
|
|
122
123
|
{{else if (helper_utils 'isEqual' _format 'x-enum')}}
|
|
123
|
-
':text'='app.utils.formatEnum($
|
|
124
|
+
':text'='app.utils.formatEnum($w.{{$self.id}}.record.{{_name}}, \`{{helper_utils 'get' _field 'x-option-name'}}\`, app)'
|
|
124
125
|
{{else if (helper_utils 'includes' (helper_utils 'concat' 'father-son' 'related') _format)}}
|
|
125
|
-
':text'='$
|
|
126
|
+
':text'='$w.{{$self.id}}.record?.[\`@{{_name}}\`]?.v1?.record?.[$w.{{$self.id}}.record?.[\`@{{_name}}\`]?.v1?.primaryColumn] || $w.{{$self.id}}.record.{{_name}} || \`-\`'
|
|
126
127
|
{{else}}
|
|
127
|
-
':text'='$
|
|
128
|
+
':text'='$w.{{$self.id}}.record.{{_name}} || \`-\`'
|
|
128
129
|
{{/if}}
|
|
129
130
|
{{/if}}
|
|
130
131
|
[template.items.items.items.items.extra.commonStyle]
|
|
@@ -167,6 +168,13 @@ ${rawTemplate}
|
|
|
167
168
|
{{/with}}
|
|
168
169
|
{{/with}}
|
|
169
170
|
`;
|
|
171
|
+
const properties = Type.Object({
|
|
172
|
+
record: Type.BasicTypeUnion({
|
|
173
|
+
title: '数据记录',
|
|
174
|
+
type: 'object',
|
|
175
|
+
description: '数据记录',
|
|
176
|
+
}),
|
|
177
|
+
});
|
|
170
178
|
const config = {
|
|
171
179
|
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
172
180
|
data: {
|
|
@@ -388,6 +396,8 @@ const config = {
|
|
|
388
396
|
remarks: '数据查询失败时触发',
|
|
389
397
|
},
|
|
390
398
|
],
|
|
399
|
+
// 组件实例属性
|
|
400
|
+
properties,
|
|
391
401
|
methods: [
|
|
392
402
|
{
|
|
393
403
|
name: 'refresh',
|
|
@@ -230,15 +230,28 @@ const config = defineConfig({
|
|
|
230
230
|
meta: {
|
|
231
231
|
description: '用于在页面中平铺展示多个可选项,由用户进行多项选择的场景。',
|
|
232
232
|
icon: '../icons/FormCheckbox.svg',
|
|
233
|
-
title: '多选',
|
|
233
|
+
title: '多选[旧]',
|
|
234
234
|
name: 'FormCheckbox',
|
|
235
235
|
componentName: 'Checkbox',
|
|
236
236
|
category: '表单',
|
|
237
237
|
tag: [],
|
|
238
238
|
platform: [],
|
|
239
|
-
visible: [
|
|
239
|
+
visible: [],
|
|
240
240
|
categoryOrder: 500,
|
|
241
241
|
componentOrder: 390,
|
|
242
|
+
disableUpgradeAll: true,
|
|
243
|
+
deprecated: true,
|
|
244
|
+
renderMode: [
|
|
245
|
+
{
|
|
246
|
+
component: 'WdCheckboxList',
|
|
247
|
+
renderType: 'update',
|
|
248
|
+
description: `- 支持标题、内容框的提示语配置;
|
|
249
|
+
- 支持标题的对齐、宽度、换行配置;
|
|
250
|
+
- 支持选项横向/纵向排列方式可选择;
|
|
251
|
+
- 支持快捷去除移动端下划线;
|
|
252
|
+
- 支持通过标准化的样式API和CSS变量灵活修改和自定义组件样式;`,
|
|
253
|
+
},
|
|
254
|
+
],
|
|
242
255
|
},
|
|
243
256
|
configMeta: {
|
|
244
257
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormCheckbox',
|
|
@@ -231,12 +231,27 @@ const config = defineConfig({
|
|
|
231
231
|
},
|
|
232
232
|
meta: {
|
|
233
233
|
name: 'FormEmail',
|
|
234
|
+
title: '邮箱输入[旧]',
|
|
234
235
|
componentName: 'EmailInput',
|
|
235
|
-
title: '邮箱输入',
|
|
236
236
|
description: '用于输入邮箱地址,会强制校验输入内容是否符合邮箱格式。',
|
|
237
237
|
category: '表单',
|
|
238
238
|
icon: '../icons/FormEmail.svg',
|
|
239
|
-
visible: [
|
|
239
|
+
visible: [],
|
|
240
|
+
disableUpgradeAll: true,
|
|
241
|
+
deprecated: true,
|
|
242
|
+
renderMode: [
|
|
243
|
+
{
|
|
244
|
+
component: 'WdInputEmail',
|
|
245
|
+
renderType: 'update',
|
|
246
|
+
props: { 'data.value': 'data.inputValue' },
|
|
247
|
+
description: `- 支持标题、输入框的提示语配置;
|
|
248
|
+
- 支持标题的对齐、宽度、换行配置;
|
|
249
|
+
- 支持输入框前/后缀图标和文本的配置;
|
|
250
|
+
- 支持支持控制限制字数的展示;
|
|
251
|
+
- 支持快捷去除移动端下划线、PC端输入边框;
|
|
252
|
+
- 支持通过标准化的样式API和CSS变量灵活修改和自定义组件样式;`,
|
|
253
|
+
},
|
|
254
|
+
],
|
|
240
255
|
},
|
|
241
256
|
configMeta: {
|
|
242
257
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormEmail',
|
|
@@ -452,7 +452,7 @@ export default defineConfig({
|
|
|
452
452
|
},
|
|
453
453
|
],
|
|
454
454
|
meta: {
|
|
455
|
-
title: '单行输入',
|
|
455
|
+
title: '单行输入[旧]',
|
|
456
456
|
name: 'FormInput',
|
|
457
457
|
componentName: 'Input',
|
|
458
458
|
description: '用于输入/查看较短文本内容。',
|
|
@@ -460,7 +460,7 @@ export default defineConfig({
|
|
|
460
460
|
categoryOrder: 500,
|
|
461
461
|
componentOrder: 350,
|
|
462
462
|
icon: '../icons/FormInput.svg',
|
|
463
|
-
visible: [
|
|
463
|
+
visible: [],
|
|
464
464
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormInput',
|
|
465
465
|
shortcut: {
|
|
466
466
|
props: ['name', 'label'],
|
|
@@ -473,5 +473,20 @@ export default defineConfig({
|
|
|
473
473
|
},
|
|
474
474
|
],
|
|
475
475
|
},
|
|
476
|
+
disableUpgradeAll: true,
|
|
477
|
+
deprecated: true,
|
|
478
|
+
renderMode: [
|
|
479
|
+
{
|
|
480
|
+
component: 'WdInput',
|
|
481
|
+
renderType: 'update',
|
|
482
|
+
props: { 'data.value': 'data.inputValue' },
|
|
483
|
+
description: `- 支持标题、输入框的提示语配置;
|
|
484
|
+
- 支持标题的对齐、宽度、换行配置;
|
|
485
|
+
- 支持输入框前/后缀图标和文本的配置;
|
|
486
|
+
- 支持支持控制限制字数的展示;
|
|
487
|
+
- 支持快捷去除移动端下划线、PC端输入边框;
|
|
488
|
+
- 支持通过标准化的样式API和CSS变量灵活修改和自定义组件样式;`,
|
|
489
|
+
},
|
|
490
|
+
],
|
|
476
491
|
},
|
|
477
492
|
});
|
|
@@ -222,14 +222,29 @@ const config = defineConfig({
|
|
|
222
222
|
events,
|
|
223
223
|
meta: {
|
|
224
224
|
name: 'FormPhone',
|
|
225
|
+
title: '电话输入[旧]',
|
|
225
226
|
componentName: 'PhoneInput',
|
|
226
|
-
title: '电话输入',
|
|
227
227
|
description: '用于输入电话号码,会强制校验输入内容是否符合电话格式。',
|
|
228
228
|
category: '表单',
|
|
229
229
|
icon: '../icons/FormPhone.svg',
|
|
230
230
|
categoryOrder: 500,
|
|
231
231
|
componentOrder: 500,
|
|
232
|
-
visible: [
|
|
232
|
+
visible: [],
|
|
233
|
+
deprecated: true,
|
|
234
|
+
disableUpgradeAll: true,
|
|
235
|
+
renderMode: [
|
|
236
|
+
{
|
|
237
|
+
component: 'WdInputPhone',
|
|
238
|
+
renderType: 'update',
|
|
239
|
+
props: { 'data.value': 'data.inputValue' },
|
|
240
|
+
description: `- 支持标题、输入框的提示语配置;
|
|
241
|
+
- 支持标题的对齐、宽度、换行配置;
|
|
242
|
+
- 支持输入框前/后缀图标和文本的配置;
|
|
243
|
+
- 支持支持控制限制字数的展示;
|
|
244
|
+
- 支持快捷去除移动端下划线、PC端输入边框;
|
|
245
|
+
- 支持通过标准化的样式API和CSS变量灵活修改和自定义组件样式;`,
|
|
246
|
+
},
|
|
247
|
+
],
|
|
233
248
|
},
|
|
234
249
|
configMeta: {
|
|
235
250
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormPhone',
|
|
@@ -249,13 +249,26 @@ const config = defineConfig({
|
|
|
249
249
|
},
|
|
250
250
|
meta: {
|
|
251
251
|
name: 'FormRadio',
|
|
252
|
+
title: '单选[旧]',
|
|
252
253
|
componentName: 'Radio',
|
|
253
|
-
title: '单选',
|
|
254
254
|
description: '用于在页面中平铺展示多个可选项,由用户选择其一的场景。',
|
|
255
255
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormRegion',
|
|
256
256
|
category: '表单',
|
|
257
257
|
icon: '../icons/FormRadio.svg',
|
|
258
|
-
visible: [
|
|
258
|
+
visible: [],
|
|
259
|
+
disableUpgradeAll: true,
|
|
260
|
+
deprecated: true,
|
|
261
|
+
renderMode: [
|
|
262
|
+
{
|
|
263
|
+
component: 'WdRadioList',
|
|
264
|
+
renderType: 'update',
|
|
265
|
+
description: `- 支持标题、内容框的提示语配置;
|
|
266
|
+
- 支持标题的对齐、宽度、换行配置;
|
|
267
|
+
- 支持选项横向/纵向排列方式可选择;
|
|
268
|
+
- 支持快捷去除移动端下划线;
|
|
269
|
+
- 支持通过标准化的样式API和CSS变量灵活修改和自定义组件样式;`,
|
|
270
|
+
},
|
|
271
|
+
],
|
|
259
272
|
},
|
|
260
273
|
});
|
|
261
274
|
export default config;
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { defineConfig, Tuple, Type, } from '../type-utils';
|
|
2
|
+
const data = Type.Object({
|
|
3
|
+
name: Type.String({
|
|
4
|
+
type: 'string',
|
|
5
|
+
title: '绑定字段',
|
|
6
|
+
default: 'formSelectMultiple',
|
|
7
|
+
remarks: '提交表单时会将组件值提交保存到所配置的字段中',
|
|
8
|
+
'x-index': 5,
|
|
9
|
+
'x-rules': [
|
|
10
|
+
{
|
|
11
|
+
message: '该字段必填',
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
message: '必须以字母开头,仅能输入字母或下划线或数字',
|
|
16
|
+
pattern: '^[a-zA-Z][0-9a-zA-Z_]*$',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
required: true,
|
|
20
|
+
'x-category': '基础属性',
|
|
21
|
+
description: '表单字段的Key值,用于提交数据时,匹配数据模型字段标识。页面内需保证唯一。',
|
|
22
|
+
}),
|
|
23
|
+
label: Type.String({
|
|
24
|
+
type: 'string',
|
|
25
|
+
title: '字段标题',
|
|
26
|
+
default: '下拉多选',
|
|
27
|
+
remarks: '组件标题位置的显示内容',
|
|
28
|
+
'x-index': 10,
|
|
29
|
+
'x-category': '基础属性',
|
|
30
|
+
}),
|
|
31
|
+
labelVisible: Type.Boolean({
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
title: '显示标题',
|
|
34
|
+
default: true,
|
|
35
|
+
remarks: '显示组件的标题',
|
|
36
|
+
'x-index': 15,
|
|
37
|
+
'x-category': '基础属性',
|
|
38
|
+
}),
|
|
39
|
+
placeholder: Type.String({
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: '提示文字',
|
|
42
|
+
default: '请选择',
|
|
43
|
+
remarks: '用于说明组件用途或注意事项的提示文字',
|
|
44
|
+
'x-index': 16,
|
|
45
|
+
'x-category': '基础属性',
|
|
46
|
+
}),
|
|
47
|
+
value: Type.Array(Type.String({
|
|
48
|
+
type: 'string',
|
|
49
|
+
title: 'value',
|
|
50
|
+
}), {
|
|
51
|
+
type: 'array',
|
|
52
|
+
title: '选中值',
|
|
53
|
+
default: [],
|
|
54
|
+
remarks: '默认选中的选项',
|
|
55
|
+
'x-index': 25,
|
|
56
|
+
inputProp: {
|
|
57
|
+
changeEvent: 'change',
|
|
58
|
+
valueFromEvent: 'event.detail.value',
|
|
59
|
+
},
|
|
60
|
+
'x-category': '基础属性',
|
|
61
|
+
}),
|
|
62
|
+
required: Type.Boolean({
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
title: '必填',
|
|
65
|
+
default: false,
|
|
66
|
+
remarks: '启用后该组件强制必填,值不可为空',
|
|
67
|
+
'x-index': 30,
|
|
68
|
+
'x-category': '基础属性',
|
|
69
|
+
'x-linkages': [
|
|
70
|
+
{
|
|
71
|
+
type: 'value:visible',
|
|
72
|
+
target: '*(requiredFlag,requiredMsg)',
|
|
73
|
+
condition: '{{$self.value}}',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
}),
|
|
77
|
+
requiredFlag: Type.Boolean({
|
|
78
|
+
type: 'boolean',
|
|
79
|
+
title: '必填标识',
|
|
80
|
+
default: true,
|
|
81
|
+
remarks: '启用后,组件若要求必填,则会显示必填星号标记',
|
|
82
|
+
'x-index': 35,
|
|
83
|
+
'x-category': '基础属性',
|
|
84
|
+
}),
|
|
85
|
+
requiredMsg: Type.String({
|
|
86
|
+
type: 'string',
|
|
87
|
+
title: '必填校验提示',
|
|
88
|
+
default: '该项为必填项',
|
|
89
|
+
remarks: '启用必填,但组件值为空时的提示信息',
|
|
90
|
+
'x-index': 40,
|
|
91
|
+
'x-category': '基础属性',
|
|
92
|
+
}),
|
|
93
|
+
layout: Type.StringEnum({
|
|
94
|
+
enum: Tuple([
|
|
95
|
+
{
|
|
96
|
+
label: '自动',
|
|
97
|
+
value: '',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: '水平',
|
|
101
|
+
value: 'horizontal',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: '垂直',
|
|
105
|
+
value: 'vertical',
|
|
106
|
+
},
|
|
107
|
+
]),
|
|
108
|
+
type: 'string',
|
|
109
|
+
title: '布局方式',
|
|
110
|
+
default: '',
|
|
111
|
+
remarks: '设置当前组件的标题和输入选择区域为左右布局或上下布局,如选择“自动”,则跟随父级表单容器的配置',
|
|
112
|
+
'x-index': 105,
|
|
113
|
+
'x-category': '高级属性',
|
|
114
|
+
}),
|
|
115
|
+
disabled: Type.Boolean({
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
title: '禁用',
|
|
118
|
+
default: false,
|
|
119
|
+
remarks: '是否禁用输入/选择,启用后组件强制显示为只读效果',
|
|
120
|
+
'x-index': 113,
|
|
121
|
+
'x-category': '高级属性',
|
|
122
|
+
}),
|
|
123
|
+
range: Type.Array(Type.Object({
|
|
124
|
+
label: Type.String({
|
|
125
|
+
type: 'string',
|
|
126
|
+
title: '选项名称',
|
|
127
|
+
default: '选项名称',
|
|
128
|
+
}),
|
|
129
|
+
value: Type.String({
|
|
130
|
+
type: 'string',
|
|
131
|
+
title: '选项值',
|
|
132
|
+
default: '选项值',
|
|
133
|
+
}),
|
|
134
|
+
}, {
|
|
135
|
+
type: 'object',
|
|
136
|
+
default: {
|
|
137
|
+
label: '选项名称',
|
|
138
|
+
value: '选项值',
|
|
139
|
+
},
|
|
140
|
+
display: 'label',
|
|
141
|
+
}), {
|
|
142
|
+
type: 'array',
|
|
143
|
+
title: '选项',
|
|
144
|
+
default: [
|
|
145
|
+
{
|
|
146
|
+
label: '选项名称',
|
|
147
|
+
value: '选项值',
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
remarks: '供用户进行选择的选项列表',
|
|
151
|
+
'x-index': 140,
|
|
152
|
+
'x-props': {
|
|
153
|
+
'data-withBindMeta': true,
|
|
154
|
+
},
|
|
155
|
+
'x-category': '基础属性',
|
|
156
|
+
'x-component': 'list-bind-switch',
|
|
157
|
+
'x-component-props': {
|
|
158
|
+
'origin-component': 'list',
|
|
159
|
+
},
|
|
160
|
+
}),
|
|
161
|
+
size: Type.StringEnum({
|
|
162
|
+
enum: Tuple([
|
|
163
|
+
{
|
|
164
|
+
label: '大',
|
|
165
|
+
value: 'l',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
label: '中',
|
|
169
|
+
value: 'm',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
label: '小',
|
|
173
|
+
value: 's',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label: '占满',
|
|
177
|
+
value: 'full',
|
|
178
|
+
},
|
|
179
|
+
]),
|
|
180
|
+
type: 'string',
|
|
181
|
+
title: '组件宽度',
|
|
182
|
+
default: 'full',
|
|
183
|
+
'x-index': 165,
|
|
184
|
+
'x-category': '基础属性',
|
|
185
|
+
'x-platforms': ['PCWEB'],
|
|
186
|
+
}),
|
|
187
|
+
// where: Type.Array(Type.Any(), {
|
|
188
|
+
// type: 'array',
|
|
189
|
+
// items: {},
|
|
190
|
+
// title: '选项筛选',
|
|
191
|
+
// 'x-props': {
|
|
192
|
+
// 'data-hidebind': true,
|
|
193
|
+
// 'data-withBindMeta': true,
|
|
194
|
+
// 'data-hideBindValue': true,
|
|
195
|
+
// },
|
|
196
|
+
// 'x-category': '基础属性',
|
|
197
|
+
// 'x-component': 'condition-select',
|
|
198
|
+
// 'x-component-props': {
|
|
199
|
+
// selectedDsName: '',
|
|
200
|
+
// blackListConfig: {
|
|
201
|
+
// type: ['object', 'array'],
|
|
202
|
+
// format: ['x-file', 'x-image'],
|
|
203
|
+
// },
|
|
204
|
+
// customRelOptions: {
|
|
205
|
+
// number: [
|
|
206
|
+
// {
|
|
207
|
+
// text: '等于',
|
|
208
|
+
// type: 'equal',
|
|
209
|
+
// value: 'equal',
|
|
210
|
+
// },
|
|
211
|
+
// {
|
|
212
|
+
// text: '不等于',
|
|
213
|
+
// value: 'unequal',
|
|
214
|
+
// },
|
|
215
|
+
// {
|
|
216
|
+
// text: '大于',
|
|
217
|
+
// type: 'greate',
|
|
218
|
+
// value: 'greater',
|
|
219
|
+
// },
|
|
220
|
+
// {
|
|
221
|
+
// text: '大于等于',
|
|
222
|
+
// type: 'greater_or_equal',
|
|
223
|
+
// value: 'greater_or_equal',
|
|
224
|
+
// },
|
|
225
|
+
// {
|
|
226
|
+
// text: '小于',
|
|
227
|
+
// type: 'less',
|
|
228
|
+
// value: 'less',
|
|
229
|
+
// },
|
|
230
|
+
// {
|
|
231
|
+
// text: '小于等于',
|
|
232
|
+
// type: 'less_or_equal',
|
|
233
|
+
// value: 'less_or_equal',
|
|
234
|
+
// },
|
|
235
|
+
// ],
|
|
236
|
+
// },
|
|
237
|
+
// customLogicOptions: [
|
|
238
|
+
// {
|
|
239
|
+
// text: '且',
|
|
240
|
+
// value: 'and',
|
|
241
|
+
// },
|
|
242
|
+
// {
|
|
243
|
+
// text: '或',
|
|
244
|
+
// value: 'or',
|
|
245
|
+
// },
|
|
246
|
+
// ],
|
|
247
|
+
// selectedDataSourceName: '',
|
|
248
|
+
// },
|
|
249
|
+
// }),
|
|
250
|
+
format: Type.StringEnum({
|
|
251
|
+
type: 'string',
|
|
252
|
+
title: '字段类型',
|
|
253
|
+
default: '',
|
|
254
|
+
enum: Tuple([
|
|
255
|
+
{ label: 'one-many', value: 'one-many' },
|
|
256
|
+
{ label: 'many-many', value: 'many-many' },
|
|
257
|
+
]),
|
|
258
|
+
'x-linkages': [
|
|
259
|
+
{
|
|
260
|
+
type: 'value:visible',
|
|
261
|
+
target: 'range',
|
|
262
|
+
condition: "{{$self.value!='many-many'&&$self.value!='one-many'}}",
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: 'value:visible',
|
|
266
|
+
target: 'tipBlock',
|
|
267
|
+
condition: "{{$self.value=='many-many'||$self.value=='one-many'}}",
|
|
268
|
+
},
|
|
269
|
+
// {
|
|
270
|
+
// type: 'value:visible',
|
|
271
|
+
// target: 'where',
|
|
272
|
+
// condition: "{{$self.value=='many-many'||$self.value=='one-many'}}",
|
|
273
|
+
// },
|
|
274
|
+
],
|
|
275
|
+
'x-platforms': [''],
|
|
276
|
+
}),
|
|
277
|
+
viewId: Type.String({
|
|
278
|
+
type: 'string',
|
|
279
|
+
title: '选项',
|
|
280
|
+
default: '',
|
|
281
|
+
'x-platforms': [''],
|
|
282
|
+
}),
|
|
283
|
+
enumName: Type.String({
|
|
284
|
+
type: 'string',
|
|
285
|
+
title: '字段类型',
|
|
286
|
+
default: '',
|
|
287
|
+
'x-platforms': [''],
|
|
288
|
+
}),
|
|
289
|
+
tipBlock: Type.String({
|
|
290
|
+
type: 'string',
|
|
291
|
+
title: '选项',
|
|
292
|
+
default: '',
|
|
293
|
+
'x-props': {
|
|
294
|
+
'data-hidebind': true,
|
|
295
|
+
},
|
|
296
|
+
'x-component': 'selection-tip',
|
|
297
|
+
}),
|
|
298
|
+
primaryField: Type.String({
|
|
299
|
+
type: 'string',
|
|
300
|
+
title: '主列名称',
|
|
301
|
+
default: '',
|
|
302
|
+
'x-platforms': [''],
|
|
303
|
+
}),
|
|
304
|
+
dataSourceName: Type.String({
|
|
305
|
+
type: 'string',
|
|
306
|
+
title: '父数据源名称',
|
|
307
|
+
default: '',
|
|
308
|
+
// 'x-linkages': [
|
|
309
|
+
// {
|
|
310
|
+
// type: 'value:schema',
|
|
311
|
+
// schema: {
|
|
312
|
+
// 'x-component-props': '{{{selectedDataSourceName: $self.value}}}',
|
|
313
|
+
// },
|
|
314
|
+
// target: 'where',
|
|
315
|
+
// },
|
|
316
|
+
// ],
|
|
317
|
+
'x-platforms': [''],
|
|
318
|
+
}),
|
|
319
|
+
});
|
|
320
|
+
const events = [
|
|
321
|
+
{
|
|
322
|
+
title: '值改变',
|
|
323
|
+
name: 'change',
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
title: '取消',
|
|
327
|
+
name: 'cancel',
|
|
328
|
+
},
|
|
329
|
+
];
|
|
330
|
+
const config = defineConfig({
|
|
331
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
332
|
+
data,
|
|
333
|
+
events,
|
|
334
|
+
compConfig: {
|
|
335
|
+
componentType: 'formField',
|
|
336
|
+
},
|
|
337
|
+
meta: {
|
|
338
|
+
title: '下拉多选',
|
|
339
|
+
name: 'FormSelectMultiple',
|
|
340
|
+
componentName: 'MultipleSelect',
|
|
341
|
+
description: '用于以列表形式提供多个可选项,由用户选择其一的场景。',
|
|
342
|
+
category: '表单',
|
|
343
|
+
icon: '../icons/FormSelect.svg',
|
|
344
|
+
categoryOrder: 500,
|
|
345
|
+
componentOrder: 376,
|
|
346
|
+
visible: ['APP', 'COMPONENT'],
|
|
347
|
+
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormSelectMultiple',
|
|
348
|
+
shortcut: {
|
|
349
|
+
props: ['name', 'label'],
|
|
350
|
+
},
|
|
351
|
+
recommendTypes: {
|
|
352
|
+
name: [
|
|
353
|
+
{
|
|
354
|
+
text: '一对多/多对多',
|
|
355
|
+
type: 'string',
|
|
356
|
+
format: 'one-many/many-many',
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
});
|
|
362
|
+
export default config;
|
|
@@ -124,7 +124,7 @@ const config = defineConfig({
|
|
|
124
124
|
},
|
|
125
125
|
events,
|
|
126
126
|
meta: {
|
|
127
|
-
title: '开关',
|
|
127
|
+
title: '开关[旧]',
|
|
128
128
|
name: 'FormSwitch',
|
|
129
129
|
componentName: 'Switch',
|
|
130
130
|
description: '用于控制打开/关闭。',
|
|
@@ -132,7 +132,20 @@ const config = defineConfig({
|
|
|
132
132
|
icon: '../icons/FormSwitch.svg',
|
|
133
133
|
categoryOrder: 500,
|
|
134
134
|
componentOrder: 440,
|
|
135
|
-
visible: [
|
|
135
|
+
visible: [],
|
|
136
|
+
disableUpgradeAll: true,
|
|
137
|
+
deprecated: true,
|
|
138
|
+
renderMode: [
|
|
139
|
+
{
|
|
140
|
+
component: 'WdSwitch',
|
|
141
|
+
renderType: 'update',
|
|
142
|
+
description: `- 支持标题、内容框的提示语配置;
|
|
143
|
+
- 支持标题的对齐、宽度、换行配置;
|
|
144
|
+
- 支持开关图标大中小可选择;
|
|
145
|
+
- 支持快捷去除移动端下划线;
|
|
146
|
+
- 支持通过标准化的样式API和CSS变量灵活修改和自定义组件样式;`,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
136
149
|
},
|
|
137
150
|
configMeta: {
|
|
138
151
|
docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/form/FormSwitch',
|