@keyblade/tinymce-editor-vue2 0.0.12-alpha.48 → 0.0.12-alpha.49

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.
Files changed (2) hide show
  1. package/es/editor.vue2.js +104 -102
  2. package/package.json +1 -1
package/es/editor.vue2.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as De, ref as y, computed as T, watch as k, onMounted as Ae, onUnmounted as Te } from "vue";
2
- import { oneTravelImgPondBeforeAddFile as K, oneTravelImageCompressor as Q, oneTravelImageCheckAndTransform as Ce } from "@keyblade/one-travel";
1
+ import { defineComponent as De, ref as y, computed as C, watch as z, onMounted as Ae, onUnmounted as Ce } from "vue";
2
+ import { oneTravelImgPondBeforeAddFile as K, oneTravelImageCompressor as Q, oneTravelImageCheckAndTransform as Te } from "@keyblade/one-travel";
3
3
  import { blobToFile as Y, generateUUID as Pe, getImagePixel as Z, getFileExtension as ee } from "./util.js";
4
4
  import "./style.less.js";
5
5
  import Me from "imgpond";
6
- import { conclude as C } from "vue-global-config";
6
+ import { conclude as T } from "vue-global-config";
7
7
  import ae from "tinymce";
8
8
  import Se from "./langs/zh_CN.js";
9
9
  import "tinymce/skins/ui/oxide/skin";
