@keyblade/tinymce-editor-vue2 0.0.12-alpha.43 → 0.0.12-alpha.44

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 +123 -114
  2. package/package.json +1 -1
package/es/editor.vue2.js CHANGED
@@ -1,11 +1,11 @@
1
- import { defineComponent as he, ref as h, computed as T, watch as I, onMounted as xe, onUnmounted as we } from "vue";
2
- import { oneTravelImgPondBeforeAddFile as G, oneTravelImageCheckAndTransform as be, oneTravelImageCompressor as J } from "@keyblade/one-travel";
3
- import { blobToFile as K, getFileExtension as Q, generateUUID as ye, getImagePixel as _e } from "./util.js";
1
+ import { defineComponent as xe, ref as h, computed as C, watch as I, onMounted as we, onUnmounted as be } from "vue";
2
+ import { oneTravelImgPondBeforeAddFile as J, oneTravelImageCheckAndTransform as ye, oneTravelImageCompressor as K } from "@keyblade/one-travel";
3
+ import { blobToFile as Q, getFileExtension as X, generateUUID as _e, getImagePixel as Te } from "./util.js";
4
4
  import "./style.less.js";
5
- import Te from "imgpond";
6
- import { conclude as C } from "vue-global-config";
7
- import X from "tinymce";
8
- import Ce from "./langs/zh_CN.js";
5
+ import Ce from "imgpond";
6
+ import { conclude as A } from "vue-global-config";
7
+ import Y from "tinymce";
8
+ import Ae from "./langs/zh_CN.js";
9
9
  import "tinymce/skins/ui/oxide/skin";
10
10
  import "tinymce/models/dom";
11
11
  import "tinymce/themes/silver";
@@ -34,9 +34,9 @@ import "tinymce/plugins/table";
34
34
  import "tinymce/plugins/visualblocks";
35
35
  import "tinymce/plugins/visualchars";
36
36
  import "tinymce/plugins/wordcount";
37
- import { globalProps as A } from "./index.js";
37
+ import { globalProps as D } from "./index.js";
38
38
  import { Message as y } from "element-ui";
