cnhis-design-vue 3.1.8-beta.8 → 3.1.9-beta.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/README.md +22 -22
- package/es/packages/big-table/style/index.less +557 -557
- package/es/packages/bpmn-workflow/style/index.less +29 -29
- package/es/packages/button-print/style/index.less +30 -30
- package/es/packages/chunk-upload/src/chunk-upload-new.vue.d.ts +6 -4
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +3 -0
- package/es/packages/chunk-upload/style/index.less +394 -394
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +8 -5
- package/es/packages/drag-layout/style/index.less +208 -208
- package/es/packages/field-set/style/index.less +157 -157
- package/es/packages/form-render/index.d.ts +14 -0
- package/es/packages/form-render/src/FormRender.vue.d.ts +14 -0
- package/es/packages/form-render/src/FormRender.vue_vue_type_script_setup_true_lang.mjs +12 -4
- package/es/packages/form-render/src/components/complex.d.ts +13 -0
- package/es/packages/form-render/src/components/complex.mjs +31 -0
- package/es/packages/form-render/src/components/index.d.ts +1 -0
- package/es/packages/form-render/src/components/index.mjs +1 -0
- package/es/packages/form-render/src/hooks/useFieldList2Schema.mjs +10 -1
- package/es/packages/form-render/src/types/fieldItem.d.ts +2 -0
- package/es/packages/form-render/style/index.css +8 -0
- package/es/packages/form-render/style/index.less +8 -0
- package/es/packages/form-table/style/index.less +301 -301
- package/es/packages/grid/style/index.less +12 -12
- package/es/packages/index.css +8 -0
- package/es/packages/index.less +2953 -2945
- package/es/packages/info-header/style/index.less +153 -153
- package/es/packages/map/style/index.less +59 -59
- package/es/packages/scale-view/style/index.less +748 -748
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +3 -0
- package/es/packages/select-label/style/index.less +151 -151
- package/es/packages/select-person/src/SelectPerson.vue.d.ts +6 -8
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs +43 -18
- package/es/packages/select-person/src/utils/index.mjs +15 -2
- package/es/packages/select-person/style/index.less +229 -229
- package/es/packages/time-line/style/index.less +34 -34
- package/global.d.ts +8 -8
- package/package.json +1 -1
- package/yarn-error.log +103 -8659
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
.c-field-set {
|
|
2
|
-
ul {
|
|
3
|
-
margin: 0;
|
|
4
|
-
padding: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.fields-set-content {
|
|
8
|
-
height: 100%;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
.fields-table {
|
|
13
|
-
flex: 1;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
overflow: auto;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
height: 100%;
|
|
21
|
-
position: relative;
|
|
22
|
-
.n-spin-container {
|
|
23
|
-
width: 100%;
|
|
24
|
-
height: 100%;
|
|
25
|
-
}
|
|
26
|
-
.n-spin-content {
|
|
27
|
-
height: 100%;
|
|
28
|
-
}
|
|
29
|
-
.setting-title {
|
|
30
|
-
background: #f2f2f4;
|
|
31
|
-
border: 1px solid #f2f2f2;
|
|
32
|
-
height: 52px;
|
|
33
|
-
line-height: 52px;
|
|
34
|
-
span {
|
|
35
|
-
display: inline-block;
|
|
36
|
-
}
|
|
37
|
-
&.seting-title-api {
|
|
38
|
-
.width-large {
|
|
39
|
-
width: 15%;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
.set-show {
|
|
44
|
-
min-height: 100px;
|
|
45
|
-
overflow-y: auto;
|
|
46
|
-
&.set-show-api {
|
|
47
|
-
.width-large {
|
|
48
|
-
width: 15%;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.left-style.sortable-chosen {
|
|
53
|
-
background: #fafafa;
|
|
54
|
-
box-shadow: 0px 0px 10px 0px #d5d5d5;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
li {
|
|
58
|
-
padding: 5px 0;
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
border-bottom: 1px solid #e8e8e8;
|
|
62
|
-
height: 52px;
|
|
63
|
-
line-height: 52px;
|
|
64
|
-
}
|
|
65
|
-
.alias-style {
|
|
66
|
-
outline: none;
|
|
67
|
-
border-radius: 4px 4px 4px 4px;
|
|
68
|
-
border: solid 1px #d5d5d5;
|
|
69
|
-
height: 32px;
|
|
70
|
-
text-indent: 16px;
|
|
71
|
-
color: #38454f;
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
.is-sort-style {
|
|
75
|
-
outline: none;
|
|
76
|
-
border-radius: 4px 4px 4px 4px;
|
|
77
|
-
border: solid 1px #d5d5d5;
|
|
78
|
-
height: 32px;
|
|
79
|
-
text-indent: 6px;
|
|
80
|
-
color: #38454f;
|
|
81
|
-
width: 87px;
|
|
82
|
-
margin-right: 5px;
|
|
83
|
-
&:disabled {
|
|
84
|
-
cursor: not-allowed;
|
|
85
|
-
background: #f5f5f5;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
.col-width-style {
|
|
89
|
-
width: 70px;
|
|
90
|
-
}
|
|
91
|
-
.title-item {
|
|
92
|
-
display: inline-flex;
|
|
93
|
-
justify-content: flex-start;
|
|
94
|
-
align-items: center;
|
|
95
|
-
text-align: left;
|
|
96
|
-
> span {
|
|
97
|
-
display: inline-block;
|
|
98
|
-
max-width: calc(100% - 20px);
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
white-space: nowrap;
|
|
101
|
-
text-overflow: ellipsis;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
.alias-style {
|
|
106
|
-
outline: none;
|
|
107
|
-
border-radius: 4px 4px 4px 4px;
|
|
108
|
-
border: solid 1px rgba(212, 222, 229, 1);
|
|
109
|
-
height: 32px;
|
|
110
|
-
text-indent: 16px;
|
|
111
|
-
color: #38454f;
|
|
112
|
-
}
|
|
113
|
-
.btn-operate {
|
|
114
|
-
border-top: 1px solid #d5d5d5;
|
|
115
|
-
padding: 12px 0 12px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.width-show {
|
|
119
|
-
display: inline-block;
|
|
120
|
-
width: 10%;
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
white-space: nowrap;
|
|
123
|
-
text-overflow: ellipsis;
|
|
124
|
-
}
|
|
125
|
-
.drag-icon-wrap {
|
|
126
|
-
width: 5% !important;
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
text-align: center;
|
|
129
|
-
}
|
|
130
|
-
.width-showed {
|
|
131
|
-
display: inline-block;
|
|
132
|
-
width: 15%;
|
|
133
|
-
overflow: hidden;
|
|
134
|
-
white-space: nowrap;
|
|
135
|
-
text-overflow: ellipsis;
|
|
136
|
-
select {
|
|
137
|
-
width: 90% !important;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
.width-word {
|
|
141
|
-
display: inline-block;
|
|
142
|
-
width: 20%;
|
|
143
|
-
line-height: 52px;
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
white-space: nowrap;
|
|
146
|
-
input {
|
|
147
|
-
width: 90% !important;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
.width-large {
|
|
151
|
-
display: inline-block;
|
|
152
|
-
width: 20%;
|
|
153
|
-
overflow: hidden;
|
|
154
|
-
white-space: nowrap;
|
|
155
|
-
text-overflow: ellipsis;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
1
|
+
.c-field-set {
|
|
2
|
+
ul {
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.fields-set-content {
|
|
8
|
+
height: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
.fields-table {
|
|
13
|
+
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
overflow: auto;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
height: 100%;
|
|
21
|
+
position: relative;
|
|
22
|
+
.n-spin-container {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
.n-spin-content {
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
.setting-title {
|
|
30
|
+
background: #f2f2f4;
|
|
31
|
+
border: 1px solid #f2f2f2;
|
|
32
|
+
height: 52px;
|
|
33
|
+
line-height: 52px;
|
|
34
|
+
span {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
}
|
|
37
|
+
&.seting-title-api {
|
|
38
|
+
.width-large {
|
|
39
|
+
width: 15%;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
.set-show {
|
|
44
|
+
min-height: 100px;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
&.set-show-api {
|
|
47
|
+
.width-large {
|
|
48
|
+
width: 15%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.left-style.sortable-chosen {
|
|
53
|
+
background: #fafafa;
|
|
54
|
+
box-shadow: 0px 0px 10px 0px #d5d5d5;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
li {
|
|
58
|
+
padding: 5px 0;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
border-bottom: 1px solid #e8e8e8;
|
|
62
|
+
height: 52px;
|
|
63
|
+
line-height: 52px;
|
|
64
|
+
}
|
|
65
|
+
.alias-style {
|
|
66
|
+
outline: none;
|
|
67
|
+
border-radius: 4px 4px 4px 4px;
|
|
68
|
+
border: solid 1px #d5d5d5;
|
|
69
|
+
height: 32px;
|
|
70
|
+
text-indent: 16px;
|
|
71
|
+
color: #38454f;
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
.is-sort-style {
|
|
75
|
+
outline: none;
|
|
76
|
+
border-radius: 4px 4px 4px 4px;
|
|
77
|
+
border: solid 1px #d5d5d5;
|
|
78
|
+
height: 32px;
|
|
79
|
+
text-indent: 6px;
|
|
80
|
+
color: #38454f;
|
|
81
|
+
width: 87px;
|
|
82
|
+
margin-right: 5px;
|
|
83
|
+
&:disabled {
|
|
84
|
+
cursor: not-allowed;
|
|
85
|
+
background: #f5f5f5;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
.col-width-style {
|
|
89
|
+
width: 70px;
|
|
90
|
+
}
|
|
91
|
+
.title-item {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
justify-content: flex-start;
|
|
94
|
+
align-items: center;
|
|
95
|
+
text-align: left;
|
|
96
|
+
> span {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
max-width: calc(100% - 20px);
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
.alias-style {
|
|
106
|
+
outline: none;
|
|
107
|
+
border-radius: 4px 4px 4px 4px;
|
|
108
|
+
border: solid 1px rgba(212, 222, 229, 1);
|
|
109
|
+
height: 32px;
|
|
110
|
+
text-indent: 16px;
|
|
111
|
+
color: #38454f;
|
|
112
|
+
}
|
|
113
|
+
.btn-operate {
|
|
114
|
+
border-top: 1px solid #d5d5d5;
|
|
115
|
+
padding: 12px 0 12px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.width-show {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
width: 10%;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
text-overflow: ellipsis;
|
|
124
|
+
}
|
|
125
|
+
.drag-icon-wrap {
|
|
126
|
+
width: 5% !important;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
text-align: center;
|
|
129
|
+
}
|
|
130
|
+
.width-showed {
|
|
131
|
+
display: inline-block;
|
|
132
|
+
width: 15%;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
text-overflow: ellipsis;
|
|
136
|
+
select {
|
|
137
|
+
width: 90% !important;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
.width-word {
|
|
141
|
+
display: inline-block;
|
|
142
|
+
width: 20%;
|
|
143
|
+
line-height: 52px;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
input {
|
|
147
|
+
width: 90% !important;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.width-large {
|
|
151
|
+
display: inline-block;
|
|
152
|
+
width: 20%;
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
white-space: nowrap;
|
|
155
|
+
text-overflow: ellipsis;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -87,6 +87,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
87
87
|
type: import("vue").PropType<import("cnhis-design-vue/es/src/types").AnyObject>;
|
|
88
88
|
default: () => {};
|
|
89
89
|
};
|
|
90
|
+
consumer: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
90
94
|
}, {
|
|
91
95
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
92
96
|
fieldList: {
|
|
@@ -174,6 +178,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
174
178
|
type: import("vue").PropType<import("cnhis-design-vue/es/src/types").AnyObject>;
|
|
175
179
|
default: () => {};
|
|
176
180
|
};
|
|
181
|
+
consumer: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
177
185
|
}>> & {
|
|
178
186
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
179
187
|
}>>;
|
|
@@ -304,6 +312,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
304
312
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
305
313
|
form: any;
|
|
306
314
|
}>;
|
|
315
|
+
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
307
316
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
308
317
|
fieldList: {
|
|
309
318
|
type: import("vue").PropType<import("./src/types").FieldItem[]>;
|
|
@@ -390,6 +399,10 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
390
399
|
type: import("vue").PropType<import("cnhis-design-vue/es/src/types").AnyObject>;
|
|
391
400
|
default: () => {};
|
|
392
401
|
};
|
|
402
|
+
consumer: {
|
|
403
|
+
type: BooleanConstructor;
|
|
404
|
+
default: boolean;
|
|
405
|
+
};
|
|
393
406
|
}>> & {
|
|
394
407
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
395
408
|
}, {
|
|
@@ -398,5 +411,6 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
398
411
|
initialData: import("cnhis-design-vue/es/src/types").AnyObject;
|
|
399
412
|
parallelism: number;
|
|
400
413
|
scope: import("cnhis-design-vue/es/src/types").AnyObject;
|
|
414
|
+
consumer: boolean;
|
|
401
415
|
}>>;
|
|
402
416
|
export default FormRender;
|
|
@@ -87,6 +87,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
87
|
type: PropType<AnyObject>;
|
|
88
88
|
default: () => {};
|
|
89
89
|
};
|
|
90
|
+
consumer: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
90
94
|
}, {
|
|
91
95
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
92
96
|
fieldList: {
|
|
@@ -174,6 +178,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
174
178
|
type: PropType<AnyObject>;
|
|
175
179
|
default: () => {};
|
|
176
180
|
};
|
|
181
|
+
consumer: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
177
185
|
}>> & {
|
|
178
186
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
179
187
|
}>>;
|
|
@@ -304,6 +312,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
304
312
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
305
313
|
form: any;
|
|
306
314
|
}>;
|
|
315
|
+
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
307
316
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
308
317
|
fieldList: {
|
|
309
318
|
type: PropType<FieldItem[]>;
|
|
@@ -390,6 +399,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
390
399
|
type: PropType<AnyObject>;
|
|
391
400
|
default: () => {};
|
|
392
401
|
};
|
|
402
|
+
consumer: {
|
|
403
|
+
type: BooleanConstructor;
|
|
404
|
+
default: boolean;
|
|
405
|
+
};
|
|
393
406
|
}>> & {
|
|
394
407
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
395
408
|
}, {
|
|
@@ -398,5 +411,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
398
411
|
initialData: AnyObject;
|
|
399
412
|
parallelism: number;
|
|
400
413
|
scope: AnyObject;
|
|
414
|
+
consumer: boolean;
|
|
401
415
|
}>;
|
|
402
416
|
export default _default;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, createVNode, unref, withCtx, renderSlot } from 'vue';
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, createVNode, unref, withCtx, renderSlot, createBlock, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
2
|
import { injectOrProvide } from './utils/index.mjs';
|
|
3
3
|
import { cloneDeep } from 'lodash-es';
|
|
4
4
|
import { InjectionBusinessCollector, InjectAsyncQueue, InjectionSchemaField } from './constants/index.mjs';
|
|
5
5
|
import * as index from './components/index.mjs';
|
|
6
6
|
import { createForm, onFieldValueChange } from '@formily/core';
|
|
7
|
-
import { FormProvider, createSchemaField } from '@formily/vue';
|
|
7
|
+
import { FormProvider, FormConsumer, createSchemaField } from '@formily/vue';
|
|
8
8
|
import { useBusinessBinding } from './hooks/useBusinessBinding.mjs';
|
|
9
9
|
import { useAsyncQueue } from './hooks/useAsyncQueue.mjs';
|
|
10
10
|
import { useFieldVisitor } from './hooks/useFieldVisitor.mjs';
|
|
11
11
|
import { useFieldList2Schema } from './hooks/useFieldList2Schema.mjs';
|
|
12
12
|
|
|
13
|
+
const _hoisted_1 = { style: { "white-space": "pre" } };
|
|
13
14
|
var script = /* @__PURE__ */ defineComponent({
|
|
14
15
|
__name: "FormRender",
|
|
15
16
|
props: {
|
|
@@ -23,7 +24,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
23
24
|
type: Object,
|
|
24
25
|
default: () => ({})
|
|
25
26
|
},
|
|
26
|
-
scope: { type: Object, default: () => ({}) }
|
|
27
|
+
scope: { type: Object, default: () => ({}) },
|
|
28
|
+
consumer: { type: Boolean, default: false }
|
|
27
29
|
},
|
|
28
30
|
emits: [
|
|
29
31
|
"formChange"
|
|
@@ -81,7 +83,13 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
81
83
|
default: withCtx(() => [
|
|
82
84
|
renderSlot(_ctx.$slots, "default", { schemaFiled: unref(SchemaField) }, () => [
|
|
83
85
|
createVNode(unref(SchemaField), { schema: unref(renderSchema) }, null, 8, ["schema"])
|
|
84
|
-
])
|
|
86
|
+
]),
|
|
87
|
+
__props.consumer ? (openBlock(), createBlock(unref(FormConsumer), { key: 0 }, {
|
|
88
|
+
default: withCtx(({ form }) => [
|
|
89
|
+
createElementVNode("div", _hoisted_1, toDisplayString(JSON.stringify(form.values, null, 2)), 1)
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
})) : createCommentVNode("v-if", true)
|
|
85
93
|
]),
|
|
86
94
|
_: 3
|
|
87
95
|
}, 8, ["form"])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const COMPLEX: import("vue").DefineComponent<{
|
|
2
|
+
span: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
span: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
}>>, {
|
|
12
|
+
span: number;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { connect, mapProps } from '@formily/vue';
|
|
3
|
+
import { assignUpdateValue } from 'cnhis-design-vue/es/packages/form-render/src/utils';
|
|
4
|
+
|
|
5
|
+
const script = defineComponent({
|
|
6
|
+
props: {
|
|
7
|
+
span: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: 6
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
setup(props, {
|
|
13
|
+
slots,
|
|
14
|
+
attrs
|
|
15
|
+
}) {
|
|
16
|
+
function onChange(e) {
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
}
|
|
19
|
+
return () => {
|
|
20
|
+
return createVNode("section", {
|
|
21
|
+
"class": "form-render__complex"
|
|
22
|
+
}, [createVNode("section", {
|
|
23
|
+
"class": "form-render__complexContent",
|
|
24
|
+
"onChange": onChange
|
|
25
|
+
}, [slots.default && slots.default()])]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const COMPLEX = connect(script, mapProps(assignUpdateValue));
|
|
30
|
+
|
|
31
|
+
export { COMPLEX };
|
|
@@ -109,6 +109,7 @@ function useFieldList2Schema(collector) {
|
|
|
109
109
|
};
|
|
110
110
|
const createCustomSchema = (item) => {
|
|
111
111
|
const schema = createStandardSchema(item);
|
|
112
|
+
item.fieldType && (schema.type = item.fieldType);
|
|
112
113
|
Object.assign(schema["x-component-props"], {
|
|
113
114
|
fieldItem: item
|
|
114
115
|
});
|
|
@@ -126,6 +127,13 @@ function useFieldList2Schema(collector) {
|
|
|
126
127
|
}
|
|
127
128
|
};
|
|
128
129
|
};
|
|
130
|
+
const createComplexSchema = (item) => {
|
|
131
|
+
const schema = createStandardSchema(item);
|
|
132
|
+
const properties = Array.isArray(item.properties) ? transform(item.properties) : {};
|
|
133
|
+
schema.type = item.fieldType || "void";
|
|
134
|
+
schema.properties = properties;
|
|
135
|
+
return schema;
|
|
136
|
+
};
|
|
129
137
|
const creatorMap = /* @__PURE__ */ new Map([
|
|
130
138
|
["LINEBAR", createCollapseSchema],
|
|
131
139
|
["INPUT", createInputSchema],
|
|
@@ -137,7 +145,8 @@ function useFieldList2Schema(collector) {
|
|
|
137
145
|
["RADIO", createRadioSchema],
|
|
138
146
|
["CHECKBOX", createRadioSchema],
|
|
139
147
|
["SWITCH", createSwitchSchema],
|
|
140
|
-
["SLIDER", createSliderSchema]
|
|
148
|
+
["SLIDER", createSliderSchema],
|
|
149
|
+
["COMPLEX", createComplexSchema]
|
|
141
150
|
]);
|
|
142
151
|
const createWidgetSchema = (item) => {
|
|
143
152
|
if (item.suffixConfig)
|
|
@@ -40,6 +40,8 @@ export declare type FieldItem = {
|
|
|
40
40
|
wordbook?: AnyObject;
|
|
41
41
|
suFieldList?: any[];
|
|
42
42
|
bindEventSetting?: Ievent[];
|
|
43
|
+
fieldType: 'string' | 'object' | 'array' | 'number' | 'void' | 'boolean' | 'datetime';
|
|
44
|
+
properties: FieldItem[];
|
|
43
45
|
[key: string]: any;
|
|
44
46
|
}>;
|
|
45
47
|
export {};
|
|
@@ -82,3 +82,11 @@
|
|
|
82
82
|
.form-render__combinationContent {
|
|
83
83
|
position: relative;
|
|
84
84
|
}
|
|
85
|
+
.form-render__complex {
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
|
+
.form-render__complexContent {
|
|
89
|
+
display: grid !important;
|
|
90
|
+
grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
|
|
91
|
+
gap: 0 8px;
|
|
92
|
+
}
|