sun-card-design 1.1.41 → 1.1.42
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/mobile/sun-card-design-mobile.es21.js +3 -2
- package/dist/mobile/sun-card-design-mobile.es23.js +3 -2
- package/dist/mobile/sun-card-design-mobile.es25.js +6 -6
- package/dist/mobile/sun-card-design-mobile.es51.js +4 -0
- package/dist/mobile/sun-card-design-mobile.es56.js +207 -45
- package/dist/mobile/sun-card-design-mobile.es57.js +45 -207
- package/dist/mobile/sun-card-design-mobile.es58.js +70 -47
- package/dist/mobile/sun-card-design-mobile.es59.js +20 -9
- package/dist/mobile/sun-card-design-mobile.es60.js +7 -7
- package/dist/mobile/sun-card-design-mobile.es61.js +5 -5
- package/dist/pc/sun-card-design-pc.es21.js +3 -2
- package/dist/pc/sun-card-design-pc.es23.js +3 -2
- package/dist/pc/sun-card-design-pc.es25.js +6 -6
- package/dist/pc/sun-card-design-pc.es51.js +4 -0
- package/dist/pc/sun-card-design-pc.es56.js +207 -45
- package/dist/pc/sun-card-design-pc.es57.js +47 -70
- package/dist/pc/sun-card-design-pc.es58.js +9 -20
- package/dist/pc/sun-card-design-pc.es59.js +7 -7
- package/dist/pc/sun-card-design-pc.es60.js +5 -5
- package/dist/{mobile/sun-card-design-mobile.es62.js → pc/sun-card-design-pc.es61.js} +3 -3
- package/dist/public/sun-card-design.css +1 -1
- package/package.json +1 -1
- package/dist/mobile/sun-card-design-mobile.es55.js +0 -226
- package/dist/pc/sun-card-design-pc.es55.js +0 -226
- /package/dist/mobile/{sun-card-design-mobile.es65.js → sun-card-design-mobile.es66.js} +0 -0
- /package/dist/pc/{sun-card-design-pc.es65.js → sun-card-design-pc.es66.js} +0 -0
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { ref, computed, resolveComponent, createElementBlock, openBlock, normalizeStyle, createCommentVNode, createVNode, createElementVNode, withModifiers, withCtx, createTextVNode, h, unref, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
-
import { UploadOutlined } from "@ant-design/icons-vue";
|
|
3
|
-
import { message } from "ant-design-vue";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-design-mobile.es28.js";
|
|
6
|
-
const _hoisted_1 = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "upload-progress"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_2 = { class: "progress-text-container" };
|
|
11
|
-
const _hoisted_3 = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "file-list"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_4 = { class: "file-item-name" };
|
|
16
|
-
const _sfc_main = {
|
|
17
|
-
__name: "uploadComp",
|
|
18
|
-
props: ["record"],
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const fileList = ref([]);
|
|
22
|
-
const uploadControllers = ref(/* @__PURE__ */ new Map());
|
|
23
|
-
const currentUploadingUid = ref(null);
|
|
24
|
-
const isUploading = computed(() => !!currentUploadingUid.value);
|
|
25
|
-
const buttonColor = computed(() => {
|
|
26
|
-
return props.record.options?.style?.buttonColor;
|
|
27
|
-
});
|
|
28
|
-
const buttonSize = computed(() => {
|
|
29
|
-
return props.record.options?.style?.buttonSize;
|
|
30
|
-
});
|
|
31
|
-
const acceptTypes = computed(() => {
|
|
32
|
-
if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
|
|
33
|
-
return "";
|
|
34
|
-
}
|
|
35
|
-
const formatMap = {
|
|
36
|
-
pdf: ".pdf",
|
|
37
|
-
word: ".doc,.docx",
|
|
38
|
-
excle: ".xls,.xlsx",
|
|
39
|
-
txt: ".txt",
|
|
40
|
-
ppt: ".ppt,.pptx"
|
|
41
|
-
};
|
|
42
|
-
return props.record.options.format.map((format) => formatMap[format] || `.${format}`).join(",");
|
|
43
|
-
});
|
|
44
|
-
const beforeUpload = (file) => {
|
|
45
|
-
const isValidType = checkFileType(file);
|
|
46
|
-
if (!isValidType) {
|
|
47
|
-
const allowedFormats = props.record.options?.format || [];
|
|
48
|
-
const formatNames = {
|
|
49
|
-
pdf: "PDF",
|
|
50
|
-
word: "Word",
|
|
51
|
-
excle: "Excel",
|
|
52
|
-
txt: "TXT",
|
|
53
|
-
ppt: "PPT"
|
|
54
|
-
};
|
|
55
|
-
const formatText = allowedFormats.map((f) => formatNames[f] || f.toUpperCase()).join("、");
|
|
56
|
-
if (formatText) {
|
|
57
|
-
message.error(`只支持 ${formatText} 格式的文件`);
|
|
58
|
-
} else {
|
|
59
|
-
message.error("请先配置允许的文件格式");
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
};
|
|
65
|
-
const checkFileType = (file) => {
|
|
66
|
-
if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
const fileName = (file.name || file.fileName || "").toLowerCase();
|
|
70
|
-
if (!fileName) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
const allowedFormats = props.record.options.format;
|
|
74
|
-
const formatExtensions = {
|
|
75
|
-
pdf: [".pdf"],
|
|
76
|
-
word: [".doc", ".docx"],
|
|
77
|
-
excle: [".xls", ".xlsx"],
|
|
78
|
-
txt: [".txt"],
|
|
79
|
-
ppt: [".ppt", ".pptx"]
|
|
80
|
-
};
|
|
81
|
-
const allowedExtensions = allowedFormats.reduce((exts, format) => {
|
|
82
|
-
if (formatExtensions[format]) {
|
|
83
|
-
exts.push(...formatExtensions[format]);
|
|
84
|
-
}
|
|
85
|
-
return exts;
|
|
86
|
-
}, []);
|
|
87
|
-
if (allowedExtensions.length === 0) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
const isValid = allowedExtensions.some((ext) => fileName.endsWith(ext));
|
|
91
|
-
console.log("文件类型检查:", {
|
|
92
|
-
fileName,
|
|
93
|
-
allowedFormats,
|
|
94
|
-
allowedExtensions,
|
|
95
|
-
isValid
|
|
96
|
-
});
|
|
97
|
-
return isValid;
|
|
98
|
-
};
|
|
99
|
-
const customRequest = (options) => {
|
|
100
|
-
const { file, onSuccess, onProgress } = options;
|
|
101
|
-
({ uid: file.uid, name: file.name });
|
|
102
|
-
currentUploadingUid.value = file.uid;
|
|
103
|
-
let progress = 0;
|
|
104
|
-
const timer = setInterval(() => {
|
|
105
|
-
progress = Math.min(progress + 8 + Math.random() * 6, 99);
|
|
106
|
-
onProgress({ percent: progress });
|
|
107
|
-
}, 200);
|
|
108
|
-
const doneTimer = setTimeout(() => {
|
|
109
|
-
clearInterval(timer);
|
|
110
|
-
uploadControllers.value.delete(file.uid);
|
|
111
|
-
fileList.value.push({ uid: file.uid, name: file.name });
|
|
112
|
-
message.success("上传成功");
|
|
113
|
-
onSuccess({ url: URL.createObjectURL(file), name: file.name });
|
|
114
|
-
if (currentUploadingUid.value === file.uid) currentUploadingUid.value = null;
|
|
115
|
-
}, 2e3);
|
|
116
|
-
uploadControllers.value.set(file.uid, { timer, doneTimer });
|
|
117
|
-
};
|
|
118
|
-
const onCancelUpload = () => {
|
|
119
|
-
const uid = currentUploadingUid.value;
|
|
120
|
-
if (!uid) return;
|
|
121
|
-
const ctrl = uploadControllers.value.get(uid);
|
|
122
|
-
if (ctrl) {
|
|
123
|
-
if (ctrl.timer) clearInterval(ctrl.timer);
|
|
124
|
-
if (ctrl.doneTimer) clearTimeout(ctrl.doneTimer);
|
|
125
|
-
uploadControllers.value.delete(uid);
|
|
126
|
-
}
|
|
127
|
-
const item = fileList.value.find((f) => f.uid === uid);
|
|
128
|
-
if (item) {
|
|
129
|
-
item.status = "cancelled";
|
|
130
|
-
item.percent = 0;
|
|
131
|
-
}
|
|
132
|
-
currentUploadingUid.value = null;
|
|
133
|
-
message.info("已取消上传");
|
|
134
|
-
};
|
|
135
|
-
const removeFile = (uid) => {
|
|
136
|
-
const item = fileList.value.find((f) => f.uid === uid);
|
|
137
|
-
if (item && item.status === "uploading") {
|
|
138
|
-
currentUploadingUid.value = uid;
|
|
139
|
-
onCancelUpload();
|
|
140
|
-
}
|
|
141
|
-
fileList.value = fileList.value.filter((f) => f.uid !== uid);
|
|
142
|
-
};
|
|
143
|
-
return (_ctx, _cache) => {
|
|
144
|
-
const _component_a_button = resolveComponent("a-button");
|
|
145
|
-
const _component_a_upload = resolveComponent("a-upload");
|
|
146
|
-
return openBlock(), createElementBlock("div", {
|
|
147
|
-
class: "upload-comp",
|
|
148
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
149
|
-
}, [
|
|
150
|
-
isUploading.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
151
|
-
_cache[2] || (_cache[2] = createElementVNode("div", { class: "spinner" }, null, -1)),
|
|
152
|
-
createElementVNode("div", _hoisted_2, [
|
|
153
|
-
_cache[1] || (_cache[1] = createElementVNode("div", { class: "progress-text" }, "文件导入中...", -1)),
|
|
154
|
-
createVNode(_component_a_button, {
|
|
155
|
-
class: "cancel-btn",
|
|
156
|
-
onClick: withModifiers(onCancelUpload, ["stop"]),
|
|
157
|
-
size: "small"
|
|
158
|
-
}, {
|
|
159
|
-
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
160
|
-
createTextVNode("取消", -1)
|
|
161
|
-
])]),
|
|
162
|
-
_: 1
|
|
163
|
-
})
|
|
164
|
-
])
|
|
165
|
-
])) : createCommentVNode("", true),
|
|
166
|
-
createVNode(_component_a_upload, {
|
|
167
|
-
accept: acceptTypes.value,
|
|
168
|
-
multiple: true,
|
|
169
|
-
"before-upload": beforeUpload,
|
|
170
|
-
"custom-request": customRequest,
|
|
171
|
-
"show-upload-list": false,
|
|
172
|
-
disabled: false
|
|
173
|
-
}, {
|
|
174
|
-
default: withCtx(() => [
|
|
175
|
-
createVNode(_component_a_button, {
|
|
176
|
-
type: "primary",
|
|
177
|
-
style: normalizeStyle({
|
|
178
|
-
backgroundColor: buttonColor.value,
|
|
179
|
-
borderColor: buttonColor.value,
|
|
180
|
-
fontSize: buttonSize.value + "px",
|
|
181
|
-
height: "auto",
|
|
182
|
-
padding: "4px 12px",
|
|
183
|
-
minHeight: "28px"
|
|
184
|
-
}),
|
|
185
|
-
icon: h(unref(UploadOutlined))
|
|
186
|
-
}, {
|
|
187
|
-
icon: withCtx(() => [
|
|
188
|
-
createVNode(unref(UploadOutlined))
|
|
189
|
-
]),
|
|
190
|
-
default: withCtx(() => [
|
|
191
|
-
createTextVNode(" " + toDisplayString(props.record.options?.style?.buttonText), 1)
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
}, 8, ["style", "icon"])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["accept"]),
|
|
198
|
-
fileList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
199
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file) => {
|
|
200
|
-
return openBlock(), createElementBlock("div", {
|
|
201
|
-
class: "file-item",
|
|
202
|
-
key: file.uid
|
|
203
|
-
}, [
|
|
204
|
-
createElementVNode("span", _hoisted_4, toDisplayString(file.name), 1),
|
|
205
|
-
createVNode(_component_a_button, {
|
|
206
|
-
type: "link",
|
|
207
|
-
danger: "",
|
|
208
|
-
size: "small",
|
|
209
|
-
onClick: withModifiers(($event) => removeFile(file.uid), ["stop"])
|
|
210
|
-
}, {
|
|
211
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
212
|
-
createTextVNode("删除", -1)
|
|
213
|
-
])]),
|
|
214
|
-
_: 1
|
|
215
|
-
}, 8, ["onClick"])
|
|
216
|
-
]);
|
|
217
|
-
}), 128))
|
|
218
|
-
])) : createCommentVNode("", true)
|
|
219
|
-
], 4);
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4363e2fe"]]);
|
|
224
|
-
export {
|
|
225
|
-
Upload as default
|
|
226
|
-
};
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { ref, computed, resolveComponent, createElementBlock, openBlock, normalizeStyle, createCommentVNode, createVNode, createElementVNode, withModifiers, withCtx, createTextVNode, h, unref, toDisplayString, Fragment, renderList } from "vue";
|
|
2
|
-
import { UploadOutlined } from "@ant-design/icons-vue";
|
|
3
|
-
import { message } from "ant-design-vue";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-design-pc.es28.js";
|
|
6
|
-
const _hoisted_1 = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "upload-progress"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_2 = { class: "progress-text-container" };
|
|
11
|
-
const _hoisted_3 = {
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "file-list"
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_4 = { class: "file-item-name" };
|
|
16
|
-
const _sfc_main = {
|
|
17
|
-
__name: "uploadComp",
|
|
18
|
-
props: ["record"],
|
|
19
|
-
setup(__props) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const fileList = ref([]);
|
|
22
|
-
const uploadControllers = ref(/* @__PURE__ */ new Map());
|
|
23
|
-
const currentUploadingUid = ref(null);
|
|
24
|
-
const isUploading = computed(() => !!currentUploadingUid.value);
|
|
25
|
-
const buttonColor = computed(() => {
|
|
26
|
-
return props.record.options?.style?.buttonColor;
|
|
27
|
-
});
|
|
28
|
-
const buttonSize = computed(() => {
|
|
29
|
-
return props.record.options?.style?.buttonSize;
|
|
30
|
-
});
|
|
31
|
-
const acceptTypes = computed(() => {
|
|
32
|
-
if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
|
|
33
|
-
return "";
|
|
34
|
-
}
|
|
35
|
-
const formatMap = {
|
|
36
|
-
pdf: ".pdf",
|
|
37
|
-
word: ".doc,.docx",
|
|
38
|
-
excle: ".xls,.xlsx",
|
|
39
|
-
txt: ".txt",
|
|
40
|
-
ppt: ".ppt,.pptx"
|
|
41
|
-
};
|
|
42
|
-
return props.record.options.format.map((format) => formatMap[format] || `.${format}`).join(",");
|
|
43
|
-
});
|
|
44
|
-
const beforeUpload = (file) => {
|
|
45
|
-
const isValidType = checkFileType(file);
|
|
46
|
-
if (!isValidType) {
|
|
47
|
-
const allowedFormats = props.record.options?.format || [];
|
|
48
|
-
const formatNames = {
|
|
49
|
-
pdf: "PDF",
|
|
50
|
-
word: "Word",
|
|
51
|
-
excle: "Excel",
|
|
52
|
-
txt: "TXT",
|
|
53
|
-
ppt: "PPT"
|
|
54
|
-
};
|
|
55
|
-
const formatText = allowedFormats.map((f) => formatNames[f] || f.toUpperCase()).join("、");
|
|
56
|
-
if (formatText) {
|
|
57
|
-
message.error(`只支持 ${formatText} 格式的文件`);
|
|
58
|
-
} else {
|
|
59
|
-
message.error("请先配置允许的文件格式");
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
};
|
|
65
|
-
const checkFileType = (file) => {
|
|
66
|
-
if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
const fileName = (file.name || file.fileName || "").toLowerCase();
|
|
70
|
-
if (!fileName) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
const allowedFormats = props.record.options.format;
|
|
74
|
-
const formatExtensions = {
|
|
75
|
-
pdf: [".pdf"],
|
|
76
|
-
word: [".doc", ".docx"],
|
|
77
|
-
excle: [".xls", ".xlsx"],
|
|
78
|
-
txt: [".txt"],
|
|
79
|
-
ppt: [".ppt", ".pptx"]
|
|
80
|
-
};
|
|
81
|
-
const allowedExtensions = allowedFormats.reduce((exts, format) => {
|
|
82
|
-
if (formatExtensions[format]) {
|
|
83
|
-
exts.push(...formatExtensions[format]);
|
|
84
|
-
}
|
|
85
|
-
return exts;
|
|
86
|
-
}, []);
|
|
87
|
-
if (allowedExtensions.length === 0) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
const isValid = allowedExtensions.some((ext) => fileName.endsWith(ext));
|
|
91
|
-
console.log("文件类型检查:", {
|
|
92
|
-
fileName,
|
|
93
|
-
allowedFormats,
|
|
94
|
-
allowedExtensions,
|
|
95
|
-
isValid
|
|
96
|
-
});
|
|
97
|
-
return isValid;
|
|
98
|
-
};
|
|
99
|
-
const customRequest = (options) => {
|
|
100
|
-
const { file, onSuccess, onProgress } = options;
|
|
101
|
-
({ uid: file.uid, name: file.name });
|
|
102
|
-
currentUploadingUid.value = file.uid;
|
|
103
|
-
let progress = 0;
|
|
104
|
-
const timer = setInterval(() => {
|
|
105
|
-
progress = Math.min(progress + 8 + Math.random() * 6, 99);
|
|
106
|
-
onProgress({ percent: progress });
|
|
107
|
-
}, 200);
|
|
108
|
-
const doneTimer = setTimeout(() => {
|
|
109
|
-
clearInterval(timer);
|
|
110
|
-
uploadControllers.value.delete(file.uid);
|
|
111
|
-
fileList.value.push({ uid: file.uid, name: file.name });
|
|
112
|
-
message.success("上传成功");
|
|
113
|
-
onSuccess({ url: URL.createObjectURL(file), name: file.name });
|
|
114
|
-
if (currentUploadingUid.value === file.uid) currentUploadingUid.value = null;
|
|
115
|
-
}, 2e3);
|
|
116
|
-
uploadControllers.value.set(file.uid, { timer, doneTimer });
|
|
117
|
-
};
|
|
118
|
-
const onCancelUpload = () => {
|
|
119
|
-
const uid = currentUploadingUid.value;
|
|
120
|
-
if (!uid) return;
|
|
121
|
-
const ctrl = uploadControllers.value.get(uid);
|
|
122
|
-
if (ctrl) {
|
|
123
|
-
if (ctrl.timer) clearInterval(ctrl.timer);
|
|
124
|
-
if (ctrl.doneTimer) clearTimeout(ctrl.doneTimer);
|
|
125
|
-
uploadControllers.value.delete(uid);
|
|
126
|
-
}
|
|
127
|
-
const item = fileList.value.find((f) => f.uid === uid);
|
|
128
|
-
if (item) {
|
|
129
|
-
item.status = "cancelled";
|
|
130
|
-
item.percent = 0;
|
|
131
|
-
}
|
|
132
|
-
currentUploadingUid.value = null;
|
|
133
|
-
message.info("已取消上传");
|
|
134
|
-
};
|
|
135
|
-
const removeFile = (uid) => {
|
|
136
|
-
const item = fileList.value.find((f) => f.uid === uid);
|
|
137
|
-
if (item && item.status === "uploading") {
|
|
138
|
-
currentUploadingUid.value = uid;
|
|
139
|
-
onCancelUpload();
|
|
140
|
-
}
|
|
141
|
-
fileList.value = fileList.value.filter((f) => f.uid !== uid);
|
|
142
|
-
};
|
|
143
|
-
return (_ctx, _cache) => {
|
|
144
|
-
const _component_a_button = resolveComponent("a-button");
|
|
145
|
-
const _component_a_upload = resolveComponent("a-upload");
|
|
146
|
-
return openBlock(), createElementBlock("div", {
|
|
147
|
-
class: "upload-comp",
|
|
148
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
149
|
-
}, [
|
|
150
|
-
isUploading.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
151
|
-
_cache[2] || (_cache[2] = createElementVNode("div", { class: "spinner" }, null, -1)),
|
|
152
|
-
createElementVNode("div", _hoisted_2, [
|
|
153
|
-
_cache[1] || (_cache[1] = createElementVNode("div", { class: "progress-text" }, "文件导入中...", -1)),
|
|
154
|
-
createVNode(_component_a_button, {
|
|
155
|
-
class: "cancel-btn",
|
|
156
|
-
onClick: withModifiers(onCancelUpload, ["stop"]),
|
|
157
|
-
size: "small"
|
|
158
|
-
}, {
|
|
159
|
-
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
160
|
-
createTextVNode("取消", -1)
|
|
161
|
-
])]),
|
|
162
|
-
_: 1
|
|
163
|
-
})
|
|
164
|
-
])
|
|
165
|
-
])) : createCommentVNode("", true),
|
|
166
|
-
createVNode(_component_a_upload, {
|
|
167
|
-
accept: acceptTypes.value,
|
|
168
|
-
multiple: true,
|
|
169
|
-
"before-upload": beforeUpload,
|
|
170
|
-
"custom-request": customRequest,
|
|
171
|
-
"show-upload-list": false,
|
|
172
|
-
disabled: false
|
|
173
|
-
}, {
|
|
174
|
-
default: withCtx(() => [
|
|
175
|
-
createVNode(_component_a_button, {
|
|
176
|
-
type: "primary",
|
|
177
|
-
style: normalizeStyle({
|
|
178
|
-
backgroundColor: buttonColor.value,
|
|
179
|
-
borderColor: buttonColor.value,
|
|
180
|
-
fontSize: buttonSize.value + "px",
|
|
181
|
-
height: "auto",
|
|
182
|
-
padding: "4px 12px",
|
|
183
|
-
minHeight: "28px"
|
|
184
|
-
}),
|
|
185
|
-
icon: h(unref(UploadOutlined))
|
|
186
|
-
}, {
|
|
187
|
-
icon: withCtx(() => [
|
|
188
|
-
createVNode(unref(UploadOutlined))
|
|
189
|
-
]),
|
|
190
|
-
default: withCtx(() => [
|
|
191
|
-
createTextVNode(" " + toDisplayString(props.record.options?.style?.buttonText), 1)
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
}, 8, ["style", "icon"])
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["accept"]),
|
|
198
|
-
fileList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
199
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file) => {
|
|
200
|
-
return openBlock(), createElementBlock("div", {
|
|
201
|
-
class: "file-item",
|
|
202
|
-
key: file.uid
|
|
203
|
-
}, [
|
|
204
|
-
createElementVNode("span", _hoisted_4, toDisplayString(file.name), 1),
|
|
205
|
-
createVNode(_component_a_button, {
|
|
206
|
-
type: "link",
|
|
207
|
-
danger: "",
|
|
208
|
-
size: "small",
|
|
209
|
-
onClick: withModifiers(($event) => removeFile(file.uid), ["stop"])
|
|
210
|
-
}, {
|
|
211
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
212
|
-
createTextVNode("删除", -1)
|
|
213
|
-
])]),
|
|
214
|
-
_: 1
|
|
215
|
-
}, 8, ["onClick"])
|
|
216
|
-
]);
|
|
217
|
-
}), 128))
|
|
218
|
-
])) : createCommentVNode("", true)
|
|
219
|
-
], 4);
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4363e2fe"]]);
|
|
224
|
-
export {
|
|
225
|
-
Upload as default
|
|
226
|
-
};
|
|
File without changes
|
|
File without changes
|