@cloudbase/weda-ui 3.9.8 → 3.10.1
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/dataView.d.ts +31 -0
- package/dist/configs/components/dataView.js +53 -16
- package/dist/configs/components/grid/col.d.ts +1 -1
- package/dist/configs/components/grid/col.js +1 -1
- package/dist/configs/components/grid/grid.d.ts +1 -1
- package/dist/configs/components/grid/grid.js +1 -1
- package/dist/configs/components/grid/row.d.ts +1 -1
- package/dist/configs/components/grid/row.js +1 -1
- package/dist/configs/components/listView.d.ts +148 -444
- package/dist/configs/components/listView.js +991 -703
- package/dist/configs/components/wd-bubble.d.ts +6 -6
- package/dist/configs/components/wd-cascader.d.ts +1 -1
- package/dist/configs/components/wd-checkbox.d.ts +1 -1
- package/dist/configs/components/wd-code-editor.d.ts +1 -1
- package/dist/configs/components/wd-date-range.d.ts +1 -1
- package/dist/configs/components/wd-date.d.ts +1 -1
- package/dist/configs/components/wd-department.d.ts +1 -1
- package/dist/configs/components/wd-form-arr.d.ts +1 -1
- package/dist/configs/components/wd-form-detail.d.ts +1 -1
- package/dist/configs/components/wd-form-obj.d.ts +1 -1
- package/dist/configs/components/wd-form.js +2 -1
- package/dist/configs/components/wd-input-email.d.ts +4 -3
- package/dist/configs/components/wd-input-number.d.ts +2 -2
- package/dist/configs/components/wd-input-phone.d.ts +4 -3
- package/dist/configs/components/wd-input-url.d.ts +4 -3
- package/dist/configs/components/wd-input.d.ts +3 -1
- package/dist/configs/components/wd-layout.d.ts +4 -0
- package/dist/configs/components/wd-layout.js +12 -0
- package/dist/configs/components/wd-location.d.ts +1 -1
- package/dist/configs/components/wd-member.d.ts +1 -1
- package/dist/configs/components/wd-menu-layout.d.ts +3 -0
- package/dist/configs/components/wd-menu-layout.js +6 -0
- package/dist/configs/components/wd-menu-list.d.ts +2 -0
- package/dist/configs/components/wd-menu-list.js +6 -0
- package/dist/configs/components/wd-modal.js +2 -0
- package/dist/configs/components/wd-progress.d.ts +2 -2
- package/dist/configs/components/wd-radio.d.ts +1 -1
- package/dist/configs/components/wd-rating.d.ts +2 -2
- package/dist/configs/components/wd-region.d.ts +1 -1
- package/dist/configs/components/wd-rich-text.d.ts +1 -1
- package/dist/configs/components/wd-select-multiple.d.ts +18 -1
- package/dist/configs/components/wd-select-multiple.js +17 -1
- package/dist/configs/components/wd-select.d.ts +18 -1
- package/dist/configs/components/wd-select.js +16 -0
- package/dist/configs/components/wd-side-tab.d.ts +12 -0
- package/dist/configs/components/wd-side-tab.js +47 -3
- package/dist/configs/components/wd-switch.d.ts +2 -2
- package/dist/configs/components/wd-table.d.ts +4 -4
- package/dist/configs/components/wd-table.js +2 -1
- package/dist/configs/components/wd-tag-select.d.ts +3 -3
- package/dist/configs/components/wd-tag.d.ts +21 -21
- package/dist/configs/components/wd-textarea.d.ts +8 -1
- package/dist/configs/components/wd-textarea.js +1 -0
- package/dist/configs/components/wd-time.d.ts +1 -1
- package/dist/configs/components/wd-top-tab.d.ts +12 -0
- package/dist/configs/components/wd-top-tab.js +47 -3
- package/dist/configs/components/wd-upload-file.d.ts +5 -1
- package/dist/configs/components/wd-upload-file.js +15 -0
- package/dist/configs/components/wd-upload-image.d.ts +1 -1
- package/dist/configs/index.d.ts +891 -1407
- package/dist/configs/type-utils/index.d.ts +1 -1
- package/dist/configs/type-utils/type-form.d.ts +29 -14
- package/dist/configs/type-utils/type-form.js +43 -10
- package/dist/configs/type-utils/x-runtime-default.d.ts +6 -0
- package/dist/configs/type-utils/x-runtime-default.js +6 -0
- package/dist/configs/utils/constants.d.ts +2 -0
- package/dist/configs/utils/constants.js +3 -0
- package/dist/configs/utils/get-combinations.d.ts +1 -0
- package/dist/configs/utils/get-combinations.js +13 -0
- package/dist/style/index.css +10478 -0
- package/dist/style/index.scss +1 -1
- package/dist/style/weda-ui.min.css +4 -0
- package/dist/web/actions/showMessage/index.js +5 -0
- package/dist/web/components/carousel/index.js +5 -0
- package/dist/web/components/chart/common/core/eChartBase.js +5 -0
- package/dist/web/components/chart/statisticsCard/index.js +6 -1
- package/dist/web/components/flow/process/constants.d.ts +10 -5
- package/dist/web/components/flow/process/constants.js +3 -2
- package/dist/web/components/flow/process/process.js +1 -1
- package/dist/web/components/form/form/index.js +9 -1
- package/dist/web/components/form/location/common/mapChoose.js +17 -3
- package/dist/web/components/form/location/common/mapView.js +18 -5
- package/dist/web/components/form/select/dropdown-select/h5.d.ts +3 -1
- package/dist/web/components/form/select/dropdown-select/h5.js +20 -20
- package/dist/web/components/form/select/dropdown-select/index.css +8 -0
- package/dist/web/components/form/select/dropdown-select/index.d.ts +6 -1
- package/dist/web/components/form/select/dropdown-select/index.js +64 -30
- package/dist/web/components/form/select/dropdown-select/pc.d.ts +2 -1
- package/dist/web/components/form/select/dropdown-select/pc.js +3 -3
- package/dist/web/components/form/select/dropdown-select/ui.d.ts +5 -0
- package/dist/web/components/form/select/dropdown-select/ui.js +8 -4
- package/dist/web/components/form/select/formats-util.d.ts +1 -0
- package/dist/web/components/form/select/formats-util.js +8 -0
- package/dist/web/components/form/select/h5.d.ts +1 -1
- package/dist/web/components/form/select/h5.js +6 -3
- package/dist/web/components/form/select/index.css +34 -3
- package/dist/web/components/form/select/index.d.ts +3 -0
- package/dist/web/components/form/select/index.js +6 -3
- package/dist/web/components/form/select/region/index.js +5 -1
- package/dist/web/components/form/select/request.js +2 -1
- package/dist/web/components/form/select/status/index.d.ts +2 -0
- package/dist/web/components/form/select/status/index.js +2 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/h5.d.ts +3 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/h5.js +31 -31
- package/dist/web/components/form/selectMultiple/dropdown-select/index.css +23 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/index.d.ts +6 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/index.js +58 -24
- package/dist/web/components/form/selectMultiple/dropdown-select/pc.d.ts +2 -1
- package/dist/web/components/form/selectMultiple/dropdown-select/pc.js +2 -2
- package/dist/web/components/form/selectMultiple/dropdown-select/ui.d.ts +5 -0
- package/dist/web/components/form/selectMultiple/dropdown-select/ui.js +7 -5
- package/dist/web/components/form/selectMultiple/h5.d.ts +1 -1
- package/dist/web/components/form/selectMultiple/h5.js +6 -3
- package/dist/web/components/form/selectMultiple/index.d.ts +5 -0
- package/dist/web/components/form/selectMultiple/index.js +7 -4
- package/dist/web/components/form/selectMultiple/request.js +2 -1
- package/dist/web/components/form/selectMultiple/status/index.d.ts +2 -0
- package/dist/web/components/form/selectMultiple/status/index.js +2 -0
- package/dist/web/components/form/uploader/index.css +26 -0
- package/dist/web/components/form/uploader/uploader.h5.d.ts +11 -3
- package/dist/web/components/form/uploader/uploader.h5.js +32 -96
- package/dist/web/components/form/uploader/uploader.pc.d.ts +9 -0
- package/dist/web/components/form/uploader/uploader.pc.js +38 -102
- package/dist/web/components/form/uploader/useUploadFile.d.ts +16 -0
- package/dist/web/components/form/uploader/useUploadFile.js +99 -0
- package/dist/web/components/form/uploader/util.d.ts +2 -0
- package/dist/web/components/form/uploader/util.js +87 -0
- package/dist/web/components/form/uploaderFile/uploadFile.h5.d.ts +2 -1
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +14 -4
- package/dist/web/components/form/uploaderFile/uploadFile.pc.d.ts +2 -1
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +21 -5
- package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +5 -0
- package/dist/web/components/form/userOrgSelect/component/userOrgSelect.css +8 -0
- package/dist/web/components/form/userOrgSelect/departTreeSelect/departTreeSelect.h5.js +6 -0
- package/dist/web/components/form-date/index.d.ts +9 -10
- package/dist/web/components/form-depart-tree-select/index.d.ts +8 -8
- package/dist/web/components/form-email/index.d.ts +12 -19
- package/dist/web/components/form-image-uploader/index.d.ts +10 -13
- package/dist/web/components/form-input/index.d.ts +4 -4
- package/dist/web/components/form-input-hooks/index.js +7 -1
- package/dist/web/components/form-location/index.d.ts +8 -7
- package/dist/web/components/form-multi-region/index.d.ts +9 -10
- package/dist/web/components/form-phone/index.d.ts +12 -19
- package/dist/web/components/form-radio/index.d.ts +7 -6
- package/dist/web/components/form-region/index.d.ts +9 -10
- package/dist/web/components/form-rich-text/index.d.ts +8 -9
- package/dist/web/components/form-select/index.d.ts +12 -16
- package/dist/web/components/form-select-multiple/index.d.ts +9 -10
- package/dist/web/components/form-switch/index.d.ts +8 -7
- package/dist/web/components/form-text-area/index.d.ts +12 -19
- package/dist/web/components/form-time/index.d.ts +9 -10
- package/dist/web/components/form-upload-file/index.d.ts +10 -13
- package/dist/web/components/form-url/index.d.ts +12 -19
- package/dist/web/components/form-user-tree-select/index.d.ts +8 -8
- package/dist/web/components/grid/col.d.ts +6 -9
- package/dist/web/components/grid/grid.d.ts +6 -14
- package/dist/web/components/grid/row.d.ts +6 -12
- package/dist/web/components/listView/index.d.ts +21 -2
- package/dist/web/components/listView/index.js +0 -3
- package/dist/web/components/listView/interface.d.ts +4 -4
- package/dist/web/components/lottery/index.d.ts +13 -15
- package/dist/web/components/navigationBar/index.css +2 -1
- package/dist/web/components/richText/index.js +6 -0
- package/dist/web/components/richTextView/useImgTransform.js +6 -1
- package/dist/web/components/table/ImportFileModalByApi/index.js +6 -1
- package/dist/web/components/table/ImportFileModalByApi/uploadCSVFile.js +6 -1
- package/dist/web/components/wd-audio/wd-audio.js +5 -0
- package/dist/web/components/wd-canvas/wd-canvas.js +6 -1
- package/dist/web/components/wd-code-editor/wd-code-editor.js +7 -2
- package/dist/web/components/wd-date/elements/WheelPicker.js +7 -1
- package/dist/web/components/wd-form/index.d.ts +26 -40
- package/dist/web/components/wd-form/index.js +9 -2
- package/dist/web/components/wd-form-item/wd-form-item-read-only.d.ts +2 -0
- package/dist/web/components/wd-form-item/wd-form-item-read-only.js +15 -2
- package/dist/web/components/wd-form-item/wd-form-item.js +4 -3
- package/dist/web/components/wd-input/wd-input.d.ts +20 -42
- package/dist/web/components/wd-input-email/wd-input-email.d.ts +19 -41
- package/dist/web/components/wd-input-phone/wd-input-phone.d.ts +20 -42
- package/dist/web/components/wd-input-url/wd-input-url.d.ts +19 -41
- package/dist/web/components/wd-layout/wd-layout.d.ts +1 -1
- package/dist/web/components/wd-layout/wd-layout.js +2 -2
- package/dist/web/components/wd-markdown/wd-markdown.js +1 -1
- package/dist/web/components/wd-menu-layout/components/PlantMenu.js +1 -1
- package/dist/web/components/wd-menu-list/CommonMenuList.js +7 -1
- package/dist/web/components/wd-menu-list/HorizontalMenuList.js +7 -1
- package/dist/web/components/wd-select/relationalSetting.d.ts +7 -0
- package/dist/web/components/wd-select/relationalSetting.js +15 -0
- package/dist/web/components/wd-select/wd-select.css +43 -0
- package/dist/web/components/wd-select/wd-select.d.ts +2 -0
- package/dist/web/components/wd-select/wd-select.js +25 -6
- package/dist/web/components/wd-select-multiple/wd-select-multiple.css +4 -0
- package/dist/web/components/wd-select-multiple/wd-select-multiple.d.ts +6 -0
- package/dist/web/components/wd-select-multiple/wd-select-multiple.js +25 -6
- package/dist/web/components/wd-table/components/FieldRender/Form/Enum.js +18 -4
- package/dist/web/components/wd-table/components/FieldRender/index.js +34 -5
- package/dist/web/components/wd-table/utils/index.js +18 -4
- package/dist/web/components/wd-tabs/tabs-h5.js +2 -3
- package/dist/web/components/wd-tabs/tabs-pc.js +2 -3
- package/dist/web/components/wd-tabs/util.d.ts +1 -0
- package/dist/web/components/wd-tabs/util.js +21 -0
- package/dist/web/components/wd-textarea/wd-textarea.js +11 -1
- package/dist/web/components/wd-unified-link/utils.js +1 -1
- package/dist/web/components/wd-upload-file/wd-upload-file.js +2 -2
- package/dist/web/components/web-view/web-view.d.ts +14 -20
- package/dist/web/utils/color.js +5 -0
- package/dist/web/utils/datasource.js +30 -20
- package/dist/web/utils/error.d.ts +3 -1
- package/dist/web/utils/error.js +9 -4
- package/dist/web/utils/file.js +4 -1
- package/dist/web/utils/getModelParams.js +27 -2
- package/dist/web/utils/hooks/EnumHoc.js +3 -1
- package/dist/web/utils/hooks/useRecycle.d.ts +4 -0
- package/dist/web/utils/loadIconCss.js +2 -1
- package/dist/web/utils/moment.js +2 -1
- package/dist/web/utils/platform.js +5 -2
- package/dist/web/utils/tcb.js +5 -3
- package/dist/web/weda-ui.css +8 -4
- package/package.json +8 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Type } from '../type-utils';
|
|
2
|
+
import { svgDataUri as svg } from '../svg-tag';
|
|
2
3
|
import { genericErrorType } from '../type-utils/error';
|
|
3
4
|
const stringTemplate = `
|
|
4
5
|
{{#with (helper_utils 'get' _field 'name') as |_name|}}
|
|
@@ -18,7 +19,7 @@ left= '16PX'
|
|
|
18
19
|
right='16PX'
|
|
19
20
|
top='8PX'
|
|
20
21
|
|
|
21
|
-
{{#with (helper_utils 'reject' (helper_utils '
|
|
22
|
+
{{#with (helper_utils 'reject' (helper_utils 'reject' (helper_utils 'reject' _fields (helper_utils 'concat' 'type' 'array')) (helper_utils 'concat' 'type' 'object') ) (helper_utils 'concat' 'format' 'x-rtf')) as |_stringOrNumFields|}}
|
|
22
23
|
|
|
23
24
|
{{#if (helper_utils '===' $self.attributes.template 'simpleList')}}
|
|
24
25
|
[[template]]
|
|
@@ -67,7 +68,7 @@ gap='4PX'
|
|
|
67
68
|
[[template.items.items.items]]
|
|
68
69
|
component = 'WdText'
|
|
69
70
|
[template.items.items.items.attributes]
|
|
70
|
-
{{#with (helper_utils 'get'
|
|
71
|
+
{{#with (helper_utils 'get' _stringOrNumFields '[0]') as |_field|}}
|
|
71
72
|
${stringTemplate}
|
|
72
73
|
{{/with}}
|
|
73
74
|
level='title-8'
|
|
@@ -78,7 +79,7 @@ component = 'WdText'
|
|
|
78
79
|
[template.items.items.items.extra.commonStyle.text]
|
|
79
80
|
color='var(--wd-color-text-placeholder)'
|
|
80
81
|
[template.items.items.items.attributes]
|
|
81
|
-
{{#with (helper_utils 'get'
|
|
82
|
+
{{#with (helper_utils 'get' _stringOrNumFields '[1]') as |_field|}}
|
|
82
83
|
${stringTemplate}
|
|
83
84
|
{{/with}}
|
|
84
85
|
level='body-sm'
|
|
@@ -123,12 +124,13 @@ component = 'Container'
|
|
|
123
124
|
borderBottom = '1px solid var(--wd-color-border-separator)'
|
|
124
125
|
boxSizing = 'border-box'
|
|
125
126
|
display = 'flex'
|
|
127
|
+
|
|
126
128
|
[template.items.extra.commonStyle.flexConfig]
|
|
127
129
|
alignItems = 'center'
|
|
128
130
|
[template.items.extra.commonStyle.padding]
|
|
129
131
|
bottom = '12PX'
|
|
130
|
-
left = '
|
|
131
|
-
right = '
|
|
132
|
+
left = '12PX'
|
|
133
|
+
right = '12PX'
|
|
132
134
|
top = '12PX'
|
|
133
135
|
[template.items.extra.commonStyle.position]
|
|
134
136
|
position = 'relative'
|
|
@@ -149,7 +151,7 @@ wordBreak = 'break-all'
|
|
|
149
151
|
[[template.items.items.items]]
|
|
150
152
|
component = 'WdText'
|
|
151
153
|
[template.items.items.items.attributes]
|
|
152
|
-
{{#with (helper_utils 'get'
|
|
154
|
+
{{#with (helper_utils 'get' _stringOrNumFields '[0]') as |_field|}}
|
|
153
155
|
${stringTemplate}
|
|
154
156
|
{{/with}}
|
|
155
157
|
level='title-8'
|
|
@@ -172,7 +174,7 @@ whiteSpace = 'pre-line'
|
|
|
172
174
|
[[template.items.items.items.items]]
|
|
173
175
|
component='WdText'
|
|
174
176
|
[template.items.items.items.items.attributes]
|
|
175
|
-
text='{{helper_utils 'get'
|
|
177
|
+
text='{{helper_utils 'get' _stringOrNumFields (helper_utils 'join' (helper_utils 'concat' '[' (helper_utils '+' @index 1) '].title') '') '名称'}}:'
|
|
176
178
|
overflow=true
|
|
177
179
|
level='body-sm'
|
|
178
180
|
[template.items.items.items.items.extra.commonStyle.text]
|
|
@@ -181,11 +183,13 @@ color='var(--wd-color-text-placeholder)'
|
|
|
181
183
|
[[template.items.items.items.items]]
|
|
182
184
|
component='WdText'
|
|
183
185
|
[template.items.items.items.items.attributes]
|
|
184
|
-
{{#with (helper_utils 'get'
|
|
186
|
+
{{#with (helper_utils 'get' _stringOrNumFields (helper_utils 'join' (helper_utils 'concat' '[' (helper_utils '+' @index 1) ']') '')) as |_field|}}
|
|
185
187
|
${stringTemplate}
|
|
186
188
|
{{/with}}
|
|
189
|
+
|
|
187
190
|
overflow=true
|
|
188
191
|
level='body-sm'
|
|
192
|
+
|
|
189
193
|
[template.items.items.items.items.extra.commonStyle.text]
|
|
190
194
|
color='var(--wd-color-text-placeholder)'
|
|
191
195
|
|
|
@@ -291,7 +295,7 @@ component = 'WdText'
|
|
|
291
295
|
[template.items.items.items.attributes]
|
|
292
296
|
level='title-8'
|
|
293
297
|
textAlign = 'left'
|
|
294
|
-
{{#with (helper_utils 'get' (helper_utils 'reject'
|
|
298
|
+
{{#with (helper_utils 'get' (helper_utils 'reject' _stringOrNumFields (helper_utils 'concat' 'format' 'x-image')) '[0]') as |_field|}}
|
|
295
299
|
${stringTemplate}
|
|
296
300
|
{{/with}}
|
|
297
301
|
|
|
@@ -301,7 +305,7 @@ component = 'WdText'
|
|
|
301
305
|
maxLines = '2'
|
|
302
306
|
level='body-sm'
|
|
303
307
|
overflow=true
|
|
304
|
-
{{#with (helper_utils 'get' (helper_utils 'reject'
|
|
308
|
+
{{#with (helper_utils 'get' (helper_utils 'reject' _stringOrNumFields (helper_utils 'concat' 'format' 'x-image')) '[1]') as |_field|}}
|
|
305
309
|
${stringTemplate}
|
|
306
310
|
{{/with}}
|
|
307
311
|
textAlign = 'left'
|
|
@@ -431,7 +435,7 @@ level='body-sm'
|
|
|
431
435
|
level='body-sm'
|
|
432
436
|
overflow=true
|
|
433
437
|
{{/if}}
|
|
434
|
-
{{#with (helper_utils 'get' (helper_utils 'reject'
|
|
438
|
+
{{#with (helper_utils 'get' (helper_utils 'reject' _stringOrNumFields (helper_utils 'concat' 'format' 'x-image')) (helper_utils 'join' (helper_utils 'concat' '[' @index ']') '')) as |_field|}}
|
|
435
439
|
${stringTemplate}
|
|
436
440
|
{{/with}}
|
|
437
441
|
[template.items.items.items.items.items.extra.commonStyle.text]
|
|
@@ -548,7 +552,7 @@ maxLines='2'
|
|
|
548
552
|
overflow=true
|
|
549
553
|
textAlign = 'left'
|
|
550
554
|
text='商品名称'
|
|
551
|
-
{{#with (helper_utils 'get' (helper_utils 'reject'
|
|
555
|
+
{{#with (helper_utils 'get' (helper_utils 'reject' _stringOrNumFields (helper_utils 'concat' 'format' 'x-image')) '[0]') as |_field|}}
|
|
552
556
|
${stringTemplate}
|
|
553
557
|
{{/with}}
|
|
554
558
|
|
|
@@ -624,20 +628,11 @@ component = 'Container'
|
|
|
624
628
|
{{/with}}
|
|
625
629
|
`;
|
|
626
630
|
const $attached_template = `
|
|
627
|
-
{{#with $self as |$self|}}
|
|
628
|
-
{{#with 'sys_user' as |_datasourceName| }}
|
|
629
|
-
{{#with 'wedaGetRecordsV2' as |_methodName| }}
|
|
630
|
-
{{#with (helper_getFields _datasourceName _methodName (helper_utils '?:' (helper_utils '===' _datasourceName 'sys_user') true false) false) as |_fields|}}
|
|
631
|
-
${rawTemplate}
|
|
632
|
-
{{/with}}
|
|
633
|
-
{{/with}}
|
|
634
|
-
{{/with}}
|
|
635
|
-
{{/with}}
|
|
636
|
-
|
|
637
631
|
[attributes]
|
|
638
632
|
isSupportApis = false
|
|
639
633
|
isSetStatus=true
|
|
640
634
|
supportManyRelated=true
|
|
635
|
+
isSupportMultipleSort = true
|
|
641
636
|
':queryCondition'='{
|
|
642
637
|
"where": {
|
|
643
638
|
"$and": [
|
|
@@ -654,11 +649,6 @@ supportManyRelated=true
|
|
|
654
649
|
},
|
|
655
650
|
"relateWhere": {}
|
|
656
651
|
}'
|
|
657
|
-
[attributes.datasource]
|
|
658
|
-
type='datamodal'
|
|
659
|
-
name='sys_user'
|
|
660
|
-
[attributes.datasource.extra]
|
|
661
|
-
methodName='wedaGetRecordsV2'
|
|
662
652
|
`;
|
|
663
653
|
const attributes_template = `
|
|
664
654
|
{{#with $self as |$self|}}
|
|
@@ -768,380 +758,433 @@ const properties = Type.Object({
|
|
|
768
758
|
description: '数据源类型为数据模型时,数据列表支持的数据源协议版本',
|
|
769
759
|
}),
|
|
770
760
|
});
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
value: 'imageTextList',
|
|
831
|
-
tooltip: '使用图文列表模板',
|
|
832
|
-
src: 'https://qcloudimg.tencent-cloud.cn/raw/55579a824f8ee45039358be4594a9cf7.png',
|
|
833
|
-
},
|
|
834
|
-
{
|
|
835
|
-
label: '卡片列表',
|
|
836
|
-
value: 'cardList',
|
|
837
|
-
tooltip: '使用卡片列表模板',
|
|
838
|
-
src: 'https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/d92ff460-bc94-4162-9c0e-d04224dd1919.svg',
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
label: '商品列表',
|
|
842
|
-
value: 'goodsList',
|
|
843
|
-
tooltip: '使用商品列表模板',
|
|
844
|
-
src: 'https://qcloudimg.tencent-cloud.cn/raw/b413a9c18a7ebac69d05419fb56343f4.png',
|
|
845
|
-
},
|
|
846
|
-
],
|
|
761
|
+
const data = Type.Object({
|
|
762
|
+
template: Type.StringEnum({
|
|
763
|
+
'x-index': 1,
|
|
764
|
+
title: '列表模板',
|
|
765
|
+
type: 'string',
|
|
766
|
+
'x-group': '列表',
|
|
767
|
+
default: 'simpleList',
|
|
768
|
+
enum: [
|
|
769
|
+
{
|
|
770
|
+
label: '空白',
|
|
771
|
+
value: 'none',
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
label: '简单列表',
|
|
775
|
+
value: 'simpleList',
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
label: '详细列表',
|
|
779
|
+
value: 'detailList',
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
label: '图文列表',
|
|
783
|
+
value: 'imageTextList',
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
label: '卡片列表',
|
|
787
|
+
value: 'cardList',
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
label: '商品列表',
|
|
791
|
+
value: 'goodsList',
|
|
792
|
+
},
|
|
793
|
+
],
|
|
794
|
+
'x-component': 'data-sources-template-selector',
|
|
795
|
+
'x-component-props': {
|
|
796
|
+
options: [
|
|
797
|
+
{
|
|
798
|
+
label: '空白',
|
|
799
|
+
value: 'none',
|
|
800
|
+
tooltip: '不使用模板',
|
|
801
|
+
src: 'https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/924e8472-9c52-46bc-bae7-e1ec30b92974.svg',
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
label: '简单列表',
|
|
805
|
+
value: 'simpleList',
|
|
806
|
+
tooltip: '使用简单列表模板',
|
|
807
|
+
src: 'https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/2563df4d-2db0-449f-a545-825f5a66a848.svg',
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
label: '详细列表',
|
|
811
|
+
value: 'detailList',
|
|
812
|
+
tooltip: '使用详细列表模板',
|
|
813
|
+
src: 'https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/c4f78f1c-f93a-4b40-8253-42541a609fa4.svg',
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
label: '图文列表',
|
|
817
|
+
value: 'imageTextList',
|
|
818
|
+
tooltip: '使用图文列表模板',
|
|
819
|
+
src: 'https://qcloudimg.tencent-cloud.cn/raw/55579a824f8ee45039358be4594a9cf7.png',
|
|
847
820
|
},
|
|
848
|
-
|
|
849
|
-
'
|
|
821
|
+
{
|
|
822
|
+
label: '卡片列表',
|
|
823
|
+
value: 'cardList',
|
|
824
|
+
tooltip: '使用卡片列表模板',
|
|
825
|
+
src: 'https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/d92ff460-bc94-4162-9c0e-d04224dd1919.svg',
|
|
850
826
|
},
|
|
851
|
-
|
|
827
|
+
{
|
|
828
|
+
label: '商品列表',
|
|
829
|
+
value: 'goodsList',
|
|
830
|
+
tooltip: '使用商品列表模板',
|
|
831
|
+
src: 'https://qcloudimg.tencent-cloud.cn/raw/b413a9c18a7ebac69d05419fb56343f4.png',
|
|
832
|
+
},
|
|
833
|
+
],
|
|
834
|
+
},
|
|
835
|
+
'x-props': {
|
|
836
|
+
'data-hidebind': true,
|
|
837
|
+
},
|
|
838
|
+
description: '列表内容样式的预设模板',
|
|
839
|
+
}),
|
|
840
|
+
dataSourceType: Type.StringEnum({
|
|
841
|
+
'x-index': 5,
|
|
842
|
+
title: '数据源',
|
|
843
|
+
'x-group': '数据',
|
|
844
|
+
type: 'string',
|
|
845
|
+
default: 'data-model',
|
|
846
|
+
enum: [
|
|
847
|
+
{
|
|
848
|
+
label: '数据模型',
|
|
849
|
+
value: 'data-model',
|
|
852
850
|
},
|
|
853
|
-
|
|
854
|
-
'
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
label: 'APIs',
|
|
870
|
-
value: 'custom-connector',
|
|
871
|
-
},
|
|
872
|
-
],
|
|
873
|
-
'x-linkages': [
|
|
874
|
-
{
|
|
875
|
-
type: 'value:state',
|
|
876
|
-
target: '*(isSetStatus,isSetLoading)',
|
|
877
|
-
condition: "{{$self.value !=='expression'}}",
|
|
878
|
-
state: {
|
|
879
|
-
display: true,
|
|
880
|
-
},
|
|
881
|
-
otherwise: {
|
|
882
|
-
display: false,
|
|
883
|
-
},
|
|
884
|
-
},
|
|
885
|
-
{
|
|
886
|
-
type: 'value:state',
|
|
887
|
-
target: '*(orderType,queryCondition,orderBy,datasource,selectFieldType)',
|
|
888
|
-
condition: "{{$self.value ==='data-model'}}",
|
|
889
|
-
state: {
|
|
890
|
-
display: true,
|
|
891
|
-
},
|
|
892
|
-
otherwise: {
|
|
893
|
-
display: false,
|
|
894
|
-
},
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
type: 'value:state',
|
|
898
|
-
target: '*(bindConnectMetadata,connectorMethod,connectorParams)',
|
|
899
|
-
condition: "{{$self.value=='custom-connector'}}",
|
|
900
|
-
state: {
|
|
901
|
-
display: true,
|
|
902
|
-
},
|
|
903
|
-
otherwise: {
|
|
904
|
-
display: false,
|
|
905
|
-
},
|
|
906
|
-
},
|
|
907
|
-
{
|
|
908
|
-
type: 'value:state',
|
|
909
|
-
target: '*(dataSourceData,enableTotal,total,exprToFieldsSchema,loading)',
|
|
910
|
-
condition: "{{$self.value=='expression'}}",
|
|
911
|
-
state: {
|
|
912
|
-
display: true,
|
|
913
|
-
},
|
|
914
|
-
otherwise: {
|
|
915
|
-
display: false,
|
|
916
|
-
},
|
|
917
|
-
},
|
|
918
|
-
{
|
|
919
|
-
type: 'value:schema',
|
|
920
|
-
target: 'bindConnectMetadata',
|
|
921
|
-
schema: {
|
|
922
|
-
'x-component-props': '{{{value:$value}}}',
|
|
923
|
-
},
|
|
924
|
-
},
|
|
925
|
-
{
|
|
926
|
-
type: 'value:schema',
|
|
927
|
-
target: 'connectorMethod',
|
|
928
|
-
schema: {
|
|
929
|
-
'x-component-props': {
|
|
930
|
-
connector: '{{$self.value}}',
|
|
931
|
-
},
|
|
932
|
-
},
|
|
933
|
-
},
|
|
934
|
-
],
|
|
935
|
-
'x-component': 'dsc-datasource-type-select',
|
|
936
|
-
'x-component-props': {
|
|
937
|
-
defaultValue: 'data-model',
|
|
938
|
-
options: [
|
|
939
|
-
{
|
|
940
|
-
value: 'data-model',
|
|
941
|
-
text: '数据模型',
|
|
942
|
-
label: '数据模型',
|
|
943
|
-
icon: 'database',
|
|
944
|
-
isShow: true,
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
value: 'expression',
|
|
948
|
-
text: '表达式',
|
|
949
|
-
label: '表达式',
|
|
950
|
-
icon: 'expression',
|
|
951
|
-
isShow: true,
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
value: 'custom-connector',
|
|
955
|
-
text: 'APIs',
|
|
956
|
-
label: 'APIs',
|
|
957
|
-
icon: 'custom-connector',
|
|
958
|
-
isShow: true,
|
|
959
|
-
},
|
|
960
|
-
],
|
|
851
|
+
{
|
|
852
|
+
label: '表达式',
|
|
853
|
+
value: 'expression',
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
label: 'APIs',
|
|
857
|
+
value: 'custom-connector',
|
|
858
|
+
},
|
|
859
|
+
],
|
|
860
|
+
'x-linkages': [
|
|
861
|
+
{
|
|
862
|
+
type: 'value:state',
|
|
863
|
+
target: '*(isSetStatus,isSetLoading)',
|
|
864
|
+
condition: "{{$self.value !=='expression'}}",
|
|
865
|
+
state: {
|
|
866
|
+
display: true,
|
|
961
867
|
},
|
|
962
|
-
|
|
963
|
-
|
|
868
|
+
otherwise: {
|
|
869
|
+
display: false,
|
|
964
870
|
},
|
|
965
|
-
description: '数据源类型选择',
|
|
966
871
|
},
|
|
967
|
-
|
|
968
|
-
'
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
properties: {
|
|
974
|
-
name: {
|
|
975
|
-
title: '数据模型名',
|
|
976
|
-
type: 'string',
|
|
977
|
-
},
|
|
978
|
-
extra: {
|
|
979
|
-
title: '数据模型属性',
|
|
980
|
-
type: 'object',
|
|
981
|
-
properties: {
|
|
982
|
-
viewId: {
|
|
983
|
-
title: '数据模型视图id',
|
|
984
|
-
type: 'string',
|
|
985
|
-
},
|
|
986
|
-
methodName: {
|
|
987
|
-
title: '数据模型方法名',
|
|
988
|
-
type: 'string',
|
|
989
|
-
},
|
|
990
|
-
},
|
|
991
|
-
},
|
|
872
|
+
{
|
|
873
|
+
type: 'value:state',
|
|
874
|
+
target: '*(queryCondition,datasource,selectFieldType)',
|
|
875
|
+
condition: "{{$self.value ==='data-model'}}",
|
|
876
|
+
state: {
|
|
877
|
+
display: true,
|
|
992
878
|
},
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
dataContainerType: 'listView',
|
|
996
|
-
methodName: 'wedaGetRecordsV2',
|
|
879
|
+
otherwise: {
|
|
880
|
+
display: false,
|
|
997
881
|
},
|
|
998
|
-
|
|
999
|
-
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
type: 'value:state',
|
|
885
|
+
target: '*(sorter)',
|
|
886
|
+
condition: "{{$self.value ==='data-model'&&$form.values.isSupportMultipleSort}}",
|
|
887
|
+
state: {
|
|
888
|
+
display: true,
|
|
889
|
+
},
|
|
890
|
+
otherwise: {
|
|
891
|
+
display: false,
|
|
1000
892
|
},
|
|
1001
|
-
'x-linkages': [
|
|
1002
|
-
{
|
|
1003
|
-
type: 'value:schema',
|
|
1004
|
-
target: 'params',
|
|
1005
|
-
schema: {
|
|
1006
|
-
'x-component-props': '{{$value}}',
|
|
1007
|
-
},
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
type: 'value:schema',
|
|
1011
|
-
condition: '{{ Boolean($value && $value.name) }}',
|
|
1012
|
-
target: 'orderBy',
|
|
1013
|
-
schema: {
|
|
1014
|
-
enum: '{{getDataSourceValueOptions($value && $value.name)}}',
|
|
1015
|
-
},
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
type: 'value:state',
|
|
1019
|
-
condition: '{{!!$value && !!$value.name && !!$form.values.orderBy && getDataSourceValueOptions($value.name).every(o => o.value !== $form.values.orderBy)}}',
|
|
1020
|
-
target: 'orderBy',
|
|
1021
|
-
state: {
|
|
1022
|
-
value: '',
|
|
1023
|
-
},
|
|
1024
|
-
},
|
|
1025
|
-
{
|
|
1026
|
-
type: 'value:schema',
|
|
1027
|
-
condition: '{{ Boolean($value && $value.name) }}',
|
|
1028
|
-
target: 'queryCondition',
|
|
1029
|
-
schema: {
|
|
1030
|
-
'x-component-props': '{{{selectedDataSourceName: $value && $value.name}}}',
|
|
1031
|
-
},
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
type: 'value:schema',
|
|
1035
|
-
condition: '{{ Boolean(!$value || !$value.name) }}',
|
|
1036
|
-
target: 'orderBy',
|
|
1037
|
-
schema: {
|
|
1038
|
-
'x-props': "{{{disabled: true, tooltip: '请先选择数据源'}}}",
|
|
1039
|
-
},
|
|
1040
|
-
},
|
|
1041
|
-
{
|
|
1042
|
-
type: 'value:schema',
|
|
1043
|
-
condition: '{{ Boolean($value && $value.name) }}',
|
|
1044
|
-
target: 'orderBy',
|
|
1045
|
-
schema: {
|
|
1046
|
-
'x-props': "{{{disabled: false, tooltip: ''}}}",
|
|
1047
|
-
},
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
type: 'value:schema',
|
|
1051
|
-
target: 'selectFields',
|
|
1052
|
-
schema: {
|
|
1053
|
-
'x-component-props': {
|
|
1054
|
-
dataSourceName: '{{$self.value && $self.value.name}}',
|
|
1055
|
-
},
|
|
1056
|
-
},
|
|
1057
|
-
},
|
|
1058
|
-
],
|
|
1059
|
-
description: '展示模型数据的数据来源',
|
|
1060
893
|
},
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
894
|
+
{
|
|
895
|
+
type: 'value:state',
|
|
896
|
+
target: '*(orderBy,orderType)',
|
|
897
|
+
condition: "{{$self.value ==='data-model'&&!$form.values.isSupportMultipleSort}}",
|
|
898
|
+
state: {
|
|
899
|
+
display: true,
|
|
900
|
+
},
|
|
901
|
+
otherwise: {
|
|
902
|
+
display: false,
|
|
903
|
+
},
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
type: 'value:state',
|
|
907
|
+
target: '*(isSupportMultipleSort)',
|
|
908
|
+
condition: '{{!$form.values.isSupportMultipleSort}}',
|
|
909
|
+
state: {
|
|
910
|
+
display: true,
|
|
911
|
+
},
|
|
912
|
+
otherwise: {
|
|
913
|
+
display: false,
|
|
914
|
+
},
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
type: 'value:state',
|
|
918
|
+
target: '*(bindConnectMetadata,connectorMethod,connectorParams)',
|
|
919
|
+
condition: "{{$self.value=='custom-connector'}}",
|
|
920
|
+
state: {
|
|
921
|
+
display: true,
|
|
922
|
+
},
|
|
923
|
+
otherwise: {
|
|
924
|
+
display: false,
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
type: 'value:state',
|
|
929
|
+
target: '*(dataSourceData,enableTotal,total,exprToFieldsSchema,loading)',
|
|
930
|
+
condition: "{{$self.value=='expression'}}",
|
|
931
|
+
state: {
|
|
932
|
+
display: true,
|
|
933
|
+
},
|
|
934
|
+
otherwise: {
|
|
935
|
+
display: false,
|
|
936
|
+
},
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
type: 'value:schema',
|
|
940
|
+
target: 'bindConnectMetadata',
|
|
941
|
+
schema: {
|
|
942
|
+
'x-component-props': '{{{value:$value}}}',
|
|
943
|
+
},
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
type: 'value:schema',
|
|
947
|
+
target: 'connectorMethod',
|
|
948
|
+
schema: {
|
|
949
|
+
'x-component-props': {
|
|
950
|
+
connector: '{{$self.value}}',
|
|
1077
951
|
},
|
|
1078
|
-
],
|
|
1079
|
-
'x-props': {
|
|
1080
|
-
'data-hidebind': true,
|
|
1081
952
|
},
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
953
|
+
},
|
|
954
|
+
],
|
|
955
|
+
'x-component': 'dsc-datasource-type-select',
|
|
956
|
+
'x-component-props': {
|
|
957
|
+
defaultValue: 'data-model',
|
|
958
|
+
options: [
|
|
959
|
+
{
|
|
960
|
+
value: 'data-model',
|
|
961
|
+
text: '数据模型',
|
|
962
|
+
label: '数据模型',
|
|
963
|
+
icon: 'database',
|
|
964
|
+
isShow: true,
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
value: 'expression',
|
|
968
|
+
text: '表达式',
|
|
969
|
+
label: '表达式',
|
|
970
|
+
icon: 'expression',
|
|
971
|
+
isShow: true,
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
value: 'custom-connector',
|
|
975
|
+
text: 'APIs',
|
|
976
|
+
label: 'APIs',
|
|
977
|
+
icon: 'custom-connector',
|
|
978
|
+
isShow: true,
|
|
979
|
+
},
|
|
980
|
+
],
|
|
981
|
+
},
|
|
982
|
+
'x-props': {
|
|
983
|
+
'data-hidebind': true,
|
|
984
|
+
},
|
|
985
|
+
description: '数据源类型选择',
|
|
986
|
+
}),
|
|
987
|
+
datasource: Type.Optional(Type.Object({
|
|
988
|
+
name: Type.String({
|
|
989
|
+
title: '数据模型名',
|
|
990
|
+
type: 'string',
|
|
991
|
+
}),
|
|
992
|
+
extra: Type.Object({
|
|
993
|
+
viewId: Type.String({
|
|
994
|
+
title: '数据模型视图id',
|
|
995
|
+
type: 'string',
|
|
996
|
+
}),
|
|
997
|
+
methodName: Type.String({
|
|
998
|
+
title: '数据模型方法名',
|
|
1096
999
|
type: 'string',
|
|
1097
|
-
|
|
1098
|
-
|
|
1000
|
+
}),
|
|
1001
|
+
}, {
|
|
1002
|
+
title: '数据模型属性',
|
|
1003
|
+
type: 'object',
|
|
1004
|
+
}),
|
|
1005
|
+
}, {
|
|
1006
|
+
'x-index': 10,
|
|
1007
|
+
title: '数据模型',
|
|
1008
|
+
type: 'object',
|
|
1009
|
+
'x-group': '数据',
|
|
1010
|
+
required: true,
|
|
1011
|
+
'x-component': 'datasource-selector',
|
|
1012
|
+
'x-component-props': {
|
|
1013
|
+
dataContainerType: 'listView',
|
|
1014
|
+
methodName: 'wedaGetRecordsV2',
|
|
1015
|
+
},
|
|
1016
|
+
'x-props': {
|
|
1017
|
+
'data-hidebind': true,
|
|
1018
|
+
},
|
|
1019
|
+
'x-linkages': [
|
|
1020
|
+
{
|
|
1021
|
+
type: 'value:schema',
|
|
1022
|
+
target: 'params',
|
|
1023
|
+
schema: {
|
|
1024
|
+
'x-component-props': '{{$value}}',
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
type: 'value:schema',
|
|
1029
|
+
condition: '{{ Boolean($value && $value.name) }}',
|
|
1030
|
+
target: 'orderBy',
|
|
1031
|
+
schema: {
|
|
1032
|
+
enum: '{{getDataSourceValueOptions($value && $value.name)}}',
|
|
1033
|
+
},
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
type: 'value:state',
|
|
1037
|
+
condition: '{{!!$value && !!$value.name && !!$form.values?.sorter?.length && !$form.values.sorter.every(o => getDataSourceValueOptions($value.name, undefined, true).find(n=>o.orderBy===n.value))}}',
|
|
1038
|
+
target: 'sorter',
|
|
1039
|
+
state: {
|
|
1040
|
+
value: [
|
|
1041
|
+
{ orderBy: 'updatedAt', orderType: 'desc', label: '更新时间' },
|
|
1042
|
+
],
|
|
1099
1043
|
},
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
'
|
|
1103
|
-
|
|
1104
|
-
'
|
|
1105
|
-
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
type: 'value:state',
|
|
1047
|
+
condition: '{{!!$value && !!$value.name && !!$form.values.orderBy && getDataSourceValueOptions($value.name).every(o => o.value !== $form.values.orderBy)}}',
|
|
1048
|
+
target: 'orderBy',
|
|
1049
|
+
state: {
|
|
1050
|
+
value: '',
|
|
1106
1051
|
},
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
type: 'value:schema',
|
|
1055
|
+
condition: '{{ Boolean($value && $value.name) }}',
|
|
1056
|
+
target: 'queryCondition',
|
|
1057
|
+
schema: {
|
|
1058
|
+
'x-component-props': '{{{selectedDataSourceName: $value && $value.name}}}',
|
|
1059
|
+
},
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
type: 'value:schema',
|
|
1063
|
+
condition: '{{ Boolean(!$value || !$value.name) }}',
|
|
1064
|
+
target: 'orderBy',
|
|
1065
|
+
schema: {
|
|
1066
|
+
'x-props': "{{{disabled: true, tooltip: '请先选择数据源'}}}",
|
|
1067
|
+
},
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
type: 'value:schema',
|
|
1071
|
+
condition: '{{ Boolean($value && $value.name) }}',
|
|
1072
|
+
target: 'orderBy',
|
|
1073
|
+
schema: {
|
|
1074
|
+
'x-props': "{{{disabled: false, tooltip: ''}}}",
|
|
1075
|
+
},
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
type: 'value:schema',
|
|
1079
|
+
target: 'selectFields',
|
|
1080
|
+
schema: {
|
|
1081
|
+
'x-component-props': {
|
|
1082
|
+
dataSourceName: '{{$self.value && $self.value.name}}',
|
|
1083
|
+
},
|
|
1084
|
+
},
|
|
1085
|
+
},
|
|
1086
|
+
],
|
|
1087
|
+
description: '展示模型数据的数据来源',
|
|
1088
|
+
})),
|
|
1089
|
+
bindConnectMetadata: Type.Optional(Type.Object({
|
|
1090
|
+
datasource: Type.Optional(Type.Object({
|
|
1091
|
+
title: Type.Optional(Type.String({
|
|
1092
|
+
title: 'API名',
|
|
1107
1093
|
})),
|
|
1108
|
-
|
|
1109
|
-
title: '
|
|
1094
|
+
id: Type.Optional(Type.String({
|
|
1095
|
+
title: 'ID',
|
|
1096
|
+
})),
|
|
1097
|
+
name: Type.Optional(Type.String({
|
|
1098
|
+
title: '数据源标识',
|
|
1099
|
+
})),
|
|
1100
|
+
})),
|
|
1101
|
+
}, {
|
|
1102
|
+
title: 'APIs',
|
|
1103
|
+
type: 'object',
|
|
1104
|
+
'x-component': 'connector-select',
|
|
1105
|
+
'x-index': 12,
|
|
1106
|
+
'x-group': '数据',
|
|
1107
|
+
required: true,
|
|
1108
|
+
'x-linkages': [
|
|
1109
|
+
{
|
|
1110
|
+
type: 'value:schema',
|
|
1111
|
+
target: 'connectorMethod',
|
|
1112
|
+
schema: {
|
|
1113
|
+
'x-component-props': {
|
|
1114
|
+
value: '{{$self.value}}',
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
1117
|
+
},
|
|
1118
|
+
],
|
|
1119
|
+
'x-props': {
|
|
1120
|
+
'data-hidebind': true,
|
|
1121
|
+
},
|
|
1122
|
+
description: '展示数据的APIs来源选择',
|
|
1123
|
+
})),
|
|
1124
|
+
dataSourceData: Type.Optional(Type.Array(Type.Object({}, {
|
|
1125
|
+
title: '表达式',
|
|
1126
|
+
type: 'array',
|
|
1127
|
+
required: true,
|
|
1128
|
+
description: '数据列表展示的数据,可选择变量。',
|
|
1129
|
+
'x-component': 'jsontext',
|
|
1130
|
+
'x-helper-text': '新特性:数据列表追加绑定表达式数据,原APIs路径优化为表达式。注意:数组中默认需包含_id字段。且当输入的表达式变化时,会触发自动生成列表字段。因此建议先输入表达式再调整样式。[查看示例](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView#2-%E7%BB%91%E5%AE%9A%E8%A1%A8%E8%BE%BE%E5%BC%8F)',
|
|
1131
|
+
'x-group': '数据',
|
|
1132
|
+
'x-index': 14,
|
|
1133
|
+
}))),
|
|
1134
|
+
exprToFieldsSchema: Type.Optional(Type.String({
|
|
1135
|
+
title: '',
|
|
1136
|
+
type: 'string',
|
|
1137
|
+
'x-props': {
|
|
1138
|
+
'data-hidebind': true,
|
|
1139
|
+
},
|
|
1140
|
+
default: '',
|
|
1141
|
+
'x-group': '数据',
|
|
1142
|
+
'x-index': 15,
|
|
1143
|
+
'x-component': 'expr-to-fields-schema',
|
|
1144
|
+
'x-component-props': {
|
|
1145
|
+
expressionField: 'dataSourceData',
|
|
1146
|
+
},
|
|
1147
|
+
})),
|
|
1148
|
+
connectorMethod: Type.Optional(Type.Object({
|
|
1149
|
+
name: Type.Optional(Type.String({ title: '方法标识' })),
|
|
1150
|
+
title: Type.Optional(Type.String({ title: '方法名' })),
|
|
1151
|
+
outParams: Type.Optional(Type.Array(Type.String({}))),
|
|
1152
|
+
inParams: Type.Optional(Type.Array(Type.String({}))),
|
|
1153
|
+
}, {
|
|
1154
|
+
title: '调用方法',
|
|
1155
|
+
type: 'object',
|
|
1156
|
+
'x-component': 'connector-method-select',
|
|
1157
|
+
'x-index': 16,
|
|
1158
|
+
'x-group': '数据',
|
|
1159
|
+
required: true,
|
|
1160
|
+
'x-component-props': {
|
|
1161
|
+
paramsSchema: {
|
|
1110
1162
|
type: 'object',
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
'x-group': '数据',
|
|
1114
|
-
required: true,
|
|
1115
|
-
'x-component-props': {
|
|
1116
|
-
paramsSchema: {
|
|
1163
|
+
properties: {
|
|
1164
|
+
outParams: {
|
|
1117
1165
|
type: 'object',
|
|
1118
1166
|
properties: {
|
|
1119
|
-
|
|
1167
|
+
properties: {
|
|
1120
1168
|
type: 'object',
|
|
1121
1169
|
properties: {
|
|
1122
|
-
|
|
1170
|
+
records: {
|
|
1123
1171
|
type: 'object',
|
|
1124
1172
|
properties: {
|
|
1125
|
-
|
|
1173
|
+
type: { const: 'array' },
|
|
1174
|
+
items: {
|
|
1126
1175
|
type: 'object',
|
|
1127
1176
|
properties: {
|
|
1128
|
-
type: {
|
|
1129
|
-
|
|
1177
|
+
type: {
|
|
1178
|
+
const: 'object',
|
|
1179
|
+
},
|
|
1180
|
+
properties: {
|
|
1130
1181
|
type: 'object',
|
|
1131
1182
|
properties: {
|
|
1132
|
-
|
|
1133
|
-
const: 'object',
|
|
1134
|
-
},
|
|
1135
|
-
properties: {
|
|
1183
|
+
_id: {
|
|
1136
1184
|
type: 'object',
|
|
1137
1185
|
properties: {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
properties: {
|
|
1141
|
-
type: {
|
|
1142
|
-
const: 'string',
|
|
1143
|
-
},
|
|
1144
|
-
},
|
|
1186
|
+
type: {
|
|
1187
|
+
const: 'string',
|
|
1145
1188
|
},
|
|
1146
1189
|
},
|
|
1147
1190
|
},
|
|
@@ -1150,366 +1193,550 @@ export default {
|
|
|
1150
1193
|
},
|
|
1151
1194
|
},
|
|
1152
1195
|
},
|
|
1153
|
-
required: ['records'],
|
|
1154
1196
|
},
|
|
1155
1197
|
},
|
|
1198
|
+
required: ['records'],
|
|
1156
1199
|
},
|
|
1157
1200
|
},
|
|
1158
1201
|
},
|
|
1159
|
-
docUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView#%E8%B0%83%E7%94%A8-apis-%E7%9A%84%E5%8F%82%E6%95%B0%E8%A6%81%E6%B1%82',
|
|
1160
1202
|
},
|
|
1161
|
-
|
|
1162
|
-
|
|
1203
|
+
},
|
|
1204
|
+
docUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView#%E8%B0%83%E7%94%A8-apis-%E7%9A%84%E5%8F%82%E6%95%B0%E8%A6%81%E6%B1%82',
|
|
1205
|
+
},
|
|
1206
|
+
'x-props': {
|
|
1207
|
+
'data-hidebind': true,
|
|
1208
|
+
},
|
|
1209
|
+
'x-helper-text': '方法的出入参需满足组件要求,[查看文档](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView#%E8%B0%83%E7%94%A8-apis-%E7%9A%84%E5%8F%82%E6%95%B0%E8%A6%81%E6%B1%82)',
|
|
1210
|
+
'x-helper-text-color': '#E37318',
|
|
1211
|
+
description: '展示数据的APIs调用方法选择',
|
|
1212
|
+
})),
|
|
1213
|
+
connectorParams: Type.Optional(Type.Object({}, {
|
|
1214
|
+
title: '查询入参',
|
|
1215
|
+
type: 'string',
|
|
1216
|
+
'x-index': 18,
|
|
1217
|
+
'x-group': '数据',
|
|
1218
|
+
description: "对APIs调用方法获取的数据进行筛选过滤。支持对象类型,例如 {name:'',value:''}",
|
|
1219
|
+
'x-component': 'property-object-params-field',
|
|
1220
|
+
'x-component-props': {
|
|
1221
|
+
dataSourceKeyName: 'bindConnectMetadata',
|
|
1222
|
+
dataSourceValuePath: 'datasource.name',
|
|
1223
|
+
methodNameKeyName: 'connectorMethod',
|
|
1224
|
+
methodValuePath: 'name',
|
|
1225
|
+
paramsKeyName: 'connectorParams',
|
|
1226
|
+
},
|
|
1227
|
+
'x-helper-text': '当配置了「每页条数」属性后,pageSize参数将不会生效',
|
|
1228
|
+
})),
|
|
1229
|
+
queryCondition: Type.Optional(Type.Array(Type.Object({}), {
|
|
1230
|
+
'x-index': 20,
|
|
1231
|
+
title: '数据筛选',
|
|
1232
|
+
'x-group': '数据',
|
|
1233
|
+
type: 'array',
|
|
1234
|
+
items: {},
|
|
1235
|
+
'x-component': 'data-source-condition-selector',
|
|
1236
|
+
'x-component-props': {
|
|
1237
|
+
propertyPath: 'queryCondition',
|
|
1238
|
+
dataSourcePath: 'datasource.name',
|
|
1239
|
+
preWherePath: 'where',
|
|
1240
|
+
},
|
|
1241
|
+
'x-props': {
|
|
1242
|
+
'data-hidebind': false,
|
|
1243
|
+
'data-hideBindValue': true,
|
|
1244
|
+
'data-withBindMeta': true,
|
|
1245
|
+
},
|
|
1246
|
+
description: '对数据进行筛选过滤',
|
|
1247
|
+
})),
|
|
1248
|
+
orderBy: Type.Optional(Type.String({
|
|
1249
|
+
'x-index': 30,
|
|
1250
|
+
title: '排序字段',
|
|
1251
|
+
'x-group': '数据',
|
|
1252
|
+
type: 'string',
|
|
1253
|
+
'x-linkages': [
|
|
1254
|
+
{
|
|
1255
|
+
type: 'value:schema',
|
|
1256
|
+
condition: '{{ Boolean($value) }}',
|
|
1257
|
+
target: 'orderBy',
|
|
1258
|
+
schema: {
|
|
1259
|
+
'x-props': '{{{clearable: true}}}',
|
|
1163
1260
|
},
|
|
1164
|
-
'x-helper-text': '方法的出入参需满足组件要求,[查看文档](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/ListView#%E8%B0%83%E7%94%A8-apis-%E7%9A%84%E5%8F%82%E6%95%B0%E8%A6%81%E6%B1%82)',
|
|
1165
|
-
'x-helper-text-color': '#E37318',
|
|
1166
|
-
description: '展示数据的APIs调用方法选择',
|
|
1167
1261
|
},
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
'
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
'x-component': 'property-object-params-field',
|
|
1175
|
-
'x-component-props': {
|
|
1176
|
-
dataSourceKeyName: 'bindConnectMetadata',
|
|
1177
|
-
dataSourceValuePath: 'datasource.name',
|
|
1178
|
-
methodNameKeyName: 'connectorMethod',
|
|
1179
|
-
methodValuePath: 'name',
|
|
1180
|
-
paramsKeyName: 'connectorParams',
|
|
1262
|
+
{
|
|
1263
|
+
type: 'value:schema',
|
|
1264
|
+
condition: '{{ Boolean(!$value) }}',
|
|
1265
|
+
target: 'orderBy',
|
|
1266
|
+
schema: {
|
|
1267
|
+
'x-props': '{{{clearable: false}}}',
|
|
1181
1268
|
},
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1269
|
+
},
|
|
1270
|
+
],
|
|
1271
|
+
description: '选取对数据进行排序的字段',
|
|
1272
|
+
})),
|
|
1273
|
+
orderType: Type.Optional(Type.StringEnum({
|
|
1274
|
+
'x-index': 40,
|
|
1275
|
+
title: '排序方式',
|
|
1276
|
+
'x-group': '数据',
|
|
1277
|
+
default: 'asc',
|
|
1278
|
+
type: 'string',
|
|
1279
|
+
enum: [
|
|
1280
|
+
{
|
|
1281
|
+
label: '升序',
|
|
1282
|
+
value: 'asc',
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
label: '降序',
|
|
1286
|
+
value: 'desc',
|
|
1287
|
+
},
|
|
1288
|
+
],
|
|
1289
|
+
'x-linkages': [
|
|
1290
|
+
{
|
|
1291
|
+
type: 'value:schema',
|
|
1292
|
+
condition: '{{ Boolean($value) }}',
|
|
1293
|
+
target: 'orderType',
|
|
1294
|
+
schema: {
|
|
1295
|
+
'x-props': '{{{clearable: true}}}',
|
|
1195
1296
|
},
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
type: 'value:schema',
|
|
1300
|
+
condition: '{{ Boolean(!$value) }}',
|
|
1301
|
+
target: 'orderType',
|
|
1302
|
+
schema: {
|
|
1303
|
+
'x-props': '{{{clearable: false}}}',
|
|
1200
1304
|
},
|
|
1201
|
-
description: '对数据进行筛选过滤',
|
|
1202
1305
|
},
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
},
|
|
1224
|
-
},
|
|
1225
|
-
],
|
|
1226
|
-
description: '选取对数据进行排序的字段',
|
|
1227
|
-
},
|
|
1228
|
-
orderType: {
|
|
1229
|
-
'x-index': 40,
|
|
1230
|
-
title: '排序方式',
|
|
1231
|
-
'x-group': '数据',
|
|
1232
|
-
default: 'asc',
|
|
1233
|
-
type: 'string',
|
|
1234
|
-
enum: [
|
|
1235
|
-
{
|
|
1236
|
-
label: '升序',
|
|
1237
|
-
value: 'asc',
|
|
1238
|
-
},
|
|
1239
|
-
{
|
|
1240
|
-
label: '降序',
|
|
1241
|
-
value: 'desc',
|
|
1242
|
-
},
|
|
1243
|
-
],
|
|
1244
|
-
'x-linkages': [
|
|
1245
|
-
{
|
|
1246
|
-
type: 'value:schema',
|
|
1247
|
-
condition: '{{ Boolean($value) }}',
|
|
1248
|
-
target: 'orderType',
|
|
1249
|
-
schema: {
|
|
1250
|
-
'x-props': '{{{clearable: true}}}',
|
|
1251
|
-
},
|
|
1252
|
-
},
|
|
1253
|
-
{
|
|
1254
|
-
type: 'value:schema',
|
|
1255
|
-
condition: '{{ Boolean(!$value) }}',
|
|
1256
|
-
target: 'orderType',
|
|
1257
|
-
schema: {
|
|
1258
|
-
'x-props': '{{{clearable: false}}}',
|
|
1259
|
-
},
|
|
1260
|
-
},
|
|
1261
|
-
],
|
|
1262
|
-
description: '设置升序或降序',
|
|
1306
|
+
],
|
|
1307
|
+
description: '设置升序或降序',
|
|
1308
|
+
})),
|
|
1309
|
+
// 兼容多字段排序,若支持多字段排序,则给sort字段赋初始值(原始配置的orderBy,orderType)
|
|
1310
|
+
isSupportMultipleSort: Type.Optional(Type.Boolean({
|
|
1311
|
+
title: '启用多字段排序',
|
|
1312
|
+
'x-index': 41,
|
|
1313
|
+
default: false,
|
|
1314
|
+
'x-group': '数据',
|
|
1315
|
+
'x-props': {
|
|
1316
|
+
'data-hidebind': true,
|
|
1317
|
+
},
|
|
1318
|
+
'x-linkages': [
|
|
1319
|
+
{
|
|
1320
|
+
type: 'value:state',
|
|
1321
|
+
target: '*(sorter)',
|
|
1322
|
+
condition: '{{$self.value}}',
|
|
1323
|
+
state: {
|
|
1324
|
+
display: true,
|
|
1325
|
+
},
|
|
1263
1326
|
},
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
{ label: '自定义', value: 'custom' },
|
|
1271
|
-
],
|
|
1272
|
-
'x-runtime-default': 'main',
|
|
1273
|
-
'x-props': { clearable: true },
|
|
1274
|
-
description: '默认查询本表字段',
|
|
1275
|
-
'x-index': 41,
|
|
1276
|
-
'x-group': '数据',
|
|
1277
|
-
'x-linkages': [
|
|
1278
|
-
{
|
|
1279
|
-
type: 'value:visible',
|
|
1280
|
-
target: 'selectFields',
|
|
1281
|
-
condition: '{{$self.value === "custom"}}',
|
|
1282
|
-
},
|
|
1283
|
-
],
|
|
1284
|
-
})),
|
|
1285
|
-
selectFields: Type.Optional(Type.Array(Type.String(), {
|
|
1286
|
-
title: '自定义查询字段',
|
|
1287
|
-
type: 'array',
|
|
1288
|
-
'x-props': { clearable: true },
|
|
1289
|
-
'x-index': 42,
|
|
1290
|
-
'x-group': '数据',
|
|
1291
|
-
'x-component': 'mutilp-data-source-field-select',
|
|
1292
|
-
'x-component-props': {
|
|
1293
|
-
dataSourceName: '',
|
|
1294
|
-
splitRelation: true,
|
|
1295
|
-
enableSetProcedure: false,
|
|
1296
|
-
enableConfigTitle: false,
|
|
1327
|
+
{
|
|
1328
|
+
type: 'value:state',
|
|
1329
|
+
target: '*(orderBy,orderType)',
|
|
1330
|
+
condition: '{{$self.value}}',
|
|
1331
|
+
state: {
|
|
1332
|
+
display: false,
|
|
1297
1333
|
},
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
'
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
enum: [
|
|
1306
|
-
{
|
|
1307
|
-
label: '点击加载更多',
|
|
1308
|
-
value: 'loadMoreButton',
|
|
1309
|
-
},
|
|
1310
|
-
{
|
|
1311
|
-
label: '触底加载更多',
|
|
1312
|
-
value: 'bottomLoad',
|
|
1313
|
-
},
|
|
1314
|
-
{
|
|
1315
|
-
label: '分页器',
|
|
1316
|
-
value: 'pagination',
|
|
1317
|
-
},
|
|
1318
|
-
{
|
|
1319
|
-
label: '不分页',
|
|
1320
|
-
value: 'none',
|
|
1321
|
-
},
|
|
1322
|
-
],
|
|
1323
|
-
'x-props': {
|
|
1324
|
-
'data-hidebind': true,
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
type: 'value:state',
|
|
1337
|
+
target: 'sorter',
|
|
1338
|
+
condition: '{{ Boolean($form.values.orderBy)&&$form.values?.datasource?.name&&$self.inputed}}',
|
|
1339
|
+
state: {
|
|
1340
|
+
value: '{{ ([getDataSourceValueOptions($form.values.datasource.name, undefined, true).find(item => item.value === $form.values.orderBy)].map(i=>({label:i.label,orderBy:$form.values.orderBy,orderType:$form.values.orderType})))}}',
|
|
1325
1341
|
},
|
|
1326
|
-
'x-linkages': [
|
|
1327
|
-
{
|
|
1328
|
-
type: 'value:visible',
|
|
1329
|
-
target: 'loadCompletedText',
|
|
1330
|
-
condition: "{{$self.value == 'loadMoreButton' || $self.value == 'bottomLoad'}}",
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
type: 'value:visible',
|
|
1334
|
-
target: 'loadButtonText',
|
|
1335
|
-
condition: "{{$self.value == 'loadMoreButton'}}",
|
|
1336
|
-
},
|
|
1337
|
-
],
|
|
1338
|
-
description: '数据分页样式',
|
|
1339
1342
|
},
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1343
|
+
],
|
|
1344
|
+
})),
|
|
1345
|
+
// 支持多字段筛选
|
|
1346
|
+
sorter: Type.Optional(Type.Array(Type.Object({
|
|
1347
|
+
orderBy: Type.String({
|
|
1348
|
+
title: '排序字段',
|
|
1349
|
+
default: '',
|
|
1350
|
+
'x-props': {
|
|
1351
|
+
clearable: true,
|
|
1352
|
+
},
|
|
1353
|
+
}),
|
|
1354
|
+
label: Type.Optional(Type.String({
|
|
1355
|
+
title: '排序字段名称',
|
|
1356
|
+
})),
|
|
1357
|
+
orderType: Type.StringEnum({
|
|
1358
|
+
title: '排序方式',
|
|
1359
|
+
type: 'string',
|
|
1360
|
+
enum: [
|
|
1361
|
+
{
|
|
1362
|
+
label: '升序',
|
|
1363
|
+
value: 'asc',
|
|
1355
1364
|
},
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
pageIndex: {
|
|
1360
|
-
'x-index': 61,
|
|
1361
|
-
title: '页码',
|
|
1362
|
-
type: 'number',
|
|
1363
|
-
default: 1,
|
|
1364
|
-
'x-group': '分页器',
|
|
1365
|
-
'x-props': {
|
|
1366
|
-
min: 1,
|
|
1365
|
+
{
|
|
1366
|
+
label: '降序',
|
|
1367
|
+
value: 'desc',
|
|
1367
1368
|
},
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
'
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
'x-index': 110,
|
|
1413
|
-
title: '显示加载状态',
|
|
1414
|
-
'x-group': '状态',
|
|
1415
|
-
type: 'boolean',
|
|
1416
|
-
'x-runtime-default': true,
|
|
1417
|
-
description: '是否开启数据列表的加载状态,默认显示',
|
|
1418
|
-
},
|
|
1419
|
-
isSetStatus: {
|
|
1420
|
-
'x-index': 112,
|
|
1421
|
-
title: '显示异常状态',
|
|
1422
|
-
'x-group': '状态',
|
|
1423
|
-
type: 'boolean',
|
|
1424
|
-
'x-runtime-default': false,
|
|
1425
|
-
description: '是否开启数据列表的异常状态,默认不显示',
|
|
1426
|
-
},
|
|
1427
|
-
loading: {
|
|
1428
|
-
'x-index': 114,
|
|
1429
|
-
title: '数据加载状态',
|
|
1430
|
-
'x-group': '状态',
|
|
1431
|
-
type: 'boolean',
|
|
1432
|
-
'x-runtime-default': false,
|
|
1433
|
-
description: '开启后会展示数据加载中状态',
|
|
1434
|
-
},
|
|
1435
|
-
isSupportApis: Type.Optional(Type.Boolean({
|
|
1436
|
-
title: '是否支持apis',
|
|
1437
|
-
'x-group': '数据',
|
|
1438
|
-
'x-index': 120,
|
|
1439
|
-
display: false,
|
|
1440
|
-
default: true,
|
|
1441
|
-
'x-linkages': [
|
|
1442
|
-
{
|
|
1443
|
-
type: 'value:schema',
|
|
1444
|
-
target: 'dataSourceType',
|
|
1445
|
-
condition: '{{!$self.value}}',
|
|
1446
|
-
schema: {
|
|
1447
|
-
enum: [
|
|
1448
|
-
{
|
|
1449
|
-
label: '数据模型',
|
|
1450
|
-
value: 'data-model',
|
|
1451
|
-
},
|
|
1452
|
-
{
|
|
1453
|
-
label: '表达式',
|
|
1454
|
-
value: 'expression',
|
|
1455
|
-
},
|
|
1456
|
-
],
|
|
1457
|
-
'x-component-props': {
|
|
1458
|
-
defaultValue: 'data-model',
|
|
1459
|
-
options: [
|
|
1369
|
+
],
|
|
1370
|
+
'x-props': {
|
|
1371
|
+
clearable: true,
|
|
1372
|
+
},
|
|
1373
|
+
}),
|
|
1374
|
+
}, {
|
|
1375
|
+
title: 'tabs',
|
|
1376
|
+
default: {
|
|
1377
|
+
orderBy: '',
|
|
1378
|
+
orderType: '',
|
|
1379
|
+
},
|
|
1380
|
+
}), {
|
|
1381
|
+
title: '数据排序',
|
|
1382
|
+
'x-index': 42,
|
|
1383
|
+
'x-component': 'list',
|
|
1384
|
+
'x-component-props': {
|
|
1385
|
+
label_add: '添加排序规则',
|
|
1386
|
+
},
|
|
1387
|
+
'x-group': '数据',
|
|
1388
|
+
'x-props': {
|
|
1389
|
+
'data-withBindMeta': true,
|
|
1390
|
+
},
|
|
1391
|
+
'x-linkages': [
|
|
1392
|
+
{
|
|
1393
|
+
type: 'value:schema',
|
|
1394
|
+
condition: '{{ Boolean($form?.values?.datasource?.name) }}',
|
|
1395
|
+
target: 'sorter',
|
|
1396
|
+
schema: {
|
|
1397
|
+
items: {
|
|
1398
|
+
path: 'sorter.*',
|
|
1399
|
+
type: 'object',
|
|
1400
|
+
default: {
|
|
1401
|
+
orderBy: '',
|
|
1402
|
+
orderType: 'asc',
|
|
1403
|
+
label: '',
|
|
1404
|
+
},
|
|
1405
|
+
'x-display': "(!this.orderBy)?'请选择排序字段':(this.label||this.orderBy)+'-'+(({desc:'降序',asc:'升序'})[this.orderType]||'')",
|
|
1406
|
+
properties: {
|
|
1407
|
+
orderBy: {
|
|
1408
|
+
type: 'string',
|
|
1409
|
+
title: '排序字段',
|
|
1410
|
+
'x-option': '{{getDataSourceValueOptions($form?.values?.datasource?.name, undefined, true)}}',
|
|
1411
|
+
'x-sorter': '{{$form?.values.sorter}}',
|
|
1412
|
+
'x-linkages': [
|
|
1460
1413
|
{
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1414
|
+
type: 'value:state',
|
|
1415
|
+
target: 'dataForm.label',
|
|
1416
|
+
condition: '{{ Boolean($self.value)}}',
|
|
1417
|
+
state: {
|
|
1418
|
+
value: '{{$self.props["x-option"].find(i=>i.value===$self.value)?.label}}',
|
|
1419
|
+
},
|
|
1466
1420
|
},
|
|
1467
1421
|
{
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1422
|
+
type: 'value:schema',
|
|
1423
|
+
target: 'dataForm.orderBy',
|
|
1424
|
+
schema: {
|
|
1425
|
+
enum: '{{$self.props["x-option"].filter(i=>i.value===$self.value||!$self.props["x-sorter"].find(j=>j.orderBy===i.value))}}',
|
|
1426
|
+
},
|
|
1473
1427
|
},
|
|
1474
1428
|
],
|
|
1475
1429
|
},
|
|
1430
|
+
label: Type.Optional(Type.String({
|
|
1431
|
+
type: 'string',
|
|
1432
|
+
title: '排序字段名称',
|
|
1433
|
+
display: false,
|
|
1434
|
+
})),
|
|
1435
|
+
orderType: Type.StringEnum({
|
|
1436
|
+
title: '排序方式',
|
|
1437
|
+
type: 'string',
|
|
1438
|
+
'x-component': 'radio',
|
|
1439
|
+
enum: [
|
|
1440
|
+
{
|
|
1441
|
+
label: '升序',
|
|
1442
|
+
value: 'asc',
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
label: '降序',
|
|
1446
|
+
value: 'desc',
|
|
1447
|
+
},
|
|
1448
|
+
],
|
|
1449
|
+
'x-props': {
|
|
1450
|
+
clearable: true,
|
|
1451
|
+
},
|
|
1452
|
+
}),
|
|
1476
1453
|
},
|
|
1477
1454
|
},
|
|
1478
|
-
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
'x-linkages': [
|
|
1489
|
-
{
|
|
1490
|
-
type: 'value:schema',
|
|
1491
|
-
schema: {
|
|
1492
|
-
type: 'object',
|
|
1493
|
-
'x-component': 'datasource-condition-where-query-editor',
|
|
1494
|
-
'x-component-props': {
|
|
1495
|
-
propertyPath: 'queryCondition',
|
|
1496
|
-
dataSourcePath: 'datasource.name',
|
|
1497
|
-
preWherePath: 'where',
|
|
1498
|
-
enableKeyIsRelation: true,
|
|
1499
|
-
},
|
|
1500
|
-
},
|
|
1501
|
-
condition: '{{ Boolean($self.value) }}',
|
|
1502
|
-
target: '*(queryCondition)',
|
|
1455
|
+
},
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
type: 'value:schema',
|
|
1459
|
+
condition: '{{$self.value?.length>2}}',
|
|
1460
|
+
target: 'sorter',
|
|
1461
|
+
schema: {
|
|
1462
|
+
'x-component-props': {
|
|
1463
|
+
label_add: '添加排序规则',
|
|
1464
|
+
addDisabledTip: '最多添加3个排序规则,请先删减已有规则',
|
|
1503
1465
|
},
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1466
|
+
},
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
type: 'value:schema',
|
|
1470
|
+
condition: '{{$self.value?.length<3}}',
|
|
1471
|
+
target: 'sorter',
|
|
1472
|
+
schema: {
|
|
1473
|
+
'x-component-props': {
|
|
1474
|
+
label_add: '添加排序规则',
|
|
1475
|
+
addDisabledTip: '',
|
|
1508
1476
|
},
|
|
1509
|
-
|
|
1510
|
-
}
|
|
1477
|
+
},
|
|
1478
|
+
},
|
|
1479
|
+
],
|
|
1480
|
+
default: [
|
|
1481
|
+
{
|
|
1482
|
+
orderBy: 'updatedAt',
|
|
1483
|
+
orderType: 'desc',
|
|
1484
|
+
label: '更新时间',
|
|
1485
|
+
},
|
|
1486
|
+
],
|
|
1487
|
+
description: '可设置数据排序规则,支持拖拽调整排序优先级,数组下标越小优先级越高。绑定数据示例:[{"orderBy":"updatedAt","orderType":"desc"}],升序传值asc,降序传值desc',
|
|
1488
|
+
})),
|
|
1489
|
+
selectFieldType: Type.Optional(Type.StringEnum({
|
|
1490
|
+
title: '字段查询范围',
|
|
1491
|
+
type: 'string',
|
|
1492
|
+
enum: [
|
|
1493
|
+
{ label: '全部字段', value: 'all' },
|
|
1494
|
+
{ label: '本表字段', value: 'main' },
|
|
1495
|
+
{ label: '自定义', value: 'custom' },
|
|
1496
|
+
],
|
|
1497
|
+
'x-runtime-default': 'main',
|
|
1498
|
+
'x-props': { clearable: true },
|
|
1499
|
+
description: '默认查询本表字段',
|
|
1500
|
+
'x-index': 43,
|
|
1501
|
+
'x-group': '数据',
|
|
1502
|
+
'x-linkages': [
|
|
1503
|
+
{
|
|
1504
|
+
type: 'value:visible',
|
|
1505
|
+
target: 'selectFields',
|
|
1506
|
+
condition: '{{$self.value === "custom"}}',
|
|
1507
|
+
},
|
|
1508
|
+
],
|
|
1509
|
+
})),
|
|
1510
|
+
selectFields: Type.Optional(Type.Array(Type.String(), {
|
|
1511
|
+
title: '自定义查询字段',
|
|
1512
|
+
type: 'array',
|
|
1513
|
+
'x-props': { clearable: true },
|
|
1514
|
+
'x-index': 44,
|
|
1515
|
+
'x-group': '数据',
|
|
1516
|
+
'x-component': 'mutilp-data-source-field-select',
|
|
1517
|
+
'x-component-props': {
|
|
1518
|
+
dataSourceName: '',
|
|
1519
|
+
splitRelation: true,
|
|
1520
|
+
enableSetProcedure: false,
|
|
1521
|
+
enableConfigTitle: false,
|
|
1511
1522
|
},
|
|
1512
|
-
},
|
|
1523
|
+
})),
|
|
1524
|
+
pagination: Type.Optional(Type.StringEnum({
|
|
1525
|
+
'x-index': 50,
|
|
1526
|
+
title: '分页方式',
|
|
1527
|
+
type: 'string',
|
|
1528
|
+
'x-group': '分页器',
|
|
1529
|
+
default: 'loadMoreButton',
|
|
1530
|
+
enum: [
|
|
1531
|
+
{
|
|
1532
|
+
label: '点击加载更多',
|
|
1533
|
+
value: 'loadMoreButton',
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
label: '触底加载更多',
|
|
1537
|
+
value: 'bottomLoad',
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
label: '分页器',
|
|
1541
|
+
value: 'pagination',
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
label: '不分页',
|
|
1545
|
+
value: 'none',
|
|
1546
|
+
},
|
|
1547
|
+
],
|
|
1548
|
+
'x-props': {
|
|
1549
|
+
'data-hidebind': true,
|
|
1550
|
+
},
|
|
1551
|
+
'x-linkages': [
|
|
1552
|
+
{
|
|
1553
|
+
type: 'value:visible',
|
|
1554
|
+
target: 'loadCompletedText',
|
|
1555
|
+
condition: "{{$self.value == 'loadMoreButton' || $self.value == 'bottomLoad'}}",
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
type: 'value:visible',
|
|
1559
|
+
target: 'loadButtonText',
|
|
1560
|
+
condition: "{{$self.value == 'loadMoreButton'}}",
|
|
1561
|
+
},
|
|
1562
|
+
],
|
|
1563
|
+
description: '数据分页样式',
|
|
1564
|
+
})),
|
|
1565
|
+
loadButtonText: Type.Optional(Type.String({
|
|
1566
|
+
'x-index': 55,
|
|
1567
|
+
title: '加载按钮名称',
|
|
1568
|
+
type: 'string',
|
|
1569
|
+
default: '加载更多',
|
|
1570
|
+
'x-group': '分页器',
|
|
1571
|
+
})),
|
|
1572
|
+
pageSize: Type.Optional(Type.Number({
|
|
1573
|
+
'x-index': 60,
|
|
1574
|
+
title: '每页条数',
|
|
1575
|
+
type: 'number',
|
|
1576
|
+
default: 5,
|
|
1577
|
+
'x-group': '分页器',
|
|
1578
|
+
'x-props': {
|
|
1579
|
+
min: 1,
|
|
1580
|
+
},
|
|
1581
|
+
description: '设置单次加载的数据条数',
|
|
1582
|
+
display: true,
|
|
1583
|
+
})),
|
|
1584
|
+
pageIndex: Type.Optional(Type.Number({
|
|
1585
|
+
'x-index': 61,
|
|
1586
|
+
title: '页码',
|
|
1587
|
+
type: 'number',
|
|
1588
|
+
default: 1,
|
|
1589
|
+
'x-group': '分页器',
|
|
1590
|
+
'x-props': {
|
|
1591
|
+
min: 1,
|
|
1592
|
+
},
|
|
1593
|
+
description: '初始页码',
|
|
1594
|
+
display: true,
|
|
1595
|
+
})),
|
|
1596
|
+
enableTotal: Type.Optional(Type.Boolean({
|
|
1597
|
+
title: '启用动态分页',
|
|
1598
|
+
type: 'boolean',
|
|
1599
|
+
description: '开启后,可支持动态分页',
|
|
1600
|
+
'x-helper-text': '默认为前端分页,启用后可实现动态加载数据',
|
|
1601
|
+
'x-group': '分页器',
|
|
1602
|
+
'x-index': 70,
|
|
1603
|
+
default: false,
|
|
1604
|
+
'x-linkages': [
|
|
1605
|
+
{
|
|
1606
|
+
type: 'value:visible',
|
|
1607
|
+
target: '*(total)',
|
|
1608
|
+
condition: '{{!!$self.value}}',
|
|
1609
|
+
},
|
|
1610
|
+
],
|
|
1611
|
+
})),
|
|
1612
|
+
total: Type.Optional(Type.Number({
|
|
1613
|
+
title: '数据总数',
|
|
1614
|
+
type: 'number',
|
|
1615
|
+
description: '默认为表达式输入的数组长度,请输入数据表实际数据总数。',
|
|
1616
|
+
'x-helper-text': '默认为表达式输入的数组长度,请输入数据表实际数据总数。[详见后端分页指引](https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/database/WdTable#pagination)',
|
|
1617
|
+
'x-group': '分页器',
|
|
1618
|
+
'x-index': 80,
|
|
1619
|
+
})),
|
|
1620
|
+
emptyText: Type.Optional(Type.String({
|
|
1621
|
+
'x-index': 90,
|
|
1622
|
+
type: 'string',
|
|
1623
|
+
title: '空状态提示',
|
|
1624
|
+
'x-group': '状态',
|
|
1625
|
+
default: '暂无数据',
|
|
1626
|
+
description: '无数据时的提示说明,内容为空时则不显示该提示',
|
|
1627
|
+
})),
|
|
1628
|
+
loadCompletedText: Type.Optional(Type.String({
|
|
1629
|
+
'x-index': 100,
|
|
1630
|
+
title: '加载到底提示',
|
|
1631
|
+
'x-group': '状态',
|
|
1632
|
+
type: 'string',
|
|
1633
|
+
default: '',
|
|
1634
|
+
description: '加载全部数据后的提示说明,内容为空时则不显示该提示',
|
|
1635
|
+
})),
|
|
1636
|
+
isSetLoading: Type.Optional(Type.Boolean({
|
|
1637
|
+
'x-index': 110,
|
|
1638
|
+
title: '显示加载状态',
|
|
1639
|
+
'x-group': '状态',
|
|
1640
|
+
type: 'boolean',
|
|
1641
|
+
'x-runtime-default': true,
|
|
1642
|
+
description: '是否开启数据列表的加载状态,默认显示',
|
|
1643
|
+
})),
|
|
1644
|
+
isSetStatus: Type.Optional(Type.Boolean({
|
|
1645
|
+
'x-index': 112,
|
|
1646
|
+
title: '显示异常状态',
|
|
1647
|
+
'x-group': '状态',
|
|
1648
|
+
type: 'boolean',
|
|
1649
|
+
'x-runtime-default': false,
|
|
1650
|
+
description: '是否开启数据列表的异常状态,默认不显示',
|
|
1651
|
+
})),
|
|
1652
|
+
loading: Type.Optional(Type.Boolean({
|
|
1653
|
+
'x-index': 114,
|
|
1654
|
+
title: '数据加载状态',
|
|
1655
|
+
'x-group': '状态',
|
|
1656
|
+
type: 'boolean',
|
|
1657
|
+
'x-runtime-default': false,
|
|
1658
|
+
description: '开启后会展示数据加载中状态',
|
|
1659
|
+
})),
|
|
1660
|
+
isSupportApis: Type.Optional(Type.Boolean({
|
|
1661
|
+
title: '是否支持apis',
|
|
1662
|
+
'x-group': '数据',
|
|
1663
|
+
'x-index': 120,
|
|
1664
|
+
display: false,
|
|
1665
|
+
default: true,
|
|
1666
|
+
'x-linkages': [
|
|
1667
|
+
{
|
|
1668
|
+
type: 'value:schema',
|
|
1669
|
+
target: 'dataSourceType',
|
|
1670
|
+
condition: '{{!$self.value}}',
|
|
1671
|
+
schema: {
|
|
1672
|
+
enum: [
|
|
1673
|
+
{
|
|
1674
|
+
label: '数据模型',
|
|
1675
|
+
value: 'data-model',
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
label: '表达式',
|
|
1679
|
+
value: 'expression',
|
|
1680
|
+
},
|
|
1681
|
+
],
|
|
1682
|
+
'x-component-props': {
|
|
1683
|
+
defaultValue: 'data-model',
|
|
1684
|
+
options: [
|
|
1685
|
+
{
|
|
1686
|
+
value: 'data-model',
|
|
1687
|
+
text: '数据模型',
|
|
1688
|
+
label: '数据模型',
|
|
1689
|
+
icon: 'database',
|
|
1690
|
+
isShow: true,
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
value: 'expression',
|
|
1694
|
+
text: '表达式',
|
|
1695
|
+
label: '表达式',
|
|
1696
|
+
icon: 'expression',
|
|
1697
|
+
isShow: true,
|
|
1698
|
+
},
|
|
1699
|
+
],
|
|
1700
|
+
},
|
|
1701
|
+
},
|
|
1702
|
+
},
|
|
1703
|
+
],
|
|
1704
|
+
})),
|
|
1705
|
+
supportManyRelated: Type.Optional(Type.Boolean({
|
|
1706
|
+
title: '支持v2协议',
|
|
1707
|
+
description: '标记是否支持v2协议',
|
|
1708
|
+
'x-group': '数据',
|
|
1709
|
+
'x-index': 130,
|
|
1710
|
+
display: false,
|
|
1711
|
+
default: false,
|
|
1712
|
+
'x-platforms': [''],
|
|
1713
|
+
'x-linkages': [
|
|
1714
|
+
{
|
|
1715
|
+
type: 'value:schema',
|
|
1716
|
+
schema: {
|
|
1717
|
+
type: 'object',
|
|
1718
|
+
'x-component': 'datasource-condition-where-query-editor',
|
|
1719
|
+
'x-component-props': {
|
|
1720
|
+
propertyPath: 'queryCondition',
|
|
1721
|
+
dataSourcePath: 'datasource.name',
|
|
1722
|
+
preWherePath: 'where',
|
|
1723
|
+
enableKeyIsRelation: true,
|
|
1724
|
+
},
|
|
1725
|
+
},
|
|
1726
|
+
condition: '{{ Boolean($self.value) }}',
|
|
1727
|
+
target: '*(queryCondition)',
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
type: 'value:visible',
|
|
1731
|
+
target: 'selectFieldType',
|
|
1732
|
+
condition: '{{ Boolean($self.value) }}',
|
|
1733
|
+
},
|
|
1734
|
+
],
|
|
1735
|
+
})),
|
|
1736
|
+
});
|
|
1737
|
+
export default {
|
|
1738
|
+
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
1739
|
+
data,
|
|
1513
1740
|
events: [
|
|
1514
1741
|
{
|
|
1515
1742
|
name: 'queryEmpty',
|
|
@@ -1673,5 +1900,66 @@ export default {
|
|
|
1673
1900
|
expand: true,
|
|
1674
1901
|
},
|
|
1675
1902
|
},
|
|
1903
|
+
queryGeneratorConfig: {
|
|
1904
|
+
sceneConfig: {
|
|
1905
|
+
// 当前场景
|
|
1906
|
+
scenes: ['batchSelect', 'batchDelete', 'create', 'select', 'update'],
|
|
1907
|
+
// 允许选择的场景
|
|
1908
|
+
availableScenes: ['batchSelect', 'select'],
|
|
1909
|
+
// 场景组合
|
|
1910
|
+
validCombinations: [['batchSelect'], ['batchSelect', 'select']],
|
|
1911
|
+
enableSelectMultiple: true,
|
|
1912
|
+
// 是否可见
|
|
1913
|
+
// visible: false,
|
|
1914
|
+
},
|
|
1915
|
+
fieldsConfig: {
|
|
1916
|
+
// 支持配置 format
|
|
1917
|
+
enableConfigFormat: true,
|
|
1918
|
+
// 显示字段标识的列
|
|
1919
|
+
showFieldTypeColumn: true,
|
|
1920
|
+
},
|
|
1921
|
+
apisConfig: {
|
|
1922
|
+
// 配置 record 和 total 的键值,如果为 true,返回
|
|
1923
|
+
enableConfigRecordAndTotalKey: true,
|
|
1924
|
+
},
|
|
1925
|
+
mysqlConfig: {
|
|
1926
|
+
// 自动生成查询总条数语句
|
|
1927
|
+
autoGenerateCountQuery: true,
|
|
1928
|
+
// 计数名字,表示 SELECT COUNT(*) as count FROM xxx; 的 count,如果指定countName为 abc,则输出sql SELECT COUNT(*) as abc FROM xxx;
|
|
1929
|
+
countName: 'count',
|
|
1930
|
+
},
|
|
1931
|
+
// 绑定路径配置,如果没有配置,默认就是 params,比如配置 select.condition 'params.abc',输出的 select sql为 SELECT aa FROM xxx WHERE key={{params.abc}}
|
|
1932
|
+
// 配置 create.value 'params.hello',输出的 sql 为 INSERT INTO xxx (a, b) VALUES ({{params.hello.a}}, {{params.hello.b }})
|
|
1933
|
+
bindParamsPath: {
|
|
1934
|
+
select: {
|
|
1935
|
+
condition: 'params.id',
|
|
1936
|
+
},
|
|
1937
|
+
batchSelect: {
|
|
1938
|
+
limit: '$w.{{$self.id}}.pageSize',
|
|
1939
|
+
offset: '($w.{{$self.id}}.pageNo - 1) * $w.{{$self.id}}.pageSize',
|
|
1940
|
+
},
|
|
1941
|
+
},
|
|
1942
|
+
quickOperateButton: [
|
|
1943
|
+
{
|
|
1944
|
+
icon: svg `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" t="1712908791586" class="icon" viewBox="0 0 1024 1024" version="1.1" p-id="4295" width="48" height="48"><script xmlns=""/><path d="M527.34 837.67l239.92-359.88c9.42-14.14 5.6-33.25-8.55-42.67a30.702 30.702 0 0 0-17.05-5.16H553.02V203.4c0-16.99-13.77-30.77-30.76-30.77-10.29 0-19.89 5.14-25.6 13.7L256.74 546.21c-9.42 14.14-5.6 33.24 8.54 42.67a30.744 30.744 0 0 0 17.06 5.17h188.64V820.6c0 16.99 13.77 30.77 30.76 30.77 10.29 0 19.9-5.14 25.6-13.7z" fill="#0052d9" p-id="4296"/><script xmlns="" id="bw-fido2-page-script"/><script xmlns=""/><div xmlns="" id="immersive-translate-popup" style="all: initial"/></svg>`,
|
|
1945
|
+
targetField: 'dataSourceType',
|
|
1946
|
+
content: '快速生成',
|
|
1947
|
+
},
|
|
1948
|
+
],
|
|
1949
|
+
},
|
|
1950
|
+
previewOperation: {
|
|
1951
|
+
headerIcon: svg `<svg xmlns="http://www.w3.org/2000/svg" width="49" height="48" viewBox="0 0 49 48" fill="none"><rect x="6.5" y="14" width="36" height="26" fill="#DCDCDC"/><path d="M6.5 7H42.5V13H6.5V7Z" fill="#DCDCDC"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.0244 30.9639C31.0244 31.4832 30.7697 31.9327 30.4038 32.2932C30.0397 32.6519 29.5384 32.9519 28.9594 33.1932C27.7991 33.6766 26.2308 33.9639 24.5244 33.9639C22.818 33.9639 21.2498 33.6766 20.0895 33.1932C19.5104 32.9519 19.0092 32.6519 18.645 32.2932C18.2791 31.9327 18.0244 31.4832 18.0244 30.9639V23.9639C18.0244 23.4445 18.2791 22.995 18.645 22.6346C19.0092 22.2759 19.5104 21.9758 20.0895 21.7346C21.2498 21.2511 22.818 20.9639 24.5244 20.9639C26.2308 20.9639 27.7991 21.2511 28.9594 21.7346C29.5384 21.9758 30.0397 22.2759 30.4038 22.6346C30.7697 22.995 31.0244 23.4445 31.0244 23.9639V30.9639ZM19.3468 23.3469C19.1055 23.5847 19.0244 23.7929 19.0244 23.9639C19.0244 24.1349 19.1055 24.343 19.3468 24.5808C19.5899 24.8203 19.9674 25.059 20.4741 25.2701C21.4854 25.6915 22.9171 25.9639 24.5244 25.9639C26.1318 25.9639 27.5635 25.6915 28.5747 25.2701C29.0815 25.059 29.4589 24.8203 29.702 24.5808C29.9434 24.343 30.0244 24.1349 30.0244 23.9639C30.0244 23.7929 29.9434 23.5847 29.702 23.3469C29.4589 23.1075 29.0815 22.8688 28.5747 22.6576C27.5635 22.2363 26.1318 21.9639 24.5244 21.9639C22.9171 21.9639 21.4854 22.2363 20.4741 22.6576C19.9674 22.8688 19.5899 23.1075 19.3468 23.3469ZM30.0244 25.612V27.4639C30.0244 27.6349 29.9434 27.843 29.702 28.0808C29.4589 28.3203 29.0815 28.559 28.5747 28.7701C27.5635 29.1915 26.1318 29.4639 24.5244 29.4639C22.9171 29.4639 21.4854 29.1915 20.4741 28.7701C19.9674 28.559 19.5899 28.3203 19.3468 28.0808C19.1055 27.843 19.0244 27.6349 19.0244 27.4639V25.612C19.3298 25.8335 19.6912 26.0272 20.0895 26.1932C21.2498 26.6766 22.818 26.9639 24.5244 26.9639C26.2308 26.9639 27.7991 26.6766 28.9594 26.1932C29.3576 26.0272 29.7191 25.8335 30.0244 25.612ZM30.0244 30.9639V29.112C29.7191 29.3335 29.3576 29.5272 28.9594 29.6932C27.7991 30.1766 26.2308 30.4639 24.5244 30.4639C22.818 30.4639 21.2498 30.1766 20.0895 29.6932C19.6912 29.5272 19.3298 29.3335 19.0244 29.112V30.9639C19.0244 31.1349 19.1055 31.343 19.3468 31.5808C19.5899 31.8203 19.9674 32.059 20.4741 32.2701C21.4854 32.6915 22.9171 32.9639 24.5244 32.9639C26.1318 32.9639 27.5635 32.6915 28.5747 32.2701C29.0815 32.059 29.4589 31.8203 29.702 31.5808C29.9434 31.343 30.0244 31.1349 30.0244 30.9639Z" fill="white"/></svg>`,
|
|
1952
|
+
insertSlotName: 'children',
|
|
1953
|
+
previewSlotName: 'children',
|
|
1954
|
+
operation: [
|
|
1955
|
+
{
|
|
1956
|
+
icon: svg `<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
1957
|
+
<path d="M7.66667 5.25V5.75H8.16667L12.8494 5.75L6.33333 12.7315V8.75V8.25H5.83333H1.15061L7.66667 1.26851V5.25Z" stroke="#13161B"/>
|
|
1958
|
+
</svg>`,
|
|
1959
|
+
title: '使用数据源生成列表',
|
|
1960
|
+
action: 'OPEN_GENERATE_QUERY_FORM',
|
|
1961
|
+
},
|
|
1962
|
+
],
|
|
1963
|
+
},
|
|
1676
1964
|
},
|
|
1677
1965
|
};
|