39
- const da = /* @__PURE__ */ he({
39
+ const ma = /* @__PURE__ */ xe({
40
40
  __name: "editor",
41
41
  props: {
42
42
  value: { default: "" },
@@ -50,10 +50,10 @@ const da = /* @__PURE__ */ he({
50
50
  initComplete: null
51
51
  },
52
52
  emits: ["input"],
53
- setup(Y, { emit: z }) {
54
- const m = Y;
55
- X.addI18n("zh_CN", Ce);
56
- const H = {
53
+ setup(Z, { emit: H }) {
54
+ const m = Z;
55
+ Y.addI18n("zh_CN", Ae);
56
+ const V = {
57
57
  maxCount: 10,
58
58
  tipText: "上传",
59
59
  maxSize: 30,
@@ -63,25 +63,25 @@ const da = /* @__PURE__ */ he({
63
63
  minHeight: 50,
64
64
  maxWidth: 6e3,
65
65
  maxHeight: 6e3
66
- }, V = {
66
+ }, B = {
67
67
  enable: !0,
68
68
  maxSize: 300,
69
69
  allowedType: ["mp4", "3gp"],
70
70
  accept: "video/mp4,video/3gpp"
71
- }, B = {
71
+ }, R = {
72
72
  enable: !0,
73
73
  maxSize: 200,
74
74
  allowedType: ["mp3", "m4a", "wav", "aac"],
75
75
  accept: "audio/mp3,audio/wav,audio/aac,audio/x-m4a"
76
- }, R = h(), b = h(), D = h(!1), P = h(!1), f = h({
76
+ }, W = h(), b = h(), P = h(!1), M = h(!1), f = h({
77
77
  show: !1,
78
78
  text: "图片上传中,请稍等"
79
- }), d = T(() => C([m.imageUploadOptions, A.imageUploadOptions, H]) || {}), c = T(() => C([m.videoUploadOptions, A.videoUploadOptions, V]) || {}), g = T(() => C([m.audioUploadOptions, A.audioUploadOptions, B]) || {}), S = T(() => C([m.imgPondOptions, A.imgPondOptions]) || {}), Z = T(() => {
80
- var e, i;
81
- return ((i = (e = d == null ? void 0 : d.value) == null ? void 0 : e.allowedType) == null ? void 0 : i.map((t) => `.${t}`).join(",")) || "";
82
- }), M = h();
83
- I(() => M.value, () => {
84
- M.value && G(M.value, {
79
+ }), d = C(() => A([m.imageUploadOptions, D.imageUploadOptions, V]) || {}), c = C(() => A([m.videoUploadOptions, D.videoUploadOptions, B]) || {}), g = C(() => A([m.audioUploadOptions, D.audioUploadOptions, R]) || {}), z = C(() => A([m.imgPondOptions, D.imgPondOptions]) || {}), ee = C(() => {
80
+ var e, t;
81
+ return ((t = (e = d == null ? void 0 : d.value) == null ? void 0 : e.allowedType) == null ? void 0 : t.map((i) => `.${i}`).join(",")) || "";
82
+ }), S = h();
83
+ I(() => S.value, () => {
84
+ S.value && J(S.value, {
85
85
  onStart: () => {
86
86
  f.value = {
87
87
  show: !0,
@@ -98,7 +98,7 @@ const da = /* @__PURE__ */ he({
98
98
  }, { immediate: !0 });
99
99
  const U = h();
100
100
  I(() => U.value, () => {
101
- U.value && G(U.value, {
101
+ U.value && J(U.value, {
102
102
  onStart: () => {
103
103
  f.value = {
104
104
  show: !0,
@@ -113,23 +113,23 @@ const da = /* @__PURE__ */ he({
113
113
  }
114
114
  });
115
115
  }, { immediate: !0 });
116
- const _ = h({
116
+ const T = h({
117
117
  dialogVisible: !1,
118
118
  formData: {
119
119
  images: []
120
120
  }
121
- }), W = h(), $ = () => {
122
- _.value.dialogVisible = !1, _.value.formData = {
121
+ }), $ = h(), E = () => {
122
+ T.value.dialogVisible = !1, T.value.formData = {
123
123
  images: []
124
124
  };
125
- }, ee = () => {
125
+ }, ae = () => {
126
126
  var e;
127
- (e = W.value) == null || e.validate((i) => {
128
- i && (_.value.formData.images.forEach((t) => {
127
+ (e = $.value) == null || e.validate((t) => {
128
+ t && (T.value.formData.images.forEach((i) => {
129
129
  var o;
130
- let a = t;
131
- S.value.srcAt && (a = (t == null ? void 0 : t[S.value.srcAt]) || ""), (o = b.value) == null || o.insertContent(`<img src=${a} alt="" />`);
132
- }), $());
130
+ let a = i;
131
+ z.value.srcAt && (a = (i == null ? void 0 : i[z.value.srcAt]) || ""), (o = b.value) == null || o.insertContent(`<img src=${a} alt="" />`);
132
+ }), E());
133
133
  });
134
134
  }, v = h({
135
135
  dialogVisible: !1,
@@ -143,17 +143,17 @@ const da = /* @__PURE__ */ he({
143
143
  },
144
144
  // 用于临时保存上传前的参数 { file: File }
145
145
  additionalData: {}
146
- }), E = h(), j = () => {
146
+ }), j = h(), q = () => {
147
147
  v.value.dialogVisible = !1, v.value.formData = {
148
148
  name: "",
149
149
  cover: [],
150
150
  file: []
151
151
  }, v.value.additionalData = {};
152
- }, ae = () => {
152
+ }, oe = () => {
153
153
  var e;
154
- (e = E.value) == null || e.validate((i) => {
155
- var t, a;
156
- i && ((a = b.value) == null || a.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${v.value.formData.name}" data-poster="${v.value.formData.cover[0]}" src="${(t = v.value.formData.file[0]) == null ? void 0 : t.url}"></audio>`), j());
154
+ (e = j.value) == null || e.validate((t) => {
155
+ var i, a;
156
+ t && ((a = b.value) == null || a.insertContent(`<audio controls controlslist="nodownload noplaybackrate" data-name="${v.value.formData.name}" data-poster="${v.value.formData.cover[0]}" src="${(i = v.value.formData.file[0]) == null ? void 0 : i.url}"></audio>`), q());
157
157
  });
158
158
  }, x = h({
159
159
  dialogVisible: !1,
@@ -163,42 +163,42 @@ const da = /* @__PURE__ */ he({
163
163
  },
164
164
  // 用于临时保存上传前的参数 { file: File }
165
165
  additionalData: {}
166
- }), q = h(), F = () => {
166
+ }), N = h(), F = () => {
167
167
  x.value.dialogVisible = !1, x.value.formData = {
168
168
  file: []
169
169
  }, x.value.additionalData = {};
170
- }, oe = () => {
170
+ }, te = () => {
171
171
  var e;
172
- (e = q.value) == null || e.validate((i) => {
173
- var t, a;
174
- i && ((a = b.value) == null || a.insertContent(`<video width="auto" height="auto" controls src="${(t = x.value.formData.file[0]) == null ? void 0 : t.url}"></video>`), F());
172
+ (e = N.value) == null || e.validate((t) => {
173
+ var i, a;
174
+ t && ((a = b.value) == null || a.insertContent(`<video width="auto" height="auto" controls src="${(i = x.value.formData.file[0]) == null ? void 0 : i.url}"></video>`), F());
175
175
  });
176
- }, te = () => {
176
+ }, ie = () => {
177
177
  document.querySelectorAll(".swal2-container .swal2-title").forEach((e) => {
178
178
  e && (e.innerHTML = `单次最多可选择${d.value.maxCount}张图片`);
179
179
  });
180
- }, ie = (e, i) => new Promise(async (t, a) => {
180
+ }, ne = (e, t) => new Promise(async (i, a) => {
181
181
  var r, l;
182
- const o = await J(e);
182
+ const o = await K(e);
183
183
  if (!o.success) {
184
184
  a(), setTimeout(() => {
185
- i.onError(o.errorMessage);
185
+ t.onError(o.errorMessage);
186
186
  });
187
187
  return;
188
188
  }
189
- const n = await ((l = (r = d.value).handleRequest) == null ? void 0 : l.call(r, K(o.file, e.name), e.name, { extParameters: m.extParameters }));
189
+ const n = await ((l = (r = d.value).handleRequest) == null ? void 0 : l.call(r, Q(o.file, e.name), e.name, { extParameters: m.extParameters }));
190
190
  if (!n || !(n != null && n.success)) {
191
191
  a(), setTimeout(() => {
192
- i.onError(n == null ? void 0 : n.errorMessage);
192
+ t.onError(n == null ? void 0 : n.errorMessage);
193
193
  });
194
194
  return;
195
195
  }
196
- t(n.url);
196
+ i(n.url);
197
197
  });
198
- async function N(e, i) {
199
- const a = i.node.getElementsByTagName("img"), o = [];
198
+ async function L(e, t) {
199
+ const a = t.node.getElementsByTagName("img"), o = [];
200
200
  for (let n = a.length - 1; n >= 0; n--) {
201
- const r = a[n], l = "img-" + ye();
201
+ const r = a[n], l = "img-" + _e();
202
202
  r.classList.add(l), o.push(l);
203
203
  }
204
204
  setTimeout(async () => {
@@ -212,12 +212,12 @@ const da = /* @__PURE__ */ he({
212
212
  e.dom.remove(u);
213
213
  continue;
214
214
  } else if (p.startsWith("http://") || p.startsWith("https://")) {
215
- const w = await _e(p);
215
+ const w = await Te(p);
216
216
  if (w && (w.width < (d.value.minWidth || 0) && w.height < (d.value.minHeight || 0) || w.width > (d.value.maxWidth || 0) && w.height > (d.value.maxHeight || 0))) {
217
217
  e.dom.remove(u);
218
218
  continue;
219
219
  }
220
- const k = Q(p);
220
+ const k = X(p);
221
221
  if (!((r = (n = d.value) == null ? void 0 : n.allowedType) != null && r.includes(k.toLowerCase()))) {
222
222
  e.dom.remove(u);
223
223
  continue;
@@ -226,13 +226,20 @@ const da = /* @__PURE__ */ he({
226
226
  }
227
227
  });
228
228
  }
229
- xe(() => {
230
- var t;
229
+ const _ = () => {
230
+ setTimeout(() => {
231
+ var t;
232
+ const e = document.querySelector(".tox-notifications-container");
233
+ (t = e == null ? void 0 : e.remove) == null || t.call(e);
234
+ }, 2e3);
235
+ };
236
+ we(() => {
237
+ var i;
231
238
  const e = {
232
239
  // 设置语言
233
240
  language: "zh_CN",
234
241
  // 实例
235
- target: R.value,
242
+ target: W.value,
236
243
  // 隐藏品牌
237
244
  branding: !1,
238
245
  // 隐藏右上角升级按钮
@@ -310,28 +317,28 @@ const da = /* @__PURE__ */ he({
310
317
  convert_urls: !1,
311
318
  paste_webkit_styles: "all",
312
319
  paste_data_images: !0,
313
- images_file_types: ((t = d.value.allowedType) == null ? void 0 : t.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
320
+ images_file_types: ((i = d.value.allowedType) == null ? void 0 : i.join(",")) || "jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp",
314
321
  // 粘贴前处理
315
322
  paste_preprocess(a, o) {
316
323
  o.content = o.content.replace(/<video[^>]*(?:\/>|>[\s\S]*?<\/video>)/g, ""), o.content = o.content.replace(/<audio[^>]*(?:\/>|>[\s\S]*?<\/audio>)/g, ""), o.content = o.content.replace(/<nav/g, "<div").replace(/<\/nav>/g, "</div>"), o.content = o.content.replace(/<header/g, "<div").replace(/<\/header>/g, "</div>"), o.content = o.content.replace(/<footer/g, "<div").replace(/<\/footer>/g, "</div>"), o.content = o.content.replace(/<aside/g, "<div").replace(/<\/aside>/g, "</div>"), o.content = o.content.replace(/<section/g, "<div").replace(/<\/section>/g, "</div>"), o.content = o.content.replace(/<main/g, "<div").replace(/<\/main>/g, "</div>"), o.content = o.content.replace(/<article/g, "<div").replace(/<\/article>/g, "</div>"), o.content = o.content.replace(/<details/g, "<div").replace(/<\/details>/g, "</div>");
317
324
  },
318
325
  // 粘贴后处理(处理异步操作)
319
326
  paste_postprocess(a, o) {
320
- N(a, o);
327
+ L(a, o);
321
328
  },
322
329
  images_upload_handler(a) {
323
330
  return new Promise(async (o, n) => {
324
- var w, k, L;
331
+ var w, k, O;
325
332
  if (!((w = d.value) != null && w.handleRequest))
326
- return n({ message: "缺少图片上传配置", remove: !0 });
333
+ return _(), n({ message: "缺少图片上传配置", remove: !0 });
327
334
  f.value = {
328
335
  show: !0,
329
336
  text: "图片上传中,请稍等"
330
337
  };
331
338
  let r = a.blob(), l = r.name ? r.name : a.filename();
332
339
  if (!(r != null && r.name) && !(r != null && r.lastModified) && r.type === "image/png")
333
- return f.value.show = !1, n({ message: "不允许粘贴", remove: !0 });
334
- const s = await be(r, l, {
340
+ return f.value.show = !1, _(), n({ message: "不允许粘贴", remove: !0 });
341
+ const s = await ye(r, l, {
335
342
  imageMaxSize: d.value.maxSize,
336
343
  imageAllowedType: d.value.allowedType,
337
344
  // imageAllowedMineType: mergeImageUploadOptions.value.allowedMineType,
@@ -341,25 +348,25 @@ const da = /* @__PURE__ */ he({
341
348
  imageMaxHeight: d.value.maxHeight
342
349
  });
343
350
  if (!s.success)
344
- return f.value.show = !1, n({ message: (s == null ? void 0 : s.errorMessage) || "", remove: !0 });
351
+ return f.value.show = !1, _(), n({ message: (s == null ? void 0 : s.errorMessage) || "", remove: !0 });
345
352
  if (s.hasTransform) {
346
353
  r = s.file;
347
- const O = l == null ? void 0 : l.split(".");
348
- O.pop(), l = `${O.join(",")}.jpg`;
354
+ const G = l == null ? void 0 : l.split(".");
355
+ G.pop(), l = `${G.join(",")}.jpg`;
349
356
  }
350
- const u = await J(r);
357
+ const u = await K(r);
351
358
  if (!u.success)
352
- return f.value.show = !1, n({ message: u == null ? void 0 : u.errorMessage, remove: !0 });
353
- const p = await ((L = (k = d.value).handleRequest) == null ? void 0 : L.call(k, K(u.file, l), l, { extParameters: m.extParameters }));
359
+ return f.value.show = !1, _(), n({ message: u == null ? void 0 : u.errorMessage, remove: !0 });
360
+ const p = await ((O = (k = d.value).handleRequest) == null ? void 0 : O.call(k, Q(u.file, l), l, { extParameters: m.extParameters }));
354
361
  if (!p || !p.success)
355
- return f.value.show = !1, n({ message: p.errorMessage, remove: !0 });
362
+ return f.value.show = !1, _(), n({ message: p.errorMessage, remove: !0 });
356
363
  f.value.show = !1, o(p.url);
357
364
  });
358
365
  },
359
366
  setup(a) {
360
367
  var n, r;
361
368
  const o = () => {
362
- _.value.dialogVisible = !0, setTimeout(() => {
369
+ T.value.dialogVisible = !0, setTimeout(() => {
363
370
  var s, u;
364
371
  const l = (s = document == null ? void 0 : document.querySelector) == null ? void 0 : s.call(document, ".tinymce-editor-upload-image-dialog .el-upload__text > div");
365
372
  l && (l.innerHTML = ((u = d.value) == null ? void 0 : u.tipText) || "上传");
@@ -406,10 +413,10 @@ const da = /* @__PURE__ */ he({
406
413
  });
407
414
  }
408
415
  }
409
- }, i = C(
416
+ }, t = A(
410
417
  [
411
418
  m.options,
412
- A.options,
419
+ D.options,
413
420
  e
414
421
  ],
415
422
  {
@@ -419,40 +426,42 @@ const da = /* @__PURE__ */ he({
419
426
  type: Object
420
427
  }
421
428
  );
422
- X.init(i).then(([a]) => {
429
+ Y.init(t).then(([a]) => {
423
430
  var o;
424
431
  a && (a.customProps = { ...m }, a.on("change input Redo Undo SetContent", () => {
425
- if (P.value) {
426
- P.value = !1;
432
+ if (M.value) {
433
+ M.value = !1;
427
434
  return;
428
435
  }
429
- D.value = !0, z("input", a.getContent());
436
+ P.value = !0, H("input", a.getContent());
430
437
  }), a.on("paste", (n) => {
431
438
  var l, s;
432
439
  const r = ((l = n.clipboardData) == null ? void 0 : l.files) || [];
433
440
  for (let u of r) {
434
- const p = Q(u.name) || "";
441
+ const p = X(u.name) || "";
435
442
  (s = d.value.allowedType) != null && s.includes(p.toLowerCase()) || n.preventDefault();
436
443
  }
444
+ }), a.on("drop", () => {
445
+ _();
437
446
  }), (o = m.initComplete) == null || o.call(m, { editorIns: a }), b.value = a);
438
447
  });
439
- }), we(() => {
448
+ }), be(() => {
440
449
  var e;
441
450
  (e = b.value) == null || e.destroy();
442
451
  });
443
- const ne = () => {
444
- var i, t;
452
+ const le = () => {
453
+ var t, i;
445
454
  const e = { ...v.value.additionalData || {} };
446
- return ((t = (i = g.value) == null ? void 0 : i.data) == null ? void 0 : t.call(i, { ...e, extParameters: m.extParameters })) || {};
447
- }, le = () => {
448
- var i, t;
455
+ return ((i = (t = g.value) == null ? void 0 : t.data) == null ? void 0 : i.call(t, { ...e, extParameters: m.extParameters })) || {};
456
+ }, re = () => {
457
+ var t, i;
449
458
  const e = { ...v.value.additionalData || {} };
450
- return ((t = (i = g.value) == null ? void 0 : i.headers) == null ? void 0 : t.call(i, { ...e, extParameters: m.extParameters })) || {};
451
- }, re = (e, i, t) => {
459
+ return ((i = (t = g.value) == null ? void 0 : t.headers) == null ? void 0 : i.call(t, { ...e, extParameters: m.extParameters })) || {};
460
+ }, se = (e, t, i) => {
452
461
  var o, n;
453
462
  const a = (n = (o = g == null ? void 0 : g.value) == null ? void 0 : o.handlerResponse) == null ? void 0 : n.call(o, e);
454
- a != null && a.url ? t[t.length - 1].url = a.url : a != null && a.errorMessage && (y.error(a.errorMessage), t.splice(t.length - 1, 1)), v.value.formData.file = t;
455
- }, se = (e, i) => new Promise((t, a) => {
463
+ a != null && a.url ? i[i.length - 1].url = a.url : a != null && a.errorMessage && (y.error(a.errorMessage), i.splice(i.length - 1, 1)), v.value.formData.file = i;
464
+ }, ue = (e, t) => new Promise((i, a) => {
456
465
  var n, r, l, s, u, p;
457
466
  const o = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
458
467
  if (!((r = (n = g.value) == null ? void 0 : n.allowedType) != null && r.includes(o.toLowerCase()))) {
@@ -463,24 +472,24 @@ const da = /* @__PURE__ */ he({
463
472
  y.error(`请上传${((p = g.value) == null ? void 0 : p.maxSize) || 0}M内的音频`), a();
464
473
  return;
465
474
  }
466
- v.value.additionalData = { file: e }, t(!0);
467
- }), ue = (e, i) => {
468
- v.value.formData.file = i;
469
- }, de = (e, i, t) => {
470
- y.error("上传发生错误,请重试!"), v.value.formData.file = t;
471
- }, me = () => {
472
- var i, t;
473
- const e = { ...x.value.additionalData || {} };
474
- return ((t = (i = c.value) == null ? void 0 : i.data) == null ? void 0 : t.call(i, { ...e, extParameters: m.extParameters })) || {};
475
+ v.value.additionalData = { file: e }, i(!0);
476
+ }), de = (e, t) => {
477
+ v.value.formData.file = t;
478
+ }, me = (e, t, i) => {
479
+ y.error("上传发生错误,请重试!"), v.value.formData.file = i;
475
480
  }, ce = () => {
476
- var i, t;
481
+ var t, i;
482
+ const e = { ...x.value.additionalData || {} };
483
+ return ((i = (t = c.value) == null ? void 0 : t.data) == null ? void 0 : i.call(t, { ...e, extParameters: m.extParameters })) || {};
484
+ }, pe = () => {
485
+ var t, i;
477
486
  const e = { ...x.value.additionalData || {} };
478
- return ((t = (i = c.value) == null ? void 0 : i.headers) == null ? void 0 : t.call(i, { ...e, extParameters: m.extParameters })) || {};
479
- }, pe = (e, i, t) => {
487
+ return ((i = (t = c.value) == null ? void 0 : t.headers) == null ? void 0 : i.call(t, { ...e, extParameters: m.extParameters })) || {};
488
+ }, ve = (e, t, i) => {
480
489
  var o, n;
481
490
  const a = (n = (o = c == null ? void 0 : c.value) == null ? void 0 : o.handlerResponse) == null ? void 0 : n.call(o, e);
482
- a != null && a.url ? t[t.length - 1].url = a.url : a != null && a.errorMessage && (y.error(a.errorMessage), t.splice(t.length - 1, 1)), x.value.formData.file = t;
483
- }, ve = (e, i) => new Promise((t, a) => {
491
+ a != null && a.url ? i[i.length - 1].url = a.url : a != null && a.errorMessage && (y.error(a.errorMessage), i.splice(i.length - 1, 1)), x.value.formData.file = i;
492
+ }, fe = (e, t) => new Promise((i, a) => {
484
493
  var n, r, l, s, u, p;
485
494
  const o = e.name.split(".").filter(Boolean).pop() ? e.name.split(".").filter(Boolean).pop() : "";
486
495
  if (!((r = (n = c == null ? void 0 : c.value) == null ? void 0 : n.allowedType) != null && r.includes(o.toLowerCase()))) {
@@ -491,29 +500,29 @@ const da = /* @__PURE__ */ he({
491
500
  y.error(`请上传${((p = c == null ? void 0 : c.value) == null ? void 0 : p.maxSize) || 0}M内的视频`), a();
492
501
  return;
493
502
  }
494
- x.value.additionalData = { file: e }, t(!0);
495
- }), fe = (e, i) => {
496
- x.value.formData.file = i;
497
- }, ge = (e, i, t) => {
498
- y.error("上传发生错误,请重试!"), x.value.formData.file = t;
503
+ x.value.additionalData = { file: e }, i(!0);
504
+ }), ge = (e, t) => {
505
+ x.value.formData.file = t;
506
+ }, he = (e, t, i) => {
507
+ y.error("上传发生错误,请重试!"), x.value.formData.file = i;
499
508
  };
500
509
  return I(() => [m.disabled, b.value], () => {
501
- var e, i;
502
- (i = (e = b.value) == null ? void 0 : e.mode) == null || i.set(m.disabled ? "readonly" : "design");
510
+ var e, t;
511
+ (t = (e = b.value) == null ? void 0 : e.mode) == null || t.set(m.disabled ? "readonly" : "design");
503
512
  }, { immediate: !0 }), I(
504
513
  () => [m.value, b.value],
505
514
  () => {
506
515
  var e;
507
- if (D.value) {
508
- D.value = !1;
516
+ if (P.value) {
517
+ P.value = !1;
509
518
  return;
510
519
  }
511
- P.value = !0, (e = b.value) == null || e.setContent(m.value ? m.value : "");
520
+ M.value = !0, (e = b.value) == null || e.setContent(m.value ? m.value : "");
512
521
  },
513
522
  { immediate: !0 }
514
- ), { __sfc: !0, defaultImageUploadOptions: H, defaultVideoUploadOptions: V, defaultAudioUploadOptions: B, props: m, emits: z, insRef: R, editorRef: b, preventSettingContent: D, preventUpdatingModelValue: P, uploadLoadingConfig: f, mergeImageUploadOptions: d, mergeVideoUploadOptions: c, mergeAudioUploadOptions: g, mergeImgPondOptions: S, imgPondAccept: Z, uploadImageImgPondRef: M, audioImageImgPondRef: U, uploadImage: _, uploadImageFormRef: W, onUploadImageClose: $, onUploadImageConfirm: ee, uploadAudio: v, uploadAudioFormRef: E, onUploadAudioClose: j, onUploadAudioConfirm: ae, uploadVideo: x, uploadVideoFormRef: q, onUploadVideoClose: F, onUploadVideoConfirm: oe, onImageUploadUploadExceed: te, onImageUploadUpload: ie, processPastedImage: N, getUploadAudioData: ne, getUploadAudioHeaders: le, onUploadAudioSuccess: re, onUploadAudioBeforeUpload: se, onUploadAudioRemove: ue, onUploadAudioError: de, getUploadVideoData: me, getUploadVideoHeaders: ce, onUploadVideoSuccess: pe, onUploadVideoBeforeUpload: ve, onUploadVideoRemove: fe, onUploadVideoError: ge, ImgPond: Te };
523
+ ), { __sfc: !0, defaultImageUploadOptions: V, defaultVideoUploadOptions: B, defaultAudioUploadOptions: R, props: m, emits: H, insRef: W, editorRef: b, preventSettingContent: P, preventUpdatingModelValue: M, uploadLoadingConfig: f, mergeImageUploadOptions: d, mergeVideoUploadOptions: c, mergeAudioUploadOptions: g, mergeImgPondOptions: z, imgPondAccept: ee, uploadImageImgPondRef: S, audioImageImgPondRef: U, uploadImage: T, uploadImageFormRef: $, onUploadImageClose: E, onUploadImageConfirm: ae, uploadAudio: v, uploadAudioFormRef: j, onUploadAudioClose: q, onUploadAudioConfirm: oe, uploadVideo: x, uploadVideoFormRef: N, onUploadVideoClose: F, onUploadVideoConfirm: te, onImageUploadUploadExceed: ie, onImageUploadUpload: ne, processPastedImage: L, removeNotification: _, getUploadAudioData: le, getUploadAudioHeaders: re, onUploadAudioSuccess: se, onUploadAudioBeforeUpload: ue, onUploadAudioRemove: de, onUploadAudioError: me, getUploadVideoData: ce, getUploadVideoHeaders: pe, onUploadVideoSuccess: ve, onUploadVideoBeforeUpload: fe, onUploadVideoRemove: ge, onUploadVideoError: he, ImgPond: Ce };
515
524
  }
516
525
  });
517
526
  export {
518
- da as default
527
+ ma as default
519
528
  };
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.43",
5
+ "version": "0.0.12-alpha.44",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",