@@ -50,7 +50,7 @@ const va = /* @__PURE__ */ De({
50
50
  initComplete: null
51
51
  },
52
52
  emits: ["input"],
53
- setup(te, { emit: z }) {
53
+ setup(te, { emit: M }) {
54
54
  const m = te;
55
55
  ae.addI18n("zh_CN", Se);
56
56
  const B = {
@@ -72,15 +72,15 @@ const va = /* @__PURE__ */ De({
72
72
  maxSize: 200,
73
73
  allowedType: ["mp3", "m4a", "wav", "aac"],
74
74
  accept: "audio/mp3,audio/wav,audio/aac,audio/x-m4a"
75
- }, E = y(), h = y(), M = y(!1), S = y(!1), v = y({
75
+ }, E = y(), h = y(), S = y(!1), U = y(!1), v = y({
76
76
  show: !1,
77
77
  text: "图片上传中,请稍等"
78
- }), r = T(() => C([m.imageUploadOptions, P.imageUploadOptions, B]) || {}), c = T(() => C([m.videoUploadOptions, P.videoUploadOptions, j]) || {}), w = T(() => C([m.audioUploadOptions, P.audioUploadOptions, q]) || {}), H = T(() => C([m.imgPondOptions, P.imgPondOptions]) || {}), oe = T(() => {
78
+ }), r = C(() => T([m.imageUploadOptions, P.imageUploadOptions, B]) || {}), c = C(() => T([m.videoUploadOptions, P.videoUploadOptions, j]) || {}), w = C(() => T([m.audioUploadOptions, P.audioUploadOptions, q]) || {}), H = C(() => T([m.imgPondOptions, P.imgPondOptions]) || {}), oe = C(() => {
79
79
  var e, a;
80
- return ((a = (e = r == null ? void 0 : r.value) == null ? void 0 : e.allowedType) == null ? void 0 : a.map((t) => `.${t}`).join(",")) || "";
81
- }), U = y();
82
- k(() => U.value, () => {
83
- U.value && K(U.value, {
80
+ return ((a = (e = r == null ? void 0 : r.value) == null ? void 0 : e.allowedType) == null ? void 0 : a.map((o) => `.${o}`).join(",")) || "";
81
+ }), I = y();
82
+ z(() => I.value, () => {
83
+ I.value && K(I.value, {
84
84
  onStart: () => {
85
85
  v.value = {
86
86
  show: !0,
@@ -95,9 +95,9 @@ const va = /* @__PURE__ */ De({
95
95
  }
96
96
  });
97
97
  }, { immediate: !0 });
98
- const I = y();
99
- k(() => I.value, () => {
100
- I.value && K(I.value, {
98
+ const k = y();
99
+ z(() => k.value, () => {
100
+ k.value && K(k.value, {
101
101
  onStart: () => {
102
102
  v.value = {
103
103
  show: !0,
@@ -124,10 +124,10 @@ const va = /* @__PURE__ */ De({
124
124
  }, ie = () => {
125
125
  var e;
126
126
  (e = $.value) == null || e.validate((a) => {
127
- a && (A.value.formData.images.forEach((t) => {
127
+ a && (A.value.formData.images.forEach((o) => {
128
128
  var l;
129
- let o = t;
130
- H.value.srcAt && (o = (t == null ? void 0 : t[H.value.srcAt]) || ""), (l = h.value) == null || l.insertContent(`<img src=${o} alt="" />`);
129
+ let t = o;
130
+ H.value.srcAt && (t = (o == null ? void 0 : o[H.value.srcAt]) || ""), (l = h.value) == null || l.insertContent(`<img src=${t} alt="" />`);
131
131
  }), R());
132
132
  });
133
133
  }, x = y({
@@ -151,8 +151,8 @@ const va = /* @__PURE__ */ De({
151
151
  }, le = () => {
152
152
  var e;
153
153
  (e = F.value) == null || e.validate((a) => {
154
- var t, o;
155
- a && ((o = h.value) == null || o.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${x.value.formData.name}" data-poster="${x.value.formData.cover[0]}" src="${(t = x.value.formData.file[0]) == null ? void 0 : t.url}"></audio>`), N());
154
+ var o, t;
155
+ a && ((t = h.value) == null || t.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${x.value.formData.name}" data-poster="${x.value.formData.cover[0]}" src="${(o = x.value.formData.file[0]) == null ? void 0 : o.url}"></audio>`), N());
156
156
  });
157
157
  }, _ = y({
158
158
  dialogVisible: !1,
@@ -169,35 +169,35 @@ const va = /* @__PURE__ */ De({
169
169
  }, ne = () => {
170
170
  var e;
171
171
  (e = O.value) == null || e.validate((a) => {
172
- var t, o;
173
- a && ((o = h.value) == null || o.insertContent(`<video width="auto" height="auto" controls src="${(t = _.value.formData.file[0]) == null ? void 0 : t.url}"></video>`), L());
172
+ var o, t;
173
+ a && ((t = h.value) == null || t.insertContent(`<video width="auto" height="auto" controls src="${(o = _.value.formData.file[0]) == null ? void 0 : o.url}"></video>`), L());
174
174
  });
175
175
  }, re = () => {
176
176
  document.querySelectorAll(".swal2-container .swal2-title").forEach((e) => {
177
177
  e && (e.innerHTML = `单次最多可选择${r.value.maxCount}张图片`);
178
178
  });
179
- }, se = (e, a) => new Promise(async (t, o) => {
179
+ }, se = (e, a) => new Promise(async (o, t) => {
180
180
  var d, n;
181
181
  const l = await Q(e);
182
182
  if (!l.success) {
183
- o(), setTimeout(() => {
183
+ t(), setTimeout(() => {
184
184
  a.onError(l.errorMessage);
185
185
  });
186
186
  return;
187
187
  }
188
188
  const i = await ((n = (d = r.value).handleRequest) == null ? void 0 : n.call(d, Y(l.file, e.name), e.name, { extParameters: m.extParameters }));
189
189
  if (!i || !(i != null && i.success)) {
190
- o(), setTimeout(() => {
190
+ t(), setTimeout(() => {
191
191
  a.onError(i == null ? void 0 : i.errorMessage);
192
192
  });
193
193
  return;
194
194
  }
195
- t(i.url);
195
+ o(i.url);
196
196
  });
197
197
  async function ue(e, a) {
198
- const o = a.node.getElementsByTagName("img"), l = [];
199
- for (let i = o.length - 1; i >= 0; i--) {
200
- const d = o[i], n = "img-" + Pe();
198
+ const t = a.node.getElementsByTagName("img"), l = [];
199
+ for (let i = t.length - 1; i >= 0; i--) {
200
+ const d = t[i], n = "img-" + Pe();
201
201
  d.classList.add(n), l.push(n);
202
202
  }
203
203
  setTimeout(async () => {
@@ -236,12 +236,12 @@ const va = /* @__PURE__ */ De({
236
236
  show: !0,
237
237
  text: "图片上传中,请稍等"
238
238
  };
239
- let t = a.name ? a.name : "";
239
+ let o = a.name ? a.name : "";
240
240
  if (!(a != null && a.name) && !(a != null && a.lastModified) && a.type === "image/png") {
241
241
  v.value.show = !1, f.error("不允许粘贴");
242
242
  return;
243
243
  }
244
- const o = await Ce(a, t, {
244
+ const t = await Te(a, o, {
245
245
  imageMaxSize: r.value.maxSize,
246
246
  imageAllowedType: r.value.allowedType,
247
247
  // imageAllowedMineType: mergeImageUploadOptions.value.allowedMineType,
@@ -250,21 +250,21 @@ const va = /* @__PURE__ */ De({
250
250
  imageMaxWidth: r.value.maxWidth,
251
251
  imageMaxHeight: r.value.maxHeight
252
252
  });
253
- if (!o.success) {
254
- v.value.show = !1, f.error((o == null ? void 0 : o.errorMessage) || "");
253
+ if (!t.success) {
254
+ v.value.show = !1, f.error((t == null ? void 0 : t.errorMessage) || "");
255
255
  return;
256
256
  }
257
- if (o.hasTransform) {
258
- a = o.file;
259
- const s = t == null ? void 0 : t.split(".");
260
- s.pop(), t = `${s.join(",")}.jpg`;
257
+ if (t.hasTransform) {
258
+ a = t.file;
259
+ const s = o == null ? void 0 : o.split(".");
260
+ s.pop(), o = `${s.join(",")}.jpg`;
261
261
  }
262
262
  const l = await Q(a);
263
263
  if (!l.success) {
264
264
  v.value.show = !1, f.error((l == null ? void 0 : l.errorMessage) || "压缩失败");
265
265
  return;
266
266
  }
267
- const i = await ((u = (n = r.value).handleRequest) == null ? void 0 : u.call(n, Y(l.file, t), t, { extParameters: m.extParameters }));
267
+ const i = await ((u = (n = r.value).handleRequest) == null ? void 0 : u.call(n, Y(l.file, o), o, { extParameters: m.extParameters }));
268
268
  if (!i || !i.success) {
269
269
  v.value.show = !1, f.error((i == null ? void 0 : i.errorMessage) || "");
270
270
  return;
@@ -273,8 +273,8 @@ const va = /* @__PURE__ */ De({
273
273
  }
274
274
  const V = async (e) => {
275
275
  var l, i, d;
276
- const a = h.value, t = e.types;
277
- if (t.includes("text/html")) {
276
+ const a = h.value, o = e.types;
277
+ if (o.includes("text/html")) {
278
278
  const n = e.getData("text/html"), s = new DOMParser().parseFromString(n, "text/html"), p = Array.from(s.body.querySelectorAll("img")), b = Array.from(s.body.querySelectorAll("audio")), W = Array.from(s.body.querySelectorAll("video"));
279
279
  p.length > 0 && (v.value = {
280
280
  show: !0,
@@ -297,9 +297,9 @@ const va = /* @__PURE__ */ De({
297
297
  const _e = new XMLSerializer().serializeToString(s.body);
298
298
  a.insertContent(_e);
299
299
  } else
300
- t.includes("text/plain") && a.insertContent(e.getData("text/plain"));
301
- const o = Array.from(e.items);
302
- for await (const n of o) {
300
+ o.includes("text/plain") && a.insertContent(e.getData("text/plain"));
301
+ const t = Array.from(e.items);
302
+ for await (const n of t) {
303
303
  const u = n.getAsFile();
304
304
  if (!u)
305
305
  continue;
@@ -312,20 +312,20 @@ const va = /* @__PURE__ */ De({
312
312
  }
313
313
  }
314
314
  }
315
- z("input", a.getContent());
315
+ M("input", a.getContent());
316
316
  }, X = (e) => {
317
- var t;
317
+ var o;
318
318
  e.preventDefault();
319
- const a = e.clipboardData || ((t = e == null ? void 0 : e.originalEvent) == null ? void 0 : t.clipboardData);
319
+ const a = e.clipboardData || ((o = e == null ? void 0 : e.originalEvent) == null ? void 0 : o.clipboardData);
320
320
  V(a);
321
321
  }, J = (e) => {
322
- var t;
322
+ var o;
323
323
  e.preventDefault();
324
- const a = e.dataTransfer || ((t = e == null ? void 0 : e.originalEvent) == null ? void 0 : t.dataTransfer);
324
+ const a = e.dataTransfer || ((o = e == null ? void 0 : e.originalEvent) == null ? void 0 : o.dataTransfer);
325
325
  V(a);
326
326
  };
327
327
  Ae(() => {
328
- var t;
328
+ var o;
329
329
  const e = {
330
330
  // 设置语言
331
331
  language: "zh_CN",
@@ -408,9 +408,9 @@ const va = /* @__PURE__ */ De({
408
408
  convert_urls: !1,
409
409
  paste_webkit_styles: "all",
410
410
  paste_data_images: !1,
411
- images_file_types: ((t = r.value.allowedType) == null ? void 0 : t.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
411
+ images_file_types: ((o = r.value.allowedType) == null ? void 0 : o.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
412
412
  // 粘贴前处理
413
- paste_preprocess(o, l) {
413
+ paste_preprocess(t, l) {
414
414
  l == null || l.preventDefault();
415
415
  },
416
416
  // // 粘贴后处理(处理异步操作)
@@ -488,7 +488,7 @@ const va = /* @__PURE__ */ De({
488
488
  // resolve(uploadRes.url!)
489
489
  // })
490
490
  // },
491
- setup(o) {
491
+ setup(t) {
492
492
  var i, d;
493
493
  const l = () => {
494
494
  A.value.dialogVisible = !0, setTimeout(() => {
@@ -497,11 +497,11 @@ const va = /* @__PURE__ */ De({
497
497
  n && (n.innerHTML = ((s = r.value) == null ? void 0 : s.tipText) || "上传");
498
498
  });
499
499
  };
500
- if (o.ui.registry.addMenuItem("localImage", {
500
+ if (t.ui.registry.addMenuItem("localImage", {
501
501
  text: "图片",
502
502
  icon: "image",
503
503
  onAction: () => l()
504
- }), o.ui.registry.addButton("localImage", {
504
+ }), t.ui.registry.addButton("localImage", {
505
505
  icon: "image",
506
506
  tooltip: "图片",
507
507
  onAction: () => l()
@@ -513,11 +513,11 @@ const va = /* @__PURE__ */ De({
513
513
  u && (u.innerHTML = ((p = r.value) == null ? void 0 : p.tipText) || "上传");
514
514
  });
515
515
  };
516
- o.ui.registry.addMenuItem("localAudio", {
516
+ t.ui.registry.addMenuItem("localAudio", {
517
517
  text: "音频",
518
518
  icon: "arrow-right",
519
519
  onAction: () => n()
520
- }), o.ui.registry.addButton("localAudio", {
520
+ }), t.ui.registry.addButton("localAudio", {
521
521
  icon: "arrow-right",
522
522
  tooltip: "音频",
523
523
  onAction: () => n()
@@ -527,120 +527,122 @@ const va = /* @__PURE__ */ De({
527
527
  const n = () => {
528
528
  _.value.dialogVisible = !0;
529
529
  };
530
- o.ui.registry.addMenuItem("localVideo", {
530
+ t.ui.registry.addMenuItem("localVideo", {
531
531
  text: "视频",
532
532
  icon: "embed",
533
533
  onAction: () => n()
534
- }), o.ui.registry.addButton("localVideo", {
534
+ }), t.ui.registry.addButton("localVideo", {
535
535
  icon: "embed",
536
536
  tooltip: "视频",
537
537
  onAction: () => n()
538
538
  });
539
539
  }
540
540
  }
541
- }, a = C(
541
+ }, a = T(
542
542
  [
543
543
  m.options,
544
544
  P.options,
545
545
  e
546
546
  ],
547
547
  {
548
- mergeFunction: (o, l) => (...i) => {
549
- o(...i), l(...i);
548
+ mergeFunction: (t, l) => (...i) => {
549
+ t(...i), l(...i);
550
550
  },
551
551
  type: Object
552
552
  }
553
553
  );
554
- ae.init(a).then(([o]) => {
554
+ ae.init(a).then(([t]) => {
555
555
  var l;
556
- o && (o.customProps = { ...m }, o.on("input", () => {
557
- if (S.value) {
558
- S.value = !1;
556
+ t && (t.customProps = { ...m }, t.on("input", () => {
557
+ if (U.value) {
558
+ U.value = !1;
559
559
  return;
560
560
  }
561
- M.value = !0, z("input", o.getContent());
562
- }), o.on("paste", (i) => {
561
+ S.value = !0, M("input", t.getContent());
562
+ }), t.on("change", () => {
563
+ M("input", t.getContent());
564
+ }), t.on("paste", (i) => {
563
565
  X(i);
564
- }), o.on("drop", (i) => {
566
+ }), t.on("drop", (i) => {
565
567
  J(i);
566
- }), (l = m.initComplete) == null || l.call(m, { editorIns: o }), h.value = o);
568
+ }), (l = m.initComplete) == null || l.call(m, { editorIns: t }), h.value = t);
567
569
  });
568
- }), Te(() => {
569
- var e, a, t, o;
570
- (e = h.value) == null || e.off("input"), (a = h.value) == null || a.off("paste"), (t = h.value) == null || t.off("drop"), (o = h.value) == null || o.destroy();
570
+ }), Ce(() => {
571
+ var e, a, o, t;
572
+ (e = h.value) == null || e.off("input"), (a = h.value) == null || a.off("paste"), (o = h.value) == null || o.off("drop"), (t = h.value) == null || t.destroy();
571
573
  });
572
574
  const me = () => {
573
- var a, t;
575
+ var a, o;
574
576
  const e = { ...x.value.additionalData || {} };
575
- return ((t = (a = w.value) == null ? void 0 : a.data) == null ? void 0 : t.call(a, { ...e, extParameters: m.extParameters })) || {};
577
+ return ((o = (a = w.value) == null ? void 0 : a.data) == null ? void 0 : o.call(a, { ...e, extParameters: m.extParameters })) || {};
576
578
  }, de = () => {
577
- var a, t;
579
+ var a, o;
578
580
  const e = { ...x.value.additionalData || {} };
579
- return ((t = (a = w.value) == null ? void 0 : a.headers) == null ? void 0 : t.call(a, { ...e, extParameters: m.extParameters })) || {};
580
- }, ce = (e, a, t) => {
581
+ return ((o = (a = w.value) == null ? void 0 : a.headers) == null ? void 0 : o.call(a, { ...e, extParameters: m.extParameters })) || {};
582
+ }, ce = (e, a, o) => {
581
583
  var l, i;
582
- const o = (i = (l = w == null ? void 0 : w.value) == null ? void 0 : l.handlerResponse) == null ? void 0 : i.call(l, e);
583
- o != null && o.url ? t[t.length - 1].url = o.url : o != null && o.errorMessage && (f.error(o.errorMessage), t.splice(t.length - 1, 1)), x.value.formData.file = t;
584
- }, pe = (e, a) => new Promise((t, o) => {
584
+ const t = (i = (l = w == null ? void 0 : w.value) == null ? void 0 : l.handlerResponse) == null ? void 0 : i.call(l, e);
585
+ t != null && t.url ? o[o.length - 1].url = t.url : t != null && t.errorMessage && (f.error(t.errorMessage), o.splice(o.length - 1, 1)), x.value.formData.file = o;
586
+ }, pe = (e, a) => new Promise((o, t) => {
585
587
  var i, d, n, u, s, p;
586
588
  const l = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
587
589
  if (!((d = (i = w.value) == null ? void 0 : i.allowedType) != null && d.includes(l.toLowerCase()))) {
588
- f.error(`请上传格式为${(u = (n = w.value) == null ? void 0 : n.allowedType) == null ? void 0 : u.map((b) => b.toUpperCase()).join("、")}的音频`), o();
590
+ f.error(`请上传格式为${(u = (n = w.value) == null ? void 0 : n.allowedType) == null ? void 0 : u.map((b) => b.toUpperCase()).join("、")}的音频`), t();
589
591
  return;
590
592
  }
591
593
  if (e.size > (((s = w.value) == null ? void 0 : s.maxSize) || 0) * 1024 * 1024) {
592
- f.error(`请上传${((p = w.value) == null ? void 0 : p.maxSize) || 0}M内的音频`), o();
594
+ f.error(`请上传${((p = w.value) == null ? void 0 : p.maxSize) || 0}M内的音频`), t();
593
595
  return;
594
596
  }
595
- x.value.additionalData = { file: e }, t(!0);
597
+ x.value.additionalData = { file: e }, o(!0);
596
598
  }), fe = (e, a) => {
597
599
  x.value.formData.file = a;
598
- }, ve = (e, a, t) => {
599
- f.error("上传发生错误,请重试!"), x.value.formData.file = t;
600
+ }, ve = (e, a, o) => {
601
+ f.error("上传发生错误,请重试!"), x.value.formData.file = o;
600
602
  }, ge = () => {
601
- var a, t;
603
+ var a, o;
602
604
  const e = { ..._.value.additionalData || {} };
603
- return ((t = (a = c.value) == null ? void 0 : a.data) == null ? void 0 : t.call(a, { ...e, extParameters: m.extParameters })) || {};
605
+ return ((o = (a = c.value) == null ? void 0 : a.data) == null ? void 0 : o.call(a, { ...e, extParameters: m.extParameters })) || {};
604
606
  }, he = () => {
605
- var a, t;
607
+ var a, o;
606
608
  const e = { ..._.value.additionalData || {} };
607
- return ((t = (a = c.value) == null ? void 0 : a.headers) == null ? void 0 : t.call(a, { ...e, extParameters: m.extParameters })) || {};
608
- }, xe = (e, a, t) => {
609
+ return ((o = (a = c.value) == null ? void 0 : a.headers) == null ? void 0 : o.call(a, { ...e, extParameters: m.extParameters })) || {};
610
+ }, xe = (e, a, o) => {
609
611
  var l, i;
610
- const o = (i = (l = c == null ? void 0 : c.value) == null ? void 0 : l.handlerResponse) == null ? void 0 : i.call(l, e);
611
- o != null && o.url ? t[t.length - 1].url = o.url : o != null && o.errorMessage && (f.error(o.errorMessage), t.splice(t.length - 1, 1)), _.value.formData.file = t;
612
- }, we = (e, a) => new Promise((t, o) => {
612
+ const t = (i = (l = c == null ? void 0 : c.value) == null ? void 0 : l.handlerResponse) == null ? void 0 : i.call(l, e);
613
+ t != null && t.url ? o[o.length - 1].url = t.url : t != null && t.errorMessage && (f.error(t.errorMessage), o.splice(o.length - 1, 1)), _.value.formData.file = o;
614
+ }, we = (e, a) => new Promise((o, t) => {
613
615
  var i, d, n, u, s, p;
614
616
  const l = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
615
617
  if (!((d = (i = c == null ? void 0 : c.value) == null ? void 0 : i.allowedType) != null && d.includes(l.toLowerCase()))) {
616
- f.error(`请上传格式为${(u = (n = c == null ? void 0 : c.value) == null ? void 0 : n.allowedType) == null ? void 0 : u.map((b) => b.toUpperCase()).join("、")}的视频`), o();
618
+ f.error(`请上传格式为${(u = (n = c == null ? void 0 : c.value) == null ? void 0 : n.allowedType) == null ? void 0 : u.map((b) => b.toUpperCase()).join("、")}的视频`), t();
617
619
  return;
618
620
  }
619
621
  if (e.size > (((s = c == null ? void 0 : c.value) == null ? void 0 : s.maxSize) || 0) * 1024 * 1024) {
620
- f.error(`请上传${((p = c == null ? void 0 : c.value) == null ? void 0 : p.maxSize) || 0}M内的视频`), o();
622
+ f.error(`请上传${((p = c == null ? void 0 : c.value) == null ? void 0 : p.maxSize) || 0}M内的视频`), t();
621
623
  return;
622
624
  }
623
- _.value.additionalData = { file: e }, t(!0);
625
+ _.value.additionalData = { file: e }, o(!0);
624
626
  }), be = (e, a) => {
625
627
  _.value.formData.file = a;
626
- }, ye = (e, a, t) => {
627
- f.error("上传发生错误,请重试!"), _.value.formData.file = t;
628
+ }, ye = (e, a, o) => {
629
+ f.error("上传发生错误,请重试!"), _.value.formData.file = o;
628
630
  };
629
- return k(() => [m.disabled, h.value], () => {
631
+ return z(() => [m.disabled, h.value], () => {
630
632
  var e, a;
631
633
  (a = (e = h.value) == null ? void 0 : e.mode) == null || a.set(m.disabled ? "readonly" : "design");
632
- }, { immediate: !0 }), k(
634
+ }, { immediate: !0 }), z(
633
635
  () => [m.value, h.value],
634
636
  () => {
635
637
  var e;
636
- if (M.value) {
637
- M.value = !1;
638
+ if (S.value) {
639
+ S.value = !1;
638
640
  return;
639
641
  }
640
- S.value = !0, (e = h.value) == null || e.setContent(m.value ? m.value : "");
642
+ U.value = !0, (e = h.value) == null || e.setContent(m.value ? m.value : "");
641
643
  },
642
644
  { immediate: !0 }
643
- ), { __sfc: !0, defaultImageUploadOptions: B, defaultVideoUploadOptions: j, defaultAudioUploadOptions: q, props: m, emits: z, insRef: E, editorRef: h, preventSettingContent: M, preventUpdatingModelValue: S, uploadLoadingConfig: v, mergeImageUploadOptions: r, mergeVideoUploadOptions: c, mergeAudioUploadOptions: w, mergeImgPondOptions: H, imgPondAccept: oe, uploadImageImgPondRef: U, audioImageImgPondRef: I, uploadImage: A, uploadImageFormRef: $, onUploadImageClose: R, onUploadImageConfirm: ie, uploadAudio: x, uploadAudioFormRef: F, onUploadAudioClose: N, onUploadAudioConfirm: le, uploadVideo: _, uploadVideoFormRef: O, onUploadVideoClose: L, onUploadVideoConfirm: ne, onImageUploadUploadExceed: re, onImageUploadUpload: se, processPastedImage: ue, uploadPasteOrDropFile: G, handleDataTransfer: V, onValuePaste: X, onValueDrop: J, getUploadAudioData: me, getUploadAudioHeaders: de, onUploadAudioSuccess: ce, onUploadAudioBeforeUpload: pe, onUploadAudioRemove: fe, onUploadAudioError: ve, getUploadVideoData: ge, getUploadVideoHeaders: he, onUploadVideoSuccess: xe, onUploadVideoBeforeUpload: we, onUploadVideoRemove: be, onUploadVideoError: ye, ImgPond: Me };
645
+ ), { __sfc: !0, defaultImageUploadOptions: B, defaultVideoUploadOptions: j, defaultAudioUploadOptions: q, props: m, emits: M, insRef: E, editorRef: h, preventSettingContent: S, preventUpdatingModelValue: U, uploadLoadingConfig: v, mergeImageUploadOptions: r, mergeVideoUploadOptions: c, mergeAudioUploadOptions: w, mergeImgPondOptions: H, imgPondAccept: oe, uploadImageImgPondRef: I, audioImageImgPondRef: k, uploadImage: A, uploadImageFormRef: $, onUploadImageClose: R, onUploadImageConfirm: ie, uploadAudio: x, uploadAudioFormRef: F, onUploadAudioClose: N, onUploadAudioConfirm: le, uploadVideo: _, uploadVideoFormRef: O, onUploadVideoClose: L, onUploadVideoConfirm: ne, onImageUploadUploadExceed: re, onImageUploadUpload: se, processPastedImage: ue, uploadPasteOrDropFile: G, handleDataTransfer: V, onValuePaste: X, onValueDrop: J, getUploadAudioData: me, getUploadAudioHeaders: de, onUploadAudioSuccess: ce, onUploadAudioBeforeUpload: pe, onUploadAudioRemove: fe, onUploadAudioError: ve, getUploadVideoData: ge, getUploadVideoHeaders: he, onUploadVideoSuccess: xe, onUploadVideoBeforeUpload: we, onUploadVideoRemove: be, onUploadVideoError: ye, ImgPond: Me };
644
646
  }
645
647
  });
646
648
  export {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/tinymce-editor-vue2",
3
3
  "description": "KeyBlade Tinymce Editor Vue2",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "0.0.12-alpha.48",
5
+ "version": "0.0.12-alpha.49",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",