@web-utils/component 3.0.6 → 3.1.0

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 (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,34 +1,34 @@
1
- var F = Object.defineProperty, C = Object.defineProperties;
2
- var _ = Object.getOwnPropertyDescriptors;
1
+ var I = Object.defineProperty, k = Object.defineProperties;
2
+ var F = Object.getOwnPropertyDescriptors;
3
3
  var y = Object.getOwnPropertySymbols;
4
- var T = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
5
- var w = (e, t, i) => t in e ? F(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, h = (e, t) => {
6
- for (var i in t || (t = {}))
7
- T.call(t, i) && w(e, i, t[i]);
4
+ var C = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
5
+ var w = (t, e, i) => e in t ? I(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, h = (t, e) => {
6
+ for (var i in e || (e = {}))
7
+ C.call(e, i) && w(t, i, e[i]);
8
8
  if (y)
9
- for (var i of y(t))
10
- B.call(t, i) && w(e, i, t[i]);
11
- return e;
12
- }, f = (e, t) => C(e, _(t));
13
- var p = (e, t, i) => new Promise((a, n) => {
14
- var o = (s) => {
9
+ for (var i of y(e))
10
+ _.call(e, i) && w(t, i, e[i]);
11
+ return t;
12
+ }, f = (t, e) => k(t, F(e));
13
+ var p = (t, e, i) => new Promise((a, o) => {
14
+ var n = (s) => {
15
15
  try {
16
16
  r(i.next(s));
17
17
  } catch (d) {
18
- n(d);
18
+ o(d);
19
19
  }
20
20
  }, l = (s) => {
21
21
  try {
22
22
  r(i.throw(s));
23
23
  } catch (d) {
24
- n(d);
24
+ o(d);
25
25
  }
26
- }, r = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(o, l);
27
- r((i = i.apply(e, t)).next());
26
+ }, r = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(n, l);
27
+ r((i = i.apply(t, e)).next());
28
28
  });
29
29
  import "tinymce/skins/lightgray/skin.min.css";
30
- import P from "tinymce";
31
- import S from "@tinymce/tinymce-vue";
30
+ import T from "tinymce";
31
+ import B from "@tinymce/tinymce-vue";
32
32
  import "tinymce/themes/modern/theme";
33
33
  import "tinymce/plugins/contextmenu";
34
34
  import "tinymce/plugins/wordcount";
@@ -37,9 +37,9 @@ import "tinymce/plugins/image";
37
37
  import "tinymce/plugins/fullscreen";
38
38
  import "tinymce/plugins/preview";
39
39
  import "tinymce/plugins/imagetools";
40
- import { getFilePrefix as D, guid as A } from "@web-utils/core";
41
- import { n as I } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
42
- const $ = {
40
+ import { getFilePrefix as P, guid as D } from "@web-utils/core";
41
+ import { n as b } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
42
+ const A = {
43
43
  Redo: "重做",
44
44
  Undo: "撤销",
45
45
  Cut: "剪切",
@@ -428,7 +428,7 @@ const $ = {
428
428
  Spellcheck: "拼写检查",
429
429
  Caption: "标题",
430
430
  "Insert template": "插入模板"
431
- }, R = '方正小标宋="方正小标宋";仿宋GB2312="仿宋GB2312";微软雅黑="微软雅黑";宋体="宋体";黑体="黑体";仿宋="仿宋";楷体="楷体";隶书="隶书";幼圆="幼圆";Arial="Arial";', E = `
431
+ }, S = '方正小标宋="方正小标宋";仿宋GB2312="仿宋GB2312";微软雅黑="微软雅黑";宋体="宋体";黑体="黑体";仿宋="仿宋";楷体="楷体";隶书="隶书";幼圆="幼圆";Arial="Arial";', R = `
432
432
  * {
433
433
  margin: 0;
434
434
  padding: 0
@@ -453,164 +453,130 @@ body {
453
453
  max-width: 100%;
454
454
  }
455
455
  `;
456
- function U(e) {
457
- let t;
458
- const i = e.naturalHeight, a = document.createElement("canvas");
456
+ function E(t) {
457
+ let e;
458
+ const i = t.naturalHeight, a = document.createElement("canvas");
459
459
  a.width = 1, a.height = i;
460
- const n = a.getContext("2d");
461
- n.drawImage(e, 0, 0);
460
+ const o = a.getContext("2d");
461
+ o.drawImage(t, 0, 0);
462
462
  try {
463
- t = n.getImageData(0, 0, 1, i).data;
463
+ e = o.getImageData(0, 0, 1, i).data;
464
464
  } catch (d) {
465
465
  return console.log("Cannot check verticalSquash: CORS?"), 1;
466
466
  }
467
- let o = 0, l = i, r = i;
468
- for (; r > o; )
469
- t[(r - 1) * 4 + 3] === 0 ? l = r : o = r, r = l + o >> 1;
467
+ let n = 0, l = i, r = i;
468
+ for (; r > n; )
469
+ e[(r - 1) * 4 + 3] === 0 ? l = r : n = r, r = l + n >> 1;
470
470
  const s = r / i;
471
471
  return s === 0 ? 1 : s;
472
472
  }
473
- function k(e) {
474
- const t = atob(e.split(",")[1]), i = new ArrayBuffer(t.length), a = new Uint8Array(i);
475
- for (let n = 0; n < t.length; n++)
476
- a[n] = t.charCodeAt(n);
473
+ function v(t) {
474
+ const e = atob(t.split(",")[1]), i = new ArrayBuffer(e.length), a = new Uint8Array(i);
475
+ for (let o = 0; o < e.length; o++)
476
+ a[o] = e.charCodeAt(o);
477
477
  return i;
478
478
  }
479
- function L(e) {
480
- const t = e.split(",")[0].split(":")[1].split(";")[0], i = k(e);
481
- return new Blob([i], { type: t });
479
+ function $(t) {
480
+ const e = t.split(",")[0].split(":")[1].split(";")[0], i = v(t);
481
+ return new Blob([i], { type: e });
482
482
  }
483
- function x(e) {
484
- const t = new DataView(e);
485
- if (t.getUint16(0, !1) !== 65496)
483
+ function U(t) {
484
+ const e = new DataView(t);
485
+ if (e.getUint16(0, !1) !== 65496)
486
486
  return -2;
487
- const i = t.byteLength;
487
+ const i = e.byteLength;
488
488
  let a = 2;
489
489
  for (; a < i; ) {
490
- const n = t.getUint16(a, !1);
491
- if (a += 2, n === 65505) {
492
- if (t.getUint32(a += 2, !1) !== 1165519206)
490
+ const o = e.getUint16(a, !1);
491
+ if (a += 2, o === 65505) {
492
+ if (e.getUint32(a += 2, !1) !== 1165519206)
493
493
  return -1;
494
- const o = t.getUint16(a += 6, !1) === 18761;
495
- a += t.getUint32(a + 4, o);
496
- const l = t.getUint16(a, o);
494
+ const n = e.getUint16(a += 6, !1) === 18761;
495
+ a += e.getUint32(a + 4, n);
496
+ const l = e.getUint16(a, n);
497
497
  a += 2;
498
498
  for (let r = 0; r < l; r++)
499
- if (t.getUint16(a + r * 12, o) === 274)
500
- return t.getUint16(a + r * 12 + 8, o);
499
+ if (e.getUint16(a + r * 12, n) === 274)
500
+ return e.getUint16(a + r * 12 + 8, n);
501
501
  } else {
502
- if ((n & 65280) !== 65280)
502
+ if ((o & 65280) !== 65280)
503
503
  break;
504
- a += t.getUint16(a, !1);
504
+ a += e.getUint16(a, !1);
505
505
  }
506
506
  }
507
507
  return -1;
508
508
  }
509
- function H(e, t, i) {
510
- const a = e.width, n = e.height;
511
- switch (i > 4 && (e.width = n, e.height = a), i) {
509
+ function L(t, e, i) {
510
+ const a = t.width, o = t.height;
511
+ switch (i > 4 && (t.width = o, t.height = a), i) {
512
512
  case 2:
513
- t.translate(a, 0), t.scale(-1, 1);
513
+ e.translate(a, 0), e.scale(-1, 1);
514
514
  break;
515
515
  case 3:
516
- t.translate(a, n), t.rotate(Math.PI);
516
+ e.translate(a, o), e.rotate(Math.PI);
517
517
  break;
518
518
  case 4:
519
- t.translate(0, n), t.scale(1, -1);
519
+ e.translate(0, o), e.scale(1, -1);
520
520
  break;
521
521
  case 5:
522
- t.rotate(0.5 * Math.PI), t.scale(1, -1);
522
+ e.rotate(0.5 * Math.PI), e.scale(1, -1);
523
523
  break;
524
524
  case 6:
525
- t.rotate(0.5 * Math.PI), t.translate(0, -n);
525
+ e.rotate(0.5 * Math.PI), e.translate(0, -o);
526
526
  break;
527
527
  case 7:
528
- t.rotate(0.5 * Math.PI), t.translate(a, -n), t.scale(-1, 1);
528
+ e.rotate(0.5 * Math.PI), e.translate(a, -o), e.scale(-1, 1);
529
529
  break;
530
530
  case 8:
531
- t.rotate(-0.5 * Math.PI), t.translate(-a, 0);
531
+ e.rotate(-0.5 * Math.PI), e.translate(-a, 0);
532
532
  break;
533
533
  }
534
534
  }
535
- function M(e) {
536
- return e.split(",")[0].split(":")[1].split(";")[0];
535
+ function x(t) {
536
+ return t.split(",")[0].split(":")[1].split(";")[0];
537
537
  }
538
- function q(e) {
539
- return `.${M(e).replace("image/", "")}`;
538
+ function H(t) {
539
+ return `.${x(t).replace("image/", "")}`;
540
540
  }
541
- function O(e, t) {
541
+ function q(t, e) {
542
542
  return p(this, null, function* () {
543
543
  return new Promise((i, a) => {
544
- const n = new Image();
545
- n.onload = function() {
546
- const o = U(n), l = x(k(n.src)), r = document.createElement("canvas"), s = r.getContext("2d"), d = t.compress.width, g = t.compress.height;
547
- let c = n.width, u = n.height;
548
- c < u && u > g ? (c = parseInt(`${g * n.width / n.height}`), u = g) : c >= u && c > d && (u = parseInt(`${d * n.height / n.width}`), c = d), r.width = c, r.height = u, l > 0 && H(r, s, l), s.drawImage(n, 0, 0, c, u / o);
549
- const m = r.toDataURL("image/jpeg", t.compress.quality);
550
- /;base64,null/.test(m) || /;base64,$/.test(m) ? (t.onError(new Error(`Compress fail, dataURL is ${m}.`)), a(Error("图片压缩失败"))) : i(j(m, `${D(t.fileName)}.jpg`));
551
- }, n.src = e;
544
+ const o = new Image();
545
+ o.onload = function() {
546
+ const n = E(o), l = U(v(o.src)), r = document.createElement("canvas"), s = r.getContext("2d"), d = e.compress.width, g = e.compress.height;
547
+ let c = o.width, u = o.height;
548
+ c < u && u > g ? (c = parseInt(`${g * o.width / o.height}`), u = g) : c >= u && c > d && (u = parseInt(`${d * o.height / o.width}`), c = d), r.width = c, r.height = u, l > 0 && L(r, s, l), s.drawImage(o, 0, 0, c, u / n);
549
+ const m = r.toDataURL("image/jpeg", e.compress.quality);
550
+ /;base64,null/.test(m) || /;base64,$/.test(m) ? (e.onError(new Error(`Compress fail, dataURL is ${m}.`)), a(Error("图片压缩失败"))) : i(z(m, `${P(e.fileName)}.jpg`));
551
+ }, o.src = t;
552
552
  });
553
553
  });
554
554
  }
555
- function z(e, t) {
555
+ function M(t, e) {
556
556
  return p(this, null, function* () {
557
- const i = yield N(e);
558
- return O(i, h({ fileName: e.name }, t));
557
+ const i = yield O(t);
558
+ return q(i, h({ fileName: t.name }, e));
559
559
  });
560
560
  }
561
- function N(e) {
562
- return new Promise((t, i) => {
561
+ function O(t) {
562
+ return new Promise((e, i) => {
563
563
  const a = new FileReader();
564
- a.onload = function(n) {
565
- t(n.target.result);
566
- }, a.onerror = function(n) {
567
- i(n);
568
- }, a.readAsDataURL(e);
564
+ a.onload = function(o) {
565
+ e(o.target.result);
566
+ }, a.onerror = function(o) {
567
+ i(o);
568
+ }, a.readAsDataURL(t);
569
569
  });
570
570
  }
571
- function j(e = "", t) {
572
- const i = L(e);
573
- return i.name = t || `image${q(e)}`, i;
571
+ function z(t = "", e) {
572
+ const i = $(t);
573
+ return i.name = e || `image${H(t)}`, i;
574
574
  }
575
- var W = function() {
576
- var e = this, t = e.$createElement, i = e._self._c || t;
577
- return e.show ? i("div", {
578
- class: ["tinymce-editor", {
579
- "none-resize": !e.resize
580
- }]
581
- }, [i("Editor", {
582
- ref: "editor",
583
- attrs: {
584
- disabled: e.inputDisabled,
585
- "model-events": "change input undo redo SetContent",
586
- init: e.init
587
- },
588
- model: {
589
- value: e.val,
590
- callback: function(a) {
591
- e.val = a;
592
- },
593
- expression: "val"
594
- }
595
- }), i("ElUpload", {
596
- ref: "uploader",
597
- staticStyle: {
598
- display: "none"
599
- },
600
- attrs: {
601
- action: e.action,
602
- "http-request": e.uploadImageFile,
603
- "show-file-list": !1,
604
- "auto-upload": "",
605
- accept: ".jpg,.jpeg,.png,.gif,.bmp"
606
- }
607
- }, [i("span")])], 1) : e._e();
608
- }, G = [];
609
- P.addI18n("zh_CN", $);
610
- const V = {
575
+ T.addI18n("zh_CN", A);
576
+ const N = {
611
577
  name: "TinymceWrapper",
612
578
  components: {
613
- Editor: S
579
+ Editor: B
614
580
  },
615
581
  inject: {
616
582
  elForm: {
@@ -655,29 +621,29 @@ const V = {
655
621
  queryParams: Object
656
622
  },
657
623
  data() {
658
- const t = ["fullscreen", "image", "wordcount", "paste"].join(","), i = this.buttons || [];
624
+ const e = ["fullscreen", "image", "wordcount", "paste"].join(","), i = this.buttons || [];
659
625
  let a = this.toolbar || " | ";
660
- return a = `undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | fontselect fontsizeselect | removeformat | | ${a}`, i && (a += ` ${i.map((o) => o.name).join(" ")}`), a += " | fullscreen", {
626
+ return a = `undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | fontselect fontsizeselect | removeformat | | ${a}`, i && (a += ` ${i.map((n) => n.name).join(" ")}`), a += " | fullscreen", {
661
627
  val: "",
662
628
  show: !0,
663
629
  init: {
664
- setup: (o) => {
665
- o.settings.dialog_title = this.dialogTitle, o.settings.show_types = this.showTypes, o.on("paste", (r) => {
630
+ setup: (n) => {
631
+ n.settings.dialog_title = this.dialogTitle, n.settings.show_types = this.showTypes, n.on("paste", (r) => {
666
632
  const s = r.clipboardData || r.dataTransfer;
667
633
  return !(this.processItems(r, s.items) || this.processItems(r, s.files));
668
- }), o.on("PreInit", (r) => {
634
+ }), n.on("PreInit", (r) => {
669
635
  r.target.dom.doc.body.style.fontFamily = "微软雅黑";
670
- }), o.on("Blur", (r) => {
636
+ }), n.on("Blur", (r) => {
671
637
  this.$emit("on-blur", r);
672
- }), o.on("DialogShow", (r) => {
638
+ }), n.on("DialogShow", (r) => {
673
639
  this.$emit("dialog-show", r);
674
- }), o.on("DialogHide", (r) => {
640
+ }), n.on("DialogHide", (r) => {
675
641
  this.$emit("dialog-hide", r);
676
642
  }), i.forEach((r) => {
677
643
  r.icon = ` ${r.icon}`;
678
644
  const { onclick: s } = r;
679
- o.addButton(r.name, f(h({}, r), {
680
- onclick: () => s(o)
645
+ n.addButton(r.name, f(h({}, r), {
646
+ onclick: () => s(n)
681
647
  }));
682
648
  });
683
649
  const l = {
@@ -686,13 +652,13 @@ const V = {
686
652
  title: "上传图片",
687
653
  onclick: this.upload
688
654
  };
689
- o.addButton(l.name, f(h({}, l), {
690
- onclick: () => l.onclick(o)
655
+ n.addButton(l.name, f(h({}, l), {
656
+ onclick: () => l.onclick(n)
691
657
  }));
692
658
  },
693
659
  toolbar: a,
694
660
  placeholder: "在这里输入文字",
695
- content_style: E,
661
+ content_style: R,
696
662
  fontname: "宋体",
697
663
  fontFamily: "宋体",
698
664
  branding: !1,
@@ -702,8 +668,8 @@ const V = {
702
668
  menubar: !1,
703
669
  height: "100%",
704
670
  elementpath: !1,
705
- plugins: `${t},${this.plugins}`,
706
- font_formats: R,
671
+ plugins: `${e},${this.plugins}`,
672
+ font_formats: S,
707
673
  fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt"
708
674
  }
709
675
  };
@@ -716,26 +682,26 @@ const V = {
716
682
  return this.prop ? this.prop : this.elFormItem ? this.elFormItem.prop : "";
717
683
  },
718
684
  action() {
719
- var e;
720
- return (e = this.getUploadUrl) == null ? void 0 : e.call(this);
685
+ var t;
686
+ return (t = this.getUploadUrl) == null ? void 0 : t.call(this);
721
687
  },
722
688
  headers() {
723
- var e;
724
- return (e = this.getHeader) == null ? void 0 : e.call(this);
689
+ var t;
690
+ return (t = this.getHeader) == null ? void 0 : t.call(this);
725
691
  }
726
692
  },
727
693
  watch: {
728
694
  value: {
729
695
  immediate: !0,
730
- handler(e) {
731
- this.val = e;
696
+ handler(t) {
697
+ this.val = t;
732
698
  }
733
699
  },
734
- dialogTitle(e) {
735
- this.getEditor() && (this.getEditor().settings.dialog_title = e);
700
+ dialogTitle(t) {
701
+ this.getEditor() && (this.getEditor().settings.dialog_title = t);
736
702
  },
737
- val(e) {
738
- this.elForm && this.elFormItem && this.elForm.clearValidate([this.elFormItem.prop]), this.$emit("input", e);
703
+ val(t) {
704
+ this.elForm && this.elFormItem && this.elForm.clearValidate([this.elFormItem.prop]), this.$emit("input", t);
739
705
  }
740
706
  },
741
707
  deactivated() {
@@ -745,12 +711,12 @@ const V = {
745
711
  this.show = !0;
746
712
  },
747
713
  methods: {
748
- uploadImageFile(n) {
749
- return p(this, arguments, function* ({ file: e, onError: t, onProgress: i, onSuccess: a }) {
750
- var o, l;
714
+ uploadImageFile(o) {
715
+ return p(this, arguments, function* ({ file: t, onError: e, onProgress: i, onSuccess: a }) {
716
+ var n, l;
751
717
  try {
752
718
  this.loading = this.$loading({ text: "压缩中...", background: "rgba(0,0,0,0.2)" });
753
- const r = yield z(e, {
719
+ const r = yield M(t, {
754
720
  compress: {
755
721
  width: 1920,
756
722
  height: 1600,
@@ -758,26 +724,26 @@ const V = {
758
724
  }
759
725
  });
760
726
  this.loading.text = "上传中...";
761
- const s = yield this.api((o = this.getUploadUrl) == null ? void 0 : o.call(this), r, {
762
- data: { unid: A(), type: this.fileLabel },
727
+ const s = yield this.api((n = this.getUploadUrl) == null ? void 0 : n.call(this), r, {
728
+ data: { unid: D(), type: this.fileLabel },
763
729
  onprogress(d) {
764
730
  i == null || i(d);
765
731
  }
766
732
  });
767
- this.insertImage(s.data.filePath), a == null || a(s, e), this.$refs.uploader.clearFiles();
733
+ this.insertImage(s.data.filePath), a == null || a(s, t), this.$refs.uploader.clearFiles();
768
734
  } catch (r) {
769
- t == null || t(r);
735
+ e == null || e(r);
770
736
  }
771
737
  (l = this.loading) == null || l.close();
772
738
  });
773
739
  },
774
- processItems(e, t) {
740
+ processItems(t, e) {
775
741
  let i = !1;
776
- for (let a = 0; a < t.length; a++) {
777
- const n = t[a];
778
- if (/^image\/(jpeg|png|gif|bmp)$/.test(n.type)) {
779
- const o = n.getAsFile ? n.getAsFile() : n;
780
- this.uploadImageFile({ file: o }), e.preventDefault(), i = !0;
742
+ for (let a = 0; a < e.length; a++) {
743
+ const o = e[a];
744
+ if (/^image\/(jpeg|png|gif|bmp)$/.test(o.type)) {
745
+ const n = o.getAsFile ? o.getAsFile() : o;
746
+ this.uploadImageFile({ file: n }), t.preventDefault(), i = !0;
781
747
  }
782
748
  }
783
749
  return i;
@@ -791,115 +757,33 @@ const V = {
791
757
  upload() {
792
758
  this.$refs.uploader.$refs["upload-inner"].handleClick();
793
759
  },
794
- insertImage(e) {
795
- this.getEditor().insertContent(`<img alt="图片" src="${this.replaceImageUrl(e)}"/>`);
760
+ insertImage(t) {
761
+ this.getEditor().insertContent(`<img alt="图片" src="${this.replaceImageUrl(t)}"/>`);
796
762
  },
797
- replaceImageUrl(e) {
798
- return e.replace("/var/local/data/merge", "");
763
+ replaceImageUrl(t) {
764
+ return t.replace("/var/local/data/merge", "");
799
765
  }
800
766
  }
801
- }, b = {};
802
- var Y = /* @__PURE__ */ I(
803
- V,
767
+ };
768
+ var W = function() {
769
+ var e = this, i = e._self._c;
770
+ return e.show ? i("div", { class: ["tinymce-editor", { "none-resize": !e.resize }] }, [i("Editor", { ref: "editor", attrs: { disabled: e.inputDisabled, "model-events": "change input undo redo SetContent", init: e.init }, model: { value: e.val, callback: function(a) {
771
+ e.val = a;
772
+ }, expression: "val" } }), i("ElUpload", { ref: "uploader", staticStyle: { display: "none" }, attrs: { action: e.action, "http-request": e.uploadImageFile, "show-file-list": !1, "auto-upload": "", accept: ".jpg,.jpeg,.png,.gif,.bmp" } }, [i("span")])], 1) : e._e();
773
+ }, j = [], G = /* @__PURE__ */ b(
774
+ N,
804
775
  W,
805
- G,
776
+ j,
806
777
  !1,
807
- X,
778
+ null,
808
779
  null,
809
780
  null,
810
781
  null
811
782
  );
812
- function X(e) {
813
- for (let t in b)
814
- this[t] = b[t];
815
- }
816
- const Z = /* @__PURE__ */ function() {
817
- return Y.exports;
818
- }();
819
- var J = function() {
820
- var e = this, t = e.$createElement, i = e._self._c || t;
821
- return i("div", {
822
- staticStyle: {
823
- "margin-bottom": "10px"
824
- },
825
- style: {
826
- height: e.height
827
- }
828
- }, [e.lazy ? [e.focus && !e.inputDisabled ? i("TinymceWrapper", e._b({
829
- ref: "editor",
830
- attrs: {
831
- "query-params": e.queryParams,
832
- disabled: e.inputDisabled,
833
- "show-types": e.showTypes,
834
- value: e.value
835
- },
836
- on: {
837
- "on-blur": e.onEditorBlur,
838
- "dialog-show": function(a) {
839
- e.hideOnBlur = !1;
840
- },
841
- "dialog-hide": function(a) {
842
- e.hideOnBlur = !0;
843
- },
844
- input: function(a) {
845
- return e.$emit("input", a);
846
- }
847
- }
848
- }, "TinymceWrapper", e.$attrs, !1)) : i("div", {
849
- staticClass: "editor-shadow",
850
- class: [{
851
- "show-placeholder": e.isEmpty
852
- }],
853
- style: {
854
- cursor: e.inputDisabled ? "not-allowed" : "text"
855
- },
856
- attrs: {
857
- placeholder: e.inputDisabled ? "" : e.placeholder
858
- },
859
- domProps: {
860
- innerHTML: e._s(e.value)
861
- },
862
- on: {
863
- click: e.onEditorShadowClick
864
- }
865
- })] : [e.inputDisabled ? i("div", {
866
- staticClass: "editor-shadow",
867
- class: [{
868
- "show-placeholder": e.isEmpty
869
- }],
870
- style: {
871
- cursor: e.inputDisabled ? "not-allowed" : "text"
872
- },
873
- attrs: {
874
- placeholder: e.inputDisabled ? "" : e.placeholder
875
- },
876
- domProps: {
877
- innerHTML: e._s(e.value)
878
- }
879
- }) : i("TinymceWrapper", e._b({
880
- ref: "editor",
881
- attrs: {
882
- "query-params": e.queryParams,
883
- disabled: e.inputDisabled,
884
- value: e.value
885
- },
886
- on: {
887
- "on-blur": e.onEditorBlur,
888
- "dialog-show": function(a) {
889
- e.hideOnBlur = !1;
890
- },
891
- "dialog-hide": function(a) {
892
- e.hideOnBlur = !0;
893
- },
894
- input: function(a) {
895
- return e.$emit("input", a);
896
- }
897
- }
898
- }, "TinymceWrapper", e.$attrs, !1))]], 2);
899
- }, K = [];
900
- const Q = {
783
+ const V = G.exports;
784
+ const Y = {
901
785
  name: "TinymceEditor",
902
- components: { TinymceWrapper: Z },
786
+ components: { TinymceWrapper: V },
903
787
  inject: {
904
788
  elForm: {
905
789
  default: ""
@@ -944,8 +828,8 @@ const Q = {
944
828
  }
945
829
  },
946
830
  watch: {
947
- hideOnBlur(e) {
948
- e && this.onEditorShadowClick();
831
+ hideOnBlur(t) {
832
+ t && this.onEditorShadowClick();
949
833
  }
950
834
  },
951
835
  methods: {
@@ -960,34 +844,39 @@ const Q = {
960
844
  if (this.inputDisabled)
961
845
  return;
962
846
  this.focus = !0, yield this.$nextTick();
963
- const e = this.getEditor();
964
- e.focus();
965
- const t = e.getBody();
966
- e.selection.setCursorLocation(t, t.childNodes.length);
847
+ const t = this.getEditor();
848
+ t.focus();
849
+ const e = t.getBody();
850
+ t.selection.setCursorLocation(e, e.childNodes.length);
967
851
  });
968
852
  },
969
- insertContent(e) {
970
- this.getEditor().insertContent(e);
853
+ insertContent(t) {
854
+ this.getEditor().insertContent(t);
971
855
  }
972
856
  }
973
- }, v = {};
974
- var ee = /* @__PURE__ */ I(
975
- Q,
976
- J,
977
- K,
857
+ };
858
+ var X = function() {
859
+ var e = this, i = e._self._c;
860
+ return i("div", { staticStyle: { "margin-bottom": "10px" }, style: { height: e.height } }, [e.lazy ? [e.focus && !e.inputDisabled ? i("TinymceWrapper", e._b({ ref: "editor", attrs: { "query-params": e.queryParams, disabled: e.inputDisabled, "show-types": e.showTypes, value: e.value }, on: { "on-blur": e.onEditorBlur, "dialog-show": function(a) {
861
+ e.hideOnBlur = !1;
862
+ }, "dialog-hide": function(a) {
863
+ e.hideOnBlur = !0;
864
+ }, input: (a) => e.$emit("input", a) } }, "TinymceWrapper", e.$attrs, !1)) : i("div", { staticClass: "editor-shadow", class: [{ "show-placeholder": e.isEmpty }], style: { cursor: e.inputDisabled ? "not-allowed" : "text" }, attrs: { placeholder: e.inputDisabled ? "" : e.placeholder }, domProps: { innerHTML: e._s(e.value) }, on: { click: e.onEditorShadowClick } })] : [e.inputDisabled ? i("div", { staticClass: "editor-shadow", class: [{ "show-placeholder": e.isEmpty }], style: { cursor: e.inputDisabled ? "not-allowed" : "text" }, attrs: { placeholder: e.inputDisabled ? "" : e.placeholder }, domProps: { innerHTML: e._s(e.value) } }) : i("TinymceWrapper", e._b({ ref: "editor", attrs: { "query-params": e.queryParams, disabled: e.inputDisabled, value: e.value }, on: { "on-blur": e.onEditorBlur, "dialog-show": function(a) {
865
+ e.hideOnBlur = !1;
866
+ }, "dialog-hide": function(a) {
867
+ e.hideOnBlur = !0;
868
+ }, input: (a) => e.$emit("input", a) } }, "TinymceWrapper", e.$attrs, !1))]], 2);
869
+ }, Z = [], J = /* @__PURE__ */ b(
870
+ Y,
871
+ X,
872
+ Z,
978
873
  !1,
979
- te,
874
+ null,
980
875
  null,
981
876
  null,
982
877
  null
983
878
  );
984
- function te(e) {
985
- for (let t in v)
986
- this[t] = v[t];
987
- }
988
- const fe = /* @__PURE__ */ function() {
989
- return ee.exports;
990
- }();
879
+ const pe = J.exports;
991
880
  export {
992
- fe as default
881
+ pe as default
993
882
  };