cnhis-design-vue 3.1.11-beta.3 → 3.1.11-beta.4
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/chunk-upload/src/hooks/upload-computed.js +5 -3
- package/es/packages/form-render/src/components/renderer/complex.d.ts +19 -0
- package/es/packages/form-render/src/components/renderer/complex.js +11 -3
- package/es/packages/form-render/src/hooks/useFieldList2Schema.js +3 -0
- package/es/packages/form-render/style/index.css +5 -1
- package/es/packages/index.css +5 -1
- package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.js +4 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ const UploadComputed = (props, state, config) => {
|
|
|
12
12
|
};
|
|
13
13
|
const handleProcessParams = (params, file) => {
|
|
14
14
|
let res = {
|
|
15
|
-
channel,
|
|
15
|
+
channel: channel.value,
|
|
16
16
|
md5: file.uniqueIdentifier,
|
|
17
17
|
name: params.filename,
|
|
18
18
|
chunk: params.chunkNumber - 1,
|
|
@@ -43,10 +43,12 @@ const UploadComputed = (props, state, config) => {
|
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
45
|
const channel = computed(() => {
|
|
46
|
-
|
|
46
|
+
let obj = state.uploadConfig;
|
|
47
|
+
if (Object.keys(obj || {}).length === 0) {
|
|
47
48
|
return void 0;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
+
let res = props.uploaderType === "file" ? obj.fileChannel : obj.channel;
|
|
51
|
+
return res || obj.fileChannel;
|
|
50
52
|
});
|
|
51
53
|
const uploadArguments = computed(() => {
|
|
52
54
|
return {
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
+
import { CSSProperties, PropType } from 'vue';
|
|
1
2
|
export declare const COMPLEX: import("vue").DefineComponent<{
|
|
2
3
|
span: {
|
|
3
4
|
type: NumberConstructor;
|
|
4
5
|
default: number;
|
|
5
6
|
};
|
|
7
|
+
display: {
|
|
8
|
+
type: PropType<"flex" | "grid">;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
wrapperStyle: {
|
|
12
|
+
type: PropType<CSSProperties>;
|
|
13
|
+
default: () => {};
|
|
14
|
+
};
|
|
6
15
|
}, () => 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
16
|
span: {
|
|
8
17
|
type: NumberConstructor;
|
|
9
18
|
default: number;
|
|
10
19
|
};
|
|
20
|
+
display: {
|
|
21
|
+
type: PropType<"flex" | "grid">;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
wrapperStyle: {
|
|
25
|
+
type: PropType<CSSProperties>;
|
|
26
|
+
default: () => {};
|
|
27
|
+
};
|
|
11
28
|
}>>, {
|
|
12
29
|
span: number;
|
|
30
|
+
display: "flex" | "grid";
|
|
31
|
+
wrapperStyle: CSSProperties;
|
|
13
32
|
}>;
|
|
@@ -7,11 +7,18 @@ const script = defineComponent({
|
|
|
7
7
|
span: {
|
|
8
8
|
type: Number,
|
|
9
9
|
default: 6
|
|
10
|
+
},
|
|
11
|
+
display: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "grid"
|
|
14
|
+
},
|
|
15
|
+
wrapperStyle: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
10
18
|
}
|
|
11
19
|
},
|
|
12
20
|
setup(props, {
|
|
13
|
-
slots
|
|
14
|
-
attrs
|
|
21
|
+
slots
|
|
15
22
|
}) {
|
|
16
23
|
function onChange(e) {
|
|
17
24
|
e.stopPropagation();
|
|
@@ -20,7 +27,8 @@ const script = defineComponent({
|
|
|
20
27
|
return createVNode("section", {
|
|
21
28
|
"class": "form-render__complex"
|
|
22
29
|
}, [createVNode("section", {
|
|
23
|
-
"class":
|
|
30
|
+
"class": `form-render__complexContent--${props.display}`,
|
|
31
|
+
"style": props.wrapperStyle,
|
|
24
32
|
"onChange": onChange
|
|
25
33
|
}, [slots.default && slots.default()])]);
|
|
26
34
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pick } from 'lodash-es';
|
|
1
2
|
import { arrayed, transformDateFormat } from '../utils/index.js';
|
|
2
3
|
import { useFormValidator, useTypeNormalize } from '../../../../packages/form-render';
|
|
3
4
|
import { isObject } from '@vueuse/core';
|
|
@@ -132,6 +133,8 @@ function useFieldList2Schema(collector) {
|
|
|
132
133
|
const properties = Array.isArray(item.properties) ? transform(item.properties) : {};
|
|
133
134
|
schema.type = item.fieldType || "void";
|
|
134
135
|
schema.properties = properties;
|
|
136
|
+
Object.assign(schema["x-decorator-props"], { showFeedback: false });
|
|
137
|
+
Object.assign(schema["x-component-props"], pick(item, ["wrapperStyle", "display"]));
|
|
135
138
|
return schema;
|
|
136
139
|
};
|
|
137
140
|
const creatorMap = /* @__PURE__ */ new Map([
|
|
@@ -88,8 +88,12 @@
|
|
|
88
88
|
.form-render__complex {
|
|
89
89
|
width: 100%;
|
|
90
90
|
}
|
|
91
|
-
.form-render__complexContent {
|
|
91
|
+
.form-render__complexContent--grid {
|
|
92
92
|
display: grid !important;
|
|
93
93
|
grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
|
|
94
94
|
gap: 0 8px;
|
|
95
95
|
}
|
|
96
|
+
.form-render__complexContent--flex {
|
|
97
|
+
display: flex !important;
|
|
98
|
+
gap: 0 8px;
|
|
99
|
+
}
|
package/es/packages/index.css
CHANGED
|
@@ -2704,8 +2704,12 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2704
2704
|
.form-render__complex {
|
|
2705
2705
|
width: 100%;
|
|
2706
2706
|
}
|
|
2707
|
-
.form-render__complexContent {
|
|
2707
|
+
.form-render__complexContent--grid {
|
|
2708
2708
|
display: grid !important;
|
|
2709
2709
|
grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
|
|
2710
2710
|
gap: 0 8px;
|
|
2711
2711
|
}
|
|
2712
|
+
.form-render__complexContent--flex {
|
|
2713
|
+
display: flex !important;
|
|
2714
|
+
gap: 0 8px;
|
|
2715
|
+
}
|
|
@@ -260,11 +260,14 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
260
260
|
const confirmSubmit = (message2) => {
|
|
261
261
|
dialog.warning({
|
|
262
262
|
title: "\u6E29\u99A8\u63D0\u793A",
|
|
263
|
-
content:
|
|
263
|
+
content: () => h("div", { style: {
|
|
264
|
+
paddingLeft: "30px"
|
|
265
|
+
} }, message2),
|
|
264
266
|
positiveText: "\u786E\u5B9A",
|
|
265
267
|
negativeText: "\u53D6\u6D88",
|
|
266
268
|
maskClosable: false,
|
|
267
269
|
closable: false,
|
|
270
|
+
positiveButtonProps: { type: "primary" },
|
|
268
271
|
onPositiveClick: () => {
|
|
269
272
|
onSubmitForm();
|
|
270
273
|
},
|