cnhis-design-vue 3.1.15 → 3.1.16-beta.2
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/es/packages/big-table/src/BigTable.vue.d.ts +1 -8
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-time.js +1 -1
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +24 -8
- package/es/packages/big-table/src/hooks/useEdit.js +1 -1
- package/es/packages/form-config/index.d.ts +6 -24
- package/es/packages/form-config/src/FormConfig.vue.d.ts +6 -24
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +3 -12
- package/es/packages/form-config/src/components/FormConfigEdit.js +1 -1
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +3 -12
- package/es/packages/form-config/src/constants/index.d.ts +47 -13
- package/es/packages/form-config/src/constants/index.js +52 -14
- package/es/packages/form-config/src/hooks/index.d.ts +1 -0
- package/es/packages/form-config/src/hooks/index.js +1 -0
- package/es/packages/form-config/src/hooks/useConfigurationField.js +6 -43
- package/es/packages/form-config/src/hooks/usePresetRenderer.js +1 -1
- package/es/packages/form-render/index.d.ts +3 -12
- package/es/packages/form-render/src/FormRender.js +3 -4
- package/es/packages/form-render/src/FormRender.vue.d.ts +4 -13
- package/es/packages/form-render/src/components/renderer/cascader.js +1 -1
- package/es/packages/form-render/src/components/renderer/checkbox.js +1 -1
- package/es/packages/form-render/src/components/renderer/combination/index.js +2 -1
- package/es/packages/form-render/src/components/renderer/complex.js +1 -1
- package/es/packages/form-render/src/components/renderer/input.js +2 -1
- package/es/packages/form-render/src/components/renderer/inputNumber.js +2 -1
- package/es/packages/form-render/src/components/renderer/radio.js +1 -1
- package/es/packages/form-render/src/components/renderer/select.js +1 -1
- package/es/packages/form-render/src/components/renderer/slider.js +1 -1
- package/es/packages/form-render/src/components/renderer/switch.js +1 -1
- package/es/packages/form-render/src/components/renderer/textarea.js +1 -1
- package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +12 -9
- package/es/packages/form-render/src/hooks/useBusinessBinding.js +58 -58
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +14 -8
- package/es/packages/form-render/src/hooks/useFormContext.d.ts +2 -1
- package/es/packages/form-render/src/hooks/useFormContext.js +2 -2
- package/es/packages/form-render/src/types/index.d.ts +0 -8
- package/es/packages/form-render/src/utils/business.d.ts +12 -0
- package/es/packages/form-render/src/utils/business.js +65 -0
- package/es/packages/form-render/src/utils/dom.d.ts +6 -0
- package/es/packages/form-render/src/utils/dom.js +14 -0
- package/es/packages/form-render/src/utils/index.d.ts +5 -25
- package/es/packages/form-render/src/utils/index.js +5 -137
- package/es/packages/form-render/src/utils/schema.d.ts +15 -0
- package/es/packages/form-render/src/utils/schema.js +83 -0
- package/es/packages/shortcut-setter/index.d.ts +3 -12
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -12
- package/package.json +1 -1
|
@@ -1162,14 +1162,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1162
1162
|
paddingLarge: string;
|
|
1163
1163
|
paddingRoundTiny: string;
|
|
1164
1164
|
paddingRoundSmall: string;
|
|
1165
|
-
paddingRoundMedium: string;
|
|
1166
|
-
* 初始化props
|
|
1167
|
-
* @param {*} unionItem
|
|
1168
|
-
* @param {*} row
|
|
1169
|
-
* @param {*} column
|
|
1170
|
-
* @param {*} $rowIndex
|
|
1171
|
-
* @returns
|
|
1172
|
-
*/
|
|
1165
|
+
paddingRoundMedium: string;
|
|
1173
1166
|
paddingRoundLarge: string;
|
|
1174
1167
|
iconMarginTiny: string;
|
|
1175
1168
|
iconMarginSmall: string;
|
|
@@ -551,7 +551,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
|
-
if (formType === "date") {
|
|
554
|
+
if (formType === "date" || formType === "time") {
|
|
555
555
|
propsData.formattedValue = row[col.columnName];
|
|
556
556
|
} else if (formatMap) {
|
|
557
557
|
propsData.value = row[formatMap.value];
|
|
@@ -28,6 +28,7 @@ function useColumnConfigAdaptor() {
|
|
|
28
28
|
type,
|
|
29
29
|
"select"
|
|
30
30
|
]),
|
|
31
|
+
...["DATE"].map((type) => [type, "date"]),
|
|
31
32
|
...["INPUT"].map((type) => [type, "input"]),
|
|
32
33
|
...["DIGITAL"].map((type) => [type, "number"])
|
|
33
34
|
]);
|
|
@@ -40,13 +41,17 @@ function useColumnConfigAdaptor() {
|
|
|
40
41
|
const validateHandler = (value, result) => {
|
|
41
42
|
if (!isObject(value))
|
|
42
43
|
return;
|
|
43
|
-
|
|
44
|
-
maxlength:
|
|
45
|
-
minlength:
|
|
46
|
-
max:
|
|
47
|
-
min:
|
|
48
|
-
precision:
|
|
49
|
-
}
|
|
44
|
+
const keyMap = {
|
|
45
|
+
maxlength: "max_length",
|
|
46
|
+
minlength: "min_length",
|
|
47
|
+
max: "max_value",
|
|
48
|
+
min: "min_value",
|
|
49
|
+
precision: "decimal_length"
|
|
50
|
+
};
|
|
51
|
+
result.componentProps = Object.assign({}, result.comonentProps, Object.entries(keyMap).reduce((res, [k, v]) => {
|
|
52
|
+
res[k] = value[v];
|
|
53
|
+
return res;
|
|
54
|
+
}, {}));
|
|
50
55
|
};
|
|
51
56
|
const dateRangeValidate = (value, result) => {
|
|
52
57
|
if (!isObject(value))
|
|
@@ -71,14 +76,25 @@ function useColumnConfigAdaptor() {
|
|
|
71
76
|
const option = { label: value.describe, ...value };
|
|
72
77
|
result.options = isArray(result.options) ? [...result.options, option] : [option];
|
|
73
78
|
};
|
|
79
|
+
const htmlTypeHandler = (value, result, fieldItem) => {
|
|
80
|
+
var _a;
|
|
81
|
+
if (!isString(value))
|
|
82
|
+
return;
|
|
83
|
+
if (value === "DATE") {
|
|
84
|
+
result.formType = isString(fieldItem.date_format) && fieldItem.date_format.startsWith("HH:mm") ? "time" : "date";
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
result.formType = (_a = htmlTypeValueMap.get(value)) != null ? _a : value;
|
|
88
|
+
};
|
|
74
89
|
const settingMap = new Map([
|
|
75
90
|
["multi_select_value", { property: "multiple", valueMap: multipleValueMap }],
|
|
76
91
|
["is_null", isNullHandler],
|
|
77
92
|
["validate", validateHandler],
|
|
78
93
|
["dateValidate", dateRangeValidate],
|
|
94
|
+
["date_format", "valueFormat"],
|
|
79
95
|
...["open", "close"].map((key) => [key, switchOptionHandler]),
|
|
80
96
|
["is_edit", { property: "isEdit", valueMap: isEditValueMap }],
|
|
81
|
-
["html_type",
|
|
97
|
+
["html_type", htmlTypeHandler],
|
|
82
98
|
["option", { property: "options", fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }],
|
|
83
99
|
[
|
|
84
100
|
"alias",
|
|
@@ -100,7 +100,7 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
100
100
|
} else {
|
|
101
101
|
row[column.columnName] = value;
|
|
102
102
|
}
|
|
103
|
-
if ((column == null ? void 0 : column.formType) === "date" && !value) {
|
|
103
|
+
if (((column == null ? void 0 : column.formType) === "date" || (column == null ? void 0 : column.formType) === "time") && !value) {
|
|
104
104
|
row[column.columnName] = void 0;
|
|
105
105
|
}
|
|
106
106
|
emit("formChange", { value, row, column, index, oldValue });
|
|
@@ -7101,9 +7101,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7101
7101
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
7102
7102
|
default: () => {};
|
|
7103
7103
|
};
|
|
7104
|
-
businessFilter: {
|
|
7105
|
-
type: import("vue").PropType<import("..").FormBusinessFilter>;
|
|
7106
|
-
};
|
|
7107
7104
|
scope: {
|
|
7108
7105
|
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
7109
7106
|
default: () => {};
|
|
@@ -7216,9 +7213,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7216
7213
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
7217
7214
|
default: () => {};
|
|
7218
7215
|
};
|
|
7219
|
-
businessFilter: {
|
|
7220
|
-
type: import("vue").PropType<import("..").FormBusinessFilter>;
|
|
7221
|
-
};
|
|
7222
7216
|
scope: {
|
|
7223
7217
|
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
7224
7218
|
default: () => {};
|
|
@@ -7245,14 +7239,14 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7245
7239
|
}>>;
|
|
7246
7240
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
7247
7241
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
7242
|
+
formModel: import("@formily/core").Form<{
|
|
7243
|
+
[x: string]: any;
|
|
7244
|
+
}>;
|
|
7248
7245
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
7249
7246
|
businessCollector: import("..").BusinessCollector;
|
|
7250
7247
|
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
7251
7248
|
changeContextCollector: import("..").ContextCollector;
|
|
7252
7249
|
formUUID: string;
|
|
7253
|
-
formModel: import("@formily/core").Form<{
|
|
7254
|
-
[x: string]: any;
|
|
7255
|
-
}>;
|
|
7256
7250
|
scrollbarRef: import("vue").Ref<HTMLElement | undefined>;
|
|
7257
7251
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
7258
7252
|
[key: symbol]: any;
|
|
@@ -8718,9 +8712,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8718
8712
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
8719
8713
|
default: () => {};
|
|
8720
8714
|
};
|
|
8721
|
-
businessFilter: {
|
|
8722
|
-
type: import("vue").PropType<import("..").FormBusinessFilter>;
|
|
8723
|
-
};
|
|
8724
8715
|
scope: {
|
|
8725
8716
|
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
8726
8717
|
default: () => {};
|
|
@@ -12188,9 +12179,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12188
12179
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
12189
12180
|
default: () => {};
|
|
12190
12181
|
};
|
|
12191
|
-
businessFilter: {
|
|
12192
|
-
type: import("vue").PropType<import("..").FormBusinessFilter>;
|
|
12193
|
-
};
|
|
12194
12182
|
scope: {
|
|
12195
12183
|
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
12196
12184
|
default: () => {};
|
|
@@ -12303,9 +12291,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12303
12291
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
12304
12292
|
default: () => {};
|
|
12305
12293
|
};
|
|
12306
|
-
businessFilter: {
|
|
12307
|
-
type: import("vue").PropType<import("..").FormBusinessFilter>;
|
|
12308
|
-
};
|
|
12309
12294
|
scope: {
|
|
12310
12295
|
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
12311
12296
|
default: () => {};
|
|
@@ -12332,14 +12317,14 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12332
12317
|
}>>;
|
|
12333
12318
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
12334
12319
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
12320
|
+
formModel: import("@formily/core").Form<{
|
|
12321
|
+
[x: string]: any;
|
|
12322
|
+
}>;
|
|
12335
12323
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
12336
12324
|
businessCollector: import("..").BusinessCollector;
|
|
12337
12325
|
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
12338
12326
|
changeContextCollector: import("..").ContextCollector;
|
|
12339
12327
|
formUUID: string;
|
|
12340
|
-
formModel: import("@formily/core").Form<{
|
|
12341
|
-
[x: string]: any;
|
|
12342
|
-
}>;
|
|
12343
12328
|
scrollbarRef: import("vue").Ref<HTMLElement | undefined>;
|
|
12344
12329
|
schemaAdaptor: (fieldList: import("..").FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
12345
12330
|
[key: symbol]: any;
|
|
@@ -13805,9 +13790,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
13805
13790
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
13806
13791
|
default: () => {};
|
|
13807
13792
|
};
|
|
13808
|
-
businessFilter: {
|
|
13809
|
-
type: import("vue").PropType<import("..").FormBusinessFilter>;
|
|
13810
|
-
};
|
|
13811
13793
|
scope: {
|
|
13812
13794
|
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
13813
13795
|
default: () => {};
|
|
@@ -7103,9 +7103,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7103
7103
|
type: PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
7104
7104
|
default: () => {};
|
|
7105
7105
|
};
|
|
7106
|
-
businessFilter: {
|
|
7107
|
-
type: PropType<import("../../../../es/packages/form-render").FormBusinessFilter>;
|
|
7108
|
-
};
|
|
7109
7106
|
scope: {
|
|
7110
7107
|
type: PropType<import("../../../../es/src/types").AnyObject>;
|
|
7111
7108
|
default: () => {};
|
|
@@ -7218,9 +7215,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7218
7215
|
type: PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
7219
7216
|
default: () => {};
|
|
7220
7217
|
};
|
|
7221
|
-
businessFilter: {
|
|
7222
|
-
type: PropType<import("../../../../es/packages/form-render").FormBusinessFilter>;
|
|
7223
|
-
};
|
|
7224
7218
|
scope: {
|
|
7225
7219
|
type: PropType<import("../../../../es/src/types").AnyObject>;
|
|
7226
7220
|
default: () => {};
|
|
@@ -7247,14 +7241,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7247
7241
|
}>>;
|
|
7248
7242
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
7249
7243
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
7244
|
+
formModel: import("@formily/core").Form<{
|
|
7245
|
+
[x: string]: any;
|
|
7246
|
+
}>;
|
|
7250
7247
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
7251
7248
|
businessCollector: import("../../../../es/packages/form-render").BusinessCollector;
|
|
7252
7249
|
formItemDepsCollector: import("../../../../es/packages/form-render").FormItemDepsCollector;
|
|
7253
7250
|
changeContextCollector: import("../../../../es/packages/form-render").ContextCollector;
|
|
7254
7251
|
formUUID: string;
|
|
7255
|
-
formModel: import("@formily/core").Form<{
|
|
7256
|
-
[x: string]: any;
|
|
7257
|
-
}>;
|
|
7258
7252
|
scrollbarRef: import("vue").Ref<HTMLElement | undefined>;
|
|
7259
7253
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
7260
7254
|
[key: symbol]: any;
|
|
@@ -8720,9 +8714,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8720
8714
|
type: PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
8721
8715
|
default: () => {};
|
|
8722
8716
|
};
|
|
8723
|
-
businessFilter: {
|
|
8724
|
-
type: PropType<import("../../../../es/packages/form-render").FormBusinessFilter>;
|
|
8725
|
-
};
|
|
8726
8717
|
scope: {
|
|
8727
8718
|
type: PropType<import("../../../../es/src/types").AnyObject>;
|
|
8728
8719
|
default: () => {};
|
|
@@ -12190,9 +12181,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12190
12181
|
type: PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
12191
12182
|
default: () => {};
|
|
12192
12183
|
};
|
|
12193
|
-
businessFilter: {
|
|
12194
|
-
type: PropType<import("../../../../es/packages/form-render").FormBusinessFilter>;
|
|
12195
|
-
};
|
|
12196
12184
|
scope: {
|
|
12197
12185
|
type: PropType<import("../../../../es/src/types").AnyObject>;
|
|
12198
12186
|
default: () => {};
|
|
@@ -12305,9 +12293,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12305
12293
|
type: PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
12306
12294
|
default: () => {};
|
|
12307
12295
|
};
|
|
12308
|
-
businessFilter: {
|
|
12309
|
-
type: PropType<import("../../../../es/packages/form-render").FormBusinessFilter>;
|
|
12310
|
-
};
|
|
12311
12296
|
scope: {
|
|
12312
12297
|
type: PropType<import("../../../../es/src/types").AnyObject>;
|
|
12313
12298
|
default: () => {};
|
|
@@ -12334,14 +12319,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12334
12319
|
}>>;
|
|
12335
12320
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
12336
12321
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
12322
|
+
formModel: import("@formily/core").Form<{
|
|
12323
|
+
[x: string]: any;
|
|
12324
|
+
}>;
|
|
12337
12325
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
12338
12326
|
businessCollector: import("../../../../es/packages/form-render").BusinessCollector;
|
|
12339
12327
|
formItemDepsCollector: import("../../../../es/packages/form-render").FormItemDepsCollector;
|
|
12340
12328
|
changeContextCollector: import("../../../../es/packages/form-render").ContextCollector;
|
|
12341
12329
|
formUUID: string;
|
|
12342
|
-
formModel: import("@formily/core").Form<{
|
|
12343
|
-
[x: string]: any;
|
|
12344
|
-
}>;
|
|
12345
12330
|
scrollbarRef: import("vue").Ref<HTMLElement | undefined>;
|
|
12346
12331
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
12347
12332
|
[key: symbol]: any;
|
|
@@ -13807,9 +13792,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13807
13792
|
type: PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
13808
13793
|
default: () => {};
|
|
13809
13794
|
};
|
|
13810
|
-
businessFilter: {
|
|
13811
|
-
type: PropType<import("../../../../es/packages/form-render").FormBusinessFilter>;
|
|
13812
|
-
};
|
|
13813
13795
|
scope: {
|
|
13814
13796
|
type: PropType<import("../../../../es/src/types").AnyObject>;
|
|
13815
13797
|
default: () => {};
|
|
@@ -3433,9 +3433,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3433
3433
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
3434
3434
|
default: () => {};
|
|
3435
3435
|
};
|
|
3436
|
-
businessFilter: {
|
|
3437
|
-
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFilter>;
|
|
3438
|
-
};
|
|
3439
3436
|
scope: {
|
|
3440
3437
|
type: import("vue").PropType<import("../../../../src/types").AnyObject>;
|
|
3441
3438
|
default: () => {};
|
|
@@ -3548,9 +3545,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3548
3545
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
3549
3546
|
default: () => {};
|
|
3550
3547
|
};
|
|
3551
|
-
businessFilter: {
|
|
3552
|
-
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFilter>;
|
|
3553
|
-
};
|
|
3554
3548
|
scope: {
|
|
3555
3549
|
type: import("vue").PropType<import("../../../../src/types").AnyObject>;
|
|
3556
3550
|
default: () => {};
|
|
@@ -3577,14 +3571,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3577
3571
|
}>>;
|
|
3578
3572
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
3579
3573
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
3574
|
+
formModel: import("@formily/core").Form<{
|
|
3575
|
+
[x: string]: any;
|
|
3576
|
+
}>;
|
|
3580
3577
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
3581
3578
|
businessCollector: import("../../../../../es/packages/form-render").BusinessCollector;
|
|
3582
3579
|
formItemDepsCollector: import("../../../../../es/packages/form-render").FormItemDepsCollector;
|
|
3583
3580
|
changeContextCollector: import("../../../../../es/packages/form-render").ContextCollector;
|
|
3584
3581
|
formUUID: string;
|
|
3585
|
-
formModel: import("@formily/core").Form<{
|
|
3586
|
-
[x: string]: any;
|
|
3587
|
-
}>;
|
|
3588
3582
|
scrollbarRef: import("vue").Ref<HTMLElement | undefined>;
|
|
3589
3583
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
3590
3584
|
[key: symbol]: any;
|
|
@@ -5050,9 +5044,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5050
5044
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
5051
5045
|
default: () => {};
|
|
5052
5046
|
};
|
|
5053
|
-
businessFilter: {
|
|
5054
|
-
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFilter>;
|
|
5055
|
-
};
|
|
5056
5047
|
scope: {
|
|
5057
5048
|
type: import("vue").PropType<import("../../../../src/types").AnyObject>;
|
|
5058
5049
|
default: () => {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, watch, toRaw, openBlock, createElementBlock, Fragment, createBlock, unref, createVNode, nextTick } from 'vue';
|
|
2
2
|
import { cloneDeep } from 'lodash-es';
|
|
3
3
|
import { InjectionActiveFieldItem } from '../../../../packages/form-config/src/constants';
|
|
4
|
-
import { useConfigurationField } from '../../../../packages/form-config/src/hooks
|
|
4
|
+
import { useConfigurationField } from '../../../../packages/form-config/src/hooks';
|
|
5
5
|
import { NModal } from 'naive-ui';
|
|
6
6
|
import { CFormRender } from '../../../../packages/index';
|
|
7
7
|
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
|
|
@@ -3679,9 +3679,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3679
3679
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
3680
3680
|
default: () => {};
|
|
3681
3681
|
};
|
|
3682
|
-
businessFilter: {
|
|
3683
|
-
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFilter>;
|
|
3684
|
-
};
|
|
3685
3682
|
scope: {
|
|
3686
3683
|
type: import("vue").PropType<AnyObject>;
|
|
3687
3684
|
default: () => {};
|
|
@@ -3794,9 +3791,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3794
3791
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
3795
3792
|
default: () => {};
|
|
3796
3793
|
};
|
|
3797
|
-
businessFilter: {
|
|
3798
|
-
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFilter>;
|
|
3799
|
-
};
|
|
3800
3794
|
scope: {
|
|
3801
3795
|
type: import("vue").PropType<AnyObject>;
|
|
3802
3796
|
default: () => {};
|
|
@@ -3823,14 +3817,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3823
3817
|
}>>;
|
|
3824
3818
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
3825
3819
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
3820
|
+
formModel: import("@formily/core").Form<{
|
|
3821
|
+
[x: string]: any;
|
|
3822
|
+
}>;
|
|
3826
3823
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
3827
3824
|
businessCollector: import("../../../../../es/packages/form-render").BusinessCollector;
|
|
3828
3825
|
formItemDepsCollector: import("../../../../../es/packages/form-render").FormItemDepsCollector;
|
|
3829
3826
|
changeContextCollector: import("../../../../../es/packages/form-render").ContextCollector;
|
|
3830
3827
|
formUUID: string;
|
|
3831
|
-
formModel: import("@formily/core").Form<{
|
|
3832
|
-
[x: string]: any;
|
|
3833
|
-
}>;
|
|
3834
3828
|
scrollbarRef: import("vue").Ref<HTMLElement | undefined>;
|
|
3835
3829
|
schemaAdaptor: (fieldList: FieldItem[]) => Record<string, import("@formily/json-schema").Stringify<{
|
|
3836
3830
|
[key: symbol]: any;
|
|
@@ -5296,9 +5290,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
5296
5290
|
type: import("vue").PropType<Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>>;
|
|
5297
5291
|
default: () => {};
|
|
5298
5292
|
};
|
|
5299
|
-
businessFilter: {
|
|
5300
|
-
type: import("vue").PropType<import("../../../../../es/packages/form-render").FormBusinessFilter>;
|
|
5301
|
-
};
|
|
5302
5293
|
scope: {
|
|
5303
5294
|
type: import("vue").PropType<AnyObject>;
|
|
5304
5295
|
default: () => {};
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { WithUndefined } from '../../../../../es/src/types';
|
|
2
2
|
import { InjectionKey, Ref } from 'vue';
|
|
3
3
|
import { FieldItem } from '../../../../../es/packages/form-render';
|
|
4
|
-
export declare const WidgetTextMap:
|
|
5
|
-
INPUT: string;
|
|
6
|
-
SELECT: string;
|
|
7
|
-
TEXTAREA: string;
|
|
8
|
-
CASCADER: string;
|
|
9
|
-
SWITCH: string;
|
|
10
|
-
RADIO: string;
|
|
11
|
-
TEXT: string;
|
|
12
|
-
BUTTON: string;
|
|
13
|
-
CHECKBOX: string;
|
|
14
|
-
LINEBAR: string;
|
|
15
|
-
LINE_BREAKS: string;
|
|
16
|
-
};
|
|
4
|
+
export declare const WidgetTextMap: Map<string, string>;
|
|
17
5
|
export declare enum EditAbleField {
|
|
18
6
|
ALIAS = "alias",
|
|
19
7
|
TIP = "tip",
|
|
@@ -25,4 +13,50 @@ export declare enum EditAbleField {
|
|
|
25
13
|
IS_NULL = "is_null",
|
|
26
14
|
IS_EDIT = "is_edit"
|
|
27
15
|
}
|
|
16
|
+
export declare function widgetWidthOptionConfig(): {
|
|
17
|
+
option: {
|
|
18
|
+
text: string;
|
|
19
|
+
value: number;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
export declare function isShowOptionConfig(): {
|
|
23
|
+
open: {
|
|
24
|
+
describe: string;
|
|
25
|
+
value: string;
|
|
26
|
+
};
|
|
27
|
+
close: {
|
|
28
|
+
describe: string;
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare function isNotFoldOptionConfig(): {
|
|
33
|
+
open: {
|
|
34
|
+
describe: string;
|
|
35
|
+
value: string;
|
|
36
|
+
};
|
|
37
|
+
close: {
|
|
38
|
+
describe: string;
|
|
39
|
+
value: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export declare function isEditOptionConfig(): {
|
|
43
|
+
open: {
|
|
44
|
+
describe: string;
|
|
45
|
+
value: string;
|
|
46
|
+
};
|
|
47
|
+
close: {
|
|
48
|
+
describe: string;
|
|
49
|
+
value: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare function isNullOptionConfig(): {
|
|
53
|
+
open: {
|
|
54
|
+
describe: string;
|
|
55
|
+
value: string;
|
|
56
|
+
};
|
|
57
|
+
close: {
|
|
58
|
+
describe: string;
|
|
59
|
+
value: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
28
62
|
export declare const InjectionActiveFieldItem: InjectionKey<Ref<WithUndefined<FieldItem>>>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const WidgetTextMap =
|
|
2
|
-
INPUT
|
|
3
|
-
SELECT
|
|
4
|
-
TEXTAREA
|
|
5
|
-
CASCADER
|
|
6
|
-
SWITCH
|
|
7
|
-
RADIO
|
|
8
|
-
TEXT
|
|
9
|
-
BUTTON
|
|
10
|
-
CHECKBOX
|
|
11
|
-
LINEBAR
|
|
12
|
-
LINE_BREAKS
|
|
13
|
-
|
|
1
|
+
const WidgetTextMap = /* @__PURE__ */ new Map([
|
|
2
|
+
["INPUT", "\u8F93\u5165\u6846"],
|
|
3
|
+
["SELECT", "\u4E0B\u62C9\u6846"],
|
|
4
|
+
["TEXTAREA", "\u6587\u672C\u57DF"],
|
|
5
|
+
["CASCADER", "\u7EA7\u8054\u4E0B\u62C9\u6846"],
|
|
6
|
+
["SWITCH", "\u5F00\u5173"],
|
|
7
|
+
["RADIO", "\u5355\u9009"],
|
|
8
|
+
["TEXT", "\u6587\u672C"],
|
|
9
|
+
["BUTTON", "\u6309\u94AE"],
|
|
10
|
+
["CHECKBOX", "\u591A\u9009"],
|
|
11
|
+
["LINEBAR", "\u5206\u884C\u7B26"],
|
|
12
|
+
["LINE_BREAKS", "\u5206\u7EBF\u680F"]
|
|
13
|
+
]);
|
|
14
14
|
var EditAbleField = /* @__PURE__ */ ((EditAbleField2) => {
|
|
15
15
|
EditAbleField2["ALIAS"] = "alias";
|
|
16
16
|
EditAbleField2["TIP"] = "tip";
|
|
@@ -23,6 +23,44 @@ var EditAbleField = /* @__PURE__ */ ((EditAbleField2) => {
|
|
|
23
23
|
EditAbleField2["IS_EDIT"] = "is_edit";
|
|
24
24
|
return EditAbleField2;
|
|
25
25
|
})(EditAbleField || {});
|
|
26
|
+
function widgetWidthOptionConfig() {
|
|
27
|
+
return {
|
|
28
|
+
option: [
|
|
29
|
+
{ text: "\u6574\u884C", value: 12 },
|
|
30
|
+
{ text: "\u534A\u884C", value: 6 },
|
|
31
|
+
{ text: "5/6", value: 10 },
|
|
32
|
+
{ text: "2/3", value: 8 },
|
|
33
|
+
{ text: "1/3", value: 4 },
|
|
34
|
+
{ text: "3/4", value: 9 },
|
|
35
|
+
{ text: "1/4", value: 3 },
|
|
36
|
+
{ text: "1/6", value: 2 }
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function isShowOptionConfig() {
|
|
41
|
+
return {
|
|
42
|
+
open: { describe: "\u9ED8\u8BA4\u5C55\u5F00", value: "1" },
|
|
43
|
+
close: { describe: "\u9ED8\u8BA4\u6536\u8D77", value: "0" }
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function isNotFoldOptionConfig() {
|
|
47
|
+
return {
|
|
48
|
+
open: { describe: "\u53EF\u6298\u53E0", value: "0" },
|
|
49
|
+
close: { describe: "\u4E0D\u53EF\u6298\u53E0", value: "1" }
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function isEditOptionConfig() {
|
|
53
|
+
return {
|
|
54
|
+
open: { describe: "\u53EF\u7F16\u8F91", value: "1" },
|
|
55
|
+
close: { describe: "\u4E0D\u53EF\u7F16\u8F91", value: "0" }
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function isNullOptionConfig() {
|
|
59
|
+
return {
|
|
60
|
+
open: { describe: "\u5FC5\u586B", value: "0" },
|
|
61
|
+
close: { describe: "\u4E0D\u5FC5\u586B", value: "1" }
|
|
62
|
+
};
|
|
63
|
+
}
|
|
26
64
|
const InjectionActiveFieldItem = Symbol("InjectionActiveFieldItem");
|
|
27
65
|
|
|
28
|
-
export { EditAbleField, InjectionActiveFieldItem, WidgetTextMap };
|
|
66
|
+
export { EditAbleField, InjectionActiveFieldItem, WidgetTextMap, isEditOptionConfig, isNotFoldOptionConfig, isNullOptionConfig, isShowOptionConfig, widgetWidthOptionConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditAbleField } from '../../../../packages/form-config/src/constants';
|
|
1
|
+
import { EditAbleField, widgetWidthOptionConfig, isShowOptionConfig, isNotFoldOptionConfig, isEditOptionConfig, isNullOptionConfig } from '../../../../packages/form-config/src/constants';
|
|
2
2
|
|
|
3
3
|
function useConfigurationField() {
|
|
4
4
|
const fieldMap = /* @__PURE__ */ new Map([
|
|
@@ -16,16 +16,7 @@ function useConfigurationField() {
|
|
|
16
16
|
val_key: "elem_width",
|
|
17
17
|
html_type: "SELECT",
|
|
18
18
|
elem_width: 12,
|
|
19
|
-
|
|
20
|
-
{ text: "\u6574\u884C", value: 12 },
|
|
21
|
-
{ text: "\u534A\u884C", value: 6 },
|
|
22
|
-
{ text: "5/6", value: 10 },
|
|
23
|
-
{ text: "2/3", value: 8 },
|
|
24
|
-
{ text: "1/3", value: 4 },
|
|
25
|
-
{ text: "3/4", value: 9 },
|
|
26
|
-
{ text: "1/4", value: 3 },
|
|
27
|
-
{ text: "1/6", value: 2 }
|
|
28
|
-
]
|
|
19
|
+
...widgetWidthOptionConfig()
|
|
29
20
|
}
|
|
30
21
|
],
|
|
31
22
|
[
|
|
@@ -34,47 +25,19 @@ function useConfigurationField() {
|
|
|
34
25
|
],
|
|
35
26
|
[
|
|
36
27
|
EditAbleField.IS_SHOW,
|
|
37
|
-
{
|
|
38
|
-
val_key: "is_show",
|
|
39
|
-
alias: "\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00",
|
|
40
|
-
html_type: "SWITCH",
|
|
41
|
-
elem_width: 12,
|
|
42
|
-
open: { describe: "\u9ED8\u8BA4\u5C55\u5F00", value: "1" },
|
|
43
|
-
close: { describe: "\u9ED8\u8BA4\u6536\u8D77", value: "0" }
|
|
44
|
-
}
|
|
28
|
+
{ val_key: "is_show", alias: "\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00", html_type: "SWITCH", elem_width: 12, ...isShowOptionConfig() }
|
|
45
29
|
],
|
|
46
30
|
[
|
|
47
31
|
EditAbleField.IS_NOT_FOLD,
|
|
48
|
-
{
|
|
49
|
-
val_key: "is_not_fold",
|
|
50
|
-
alias: "\u662F\u5426\u53EF\u6298\u53E0",
|
|
51
|
-
html_type: "SWITCH",
|
|
52
|
-
elem_width: 12,
|
|
53
|
-
open: { describe: "\u53EF\u6298\u53E0", value: "0" },
|
|
54
|
-
close: { describe: "\u4E0D\u53EF\u6298\u53E0", value: "1" }
|
|
55
|
-
}
|
|
32
|
+
{ val_key: "is_not_fold", alias: "\u662F\u5426\u53EF\u6298\u53E0", html_type: "SWITCH", elem_width: 12, ...isNotFoldOptionConfig() }
|
|
56
33
|
],
|
|
57
34
|
[
|
|
58
35
|
EditAbleField.IS_EDIT,
|
|
59
|
-
{
|
|
60
|
-
val_key: "is_edit",
|
|
61
|
-
alias: "\u662F\u5426\u53EF\u7F16\u8F91",
|
|
62
|
-
html_type: "SWITCH",
|
|
63
|
-
elem_width: 12,
|
|
64
|
-
open: { describe: "\u53EF\u7F16\u8F91", value: "1" },
|
|
65
|
-
close: { describe: "\u4E0D\u53EF\u7F16\u8F91", value: "0" }
|
|
66
|
-
}
|
|
36
|
+
{ val_key: "is_edit", alias: "\u662F\u5426\u53EF\u7F16\u8F91", html_type: "SWITCH", elem_width: 12, ...isEditOptionConfig() }
|
|
67
37
|
],
|
|
68
38
|
[
|
|
69
39
|
EditAbleField.IS_NULL,
|
|
70
|
-
{
|
|
71
|
-
val_key: "is_null",
|
|
72
|
-
alias: "\u662F\u5426\u5FC5\u586B",
|
|
73
|
-
html_type: "SWITCH",
|
|
74
|
-
elem_width: 12,
|
|
75
|
-
open: { describe: "\u5FC5\u586B", value: "0" },
|
|
76
|
-
close: { describe: "\u4E0D\u5FC5\u586B", value: "1" }
|
|
77
|
-
}
|
|
40
|
+
{ val_key: "is_null", alias: "\u662F\u5426\u5FC5\u586B", html_type: "SWITCH", elem_width: 12, ...isNullOptionConfig() }
|
|
78
41
|
]
|
|
79
42
|
]);
|
|
80
43
|
function generateFieldListByKeys(keyList) {
|
|
@@ -26,7 +26,7 @@ function usePresetRenderer(textFormatter) {
|
|
|
26
26
|
default: () => getDisplayText()
|
|
27
27
|
})]);
|
|
28
28
|
function getDisplayText() {
|
|
29
|
-
return textFormatter(fieldItem, `${fieldItem.alias}(${WidgetTextMap
|
|
29
|
+
return textFormatter(fieldItem, `${fieldItem.alias}(${WidgetTextMap.get(fieldItem.html_type) || "\u63A7\u4EF6"})`);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
};
|