@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.
- package/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.css +1 -0
- package/index.mjs +3973 -501
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/tinymce-editor/index.mjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var I = Object.defineProperty, k = Object.defineProperties;
|
|
2
|
+
var F = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var y = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var w = (
|
|
6
|
-
for (var i in
|
|
7
|
-
|
|
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(
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, f = (
|
|
13
|
-
var p = (
|
|
14
|
-
var
|
|
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
|
-
|
|
18
|
+
o(d);
|
|
19
19
|
}
|
|
20
20
|
}, l = (s) => {
|
|
21
21
|
try {
|
|
22
22
|
r(i.throw(s));
|
|
23
23
|
} catch (d) {
|
|
24
|
-
|
|
24
|
+
o(d);
|
|
25
25
|
}
|
|
26
|
-
}, r = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(
|
|
27
|
-
r((i = i.apply(
|
|
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
|
|
31
|
-
import
|
|
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
|
|
41
|
-
import { n as
|
|
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
|
-
},
|
|
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
|
|
457
|
-
let
|
|
458
|
-
const i =
|
|
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
|
|
461
|
-
|
|
460
|
+
const o = a.getContext("2d");
|
|
461
|
+
o.drawImage(t, 0, 0);
|
|
462
462
|
try {
|
|
463
|
-
|
|
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
|
|
468
|
-
for (; r >
|
|
469
|
-
|
|
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
|
|
474
|
-
const
|
|
475
|
-
for (let
|
|
476
|
-
a[
|
|
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
|
|
480
|
-
const
|
|
481
|
-
return new Blob([i], { type:
|
|
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
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
483
|
+
function U(t) {
|
|
484
|
+
const e = new DataView(t);
|
|
485
|
+
if (e.getUint16(0, !1) !== 65496)
|
|
486
486
|
return -2;
|
|
487
|
-
const i =
|
|
487
|
+
const i = e.byteLength;
|
|
488
488
|
let a = 2;
|
|
489
489
|
for (; a < i; ) {
|
|
490
|
-
const
|
|
491
|
-
if (a += 2,
|
|
492
|
-
if (
|
|
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
|
|
495
|
-
a +=
|
|
496
|
-
const l =
|
|
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 (
|
|
500
|
-
return
|
|
499
|
+
if (e.getUint16(a + r * 12, n) === 274)
|
|
500
|
+
return e.getUint16(a + r * 12 + 8, n);
|
|
501
501
|
} else {
|
|
502
|
-
if ((
|
|
502
|
+
if ((o & 65280) !== 65280)
|
|
503
503
|
break;
|
|
504
|
-
a +=
|
|
504
|
+
a += e.getUint16(a, !1);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
return -1;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
const a =
|
|
511
|
-
switch (i > 4 && (
|
|
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
|
-
|
|
513
|
+
e.translate(a, 0), e.scale(-1, 1);
|
|
514
514
|
break;
|
|
515
515
|
case 3:
|
|
516
|
-
|
|
516
|
+
e.translate(a, o), e.rotate(Math.PI);
|
|
517
517
|
break;
|
|
518
518
|
case 4:
|
|
519
|
-
|
|
519
|
+
e.translate(0, o), e.scale(1, -1);
|
|
520
520
|
break;
|
|
521
521
|
case 5:
|
|
522
|
-
|
|
522
|
+
e.rotate(0.5 * Math.PI), e.scale(1, -1);
|
|
523
523
|
break;
|
|
524
524
|
case 6:
|
|
525
|
-
|
|
525
|
+
e.rotate(0.5 * Math.PI), e.translate(0, -o);
|
|
526
526
|
break;
|
|
527
527
|
case 7:
|
|
528
|
-
|
|
528
|
+
e.rotate(0.5 * Math.PI), e.translate(a, -o), e.scale(-1, 1);
|
|
529
529
|
break;
|
|
530
530
|
case 8:
|
|
531
|
-
|
|
531
|
+
e.rotate(-0.5 * Math.PI), e.translate(-a, 0);
|
|
532
532
|
break;
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
return
|
|
535
|
+
function x(t) {
|
|
536
|
+
return t.split(",")[0].split(":")[1].split(";")[0];
|
|
537
537
|
}
|
|
538
|
-
function
|
|
539
|
-
return `.${
|
|
538
|
+
function H(t) {
|
|
539
|
+
return `.${x(t).replace("image/", "")}`;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function q(t, e) {
|
|
542
542
|
return p(this, null, function* () {
|
|
543
543
|
return new Promise((i, a) => {
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
let c =
|
|
548
|
-
c < u && u > g ? (c = parseInt(`${g *
|
|
549
|
-
const m = r.toDataURL("image/jpeg",
|
|
550
|
-
/;base64,null/.test(m) || /;base64,$/.test(m) ? (
|
|
551
|
-
},
|
|
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
|
|
555
|
+
function M(t, e) {
|
|
556
556
|
return p(this, null, function* () {
|
|
557
|
-
const i = yield
|
|
558
|
-
return
|
|
557
|
+
const i = yield O(t);
|
|
558
|
+
return q(i, h({ fileName: t.name }, e));
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
return new Promise((
|
|
561
|
+
function O(t) {
|
|
562
|
+
return new Promise((e, i) => {
|
|
563
563
|
const a = new FileReader();
|
|
564
|
-
a.onload = function(
|
|
565
|
-
|
|
566
|
-
}, a.onerror = function(
|
|
567
|
-
i(
|
|
568
|
-
}, a.readAsDataURL(
|
|
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
|
|
572
|
-
const i =
|
|
573
|
-
return i.name =
|
|
571
|
+
function z(t = "", e) {
|
|
572
|
+
const i = $(t);
|
|
573
|
+
return i.name = e || `image${H(t)}`, i;
|
|
574
574
|
}
|
|
575
|
-
|
|
576
|
-
|
|
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:
|
|
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
|
|
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((
|
|
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: (
|
|
665
|
-
|
|
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
|
-
}),
|
|
634
|
+
}), n.on("PreInit", (r) => {
|
|
669
635
|
r.target.dom.doc.body.style.fontFamily = "微软雅黑";
|
|
670
|
-
}),
|
|
636
|
+
}), n.on("Blur", (r) => {
|
|
671
637
|
this.$emit("on-blur", r);
|
|
672
|
-
}),
|
|
638
|
+
}), n.on("DialogShow", (r) => {
|
|
673
639
|
this.$emit("dialog-show", r);
|
|
674
|
-
}),
|
|
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
|
-
|
|
680
|
-
onclick: () => s(
|
|
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
|
-
|
|
690
|
-
onclick: () => l.onclick(
|
|
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:
|
|
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: `${
|
|
706
|
-
font_formats:
|
|
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
|
|
720
|
-
return (
|
|
685
|
+
var t;
|
|
686
|
+
return (t = this.getUploadUrl) == null ? void 0 : t.call(this);
|
|
721
687
|
},
|
|
722
688
|
headers() {
|
|
723
|
-
var
|
|
724
|
-
return (
|
|
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(
|
|
731
|
-
this.val =
|
|
696
|
+
handler(t) {
|
|
697
|
+
this.val = t;
|
|
732
698
|
}
|
|
733
699
|
},
|
|
734
|
-
dialogTitle(
|
|
735
|
-
this.getEditor() && (this.getEditor().settings.dialog_title =
|
|
700
|
+
dialogTitle(t) {
|
|
701
|
+
this.getEditor() && (this.getEditor().settings.dialog_title = t);
|
|
736
702
|
},
|
|
737
|
-
val(
|
|
738
|
-
this.elForm && this.elFormItem && this.elForm.clearValidate([this.elFormItem.prop]), this.$emit("input",
|
|
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(
|
|
749
|
-
return p(this, arguments, function* ({ file:
|
|
750
|
-
var
|
|
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
|
|
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((
|
|
762
|
-
data: { unid:
|
|
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,
|
|
733
|
+
this.insertImage(s.data.filePath), a == null || a(s, t), this.$refs.uploader.clearFiles();
|
|
768
734
|
} catch (r) {
|
|
769
|
-
|
|
735
|
+
e == null || e(r);
|
|
770
736
|
}
|
|
771
737
|
(l = this.loading) == null || l.close();
|
|
772
738
|
});
|
|
773
739
|
},
|
|
774
|
-
processItems(
|
|
740
|
+
processItems(t, e) {
|
|
775
741
|
let i = !1;
|
|
776
|
-
for (let a = 0; a <
|
|
777
|
-
const
|
|
778
|
-
if (/^image\/(jpeg|png|gif|bmp)$/.test(
|
|
779
|
-
const
|
|
780
|
-
this.uploadImageFile({ file:
|
|
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(
|
|
795
|
-
this.getEditor().insertContent(`<img alt="图片" src="${this.replaceImageUrl(
|
|
760
|
+
insertImage(t) {
|
|
761
|
+
this.getEditor().insertContent(`<img alt="图片" src="${this.replaceImageUrl(t)}"/>`);
|
|
796
762
|
},
|
|
797
|
-
replaceImageUrl(
|
|
798
|
-
return
|
|
763
|
+
replaceImageUrl(t) {
|
|
764
|
+
return t.replace("/var/local/data/merge", "");
|
|
799
765
|
}
|
|
800
766
|
}
|
|
801
|
-
}
|
|
802
|
-
var
|
|
803
|
-
|
|
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
|
-
|
|
776
|
+
j,
|
|
806
777
|
!1,
|
|
807
|
-
|
|
778
|
+
null,
|
|
808
779
|
null,
|
|
809
780
|
null,
|
|
810
781
|
null
|
|
811
782
|
);
|
|
812
|
-
|
|
813
|
-
|
|
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:
|
|
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(
|
|
948
|
-
|
|
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
|
|
964
|
-
|
|
965
|
-
const
|
|
966
|
-
|
|
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(
|
|
970
|
-
this.getEditor().insertContent(
|
|
853
|
+
insertContent(t) {
|
|
854
|
+
this.getEditor().insertContent(t);
|
|
971
855
|
}
|
|
972
856
|
}
|
|
973
|
-
}
|
|
974
|
-
var
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
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
|
-
|
|
874
|
+
null,
|
|
980
875
|
null,
|
|
981
876
|
null,
|
|
982
877
|
null
|
|
983
878
|
);
|
|
984
|
-
|
|
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
|
-
|
|
881
|
+
pe as default
|
|
993
882
|
};
|