kouxiangtang 0.0.77 → 0.0.78
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/{AttachmentUploader-VeuPJ5r2.js → AttachmentUploader-Dk3pI8xI.js} +42 -40
- package/dist/AttachmentUploader-Dk3pI8xI.js.map +1 -0
- package/dist/{ImageUploader-KaQt6Hgh.js → ImageUploader-Sl6CARAH.js} +4 -4
- package/dist/{ImageUploader-KaQt6Hgh.js.map → ImageUploader-Sl6CARAH.js.map} +1 -1
- package/dist/ImagesUploader-CD6qu0oD.js +123 -0
- package/dist/ImagesUploader-CD6qu0oD.js.map +1 -0
- package/dist/{RichTextEditor-0GJsHXVB.js → RichTextEditor-BN-Grymy.js} +2 -2
- package/dist/{RichTextEditor-0GJsHXVB.js.map → RichTextEditor-BN-Grymy.js.map} +1 -1
- package/dist/{config-D5pEVn4c.js → config-3CmGvWbJ.js} +2 -2
- package/dist/{config-D5pEVn4c.js.map → config-3CmGvWbJ.js.map} +1 -1
- package/dist/{config-DhXT6BVA.js → config-7NNTCgWz.js} +2 -2
- package/dist/{config-DhXT6BVA.js.map → config-7NNTCgWz.js.map} +1 -1
- package/dist/{config-0f5K4JqQ.js → config-B7sfuPS-.js} +2 -2
- package/dist/{config-0f5K4JqQ.js.map → config-B7sfuPS-.js.map} +1 -1
- package/dist/{config-BQCNJgQ7.js → config-BDUo3FW4.js} +2 -2
- package/dist/{config-BQCNJgQ7.js.map → config-BDUo3FW4.js.map} +1 -1
- package/dist/{config-B7U-ho3i.js → config-BIoYHFta.js} +3 -3
- package/dist/{config-B7U-ho3i.js.map → config-BIoYHFta.js.map} +1 -1
- package/dist/{config-CLBZfmse.js → config-BMegUoCu.js} +2 -2
- package/dist/{config-CLBZfmse.js.map → config-BMegUoCu.js.map} +1 -1
- package/dist/{config-C5c2fW5F.js → config-BPF5NKbv.js} +2 -2
- package/dist/{config-C5c2fW5F.js.map → config-BPF5NKbv.js.map} +1 -1
- package/dist/{config-DqTcnHXu.js → config-CEbzlR4L.js} +2 -2
- package/dist/{config-DqTcnHXu.js.map → config-CEbzlR4L.js.map} +1 -1
- package/dist/{config-ldk1g-bQ.js → config-CWEv8XKO.js} +2 -2
- package/dist/{config-ldk1g-bQ.js.map → config-CWEv8XKO.js.map} +1 -1
- package/dist/{config-jpna55zA.js → config-Cs24dvIw.js} +2 -2
- package/dist/{config-jpna55zA.js.map → config-Cs24dvIw.js.map} +1 -1
- package/dist/{config-DwedOToS.js → config-D6JmkLzW.js} +2 -2
- package/dist/{config-DwedOToS.js.map → config-D6JmkLzW.js.map} +1 -1
- package/dist/{config-aMhYhd0D.js → config-DFY-g88P.js} +2 -2
- package/dist/{config-aMhYhd0D.js.map → config-DFY-g88P.js.map} +1 -1
- package/dist/{config-Couk86DP.js → config-DIgyOzyY.js} +2 -2
- package/dist/{config-Couk86DP.js.map → config-DIgyOzyY.js.map} +1 -1
- package/dist/{config-Cma6O3K5.js → config-DWQ07KGg.js} +2 -2
- package/dist/{config-Cma6O3K5.js.map → config-DWQ07KGg.js.map} +1 -1
- package/dist/{config-BIHanElz.js → config-Dfv9X_oH.js} +3 -3
- package/dist/{config-BIHanElz.js.map → config-Dfv9X_oH.js.map} +1 -1
- package/dist/{config-CT-Llvpn.js → config-Gr_n4RJU.js} +3 -3
- package/dist/{config-CT-Llvpn.js.map → config-Gr_n4RJU.js.map} +1 -1
- package/dist/{config-BwmOXgir.js → config-kSnMLu_i.js} +2 -2
- package/dist/{config-BwmOXgir.js.map → config-kSnMLu_i.js.map} +1 -1
- package/dist/{config-BD29PMfM.js → config-nxWFYd4H.js} +2 -2
- package/dist/{config-BD29PMfM.js.map → config-nxWFYd4H.js.map} +1 -1
- package/dist/{config-BOD0Nhuj.js → config-urM6mrhD.js} +2 -2
- package/dist/{config-BOD0Nhuj.js.map → config-urM6mrhD.js.map} +1 -1
- package/dist/{index-CrXmXhG9.js → index-DWaIPnvt.js} +1822 -1793
- package/dist/index-DWaIPnvt.js.map +1 -0
- package/dist/kouxiangtang.js +1 -1
- package/dist/kouxiangtang.umd.cjs +8 -8
- package/dist/kouxiangtang.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/AttachmentUploader-VeuPJ5r2.js.map +0 -1
- package/dist/ImagesUploader-C0CS_P7-.js +0 -121
- package/dist/ImagesUploader-C0CS_P7-.js.map +0 -1
- package/dist/index-CrXmXhG9.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { ElUpload as q, ElIcon as
|
|
3
|
-
import { _ as Q,
|
|
1
|
+
import { computed as F, ref as y, openBlock as p, createElementBlock as I, Fragment as b, createVNode as r, unref as s, normalizeClass as M, withModifiers as R, withCtx as i, createBlock as f, createTextVNode as j, createElementVNode as k, renderList as L, toDisplayString as O, createCommentVNode as S } from "vue";
|
|
2
|
+
import { ElUpload as q, ElIcon as v, ElButton as W, ElDialog as G, ElForm as H, ElFormItem as J, ElInput as K, ElMessage as u, ElLoading as w } from "element-plus";
|
|
3
|
+
import { _ as Q, j as X, p as Y, d as Z, k as ee, h as te, m as ae } from "./index-DWaIPnvt.js";
|
|
4
4
|
import "./el-progress-l0sNRNKZ.js";
|
|
5
|
-
const
|
|
5
|
+
const se = ["src"], ne = { class: "file-type" }, le = {
|
|
6
6
|
__name: "AttachmentUploader",
|
|
7
7
|
props: {
|
|
8
8
|
pics: {
|
|
@@ -26,8 +26,8 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
emits: ["on-success", "on-remove", "on-change"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
29
|
+
setup(E, { emit: C }) {
|
|
30
|
+
const m = C, n = E, g = F(() => n.pics.map((e) => {
|
|
31
31
|
const t = e.url.substring(e.url.lastIndexOf(".") + 1);
|
|
32
32
|
if (typeof e.name !== void 0)
|
|
33
33
|
return e.fileType = t, e;
|
|
@@ -40,8 +40,8 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
return { ...e, name: e.id, fileType: t };
|
|
43
|
-
})), _ =
|
|
44
|
-
|
|
43
|
+
})), _ = y(""), h = y(!1);
|
|
44
|
+
y(n);
|
|
45
45
|
const x = X().fileUploadUrl;
|
|
46
46
|
`${localStorage.getItem("token")}`;
|
|
47
47
|
const V = (e) => {
|
|
@@ -65,59 +65,61 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
65
65
|
};
|
|
66
66
|
}, !1) : (a(e), !1);
|
|
67
67
|
});
|
|
68
|
-
},
|
|
69
|
-
e.status === "success" &&
|
|
68
|
+
}, U = (e) => {
|
|
69
|
+
e.status === "success" && (n.props.deleteUrl ? te.remove(`${n.props.deleteUrl}/${e.id}/attachment`).then(() => {
|
|
70
|
+
m("on-remove", e);
|
|
71
|
+
}) : m("on-remove", e));
|
|
70
72
|
}, T = () => {
|
|
71
|
-
|
|
73
|
+
u({
|
|
72
74
|
message: `最多只能上传 ${n.props.limit} 个文件!`,
|
|
73
75
|
type: "warning"
|
|
74
76
|
});
|
|
75
77
|
}, B = (e) => {
|
|
76
|
-
_.value = e.url,
|
|
78
|
+
_.value = e.url, h.value = !0;
|
|
77
79
|
}, N = (e) => {
|
|
78
80
|
const t = e.name.substring(0, e.name.lastIndexOf("."));
|
|
79
81
|
if (!/^[\u4e00-\u9fa5\w-_]+$/.test(t))
|
|
80
|
-
return
|
|
82
|
+
return u({
|
|
81
83
|
message: "请勿输入特殊字符!",
|
|
82
84
|
type: "warning"
|
|
83
85
|
}), !1;
|
|
84
|
-
V(e).then((l) => l.size / 1024 / 1024 < 5 ? (
|
|
86
|
+
V(e).then((l) => l.size / 1024 / 1024 < 5 ? (D(l), !1) : (u({
|
|
85
87
|
message: "上传大小不能超过 5MB!",
|
|
86
88
|
type: "warning"
|
|
87
89
|
}), !1));
|
|
88
90
|
};
|
|
89
|
-
function
|
|
91
|
+
function $(e, t) {
|
|
90
92
|
if (!e.name) {
|
|
91
|
-
|
|
93
|
+
u({
|
|
92
94
|
message: "附件名称不能为空!",
|
|
93
95
|
type: "warning"
|
|
94
96
|
});
|
|
95
97
|
return;
|
|
96
98
|
}
|
|
97
|
-
|
|
99
|
+
m("on-change", e);
|
|
98
100
|
}
|
|
99
|
-
function
|
|
100
|
-
return
|
|
101
|
+
function D(e) {
|
|
102
|
+
return w.service({ text: "上传中,请稍后", background: "rgba(0,0,0,0.3)" }), new Promise((t, a) => {
|
|
101
103
|
const l = new FormData();
|
|
102
|
-
l.append("file", e),
|
|
104
|
+
l.append("file", e), ae.post(x, l, {}).then((o) => (w.service().close(), u({
|
|
103
105
|
message: "上传成功",
|
|
104
106
|
type: "success"
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
+
}), m("on-success", o.data.data), t(o.data), !1)).catch(() => {
|
|
108
|
+
w.service().close(), u({
|
|
107
109
|
message: "上传失败",
|
|
108
110
|
type: "warning"
|
|
109
111
|
}), a("Upload failed");
|
|
110
112
|
});
|
|
111
113
|
});
|
|
112
114
|
}
|
|
113
|
-
return (e, t) => (
|
|
115
|
+
return (e, t) => (p(), I(b, null, [
|
|
114
116
|
r(s(q), {
|
|
115
117
|
"file-list": g.value,
|
|
116
118
|
action: s(x),
|
|
117
119
|
limit: n.props.limit,
|
|
118
120
|
accept: n.props.accept,
|
|
119
121
|
"list-type": n.props.listType,
|
|
120
|
-
"on-remove":
|
|
122
|
+
"on-remove": U,
|
|
121
123
|
"before-upload": N,
|
|
122
124
|
"on-exceed": T,
|
|
123
125
|
"on-preview": B,
|
|
@@ -132,7 +134,7 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
132
134
|
}, ["prevent"]))
|
|
133
135
|
}, {
|
|
134
136
|
default: i(() => [
|
|
135
|
-
n.props.listType !== "text" ? (
|
|
137
|
+
n.props.listType !== "text" ? (p(), f(s(v), {
|
|
136
138
|
key: 0,
|
|
137
139
|
disabled: !0
|
|
138
140
|
}, {
|
|
@@ -140,7 +142,7 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
140
142
|
r(s(Y))
|
|
141
143
|
]),
|
|
142
144
|
_: 1
|
|
143
|
-
})) : (
|
|
145
|
+
})) : (p(), f(s(W), {
|
|
144
146
|
key: 1,
|
|
145
147
|
class: "upload-button",
|
|
146
148
|
type: "primary"
|
|
@@ -154,26 +156,26 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
154
156
|
_: 1
|
|
155
157
|
}, 8, ["file-list", "action", "limit", "accept", "list-type", "show-file-list", "class"]),
|
|
156
158
|
r(s(G), {
|
|
157
|
-
modelValue:
|
|
158
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) =>
|
|
159
|
+
modelValue: h.value,
|
|
160
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => h.value = a)
|
|
159
161
|
}, {
|
|
160
162
|
default: i(() => [
|
|
161
|
-
|
|
163
|
+
k("img", {
|
|
162
164
|
"w-full": "",
|
|
163
165
|
src: _.value,
|
|
164
166
|
alt: "Preview Image"
|
|
165
|
-
}, null, 8,
|
|
167
|
+
}, null, 8, se)
|
|
166
168
|
]),
|
|
167
169
|
_: 1
|
|
168
170
|
}, 8, ["modelValue"]),
|
|
169
|
-
n.props.listType == "text" ? (
|
|
171
|
+
n.props.listType == "text" ? (p(), f(s(H), { key: 0 }, {
|
|
170
172
|
default: i(() => [
|
|
171
|
-
(
|
|
173
|
+
(p(!0), I(b, null, L(g.value, (a, l) => (p(), f(s(J), {
|
|
172
174
|
key: l,
|
|
173
175
|
class: "file-list"
|
|
174
176
|
}, {
|
|
175
177
|
default: i(() => [
|
|
176
|
-
r(s(
|
|
178
|
+
r(s(v), {
|
|
177
179
|
color: "#73767a",
|
|
178
180
|
size: 14
|
|
179
181
|
}, {
|
|
@@ -185,13 +187,13 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
185
187
|
r(s(K), {
|
|
186
188
|
modelValue: a.name,
|
|
187
189
|
"onUpdate:modelValue": (o) => a.name = o,
|
|
188
|
-
onChange: (o) =>
|
|
190
|
+
onChange: (o) => $(a)
|
|
189
191
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
|
|
190
|
-
|
|
191
|
-
r(s(
|
|
192
|
+
k("span", ne, "." + O(a.fileType), 1),
|
|
193
|
+
r(s(v), {
|
|
192
194
|
color: "#73767a",
|
|
193
195
|
size: 12,
|
|
194
|
-
onClick: (o) =>
|
|
196
|
+
onClick: (o) => U(a)
|
|
195
197
|
}, {
|
|
196
198
|
default: i(() => [
|
|
197
199
|
r(s(ee))
|
|
@@ -206,8 +208,8 @@ const ae = ["src"], se = { class: "file-type" }, ne = {
|
|
|
206
208
|
})) : S("", !0)
|
|
207
209
|
], 64));
|
|
208
210
|
}
|
|
209
|
-
},
|
|
211
|
+
}, pe = /* @__PURE__ */ Q(le, [["__scopeId", "data-v-bea56e43"]]);
|
|
210
212
|
export {
|
|
211
|
-
|
|
213
|
+
pe as default
|
|
212
214
|
};
|
|
213
|
-
//# sourceMappingURL=AttachmentUploader-
|
|
215
|
+
//# sourceMappingURL=AttachmentUploader-Dk3pI8xI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentUploader-Dk3pI8xI.js","sources":["../src/framework/field/attachment/AttachmentUploader.vue"],"sourcesContent":["<script setup>\nimport {\n ElUpload,\n ElIcon,\n ElDialog,\n ElForm,\n ElFormItem,\n ElButton,\n ElInput,\n} from \"element-plus\";\nimport axios from \"axios\";\nimport http from \"../../utils/http\";\nimport { getConfig } from \"../../config-loader\";\nimport { ref, computed } from \"vue\";\nimport { ElLoading, ElMessage } from \"element-plus\";\nimport { Plus, Document, Close } from \"@element-plus/icons-vue\";\n\nconst emit = defineEmits([\"on-success\", \"on-remove\", \"on-change\"]);\nconst props = defineProps({\n pics: {\n type: Array,\n default() {\n return [];\n },\n },\n limit: { type: Number },\n props: {\n type: Object,\n default() {\n return {\n listType: \"picture-card\", //'text' | 'picture' | 'picture-card'\n limit: 5, //最多上传几个文件\n accept: \"image/*\",\n };\n },\n },\n});\n\nconst files = computed(() => {\n return props.pics.map((item) => {\n const fileType = item.url.substring(item.url.lastIndexOf(\".\") + 1);\n if (typeof item.name !== undefined) {\n item.fileType = fileType;\n return item;\n }\n\n if (item.url) {\n const parts = item.url.split(\"/\");\n const namedItem = {\n ...item,\n name: parts[parts.length - 1],\n fileType: fileType,\n };\n return namedItem;\n }\n\n return { ...item, name: item.id, fileType: fileType };\n });\n});\nconst dialogImageUrl = ref(\"\");\nconst dialogVisible = ref(false);\nconst imageUrl = ref(props);\nconst uploadUrl = getConfig().fileUploadUrl;\nconst header = {\n Authorization: `Bearer ${localStorage.getItem(\"token\")}`,\n};\nconst compressImg = (file) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n\n return new Promise(function (resolve, reject) {\n if (!file.type.startsWith(\"image/\")) {\n resolve(file);\n return false;\n }\n reader.onload = async (e) => {\n const img = new Image();\n img.src = e.target.result;\n img.onload = () => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n canvas.toBlob(\n (blob) => {\n const newFile = new File([blob], file.name, {\n type: file.type,\n lastModified: Date.now(),\n });\n resolve(newFile);\n },\n file.type,\n 0.5,\n );\n };\n };\n return false;\n });\n};\nconst handleRemoveSuccess = (uploadFile) => {\n if (uploadFile.status === \"success\") {\n if (props.props.deleteUrl) {\n http\n .remove(`${props.props.deleteUrl}/${uploadFile.id}/attachment`)\n .then(() => {\n emit(\"on-remove\", uploadFile);\n });\n } else {\n emit(\"on-remove\", uploadFile);\n }\n }\n};\nconst handleExceed = () => {\n ElMessage({\n message: `最多只能上传 ${props.props.limit} 个文件!`,\n type: \"warning\",\n });\n};\nconst handlePictureCardPreview = (uploadFile) => {\n dialogImageUrl.value = uploadFile.url;\n dialogVisible.value = true;\n};\nconst handleBeforeUpload = (file) => {\n const fileName = file.name.substring(0, file.name.lastIndexOf(\".\"));\n const regex = /^[\\u4e00-\\u9fa5\\w-_]+$/;\n if (!regex.test(fileName)) {\n ElMessage({\n message: \"请勿输入特殊字符!\",\n type: \"warning\",\n });\n return false;\n }\n compressImg(file).then((newFile) => {\n if (newFile.size / 1024 / 1024 < 5) {\n uploadRequest(newFile);\n return false;\n } else {\n ElMessage({\n message: \"上传大小不能超过 5MB!\",\n type: \"warning\",\n });\n return false;\n }\n });\n};\n\nfunction handleFileNameChange(file, index) {\n if (!file.name) {\n ElMessage({\n message: \"附件名称不能为空!\",\n type: \"warning\",\n });\n return;\n }\n emit(\"on-change\", file);\n}\n\nfunction uploadRequest(file) {\n ElLoading.service({ text: \"上传中,请稍后\", background: \"rgba(0,0,0,0.3)\" });\n return new Promise((resolve, reject) => {\n const formData = new FormData();\n formData.append(\"file\", file);\n axios\n .post(uploadUrl, formData, {})\n .then((res) => {\n ElLoading.service().close();\n ElMessage({\n message: \"上传成功\",\n type: \"success\",\n });\n emit(\"on-success\", res.data.data);\n resolve(res.data);\n return false;\n })\n .catch(() => {\n ElLoading.service().close();\n ElMessage({\n message: \"上传失败\",\n type: \"warning\",\n });\n reject(\"Upload failed\");\n });\n });\n}\n</script>\n\n<template>\n <!-- 删除请求头加权限后请添加到组建中 :headers=\"header\"-->\n <el-upload\n :file-list=\"files\"\n :action=\"uploadUrl\"\n :limit=\"props.props.limit\"\n :accept=\"props.props.accept\"\n :list-type=\"props.props.listType\"\n :on-remove=\"handleRemoveSuccess\"\n :before-upload=\"handleBeforeUpload\"\n :on-exceed=\"handleExceed\"\n :on-preview=\"handlePictureCardPreview\"\n :multiple=\"true\"\n :http-request=\"\n () => {\n return false;\n }\n \"\n :show-file-list=\"props.props.listType !== 'text'\"\n :class=\"[\n 'upload-main',\n { 'disable-upload': files.length >= props.props.limit },\n ]\"\n @click.prevent\n >\n <template v-if=\"props.props.listType !== 'text'\">\n <el-icon :disabled=\"true\">\n <Plus />\n </el-icon>\n </template>\n <template v-else>\n <el-button class=\"upload-button\" type=\"primary\"> 上传附件 </el-button>\n </template>\n </el-upload>\n <el-dialog v-model=\"dialogVisible\">\n <img w-full :src=\"dialogImageUrl\" alt=\"Preview Image\" />\n </el-dialog>\n <el-form v-if=\"props.props.listType == 'text'\">\n <el-form-item v-for=\"(file, index) in files\" :key=\"index\" class=\"file-list\">\n <el-icon color=\"#73767a\" :size=\"14\">\n <Document />\n </el-icon>\n <el-input\n v-model=\"file.name\"\n @change=\"handleFileNameChange(file, index)\"\n />\n <span class=\"file-type\">.{{ file.fileType }}</span>\n <el-icon color=\"#73767a\" :size=\"12\" @click=\"handleRemoveSuccess(file)\">\n <Close />\n </el-icon>\n </el-form-item>\n </el-form>\n</template>\n<style scoped lang=\"scss\">\n:deep(.el-upload-list) {\n .el-upload-list__item-actions span {\n margin-left: 20px;\n }\n}\n\n.disable-upload {\n :deep(.el-upload--picture-card) {\n display: none !important;\n }\n\n :deep(.el-upload--text) {\n display: none !important;\n }\n\n :deep(.el-upload--picture) {\n display: none !important;\n }\n}\n.upload-main {\n flex-basis: 100%;\n}\n.file-list {\n display: flex;\n align-items: center;\n margin-top: 10px;\n .file-type {\n height: 22px;\n line-height: 22px;\n margin-right: 5px;\n background: #eeeeee;\n border-radius: 4px;\n font-size: 12px;\n padding: 0 4px;\n }\n :deep(.el-form-item__content) {\n display: contents;\n }\n :deep(.el-input__wrapper) {\n margin: 0 5px;\n }\n :deep(.el-input__inner) {\n height: 20px;\n line-height: 20px;\n }\n}\n</style>\n"],"names":["emit","__emit","props","__props","files","computed","item","fileType","parts","dialogImageUrl","ref","dialogVisible","uploadUrl","getConfig","compressImg","file","reader","resolve","reject","e","img","canvas","ctx","blob","newFile","handleRemoveSuccess","uploadFile","http","handleExceed","ElMessage","handlePictureCardPreview","handleBeforeUpload","fileName","uploadRequest","handleFileNameChange","index","ElLoading","formData","axios","res"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openBlock as t, createBlock as o, unref as e, withCtx as s, renderSlot as I, createElementVNode as v, createVNode as l, withModifiers as E, createCommentVNode as b } from "vue";
|
|
2
2
|
import { ElUpload as x, ElImage as B, ElIcon as n, ElMessage as i, ElLoading as d } from "element-plus";
|
|
3
|
-
import { _ as M,
|
|
3
|
+
import { _ as M, j as C, l as S, p as L, n as N, m as V } from "./index-DWaIPnvt.js";
|
|
4
4
|
import "./el-progress-l0sNRNKZ.js";
|
|
5
5
|
const q = { class: "image-slot" }, z = {
|
|
6
6
|
__name: "ImageUploader",
|
|
@@ -90,8 +90,8 @@ const q = { class: "image-slot" }, z = {
|
|
|
90
90
|
_: 3
|
|
91
91
|
}, 8, ["action"]));
|
|
92
92
|
}
|
|
93
|
-
},
|
|
93
|
+
}, F = /* @__PURE__ */ M(z, [["__scopeId", "data-v-ae965bb4"]]);
|
|
94
94
|
export {
|
|
95
|
-
|
|
95
|
+
F as default
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=ImageUploader-
|
|
97
|
+
//# sourceMappingURL=ImageUploader-Sl6CARAH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageUploader-
|
|
1
|
+
{"version":3,"file":"ImageUploader-Sl6CARAH.js","sources":["../src/framework/field/image/ImageUploader.vue"],"sourcesContent":["<script setup>\nimport { ElUpload, ElImage, ElIcon } from \"element-plus\";\nimport axios from \"axios\";\nimport { getConfig } from \"../../config-loader\";\nimport { ElLoading, ElMessage } from \"element-plus\";\nimport { Plus, Delete, Loading } from \"@element-plus/icons-vue\";\n\nconst emit = defineEmits([\"on-success\"]);\nconst props = defineProps({\n imageUrl: { type: String },\n});\nconst uploadUrl = getConfig().imageUploadUrl;\nconst header = {\n Authorization: `Bearer ${localStorage.getItem(\"token\")}`,\n};\nconst handleBeforeUpload = (uploadFile) => {\n const isLt2M = uploadFile.size / 1024 / 1024 < 5;\n if (!isLt2M) {\n ElMessage({\n message: \"上传大小不能超过 5MB!\",\n type: \"warning\",\n });\n return false;\n }\n};\nconst handleSuccess = (response) => {\n emit(\"on-success\", response.data.imageUrl);\n};\n\nfunction deleteImageUrl() {\n emit(\"on-success\", \"\");\n}\n\nfunction uploadRequest(file) {\n ElLoading.service({ text: \"上传中,请稍后\", background: \"rgba(0,0,0,0.3)\" });\n return new Promise((resolve, reject) => {\n const formData = new FormData();\n formData.append(\"image\", file.file);\n axios\n .post(uploadUrl, formData, {})\n .then((res) => {\n ElLoading.service().close();\n ElMessage({\n message: \"上传成功\",\n type: \"success\",\n });\n resolve(res.data);\n })\n .catch(() => {\n ElLoading.service().close();\n ElMessage({\n message: \"上传失败\",\n type: \"warning\",\n });\n reject(\"Upload failed\");\n });\n });\n}\n</script>\n\n<template>\n <!-- 删除请求头加权限后请添加到组建中 :headers=\"header\"-->\n <el-upload\n class=\"image-uploader\"\n :action=\"uploadUrl\"\n name=\"image\"\n :show-file-list=\"false\"\n :on-success=\"handleSuccess\"\n :before-upload=\"handleBeforeUpload\"\n :http-request=\"uploadRequest\"\n >\n <slot />\n <el-image\n v-if=\"props.imageUrl\"\n class=\"image\"\n :src=\"props.imageUrl\"\n fit=\"scale-down\"\n >\n <template #placeholder>\n <div class=\"image-slot\">\n <el-icon class=\"placeholder-icon\">\n <Loading />\n </el-icon>\n </div>\n </template>\n </el-image>\n <el-icon v-else class=\"uploader-icon\">\n <Plus />\n </el-icon>\n <el-icon\n v-if=\"props.imageUrl\"\n class=\"delete-icon\"\n @click.stop.prevent=\"deleteImageUrl\"\n >\n <Delete />\n </el-icon>\n </el-upload>\n</template>\n\n<style scoped lang=\"scss\">\n.image-uploader {\n :deep(.el-upload) {\n border: 1px dashed var(--el-border-color);\n border-radius: 6px;\n cursor: pointer;\n position: relative;\n overflow: hidden;\n transition: var(--el-transition-duration-fast);\n\n &:hover {\n border-color: var(--el-color-primary);\n }\n }\n\n .image {\n width: 146px;\n height: 146px;\n\n .placeholder-icon {\n width: 146px;\n height: 146px;\n font-size: 30px;\n color: #a7a7a7;\n }\n }\n\n .uploader-icon {\n font-size: 28px;\n color: #8c939d;\n width: 146px;\n height: 146px;\n text-align: center;\n }\n\n .delete-icon {\n font-size: 20px;\n color: #b7b4b4;\n position: absolute;\n top: 10px;\n right: 10px;\n }\n}\n</style>\n"],"names":["emit","__emit","props","__props","uploadUrl","getConfig","handleBeforeUpload","uploadFile","ElMessage","handleSuccess","response","deleteImageUrl","uploadRequest","file","ElLoading","resolve","reject","formData","axios","res"],"mappings":";;;;;;;;;;;AAOA,UAAMA,IAAOC,GACPC,IAAQC,GAGRC,IAAYC,EAAW,EAAC;AACf,IACY,gBAAa,QAAQ,OAAO;AAEvD,UAAMC,IAAqB,CAACC,MAAe;AAEzC,UAAI,EADWA,EAAW,OAAO,OAAO,OAAO;AAE7C,eAAAC,EAAU;AAAA,UACR,SAAS;AAAA,UACT,MAAM;AAAA,QACZ,CAAK,GACM;AAAA,IAEX,GACMC,IAAgB,CAACC,MAAa;AAClC,MAAAV,EAAK,cAAcU,EAAS,KAAK,QAAQ;AAAA,IAC3C;AAEA,aAASC,IAAiB;AACxB,MAAAX,EAAK,cAAc,EAAE;AAAA,IACvB;AAEA,aAASY,EAAcC,GAAM;AAC3B,aAAAC,EAAU,QAAQ,EAAE,MAAM,WAAW,YAAY,kBAAiB,CAAE,GAC7D,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,cAAMC,IAAW,IAAI;AACrB,QAAAA,EAAS,OAAO,SAASJ,EAAK,IAAI,GAClCK,EACG,KAAKd,GAAWa,GAAU,EAAE,EAC5B,KAAK,CAACE,MAAQ;AACb,UAAAL,EAAU,UAAU,SACpBN,EAAU;AAAA,YACR,SAAS;AAAA,YACT,MAAM;AAAA,UAChB,CAAS,GACDO,EAAQI,EAAI,IAAI;AAAA,QACxB,CAAO,EACA,MAAM,MAAM;AACX,UAAAL,EAAU,UAAU,SACpBN,EAAU;AAAA,YACR,SAAS;AAAA,YACT,MAAM;AAAA,UAChB,CAAS,GACDQ,EAAO,eAAe;AAAA,QAC9B,CAAO;AAAA,MACP,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { ref as c, computed as x, openBlock as i, createElementBlock as I, createVNode as p, unref as o, normalizeClass as k, withModifiers as E, withCtx as a, createBlock as d, createTextVNode as U, createElementVNode as T } from "vue";
|
|
2
|
+
import { ElUpload as V, ElIcon as B, ElButton as z, ElDialog as N, ElMessage as f } from "element-plus";
|
|
3
|
+
import { _ as C, p as D, h as M } from "./index-DWaIPnvt.js";
|
|
4
|
+
import "./el-progress-l0sNRNKZ.js";
|
|
5
|
+
const $ = ["src"], q = {
|
|
6
|
+
__name: "ImagesUploader",
|
|
7
|
+
props: {
|
|
8
|
+
images: {
|
|
9
|
+
type: Array,
|
|
10
|
+
default() {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
limit: { type: Number },
|
|
15
|
+
props: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {
|
|
19
|
+
listType: "picture-card",
|
|
20
|
+
limit: 5,
|
|
21
|
+
accept: "image/*"
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["on-remove", "on-upload"],
|
|
27
|
+
setup(g, { emit: v }) {
|
|
28
|
+
const s = v, u = c(""), n = c(!1), t = g, m = x(() => t.images.map((e) => {
|
|
29
|
+
if (!(e != null && e.url))
|
|
30
|
+
return { ...e, name: "unknown", fileType: "unknown" };
|
|
31
|
+
const l = e.url.substring(e.url.lastIndexOf(".") + 1), r = e.url.split("/");
|
|
32
|
+
return {
|
|
33
|
+
...e,
|
|
34
|
+
name: r[r.length - 1],
|
|
35
|
+
fileType: l
|
|
36
|
+
};
|
|
37
|
+
}));
|
|
38
|
+
function y(e) {
|
|
39
|
+
t.props.deleteUrl ? M.remove(`${t.props.deleteUrl}/${e.id}/attachment`).then(() => {
|
|
40
|
+
s("on-remove", e);
|
|
41
|
+
}) : s("on-remove", e);
|
|
42
|
+
}
|
|
43
|
+
function _() {
|
|
44
|
+
f({
|
|
45
|
+
message: `最多只能上传 ${t.props.limit} 个文件!`,
|
|
46
|
+
type: "warning"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function w(e) {
|
|
50
|
+
u.value = e.url, n.value = !0;
|
|
51
|
+
}
|
|
52
|
+
function b(e) {
|
|
53
|
+
return e.size > 5242880 ? (f({
|
|
54
|
+
message: "上传大小不能超过 5MB!",
|
|
55
|
+
type: "warning"
|
|
56
|
+
}), !1) : !0;
|
|
57
|
+
}
|
|
58
|
+
function h(e) {
|
|
59
|
+
const l = new FormData();
|
|
60
|
+
l.append("file", e.file), s("on-upload", l);
|
|
61
|
+
}
|
|
62
|
+
return (e, l) => (i(), I("div", null, [
|
|
63
|
+
p(o(V), {
|
|
64
|
+
"file-list": m.value,
|
|
65
|
+
limit: t.props.limit,
|
|
66
|
+
accept: t.props.accept,
|
|
67
|
+
"list-type": t.props.listType,
|
|
68
|
+
"on-remove": y,
|
|
69
|
+
"on-exceed": _,
|
|
70
|
+
"on-preview": w,
|
|
71
|
+
multiple: !0,
|
|
72
|
+
"before-upload": b,
|
|
73
|
+
"http-request": h,
|
|
74
|
+
"show-file-list": t.props.listType !== "text",
|
|
75
|
+
class: k([
|
|
76
|
+
"upload-main",
|
|
77
|
+
{ "disable-upload": m.value.length >= t.props.limit }
|
|
78
|
+
]),
|
|
79
|
+
onClick: l[0] || (l[0] = E(() => {
|
|
80
|
+
}, ["prevent"]))
|
|
81
|
+
}, {
|
|
82
|
+
default: a(() => [
|
|
83
|
+
t.props.listType !== "text" ? (i(), d(o(B), {
|
|
84
|
+
key: 0,
|
|
85
|
+
disabled: !0
|
|
86
|
+
}, {
|
|
87
|
+
default: a(() => [
|
|
88
|
+
p(o(D))
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
})) : (i(), d(o(z), {
|
|
92
|
+
key: 1,
|
|
93
|
+
class: "upload-button",
|
|
94
|
+
type: "primary"
|
|
95
|
+
}, {
|
|
96
|
+
default: a(() => [
|
|
97
|
+
U(" 上传附件 ")
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
}))
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["file-list", "limit", "accept", "list-type", "show-file-list", "class"]),
|
|
104
|
+
p(o(N), {
|
|
105
|
+
modelValue: n.value,
|
|
106
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => n.value = r)
|
|
107
|
+
}, {
|
|
108
|
+
default: a(() => [
|
|
109
|
+
T("img", {
|
|
110
|
+
"w-full": "",
|
|
111
|
+
src: u.value,
|
|
112
|
+
alt: "Preview Image"
|
|
113
|
+
}, null, 8, $)
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
}, 8, ["modelValue"])
|
|
117
|
+
]));
|
|
118
|
+
}
|
|
119
|
+
}, A = /* @__PURE__ */ C(q, [["__scopeId", "data-v-b0c153d3"]]);
|
|
120
|
+
export {
|
|
121
|
+
A as default
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=ImagesUploader-CD6qu0oD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagesUploader-CD6qu0oD.js","sources":["../src/framework/field/images/ImagesUploader.vue"],"sourcesContent":["<script setup>\nimport { ElUpload, ElDialog, ElIcon, ElButton } from \"element-plus\";\nimport { computed, ref } from \"vue\";\nimport { ElMessage } from \"element-plus\";\nimport { Plus } from \"@element-plus/icons-vue\";\nimport http from \"../../utils/http\";\n\nconst emit = defineEmits([\"on-remove\", \"on-upload\"]);\nconst dialogImageUrl = ref(\"\");\nconst dialogVisible = ref(false);\nconst props = defineProps({\n images: {\n type: Array,\n default() {\n return [];\n },\n },\n limit: { type: Number },\n props: {\n type: Object,\n default() {\n return {\n listType: \"picture-card\",\n limit: 5,\n accept: \"image/*\",\n };\n },\n },\n});\n\nconst files = computed(() => {\n return props.images.map((item) => {\n if (!item?.url) {\n return { ...item, name: \"unknown\", fileType: \"unknown\" };\n }\n\n const fileType = item.url.substring(item.url.lastIndexOf(\".\") + 1);\n const parts = item.url.split(\"/\");\n const namedItem = {\n ...item,\n name: parts[parts.length - 1],\n fileType,\n };\n return namedItem;\n });\n});\n\nfunction onRemove(uploadFile) {\n if (props.props.deleteUrl) {\n http\n .remove(`${props.props.deleteUrl}/${uploadFile.id}/attachment`)\n .then(() => {\n emit(\"on-remove\", uploadFile);\n });\n } else {\n emit(\"on-remove\", uploadFile);\n }\n}\n\nfunction onExceed() {\n ElMessage({\n message: `最多只能上传 ${props.props.limit} 个文件!`,\n type: \"warning\",\n });\n}\n\nfunction onPreview(uploadFile) {\n dialogImageUrl.value = uploadFile.url;\n dialogVisible.value = true;\n}\n\nfunction beforeUpload(uploadFile) {\n const limitSize = 1024 * 1024 * 5;\n if (uploadFile.size > limitSize) {\n ElMessage({\n message: \"上传大小不能超过 5MB!\",\n type: \"warning\",\n });\n return false;\n }\n\n return true;\n}\n\nfunction httpRequest(uploadFile) {\n const formData = new FormData();\n formData.append(\"file\", uploadFile.file);\n emit(\"on-upload\", formData);\n}\n</script>\n\n<template>\n <div>\n <el-upload\n :file-list=\"files\"\n :limit=\"props.props.limit\"\n :accept=\"props.props.accept\"\n :list-type=\"props.props.listType\"\n :on-remove=\"onRemove\"\n :on-exceed=\"onExceed\"\n :on-preview=\"onPreview\"\n :multiple=\"true\"\n :before-upload=\"beforeUpload\"\n :http-request=\"httpRequest\"\n :show-file-list=\"props.props.listType !== 'text'\"\n :class=\"[\n 'upload-main',\n { 'disable-upload': files.length >= props.props.limit },\n ]\"\n @click.prevent\n >\n <template v-if=\"props.props.listType !== 'text'\">\n <el-icon :disabled=\"true\">\n <Plus />\n </el-icon>\n </template>\n <template v-else>\n <el-button class=\"upload-button\" type=\"primary\"> 上传附件 </el-button>\n </template>\n </el-upload>\n <el-dialog v-model=\"dialogVisible\">\n <img w-full :src=\"dialogImageUrl\" alt=\"Preview Image\" />\n </el-dialog>\n </div>\n</template>\n<style scoped lang=\"scss\">\n:deep(.el-upload-list) {\n .el-upload-list__item-actions span {\n margin-left: 20px;\n }\n}\n\n.disable-upload {\n :deep(.el-upload--picture-card) {\n display: none !important;\n }\n\n :deep(.el-upload--text) {\n display: none !important;\n }\n\n :deep(.el-upload--picture) {\n display: none !important;\n }\n}\n.upload-main {\n flex-basis: 100%;\n}\n.file-list {\n display: flex;\n align-items: center;\n margin-top: 10px;\n .file-type {\n height: 22px;\n line-height: 22px;\n margin-right: 5px;\n background: #eeeeee;\n border-radius: 4px;\n font-size: 12px;\n padding: 0 4px;\n }\n :deep(.el-form-item__content) {\n display: contents;\n }\n :deep(.el-input__wrapper) {\n margin: 0 5px;\n }\n :deep(.el-input__inner) {\n height: 20px;\n line-height: 20px;\n }\n}\n</style>\n"],"names":["emit","__emit","dialogImageUrl","ref","dialogVisible","props","__props","files","computed","item","fileType","parts","onRemove","uploadFile","http","onExceed","ElMessage","onPreview","beforeUpload","httpRequest","formData"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,UAAMA,IAAOC,GACPC,IAAiBC,EAAI,EAAE,GACvBC,IAAgBD,EAAI,EAAK,GACzBE,IAAQC,GAoBRC,IAAQC,EAAS,MACdH,EAAM,OAAO,IAAI,CAACI,MAAS;AAChC,UAAI,EAACA,KAAA,QAAAA,EAAM;AACT,eAAO,EAAE,GAAGA,GAAM,MAAM,WAAW,UAAU;AAG/C,YAAMC,IAAWD,EAAK,IAAI,UAAUA,EAAK,IAAI,YAAY,GAAG,IAAI,CAAC,GAC3DE,IAAQF,EAAK,IAAI,MAAM,GAAG;AAMhC,aALkB;AAAA,QAChB,GAAGA;AAAA,QACH,MAAME,EAAMA,EAAM,SAAS,CAAC;AAAA,QAC5B,UAAAD;AAAA,MACN;AAAA,IAEA,CAAG,CACF;AAED,aAASE,EAASC,GAAY;AAC5B,MAAIR,EAAM,MAAM,YACdS,EACG,OAAO,GAAGT,EAAM,MAAM,SAAS,IAAIQ,EAAW,EAAE,aAAa,EAC7D,KAAK,MAAM;AACV,QAAAb,EAAK,aAAaa,CAAU;AAAA,MACpC,CAAO,IAEHb,EAAK,aAAaa,CAAU;AAAA,IAEhC;AAEA,aAASE,IAAW;AAClB,MAAAC,EAAU;AAAA,QACR,SAAS,UAAUX,EAAM,MAAM,KAAK;AAAA,QACpC,MAAM;AAAA,MACV,CAAG;AAAA,IACH;AAEA,aAASY,EAAUJ,GAAY;AAC7B,MAAAX,EAAe,QAAQW,EAAW,KAClCT,EAAc,QAAQ;AAAA,IACxB;AAEA,aAASc,EAAaL,GAAY;AAEhC,aAAIA,EAAW,OAAO,WACpBG,EAAU;AAAA,QACR,SAAS;AAAA,QACT,MAAM;AAAA,MACZ,CAAK,GACM,MAGF;AAAA,IACT;AAEA,aAASG,EAAYN,GAAY;AAC/B,YAAMO,IAAW,IAAI;AACrB,MAAAA,EAAS,OAAO,QAAQP,EAAW,IAAI,GACvCb,EAAK,aAAaoB,CAAQ;AAAA,IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as rr, onMounted as ir, onBeforeUnmount as ar, ref as $n, watch as Pn, nextTick as Gn, h as or, computed as sr, openBlock as ur, createBlock as lr, unref as fr } from "vue";
|
|
2
2
|
import * as rt from "quill";
|
|
3
3
|
import Rn from "quill";
|
|
4
|
-
import {
|
|
4
|
+
import { o as W, r as cr, m as hr, j as dr } from "./index-DWaIPnvt.js";
|
|
5
5
|
import { ElMessage as Ln } from "element-plus";
|
|
6
6
|
var ue = -1, re = 1, Z = 0;
|
|
7
7
|
function at(r, a, n, u) {
|
|
@@ -1811,4 +1811,4 @@ const Wn = {
|
|
|
1811
1811
|
export {
|
|
1812
1812
|
Rr as default
|
|
1813
1813
|
};
|
|
1814
|
-
//# sourceMappingURL=RichTextEditor-
|
|
1814
|
+
//# sourceMappingURL=RichTextEditor-BN-Grymy.js.map
|