vue-editify 0.1.33 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/editify.es.js +19 -19
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/insertImage/insertImage.vue +4 -4
- package/src/components/insertVideo/insertVideo.vue +4 -4
- package/src/index.ts +1 -1
- package/src/plugins/attachment/index.ts +3 -3
- package/src/plugins/attachment/insertAttachment/insertAttachment.vue +4 -4
package/lib/editify.es.js
CHANGED
@@ -23003,16 +23003,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
23003
23003
|
filterFiles.push(file2);
|
23004
23004
|
}
|
23005
23005
|
if (filterFiles.length) {
|
23006
|
-
let
|
23006
|
+
let urls = [];
|
23007
23007
|
if (typeof props.customUpload == "function") {
|
23008
|
-
|
23008
|
+
urls = await props.customUpload(filterFiles) || [];
|
23009
23009
|
} else {
|
23010
23010
|
for (let i = 0; i < filterFiles.length; i++) {
|
23011
23011
|
const url = await file.dataFileToBase64(filterFiles[i]);
|
23012
|
-
|
23012
|
+
urls.push(url);
|
23013
23013
|
}
|
23014
23014
|
}
|
23015
|
-
emits("insert",
|
23015
|
+
emits("insert", urls);
|
23016
23016
|
}
|
23017
23017
|
inputEle.value = "";
|
23018
23018
|
};
|
@@ -23073,7 +23073,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
23073
23073
|
};
|
23074
23074
|
}
|
23075
23075
|
});
|
23076
|
-
const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
23076
|
+
const InsertImage = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-b63a5bff"]]);
|
23077
23077
|
const InsertVideoProps = {
|
23078
23078
|
//主题色
|
23079
23079
|
color: {
|
@@ -23198,16 +23198,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
23198
23198
|
filterFiles.push(file2);
|
23199
23199
|
}
|
23200
23200
|
if (filterFiles.length) {
|
23201
|
-
let
|
23201
|
+
let urls = [];
|
23202
23202
|
if (typeof props.customUpload == "function") {
|
23203
|
-
|
23203
|
+
urls = await props.customUpload(filterFiles) || [];
|
23204
23204
|
} else {
|
23205
23205
|
for (let i = 0; i < filterFiles.length; i++) {
|
23206
23206
|
const url = await file.dataFileToBase64(filterFiles[i]);
|
23207
|
-
|
23207
|
+
urls.push(url);
|
23208
23208
|
}
|
23209
23209
|
}
|
23210
|
-
emits("insert",
|
23210
|
+
emits("insert", urls);
|
23211
23211
|
}
|
23212
23212
|
inputEle.value = "";
|
23213
23213
|
};
|
@@ -23268,7 +23268,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
23268
23268
|
};
|
23269
23269
|
}
|
23270
23270
|
});
|
23271
|
-
const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
23271
|
+
const InsertVideo = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4383bae9"]]);
|
23272
23272
|
const InsertTableProps = {
|
23273
23273
|
//主题色
|
23274
23274
|
color: {
|
@@ -26006,16 +26006,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26006
26006
|
filterFiles.push(file2);
|
26007
26007
|
}
|
26008
26008
|
if (filterFiles.length) {
|
26009
|
-
let
|
26009
|
+
let urls = [];
|
26010
26010
|
if (typeof props.customUpload == "function") {
|
26011
|
-
|
26011
|
+
urls = await props.customUpload(filterFiles) || [];
|
26012
26012
|
} else {
|
26013
26013
|
for (let i = 0; i < filterFiles.length; i++) {
|
26014
26014
|
const url = await file.dataFileToBase64(filterFiles[i]);
|
26015
|
-
|
26015
|
+
urls.push(url);
|
26016
26016
|
}
|
26017
26017
|
}
|
26018
|
-
emits("insert", attachmentName.value,
|
26018
|
+
emits("insert", attachmentName.value, urls);
|
26019
26019
|
}
|
26020
26020
|
fileInputRef.value.value = "";
|
26021
26021
|
};
|
@@ -26112,7 +26112,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26112
26112
|
};
|
26113
26113
|
}
|
26114
26114
|
});
|
26115
|
-
const InsertAttachment = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
26115
|
+
const InsertAttachment = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-52b1e545"]]);
|
26116
26116
|
const isAttachment = (element2) => {
|
26117
26117
|
if (element2.isEmpty()) {
|
26118
26118
|
return false;
|
@@ -26171,12 +26171,12 @@ const attachment = (options) => {
|
|
26171
26171
|
btnInstance.$refs.layerRef.setPosition();
|
26172
26172
|
},
|
26173
26173
|
onInsert: (name, urls) => {
|
26174
|
-
|
26174
|
+
urls = urls.filter((url) => {
|
26175
26175
|
return !!url;
|
26176
26176
|
});
|
26177
|
-
if (
|
26177
|
+
if (urls.length) {
|
26178
26178
|
const editor = editifyInstance.exposed.editor.value;
|
26179
|
-
|
26179
|
+
urls.forEach((url) => {
|
26180
26180
|
const marks = {
|
26181
26181
|
"data-attachment": url,
|
26182
26182
|
"data-attachment-name": name || editTrans("attachmentDefaultName"),
|
@@ -26257,7 +26257,7 @@ const attachment = (options) => {
|
|
26257
26257
|
const install = (app) => {
|
26258
26258
|
app.component(Editify.name, Editify);
|
26259
26259
|
};
|
26260
|
-
const version = "0.1.
|
26260
|
+
const version = "0.1.34";
|
26261
26261
|
console.log(`%c vue-editify %c v${version} `, "padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;", "padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");
|
26262
26262
|
export {
|
26263
26263
|
AlexElement,
|