@keyblade/tinymce-editor-vue2 1.2.4 → 1.2.6

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 +95 -95
  2. package/package.json +3 -3
package/es/editor.vue2.js CHANGED
@@ -2,36 +2,36 @@ var Be = Object.defineProperty, Ve = Object.defineProperties;
2
2
  var je = Object.getOwnPropertyDescriptors;
3
3
  var ue = Object.getOwnPropertySymbols;
4
4
  var Re = Object.prototype.hasOwnProperty, He = Object.prototype.propertyIsEnumerable;
5
- var ce = (c, s) => (s = Symbol[c]) ? s : Symbol.for("Symbol." + c);
6
- var me = (c, s, i) => s in c ? Be(c, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[s] = i, D = (c, s) => {
7
- for (var i in s || (s = {}))
8
- Re.call(s, i) && me(c, i, s[i]);
5
+ var ce = (c, s) => (s = Symbol[c]) ? s : /* @__PURE__ */ Symbol.for("Symbol." + c);
6
+ var me = (c, s, l) => s in c ? Be(c, s, { enumerable: !0, configurable: !0, writable: !0, value: l }) : c[s] = l, D = (c, s) => {
7
+ for (var l in s || (s = {}))
8
+ Re.call(s, l) && me(c, l, s[l]);
9
9
  if (ue)
10
- for (var i of ue(s))
11
- He.call(s, i) && me(c, i, s[i]);
10
+ for (var l of ue(s))
11
+ He.call(s, l) && me(c, l, s[l]);
12
12
  return c;
13
- }, O = (c, s) => Ve(c, je(s));
14
- var F = (c, s, i) => new Promise((z, S) => {
13
+ }, B = (c, s) => Ve(c, je(s));
14
+ var W = (c, s, l) => new Promise((z, S) => {
15
15
  var I = (g) => {
16
16
  try {
17
- m(i.next(g));
17
+ m(l.next(g));
18
18
  } catch (U) {
19
19
  S(U);
20
20
  }
21
- }, B = (g) => {
21
+ }, V = (g) => {
22
22
  try {
23
- m(i.throw(g));
23
+ m(l.throw(g));
24
24
  } catch (U) {
25
25
  S(U);
26
26
  }
27
- }, m = (g) => g.done ? z(g.value) : Promise.resolve(g.value).then(I, B);
28
- m((i = i.apply(c, s)).next());
27
+ }, m = (g) => g.done ? z(g.value) : Promise.resolve(g.value).then(I, V);
28
+ m((l = l.apply(c, s)).next());
29
29
  });
30
- var G = (c, s, i) => (s = c[ce("asyncIterator")]) ? s.call(c) : (c = c[ce("iterator")](), s = {}, i = (z, S) => (S = c[z]) && (s[z] = (I) => new Promise((B, m, g) => (I = S.call(c, I), g = I.done, Promise.resolve(I.value).then((U) => B({ value: U, done: g }), m)))), i("next"), i("return"), s);
31
- import { defineComponent as $e, ref as A, computed as X, onMounted as Ee, onUnmounted as qe, watch as de } from "vue";
32
- import { oneTravelImageCheckAndTransform as Fe, oneTravelImageCompressor as We, blobToFile as Ne, getImagePixel as Le, getFileExtension as Ge } from "@keyblade/one-travel";
30
+ var G = (c, s, l) => (s = c[ce("asyncIterator")]) ? s.call(c) : (c = c[ce("iterator")](), s = {}, l = (z, S) => (S = c[z]) && (s[z] = (I) => new Promise((V, m, g) => (I = S.call(c, I), g = I.done, Promise.resolve(I.value).then((U) => V({ value: U, done: g }), m)))), l("next"), l("return"), s);
31
+ import { defineComponent as $e, ref as A, computed as X, onMounted as qe, onUnmounted as Fe, watch as de } from "vue";
32
+ import { oneTravelImageCheckAndTransform as We, oneTravelImageCompressor as Ee, blobToFile as Ne, getImagePixel as Le, getFileExtension as Ge } from "@keyblade/one-travel";
33
33
  /* empty css */
34
- import { conclude as W } from "vue-global-config";
34
+ import { conclude as E } from "vue-global-config";
35
35
  import pe from "tinymce";
36
36
  import Xe from "./langs/zh_CN.js";
37
37
  import "tinymce/skins/ui/oxide/skin";
@@ -81,7 +81,7 @@ const Ra = /* @__PURE__ */ $e({
81
81
  },
82
82
  emits: ["input"],
83
83
  setup(c, { emit: s }) {
84
- const i = c;
84
+ const l = c;
85
85
  pe.addI18n("zh_CN", Xe);
86
86
  const z = {
87
87
  name: M.name,
@@ -105,22 +105,22 @@ const Ra = /* @__PURE__ */ $e({
105
105
  maxSize: 200,
106
106
  allowedType: ["wav", "mp3", "mp4", "m4a", "wma", "aac"],
107
107
  accept: ".wav,.mp3,.mp4,.m4a,.wma,.aac"
108
- }, B = A(), m = A(), g = A(!1), U = A(!1), R = A({
108
+ }, V = A(), m = A(), g = A(!1), U = A(!1), H = A({
109
109
  show: !1,
110
110
  text: "图片上传中,请稍等"
111
- }), p = X(() => W([i.imageUploadOptions, N.imageUploadOptions, z]) || {}), u = X(() => W([i.videoUploadOptions, N.videoUploadOptions, S]) || {}), v = X(() => W([i.audioUploadOptions, N.audioUploadOptions, I]) || {}), H = A({
111
+ }), p = X(() => E([l.imageUploadOptions, N.imageUploadOptions, z]) || {}), u = X(() => E([l.videoUploadOptions, N.videoUploadOptions, S]) || {}), v = X(() => E([l.audioUploadOptions, N.audioUploadOptions, I]) || {}), $ = A({
112
112
  dialogVisible: !1,
113
113
  formData: {
114
114
  images: []
115
115
  }
116
- }), V = A(), J = A(), K = () => {
117
- H.value.dialogVisible = !1, H.value.formData = {
116
+ }), j = A(), J = A(), K = () => {
117
+ $.value.dialogVisible = !1, $.value.formData = {
118
118
  images: []
119
- }, V.value = void 0;
119
+ }, j.value = void 0;
120
120
  }, fe = () => {
121
121
  var o;
122
122
  (o = J.value) == null || o.validate((e) => {
123
- e && (H.value.formData.images.forEach((a) => {
123
+ e && ($.value.formData.images.forEach((a) => {
124
124
  var n;
125
125
  (n = m.value) == null || n.insertContent(`<img src=${a == null ? void 0 : a.url} alt="" />`);
126
126
  }), K());
@@ -142,12 +142,12 @@ const Ra = /* @__PURE__ */ $e({
142
142
  name: "",
143
143
  cover: [],
144
144
  file: []
145
- }, w.value.additionalData = {}, V.value = void 0;
145
+ }, w.value.additionalData = {}, j.value = void 0;
146
146
  }, ve = () => {
147
147
  var o;
148
148
  (o = Q.value) == null || o.validate((e) => {
149
- var a, n;
150
- e && ((n = m.value) == null || n.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${w.value.formData.name}" data-poster="${w.value.formData.cover[0]}" src="${(a = w.value.formData.file[0]) == null ? void 0 : a.url}"></audio>`), Y());
149
+ var a, n, i;
150
+ e && ((i = m.value) == null || i.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${w.value.formData.name}" data-poster="${(a = w.value.formData.cover[0]) == null ? void 0 : a.url}" src="${(n = w.value.formData.file[0]) == null ? void 0 : n.url}"></audio>`), Y());
151
151
  });
152
152
  }, _ = A({
153
153
  dialogVisible: !1,
@@ -169,8 +169,8 @@ const Ra = /* @__PURE__ */ $e({
169
169
  });
170
170
  };
171
171
  function ae(o) {
172
- return F(this, null, function* () {
173
- var r, d, y, f, h, C, P, $, E;
172
+ return W(this, null, function* () {
173
+ var r, d, y, f, h, C, P, q, F;
174
174
  let e = o;
175
175
  if (!((r = p.value) != null && r.handleRequest)) {
176
176
  b.error("缺少图片上传配置");
@@ -181,7 +181,7 @@ const Ra = /* @__PURE__ */ $e({
181
181
  b.error("不允许粘贴");
182
182
  return;
183
183
  }
184
- const n = yield Fe(e, a, {
184
+ const n = yield We(e, a, {
185
185
  imageMaxSize: (d = p.value.checkOptions) == null ? void 0 : d.maxSize,
186
186
  imageAllowedType: (y = p.value.checkOptions) == null ? void 0 : y.allowedType,
187
187
  // imageAllowedMineType: mergeImageUploadOptions.value.allowedMineType,
@@ -199,12 +199,12 @@ const Ra = /* @__PURE__ */ $e({
199
199
  const ie = a == null ? void 0 : a.split(".");
200
200
  ie.pop(), a = `${ie.join(",")}.jpg`;
201
201
  }
202
- const l = yield We(e);
203
- if (!l.success) {
204
- b.error((l == null ? void 0 : l.errorMessage) || "压缩失败");
202
+ const i = yield Ee(e);
203
+ if (!i.success) {
204
+ b.error((i == null ? void 0 : i.errorMessage) || "压缩失败");
205
205
  return;
206
206
  }
207
- const t = yield (E = ($ = p.value).handleRequest) == null ? void 0 : E.call($, Ne(l.file, a), a, { extParameters: i.extParameters });
207
+ const t = yield (F = (q = p.value).handleRequest) == null ? void 0 : F.call(q, Ne(i.file, a), a, { extParameters: l.extParameters });
208
208
  if (!t || !t.success) {
209
209
  b.error((t == null ? void 0 : t.errorMessage) || "");
210
210
  return;
@@ -212,77 +212,77 @@ const Ra = /* @__PURE__ */ $e({
212
212
  return t.url;
213
213
  });
214
214
  }
215
- const L = (o) => F(null, null, function* () {
216
- var t, r, d, y, f, h, C, P, $, E, le, ne, re;
215
+ const L = (o) => W(null, null, function* () {
216
+ var t, r, d, y, f, h, C, P, q, F, le, ne, re;
217
217
  const e = m.value, a = o.types;
218
218
  if (a.includes("text/html")) {
219
- const T = o.getData("text/html"), j = new DOMParser().parseFromString(T, "text/html"), se = Array.from(j.body.querySelectorAll("img")), Te = Array.from(j.body.querySelectorAll("audio")), ze = Array.from(j.body.querySelectorAll("video"));
220
- se.length > 0 && (R.value = {
219
+ const T = o.getData("text/html"), R = new DOMParser().parseFromString(T, "text/html"), se = Array.from(R.body.querySelectorAll("img")), Te = Array.from(R.body.querySelectorAll("audio")), ze = Array.from(R.body.querySelectorAll("video"));
220
+ se.length > 0 && (H.value = {
221
221
  show: !0,
222
222
  text: "图片加载中,请稍等"
223
223
  });
224
224
  for (const k of [...Te, ...ze])
225
225
  k == null || k.remove();
226
226
  try {
227
- for (var ie = G([...se]), Ke, Ea, qa; Ke = !(Ea = yield ie.next()).done; Ke = !1) {
228
- const k = Ea.value;
227
+ for (var ie = G([...se]), Ke, qa, Fa; Ke = !(qa = yield ie.next()).done; Ke = !1) {
228
+ const k = qa.value;
229
229
  if (k.removeAttribute("crossorigin"), k.src.startsWith("http"))
230
230
  if ((t = p.value) != null && t.handleRequestByUrl) {
231
- const x = yield (r = p.value) == null ? void 0 : r.handleRequestByUrl(k.src, { extParameters: i.extParameters });
231
+ const x = yield (r = p.value) == null ? void 0 : r.handleRequestByUrl(k.src, { extParameters: l.extParameters });
232
232
  x != null && x.success && (x != null && x.url) ? k.src = x == null ? void 0 : x.url : k.remove();
233
233
  } else {
234
234
  const x = yield Le(k.src);
235
- x && (x.width < (((y = (d = p.value) == null ? void 0 : d.checkOptions) == null ? void 0 : y.minWidth) || 0) && x.height < (((h = (f = p.value) == null ? void 0 : f.checkOptions) == null ? void 0 : h.minHeight) || 0) || x.width > (((P = (C = p.value) == null ? void 0 : C.checkOptions) == null ? void 0 : P.maxWidth) || 0) && x.height > (((E = ($ = p.value) == null ? void 0 : $.checkOptions) == null ? void 0 : E.maxHeight) || 0)) && k.remove();
235
+ x && (x.width < (((y = (d = p.value) == null ? void 0 : d.checkOptions) == null ? void 0 : y.minWidth) || 0) && x.height < (((h = (f = p.value) == null ? void 0 : f.checkOptions) == null ? void 0 : h.minHeight) || 0) || x.width > (((P = (C = p.value) == null ? void 0 : C.checkOptions) == null ? void 0 : P.maxWidth) || 0) && x.height > (((F = (q = p.value) == null ? void 0 : q.checkOptions) == null ? void 0 : F.maxHeight) || 0)) && k.remove();
236
236
  }
237
237
  else
238
238
  k.remove(), b.error("不支持Word中批量复制图片或视频,请改为单个复制,或者从工具栏中手动插入上传");
239
239
  }
240
- } catch (Ea) {
241
- qa = [Ea];
240
+ } catch (qa) {
241
+ Fa = [qa];
242
242
  } finally {
243
243
  try {
244
- Ke && (Ea = ie.return) && (yield Ea.call(ie));
244
+ Ke && (qa = ie.return) && (yield qa.call(ie));
245
245
  } finally {
246
- if (qa)
247
- throw qa[0];
246
+ if (Fa)
247
+ throw Fa[0];
248
248
  }
249
249
  }
250
- R.value.show = !1;
251
- const Oe = new XMLSerializer().serializeToString(j.body);
250
+ H.value.show = !1;
251
+ const Oe = new XMLSerializer().serializeToString(R.body);
252
252
  e.insertContent(Oe);
253
253
  } else a.includes("text/plain") && e.insertContent(o.getData("text/plain"));
254
- const n = Array.from((o == null ? void 0 : o.files) || []), l = [];
254
+ const n = Array.from((o == null ? void 0 : o.files) || []), i = [];
255
255
  for (const T of n) {
256
256
  if (!T)
257
257
  continue;
258
- const q = Ge(T.name);
259
- T.type.indexOf("image") > -1 || (re = (ne = (le = p.value) == null ? void 0 : le.checkOptions) == null ? void 0 : ne.allowedType) != null && re.includes(q.toLowerCase()) ? l.push(T) : b.error("暂不支持的文件类型");
258
+ const O = Ge(T.name);
259
+ T.type.indexOf("image") > -1 || (re = (ne = (le = p.value) == null ? void 0 : le.checkOptions) == null ? void 0 : ne.allowedType) != null && re.includes((O == null ? void 0 : O.toLowerCase()) || "") ? i.push(T) : b.error("暂不支持的文件类型");
260
260
  }
261
- if (l.length > 0) {
262
- R.value = {
261
+ if (i.length > 0) {
262
+ H.value = {
263
263
  show: !0,
264
264
  text: "图片上传中,请稍等"
265
265
  };
266
266
  try {
267
- for (var Fa = G(l), Wa, Na, La; Wa = !(Na = yield Fa.next()).done; Wa = !1) {
267
+ for (var Wa = G(i), Ea, Na, La; Ea = !(Na = yield Wa.next()).done; Ea = !1) {
268
268
  const T = Na.value;
269
- const q = yield ae(T);
270
- if (q) {
271
- const j = `<img src="${q}" alt="" />`;
272
- e.insertContent(j);
269
+ const O = yield ae(T);
270
+ if (O) {
271
+ const R = `<img src="${O}" alt="" />`;
272
+ e.insertContent(R);
273
273
  }
274
274
  }
275
275
  } catch (Na) {
276
276
  La = [Na];
277
277
  } finally {
278
278
  try {
279
- Wa && (Na = Fa.return) && (yield Na.call(Fa));
279
+ Ea && (Na = Wa.return) && (yield Na.call(Wa));
280
280
  } finally {
281
281
  if (La)
282
282
  throw La[0];
283
283
  }
284
284
  }
285
- R.value.show = !1;
285
+ H.value.show = !1;
286
286
  }
287
287
  s("input", e.getContent());
288
288
  }), oe = (o) => {
@@ -296,13 +296,13 @@ const Ra = /* @__PURE__ */ $e({
296
296
  const e = o.dataTransfer || ((a = o == null ? void 0 : o.originalEvent) == null ? void 0 : a.dataTransfer);
297
297
  L(e);
298
298
  };
299
- Ee(() => {
300
- var a, n, l;
299
+ qe(() => {
300
+ var a, n, i;
301
301
  const o = {
302
302
  // 设置语言
303
303
  language: "zh_CN",
304
304
  // 实例
305
- target: B.value,
305
+ target: V.value,
306
306
  // 隐藏品牌
307
307
  branding: !1,
308
308
  // 隐藏右上角升级按钮
@@ -380,7 +380,7 @@ const Ra = /* @__PURE__ */ $e({
380
380
  convert_urls: !1,
381
381
  paste_webkit_styles: "all",
382
382
  paste_data_images: !1,
383
- images_file_types: ((l = (n = (a = p.value) == null ? void 0 : a.checkOptions) == null ? void 0 : n.allowedType) == null ? void 0 : l.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
383
+ images_file_types: ((i = (n = (a = p.value) == null ? void 0 : a.checkOptions) == null ? void 0 : n.allowedType) == null ? void 0 : i.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
384
384
  // 粘贴前处理
385
385
  paste_preprocess(t, r) {
386
386
  r == null || r.preventDefault();
@@ -388,7 +388,7 @@ const Ra = /* @__PURE__ */ $e({
388
388
  setup(t) {
389
389
  var d, y;
390
390
  const r = () => {
391
- H.value.dialogVisible = !0;
391
+ $.value.dialogVisible = !0;
392
392
  };
393
393
  if (t.ui.registry.addMenuItem("localImage", {
394
394
  text: "图片",
@@ -427,8 +427,8 @@ const Ra = /* @__PURE__ */ $e({
427
427
  });
428
428
  }
429
429
  }
430
- }, e = W([
431
- i.options,
430
+ }, e = E([
431
+ l.options,
432
432
  N.options,
433
433
  o
434
434
  ], {
@@ -440,7 +440,7 @@ const Ra = /* @__PURE__ */ $e({
440
440
  });
441
441
  pe.init(e).then(([t]) => {
442
442
  var r;
443
- t && (t.customProps = D({}, i), t.on("input", () => {
443
+ t && (t.customProps = D({}, l), t.on("input", () => {
444
444
  if (U.value) {
445
445
  U.value = !1;
446
446
  return;
@@ -452,39 +452,39 @@ const Ra = /* @__PURE__ */ $e({
452
452
  oe(d);
453
453
  }), t.on("drop", (d) => {
454
454
  te(d);
455
- }), (r = i.initComplete) == null || r.call(i, { editorIns: t }), m.value = t);
455
+ }), (r = l.initComplete) == null || r.call(l, { editorIns: t }), m.value = t);
456
456
  });
457
- }), qe(() => {
457
+ }), Fe(() => {
458
458
  var o, e, a, n;
459
459
  (o = m.value) == null || o.off("input"), (e = m.value) == null || e.off("paste"), (a = m.value) == null || a.off("drop"), (n = m.value) == null || n.destroy();
460
460
  });
461
461
  const he = () => {
462
462
  var e, a;
463
- const o = D({}, V.value || {});
464
- return ((a = (e = p.value) == null ? void 0 : e.data) == null ? void 0 : a.call(e, O(D({}, o), { extParameters: i.extParameters }))) || {};
463
+ const o = D({}, j.value || {});
464
+ return ((a = (e = p.value) == null ? void 0 : e.data) == null ? void 0 : a.call(e, B(D({}, o), { extParameters: l.extParameters }))) || {};
465
465
  }, xe = () => {
466
466
  var e, a;
467
- const o = D({}, V.value || {});
468
- return ((a = (e = p.value) == null ? void 0 : e.headers) == null ? void 0 : a.call(e, O(D({}, o), { extParameters: i.extParameters }))) || {};
467
+ const o = D({}, j.value || {});
468
+ return ((a = (e = p.value) == null ? void 0 : e.headers) == null ? void 0 : a.call(e, B(D({}, o), { extParameters: l.extParameters }))) || {};
469
469
  }, be = (o, e, a) => {
470
- a === Je.all && (V.value = { file: o });
470
+ a === Je.all && (j.value = { file: o });
471
471
  }, we = () => {
472
472
  var e, a;
473
473
  const o = D({}, w.value.additionalData || {});
474
- return ((a = (e = v.value) == null ? void 0 : e.data) == null ? void 0 : a.call(e, O(D({}, o), { extParameters: i.extParameters }))) || {};
474
+ return ((a = (e = v.value) == null ? void 0 : e.data) == null ? void 0 : a.call(e, B(D({}, o), { extParameters: l.extParameters }))) || {};
475
475
  }, ye = () => {
476
476
  var e, a;
477
477
  const o = D({}, w.value.additionalData || {});
478
- return ((a = (e = v.value) == null ? void 0 : e.headers) == null ? void 0 : a.call(e, O(D({}, o), { extParameters: i.extParameters }))) || {};
479
- }, De = (o, e, a) => F(null, null, function* () {
478
+ return ((a = (e = v.value) == null ? void 0 : e.headers) == null ? void 0 : a.call(e, B(D({}, o), { extParameters: l.extParameters }))) || {};
479
+ }, De = (o, e, a) => W(null, null, function* () {
480
480
  var t, r;
481
481
  const n = (r = (t = v == null ? void 0 : v.value) == null ? void 0 : t.handlerResponse) == null ? void 0 : r.call(t, o);
482
- let l;
483
- n instanceof Promise ? l = yield n : l = n, l != null && l.url ? a[a.length - 1].url = l.url : l != null && l.errorMessage && (b.error(l.errorMessage), a.splice(a.length - 1, 1)), w.value.formData.file = a;
482
+ let i;
483
+ n instanceof Promise ? i = yield n : i = n, i != null && i.url ? a[a.length - 1].url = i.url : i != null && i.errorMessage && (b.error(i.errorMessage), a.splice(a.length - 1, 1)), w.value.formData.file = a;
484
484
  }), _e = (o) => new Promise((e, a) => {
485
- var l, t, r, d, y, f, h, C;
485
+ var i, t, r, d, y, f, h, C;
486
486
  const n = o.name.split(".").filter(Boolean).pop() ? o.name.split(".").filter(Boolean).pop() : "";
487
- if (!((t = (l = v.value) == null ? void 0 : l.allowedType) != null && t.includes(n.toLowerCase()))) {
487
+ if (!((t = (i = v.value) == null ? void 0 : i.allowedType) != null && t.includes(n.toLowerCase()))) {
488
488
  b.error(`请上传格式为${(d = (r = v.value) == null ? void 0 : r.allowedType) == null ? void 0 : d.map((P) => P.toUpperCase()).join("、")}的音频`), a();
489
489
  return;
490
490
  }
@@ -500,21 +500,21 @@ const Ra = /* @__PURE__ */ $e({
500
500
  }, Ce = () => {
501
501
  var e, a;
502
502
  const o = D({}, _.value.additionalData || {});
503
- return ((a = (e = u.value) == null ? void 0 : e.data) == null ? void 0 : a.call(e, O(D({}, o), { extParameters: i.extParameters }))) || {};
503
+ return ((a = (e = u.value) == null ? void 0 : e.data) == null ? void 0 : a.call(e, B(D({}, o), { extParameters: l.extParameters }))) || {};
504
504
  }, Ue = () => {
505
505
  var e, a;
506
506
  const o = D({}, _.value.additionalData || {});
507
- return ((a = (e = u.value) == null ? void 0 : e.headers) == null ? void 0 : a.call(e, O(D({}, o), { extParameters: i.extParameters }))) || {};
508
- }, Ie = (o, e, a) => F(null, null, function* () {
507
+ return ((a = (e = u.value) == null ? void 0 : e.headers) == null ? void 0 : a.call(e, B(D({}, o), { extParameters: l.extParameters }))) || {};
508
+ }, Ie = (o, e, a) => W(null, null, function* () {
509
509
  var t, r;
510
510
  debugger;
511
511
  const n = (r = (t = u == null ? void 0 : u.value) == null ? void 0 : t.handlerResponse) == null ? void 0 : r.call(t, o);
512
- let l;
513
- n instanceof Promise ? l = yield n : l = n, l != null && l.url ? a[a.length - 1].url = l.url : l != null && l.errorMessage && (b.error(l.errorMessage), a.splice(a.length - 1, 1)), _.value.formData.file = a;
512
+ let i;
513
+ n instanceof Promise ? i = yield n : i = n, i != null && i.url ? a[a.length - 1].url = i.url : i != null && i.errorMessage && (b.error(i.errorMessage), a.splice(a.length - 1, 1)), _.value.formData.file = a;
514
514
  }), Pe = (o) => new Promise((e, a) => {
515
- var l, t, r, d, y, f, h, C;
515
+ var i, t, r, d, y, f, h, C;
516
516
  const n = o.name.split(".").filter(Boolean).pop() ? o.name.split(".").filter(Boolean).pop() : "";
517
- if (!((t = (l = u == null ? void 0 : u.value) == null ? void 0 : l.allowedType) != null && t.includes(n.toLowerCase()))) {
517
+ if (!((t = (i = u == null ? void 0 : u.value) == null ? void 0 : i.allowedType) != null && t.includes(n.toLowerCase()))) {
518
518
  b.error(`请上传格式为${(d = (r = u == null ? void 0 : u.value) == null ? void 0 : r.allowedType) == null ? void 0 : d.map((P) => P.toUpperCase()).join("、")}的视频`), a();
519
519
  return;
520
520
  }
@@ -528,21 +528,21 @@ const Ra = /* @__PURE__ */ $e({
528
528
  }, Se = (o, e, a) => {
529
529
  b.error("上传发生错误,请重试!"), _.value.formData.file = a;
530
530
  };
531
- return de(() => [i.disabled, m.value], () => {
531
+ return de(() => [l.disabled, m.value], () => {
532
532
  var o, e;
533
- (e = (o = m.value) == null ? void 0 : o.mode) == null || e.set(i.disabled ? "readonly" : "design");
533
+ (e = (o = m.value) == null ? void 0 : o.mode) == null || e.set(l.disabled ? "readonly" : "design");
534
534
  }, { immediate: !0 }), de(
535
- () => [i.value, m.value],
535
+ () => [l.value, m.value],
536
536
  () => {
537
537
  var o, e, a, n;
538
538
  if (g.value) {
539
539
  g.value = !1;
540
540
  return;
541
541
  }
542
- U.value = !0, (o = m.value) == null || o.setContent(i.value ? i.value : ""), (a = m.value) == null || a.selection.select((e = m.value) == null ? void 0 : e.getBody(), !0), (n = m.value) == null || n.selection.collapse(!1);
542
+ U.value = !0, (o = m.value) == null || o.setContent(l.value ? l.value : ""), (a = m.value) == null || a.selection.select((e = m.value) == null ? void 0 : e.getBody(), !0), (n = m.value) == null || n.selection.collapse(!1);
543
543
  },
544
544
  { immediate: !0 }
545
- ), { __sfc: !0, defaultImageUploadOptions: z, defaultVideoUploadOptions: S, defaultAudioUploadOptions: I, props: i, emits: s, insRef: B, editorRef: m, preventSettingContent: g, preventUpdatingModelValue: U, uploadLoadingConfig: R, mergeImageUploadOptions: p, mergeVideoUploadOptions: u, mergeAudioUploadOptions: v, uploadImage: H, uploadImageAdditionalData: V, uploadImageFormRef: J, onUploadImageClose: K, onUploadImageConfirm: fe, uploadAudio: w, uploadAudioFormRef: Q, onUploadAudioClose: Y, onUploadAudioConfirm: ve, uploadVideo: _, uploadVideoFormRef: Z, onUploadVideoClose: ee, onUploadVideoConfirm: ge, uploadPasteOrDropFile: ae, handleDataTransfer: L, onValuePaste: oe, onValueDrop: te, getUploadImageData: he, getUploadImageHeaders: xe, onUploadImageInnerBeforeUploadEnd: be, getUploadAudioData: we, getUploadAudioHeaders: ye, onUploadAudioSuccess: De, onUploadAudioBeforeUpload: _e, onUploadAudioRemove: ke, onUploadAudioError: Ae, getUploadVideoData: Ce, getUploadVideoHeaders: Ue, onUploadVideoSuccess: Ie, onUploadVideoBeforeUpload: Pe, onUploadVideoRemove: Me, onUploadVideoError: Se };
545
+ ), { __sfc: !0, defaultImageUploadOptions: z, defaultVideoUploadOptions: S, defaultAudioUploadOptions: I, props: l, emits: s, insRef: V, editorRef: m, preventSettingContent: g, preventUpdatingModelValue: U, uploadLoadingConfig: H, mergeImageUploadOptions: p, mergeVideoUploadOptions: u, mergeAudioUploadOptions: v, uploadImage: $, uploadImageAdditionalData: j, uploadImageFormRef: J, onUploadImageClose: K, onUploadImageConfirm: fe, uploadAudio: w, uploadAudioFormRef: Q, onUploadAudioClose: Y, onUploadAudioConfirm: ve, uploadVideo: _, uploadVideoFormRef: Z, onUploadVideoClose: ee, onUploadVideoConfirm: ge, uploadPasteOrDropFile: ae, handleDataTransfer: L, onValuePaste: oe, onValueDrop: te, getUploadImageData: he, getUploadImageHeaders: xe, onUploadImageInnerBeforeUploadEnd: be, getUploadAudioData: we, getUploadAudioHeaders: ye, onUploadAudioSuccess: De, onUploadAudioBeforeUpload: _e, onUploadAudioRemove: ke, onUploadAudioError: Ae, getUploadVideoData: Ce, getUploadVideoHeaders: Ue, onUploadVideoSuccess: Ie, onUploadVideoBeforeUpload: Pe, onUploadVideoRemove: Me, onUploadVideoError: Se };
546
546
  }
547
547
  });
548
548
  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": "1.2.4",
5
+ "version": "1.2.6",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",
@@ -23,11 +23,11 @@
23
23
  "vue-global-config": "^0.2.6",
24
24
  "tinymce": "^7.1.0",
25
25
  "element-ui": "^2.15.14",
26
- "@keyblade/one-travel": "^3.0.1"
26
+ "@keyblade/one-travel": "^3.0.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "vue": "^2.7.0",
30
- "@keyblade/pro-components-vue2": "^1.14.3"
30
+ "@keyblade/pro-components-vue2": "^1.14.5"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "vite build",