yuang-framework-ui-pc 1.1.76 → 1.1.77
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.
|
@@ -1,35 +1,22 @@
|
|
|
1
|
-
import { FrameworkAttachmentComponentParam } from 'yuang-framework-ui-common/lib/interface/component/ComponentParam';
|
|
2
1
|
import { FrameworkAttachment } from 'yuang-framework-ui-common/lib/interface/framework/frameworkAttachment';
|
|
3
2
|
|
|
4
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
-
modelValue: import('vue').PropType<
|
|
4
|
+
modelValue: import('vue').PropType<string>;
|
|
6
5
|
param: {
|
|
7
|
-
type: import('vue').PropType<
|
|
8
|
-
|
|
9
|
-
default: {
|
|
10
|
-
type: string;
|
|
11
|
-
mode: string;
|
|
12
|
-
maxCount: number;
|
|
13
|
-
maxSize: number;
|
|
14
|
-
};
|
|
6
|
+
type: import('vue').PropType<{}>;
|
|
7
|
+
default: any;
|
|
15
8
|
};
|
|
16
9
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
10
|
change: (frameworkAttachment: FrameworkAttachment) => void;
|
|
18
11
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
-
modelValue: import('vue').PropType<
|
|
12
|
+
modelValue: import('vue').PropType<string>;
|
|
20
13
|
param: {
|
|
21
|
-
type: import('vue').PropType<
|
|
22
|
-
|
|
23
|
-
default: {
|
|
24
|
-
type: string;
|
|
25
|
-
mode: string;
|
|
26
|
-
maxCount: number;
|
|
27
|
-
maxSize: number;
|
|
28
|
-
};
|
|
14
|
+
type: import('vue').PropType<{}>;
|
|
15
|
+
default: any;
|
|
29
16
|
};
|
|
30
17
|
}>> & Readonly<{
|
|
31
18
|
onChange?: ((frameworkAttachment: FrameworkAttachment) => any) | undefined;
|
|
32
19
|
}>, {
|
|
33
|
-
param:
|
|
20
|
+
param: {};
|
|
34
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
22
|
export default _default;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { defineComponent, mergeModels,
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, ref, onMounted, watch, resolveComponent, createBlock, openBlock } from "vue";
|
|
2
2
|
import { ElMessageBox } from "element-plus/es";
|
|
3
3
|
import { EleMessage } from "../utils/message";
|
|
4
4
|
import { http } from "yuang-framework-ui-common/lib/config/httpConfig";
|
|
5
|
-
import { getShortUuid } from "yuang-framework-ui-common/lib/utils/uuidUtils";
|
|
6
5
|
import { application } from "yuang-framework-ui-common/lib/config/applicationConfig";
|
|
6
|
+
import require$$0 from "/Users/mac/Work/yuang-union/source-code/yuang-framework/yuang-framework-ui-pc/node_modules/image-conversion/build/conversion.js";
|
|
7
|
+
var imageConversion = require$$0;
|
|
7
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
9
|
...{ name: "YuFrameworkAttachmentUpload" },
|
|
9
10
|
__name: "index",
|
|
10
11
|
props: /* @__PURE__ */ mergeModels({
|
|
11
|
-
|
|
12
|
-
param: { default: {
|
|
13
|
-
type: "edit",
|
|
14
|
-
mode: "file",
|
|
15
|
-
maxCount: 5,
|
|
16
|
-
maxSize: 5
|
|
17
|
-
} }
|
|
12
|
+
param: { default: {} }
|
|
18
13
|
}, {
|
|
19
14
|
"modelValue": {},
|
|
20
15
|
"modelModifiers": {}
|
|
@@ -23,31 +18,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
18
|
setup(__props, { emit: __emit }) {
|
|
24
19
|
const props = __props;
|
|
25
20
|
const emit = __emit;
|
|
21
|
+
const modelValue = useModel(__props, "modelValue");
|
|
22
|
+
const componentParam = computed(() => ({
|
|
23
|
+
modelValue: modelValue.value,
|
|
24
|
+
// 类型,默认值:edit
|
|
25
|
+
type: "edit",
|
|
26
|
+
// 模式,默认值:file
|
|
27
|
+
mode: "file",
|
|
28
|
+
// 最大数量,默认值:5
|
|
29
|
+
maxCount: 5,
|
|
30
|
+
// 最大大小,默认值:5,单位:M
|
|
31
|
+
maxSize: 5,
|
|
32
|
+
// 是否压缩图片,默认值:false
|
|
33
|
+
isCompressImage: false,
|
|
34
|
+
...props.param
|
|
35
|
+
}));
|
|
26
36
|
const fileList = ref([]);
|
|
27
|
-
const listType = ref(
|
|
37
|
+
const listType = ref(componentParam.value.mode);
|
|
28
38
|
const accept = ref("");
|
|
29
|
-
if (
|
|
30
|
-
accept.value = ".
|
|
31
|
-
} else if (
|
|
32
|
-
accept.value = ".
|
|
39
|
+
if (componentParam.value.mode == "file") {
|
|
40
|
+
accept.value = [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".wps", ".dps", ".et", ".htm", ".html", ".js", ".css", ".svg", ".txt", ".sql", ".zip", ".rar", ".gz", ".bz2", ".mp3", ".mp4", ".mov", ".gif", ".jpg", ".jpeg", ".png", ".bmp"].join(",");
|
|
41
|
+
} else if (componentParam.value.mode == "image") {
|
|
42
|
+
accept.value = [".gif", ".jpg", ".jpeg", ".png", ".bmp"].join(",");
|
|
33
43
|
}
|
|
34
44
|
const isLoading = ref(false);
|
|
35
45
|
const checkFile = (file) => {
|
|
36
46
|
if (!file) {
|
|
37
47
|
return;
|
|
38
48
|
}
|
|
39
|
-
if (
|
|
49
|
+
if (componentParam.value.mode === "image" && !file.type.startsWith("image")) {
|
|
40
50
|
EleMessage.error("只能选择图片");
|
|
41
51
|
return;
|
|
42
52
|
}
|
|
43
|
-
if (file.size / 1024 / 1024 >
|
|
44
|
-
EleMessage.error(`图片大小不能超过${
|
|
53
|
+
if (file.size / 1024 / 1024 > componentParam.value.maxSize) {
|
|
54
|
+
EleMessage.error(`图片大小不能超过${componentParam.value.maxSize}MB`);
|
|
45
55
|
return;
|
|
46
56
|
}
|
|
47
57
|
return true;
|
|
48
58
|
};
|
|
49
|
-
const model = useModel(__props, "modelValue");
|
|
50
|
-
model.value = model.value ?? getShortUuid();
|
|
51
59
|
let isExecuting = false;
|
|
52
60
|
let pendingExecute = false;
|
|
53
61
|
onMounted(() => {
|
|
@@ -60,7 +68,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
68
|
}
|
|
61
69
|
isExecuting = true;
|
|
62
70
|
fileList.value = [];
|
|
63
|
-
|
|
71
|
+
if (!modelValue.value) {
|
|
72
|
+
EleMessage.error("参数[modelValue]为空");
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
http.post(`${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
|
|
64
76
|
let attachemtList = res.data.data.records;
|
|
65
77
|
for (let i = 0; i < attachemtList.length; i++) {
|
|
66
78
|
fileList.value.push({
|
|
@@ -79,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
91
|
}
|
|
80
92
|
});
|
|
81
93
|
};
|
|
82
|
-
const handleUpload = (uploadItem, retry) => {
|
|
94
|
+
const handleUpload = async (uploadItem, retry) => {
|
|
83
95
|
if (!checkFile(uploadItem.file)) {
|
|
84
96
|
return;
|
|
85
97
|
}
|
|
@@ -93,9 +105,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
105
|
}
|
|
94
106
|
item.status = "uploading";
|
|
95
107
|
item.progress = 0;
|
|
108
|
+
let uploadFile = uploadItem.file;
|
|
109
|
+
if (componentParam.value.mode === "image" && componentParam.value.isCompressImage && uploadFile) {
|
|
110
|
+
let beforeCompressSize = uploadFile.size;
|
|
111
|
+
try {
|
|
112
|
+
const compressBlob = await imageConversion.compressAccurately(uploadFile, 512);
|
|
113
|
+
uploadFile = new File([compressBlob], uploadFile.name, { type: uploadFile.type });
|
|
114
|
+
console.log(`压缩前:${(beforeCompressSize / 1024).toFixed(2)}KB | 压缩后:${(uploadFile.size / 1024).toFixed(2)}KB`);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
EleMessage.warning("图片压缩失败,将上传原图");
|
|
117
|
+
console.error("图片压缩异常:", error);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
96
120
|
let formData = new FormData();
|
|
97
|
-
formData.append("code",
|
|
98
|
-
formData.append("multipartFile",
|
|
121
|
+
formData.append("code", modelValue.value);
|
|
122
|
+
formData.append("multipartFile", uploadFile, uploadFile.name);
|
|
99
123
|
http({
|
|
100
124
|
url: `${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
|
|
101
125
|
method: "post",
|
|
@@ -115,7 +139,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
139
|
EleMessage.error(e.message);
|
|
116
140
|
});
|
|
117
141
|
};
|
|
118
|
-
const handleEditUpload = ({ item, newItem }) => {
|
|
142
|
+
const handleEditUpload = async ({ item, newItem }) => {
|
|
119
143
|
if (!checkFile(newItem.file)) {
|
|
120
144
|
return;
|
|
121
145
|
}
|
|
@@ -123,10 +147,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
147
|
console.log("newItem", newItem);
|
|
124
148
|
newItem.status = "uploading";
|
|
125
149
|
newItem.progress = 0;
|
|
150
|
+
let uploadFile = newItem.file;
|
|
151
|
+
if (componentParam.value.mode === "image" && componentParam.value.isCompressImage && uploadFile) {
|
|
152
|
+
let beforeCompressSize = uploadFile.size;
|
|
153
|
+
try {
|
|
154
|
+
const compressBlob = await imageConversion.compressAccurately(uploadFile, 512);
|
|
155
|
+
uploadFile = new File([compressBlob], uploadFile.name, { type: uploadFile.type });
|
|
156
|
+
console.log(`压缩前:${(beforeCompressSize / 1024).toFixed(2)}KB | 压缩后:${(uploadFile.size / 1024).toFixed(2)}KB`);
|
|
157
|
+
} catch (error) {
|
|
158
|
+
EleMessage.warning("图片压缩失败,将上传原图");
|
|
159
|
+
console.error("图片压缩异常:", error);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
126
162
|
let formData = new FormData();
|
|
127
163
|
formData.append("id", item.id);
|
|
128
|
-
formData.append("code",
|
|
129
|
-
formData.append("multipartFile",
|
|
164
|
+
formData.append("code", modelValue.value);
|
|
165
|
+
formData.append("multipartFile", uploadFile, uploadFile.name);
|
|
130
166
|
http({
|
|
131
167
|
url: `${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
|
|
132
168
|
method: "post",
|
|
@@ -151,7 +187,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
151
187
|
});
|
|
152
188
|
};
|
|
153
189
|
const emitChange = () => {
|
|
154
|
-
|
|
190
|
+
if (!modelValue.value) {
|
|
191
|
+
EleMessage.error("参数[modelValue]为空");
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
http.post(`${application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
|
|
155
195
|
let attachemtList = res.data.data.records;
|
|
156
196
|
emit("change", attachemtList);
|
|
157
197
|
});
|
|
@@ -176,7 +216,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
176
216
|
}
|
|
177
217
|
);
|
|
178
218
|
watch(
|
|
179
|
-
() =>
|
|
219
|
+
() => componentParam,
|
|
180
220
|
() => {
|
|
181
221
|
init();
|
|
182
222
|
},
|
|
@@ -3,19 +3,14 @@ const vue = require("vue");
|
|
|
3
3
|
const es = require("element-plus/es");
|
|
4
4
|
const message = require("../utils/message");
|
|
5
5
|
const httpConfig = require("yuang-framework-ui-common/lib/config/httpConfig");
|
|
6
|
-
const uuidUtils = require("yuang-framework-ui-common/lib/utils/uuidUtils");
|
|
7
6
|
const applicationConfig = require("yuang-framework-ui-common/lib/config/applicationConfig");
|
|
7
|
+
const require$$0 = require("/Users/mac/Work/yuang-union/source-code/yuang-framework/yuang-framework-ui-pc/node_modules/image-conversion/build/conversion.js");
|
|
8
|
+
var imageConversion = require$$0;
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
9
10
|
...{ name: "YuFrameworkAttachmentUpload" },
|
|
10
11
|
__name: "index",
|
|
11
12
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
12
|
-
|
|
13
|
-
param: { default: {
|
|
14
|
-
type: "edit",
|
|
15
|
-
mode: "file",
|
|
16
|
-
maxCount: 5,
|
|
17
|
-
maxSize: 5
|
|
18
|
-
} }
|
|
13
|
+
param: { default: {} }
|
|
19
14
|
}, {
|
|
20
15
|
"modelValue": {},
|
|
21
16
|
"modelModifiers": {}
|
|
@@ -24,31 +19,44 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
19
|
setup(__props, { emit: __emit }) {
|
|
25
20
|
const props = __props;
|
|
26
21
|
const emit = __emit;
|
|
22
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
23
|
+
const componentParam = vue.computed(() => ({
|
|
24
|
+
modelValue: modelValue.value,
|
|
25
|
+
// 类型,默认值:edit
|
|
26
|
+
type: "edit",
|
|
27
|
+
// 模式,默认值:file
|
|
28
|
+
mode: "file",
|
|
29
|
+
// 最大数量,默认值:5
|
|
30
|
+
maxCount: 5,
|
|
31
|
+
// 最大大小,默认值:5,单位:M
|
|
32
|
+
maxSize: 5,
|
|
33
|
+
// 是否压缩图片,默认值:false
|
|
34
|
+
isCompressImage: false,
|
|
35
|
+
...props.param
|
|
36
|
+
}));
|
|
27
37
|
const fileList = vue.ref([]);
|
|
28
|
-
const listType = vue.ref(
|
|
38
|
+
const listType = vue.ref(componentParam.value.mode);
|
|
29
39
|
const accept = vue.ref("");
|
|
30
|
-
if (
|
|
31
|
-
accept.value = ".
|
|
32
|
-
} else if (
|
|
33
|
-
accept.value = ".
|
|
40
|
+
if (componentParam.value.mode == "file") {
|
|
41
|
+
accept.value = [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".wps", ".dps", ".et", ".htm", ".html", ".js", ".css", ".svg", ".txt", ".sql", ".zip", ".rar", ".gz", ".bz2", ".mp3", ".mp4", ".mov", ".gif", ".jpg", ".jpeg", ".png", ".bmp"].join(",");
|
|
42
|
+
} else if (componentParam.value.mode == "image") {
|
|
43
|
+
accept.value = [".gif", ".jpg", ".jpeg", ".png", ".bmp"].join(",");
|
|
34
44
|
}
|
|
35
45
|
const isLoading = vue.ref(false);
|
|
36
46
|
const checkFile = (file) => {
|
|
37
47
|
if (!file) {
|
|
38
48
|
return;
|
|
39
49
|
}
|
|
40
|
-
if (
|
|
50
|
+
if (componentParam.value.mode === "image" && !file.type.startsWith("image")) {
|
|
41
51
|
message.EleMessage.error("只能选择图片");
|
|
42
52
|
return;
|
|
43
53
|
}
|
|
44
|
-
if (file.size / 1024 / 1024 >
|
|
45
|
-
message.EleMessage.error(`图片大小不能超过${
|
|
54
|
+
if (file.size / 1024 / 1024 > componentParam.value.maxSize) {
|
|
55
|
+
message.EleMessage.error(`图片大小不能超过${componentParam.value.maxSize}MB`);
|
|
46
56
|
return;
|
|
47
57
|
}
|
|
48
58
|
return true;
|
|
49
59
|
};
|
|
50
|
-
const model = vue.useModel(__props, "modelValue");
|
|
51
|
-
model.value = model.value ?? uuidUtils.getShortUuid();
|
|
52
60
|
let isExecuting = false;
|
|
53
61
|
let pendingExecute = false;
|
|
54
62
|
vue.onMounted(() => {
|
|
@@ -61,7 +69,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
61
69
|
}
|
|
62
70
|
isExecuting = true;
|
|
63
71
|
fileList.value = [];
|
|
64
|
-
|
|
72
|
+
if (!modelValue.value) {
|
|
73
|
+
message.EleMessage.error("参数[modelValue]为空");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
|
|
65
77
|
let attachemtList = res.data.data.records;
|
|
66
78
|
for (let i = 0; i < attachemtList.length; i++) {
|
|
67
79
|
fileList.value.push({
|
|
@@ -80,7 +92,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
80
92
|
}
|
|
81
93
|
});
|
|
82
94
|
};
|
|
83
|
-
const handleUpload = (uploadItem, retry) => {
|
|
95
|
+
const handleUpload = async (uploadItem, retry) => {
|
|
84
96
|
if (!checkFile(uploadItem.file)) {
|
|
85
97
|
return;
|
|
86
98
|
}
|
|
@@ -94,9 +106,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
94
106
|
}
|
|
95
107
|
item.status = "uploading";
|
|
96
108
|
item.progress = 0;
|
|
109
|
+
let uploadFile = uploadItem.file;
|
|
110
|
+
if (componentParam.value.mode === "image" && componentParam.value.isCompressImage && uploadFile) {
|
|
111
|
+
let beforeCompressSize = uploadFile.size;
|
|
112
|
+
try {
|
|
113
|
+
const compressBlob = await imageConversion.compressAccurately(uploadFile, 512);
|
|
114
|
+
uploadFile = new File([compressBlob], uploadFile.name, { type: uploadFile.type });
|
|
115
|
+
console.log(`压缩前:${(beforeCompressSize / 1024).toFixed(2)}KB | 压缩后:${(uploadFile.size / 1024).toFixed(2)}KB`);
|
|
116
|
+
} catch (error) {
|
|
117
|
+
message.EleMessage.warning("图片压缩失败,将上传原图");
|
|
118
|
+
console.error("图片压缩异常:", error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
97
121
|
let formData = new FormData();
|
|
98
|
-
formData.append("code",
|
|
99
|
-
formData.append("multipartFile",
|
|
122
|
+
formData.append("code", modelValue.value);
|
|
123
|
+
formData.append("multipartFile", uploadFile, uploadFile.name);
|
|
100
124
|
httpConfig.http({
|
|
101
125
|
url: `${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
|
|
102
126
|
method: "post",
|
|
@@ -116,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
116
140
|
message.EleMessage.error(e.message);
|
|
117
141
|
});
|
|
118
142
|
};
|
|
119
|
-
const handleEditUpload = ({ item, newItem }) => {
|
|
143
|
+
const handleEditUpload = async ({ item, newItem }) => {
|
|
120
144
|
if (!checkFile(newItem.file)) {
|
|
121
145
|
return;
|
|
122
146
|
}
|
|
@@ -124,10 +148,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
124
148
|
console.log("newItem", newItem);
|
|
125
149
|
newItem.status = "uploading";
|
|
126
150
|
newItem.progress = 0;
|
|
151
|
+
let uploadFile = newItem.file;
|
|
152
|
+
if (componentParam.value.mode === "image" && componentParam.value.isCompressImage && uploadFile) {
|
|
153
|
+
let beforeCompressSize = uploadFile.size;
|
|
154
|
+
try {
|
|
155
|
+
const compressBlob = await imageConversion.compressAccurately(uploadFile, 512);
|
|
156
|
+
uploadFile = new File([compressBlob], uploadFile.name, { type: uploadFile.type });
|
|
157
|
+
console.log(`压缩前:${(beforeCompressSize / 1024).toFixed(2)}KB | 压缩后:${(uploadFile.size / 1024).toFixed(2)}KB`);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
message.EleMessage.warning("图片压缩失败,将上传原图");
|
|
160
|
+
console.error("图片压缩异常:", error);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
127
163
|
let formData = new FormData();
|
|
128
164
|
formData.append("id", item.id);
|
|
129
|
-
formData.append("code",
|
|
130
|
-
formData.append("multipartFile",
|
|
165
|
+
formData.append("code", modelValue.value);
|
|
166
|
+
formData.append("multipartFile", uploadFile, uploadFile.name);
|
|
131
167
|
httpConfig.http({
|
|
132
168
|
url: `${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/uploadAttachment`,
|
|
133
169
|
method: "post",
|
|
@@ -152,7 +188,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
152
188
|
});
|
|
153
189
|
};
|
|
154
190
|
const emitChange = () => {
|
|
155
|
-
|
|
191
|
+
if (!modelValue.value) {
|
|
192
|
+
message.EleMessage.error("参数[modelValue]为空");
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
httpConfig.http.post(`${applicationConfig.application.gatewayServerBaseUrl}/framework-api/core/framework-attachment/selectPage`, { codeForEqual: modelValue.value, pageSize: 100 }).then((res) => {
|
|
156
196
|
let attachemtList = res.data.data.records;
|
|
157
197
|
emit("change", attachemtList);
|
|
158
198
|
});
|
|
@@ -177,7 +217,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
177
217
|
}
|
|
178
218
|
);
|
|
179
219
|
vue.watch(
|
|
180
|
-
() =>
|
|
220
|
+
() => componentParam,
|
|
181
221
|
() => {
|
|
182
222
|
init();
|
|
183
223
|
},
|
|
@@ -1,35 +1,22 @@
|
|
|
1
|
-
import { FrameworkAttachmentComponentParam } from 'yuang-framework-ui-common/lib/interface/component/ComponentParam';
|
|
2
1
|
import { FrameworkAttachment } from 'yuang-framework-ui-common/lib/interface/framework/frameworkAttachment';
|
|
3
2
|
|
|
4
3
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
-
modelValue: import('vue').PropType<
|
|
4
|
+
modelValue: import('vue').PropType<string>;
|
|
6
5
|
param: {
|
|
7
|
-
type: import('vue').PropType<
|
|
8
|
-
|
|
9
|
-
default: {
|
|
10
|
-
type: string;
|
|
11
|
-
mode: string;
|
|
12
|
-
maxCount: number;
|
|
13
|
-
maxSize: number;
|
|
14
|
-
};
|
|
6
|
+
type: import('vue').PropType<{}>;
|
|
7
|
+
default: any;
|
|
15
8
|
};
|
|
16
9
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
10
|
change: (frameworkAttachment: FrameworkAttachment) => void;
|
|
18
11
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
-
modelValue: import('vue').PropType<
|
|
12
|
+
modelValue: import('vue').PropType<string>;
|
|
20
13
|
param: {
|
|
21
|
-
type: import('vue').PropType<
|
|
22
|
-
|
|
23
|
-
default: {
|
|
24
|
-
type: string;
|
|
25
|
-
mode: string;
|
|
26
|
-
maxCount: number;
|
|
27
|
-
maxSize: number;
|
|
28
|
-
};
|
|
14
|
+
type: import('vue').PropType<{}>;
|
|
15
|
+
default: any;
|
|
29
16
|
};
|
|
30
17
|
}>> & Readonly<{
|
|
31
18
|
onChange?: ((frameworkAttachment: FrameworkAttachment) => any) | undefined;
|
|
32
19
|
}>, {
|
|
33
|
-
param:
|
|
20
|
+
param: {};
|
|
34
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
22
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuang-framework-ui-pc",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.77",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite --host --config vite.global.ts --mode dev",
|
|
@@ -188,6 +188,7 @@
|
|
|
188
188
|
"repository": "",
|
|
189
189
|
"license": "",
|
|
190
190
|
"dependencies": {
|
|
191
|
+
"image-conversion": "^2.1.1",
|
|
191
192
|
"yuang-framework-ui-common": "^1.0.86"
|
|
192
193
|
}
|
|
193
194
|
}
|