@cloudbase/weda-ui 3.14.4 → 3.15.0
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/listView.d.ts +11 -0
- package/dist/configs/components/listView.js +53 -0
- package/dist/configs/components/wd-select-multiple.d.ts +72 -28
- package/dist/configs/components/wd-select-multiple.js +233 -19
- package/dist/configs/components/wd-select.d.ts +70 -29
- package/dist/configs/components/wd-select.js +211 -17
- package/dist/configs/index.d.ts +174 -60
- package/dist/configs/type-utils/type-form.js +65 -21
- package/dist/configs/type-utils/x-runtime-default.d.ts +2 -0
- package/dist/configs/type-utils/x-runtime-default.js +4 -0
- package/dist/style/index.css +15 -0
- package/dist/style/index.scss +1 -1
- package/dist/style/weda-ui.min.css +3 -3
- package/dist/web/components/form/uploader/util.js +3 -2
- package/dist/web/components/form/uploaderFile/uploadFile.h5.js +3 -2
- package/dist/web/components/form/uploaderFile/uploadFile.pc.js +3 -2
- package/dist/web/components/listView/index.css +4 -2
- package/dist/web/components/listView/index.js +25 -43
- package/dist/web/components/richText/index.js +3 -2
- package/dist/web/components/statusContent/index.js +1 -1
- package/dist/web/components/wd-input/wd-input.js +16 -20
- package/dist/web/components/wd-select/contexts/selectContext.d.ts +15 -0
- package/dist/web/components/wd-select/contexts/selectContext.js +13 -0
- package/dist/web/components/wd-select/hooks/useChooseList.d.ts +19 -0
- package/dist/web/components/wd-select/hooks/useChooseList.js +94 -0
- package/dist/web/components/wd-select/relationSelect/enumSelect.d.ts +2 -0
- package/dist/web/components/wd-select/relationSelect/enumSelect.js +48 -0
- package/dist/web/components/wd-select/relationSelect/index.d.ts +2 -0
- package/dist/web/components/wd-select/relationSelect/index.js +19 -0
- package/dist/web/components/wd-select/relationSelect/queryParams.d.ts +15 -0
- package/dist/web/components/wd-select/relationSelect/queryParams.js +15 -0
- package/dist/web/components/wd-select/relationSelect/relationSelect.d.ts +0 -2
- package/dist/web/components/wd-select/relationSelect/relationSelect.js +39 -83
- package/dist/web/components/wd-select/select/index.js +1 -1
- package/dist/web/components/wd-select/wd-select.css +8 -0
- package/dist/web/components/wd-select/wd-select.js +11 -8
- package/dist/web/components/wd-select-multiple/wd-select-multiple.js +11 -8
- package/dist/web/components/wd-table/components/FieldRender/index.js +3 -3
- package/dist/web/components/wd-table/components/FilterFieldsPanel/filterFieldsGenerate.js +8 -13
- package/dist/web/utils/getModelParams.d.ts +6 -1
- package/dist/web/utils/getModelParams.js +16 -13
- package/dist/web/utils/tcb.d.ts +4 -0
- package/dist/web/utils/tcb.js +11 -9
- package/package.json +3 -3
|
@@ -183,6 +183,17 @@ declare const _default: {
|
|
|
183
183
|
componentType: string;
|
|
184
184
|
};
|
|
185
185
|
isContainer: boolean;
|
|
186
|
+
classes: ({
|
|
187
|
+
name: string;
|
|
188
|
+
selector: string;
|
|
189
|
+
description: string;
|
|
190
|
+
code?: undefined;
|
|
191
|
+
} | {
|
|
192
|
+
name: string;
|
|
193
|
+
selector: string;
|
|
194
|
+
description: string;
|
|
195
|
+
code: string;
|
|
196
|
+
})[];
|
|
186
197
|
meta: {
|
|
187
198
|
title: string;
|
|
188
199
|
category: string;
|
|
@@ -1789,6 +1789,59 @@ export default {
|
|
|
1789
1789
|
componentType: 'listview',
|
|
1790
1790
|
},
|
|
1791
1791
|
isContainer: true,
|
|
1792
|
+
// 样式API
|
|
1793
|
+
classes: [
|
|
1794
|
+
{
|
|
1795
|
+
name: '根元素',
|
|
1796
|
+
selector: '.wd-list-view',
|
|
1797
|
+
description: '数据列表组件根元素',
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
name: 'PC 端数据列表组件根元素',
|
|
1801
|
+
selector: '.wd-pc-list-view',
|
|
1802
|
+
description: '可以为 PC 端的数据列表编写样式',
|
|
1803
|
+
},
|
|
1804
|
+
{
|
|
1805
|
+
name: 'H5 端数据列表组件根元素',
|
|
1806
|
+
selector: '.wd-h5-list-view',
|
|
1807
|
+
description: '可以为 H5 端的数据列表编写样式',
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
name: '小程序 端数据列表组件根元素',
|
|
1811
|
+
selector: '.wd-mp-list-view',
|
|
1812
|
+
description: '可以为 小程序 端的数据列表编写样式',
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
name: '加载更多文本',
|
|
1816
|
+
selector: '.wd-list-view__more-text',
|
|
1817
|
+
description: '可以修改加载更多文本样式',
|
|
1818
|
+
code: `
|
|
1819
|
+
:scope .wd-list-view__more-text {
|
|
1820
|
+
color: lightgray;
|
|
1821
|
+
}
|
|
1822
|
+
`,
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
name: '加载到底提示文本',
|
|
1826
|
+
selector: '.wd-list-view__load-completed',
|
|
1827
|
+
description: '可以修改加载到底提示文本样式',
|
|
1828
|
+
code: `
|
|
1829
|
+
:scope .wd-list-view__load-completed {
|
|
1830
|
+
color: lightgray;
|
|
1831
|
+
}
|
|
1832
|
+
`,
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
name: '暂无数据文本',
|
|
1836
|
+
selector: '.wd-status-content__text',
|
|
1837
|
+
description: '可以修改暂无数据文本样式',
|
|
1838
|
+
code: `
|
|
1839
|
+
:scope .wd-status-content__text {
|
|
1840
|
+
color: lightgray;
|
|
1841
|
+
}
|
|
1842
|
+
`,
|
|
1843
|
+
},
|
|
1844
|
+
],
|
|
1792
1845
|
meta: {
|
|
1793
1846
|
title: '数据列表',
|
|
1794
1847
|
category: '数据容器',
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { Static } from '../type-utils';
|
|
2
2
|
import type { Simplify } from 'type-fest';
|
|
3
3
|
declare const data: import("@sinclair/typebox").TObject<{
|
|
4
|
-
enableRelationalSetting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
5
|
-
enableRelationalRefresh: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
6
|
-
enableRelationOptionJump: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
7
|
-
enableRelationTag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
8
|
-
enableAddRelationButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
9
|
-
addRelationButtonText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
4
|
suffixType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
11
5
|
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"many-many" | "one-many">>;
|
|
12
6
|
viewId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -17,6 +11,7 @@ declare const data: import("@sinclair/typebox").TObject<{
|
|
|
17
11
|
required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
18
12
|
requiredMsg: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
19
13
|
requiredFlag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
14
|
+
staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
20
15
|
extra: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
16
|
after: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
22
17
|
before: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -35,34 +30,53 @@ declare const data: import("@sinclair/typebox").TObject<{
|
|
|
35
30
|
layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
36
31
|
labelWidth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
37
32
|
labelTips: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString
|
|
33
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
34
|
+
'x-index': number;
|
|
35
|
+
}>;
|
|
39
36
|
range: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
40
37
|
label: import("@sinclair/typebox").TString;
|
|
41
38
|
value: import("@sinclair/typebox").TString;
|
|
42
39
|
disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
40
|
+
}>> & {
|
|
41
|
+
'x-index': number;
|
|
42
|
+
}>;
|
|
43
|
+
tipBlock: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
44
|
+
'x-index': number;
|
|
45
|
+
}>;
|
|
46
|
+
supportManyRelated: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
47
|
+
where: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny> & {
|
|
48
|
+
'x-index': number;
|
|
49
|
+
}>;
|
|
50
|
+
queryCondition: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
|
51
|
+
sorter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
52
|
+
orderBy: import("@sinclair/typebox").TString;
|
|
53
|
+
label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
54
|
+
orderType: import("@sinclair/typebox").TUnsafe<string>;
|
|
43
55
|
}>>>;
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString> & {
|
|
57
|
+
'x-index': number;
|
|
58
|
+
}>;
|
|
46
59
|
selectFieldType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
47
60
|
selectFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
48
|
-
|
|
49
|
-
staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
50
|
-
ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
61
|
+
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
51
62
|
placeholder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
52
63
|
default: string;
|
|
64
|
+
'x-index': number;
|
|
53
65
|
}>;
|
|
54
66
|
searchPlaceholder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
55
|
-
|
|
67
|
+
ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean & {
|
|
68
|
+
'x-index': number;
|
|
69
|
+
}>;
|
|
70
|
+
enableRelationalSetting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
71
|
+
enableRelationalRefresh: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
72
|
+
enableRelationOptionJump: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
73
|
+
enableRelationTag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
74
|
+
enableAddRelationButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
75
|
+
addRelationButtonText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
56
76
|
}>;
|
|
57
77
|
declare const config: {
|
|
58
78
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
59
79
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
60
|
-
enableRelationalSetting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
61
|
-
enableRelationalRefresh: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
62
|
-
enableRelationOptionJump: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
63
|
-
enableRelationTag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
64
|
-
enableAddRelationButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
65
|
-
addRelationButtonText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
66
80
|
suffixType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
67
81
|
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"many-many" | "one-many">>;
|
|
68
82
|
viewId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -73,6 +87,7 @@ declare const config: {
|
|
|
73
87
|
required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
74
88
|
requiredMsg: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
75
89
|
requiredFlag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
90
|
+
staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
76
91
|
extra: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
77
92
|
after: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
78
93
|
before: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -91,29 +106,58 @@ declare const config: {
|
|
|
91
106
|
layout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
92
107
|
labelWidth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
93
108
|
labelTips: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
94
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString
|
|
109
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
110
|
+
'x-index': number;
|
|
111
|
+
}>;
|
|
95
112
|
range: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
96
113
|
label: import("@sinclair/typebox").TString;
|
|
97
114
|
value: import("@sinclair/typebox").TString;
|
|
98
115
|
disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
116
|
+
}>> & {
|
|
117
|
+
'x-index': number;
|
|
118
|
+
}>;
|
|
119
|
+
tipBlock: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
120
|
+
'x-index': number;
|
|
121
|
+
}>;
|
|
122
|
+
supportManyRelated: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
123
|
+
where: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TAny> & {
|
|
124
|
+
'x-index': number;
|
|
125
|
+
}>;
|
|
126
|
+
queryCondition: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{}>>;
|
|
127
|
+
sorter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
128
|
+
orderBy: import("@sinclair/typebox").TString;
|
|
129
|
+
label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
130
|
+
orderType: import("@sinclair/typebox").TUnsafe<string>;
|
|
99
131
|
}>>>;
|
|
100
|
-
|
|
101
|
-
|
|
132
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString> & {
|
|
133
|
+
'x-index': number;
|
|
134
|
+
}>;
|
|
102
135
|
selectFieldType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
103
136
|
selectFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
104
|
-
|
|
105
|
-
staticSearchable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
106
|
-
ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
137
|
+
size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
107
138
|
placeholder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
108
139
|
default: string;
|
|
140
|
+
'x-index': number;
|
|
109
141
|
}>;
|
|
110
142
|
searchPlaceholder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
111
|
-
|
|
143
|
+
ignoreCase: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean & {
|
|
144
|
+
'x-index': number;
|
|
145
|
+
}>;
|
|
146
|
+
enableRelationalSetting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
147
|
+
enableRelationalRefresh: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
148
|
+
enableRelationOptionJump: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
149
|
+
enableRelationTag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
150
|
+
enableAddRelationButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
151
|
+
addRelationButtonText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
112
152
|
}>;
|
|
113
153
|
readonly properties: import("@sinclair/typebox").TObject<{
|
|
114
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString
|
|
154
|
+
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString & {
|
|
155
|
+
'x-index': number;
|
|
156
|
+
}>;
|
|
115
157
|
label: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
116
|
-
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString
|
|
158
|
+
value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString> & {
|
|
159
|
+
'x-index': number;
|
|
160
|
+
}>;
|
|
117
161
|
required: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
118
162
|
disabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
119
163
|
visible: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
@@ -2,6 +2,7 @@ import { defineConfig, Type, Tuple } from '../type-utils';
|
|
|
2
2
|
import { FORM_ITEM_DATA, FORM_ITEM_METHODS, FORM_ITEM_META, ItemData, pickWithXCategory, X_CATEGORY, getFormItemDataTitle, } from '../type-utils/type-form';
|
|
3
3
|
import { getClasses } from '../type-utils/classes';
|
|
4
4
|
import { templateInitNameWithId } from './common/init-name-with-id';
|
|
5
|
+
import { MULTIPLE_FOREIGN_FORMATS } from '../type-utils/x-runtime-default';
|
|
5
6
|
const SELECT = pickWithXCategory(FORM_ITEM_DATA, [
|
|
6
7
|
'clearable',
|
|
7
8
|
'before',
|
|
@@ -19,37 +20,230 @@ const TITLE = getFormItemDataTitle('下拉多选');
|
|
|
19
20
|
// 属性类型定义
|
|
20
21
|
const data = Type.Partial(Type.Object({
|
|
21
22
|
// 通用
|
|
22
|
-
name: FORM_ITEM_DATA.name,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
name: Object.assign({}, FORM_ITEM_DATA.name, { 'x-index': 1 }),
|
|
24
|
+
// label: x-index:11
|
|
25
|
+
range: Object.assign({}, FORM_ITEM_DATA.range, { 'x-index': 12 }),
|
|
26
|
+
tipBlock: Object.assign({}, FORM_ITEM_DATA.tipBlock, { 'x-index': 13 }),
|
|
27
|
+
supportManyRelated: Type.Boolean({
|
|
28
|
+
title: '升级筛选器',
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
default: false,
|
|
31
|
+
'x-props': { 'data-hidebind': true },
|
|
32
|
+
'x-index': 14,
|
|
33
|
+
'x-category': X_CATEGORY.COMMON,
|
|
34
|
+
description: '开启后,筛选器支持自定义筛选条件',
|
|
35
|
+
'x-linkages': [
|
|
36
|
+
{
|
|
37
|
+
type: 'value:visible',
|
|
38
|
+
target: 'queryCondition',
|
|
39
|
+
condition: `{{Boolean($self.value)&&${MULTIPLE_FOREIGN_FORMATS('$form.values.format')}}}`,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'value:visible',
|
|
43
|
+
target: 'where',
|
|
44
|
+
condition: `{{!Boolean($self.value)&&${MULTIPLE_FOREIGN_FORMATS('$form.values.format')}}}`,
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
where: Object.assign({}, FORM_ITEM_DATA.where, {
|
|
49
|
+
'x-index': 15,
|
|
50
|
+
}),
|
|
51
|
+
queryCondition: Type.Object({}, {
|
|
52
|
+
title: '数据筛选',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
default: true,
|
|
55
|
+
'x-index': 16,
|
|
56
|
+
'x-category': X_CATEGORY.COMMON,
|
|
57
|
+
'x-component': 'datasource-condition-where-query-editor',
|
|
58
|
+
'x-component-props': {
|
|
59
|
+
propertyPath: 'queryCondition',
|
|
60
|
+
dataSourcePath: 'dataSourceName',
|
|
61
|
+
preWherePath: 'where',
|
|
62
|
+
enableKeyIsRelation: true,
|
|
63
|
+
},
|
|
64
|
+
'x-props': {
|
|
65
|
+
'data-hidebind': false,
|
|
66
|
+
'data-hideBindValue': true,
|
|
67
|
+
'data-withBindMeta': true,
|
|
68
|
+
},
|
|
69
|
+
description: '对数据进行筛选过滤',
|
|
70
|
+
'x-helper-text': '点击fx支持编辑数据筛选表达式 [查看格式](https://docs.cloudbase.net/lowcode/manage/datasource-v2#%E6%9F%A5%E8%AF%A2wedagetitemv2)',
|
|
71
|
+
}),
|
|
72
|
+
// 支持多字段筛选
|
|
73
|
+
sorter: Type.Optional(Type.Array(Type.Object({
|
|
74
|
+
orderBy: Type.String({
|
|
75
|
+
title: '排序字段',
|
|
76
|
+
default: '',
|
|
77
|
+
'x-props': {
|
|
78
|
+
clearable: true,
|
|
79
|
+
},
|
|
80
|
+
}),
|
|
81
|
+
label: Type.Optional(Type.String({
|
|
82
|
+
title: '排序字段名称',
|
|
83
|
+
})),
|
|
84
|
+
orderType: Type.StringEnum({
|
|
85
|
+
title: '排序方式',
|
|
86
|
+
type: 'string',
|
|
87
|
+
enum: [
|
|
88
|
+
{
|
|
89
|
+
label: '升序',
|
|
90
|
+
value: 'asc',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: '降序',
|
|
94
|
+
value: 'desc',
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
'x-props': {
|
|
98
|
+
clearable: true,
|
|
99
|
+
},
|
|
100
|
+
}),
|
|
101
|
+
}, {
|
|
102
|
+
title: 'tabs',
|
|
103
|
+
default: {
|
|
104
|
+
orderBy: '',
|
|
105
|
+
orderType: '',
|
|
106
|
+
},
|
|
107
|
+
}), {
|
|
108
|
+
title: '数据排序',
|
|
109
|
+
'x-index': 17,
|
|
110
|
+
'x-component': 'list',
|
|
111
|
+
'x-component-props': {
|
|
112
|
+
label_add: '添加排序规则',
|
|
113
|
+
},
|
|
114
|
+
'x-category': X_CATEGORY.COMMON,
|
|
115
|
+
'x-props': {
|
|
116
|
+
'data-withBindMeta': true,
|
|
117
|
+
},
|
|
118
|
+
'x-linkages': [
|
|
119
|
+
{
|
|
120
|
+
type: 'value:schema',
|
|
121
|
+
condition: '{{ Boolean($form?.values?.dataSourceName) }}',
|
|
122
|
+
target: 'sorter',
|
|
123
|
+
schema: {
|
|
124
|
+
items: {
|
|
125
|
+
path: 'sorter.*',
|
|
126
|
+
type: 'object',
|
|
127
|
+
default: {
|
|
128
|
+
orderBy: '',
|
|
129
|
+
orderType: 'asc',
|
|
130
|
+
label: '',
|
|
131
|
+
},
|
|
132
|
+
'x-display': "(!this.orderBy)?'请选择排序字段':(this.label||this.orderBy)+'-'+(({desc:'降序',asc:'升序'})[this.orderType]||'')",
|
|
133
|
+
properties: {
|
|
134
|
+
orderBy: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
title: '排序字段',
|
|
137
|
+
'x-option': '{{getDataSourceValueOptions($form?.values?.dataSourceName, undefined, true)}}',
|
|
138
|
+
'x-sorter': '{{$form?.values.sorter}}',
|
|
139
|
+
'x-linkages': [
|
|
140
|
+
{
|
|
141
|
+
type: 'value:state',
|
|
142
|
+
target: 'dataForm.label',
|
|
143
|
+
condition: '{{ Boolean($self.value)}}',
|
|
144
|
+
state: {
|
|
145
|
+
value: '{{$self.props["x-option"].find(i=>i.value===$self.value)?.label}}',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'value:schema',
|
|
150
|
+
target: 'dataForm.orderBy',
|
|
151
|
+
schema: {
|
|
152
|
+
enum: '{{$self.props["x-option"].filter(i=>i.value===$self.value||!$self.props["x-sorter"].find(j=>j.orderBy===i.value))}}',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
label: Type.Optional(Type.String({
|
|
158
|
+
type: 'string',
|
|
159
|
+
title: '排序字段名称',
|
|
160
|
+
display: false,
|
|
161
|
+
})),
|
|
162
|
+
orderType: Type.StringEnum({
|
|
163
|
+
title: '排序方式',
|
|
164
|
+
type: 'string',
|
|
165
|
+
'x-component': 'radio',
|
|
166
|
+
enum: [
|
|
167
|
+
{
|
|
168
|
+
label: '升序',
|
|
169
|
+
value: 'asc',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
label: '降序',
|
|
173
|
+
value: 'desc',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
'x-props': {
|
|
177
|
+
clearable: true,
|
|
178
|
+
},
|
|
179
|
+
}),
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
type: 'value:schema',
|
|
186
|
+
condition: '{{$self.value?.length>2}}',
|
|
187
|
+
target: 'sorter',
|
|
188
|
+
schema: {
|
|
189
|
+
'x-component-props': {
|
|
190
|
+
label_add: '添加排序规则',
|
|
191
|
+
addDisabledTip: '最多添加3个排序规则,请先删减已有规则',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'value:schema',
|
|
197
|
+
condition: '{{$self.value?.length<3}}',
|
|
198
|
+
target: 'sorter',
|
|
199
|
+
schema: {
|
|
200
|
+
'x-component-props': {
|
|
201
|
+
label_add: '添加排序规则',
|
|
202
|
+
addDisabledTip: '',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
default: [
|
|
208
|
+
{
|
|
209
|
+
orderBy: 'updatedAt',
|
|
210
|
+
orderType: 'desc',
|
|
211
|
+
label: '更新时间',
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
description: '可设置数据排序规则,支持拖拽调整排序优先级,数组下标越小优先级越高。绑定数据示例:[{"orderBy":"updatedAt","orderType":"desc"}],升序传值asc,降序传值desc',
|
|
215
|
+
})),
|
|
216
|
+
value: Object.assign({}, FORM_ITEM_DATA._valueInSelectMultiple, {
|
|
217
|
+
'x-index': 18,
|
|
218
|
+
}),
|
|
26
219
|
selectFieldType: FORM_ITEM_DATA.selectFieldType,
|
|
27
220
|
selectFields: FORM_ITEM_DATA.selectFields,
|
|
28
|
-
|
|
29
|
-
staticSearchable: FORM_ITEM_DATA.staticSearchable,
|
|
30
|
-
ignoreCase: FORM_ITEM_DATA.ignoreCase,
|
|
221
|
+
size: FORM_ITEM_DATA.size,
|
|
31
222
|
placeholder: Object.assign({}, FORM_ITEM_DATA.placeholder, {
|
|
32
223
|
default: '请选择',
|
|
224
|
+
'x-index': 41,
|
|
33
225
|
}),
|
|
34
226
|
searchPlaceholder: Type.String({
|
|
35
227
|
title: '搜索框占位文字',
|
|
36
228
|
type: 'string',
|
|
37
229
|
default: '搜索选项',
|
|
38
|
-
'x-index':
|
|
230
|
+
'x-index': 42,
|
|
39
231
|
'x-category': X_CATEGORY.COMMON,
|
|
40
232
|
'x-helper-text': 'PC/H5端生效',
|
|
41
233
|
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// 选择框
|
|
46
|
-
...SELECT,
|
|
234
|
+
ignoreCase: Object.assign({}, FORM_ITEM_DATA.ignoreCase, {
|
|
235
|
+
'x-index': 43,
|
|
236
|
+
}),
|
|
47
237
|
enableRelationalSetting: FORM_ITEM_DATA.enableRelationalSetting,
|
|
48
238
|
enableRelationalRefresh: FORM_ITEM_DATA.enableRelationalRefresh,
|
|
49
239
|
enableRelationOptionJump: FORM_ITEM_DATA.enableRelationOptionJump,
|
|
50
240
|
enableRelationTag: FORM_ITEM_DATA.enableRelationTag,
|
|
51
241
|
enableAddRelationButton: FORM_ITEM_DATA.enableAddRelationButton,
|
|
52
242
|
addRelationButtonText: FORM_ITEM_DATA.addRelationButtonText,
|
|
243
|
+
// 标题
|
|
244
|
+
...TITLE,
|
|
245
|
+
// 选择框
|
|
246
|
+
...SELECT,
|
|
53
247
|
suffixType: FORM_ITEM_DATA._suffixTypeInSelect,
|
|
54
248
|
format: Type.StringEnum({
|
|
55
249
|
type: 'string',
|
|
@@ -62,22 +256,40 @@ const data = Type.Partial(Type.Object({
|
|
|
62
256
|
'x-linkages': [
|
|
63
257
|
{
|
|
64
258
|
type: 'value:visible',
|
|
65
|
-
target: '*(range
|
|
66
|
-
condition:
|
|
259
|
+
target: '*(range)',
|
|
260
|
+
condition: `{{!${MULTIPLE_FOREIGN_FORMATS('$self.value', true)}}}`,
|
|
67
261
|
},
|
|
68
262
|
{
|
|
69
263
|
type: 'value:visible',
|
|
70
|
-
target: '*(selectFieldType,tipBlock,
|
|
71
|
-
condition:
|
|
264
|
+
target: '*(selectFieldType,tipBlock,enableRelationalSetting,enableRelationalRefresh,enableAddRelationButton,enableRelationOptionJump,sorter,ignoreCase)',
|
|
265
|
+
condition: `{{${MULTIPLE_FOREIGN_FORMATS()}}}`,
|
|
72
266
|
},
|
|
73
267
|
{
|
|
74
268
|
type: 'value:visible',
|
|
75
269
|
target: '*(enableRelationTag)',
|
|
76
|
-
condition:
|
|
270
|
+
condition: `{{${MULTIPLE_FOREIGN_FORMATS('$self.value', true)}}}`,
|
|
271
|
+
},
|
|
272
|
+
// where: 升级v2协议前的筛选器
|
|
273
|
+
// queryCondition: 升级v2协议后的筛选器
|
|
274
|
+
// supportManyRelated 用来辅助用户主动升级筛选器
|
|
275
|
+
// 默认未配置where时,直接升级成queryCondition,如果配置了where,则展示升级开关,又用户自主升级
|
|
276
|
+
{
|
|
277
|
+
type: 'value:state',
|
|
278
|
+
target: 'supportManyRelated',
|
|
279
|
+
condition: `{{Boolean($form.values.where)&&${MULTIPLE_FOREIGN_FORMATS()}}}`,
|
|
280
|
+
state: {
|
|
281
|
+
display: true,
|
|
282
|
+
value: false,
|
|
283
|
+
},
|
|
284
|
+
otherwise: {
|
|
285
|
+
display: false,
|
|
286
|
+
value: true,
|
|
287
|
+
},
|
|
77
288
|
},
|
|
78
289
|
],
|
|
79
290
|
'x-category': X_CATEGORY.COMMON,
|
|
80
|
-
'x-index':
|
|
291
|
+
'x-index': 44,
|
|
292
|
+
display: false,
|
|
81
293
|
'x-platforms': [''],
|
|
82
294
|
}),
|
|
83
295
|
viewId: FORM_ITEM_DATA.viewId,
|
|
@@ -89,6 +301,8 @@ const data = Type.Partial(Type.Object({
|
|
|
89
301
|
required: FORM_ITEM_DATA.required,
|
|
90
302
|
requiredMsg: FORM_ITEM_DATA.requiredMsg,
|
|
91
303
|
requiredFlag: FORM_ITEM_DATA.requiredFlag,
|
|
304
|
+
// 已废弃属性
|
|
305
|
+
staticSearchable: FORM_ITEM_DATA.staticSearchable,
|
|
92
306
|
}));
|
|
93
307
|
const properties = Type.Composite([
|
|
94
308
|
Type.Pick(data, ['name', 'label', 'value', 'required', 'before', 'after']),
|