@haluo/biz 2.0.44 → 2.0.45
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/dist/haluo-biz.js +789 -688
- package/dist/haluo-biz.umd.cjs +812 -700
- package/dist/{squire-raw.3e73a64b.js → squire-raw-1aaeff0b.js} +18 -4
- package/dist/style.css +40 -52
- package/package.json +1 -1
package/dist/haluo-biz.umd.cjs
CHANGED
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("element-plus"), require("vue"), require("@element-plus/icons-vue"), require("@haluo/util"), require("vuedraggable")) : typeof define === "function" && define.amd ? define(["exports", "element-plus", "vue", "@element-plus/icons-vue", "@haluo/util", "vuedraggable"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["haluo-biz"] = {}, global2["element-plus"], global2.Vue, global2["@element-plus/icons-vue"], global2.hUtil, global2.vuedraggable));
|
|
3
3
|
})(this, function(exports2, elementPlus, vue, iconsVue, util, draggable) {
|
|
4
4
|
"use strict";
|
|
5
|
-
const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
6
|
-
const util__default = /* @__PURE__ */ _interopDefaultLegacy(util);
|
|
7
|
-
const draggable__default = /* @__PURE__ */ _interopDefaultLegacy(draggable);
|
|
8
5
|
const __vite_glob_0_1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLBAMAAADKYGfZAAAAG1BMVEUAAAAAAABHcExSUlLz8/P////IyMifn5/k5OQx49C2AAAACXRSTlMzZgB/7//CpN1ci7LLAAABHUlEQVR4AY3TgUbAUBjF8e0NmiiAY28QIYCkXqB9GUBIT7AHCHvvss3l73Y4g3vx87ft3m8Yp+C5GZSxecyYMuZzZMqYz5EpYz5Hpoz5HJkS1uceP67N7TeYyF7r59xs9XmxlgNbj/W+6hmMua86c9vfCsbcXdV6xpYHsj53xF4msj7XYmB97oqB9bmlxcC6XIuBdbkWI2Nur3qfyFouqc0K3g05/6XI+f+GnD8F5NyZMmdvCHP2vjFX7vYyt7tZYO7p7f/JYs7NKXMZk2fMZUyeMZcxecZcxuQZcxmTZ8xlTJ4xlzF5xlzG5BlzGZNnzGVMnjGXMXnGXMbkGXMZk2fMZUyeMZcxecZcxuQZcxmTZ8xlTJ4xlzFlbB5+AVncQI3j46OFAAAAAElFTkSuQmCC";
|
|
9
6
|
const __vite_glob_0_2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkU2MThGQUEzOUM3QTExRThBMkI0RDI5RUQ4MzE1NUMwIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkU2MThGQUE0OUM3QTExRThBMkI0RDI5RUQ4MzE1NUMwIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RTYxOEZBQTE5QzdBMTFFOEEyQjREMjlFRDgzMTU1QzAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RTYxOEZBQTI5QzdBMTFFOEEyQjREMjlFRDgzMTU1QzAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6cZvOcAAABiklEQVR42uyXu0rEQBRAs3GxtlHEIqDFioWIkA+wUBCsFKwUGxdRrHSx8Ed8gIWlIKyICKIigu0uYmFjIbIfIFqJyhrPwC3CEIvNZEKEGThMHpAcJvcxKUVR5BV5+F7BhxN0gk7QCTpBSyMMw37oLqQgYgNMt1A3lfQtyd3AMMyYSvoW5dTcMpX0LcrNw5SpZCntdouXxU974U6Te5V7FbiCAM5hrtFofOW9gj3wJnILsAhdcu8JLuR4GiY6eXDZUKxPVu8RNuAZdmFWVnMd9mEF2lBl9S7zElQxdy2fchOacCRy6tpBgtxhLkkSS4gR+IQXTW4SVk3lUgkmZKuKuT1N7htGZU4t13EW/yG3o8n9wAOMq8xF7tQkyMuGde4dPrTPOgbLcC94uQgytkVOFd61WJ1bgkHYisXckGR2rruZmhTaQApvRa63NbkqnGXVoTqNQdWq6tK6WtLKallka2atLkEysCWXuhdrktbkTDcLSvIYTmzJGQm6nyYn6ASdoBN0gv9D8FeAAQD7bZlccR+RLgAAAABJRU5ErkJggg==";
|
|
10
7
|
const __vite_glob_0_3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAA8CAYAAAAOhRhuAAAAAXNSR0IArs4c6QAAALZJREFUaEPtlLENwCAMBGEilmAOhmNMmkTp0h1BLqzoIlGdYqzzm7rWukqir9oQTENDFFcNaYgMEDdDGiIDxM2QhsgAcTMUYmjOSXWOeGutPOf9bY2s9350If00xijP+dwQFY7kW4YiL6RaNqQhMkB8K0Pp1j7dw0iaI/nWyCIvpFo29E9D6bYs3TtEc4/kbhnZ1NA/DaVb+3QPI809krtlZFNDGiIDxM2QhsgAcTOkITJAPF2GbhF2A9gQfAOGAAAAAElFTkSuQmCC";
|
|
@@ -113,7 +110,6 @@
|
|
|
113
110
|
}
|
|
114
111
|
const D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, R = "__vueuse_ssr_handlers__";
|
|
115
112
|
D[R] = D[R] || {};
|
|
116
|
-
D[R];
|
|
117
113
|
var q;
|
|
118
114
|
(function(e) {
|
|
119
115
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
@@ -155,7 +151,7 @@
|
|
|
155
151
|
ke({
|
|
156
152
|
linear: me
|
|
157
153
|
}, he);
|
|
158
|
-
const J = (e) => (vue.pushScopeId("data-v-b46fc003"), e = e(), vue.popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "
|
|
154
|
+
const J = (e) => (vue.pushScopeId("data-v-b46fc003"), e = e(), vue.popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "主题颜色", -1)), Ee = { class: "tColor" }, Pe = ["onMouseover", "onClick"], Me = { class: "bColor" }, Ae = ["onMouseover", "onClick"], $e = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "标准颜色", -1)), Te = { class: "tColor" }, Be = ["onMouseover", "onClick"], Ve = {
|
|
159
155
|
name: "colorPicker"
|
|
160
156
|
}, Ne = /* @__PURE__ */ vue.defineComponent({
|
|
161
157
|
...Ve,
|
|
@@ -220,13 +216,13 @@
|
|
|
220
216
|
l.stopPropagation();
|
|
221
217
|
})
|
|
222
218
|
}, [
|
|
223
|
-
vue.createCommentVNode("
|
|
219
|
+
vue.createCommentVNode(" 颜色显示小方块 "),
|
|
224
220
|
vue.createElementVNode("div", {
|
|
225
221
|
class: vue.normalizeClass(["colorBtn", { disabled: e.disabled }]),
|
|
226
222
|
style: vue.normalizeStyle(`background-color: ${vue.unref(a)}`),
|
|
227
223
|
onClick: p
|
|
228
224
|
}, null, 6),
|
|
229
|
-
vue.createCommentVNode("
|
|
225
|
+
vue.createCommentVNode(" 颜色色盘 "),
|
|
230
226
|
vue.createElementVNode("div", {
|
|
231
227
|
class: vue.normalizeClass(["box", { open: s.value }])
|
|
232
228
|
}, [
|
|
@@ -240,7 +236,7 @@
|
|
|
240
236
|
onClick: Y,
|
|
241
237
|
onMouseover: r[0] || (r[0] = (l) => d(e.defaultColor)),
|
|
242
238
|
onMouseout: r[1] || (r[1] = (l) => d(""))
|
|
243
|
-
}, "
|
|
239
|
+
}, "默认颜色", 32)
|
|
244
240
|
]),
|
|
245
241
|
vue.createElementVNode("div", Oe, [
|
|
246
242
|
Ie,
|
|
@@ -276,8 +272,8 @@
|
|
|
276
272
|
onClick: (f) => E(l)
|
|
277
273
|
}, null, 44, Be)), 64))
|
|
278
274
|
]),
|
|
279
|
-
vue.createElementVNode("h3", { onClick: X }, "
|
|
280
|
-
vue.createCommentVNode("
|
|
275
|
+
vue.createElementVNode("h3", { onClick: X }, "更多颜色..."),
|
|
276
|
+
vue.createCommentVNode(" 用以激活HTML5颜色面板 "),
|
|
281
277
|
vue.withDirectives(vue.createElementVNode("input", {
|
|
282
278
|
type: "color",
|
|
283
279
|
ref_key: "html5ColorEl",
|
|
@@ -311,7 +307,7 @@
|
|
|
311
307
|
colorPicker: O
|
|
312
308
|
};
|
|
313
309
|
const style = "";
|
|
314
|
-
const
|
|
310
|
+
const ToolBar_vue_vue_type_style_index_0_scoped_50235bb8_lang = "";
|
|
315
311
|
const ToolBar_vue_vue_type_style_index_1_lang = "";
|
|
316
312
|
const _export_sfc = (sfc, props) => {
|
|
317
313
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -341,15 +337,15 @@
|
|
|
341
337
|
activeImgType: false,
|
|
342
338
|
activeAlign: "",
|
|
343
339
|
alignMethods: [
|
|
344
|
-
{ value: "left", name: "
|
|
345
|
-
{ value: "right", name: "
|
|
346
|
-
{ value: "center", name: "
|
|
347
|
-
{ value: "justify", name: "
|
|
340
|
+
{ value: "left", name: "左对齐" },
|
|
341
|
+
{ value: "right", name: "右对齐" },
|
|
342
|
+
{ value: "center", name: "居中对齐" },
|
|
343
|
+
{ value: "justify", name: "两端对齐" }
|
|
348
344
|
],
|
|
349
345
|
activeFontsize: "17",
|
|
350
346
|
fontsizes: [
|
|
351
|
-
{ value: "17px", name: "17", desc: "
|
|
352
|
-
{ value: "18px", name: "18", desc: "
|
|
347
|
+
{ value: "17px", name: "17", desc: "默认正文字号" },
|
|
348
|
+
{ value: "18px", name: "18", desc: "默认标题字号" },
|
|
353
349
|
{ value: "19px", name: "19" },
|
|
354
350
|
{ value: "20px", name: "20" },
|
|
355
351
|
{ value: "24px", name: "24" },
|
|
@@ -430,7 +426,7 @@
|
|
|
430
426
|
this.editor.clearFormat();
|
|
431
427
|
},
|
|
432
428
|
setColor(val) {
|
|
433
|
-
console.log("
|
|
429
|
+
console.log("文字颜色");
|
|
434
430
|
this.updatePosition(() => {
|
|
435
431
|
this.editor.setColor(val);
|
|
436
432
|
});
|
|
@@ -489,6 +485,7 @@
|
|
|
489
485
|
this.popoverVisibleList = false;
|
|
490
486
|
this.popoverVisibleImg = false;
|
|
491
487
|
},
|
|
488
|
+
// todo 富文本设置样式位置会回到顶部
|
|
492
489
|
updatePosition(fn) {
|
|
493
490
|
const scrollTop = document.documentElement.scrollTop;
|
|
494
491
|
fn && fn();
|
|
@@ -525,11 +522,11 @@
|
|
|
525
522
|
key: 0,
|
|
526
523
|
class: "tools"
|
|
527
524
|
};
|
|
528
|
-
const _hoisted_2$
|
|
529
|
-
const _hoisted_3$
|
|
530
|
-
const _hoisted_4$
|
|
531
|
-
const _hoisted_5$
|
|
532
|
-
const _hoisted_6$
|
|
525
|
+
const _hoisted_2$5 = { class: "tools-content" };
|
|
526
|
+
const _hoisted_3$5 = ["src"];
|
|
527
|
+
const _hoisted_4$3 = ["src"];
|
|
528
|
+
const _hoisted_5$3 = ["src"];
|
|
529
|
+
const _hoisted_6$2 = { class: "box" };
|
|
533
530
|
const _hoisted_7$2 = ["src"];
|
|
534
531
|
const _hoisted_8$2 = {
|
|
535
532
|
key: 0,
|
|
@@ -539,10 +536,10 @@
|
|
|
539
536
|
const _hoisted_10$2 = ["src"];
|
|
540
537
|
const _hoisted_11$2 = { class: "tools-font" };
|
|
541
538
|
const _hoisted_12$2 = ["onClick"];
|
|
542
|
-
const _hoisted_13$
|
|
543
|
-
const _hoisted_14$
|
|
544
|
-
const _hoisted_15$
|
|
545
|
-
const _hoisted_16$
|
|
539
|
+
const _hoisted_13$1 = { style: { "font-size": "10px" } };
|
|
540
|
+
const _hoisted_14$1 = { class: "box" };
|
|
541
|
+
const _hoisted_15$1 = ["src"];
|
|
542
|
+
const _hoisted_16$1 = {
|
|
546
543
|
key: 0,
|
|
547
544
|
class: "box-mask"
|
|
548
545
|
};
|
|
@@ -568,12 +565,12 @@
|
|
|
568
565
|
key: 0,
|
|
569
566
|
class: "box-mask"
|
|
570
567
|
};
|
|
571
|
-
const _hoisted_30
|
|
572
|
-
const _hoisted_31
|
|
573
|
-
const _hoisted_32
|
|
574
|
-
const _hoisted_33
|
|
575
|
-
const _hoisted_34
|
|
576
|
-
const _hoisted_35
|
|
568
|
+
const _hoisted_30 = { class: "box" };
|
|
569
|
+
const _hoisted_31 = ["src"];
|
|
570
|
+
const _hoisted_32 = ["src"];
|
|
571
|
+
const _hoisted_33 = ["src"];
|
|
572
|
+
const _hoisted_34 = ["src"];
|
|
573
|
+
const _hoisted_35 = { class: "tools-title" };
|
|
577
574
|
const _hoisted_36 = ["src"];
|
|
578
575
|
const _hoisted_37 = ["src"];
|
|
579
576
|
const _hoisted_38 = { class: "tools-title_content" };
|
|
@@ -594,11 +591,11 @@
|
|
|
594
591
|
const _component_colorPicker = vue.resolveComponent("colorPicker");
|
|
595
592
|
const _directive_click_outside = vue.resolveDirective("click-outside");
|
|
596
593
|
return $props.editor.fontInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
597
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
594
|
+
vue.createElementVNode("div", _hoisted_2$5, [
|
|
598
595
|
vue.createVNode(_component_el_tooltip, {
|
|
599
596
|
class: "item",
|
|
600
597
|
effect: "dark",
|
|
601
|
-
content: "
|
|
598
|
+
content: "撤回",
|
|
602
599
|
placement: "top"
|
|
603
600
|
}, {
|
|
604
601
|
default: vue.withCtx(() => [
|
|
@@ -610,14 +607,14 @@
|
|
|
610
607
|
height: "40",
|
|
611
608
|
alt: "",
|
|
612
609
|
onClick: _cache[0] || (_cache[0] = ($event) => $options.back($event))
|
|
613
|
-
}, null, 12, _hoisted_3$
|
|
610
|
+
}, null, 12, _hoisted_3$5)
|
|
614
611
|
]),
|
|
615
612
|
_: 1
|
|
616
613
|
}),
|
|
617
614
|
vue.createVNode(_component_el_tooltip, {
|
|
618
615
|
class: "item",
|
|
619
616
|
effect: "dark",
|
|
620
|
-
content: "
|
|
617
|
+
content: "反撤回",
|
|
621
618
|
placement: "top"
|
|
622
619
|
}, {
|
|
623
620
|
default: vue.withCtx(() => [
|
|
@@ -629,7 +626,7 @@
|
|
|
629
626
|
height: "40",
|
|
630
627
|
alt: "",
|
|
631
628
|
onClick: _cache[1] || (_cache[1] = ($event) => $options.forward($event))
|
|
632
|
-
}, null, 12, _hoisted_4$
|
|
629
|
+
}, null, 12, _hoisted_4$3)
|
|
633
630
|
]),
|
|
634
631
|
_: 1
|
|
635
632
|
}),
|
|
@@ -640,7 +637,7 @@
|
|
|
640
637
|
vue.createVNode(_component_el_tooltip, {
|
|
641
638
|
class: "item",
|
|
642
639
|
effect: "dark",
|
|
643
|
-
content: "
|
|
640
|
+
content: "清除格式",
|
|
644
641
|
placement: "top"
|
|
645
642
|
}, {
|
|
646
643
|
default: vue.withCtx(() => [
|
|
@@ -650,18 +647,18 @@
|
|
|
650
647
|
height: "40",
|
|
651
648
|
alt: "",
|
|
652
649
|
onClick: _cache[2] || (_cache[2] = (...args) => $options.clearFormat && $options.clearFormat(...args))
|
|
653
|
-
}, null, 8, _hoisted_5$
|
|
650
|
+
}, null, 8, _hoisted_5$3)
|
|
654
651
|
]),
|
|
655
652
|
_: 1
|
|
656
653
|
}),
|
|
657
654
|
vue.createVNode(_component_el_tooltip, {
|
|
658
655
|
class: "item",
|
|
659
656
|
effect: "dark",
|
|
660
|
-
content: "
|
|
657
|
+
content: "格式刷",
|
|
661
658
|
placement: "top"
|
|
662
659
|
}, {
|
|
663
660
|
default: vue.withCtx(() => [
|
|
664
|
-
vue.createElementVNode("div", _hoisted_6$
|
|
661
|
+
vue.createElementVNode("div", _hoisted_6$2, [
|
|
665
662
|
vue.createElementVNode("img", {
|
|
666
663
|
src: $options.getImageUrl("tools_refresh@3x.png"),
|
|
667
664
|
width: "40",
|
|
@@ -688,7 +685,7 @@
|
|
|
688
685
|
vue.createVNode(_component_el_tooltip, {
|
|
689
686
|
class: "item",
|
|
690
687
|
effect: "dark",
|
|
691
|
-
content: "
|
|
688
|
+
content: "字号",
|
|
692
689
|
placement: "top"
|
|
693
690
|
}, {
|
|
694
691
|
default: vue.withCtx(() => [
|
|
@@ -722,7 +719,7 @@
|
|
|
722
719
|
vue.createElementVNode("span", {
|
|
723
720
|
style: vue.normalizeStyle({ fontSize: item.value })
|
|
724
721
|
}, vue.toDisplayString(item.name), 5),
|
|
725
|
-
vue.createElementVNode("span", _hoisted_13$
|
|
722
|
+
vue.createElementVNode("span", _hoisted_13$1, vue.toDisplayString(item.desc), 1)
|
|
726
723
|
], 10, _hoisted_12$2);
|
|
727
724
|
}), 128))
|
|
728
725
|
])), [
|
|
@@ -738,11 +735,11 @@
|
|
|
738
735
|
vue.createVNode(_component_el_tooltip, {
|
|
739
736
|
class: "item",
|
|
740
737
|
effect: "dark",
|
|
741
|
-
content: "
|
|
738
|
+
content: "标题",
|
|
742
739
|
placement: "top"
|
|
743
740
|
}, {
|
|
744
741
|
default: vue.withCtx(() => [
|
|
745
|
-
vue.createElementVNode("div", _hoisted_14$
|
|
742
|
+
vue.createElementVNode("div", _hoisted_14$1, [
|
|
746
743
|
vue.createElementVNode("img", {
|
|
747
744
|
src: $options.getImageUrl("tools_title@3x.png"),
|
|
748
745
|
"data-editor-id": "makeHeader",
|
|
@@ -750,8 +747,8 @@
|
|
|
750
747
|
height: "40",
|
|
751
748
|
alt: "",
|
|
752
749
|
onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
|
|
753
|
-
}, null, 8, _hoisted_15$
|
|
754
|
-
$data.statusInfo && $data.statusInfo.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$
|
|
750
|
+
}, null, 8, _hoisted_15$1),
|
|
751
|
+
$data.statusInfo && $data.statusInfo.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1)) : vue.createCommentVNode("", true)
|
|
755
752
|
])
|
|
756
753
|
]),
|
|
757
754
|
_: 1
|
|
@@ -759,7 +756,7 @@
|
|
|
759
756
|
vue.createVNode(_component_el_tooltip, {
|
|
760
757
|
class: "item",
|
|
761
758
|
effect: "dark",
|
|
762
|
-
content: "
|
|
759
|
+
content: "加粗",
|
|
763
760
|
placement: "top"
|
|
764
761
|
}, {
|
|
765
762
|
default: vue.withCtx(() => [
|
|
@@ -787,7 +784,7 @@
|
|
|
787
784
|
vue.createVNode(_component_el_tooltip, {
|
|
788
785
|
class: "item",
|
|
789
786
|
effect: "dark",
|
|
790
|
-
content: "
|
|
787
|
+
content: "列表",
|
|
791
788
|
placement: "top"
|
|
792
789
|
}, {
|
|
793
790
|
default: vue.withCtx(() => [
|
|
@@ -821,13 +818,13 @@
|
|
|
821
818
|
onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
|
|
822
819
|
$options.setStyle("makeUnorderedList");
|
|
823
820
|
}))
|
|
824
|
-
}, "
|
|
821
|
+
}, "无序列表"),
|
|
825
822
|
vue.createElementVNode("li", {
|
|
826
823
|
"data-editor-id": "makeHeader",
|
|
827
824
|
onClick: _cache[9] || (_cache[9] = ($event) => $options.updatePosition(() => {
|
|
828
825
|
$options.setStyle("makeOrderedList");
|
|
829
826
|
}))
|
|
830
|
-
}, "
|
|
827
|
+
}, "有序列表")
|
|
831
828
|
])), [
|
|
832
829
|
[_directive_click_outside, $options.handlePopover]
|
|
833
830
|
])
|
|
@@ -838,7 +835,7 @@
|
|
|
838
835
|
vue.createVNode(_component_el_tooltip, {
|
|
839
836
|
class: "item",
|
|
840
837
|
effect: "dark",
|
|
841
|
-
content: "
|
|
838
|
+
content: "倾斜",
|
|
842
839
|
placement: "top"
|
|
843
840
|
}, {
|
|
844
841
|
default: vue.withCtx(() => [
|
|
@@ -858,7 +855,7 @@
|
|
|
858
855
|
vue.createVNode(_component_el_tooltip, {
|
|
859
856
|
class: "item",
|
|
860
857
|
effect: "dark",
|
|
861
|
-
content: "
|
|
858
|
+
content: "下划线",
|
|
862
859
|
placement: "top"
|
|
863
860
|
}, {
|
|
864
861
|
default: vue.withCtx(() => [
|
|
@@ -879,18 +876,18 @@
|
|
|
879
876
|
key: 0,
|
|
880
877
|
class: "item",
|
|
881
878
|
effect: "dark",
|
|
882
|
-
content: "
|
|
879
|
+
content: "链接",
|
|
883
880
|
placement: "top"
|
|
884
881
|
}, {
|
|
885
882
|
default: vue.withCtx(() => [
|
|
886
|
-
vue.createElementVNode("div", _hoisted_30
|
|
883
|
+
vue.createElementVNode("div", _hoisted_30, [
|
|
887
884
|
vue.createElementVNode("img", {
|
|
888
885
|
src: $options.getImageUrl("icon_web_link@2x.png"),
|
|
889
886
|
width: "40",
|
|
890
887
|
height: "40",
|
|
891
888
|
alt: "",
|
|
892
889
|
onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
|
|
893
|
-
}, null, 8, _hoisted_31
|
|
890
|
+
}, null, 8, _hoisted_31)
|
|
894
891
|
])
|
|
895
892
|
]),
|
|
896
893
|
_: 1
|
|
@@ -898,7 +895,7 @@
|
|
|
898
895
|
vue.createVNode(_component_el_tooltip, {
|
|
899
896
|
class: "item",
|
|
900
897
|
effect: "dark",
|
|
901
|
-
content: "
|
|
898
|
+
content: "首行缩进",
|
|
902
899
|
placement: "top"
|
|
903
900
|
}, {
|
|
904
901
|
default: vue.withCtx(() => [
|
|
@@ -908,14 +905,14 @@
|
|
|
908
905
|
height: "40",
|
|
909
906
|
alt: "",
|
|
910
907
|
onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
|
|
911
|
-
}, null, 8, _hoisted_32
|
|
908
|
+
}, null, 8, _hoisted_32)
|
|
912
909
|
]),
|
|
913
910
|
_: 1
|
|
914
911
|
}),
|
|
915
912
|
vue.createVNode(_component_el_tooltip, {
|
|
916
913
|
class: "item",
|
|
917
914
|
effect: "dark",
|
|
918
|
-
content: "
|
|
915
|
+
content: "文字颜色",
|
|
919
916
|
placement: "top"
|
|
920
917
|
}, {
|
|
921
918
|
default: vue.withCtx(() => [
|
|
@@ -928,13 +925,13 @@
|
|
|
928
925
|
width: "24",
|
|
929
926
|
height: "40",
|
|
930
927
|
alt: ""
|
|
931
|
-
}, null, 8, _hoisted_33
|
|
928
|
+
}, null, 8, _hoisted_33),
|
|
932
929
|
vue.createElementVNode("img", {
|
|
933
930
|
src: $options.getImageUrl("tools_arrow@3x.png"),
|
|
934
931
|
width: "16",
|
|
935
932
|
height: "40",
|
|
936
933
|
alt: ""
|
|
937
|
-
}, null, 8, _hoisted_34
|
|
934
|
+
}, null, 8, _hoisted_34),
|
|
938
935
|
vue.createVNode(_component_colorPicker, {
|
|
939
936
|
ref: "colorPicker",
|
|
940
937
|
modelValue: $data.color,
|
|
@@ -955,11 +952,11 @@
|
|
|
955
952
|
width: "152"
|
|
956
953
|
}, {
|
|
957
954
|
reference: vue.withCtx(() => [
|
|
958
|
-
vue.createElementVNode("div", _hoisted_35
|
|
955
|
+
vue.createElementVNode("div", _hoisted_35, [
|
|
959
956
|
vue.createVNode(_component_el_tooltip, {
|
|
960
957
|
class: "item",
|
|
961
958
|
effect: "dark",
|
|
962
|
-
content: "
|
|
959
|
+
content: "对齐方式",
|
|
963
960
|
placement: "top"
|
|
964
961
|
}, {
|
|
965
962
|
default: vue.withCtx(() => [
|
|
@@ -1017,7 +1014,7 @@
|
|
|
1017
1014
|
vue.createVNode(_component_el_tooltip, {
|
|
1018
1015
|
class: "item",
|
|
1019
1016
|
effect: "dark",
|
|
1020
|
-
content: "
|
|
1017
|
+
content: "插入图片",
|
|
1021
1018
|
placement: "top"
|
|
1022
1019
|
}, {
|
|
1023
1020
|
default: vue.withCtx(() => [
|
|
@@ -1039,11 +1036,11 @@
|
|
|
1039
1036
|
vue.createElementVNode("li", {
|
|
1040
1037
|
class: vue.normalizeClass([$data.activeImgType === "normal" ? "active" : ""]),
|
|
1041
1038
|
onClick: _cache[18] || (_cache[18] = ($event) => $options.insertImg("normal"))
|
|
1042
|
-
}, vue.toDisplayString("
|
|
1039
|
+
}, vue.toDisplayString("上传图片"), 2),
|
|
1043
1040
|
vue.createElementVNode("li", {
|
|
1044
1041
|
class: vue.normalizeClass([$data.activeImgType === "seamless" ? "active" : ""]),
|
|
1045
1042
|
onClick: _cache[19] || (_cache[19] = ($event) => $options.insertImg("seamless"))
|
|
1046
|
-
}, vue.toDisplayString("
|
|
1043
|
+
}, vue.toDisplayString("上传无缝拼接图片"), 2)
|
|
1047
1044
|
])), [
|
|
1048
1045
|
[_directive_click_outside, $options.handlePopover]
|
|
1049
1046
|
])
|
|
@@ -1054,7 +1051,7 @@
|
|
|
1054
1051
|
key: 2,
|
|
1055
1052
|
class: "item",
|
|
1056
1053
|
effect: "dark",
|
|
1057
|
-
content: "
|
|
1054
|
+
content: "插入视频",
|
|
1058
1055
|
placement: "top"
|
|
1059
1056
|
}, {
|
|
1060
1057
|
default: vue.withCtx(() => [
|
|
@@ -1072,7 +1069,7 @@
|
|
|
1072
1069
|
key: 3,
|
|
1073
1070
|
class: "item",
|
|
1074
1071
|
effect: "dark",
|
|
1075
|
-
content: "
|
|
1072
|
+
content: "插入文章/视频",
|
|
1076
1073
|
placement: "top"
|
|
1077
1074
|
}, {
|
|
1078
1075
|
default: vue.withCtx(() => [
|
|
@@ -1090,7 +1087,7 @@
|
|
|
1090
1087
|
key: 4,
|
|
1091
1088
|
class: "item",
|
|
1092
1089
|
effect: "dark",
|
|
1093
|
-
content: "
|
|
1090
|
+
content: "采集文章",
|
|
1094
1091
|
placement: "top"
|
|
1095
1092
|
}, {
|
|
1096
1093
|
default: vue.withCtx(() => [
|
|
@@ -1107,20 +1104,16 @@
|
|
|
1107
1104
|
])
|
|
1108
1105
|
])) : vue.createCommentVNode("", true);
|
|
1109
1106
|
}
|
|
1110
|
-
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-
|
|
1107
|
+
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-50235bb8"]]);
|
|
1111
1108
|
const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
|
|
1112
|
-
const index_vue_vue_type_style_index_0_lang$5 = "";
|
|
1113
1109
|
const _hoisted_1$7 = { key: 0 };
|
|
1114
|
-
const _hoisted_2$
|
|
1115
|
-
const _hoisted_3$
|
|
1116
|
-
const _hoisted_4$5 = {
|
|
1110
|
+
const _hoisted_2$4 = { class: "basic-dialog_title" };
|
|
1111
|
+
const _hoisted_3$4 = {
|
|
1117
1112
|
key: 0,
|
|
1118
1113
|
class: "dialog-footer"
|
|
1119
1114
|
};
|
|
1120
|
-
const _hoisted_5$4 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
|
|
1121
|
-
const _hoisted_6$2 = /* @__PURE__ */ vue.createTextVNode("\u786E\u8BA4");
|
|
1122
1115
|
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
1123
|
-
|
|
1116
|
+
__name: "index",
|
|
1124
1117
|
props: {
|
|
1125
1118
|
visible: { type: Boolean, default: false },
|
|
1126
1119
|
showBtn: { type: Boolean, default: true },
|
|
@@ -1128,9 +1121,10 @@
|
|
|
1128
1121
|
showTitle: { type: Boolean, default: true }
|
|
1129
1122
|
},
|
|
1130
1123
|
emits: ["submit", "cancel"],
|
|
1131
|
-
setup(__props, { emit:
|
|
1124
|
+
setup(__props, { emit: __emit }) {
|
|
1132
1125
|
const props = __props;
|
|
1133
1126
|
const parent = vue.inject("vm");
|
|
1127
|
+
const emits = __emit;
|
|
1134
1128
|
const handleClose = () => {
|
|
1135
1129
|
var _a;
|
|
1136
1130
|
(_a = parent.setStatus) == null ? void 0 : _a.call(parent, false);
|
|
@@ -1152,31 +1146,31 @@
|
|
|
1152
1146
|
});
|
|
1153
1147
|
return (_ctx, _cache) => {
|
|
1154
1148
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), {
|
|
1155
|
-
modelValue:
|
|
1156
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
1149
|
+
modelValue: dialogVisible.value,
|
|
1150
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
|
|
1157
1151
|
"before-close": handleClose,
|
|
1158
|
-
width:
|
|
1159
|
-
class: vue.normalizeClass(["basic-dialog", { "hide-title": !
|
|
1152
|
+
width: _ctx.width,
|
|
1153
|
+
class: vue.normalizeClass(["basic-dialog", { "hide-title": !_ctx.showTitle }])
|
|
1160
1154
|
}, {
|
|
1161
1155
|
header: vue.withCtx(() => [
|
|
1162
|
-
|
|
1163
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
1164
|
-
|
|
1156
|
+
_ctx.showTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
|
|
1157
|
+
vue.createElementVNode("div", _hoisted_2$4, [
|
|
1158
|
+
_cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "basic-dialog_divider" }, null, -1)),
|
|
1165
1159
|
vue.renderSlot(_ctx.$slots, "title")
|
|
1166
1160
|
])
|
|
1167
1161
|
])) : vue.createCommentVNode("", true)
|
|
1168
1162
|
]),
|
|
1169
1163
|
footer: vue.withCtx(() => [
|
|
1170
|
-
|
|
1164
|
+
_ctx.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, [
|
|
1171
1165
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
1172
1166
|
style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
|
|
1173
1167
|
plain: "",
|
|
1174
1168
|
round: "",
|
|
1175
1169
|
onClick: handleClose
|
|
1176
1170
|
}, {
|
|
1177
|
-
default: vue.withCtx(() => [
|
|
1178
|
-
|
|
1179
|
-
]),
|
|
1171
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
1172
|
+
vue.createTextVNode("取消")
|
|
1173
|
+
])),
|
|
1180
1174
|
_: 1
|
|
1181
1175
|
}),
|
|
1182
1176
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
@@ -1185,9 +1179,9 @@
|
|
|
1185
1179
|
type: "primary",
|
|
1186
1180
|
onClick: confirm
|
|
1187
1181
|
}, {
|
|
1188
|
-
default: vue.withCtx(() => [
|
|
1189
|
-
|
|
1190
|
-
]),
|
|
1182
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
1183
|
+
vue.createTextVNode("确认")
|
|
1184
|
+
])),
|
|
1191
1185
|
_: 1
|
|
1192
1186
|
})
|
|
1193
1187
|
])) : vue.createCommentVNode("", true)
|
|
@@ -1200,16 +1194,18 @@
|
|
|
1200
1194
|
};
|
|
1201
1195
|
}
|
|
1202
1196
|
});
|
|
1197
|
+
const index_vue_vue_type_style_index_0_lang$5 = "";
|
|
1203
1198
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1204
1199
|
function getDefaultExportFromCjs(x) {
|
|
1205
1200
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1206
1201
|
}
|
|
1207
|
-
var date$
|
|
1208
|
-
|
|
1202
|
+
var date$2 = { exports: {} };
|
|
1203
|
+
var date = date$2.exports;
|
|
1204
|
+
Object.defineProperty(date, "__esModule", { value: true });
|
|
1209
1205
|
function replacementDate(data, fmt) {
|
|
1210
1206
|
for (var k in data) {
|
|
1211
1207
|
if (new RegExp("(" + k + ")").test(fmt)) {
|
|
1212
|
-
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? data[k] :
|
|
1208
|
+
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? data[k] : "00".concat(data[k]).substr(("" + data[k]).length));
|
|
1213
1209
|
}
|
|
1214
1210
|
}
|
|
1215
1211
|
return fmt;
|
|
@@ -1220,126 +1216,130 @@
|
|
|
1220
1216
|
}
|
|
1221
1217
|
return fmt;
|
|
1222
1218
|
}
|
|
1223
|
-
var DateClass =
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
"
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1219
|
+
var DateClass = (
|
|
1220
|
+
/** @class */
|
|
1221
|
+
function() {
|
|
1222
|
+
function DateClass2() {
|
|
1223
|
+
}
|
|
1224
|
+
DateClass2.prototype.format = function(date2, fmt) {
|
|
1225
|
+
if (fmt === void 0) {
|
|
1226
|
+
fmt = "YYYY-MM-DD HH:mm:ss";
|
|
1227
|
+
}
|
|
1228
|
+
if (!date2)
|
|
1229
|
+
return "";
|
|
1230
|
+
var timeData = typeof date2 === "string" ? new Date(date2.replace(/-/g, "/")) : date2;
|
|
1231
|
+
timeData = typeof date2 === "number" ? new Date(date2) : timeData;
|
|
1232
|
+
var o = {
|
|
1233
|
+
"M+": timeData.getMonth() + 1,
|
|
1234
|
+
"D+": timeData.getDate(),
|
|
1235
|
+
"h+": timeData.getHours() % 12 === 0 ? 12 : timeData.getHours() % 12,
|
|
1236
|
+
"H+": timeData.getHours(),
|
|
1237
|
+
"m+": timeData.getMinutes(),
|
|
1238
|
+
"s+": timeData.getSeconds(),
|
|
1239
|
+
"q+": Math.floor((timeData.getMonth() + 3) / 3),
|
|
1240
|
+
"S": timeData.getMilliseconds()
|
|
1241
|
+
};
|
|
1242
|
+
var week = {
|
|
1243
|
+
"0": "日",
|
|
1244
|
+
"1": "一",
|
|
1245
|
+
"2": "二",
|
|
1246
|
+
"3": "三",
|
|
1247
|
+
"4": "四",
|
|
1248
|
+
"5": "五",
|
|
1249
|
+
"6": "六"
|
|
1250
|
+
};
|
|
1251
|
+
fmt = replacementYear(timeData, fmt);
|
|
1252
|
+
if (/(E+)/.test(fmt)) {
|
|
1253
|
+
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "星期" : "周" : "") + week["".concat(timeData.getDay(), " ")]);
|
|
1254
|
+
}
|
|
1255
|
+
return replacementDate(o, fmt);
|
|
1243
1256
|
};
|
|
1244
|
-
|
|
1245
|
-
"
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
"3": "\u4E09",
|
|
1249
|
-
"4": "\u56DB",
|
|
1250
|
-
"5": "\u4E94",
|
|
1251
|
-
"6": "\u516D"
|
|
1257
|
+
DateClass2.prototype.addDaysToDate = function(date2, days) {
|
|
1258
|
+
var d = typeof date2 === "object" ? date2 : new Date(date2);
|
|
1259
|
+
d.setDate(d.getDate() + days);
|
|
1260
|
+
return d.toISOString().split("T")[0];
|
|
1252
1261
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
var hh = Math.floor(ts / 1e3 / 60 / 60 % 24);
|
|
1271
|
-
var mm = Math.floor(ts / 1e3 / 60 % 60);
|
|
1272
|
-
var ss = Math.floor(ts / 1e3 % 60);
|
|
1273
|
-
if (ts <= 0)
|
|
1274
|
-
return false;
|
|
1275
|
-
return {
|
|
1276
|
-
dd: dd < 10 ? "0" + dd : dd,
|
|
1277
|
-
hh: hh < 10 ? "0" + hh : hh,
|
|
1278
|
-
mm: mm < 10 ? "0" + mm : mm,
|
|
1279
|
-
ss: ss < 10 ? "0" + ss : ss
|
|
1262
|
+
DateClass2.prototype.remainTime = function(endTime, startTime) {
|
|
1263
|
+
if (startTime === void 0) {
|
|
1264
|
+
startTime = /* @__PURE__ */ new Date();
|
|
1265
|
+
}
|
|
1266
|
+
var ts = Number(endTime) - Number(startTime);
|
|
1267
|
+
var dd = Math.floor(ts / 1e3 / 60 / 60 / 24);
|
|
1268
|
+
var hh = Math.floor(ts / 1e3 / 60 / 60 % 24);
|
|
1269
|
+
var mm = Math.floor(ts / 1e3 / 60 % 60);
|
|
1270
|
+
var ss = Math.floor(ts / 1e3 % 60);
|
|
1271
|
+
if (ts <= 0)
|
|
1272
|
+
return false;
|
|
1273
|
+
return {
|
|
1274
|
+
dd: dd < 10 ? "0".concat(dd) : dd,
|
|
1275
|
+
hh: hh < 10 ? "0".concat(hh) : hh,
|
|
1276
|
+
mm: mm < 10 ? "0".concat(mm) : mm,
|
|
1277
|
+
ss: ss < 10 ? "0".concat(ss) : ss
|
|
1278
|
+
};
|
|
1280
1279
|
};
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1280
|
+
DateClass2.prototype.formatPassTime = function(startTime) {
|
|
1281
|
+
var currentTime = /* @__PURE__ */ new Date();
|
|
1282
|
+
var time = currentTime - startTime;
|
|
1283
|
+
var year = Math.floor(time / (1e3 * 60 * 60 * 24) / 30 / 12);
|
|
1284
|
+
if (year)
|
|
1285
|
+
return "".concat(year, "年前");
|
|
1286
|
+
var month = Math.floor(time / (1e3 * 60 * 60 * 24) / 30);
|
|
1287
|
+
if (month)
|
|
1288
|
+
return "".concat(month, "个月前");
|
|
1289
|
+
var day = Math.floor(time / (1e3 * 60 * 60 * 24));
|
|
1290
|
+
if (day)
|
|
1291
|
+
return "".concat(day, "天前");
|
|
1292
|
+
var hour = Math.floor(time / (1e3 * 60 * 60));
|
|
1293
|
+
if (hour)
|
|
1294
|
+
return "".concat(hour, "小时前");
|
|
1295
|
+
var min = Math.floor(time / (1e3 * 60));
|
|
1296
|
+
if (min)
|
|
1297
|
+
return "".concat(min, "分钟前");
|
|
1298
|
+
else
|
|
1299
|
+
return "刚刚";
|
|
1300
|
+
};
|
|
1301
|
+
DateClass2.prototype.formatPassTimeForList = function(time) {
|
|
1302
|
+
return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY年MM月DD日", true);
|
|
1303
|
+
};
|
|
1304
|
+
DateClass2.prototype.formatPassTimeForDetail = function(time, fmt, noYear) {
|
|
1305
|
+
if (fmt === void 0) {
|
|
1306
|
+
fmt = "YYYY-MM-DD";
|
|
1307
|
+
}
|
|
1308
|
+
var date2 = typeof time === "number" ? new Date(time) : new Date((time || "").replace(/-/g, "/"));
|
|
1309
|
+
var diff = ((/* @__PURE__ */ new Date()).getTime() - date2.getTime()) / 1e3;
|
|
1310
|
+
var dayDiff = Math.floor(diff / 86400);
|
|
1311
|
+
var isValidDate = Object.prototype.toString.call(date2) === "[object Date]" && !isNaN(date2.getTime());
|
|
1312
|
+
if (!isValidDate)
|
|
1313
|
+
return "";
|
|
1314
|
+
var formatDate = function() {
|
|
1315
|
+
var today = new Date(date2);
|
|
1316
|
+
var o = {
|
|
1317
|
+
"Y+": today.getFullYear(),
|
|
1318
|
+
"M+": ("0" + (today.getMonth() + 1)).slice(-2),
|
|
1319
|
+
"D+": ("0" + today.getDate()).slice(-2)
|
|
1320
|
+
};
|
|
1321
|
+
fmt = replacementYear(date2, fmt);
|
|
1322
|
+
var year = today.getFullYear();
|
|
1323
|
+
if (!((/* @__PURE__ */ new Date()).getFullYear() > year) && noYear) {
|
|
1324
|
+
var backData = replacementDate(o, fmt);
|
|
1325
|
+
return backData.split("年")[1];
|
|
1326
|
+
}
|
|
1327
|
+
return replacementDate(o, fmt);
|
|
1322
1328
|
};
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
if (
|
|
1326
|
-
|
|
1327
|
-
return backData.split("\u5E74")[1];
|
|
1329
|
+
if (dayDiff === -1) {
|
|
1330
|
+
return "刚刚";
|
|
1331
|
+
} else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
|
|
1332
|
+
return formatDate();
|
|
1328
1333
|
}
|
|
1329
|
-
return
|
|
1334
|
+
return dayDiff === 0 && (diff < 60 && "刚刚" || diff < 120 && "1分钟前" || diff < 3600 && Math.floor(diff / 60) + "分钟前" || diff < 7200 && "1小时前" || diff < 86400 && Math.floor(diff / 3600) + "小时前") || dayDiff < 16 && dayDiff + "天前";
|
|
1330
1335
|
};
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
return DateClass2;
|
|
1339
|
-
}();
|
|
1340
|
-
date$1.exports = new DateClass();
|
|
1341
|
-
const date = /* @__PURE__ */ getDefaultExportFromCjs(date$1.exports);
|
|
1342
|
-
var tools$1 = { exports: {} };
|
|
1336
|
+
return DateClass2;
|
|
1337
|
+
}()
|
|
1338
|
+
);
|
|
1339
|
+
date$2.exports = new DateClass();
|
|
1340
|
+
var dateExports = date$2.exports;
|
|
1341
|
+
const date$1 = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
|
|
1342
|
+
var tools$2 = { exports: {} };
|
|
1343
1343
|
var _listCacheClear;
|
|
1344
1344
|
var hasRequired_listCacheClear;
|
|
1345
1345
|
function require_listCacheClear() {
|
|
@@ -2246,6 +2246,7 @@
|
|
|
2246
2246
|
stubFalse_1 = stubFalse;
|
|
2247
2247
|
return stubFalse_1;
|
|
2248
2248
|
}
|
|
2249
|
+
isBuffer.exports;
|
|
2249
2250
|
var hasRequiredIsBuffer;
|
|
2250
2251
|
function requireIsBuffer() {
|
|
2251
2252
|
if (hasRequiredIsBuffer)
|
|
@@ -2325,6 +2326,7 @@
|
|
|
2325
2326
|
return _baseUnary;
|
|
2326
2327
|
}
|
|
2327
2328
|
var _nodeUtil = { exports: {} };
|
|
2329
|
+
_nodeUtil.exports;
|
|
2328
2330
|
var hasRequired_nodeUtil;
|
|
2329
2331
|
function require_nodeUtil() {
|
|
2330
2332
|
if (hasRequired_nodeUtil)
|
|
@@ -2374,7 +2376,11 @@
|
|
|
2374
2376
|
function arrayLikeKeys(value, inherited) {
|
|
2375
2377
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer2(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
2376
2378
|
for (var key in value) {
|
|
2377
|
-
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes &&
|
|
2379
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2380
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2381
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2382
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
2383
|
+
isIndex(key, length)))) {
|
|
2378
2384
|
result.push(key);
|
|
2379
2385
|
}
|
|
2380
2386
|
}
|
|
@@ -2554,6 +2560,7 @@
|
|
|
2554
2560
|
return _baseAssignIn;
|
|
2555
2561
|
}
|
|
2556
2562
|
var _cloneBuffer = { exports: {} };
|
|
2563
|
+
_cloneBuffer.exports;
|
|
2557
2564
|
var hasRequired_cloneBuffer;
|
|
2558
2565
|
function require_cloneBuffer() {
|
|
2559
2566
|
if (hasRequired_cloneBuffer)
|
|
@@ -3218,296 +3225,295 @@
|
|
|
3218
3225
|
}
|
|
3219
3226
|
return clipboardCopy_1;
|
|
3220
3227
|
}
|
|
3221
|
-
|
|
3228
|
+
var tools = tools$2.exports;
|
|
3229
|
+
Object.defineProperty(tools, "__esModule", { value: true });
|
|
3222
3230
|
var previous = 0;
|
|
3223
3231
|
var timeout = null;
|
|
3224
|
-
var ToolsClass =
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3232
|
+
var ToolsClass = (
|
|
3233
|
+
/** @class */
|
|
3234
|
+
function() {
|
|
3235
|
+
function ToolsClass2() {
|
|
3236
|
+
var _this = this;
|
|
3237
|
+
this.stopScroll = function(className) {
|
|
3238
|
+
if (!(window && window.document)) {
|
|
3239
|
+
return new Error("仅支持浏览器");
|
|
3240
|
+
}
|
|
3241
|
+
var html = document.documentElement;
|
|
3242
|
+
html.style.overflow = "hidden";
|
|
3243
|
+
html.style.height = "100%";
|
|
3244
|
+
var body = document.body;
|
|
3245
|
+
body.style.overflow = "hidden";
|
|
3246
|
+
body.style.height = "100%";
|
|
3247
|
+
if (className) {
|
|
3248
|
+
var dom = document.querySelector(".".concat(className));
|
|
3249
|
+
dom && dom.addEventListener("touchmove", _this.__setDefault__);
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3252
|
+
this.startScroll = function(className) {
|
|
3253
|
+
if (!(window && window.document)) {
|
|
3254
|
+
return new Error("仅支持浏览器");
|
|
3255
|
+
}
|
|
3256
|
+
var html = document.documentElement;
|
|
3257
|
+
html.style.overflow = "visible";
|
|
3258
|
+
html.style.height = "auto";
|
|
3259
|
+
var body = document.body;
|
|
3260
|
+
body.style.overflow = "visible";
|
|
3261
|
+
body.style.height = "auto";
|
|
3262
|
+
if (className) {
|
|
3263
|
+
var dom = document.querySelector(".".concat(className));
|
|
3264
|
+
dom && dom.removeEventListener("touchmove", _this.__setDefault__);
|
|
3265
|
+
}
|
|
3266
|
+
};
|
|
3267
|
+
this.objectToArray = function(obj) {
|
|
3268
|
+
var arr = [];
|
|
3269
|
+
if (typeof obj === "object") {
|
|
3270
|
+
for (var key in obj) {
|
|
3271
|
+
if (obj.hasOwnProperty(key)) {
|
|
3272
|
+
arr.push([key, obj[key]].join("="));
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
return arr;
|
|
3277
|
+
};
|
|
3278
|
+
this.convertKeyValueEnum = function(obj) {
|
|
3279
|
+
var result = {};
|
|
3280
|
+
if (typeof obj === "object") {
|
|
3281
|
+
for (var key in obj) {
|
|
3282
|
+
if (obj.hasOwnProperty(key)) {
|
|
3283
|
+
result[obj[key]] = key;
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
return result;
|
|
3288
|
+
};
|
|
3289
|
+
this.isDefined = function(val) {
|
|
3290
|
+
return val !== void 0 && val !== null;
|
|
3291
|
+
};
|
|
3292
|
+
this.__loaded__ = {};
|
|
3293
|
+
this.__setDefault__ = function(e) {
|
|
3294
|
+
e && e.preventDefault();
|
|
3295
|
+
};
|
|
3296
|
+
}
|
|
3297
|
+
ToolsClass2.prototype.deepCopy = function(data) {
|
|
3298
|
+
return JSON.parse(JSON.stringify(data));
|
|
3299
|
+
};
|
|
3300
|
+
ToolsClass2.prototype.deepCopy2 = function(obj) {
|
|
3301
|
+
var _obj = Array.isArray(obj) ? [] : {};
|
|
3302
|
+
for (var i in obj) {
|
|
3303
|
+
_obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
|
|
3240
3304
|
}
|
|
3305
|
+
return _obj;
|
|
3306
|
+
};
|
|
3307
|
+
ToolsClass2.prototype.deepCopy3 = function(obj) {
|
|
3308
|
+
var deepcopy = requireCloneDeep();
|
|
3309
|
+
return deepcopy(obj);
|
|
3241
3310
|
};
|
|
3242
|
-
|
|
3311
|
+
ToolsClass2.prototype.debounce = function(func, wait) {
|
|
3312
|
+
var delay = function() {
|
|
3313
|
+
var args = arguments;
|
|
3314
|
+
if (timeout)
|
|
3315
|
+
clearTimeout(timeout);
|
|
3316
|
+
timeout = setTimeout(function() {
|
|
3317
|
+
func.apply(delay, args);
|
|
3318
|
+
}, wait);
|
|
3319
|
+
};
|
|
3320
|
+
return delay;
|
|
3321
|
+
};
|
|
3322
|
+
ToolsClass2.prototype.throttle = function(func, wait) {
|
|
3323
|
+
var delay = function() {
|
|
3324
|
+
var now = Date.now();
|
|
3325
|
+
if (now - previous > wait) {
|
|
3326
|
+
func.apply(delay, arguments);
|
|
3327
|
+
previous = now;
|
|
3328
|
+
}
|
|
3329
|
+
};
|
|
3330
|
+
return delay;
|
|
3331
|
+
};
|
|
3332
|
+
ToolsClass2.prototype.getUrlName = function(url) {
|
|
3333
|
+
return url && url.split("?")[0].split("/").reverse()[0];
|
|
3334
|
+
};
|
|
3335
|
+
ToolsClass2.prototype.loadJs = function(url) {
|
|
3336
|
+
var _this = this;
|
|
3337
|
+
if (!(window && window.document)) {
|
|
3338
|
+
return new Error("仅支持浏览器");
|
|
3339
|
+
}
|
|
3340
|
+
var name = this.getUrlName(url);
|
|
3341
|
+
var id = "js_" + name;
|
|
3342
|
+
return new Promise(function(resolve, reject) {
|
|
3343
|
+
if (_this.__loaded__[id]) {
|
|
3344
|
+
return resolve();
|
|
3345
|
+
}
|
|
3346
|
+
var script = document.createElement("script");
|
|
3347
|
+
script.type = "text/javascript";
|
|
3348
|
+
script.async = true;
|
|
3349
|
+
script.src = url;
|
|
3350
|
+
script.id = id;
|
|
3351
|
+
script.onload = function() {
|
|
3352
|
+
_this.__loaded__[id] = true;
|
|
3353
|
+
resolve();
|
|
3354
|
+
};
|
|
3355
|
+
script.onerror = function(e) {
|
|
3356
|
+
reject(e);
|
|
3357
|
+
};
|
|
3358
|
+
document.body.appendChild(script);
|
|
3359
|
+
});
|
|
3360
|
+
};
|
|
3361
|
+
ToolsClass2.prototype.loadCss = function(url) {
|
|
3362
|
+
var _this = this;
|
|
3243
3363
|
if (!(window && window.document)) {
|
|
3244
|
-
return new Error("
|
|
3245
|
-
}
|
|
3246
|
-
var
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3364
|
+
return new Error("仅支持浏览器");
|
|
3365
|
+
}
|
|
3366
|
+
var name = this.getUrlName(url);
|
|
3367
|
+
var id = "css_" + name;
|
|
3368
|
+
return new Promise(function(resolve, reject) {
|
|
3369
|
+
if (_this.__loaded__[id]) {
|
|
3370
|
+
return resolve();
|
|
3371
|
+
}
|
|
3372
|
+
var link = document.createElement("link");
|
|
3373
|
+
link.type = "text/css";
|
|
3374
|
+
link.rel = "stylesheet";
|
|
3375
|
+
link.href = url;
|
|
3376
|
+
link.id = id;
|
|
3377
|
+
link.onload = function() {
|
|
3378
|
+
_this.__loaded__[id] = true;
|
|
3379
|
+
resolve();
|
|
3380
|
+
};
|
|
3381
|
+
link.onerror = function(e) {
|
|
3382
|
+
reject(e);
|
|
3383
|
+
};
|
|
3384
|
+
document.head.appendChild(link);
|
|
3385
|
+
});
|
|
3386
|
+
};
|
|
3387
|
+
ToolsClass2.prototype.clipboard = function(str) {
|
|
3388
|
+
if (!(window && window.document)) {
|
|
3389
|
+
return new Error("仅支持浏览器");
|
|
3255
3390
|
}
|
|
3391
|
+
var copy = requireClipboardCopy();
|
|
3392
|
+
return copy(str);
|
|
3256
3393
|
};
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3394
|
+
ToolsClass2.prototype.firstUpperCase = function(str) {
|
|
3395
|
+
return str.charAt(0).toUpperCase() + str.toString().slice(1);
|
|
3396
|
+
};
|
|
3397
|
+
ToolsClass2.prototype.slice = function(target, length) {
|
|
3398
|
+
if (target === void 0) {
|
|
3399
|
+
target = "";
|
|
3400
|
+
}
|
|
3401
|
+
if (length === void 0) {
|
|
3402
|
+
length = 0;
|
|
3265
3403
|
}
|
|
3266
|
-
return
|
|
3404
|
+
return target.slice(0, length);
|
|
3267
3405
|
};
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
for (var key in obj) {
|
|
3272
|
-
if (obj.hasOwnProperty(key)) {
|
|
3273
|
-
result[obj[key]] = key;
|
|
3274
|
-
}
|
|
3275
|
-
}
|
|
3406
|
+
ToolsClass2.prototype.guid = function() {
|
|
3407
|
+
function S4() {
|
|
3408
|
+
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
3276
3409
|
}
|
|
3277
|
-
return
|
|
3410
|
+
return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
|
|
3278
3411
|
};
|
|
3279
|
-
|
|
3280
|
-
|
|
3412
|
+
ToolsClass2.prototype.getBytesOfText = function(str) {
|
|
3413
|
+
if (str === void 0) {
|
|
3414
|
+
str = "";
|
|
3415
|
+
}
|
|
3416
|
+
return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
|
|
3281
3417
|
};
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
e && e.preventDefault();
|
|
3418
|
+
ToolsClass2.prototype.uniqueArr = function(arr) {
|
|
3419
|
+
return Array.from(new Set(arr));
|
|
3285
3420
|
};
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
ToolsClass2.prototype.deepCopy2 = function(obj) {
|
|
3291
|
-
var _obj = Array.isArray(obj) ? [] : {};
|
|
3292
|
-
for (var i in obj) {
|
|
3293
|
-
_obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
|
|
3294
|
-
}
|
|
3295
|
-
return _obj;
|
|
3296
|
-
};
|
|
3297
|
-
ToolsClass2.prototype.deepCopy3 = function(obj) {
|
|
3298
|
-
var deepcopy = requireCloneDeep();
|
|
3299
|
-
return deepcopy(obj);
|
|
3300
|
-
};
|
|
3301
|
-
ToolsClass2.prototype.debounce = function(func, wait) {
|
|
3302
|
-
var delay = function() {
|
|
3303
|
-
var args = arguments;
|
|
3304
|
-
if (timeout)
|
|
3305
|
-
clearTimeout(timeout);
|
|
3306
|
-
timeout = setTimeout(function() {
|
|
3307
|
-
func.apply(delay, args);
|
|
3308
|
-
}, wait);
|
|
3421
|
+
ToolsClass2.prototype.swapArray = function(array, index1, index2) {
|
|
3422
|
+
var _a;
|
|
3423
|
+
_a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
|
|
3424
|
+
return array;
|
|
3309
3425
|
};
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
ToolsClass2.prototype.throttle = function(func, wait) {
|
|
3313
|
-
var delay = function() {
|
|
3314
|
-
var now = Date.now();
|
|
3315
|
-
if (now - previous > wait) {
|
|
3316
|
-
func.apply(delay, arguments);
|
|
3317
|
-
previous = now;
|
|
3318
|
-
}
|
|
3426
|
+
ToolsClass2.prototype.filterEmoji = function(str) {
|
|
3427
|
+
return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
|
|
3319
3428
|
};
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
if (
|
|
3334
|
-
return
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
};
|
|
3351
|
-
ToolsClass2.prototype.loadCss = function(url) {
|
|
3352
|
-
var _this = this;
|
|
3353
|
-
if (!(window && window.document)) {
|
|
3354
|
-
return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
|
|
3355
|
-
}
|
|
3356
|
-
var name = this.getUrlName(url);
|
|
3357
|
-
var id = "css_" + name;
|
|
3358
|
-
return new Promise(function(resolve, reject) {
|
|
3359
|
-
if (_this.__loaded__[id]) {
|
|
3360
|
-
return resolve();
|
|
3361
|
-
}
|
|
3362
|
-
var link = document.createElement("link");
|
|
3363
|
-
link.type = "text/css";
|
|
3364
|
-
link.rel = "stylesheet";
|
|
3365
|
-
link.href = url;
|
|
3366
|
-
link.id = id;
|
|
3367
|
-
link.onload = function() {
|
|
3368
|
-
_this.__loaded__[id] = true;
|
|
3369
|
-
resolve();
|
|
3370
|
-
};
|
|
3371
|
-
link.onerror = function(e) {
|
|
3372
|
-
reject(e);
|
|
3373
|
-
};
|
|
3374
|
-
document.head.appendChild(link);
|
|
3375
|
-
});
|
|
3376
|
-
};
|
|
3377
|
-
ToolsClass2.prototype.clipboard = function(str) {
|
|
3378
|
-
if (!(window && window.document)) {
|
|
3379
|
-
return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
|
|
3380
|
-
}
|
|
3381
|
-
var copy = requireClipboardCopy();
|
|
3382
|
-
return copy(str);
|
|
3383
|
-
};
|
|
3384
|
-
ToolsClass2.prototype.firstUpperCase = function(str) {
|
|
3385
|
-
return str.charAt(0).toUpperCase() + str.toString().slice(1);
|
|
3386
|
-
};
|
|
3387
|
-
ToolsClass2.prototype.slice = function(target, length) {
|
|
3388
|
-
if (target === void 0) {
|
|
3389
|
-
target = "";
|
|
3390
|
-
}
|
|
3391
|
-
if (length === void 0) {
|
|
3392
|
-
length = 0;
|
|
3393
|
-
}
|
|
3394
|
-
return target.slice(0, length);
|
|
3395
|
-
};
|
|
3396
|
-
ToolsClass2.prototype.guid = function() {
|
|
3397
|
-
function S4() {
|
|
3398
|
-
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
3399
|
-
}
|
|
3400
|
-
return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
|
|
3401
|
-
};
|
|
3402
|
-
ToolsClass2.prototype.getBytesOfText = function(str) {
|
|
3403
|
-
if (str === void 0) {
|
|
3404
|
-
str = "";
|
|
3405
|
-
}
|
|
3406
|
-
return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
|
|
3407
|
-
};
|
|
3408
|
-
ToolsClass2.prototype.uniqueArr = function(arr) {
|
|
3409
|
-
return Array.from(new Set(arr));
|
|
3410
|
-
};
|
|
3411
|
-
ToolsClass2.prototype.swapArray = function(array, index1, index2) {
|
|
3412
|
-
var _a;
|
|
3413
|
-
_a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
|
|
3414
|
-
return array;
|
|
3415
|
-
};
|
|
3416
|
-
ToolsClass2.prototype.filterEmoji = function(str) {
|
|
3417
|
-
return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
|
|
3418
|
-
};
|
|
3419
|
-
ToolsClass2.prototype.containsEmoji = function(str) {
|
|
3420
|
-
var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
|
|
3421
|
-
return reg.test(str);
|
|
3422
|
-
};
|
|
3423
|
-
ToolsClass2.prototype.containsHanZi = function(str) {
|
|
3424
|
-
var reg = /[\u4e00-\u9fa5]/mg;
|
|
3425
|
-
return reg.test(str);
|
|
3426
|
-
};
|
|
3427
|
-
ToolsClass2.prototype.isEmpty = function(val) {
|
|
3428
|
-
if (val == null)
|
|
3429
|
-
return true;
|
|
3430
|
-
if (typeof val === "boolean")
|
|
3429
|
+
ToolsClass2.prototype.containsEmoji = function(str) {
|
|
3430
|
+
var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
|
|
3431
|
+
return reg.test(str);
|
|
3432
|
+
};
|
|
3433
|
+
ToolsClass2.prototype.containsHanZi = function(str) {
|
|
3434
|
+
var reg = /[\u4e00-\u9fa5]/mg;
|
|
3435
|
+
return reg.test(str);
|
|
3436
|
+
};
|
|
3437
|
+
ToolsClass2.prototype.isEmpty = function(val) {
|
|
3438
|
+
if (val == null)
|
|
3439
|
+
return true;
|
|
3440
|
+
if (typeof val === "boolean")
|
|
3441
|
+
return false;
|
|
3442
|
+
if (typeof val === "number")
|
|
3443
|
+
return !val;
|
|
3444
|
+
if (val instanceof Error)
|
|
3445
|
+
return val.message === "";
|
|
3446
|
+
switch (Object.prototype.toString.call(val)) {
|
|
3447
|
+
case "[object String]":
|
|
3448
|
+
case "[object Array]":
|
|
3449
|
+
return !val.length;
|
|
3450
|
+
case "[object File]":
|
|
3451
|
+
case "[object Map]":
|
|
3452
|
+
case "[object Set]": {
|
|
3453
|
+
return !val.size;
|
|
3454
|
+
}
|
|
3455
|
+
case "[object Object]": {
|
|
3456
|
+
return !Object.keys(val).length;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3431
3459
|
return false;
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
switch (Object.prototype.toString.call(val)) {
|
|
3437
|
-
case "[object String]":
|
|
3438
|
-
case "[object Array]":
|
|
3439
|
-
return !val.length;
|
|
3440
|
-
case "[object File]":
|
|
3441
|
-
case "[object Map]":
|
|
3442
|
-
case "[object Set]": {
|
|
3443
|
-
return !val.size;
|
|
3444
|
-
}
|
|
3445
|
-
case "[object Object]": {
|
|
3446
|
-
return !Object.keys(val).length;
|
|
3460
|
+
};
|
|
3461
|
+
ToolsClass2.prototype.sensitiveField = function(field, before, after) {
|
|
3462
|
+
if (before === void 0) {
|
|
3463
|
+
before = 3;
|
|
3447
3464
|
}
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
}
|
|
3473
|
-
|
|
3474
|
-
const tools = /* @__PURE__ */ getDefaultExportFromCjs(tools$1.exports);
|
|
3475
|
-
const index_vue_vue_type_style_index_0_lang$4 = "";
|
|
3476
|
-
const _hoisted_1$6 = /* @__PURE__ */ vue.createTextVNode("\u63D2\u5165\u6587\u7AE0/\u89C6\u9891");
|
|
3477
|
-
const _hoisted_2$5 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
|
|
3478
|
-
const _hoisted_3$5 = { class: "insert-article" };
|
|
3479
|
-
const _hoisted_4$4 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6211\u7684\u6587\u7AE0\u4E2D\u9009\u62E9");
|
|
3480
|
-
const _hoisted_5$3 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
|
|
3481
|
-
const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
|
|
3482
|
-
const _hoisted_7$1 = { class: "insert-article_input" };
|
|
3483
|
-
const _hoisted_8$1 = {
|
|
3465
|
+
if (after === void 0) {
|
|
3466
|
+
after = 4;
|
|
3467
|
+
}
|
|
3468
|
+
if (!field) {
|
|
3469
|
+
return "";
|
|
3470
|
+
}
|
|
3471
|
+
field = String(field);
|
|
3472
|
+
var sensitiveLen = field.length - before - after;
|
|
3473
|
+
if (sensitiveLen < 0) {
|
|
3474
|
+
sensitiveLen = 0;
|
|
3475
|
+
}
|
|
3476
|
+
var regItem = "[一-龥a-zA-Z0-9]";
|
|
3477
|
+
var regExp = "(".concat(regItem, "{").concat(before, "})").concat(regItem, "*(").concat(regItem, "{").concat(after, "})");
|
|
3478
|
+
var reg = new RegExp(regExp);
|
|
3479
|
+
return field.replace(reg, "$1".concat("*".repeat(sensitiveLen), "$2"));
|
|
3480
|
+
};
|
|
3481
|
+
return ToolsClass2;
|
|
3482
|
+
}()
|
|
3483
|
+
);
|
|
3484
|
+
tools$2.exports = new ToolsClass();
|
|
3485
|
+
var toolsExports = tools$2.exports;
|
|
3486
|
+
const tools$1 = /* @__PURE__ */ getDefaultExportFromCjs(toolsExports);
|
|
3487
|
+
const _hoisted_1$6 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
|
|
3488
|
+
const _hoisted_2$3 = { class: "insert-article" };
|
|
3489
|
+
const _hoisted_3$3 = { class: "insert-article_input" };
|
|
3490
|
+
const _hoisted_4$2 = {
|
|
3484
3491
|
key: 0,
|
|
3485
3492
|
class: "nodata"
|
|
3486
3493
|
};
|
|
3487
|
-
const
|
|
3488
|
-
const
|
|
3494
|
+
const _hoisted_5$2 = ["infinite-scroll-disabled"];
|
|
3495
|
+
const _hoisted_6$1 = {
|
|
3489
3496
|
key: 0,
|
|
3490
3497
|
class: "video-item"
|
|
3491
3498
|
};
|
|
3492
|
-
const
|
|
3493
|
-
const
|
|
3494
|
-
const
|
|
3495
|
-
const
|
|
3496
|
-
const
|
|
3497
|
-
const
|
|
3499
|
+
const _hoisted_7$1 = { class: "video-pic" };
|
|
3500
|
+
const _hoisted_8$1 = ["src"];
|
|
3501
|
+
const _hoisted_9$1 = ["src"];
|
|
3502
|
+
const _hoisted_10$1 = { class: "video-text" };
|
|
3503
|
+
const _hoisted_11$1 = { class: "dotdotdot2" };
|
|
3504
|
+
const _hoisted_12$1 = {
|
|
3498
3505
|
key: 1,
|
|
3499
3506
|
style: { "display": "inline-flex", "flex-direction": "column" }
|
|
3500
3507
|
};
|
|
3501
3508
|
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
3502
|
-
|
|
3509
|
+
__name: "index",
|
|
3503
3510
|
props: {
|
|
3504
3511
|
visible: { type: Boolean, default: false },
|
|
3505
|
-
getList:
|
|
3512
|
+
getList: {}
|
|
3506
3513
|
},
|
|
3507
3514
|
emits: ["change", "submit", "update:visible"],
|
|
3508
|
-
setup(__props, { emit:
|
|
3509
|
-
const
|
|
3510
|
-
const { debounce } = tools;
|
|
3515
|
+
setup(__props, { emit: __emit }) {
|
|
3516
|
+
const { debounce } = tools$1;
|
|
3511
3517
|
const vInfiniteScroll = elementPlus.ElInfiniteScroll;
|
|
3512
3518
|
const Radio_Type = {
|
|
3513
3519
|
MY_ARITICLE: "1",
|
|
@@ -3525,7 +3531,9 @@
|
|
|
3525
3531
|
emits("update:visible", val);
|
|
3526
3532
|
}
|
|
3527
3533
|
});
|
|
3534
|
+
const props = __props;
|
|
3528
3535
|
const { visible, getList } = vue.toRefs(props);
|
|
3536
|
+
const emits = __emit;
|
|
3529
3537
|
const data = vue.reactive({
|
|
3530
3538
|
params: {
|
|
3531
3539
|
autherid: "",
|
|
@@ -3556,7 +3564,7 @@
|
|
|
3556
3564
|
};
|
|
3557
3565
|
const confirm = () => {
|
|
3558
3566
|
if (!data.article) {
|
|
3559
|
-
elementPlus.ElMessage.error(
|
|
3567
|
+
elementPlus.ElMessage.error(`请选择${isVideo ? "视频" : "文章"}`);
|
|
3560
3568
|
return;
|
|
3561
3569
|
}
|
|
3562
3570
|
data.article.isVideo = isVideo;
|
|
@@ -3580,6 +3588,7 @@
|
|
|
3580
3588
|
autherid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
|
|
3581
3589
|
limit: 20,
|
|
3582
3590
|
allType: data.params.radio,
|
|
3591
|
+
// 只有4 是查视频 其他是文章
|
|
3583
3592
|
title: data.params.title,
|
|
3584
3593
|
page: ++data.page
|
|
3585
3594
|
});
|
|
@@ -3599,21 +3608,21 @@
|
|
|
3599
3608
|
}, {
|
|
3600
3609
|
title: vue.withCtx(() => [
|
|
3601
3610
|
vue.createElementVNode("span", null, [
|
|
3602
|
-
|
|
3603
|
-
vue.createElementVNode("strong",
|
|
3611
|
+
_cache[8] || (_cache[8] = vue.createTextVNode("插入文章/视频")),
|
|
3612
|
+
vue.createElementVNode("strong", _hoisted_1$6, "平台仅支持插入" + vue.toDisplayString(`${isVideo.value ? "2年" : "18个月"}`) + "内的推荐内容", 1)
|
|
3604
3613
|
])
|
|
3605
3614
|
]),
|
|
3606
3615
|
default: vue.withCtx(() => [
|
|
3607
|
-
vue.createElementVNode("div",
|
|
3616
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
3608
3617
|
vue.createElementVNode("div", null, [
|
|
3609
3618
|
vue.createVNode(vue.unref(elementPlus.ElRadio), {
|
|
3610
3619
|
modelValue: data.params.radio,
|
|
3611
3620
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.params.radio = $event),
|
|
3612
3621
|
label: Radio_Type.MY_ARITICLE
|
|
3613
3622
|
}, {
|
|
3614
|
-
default: vue.withCtx(() => [
|
|
3615
|
-
|
|
3616
|
-
]),
|
|
3623
|
+
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
3624
|
+
vue.createTextVNode("从我的文章中选择")
|
|
3625
|
+
])),
|
|
3617
3626
|
_: 1
|
|
3618
3627
|
}, 8, ["modelValue", "label"]),
|
|
3619
3628
|
vue.createVNode(vue.unref(elementPlus.ElRadio), {
|
|
@@ -3621,9 +3630,9 @@
|
|
|
3621
3630
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.params.radio = $event),
|
|
3622
3631
|
label: Radio_Type.MY_VIDEO
|
|
3623
3632
|
}, {
|
|
3624
|
-
default: vue.withCtx(() => [
|
|
3625
|
-
|
|
3626
|
-
]),
|
|
3633
|
+
default: vue.withCtx(() => _cache[10] || (_cache[10] = [
|
|
3634
|
+
vue.createTextVNode("从我的视频中选择")
|
|
3635
|
+
])),
|
|
3627
3636
|
_: 1
|
|
3628
3637
|
}, 8, ["modelValue", "label"]),
|
|
3629
3638
|
vue.createVNode(vue.unref(elementPlus.ElRadio), {
|
|
@@ -3631,17 +3640,17 @@
|
|
|
3631
3640
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.params.radio = $event),
|
|
3632
3641
|
label: Radio_Type.ALL_ARITICLE
|
|
3633
3642
|
}, {
|
|
3634
|
-
default: vue.withCtx(() => [
|
|
3635
|
-
|
|
3636
|
-
]),
|
|
3643
|
+
default: vue.withCtx(() => _cache[11] || (_cache[11] = [
|
|
3644
|
+
vue.createTextVNode("从所有文章中选择")
|
|
3645
|
+
])),
|
|
3637
3646
|
_: 1
|
|
3638
3647
|
}, 8, ["modelValue", "label"])
|
|
3639
3648
|
]),
|
|
3640
|
-
vue.createElementVNode("div",
|
|
3649
|
+
vue.createElementVNode("div", _hoisted_3$3, [
|
|
3641
3650
|
vue.createVNode(vue.unref(elementPlus.ElInput), {
|
|
3642
3651
|
modelValue: data.params.title,
|
|
3643
3652
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.params.title = $event),
|
|
3644
|
-
placeholder:
|
|
3653
|
+
placeholder: isVideo.value ? "输入视频描述查找平台发布过的视频" : "输入标题名查找平台发过的文章",
|
|
3645
3654
|
onKeyup: _cache[5] || (_cache[5] = vue.withKeys(($event) => vue.unref(getArticleList)(true), ["enter", "native"])),
|
|
3646
3655
|
onInput: _cache[6] || (_cache[6] = ($event) => vue.unref(getArticleList)(true))
|
|
3647
3656
|
}, {
|
|
@@ -3655,11 +3664,11 @@
|
|
|
3655
3664
|
_: 1
|
|
3656
3665
|
}, 8, ["modelValue", "placeholder"])
|
|
3657
3666
|
]),
|
|
3658
|
-
data.data.length === 0 && !data.busy ? (vue.openBlock(), vue.createElementBlock("div",
|
|
3667
|
+
data.data.length === 0 && !data.busy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, vue.toDisplayString(`没有符合条件的${isVideo.value ? "视频" : "文章"}哦,你可以试试搜索其他${isVideo.value ? "视频" : "文章"}~`), 1)) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
3659
3668
|
key: 1,
|
|
3660
3669
|
"infinite-scroll-immediate": false,
|
|
3661
3670
|
class: "insert-article_list",
|
|
3662
|
-
"infinite-scroll-disabled":
|
|
3671
|
+
"infinite-scroll-disabled": disable.value
|
|
3663
3672
|
}, [
|
|
3664
3673
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(data.data, (item, index) => {
|
|
3665
3674
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -3675,24 +3684,24 @@
|
|
|
3675
3684
|
default: vue.withCtx(() => {
|
|
3676
3685
|
var _a;
|
|
3677
3686
|
return [
|
|
3678
|
-
|
|
3679
|
-
vue.createElementVNode("div",
|
|
3687
|
+
isVideo.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
|
|
3688
|
+
vue.createElementVNode("div", _hoisted_7$1, [
|
|
3680
3689
|
vue.createElementVNode("img", {
|
|
3681
3690
|
class: "video-pic",
|
|
3682
3691
|
src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
|
|
3683
|
-
}, null, 8,
|
|
3692
|
+
}, null, 8, _hoisted_8$1),
|
|
3684
3693
|
vue.createElementVNode("img", {
|
|
3685
3694
|
class: "play",
|
|
3686
3695
|
src: getImageUrl("play.png")
|
|
3687
|
-
}, null, 8,
|
|
3696
|
+
}, null, 8, _hoisted_9$1)
|
|
3688
3697
|
]),
|
|
3689
|
-
vue.createElementVNode("div",
|
|
3690
|
-
vue.createElementVNode("span",
|
|
3691
|
-
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
3698
|
+
vue.createElementVNode("div", _hoisted_10$1, [
|
|
3699
|
+
vue.createElementVNode("span", _hoisted_11$1, vue.toDisplayString(item.content || "[无标题]"), 1),
|
|
3700
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
3692
3701
|
])
|
|
3693
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
3694
|
-
vue.createElementVNode("span", null, vue.toDisplayString(item.title || "[
|
|
3695
|
-
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
3702
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$1, [
|
|
3703
|
+
vue.createElementVNode("span", null, vue.toDisplayString(item.title || "[无标题]"), 1),
|
|
3704
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
3696
3705
|
]))
|
|
3697
3706
|
];
|
|
3698
3707
|
}),
|
|
@@ -3700,7 +3709,7 @@
|
|
|
3700
3709
|
}, 1032, ["modelValue", "label", "onChange"])
|
|
3701
3710
|
]);
|
|
3702
3711
|
}), 128))
|
|
3703
|
-
], 8,
|
|
3712
|
+
], 8, _hoisted_5$2)), [
|
|
3704
3713
|
[vue.unref(vInfiniteScroll), vue.unref(getArticleList)]
|
|
3705
3714
|
])
|
|
3706
3715
|
])
|
|
@@ -3710,6 +3719,7 @@
|
|
|
3710
3719
|
};
|
|
3711
3720
|
}
|
|
3712
3721
|
});
|
|
3722
|
+
const index_vue_vue_type_style_index_0_lang$4 = "";
|
|
3713
3723
|
let getRandomValues;
|
|
3714
3724
|
const rnds8 = new Uint8Array(16);
|
|
3715
3725
|
function rng() {
|
|
@@ -3726,7 +3736,7 @@
|
|
|
3726
3736
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
3727
3737
|
}
|
|
3728
3738
|
function unsafeStringify(arr, offset = 0) {
|
|
3729
|
-
return
|
|
3739
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
3730
3740
|
}
|
|
3731
3741
|
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3732
3742
|
const native = {
|
|
@@ -3749,15 +3759,14 @@
|
|
|
3749
3759
|
}
|
|
3750
3760
|
return unsafeStringify(rnds);
|
|
3751
3761
|
}
|
|
3752
|
-
const index_vue_vue_type_style_index_0_lang$3 = "";
|
|
3753
3762
|
const _hoisted_1$5 = { class: "img-upload-content" };
|
|
3754
|
-
const _hoisted_2$
|
|
3755
|
-
const _hoisted_3$
|
|
3756
|
-
const _hoisted_4$
|
|
3763
|
+
const _hoisted_2$2 = { class: "title-box" };
|
|
3764
|
+
const _hoisted_3$2 = ["onClick"];
|
|
3765
|
+
const _hoisted_4$1 = {
|
|
3757
3766
|
key: 0,
|
|
3758
3767
|
class: "line"
|
|
3759
3768
|
};
|
|
3760
|
-
const _hoisted_5$
|
|
3769
|
+
const _hoisted_5$1 = {
|
|
3761
3770
|
key: 0,
|
|
3762
3771
|
class: "prompt-restriction"
|
|
3763
3772
|
};
|
|
@@ -3781,45 +3790,39 @@
|
|
|
3781
3790
|
key: 0,
|
|
3782
3791
|
class: "upload-wrap"
|
|
3783
3792
|
};
|
|
3784
|
-
const _hoisted_14 =
|
|
3785
|
-
const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
|
|
3786
|
-
const _hoisted_16 = {
|
|
3793
|
+
const _hoisted_14 = {
|
|
3787
3794
|
key: 1,
|
|
3788
3795
|
class: "img-list"
|
|
3789
3796
|
};
|
|
3790
|
-
const
|
|
3791
|
-
const
|
|
3792
|
-
const
|
|
3797
|
+
const _hoisted_15 = ["src"];
|
|
3798
|
+
const _hoisted_16 = { class: "upload-btn" };
|
|
3799
|
+
const _hoisted_17 = {
|
|
3793
3800
|
key: 2,
|
|
3794
3801
|
class: "map-depot"
|
|
3795
3802
|
};
|
|
3796
|
-
const
|
|
3797
|
-
const
|
|
3798
|
-
const
|
|
3799
|
-
const
|
|
3800
|
-
const
|
|
3801
|
-
const _hoisted_25 = {
|
|
3803
|
+
const _hoisted_18 = { class: "screen" };
|
|
3804
|
+
const _hoisted_19 = { key: 0 };
|
|
3805
|
+
const _hoisted_20 = { class: "tab-box" };
|
|
3806
|
+
const _hoisted_21 = ["onClick"];
|
|
3807
|
+
const _hoisted_22 = {
|
|
3802
3808
|
key: 0,
|
|
3803
3809
|
class: "line"
|
|
3804
3810
|
};
|
|
3805
|
-
const
|
|
3806
|
-
const
|
|
3807
|
-
const
|
|
3808
|
-
const
|
|
3811
|
+
const _hoisted_23 = { class: "image-list depot-image" };
|
|
3812
|
+
const _hoisted_24 = ["onClick"];
|
|
3813
|
+
const _hoisted_25 = ["src"];
|
|
3814
|
+
const _hoisted_26 = {
|
|
3809
3815
|
key: 0,
|
|
3810
3816
|
class: "shade"
|
|
3811
3817
|
};
|
|
3812
|
-
const
|
|
3813
|
-
const
|
|
3818
|
+
const _hoisted_27 = { class: "num" };
|
|
3819
|
+
const _hoisted_28 = {
|
|
3814
3820
|
key: 1,
|
|
3815
3821
|
class: "protocol-box"
|
|
3816
3822
|
};
|
|
3817
|
-
const
|
|
3818
|
-
const _hoisted_33 = /* @__PURE__ */ vue.createTextVNode(" \u8BF7\u9605\u8BFB");
|
|
3819
|
-
const _hoisted_34 = ["href"];
|
|
3820
|
-
const _hoisted_35 = /* @__PURE__ */ vue.createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ");
|
|
3823
|
+
const _hoisted_29 = ["href"];
|
|
3821
3824
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
3822
|
-
|
|
3825
|
+
__name: "index",
|
|
3823
3826
|
props: {
|
|
3824
3827
|
visible: { type: Boolean, default: false },
|
|
3825
3828
|
imgList: { default: [] },
|
|
@@ -3828,7 +3831,8 @@
|
|
|
3828
3831
|
imgNum: { default: 20 }
|
|
3829
3832
|
},
|
|
3830
3833
|
emits: ["update:imgList", "update:visible", "submit"],
|
|
3831
|
-
setup(__props, { emit:
|
|
3834
|
+
setup(__props, { emit: __emit }) {
|
|
3835
|
+
const emits = __emit;
|
|
3832
3836
|
const props = __props;
|
|
3833
3837
|
const drag = vue.ref(false);
|
|
3834
3838
|
const imgListTemp = vue.computed({
|
|
@@ -3852,7 +3856,7 @@
|
|
|
3852
3856
|
const tempImgs = [...props.imgList];
|
|
3853
3857
|
Array.from(imgFile).forEach((file) => {
|
|
3854
3858
|
if (file.size > 20 * 1024 * 1024) {
|
|
3855
|
-
elementPlus.ElMessage.error("
|
|
3859
|
+
elementPlus.ElMessage.error("单张图片最大支持20M");
|
|
3856
3860
|
return;
|
|
3857
3861
|
}
|
|
3858
3862
|
const id = v4();
|
|
@@ -3882,14 +3886,14 @@
|
|
|
3882
3886
|
const list = [
|
|
3883
3887
|
{
|
|
3884
3888
|
id: 2,
|
|
3885
|
-
value: "
|
|
3889
|
+
value: "上传图片"
|
|
3886
3890
|
}
|
|
3887
3891
|
];
|
|
3888
3892
|
activeTitle.value = 2;
|
|
3889
3893
|
if (props.imgNum < 20) {
|
|
3890
3894
|
list.unshift({
|
|
3891
3895
|
id: 1,
|
|
3892
|
-
value: "
|
|
3896
|
+
value: "正文图片"
|
|
3893
3897
|
});
|
|
3894
3898
|
activeTitle.value = 1;
|
|
3895
3899
|
getContentImgList();
|
|
@@ -3897,7 +3901,7 @@
|
|
|
3897
3901
|
if (props.chartGallery) {
|
|
3898
3902
|
list.push({
|
|
3899
3903
|
id: 3,
|
|
3900
|
-
value: isEmotofine ? "
|
|
3904
|
+
value: isEmotofine ? "电摩范图库" : "摩托范图库"
|
|
3901
3905
|
});
|
|
3902
3906
|
}
|
|
3903
3907
|
titleList.value = list;
|
|
@@ -4042,13 +4046,13 @@
|
|
|
4042
4046
|
const tabList = vue.ref([]);
|
|
4043
4047
|
const search = () => {
|
|
4044
4048
|
if (!selectData.brandId) {
|
|
4045
|
-
return elementPlus.ElMessage.error("
|
|
4049
|
+
return elementPlus.ElMessage.error("请选择品牌");
|
|
4046
4050
|
}
|
|
4047
4051
|
if (!selectData.goodId) {
|
|
4048
|
-
return elementPlus.ElMessage.error("
|
|
4052
|
+
return elementPlus.ElMessage.error("请选择车型");
|
|
4049
4053
|
}
|
|
4050
4054
|
if (!selectData.carId) {
|
|
4051
|
-
return elementPlus.ElMessage.error("
|
|
4055
|
+
return elementPlus.ElMessage.error("请选择款型");
|
|
4052
4056
|
}
|
|
4053
4057
|
tabList.value = [];
|
|
4054
4058
|
emits("update:imgList", []);
|
|
@@ -4105,7 +4109,7 @@
|
|
|
4105
4109
|
}, {
|
|
4106
4110
|
default: vue.withCtx(() => [
|
|
4107
4111
|
vue.createElementVNode("div", _hoisted_1$5, [
|
|
4108
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4112
|
+
vue.createElementVNode("div", _hoisted_2$2, [
|
|
4109
4113
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(titleList.value, (item, index) => {
|
|
4110
4114
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4111
4115
|
key: index,
|
|
@@ -4113,15 +4117,15 @@
|
|
|
4113
4117
|
onClick: ($event) => changeTab(item)
|
|
4114
4118
|
}, [
|
|
4115
4119
|
vue.createTextVNode(vue.toDisplayString(item.value) + " ", 1),
|
|
4116
|
-
item.id === activeTitle.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
4117
|
-
], 10, _hoisted_3$
|
|
4120
|
+
item.id === activeTitle.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1)) : vue.createCommentVNode("", true)
|
|
4121
|
+
], 10, _hoisted_3$2);
|
|
4118
4122
|
}), 128)),
|
|
4119
|
-
[1, 3].includes(activeTitle.value) && props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
4120
|
-
activeTitle.value === 2 && props.imgList.length > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, vue.toDisplayString(props.imgList.length) + "
|
|
4123
|
+
[1, 3].includes(activeTitle.value) && props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, " 最多可选" + vue.toDisplayString(props.imgNum) + "张图片,已选" + vue.toDisplayString(props.imgList.length) + "张 ", 1)) : vue.createCommentVNode("", true),
|
|
4124
|
+
activeTitle.value === 2 && props.imgList.length > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, vue.toDisplayString(props.imgList.length) + "张上传成功 拖动可调整顺序 ", 1)) : vue.createCommentVNode("", true)
|
|
4121
4125
|
]),
|
|
4122
4126
|
activeTitle.value === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
4123
4127
|
vue.createElementVNode("div", _hoisted_8, [
|
|
4124
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
4128
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(contentImgList.value, (item, index) => {
|
|
4125
4129
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4126
4130
|
key: index,
|
|
4127
4131
|
class: "image-item",
|
|
@@ -4154,13 +4158,13 @@
|
|
|
4154
4158
|
]),
|
|
4155
4159
|
_: 1
|
|
4156
4160
|
}),
|
|
4157
|
-
|
|
4161
|
+
_cache[7] || (_cache[7] = vue.createElementVNode("span", null, "本地上传", -1))
|
|
4158
4162
|
]),
|
|
4159
|
-
|
|
4160
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
4161
|
-
vue.createVNode(vue.unref(
|
|
4162
|
-
modelValue:
|
|
4163
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
4163
|
+
_cache[8] || (_cache[8] = vue.createElementVNode("span", { class: "remark" }, "支持jpg、jpeg、png等多种格式,单张图片最大支持20MB", -1))
|
|
4164
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
4165
|
+
vue.createVNode(vue.unref(draggable), {
|
|
4166
|
+
modelValue: imgListTemp.value,
|
|
4167
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imgListTemp.value = $event),
|
|
4164
4168
|
handle: ".img-item",
|
|
4165
4169
|
class: "img-wrap",
|
|
4166
4170
|
group: "people",
|
|
@@ -4178,7 +4182,7 @@
|
|
|
4178
4182
|
style: { "object-fit": "contain" },
|
|
4179
4183
|
width: "120",
|
|
4180
4184
|
height: "120"
|
|
4181
|
-
}, null, 8,
|
|
4185
|
+
}, null, 8, _hoisted_15),
|
|
4182
4186
|
vue.createVNode(vue.unref(iconsVue.CircleCloseFilled), {
|
|
4183
4187
|
class: "icon pointer",
|
|
4184
4188
|
onClick: ($event) => deleteImg(element)
|
|
@@ -4201,7 +4205,7 @@
|
|
|
4201
4205
|
_: 1
|
|
4202
4206
|
}, 8, ["modelValue"])
|
|
4203
4207
|
])),
|
|
4204
|
-
vue.createElementVNode("div",
|
|
4208
|
+
vue.createElementVNode("div", _hoisted_16, [
|
|
4205
4209
|
vue.createElementVNode("input", {
|
|
4206
4210
|
type: "file",
|
|
4207
4211
|
name: "file",
|
|
@@ -4212,13 +4216,13 @@
|
|
|
4212
4216
|
}, null, 32)
|
|
4213
4217
|
])
|
|
4214
4218
|
], 2)) : vue.createCommentVNode("", true),
|
|
4215
|
-
activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div",
|
|
4216
|
-
vue.createElementVNode("div",
|
|
4219
|
+
activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
|
|
4220
|
+
vue.createElementVNode("div", _hoisted_18, [
|
|
4217
4221
|
vue.createElementVNode("div", null, [
|
|
4218
4222
|
vue.createVNode(vue.unref(elementPlus.ElSelect), {
|
|
4219
4223
|
modelValue: selectData.brandId,
|
|
4220
4224
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
|
|
4221
|
-
placeholder: "
|
|
4225
|
+
placeholder: "请选择品牌",
|
|
4222
4226
|
size: "large",
|
|
4223
4227
|
class: "select_1",
|
|
4224
4228
|
filterable: "",
|
|
@@ -4239,7 +4243,7 @@
|
|
|
4239
4243
|
vue.createVNode(vue.unref(elementPlus.ElSelect), {
|
|
4240
4244
|
modelValue: selectData.goodId,
|
|
4241
4245
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
|
|
4242
|
-
placeholder: "
|
|
4246
|
+
placeholder: "请选择车型",
|
|
4243
4247
|
size: "large",
|
|
4244
4248
|
class: "select_1",
|
|
4245
4249
|
filterable: "",
|
|
@@ -4260,7 +4264,7 @@
|
|
|
4260
4264
|
vue.createVNode(vue.unref(elementPlus.ElSelect), {
|
|
4261
4265
|
modelValue: selectData.carId,
|
|
4262
4266
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
|
|
4263
|
-
placeholder: "
|
|
4267
|
+
placeholder: "请选择款型",
|
|
4264
4268
|
size: "large",
|
|
4265
4269
|
class: "select_2",
|
|
4266
4270
|
filterable: "",
|
|
@@ -4284,14 +4288,14 @@
|
|
|
4284
4288
|
style: { "width": "80px" },
|
|
4285
4289
|
onClick: search
|
|
4286
4290
|
}, {
|
|
4287
|
-
default: vue.withCtx(() => [
|
|
4288
|
-
|
|
4289
|
-
]),
|
|
4291
|
+
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
4292
|
+
vue.createTextVNode("搜索")
|
|
4293
|
+
])),
|
|
4290
4294
|
_: 1
|
|
4291
4295
|
})
|
|
4292
4296
|
]),
|
|
4293
|
-
tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div",
|
|
4294
|
-
vue.createElementVNode("div",
|
|
4297
|
+
tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
|
|
4298
|
+
vue.createElementVNode("div", _hoisted_20, [
|
|
4295
4299
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabList.value, (item, index) => {
|
|
4296
4300
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4297
4301
|
key: index,
|
|
@@ -4299,12 +4303,12 @@
|
|
|
4299
4303
|
onClick: ($event) => activeTab.value = item.type
|
|
4300
4304
|
}, [
|
|
4301
4305
|
vue.createTextVNode(vue.toDisplayString(item.name) + " ", 1),
|
|
4302
|
-
item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
4303
|
-
], 10,
|
|
4306
|
+
item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22)) : vue.createCommentVNode("", true)
|
|
4307
|
+
], 10, _hoisted_21);
|
|
4304
4308
|
}), 128))
|
|
4305
4309
|
]),
|
|
4306
|
-
vue.createElementVNode("div",
|
|
4307
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
4310
|
+
vue.createElementVNode("div", _hoisted_23, [
|
|
4311
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(imageList.value, (item, index) => {
|
|
4308
4312
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4309
4313
|
key: index,
|
|
4310
4314
|
class: "image-item",
|
|
@@ -4314,25 +4318,25 @@
|
|
|
4314
4318
|
src: item.imgOrgUrl,
|
|
4315
4319
|
alt: "",
|
|
4316
4320
|
class: "image"
|
|
4317
|
-
}, null, 8,
|
|
4318
|
-
item.num ? (vue.openBlock(), vue.createElementBlock("div",
|
|
4319
|
-
vue.createElementVNode("div",
|
|
4321
|
+
}, null, 8, _hoisted_25),
|
|
4322
|
+
item.num ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, [
|
|
4323
|
+
vue.createElementVNode("div", _hoisted_27, vue.toDisplayString(item.num), 1)
|
|
4320
4324
|
])) : vue.createCommentVNode("", true)
|
|
4321
|
-
], 8,
|
|
4325
|
+
], 8, _hoisted_24);
|
|
4322
4326
|
}), 128))
|
|
4323
4327
|
])
|
|
4324
|
-
])) : (vue.openBlock(), vue.createElementBlock("div",
|
|
4328
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
|
|
4325
4329
|
vue.createElementVNode("div", null, [
|
|
4326
|
-
|
|
4330
|
+
_cache[12] || (_cache[12] = vue.createElementVNode("div", null, " 图库中的图片仅限下载摩托范以编辑发布文章使用,不得用于其他任何平台及用途 ", -1)),
|
|
4327
4331
|
vue.createElementVNode("div", null, [
|
|
4328
|
-
|
|
4332
|
+
_cache[10] || (_cache[10] = vue.createTextVNode(" 请阅读")),
|
|
4329
4333
|
vue.createElementVNode("a", {
|
|
4330
4334
|
href: `https://${vue.unref(hostName)}/about?type=imageLicenseAgreement`,
|
|
4331
4335
|
target: "_blank",
|
|
4332
4336
|
rel: "noopener noreferrer",
|
|
4333
4337
|
class: "link"
|
|
4334
|
-
}, "
|
|
4335
|
-
|
|
4338
|
+
}, "《摩托范图片许可使用协议》", 8, _hoisted_29),
|
|
4339
|
+
_cache[11] || (_cache[11] = vue.createTextVNode(",您的行为视为您已同意该协议。 "))
|
|
4336
4340
|
])
|
|
4337
4341
|
])
|
|
4338
4342
|
]))
|
|
@@ -4344,25 +4348,23 @@
|
|
|
4344
4348
|
};
|
|
4345
4349
|
}
|
|
4346
4350
|
});
|
|
4347
|
-
const index_vue_vue_type_style_index_0_lang$
|
|
4348
|
-
const _hoisted_1$4 =
|
|
4349
|
-
const _hoisted_2$3 = { class: "insert-video" };
|
|
4350
|
-
const _hoisted_3$3 = /* @__PURE__ */ vue.createTextVNode("\u9009\u62E9\u89C6\u9891");
|
|
4351
|
-
const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("span", { class: "remark" }, "\u4E3A\u4E86\u83B7\u5F97\u66F4\u9AD8\u7684\u63A8\u8350\u91CF\u548C\u70B9\u51FB\u91CF\uFF0C\u5EFA\u8BAE\u4E0A\u4F20720p\uFF081280*720\uFF09\u6216\u66F4\u9AD8\u5206\u8FA8\u7387\u7684\u89C6\u9891\uFF0C\u89C6\u9891\u683C\u5F0F\u4E3A.mp4\u6216.mov\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC71G", -1);
|
|
4351
|
+
const index_vue_vue_type_style_index_0_lang$3 = "";
|
|
4352
|
+
const _hoisted_1$4 = { class: "insert-video" };
|
|
4352
4353
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
4353
|
-
|
|
4354
|
+
__name: "index",
|
|
4354
4355
|
props: {
|
|
4355
4356
|
visible: { type: Boolean, default: false },
|
|
4356
|
-
fileSelected:
|
|
4357
|
+
fileSelected: {}
|
|
4357
4358
|
},
|
|
4358
4359
|
emits: ["update:visible"],
|
|
4359
|
-
setup(__props, { emit:
|
|
4360
|
-
const
|
|
4360
|
+
setup(__props, { emit: __emit }) {
|
|
4361
|
+
const emits = __emit;
|
|
4361
4362
|
vue.provide("vm", {
|
|
4362
4363
|
setStatus(val) {
|
|
4363
4364
|
emits("update:visible", val);
|
|
4364
4365
|
}
|
|
4365
4366
|
});
|
|
4367
|
+
const props = __props;
|
|
4366
4368
|
const { visible, fileSelected } = vue.toRefs(props);
|
|
4367
4369
|
const emitEvent = () => {
|
|
4368
4370
|
var event = new MouseEvent("click");
|
|
@@ -4376,23 +4378,23 @@
|
|
|
4376
4378
|
width: "600px",
|
|
4377
4379
|
height: "100px"
|
|
4378
4380
|
}, {
|
|
4379
|
-
title: vue.withCtx(() => [
|
|
4380
|
-
|
|
4381
|
-
]),
|
|
4381
|
+
title: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
4382
|
+
vue.createElementVNode("span", null, "插入视频", -1)
|
|
4383
|
+
])),
|
|
4382
4384
|
default: vue.withCtx(() => [
|
|
4383
|
-
vue.createElementVNode("div",
|
|
4385
|
+
vue.createElementVNode("div", _hoisted_1$4, [
|
|
4384
4386
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
4385
4387
|
style: { "width": "120px" },
|
|
4386
4388
|
round: "",
|
|
4387
4389
|
type: "primary",
|
|
4388
4390
|
onClick: emitEvent
|
|
4389
4391
|
}, {
|
|
4390
|
-
default: vue.withCtx(() => [
|
|
4391
|
-
|
|
4392
|
-
]),
|
|
4392
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
4393
|
+
vue.createTextVNode("选择视频")
|
|
4394
|
+
])),
|
|
4393
4395
|
_: 1
|
|
4394
4396
|
}),
|
|
4395
|
-
|
|
4397
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "remark" }, "为了获得更高的推荐量和点击量,建议上传720p(1280*720)或更高分辨率的视频,视频格式为.mp4或.mov,大小不超过1G", -1)),
|
|
4396
4398
|
vue.createElementVNode("input", {
|
|
4397
4399
|
type: "file",
|
|
4398
4400
|
accept: "video/*",
|
|
@@ -4407,14 +4409,17 @@
|
|
|
4407
4409
|
};
|
|
4408
4410
|
}
|
|
4409
4411
|
});
|
|
4412
|
+
const index_vue_vue_type_style_index_0_lang$2 = "";
|
|
4410
4413
|
const index_vue_vue_type_style_index_0_lang$1 = "";
|
|
4411
4414
|
const _sfc_main$3 = {
|
|
4412
4415
|
name: "TopicManager",
|
|
4413
4416
|
props: {
|
|
4417
|
+
// 编辑器DOM引用
|
|
4414
4418
|
editorDom: {
|
|
4415
4419
|
type: Object,
|
|
4416
4420
|
default: null
|
|
4417
4421
|
},
|
|
4422
|
+
// 话题API请求方法
|
|
4418
4423
|
request: {
|
|
4419
4424
|
type: Object,
|
|
4420
4425
|
default: null
|
|
@@ -4422,10 +4427,13 @@
|
|
|
4422
4427
|
},
|
|
4423
4428
|
data() {
|
|
4424
4429
|
return {
|
|
4430
|
+
// 话题弹框相关数据
|
|
4425
4431
|
topicPopover: {
|
|
4426
4432
|
visible: false,
|
|
4427
4433
|
type: "hot",
|
|
4434
|
+
// 'hot' 热门话题, 'search' 搜索话题
|
|
4428
4435
|
activeTab: "hot",
|
|
4436
|
+
// 'hot' 热门话题, 'recent' 最近使用
|
|
4429
4437
|
position: { top: 0, left: 0 },
|
|
4430
4438
|
searchKeyword: "",
|
|
4431
4439
|
hotTopics: [],
|
|
@@ -4436,22 +4444,28 @@
|
|
|
4436
4444
|
hasMore: true,
|
|
4437
4445
|
searchPage: 1,
|
|
4438
4446
|
searchHasMore: true,
|
|
4447
|
+
// 用于增量更新的计数器
|
|
4439
4448
|
newHotTopicsCount: 0,
|
|
4440
4449
|
newSearchTopicsCount: 0,
|
|
4450
|
+
// 保存原始的selection和range信息
|
|
4441
4451
|
originalRange: null,
|
|
4442
4452
|
originalSelection: null,
|
|
4453
|
+
// 保存触发位置信息
|
|
4443
4454
|
triggerInfo: {
|
|
4444
4455
|
paragraph: null,
|
|
4445
4456
|
hashIndex: -1,
|
|
4446
4457
|
cursorPosition: 0
|
|
4447
4458
|
},
|
|
4459
|
+
// 全局弹框DOM引用
|
|
4448
4460
|
globalContainer: null,
|
|
4449
4461
|
globalMask: null
|
|
4450
4462
|
},
|
|
4463
|
+
// 中文输入法状态
|
|
4451
4464
|
isComposing: false
|
|
4452
4465
|
};
|
|
4453
4466
|
},
|
|
4454
4467
|
methods: {
|
|
4468
|
+
// 初始化话题管理器
|
|
4455
4469
|
init() {
|
|
4456
4470
|
if (!this.editorDom) {
|
|
4457
4471
|
console.warn("TopicManager: editorDom is required");
|
|
@@ -4459,6 +4473,7 @@
|
|
|
4459
4473
|
}
|
|
4460
4474
|
setTimeout(() => this.bindEditorEvents(), 0);
|
|
4461
4475
|
},
|
|
4476
|
+
// 绑定编辑器事件
|
|
4462
4477
|
bindEditorEvents() {
|
|
4463
4478
|
if (!this.editorDom)
|
|
4464
4479
|
return;
|
|
@@ -4467,6 +4482,7 @@
|
|
|
4467
4482
|
this.editorDom.addEventListener("compositionend", this.handleCompositionEnd.bind(this));
|
|
4468
4483
|
this.editorDom.addEventListener("input", this.handleInput.bind(this));
|
|
4469
4484
|
},
|
|
4485
|
+
// 解绑编辑器事件
|
|
4470
4486
|
unbindEditorEvents() {
|
|
4471
4487
|
if (!this.editorDom)
|
|
4472
4488
|
return;
|
|
@@ -4475,15 +4491,18 @@
|
|
|
4475
4491
|
this.editorDom.removeEventListener("compositionend", this.handleCompositionEnd.bind(this));
|
|
4476
4492
|
this.editorDom.removeEventListener("input", this.handleInput.bind(this));
|
|
4477
4493
|
},
|
|
4494
|
+
// 中文输入法开始事件
|
|
4478
4495
|
handleCompositionStart() {
|
|
4479
4496
|
this.isComposing = true;
|
|
4480
4497
|
},
|
|
4498
|
+
// 中文输入法结束事件(中文)
|
|
4481
4499
|
handleCompositionEnd() {
|
|
4482
4500
|
this.isComposing = false;
|
|
4483
4501
|
setTimeout(() => {
|
|
4484
4502
|
this.handleInputChange();
|
|
4485
4503
|
}, 10);
|
|
4486
4504
|
},
|
|
4505
|
+
// input事件处理(英文)
|
|
4487
4506
|
handleInput() {
|
|
4488
4507
|
if (!this.isComposing) {
|
|
4489
4508
|
setTimeout(() => {
|
|
@@ -4491,6 +4510,7 @@
|
|
|
4491
4510
|
}, 10);
|
|
4492
4511
|
}
|
|
4493
4512
|
},
|
|
4513
|
+
// 处理输入变化
|
|
4494
4514
|
handleInputChange() {
|
|
4495
4515
|
var _a;
|
|
4496
4516
|
const selection = window.getSelection();
|
|
@@ -4518,6 +4538,7 @@
|
|
|
4518
4538
|
return;
|
|
4519
4539
|
this.checkAndTriggerSearch(paragraph);
|
|
4520
4540
|
},
|
|
4541
|
+
// 话题输入处理
|
|
4521
4542
|
handleTopicInput(event) {
|
|
4522
4543
|
var _a;
|
|
4523
4544
|
const activeElement = document.activeElement;
|
|
@@ -4558,7 +4579,9 @@
|
|
|
4558
4579
|
const triggerInfo = {
|
|
4559
4580
|
paragraph,
|
|
4560
4581
|
hashIndex: cursorPosition,
|
|
4582
|
+
// #号的位置
|
|
4561
4583
|
cursorPosition: cursorPosition + 1
|
|
4584
|
+
// #号后的位置
|
|
4562
4585
|
};
|
|
4563
4586
|
this.showTopicPopover("hot", position, "", triggerInfo);
|
|
4564
4587
|
}, 10);
|
|
@@ -4654,6 +4677,7 @@
|
|
|
4654
4677
|
tempElement.remove();
|
|
4655
4678
|
const position = {
|
|
4656
4679
|
top: rect.bottom,
|
|
4680
|
+
// 弹框显示在光标下方
|
|
4657
4681
|
left: rect.left
|
|
4658
4682
|
};
|
|
4659
4683
|
const viewportWidth = window.innerWidth;
|
|
@@ -4671,7 +4695,7 @@
|
|
|
4671
4695
|
}
|
|
4672
4696
|
return position;
|
|
4673
4697
|
} catch (error) {
|
|
4674
|
-
console.warn("
|
|
4698
|
+
console.warn("获取光标位置失败,使用fallback方法:", error);
|
|
4675
4699
|
const rect = range.getBoundingClientRect();
|
|
4676
4700
|
return {
|
|
4677
4701
|
top: rect.bottom,
|
|
@@ -4679,9 +4703,10 @@
|
|
|
4679
4703
|
};
|
|
4680
4704
|
}
|
|
4681
4705
|
},
|
|
4706
|
+
// 话题弹框相关方法
|
|
4682
4707
|
showTopicPopover(type, position, searchKeyword = "", triggerInfo = null) {
|
|
4683
4708
|
if (!this.request || !this.request.getTopic) {
|
|
4684
|
-
console.warn("
|
|
4709
|
+
console.warn("话题功能需要提供 request.getTopic 方法");
|
|
4685
4710
|
return;
|
|
4686
4711
|
}
|
|
4687
4712
|
const selection = window.getSelection();
|
|
@@ -4754,11 +4779,11 @@
|
|
|
4754
4779
|
}
|
|
4755
4780
|
}
|
|
4756
4781
|
} else {
|
|
4757
|
-
console.warn("
|
|
4782
|
+
console.warn("加载热门话题失败:", response);
|
|
4758
4783
|
this.topicPopover.hasMore = false;
|
|
4759
4784
|
}
|
|
4760
4785
|
} catch (error) {
|
|
4761
|
-
console.error("
|
|
4786
|
+
console.error("加载热门话题失败:", error);
|
|
4762
4787
|
this.topicPopover.hasMore = false;
|
|
4763
4788
|
} finally {
|
|
4764
4789
|
this.topicPopover.loading = false;
|
|
@@ -4792,17 +4817,18 @@
|
|
|
4792
4817
|
this.topicPopover.searchHasMore = topics.length >= 50;
|
|
4793
4818
|
}
|
|
4794
4819
|
} else {
|
|
4795
|
-
console.warn("
|
|
4820
|
+
console.warn("搜索话题失败:", response);
|
|
4796
4821
|
this.topicPopover.searchHasMore = false;
|
|
4797
4822
|
}
|
|
4798
4823
|
} catch (error) {
|
|
4799
|
-
console.error("
|
|
4824
|
+
console.error("搜索话题失败:", error);
|
|
4800
4825
|
this.topicPopover.searchHasMore = false;
|
|
4801
4826
|
} finally {
|
|
4802
4827
|
this.topicPopover.loading = false;
|
|
4803
4828
|
this.updateGlobalTopicPopover();
|
|
4804
4829
|
}
|
|
4805
4830
|
},
|
|
4831
|
+
// 加载更多搜索话题
|
|
4806
4832
|
async loadSearchTopics() {
|
|
4807
4833
|
if (this.topicPopover.loading || !this.topicPopover.searchHasMore)
|
|
4808
4834
|
return;
|
|
@@ -4830,11 +4856,11 @@
|
|
|
4830
4856
|
}
|
|
4831
4857
|
}
|
|
4832
4858
|
} else {
|
|
4833
|
-
console.warn("
|
|
4859
|
+
console.warn("加载更多搜索话题失败:", response);
|
|
4834
4860
|
this.topicPopover.searchHasMore = false;
|
|
4835
4861
|
}
|
|
4836
4862
|
} catch (error) {
|
|
4837
|
-
console.error("
|
|
4863
|
+
console.error("加载更多搜索话题失败:", error);
|
|
4838
4864
|
this.topicPopover.searchHasMore = false;
|
|
4839
4865
|
} finally {
|
|
4840
4866
|
this.topicPopover.loading = false;
|
|
@@ -4846,7 +4872,7 @@
|
|
|
4846
4872
|
const localTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
|
|
4847
4873
|
this.topicPopover.recentTopics = localTopics;
|
|
4848
4874
|
} catch (error) {
|
|
4849
|
-
console.error("
|
|
4875
|
+
console.error("加载最近使用话题失败:", error);
|
|
4850
4876
|
this.topicPopover.recentTopics = [];
|
|
4851
4877
|
}
|
|
4852
4878
|
},
|
|
@@ -4866,9 +4892,10 @@
|
|
|
4866
4892
|
}
|
|
4867
4893
|
localStorage.setItem("localTopic", JSON.stringify(recentTopics));
|
|
4868
4894
|
} catch (error) {
|
|
4869
|
-
console.error("
|
|
4895
|
+
console.error("保存最近使用话题失败:", error);
|
|
4870
4896
|
}
|
|
4871
4897
|
},
|
|
4898
|
+
// 创建全局话题弹框
|
|
4872
4899
|
createGlobalTopicPopover() {
|
|
4873
4900
|
this.removeGlobalTopicPopover();
|
|
4874
4901
|
const mask = document.createElement("div");
|
|
@@ -4892,6 +4919,7 @@
|
|
|
4892
4919
|
this.topicPopover.globalContainer = container;
|
|
4893
4920
|
this.bindTopicPopoverEvents();
|
|
4894
4921
|
},
|
|
4922
|
+
// 移除全局话题弹框
|
|
4895
4923
|
removeGlobalTopicPopover() {
|
|
4896
4924
|
if (this.topicPopover.globalMask) {
|
|
4897
4925
|
document.body.removeChild(this.topicPopover.globalMask);
|
|
@@ -4902,12 +4930,14 @@
|
|
|
4902
4930
|
this.topicPopover.globalContainer = null;
|
|
4903
4931
|
}
|
|
4904
4932
|
},
|
|
4933
|
+
// 更新全局话题弹框内容
|
|
4905
4934
|
updateGlobalTopicPopover() {
|
|
4906
4935
|
if (!this.topicPopover.globalContainer)
|
|
4907
4936
|
return;
|
|
4908
4937
|
this.topicPopover.globalContainer.innerHTML = this.createTopicPopoverContent();
|
|
4909
4938
|
this.bindTopicPopoverEvents();
|
|
4910
4939
|
},
|
|
4940
|
+
// 增量添加热门话题到DOM,避免重绘
|
|
4911
4941
|
appendHotTopicsToDOM() {
|
|
4912
4942
|
if (!this.topicPopover.globalContainer || this.topicPopover.newHotTopicsCount === 0)
|
|
4913
4943
|
return;
|
|
@@ -4930,6 +4960,7 @@
|
|
|
4930
4960
|
this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.hasMore);
|
|
4931
4961
|
this.topicPopover.newHotTopicsCount = 0;
|
|
4932
4962
|
},
|
|
4963
|
+
// 增量添加搜索话题到DOM,避免重绘
|
|
4933
4964
|
appendSearchTopicsToDOM() {
|
|
4934
4965
|
if (!this.topicPopover.globalContainer || this.topicPopover.newSearchTopicsCount === 0)
|
|
4935
4966
|
return;
|
|
@@ -4952,6 +4983,7 @@
|
|
|
4952
4983
|
this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.searchHasMore);
|
|
4953
4984
|
this.topicPopover.newSearchTopicsCount = 0;
|
|
4954
4985
|
},
|
|
4986
|
+
// 更新加载状态显示
|
|
4955
4987
|
updateLoadingState(topicList, loading, hasMore) {
|
|
4956
4988
|
const existingLoading = topicList.querySelector(".topic-loading");
|
|
4957
4989
|
const existingEmpty = topicList.querySelector(".topic-empty");
|
|
@@ -4962,15 +4994,16 @@
|
|
|
4962
4994
|
if (loading) {
|
|
4963
4995
|
const loadingElement = document.createElement("div");
|
|
4964
4996
|
loadingElement.className = "topic-loading";
|
|
4965
|
-
loadingElement.textContent = "
|
|
4997
|
+
loadingElement.textContent = "加载更多...";
|
|
4966
4998
|
topicList.appendChild(loadingElement);
|
|
4967
4999
|
} else if (!hasMore) {
|
|
4968
5000
|
const emptyElement = document.createElement("div");
|
|
4969
5001
|
emptyElement.className = "topic-empty";
|
|
4970
|
-
emptyElement.textContent = "
|
|
5002
|
+
emptyElement.textContent = "没有更多了";
|
|
4971
5003
|
topicList.appendChild(emptyElement);
|
|
4972
5004
|
}
|
|
4973
5005
|
},
|
|
5006
|
+
// 创建话题弹框内容
|
|
4974
5007
|
createTopicPopoverContent() {
|
|
4975
5008
|
if (this.topicPopover.type === "hot") {
|
|
4976
5009
|
return this.getHotTopicPopoverHTML();
|
|
@@ -4979,6 +5012,7 @@
|
|
|
4979
5012
|
}
|
|
4980
5013
|
return "";
|
|
4981
5014
|
},
|
|
5015
|
+
// 获取热门话题弹框HTML
|
|
4982
5016
|
getHotTopicPopoverHTML() {
|
|
4983
5017
|
const activeTab = this.topicPopover.activeTab;
|
|
4984
5018
|
const hotTopics = this.topicPopover.hotTopics;
|
|
@@ -4988,22 +5022,22 @@
|
|
|
4988
5022
|
let topicListHTML = "";
|
|
4989
5023
|
if (activeTab === "hot") {
|
|
4990
5024
|
if (loading && hotTopics.length === 0) {
|
|
4991
|
-
topicListHTML = '<div class="topic-loading"
|
|
5025
|
+
topicListHTML = '<div class="topic-loading">加载中...</div>';
|
|
4992
5026
|
} else if (hotTopics.length === 0) {
|
|
4993
|
-
topicListHTML = '<div class="topic-empty"
|
|
5027
|
+
topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
|
|
4994
5028
|
} else {
|
|
4995
5029
|
topicListHTML = hotTopics.map(
|
|
4996
5030
|
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
4997
5031
|
).join("");
|
|
4998
5032
|
if (loading) {
|
|
4999
|
-
topicListHTML += '<div class="topic-loading"
|
|
5033
|
+
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
5000
5034
|
} else if (!hasMore) {
|
|
5001
|
-
topicListHTML += '<div class="topic-empty"
|
|
5035
|
+
topicListHTML += '<div class="topic-empty">没有更多了</div>';
|
|
5002
5036
|
}
|
|
5003
5037
|
}
|
|
5004
5038
|
} else {
|
|
5005
5039
|
if (recentTopics.length === 0) {
|
|
5006
|
-
topicListHTML = '<div class="topic-empty"
|
|
5040
|
+
topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
|
|
5007
5041
|
} else {
|
|
5008
5042
|
topicListHTML = recentTopics.map(
|
|
5009
5043
|
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
@@ -5014,10 +5048,10 @@
|
|
|
5014
5048
|
<div class="topic-popover-content">
|
|
5015
5049
|
<div class="topic-tabs">
|
|
5016
5050
|
<div class="topic-tab ${activeTab === "hot" ? "active" : ""}" data-tab="hot">
|
|
5017
|
-
|
|
5051
|
+
热门话题
|
|
5018
5052
|
</div>
|
|
5019
5053
|
<div class="topic-tab ${activeTab === "recent" ? "active" : ""}" data-tab="recent">
|
|
5020
|
-
|
|
5054
|
+
最近使用
|
|
5021
5055
|
</div>
|
|
5022
5056
|
</div>
|
|
5023
5057
|
<div class="topic-list-container">
|
|
@@ -5028,6 +5062,7 @@
|
|
|
5028
5062
|
</div>
|
|
5029
5063
|
`;
|
|
5030
5064
|
},
|
|
5065
|
+
// 获取搜索话题弹框HTML
|
|
5031
5066
|
getSearchTopicPopoverHTML() {
|
|
5032
5067
|
const searchKeyword = this.topicPopover.searchKeyword;
|
|
5033
5068
|
const searchTopics = this.topicPopover.searchTopics;
|
|
@@ -5035,17 +5070,17 @@
|
|
|
5035
5070
|
const searchHasMore = this.topicPopover.searchHasMore;
|
|
5036
5071
|
let topicListHTML = "";
|
|
5037
5072
|
if (loading && searchTopics.length === 0) {
|
|
5038
|
-
topicListHTML = '<div class="topic-loading"
|
|
5073
|
+
topicListHTML = '<div class="topic-loading">搜索中...</div>';
|
|
5039
5074
|
} else if (searchTopics.length === 0) {
|
|
5040
|
-
topicListHTML = '<div class="topic-empty"
|
|
5075
|
+
topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
|
|
5041
5076
|
} else {
|
|
5042
5077
|
topicListHTML = searchTopics.map(
|
|
5043
5078
|
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5044
5079
|
).join("");
|
|
5045
5080
|
if (loading) {
|
|
5046
|
-
topicListHTML += '<div class="topic-loading"
|
|
5081
|
+
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
5047
5082
|
} else if (!searchHasMore) {
|
|
5048
|
-
topicListHTML += '<div class="topic-empty"
|
|
5083
|
+
topicListHTML += '<div class="topic-empty">没有更多了</div>';
|
|
5049
5084
|
}
|
|
5050
5085
|
}
|
|
5051
5086
|
return `
|
|
@@ -5061,6 +5096,7 @@
|
|
|
5061
5096
|
</div>
|
|
5062
5097
|
`;
|
|
5063
5098
|
},
|
|
5099
|
+
// 绑定话题弹框事件
|
|
5064
5100
|
bindTopicPopoverEvents() {
|
|
5065
5101
|
if (!this.topicPopover.globalContainer)
|
|
5066
5102
|
return;
|
|
@@ -5092,6 +5128,7 @@
|
|
|
5092
5128
|
});
|
|
5093
5129
|
}
|
|
5094
5130
|
},
|
|
5131
|
+
// 根据ID查找话题
|
|
5095
5132
|
findTopicById(topicId) {
|
|
5096
5133
|
let topic = this.topicPopover.hotTopics.find((t) => t.id === topicId);
|
|
5097
5134
|
if (topic)
|
|
@@ -5208,15 +5245,17 @@
|
|
|
5208
5245
|
const topicElement = document.createElement("mdd-topic");
|
|
5209
5246
|
topicElement.setAttribute("data-topic", JSON.stringify({
|
|
5210
5247
|
topicId: topic.id,
|
|
5211
|
-
topicType: 0,
|
|
5248
|
+
topicType: topic.type || 0,
|
|
5212
5249
|
startIndex: 0,
|
|
5250
|
+
// 会在updateTopicPosition中更新
|
|
5213
5251
|
endIndex: 0
|
|
5252
|
+
// 会在updateTopicPosition中更新
|
|
5214
5253
|
}));
|
|
5215
5254
|
topicElement.textContent = topicText;
|
|
5216
5255
|
topicElement.setAttribute("contenteditable", "false");
|
|
5217
5256
|
range.deleteContents();
|
|
5218
5257
|
range.insertNode(topicElement);
|
|
5219
|
-
const spaceNode = document.createTextNode("
|
|
5258
|
+
const spaceNode = document.createTextNode(" ");
|
|
5220
5259
|
range.setStartAfter(topicElement);
|
|
5221
5260
|
range.insertNode(spaceNode);
|
|
5222
5261
|
const newRange = document.createRange();
|
|
@@ -5240,6 +5279,7 @@
|
|
|
5240
5279
|
}, 0);
|
|
5241
5280
|
this.$emit("update-topic-position");
|
|
5242
5281
|
},
|
|
5282
|
+
// 销毁话题管理器
|
|
5243
5283
|
destroy() {
|
|
5244
5284
|
this.unbindEditorEvents();
|
|
5245
5285
|
this.hideTopicPopover();
|
|
@@ -5267,7 +5307,7 @@
|
|
|
5267
5307
|
components: {
|
|
5268
5308
|
ElInput: elementPlus.ElInput,
|
|
5269
5309
|
BasicDialog: _sfc_main$7,
|
|
5270
|
-
draggable
|
|
5310
|
+
draggable
|
|
5271
5311
|
},
|
|
5272
5312
|
props: {
|
|
5273
5313
|
visible: {
|
|
@@ -5308,14 +5348,12 @@
|
|
|
5308
5348
|
setStatus(val) {
|
|
5309
5349
|
this.$emit("update:visible", val);
|
|
5310
5350
|
}
|
|
5351
|
+
// submit() {
|
|
5352
|
+
// this.$emit('submit')
|
|
5353
|
+
// }
|
|
5311
5354
|
}
|
|
5312
5355
|
};
|
|
5313
|
-
const _hoisted_1$2 =
|
|
5314
|
-
/* @__PURE__ */ vue.createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
|
|
5315
|
-
/* @__PURE__ */ vue.createElementVNode("span", { class: "collect-article_lable" }, "\u5982\u9700\u83B7\u5F97\u6B63\u5F0F\u4F7F\u7528\u6743\uFF0C\u8BF7\u81EA\u884C\u8054\u7CFB\u7248\u6743\u6240\u6709\u8005")
|
|
5316
|
-
], -1);
|
|
5317
|
-
const _hoisted_2$2 = { class: "collect-article_content" };
|
|
5318
|
-
const _hoisted_3$2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "tip" }, "\u8BF7\u628A\u9700\u8981\u91C7\u96C6\u7684\u6587\u7AE0\u94FE\u63A5\u7C98\u8D34\u5728\u4E0B\u65B9\u7684\u8F93\u5165\u6846\uFF1A", -1);
|
|
5356
|
+
const _hoisted_1$2 = { class: "collect-article_content" };
|
|
5319
5357
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5320
5358
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
5321
5359
|
const _component_BasicDialog = vue.resolveComponent("BasicDialog");
|
|
@@ -5324,16 +5362,19 @@
|
|
|
5324
5362
|
width: "600px",
|
|
5325
5363
|
height: "50px"
|
|
5326
5364
|
}, {
|
|
5327
|
-
title: vue.withCtx(() => [
|
|
5328
|
-
|
|
5329
|
-
|
|
5365
|
+
title: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
5366
|
+
vue.createElementVNode("div", null, [
|
|
5367
|
+
vue.createElementVNode("span", null, "采集文章"),
|
|
5368
|
+
vue.createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
|
|
5369
|
+
], -1)
|
|
5370
|
+
])),
|
|
5330
5371
|
default: vue.withCtx(() => [
|
|
5331
|
-
vue.createElementVNode("div",
|
|
5332
|
-
|
|
5372
|
+
vue.createElementVNode("div", _hoisted_1$2, [
|
|
5373
|
+
_cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
|
|
5333
5374
|
vue.createVNode(_component_el_input, {
|
|
5334
5375
|
modelValue: $options.input,
|
|
5335
5376
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
|
|
5336
|
-
placeholder: "
|
|
5377
|
+
placeholder: "仅支持微信链接"
|
|
5337
5378
|
}, null, 8, ["modelValue"])
|
|
5338
5379
|
])
|
|
5339
5380
|
]),
|
|
@@ -5341,7 +5382,7 @@
|
|
|
5341
5382
|
}, 8, ["visible"]);
|
|
5342
5383
|
}
|
|
5343
5384
|
const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
5344
|
-
const
|
|
5385
|
+
const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
|
|
5345
5386
|
const _sfc_main$1 = {
|
|
5346
5387
|
components: {
|
|
5347
5388
|
ElIconError: iconsVue.CircleCloseFilled
|
|
@@ -5372,8 +5413,8 @@
|
|
|
5372
5413
|
};
|
|
5373
5414
|
const _hoisted_2$1 = ["src"];
|
|
5374
5415
|
const _hoisted_3$1 = { class: "article-item_right" };
|
|
5375
|
-
const _hoisted_4
|
|
5376
|
-
const _hoisted_5
|
|
5416
|
+
const _hoisted_4 = { class: "name" };
|
|
5417
|
+
const _hoisted_5 = { class: "score" };
|
|
5377
5418
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5378
5419
|
const _component_el_icon_error = vue.resolveComponent("el-icon-error");
|
|
5379
5420
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
@@ -5383,11 +5424,11 @@
|
|
|
5383
5424
|
alt: ""
|
|
5384
5425
|
}, null, 8, _hoisted_2$1)) : vue.createCommentVNode("", true),
|
|
5385
5426
|
vue.createElementVNode("div", _hoisted_3$1, [
|
|
5386
|
-
vue.createElementVNode("div", _hoisted_4
|
|
5387
|
-
vue.createElementVNode("div", _hoisted_5
|
|
5427
|
+
vue.createElementVNode("div", _hoisted_4, vue.toDisplayString($props.article.title), 1),
|
|
5428
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
5388
5429
|
vue.createElementVNode("span", null, vue.toDisplayString($props.article.author), 1),
|
|
5389
|
-
vue.createElementVNode("span", null, vue.toDisplayString($props.article.viewNum) + "
|
|
5390
|
-
vue.createElementVNode("span", null, vue.toDisplayString($props.article.replycnt) + "
|
|
5430
|
+
vue.createElementVNode("span", null, vue.toDisplayString($props.article.viewNum) + "浏览", 1),
|
|
5431
|
+
vue.createElementVNode("span", null, vue.toDisplayString($props.article.replycnt) + "评论", 1)
|
|
5391
5432
|
])
|
|
5392
5433
|
]),
|
|
5393
5434
|
vue.createVNode(_component_el_icon_error, {
|
|
@@ -5399,10 +5440,10 @@
|
|
|
5399
5440
|
class: vue.normalizeClass([{
|
|
5400
5441
|
"article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
|
|
5401
5442
|
}, "article-bg"])
|
|
5402
|
-
}, "
|
|
5443
|
+
}, " 平台仅支持展示18个月的推荐内容 ", 2)) : vue.createCommentVNode("", true)
|
|
5403
5444
|
]);
|
|
5404
5445
|
}
|
|
5405
|
-
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
5446
|
+
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
|
|
5406
5447
|
const mountArticleDom = (props, del) => {
|
|
5407
5448
|
const className = "article-wrap";
|
|
5408
5449
|
const article = props.article;
|
|
@@ -5462,6 +5503,7 @@
|
|
|
5462
5503
|
hasArticleCard: false,
|
|
5463
5504
|
cursorStyle: "auto",
|
|
5464
5505
|
titleCount: 0,
|
|
5506
|
+
// 标题数量
|
|
5465
5507
|
viewLinkDialog: false,
|
|
5466
5508
|
linkForm: {
|
|
5467
5509
|
linkAddress: "",
|
|
@@ -5469,39 +5511,54 @@
|
|
|
5469
5511
|
},
|
|
5470
5512
|
setAlignFlag: true,
|
|
5471
5513
|
article: {},
|
|
5514
|
+
// 插入的文章
|
|
5472
5515
|
imgList: [],
|
|
5473
5516
|
imgNum: 20,
|
|
5474
5517
|
videoList: [],
|
|
5475
5518
|
visibleVideo: false,
|
|
5476
5519
|
visibleCollectArticle: false,
|
|
5477
5520
|
visibleArticle: false,
|
|
5521
|
+
// 插入文章
|
|
5478
5522
|
visibleImg: false,
|
|
5523
|
+
// 插入图片
|
|
5479
5524
|
imgType: "normal",
|
|
5525
|
+
//
|
|
5480
5526
|
typeEnum: {
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5527
|
+
文字: "1",
|
|
5528
|
+
图片: "2",
|
|
5529
|
+
图文: "3",
|
|
5530
|
+
段落标题: "4",
|
|
5531
|
+
关联: "5",
|
|
5532
|
+
// 关联车辆、轨迹、活动、商家、话题
|
|
5533
|
+
单视频: "6",
|
|
5534
|
+
视频文字: "7",
|
|
5488
5535
|
URL: "8",
|
|
5489
|
-
|
|
5536
|
+
文章卡片: "11"
|
|
5490
5537
|
},
|
|
5491
5538
|
fontInfo: {
|
|
5492
5539
|
size: ""
|
|
5493
5540
|
},
|
|
5494
5541
|
user: {},
|
|
5542
|
+
// 用户
|
|
5495
5543
|
editor: {},
|
|
5544
|
+
// 编辑器实例对象
|
|
5496
5545
|
editorDom: {},
|
|
5546
|
+
// 编辑器Dom
|
|
5497
5547
|
uploadStore: {},
|
|
5548
|
+
// 待上传的图片池
|
|
5498
5549
|
linkContent: "",
|
|
5550
|
+
// 插入链接的地址
|
|
5499
5551
|
loadingText: "",
|
|
5552
|
+
// loaing的提示文字
|
|
5500
5553
|
progressPercent: "",
|
|
5554
|
+
// 上传进度
|
|
5501
5555
|
currentIndex: 0,
|
|
5502
5556
|
loading: false,
|
|
5557
|
+
// 是否提交中
|
|
5503
5558
|
viewStatus: false,
|
|
5559
|
+
// todo: 改名
|
|
5504
5560
|
linkStatus: false,
|
|
5561
|
+
// todo: 改名
|
|
5505
5562
|
styleStatus: {
|
|
5506
5563
|
bold: false,
|
|
5507
5564
|
italic: false,
|
|
@@ -5525,6 +5582,7 @@
|
|
|
5525
5582
|
targetMove: "",
|
|
5526
5583
|
moverClasses: ["halo-img-content", "halo-video-content"],
|
|
5527
5584
|
selectDom: null
|
|
5585
|
+
//选中的dom
|
|
5528
5586
|
};
|
|
5529
5587
|
},
|
|
5530
5588
|
computed: {
|
|
@@ -5541,12 +5599,12 @@
|
|
|
5541
5599
|
watch: {
|
|
5542
5600
|
progressPercent(val) {
|
|
5543
5601
|
const inner = document.querySelector(".video-progress .inner");
|
|
5544
|
-
console.log(val, "
|
|
5602
|
+
console.log(val, "视频上传进度");
|
|
5545
5603
|
if (inner) {
|
|
5546
5604
|
inner.style.width = val + "%";
|
|
5547
5605
|
if (val === 100) {
|
|
5548
5606
|
document.querySelector(".video-progress").innerHTML = `
|
|
5549
|
-
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;"
|
|
5607
|
+
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
|
|
5550
5608
|
`;
|
|
5551
5609
|
}
|
|
5552
5610
|
}
|
|
@@ -5565,7 +5623,7 @@
|
|
|
5565
5623
|
me2.user = JSON.parse(
|
|
5566
5624
|
window.localStorage.getItem("user") || window.localStorage.getItem("userInfo") || "{}"
|
|
5567
5625
|
);
|
|
5568
|
-
me2.guid = me2.user.uid + "|" +
|
|
5626
|
+
me2.guid = me2.user.uid + "|" + util.tools.guid();
|
|
5569
5627
|
},
|
|
5570
5628
|
beforeDestroy() {
|
|
5571
5629
|
this.editorDom && this.editorDom.removeEventListener("blur", this.canSetAlign);
|
|
@@ -5635,10 +5693,10 @@
|
|
|
5635
5693
|
this.visibleVideo = false;
|
|
5636
5694
|
const fileName = (files[0] && files[0].name || "").toLowerCase();
|
|
5637
5695
|
if (files[0].size > 1 * 1024 * 1024 * 1024) {
|
|
5638
|
-
return me2.setToast("
|
|
5696
|
+
return me2.setToast("视频大小不能超过1GB");
|
|
5639
5697
|
}
|
|
5640
5698
|
if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
|
|
5641
|
-
return me2.setToast("
|
|
5699
|
+
return me2.setToast("视频格式不是mp4或mov");
|
|
5642
5700
|
}
|
|
5643
5701
|
const me2 = this;
|
|
5644
5702
|
if (me2.loading)
|
|
@@ -5658,7 +5716,9 @@
|
|
|
5658
5716
|
id: result.videoId,
|
|
5659
5717
|
desc: "",
|
|
5660
5718
|
vodSize: result.vodSize || "",
|
|
5719
|
+
// 视频大小
|
|
5661
5720
|
vodType: result.vodType || ""
|
|
5721
|
+
// 图片尺寸
|
|
5662
5722
|
};
|
|
5663
5723
|
me2.$emit("updateAddVideo", true);
|
|
5664
5724
|
me2.editor["insertVideo"](result.videoUrl, video);
|
|
@@ -5712,11 +5772,11 @@
|
|
|
5712
5772
|
},
|
|
5713
5773
|
insertLink() {
|
|
5714
5774
|
if (!this.linkForm.linkAddress)
|
|
5715
|
-
return elementPlus.ElMessage.error("
|
|
5775
|
+
return elementPlus.ElMessage.error("请输入链接地址");
|
|
5716
5776
|
if (!this.linkForm.linkWriting)
|
|
5717
|
-
return elementPlus.ElMessage.error("
|
|
5777
|
+
return elementPlus.ElMessage.error("请输入链接文案");
|
|
5718
5778
|
if (!this.validUrl(this.linkForm.linkAddress)) {
|
|
5719
|
-
return this.setToast("URL
|
|
5779
|
+
return this.setToast("URL无效");
|
|
5720
5780
|
}
|
|
5721
5781
|
this.editor.insertLink(
|
|
5722
5782
|
this.linkForm.linkAddress,
|
|
@@ -5745,6 +5805,7 @@
|
|
|
5745
5805
|
});
|
|
5746
5806
|
});
|
|
5747
5807
|
},
|
|
5808
|
+
// TopicManager事件处理
|
|
5748
5809
|
onTopicInserted(topic) {
|
|
5749
5810
|
this.updateData(true);
|
|
5750
5811
|
},
|
|
@@ -6202,7 +6263,7 @@
|
|
|
6202
6263
|
}
|
|
6203
6264
|
this.updateData(true);
|
|
6204
6265
|
} else {
|
|
6205
|
-
this.setToast(rst.origin.name + "
|
|
6266
|
+
this.setToast(rst.origin.name + "上传失败,请重试");
|
|
6206
6267
|
}
|
|
6207
6268
|
},
|
|
6208
6269
|
insertVideoBtns(editor, node) {
|
|
@@ -6217,7 +6278,7 @@
|
|
|
6217
6278
|
me2.currentVideo = node;
|
|
6218
6279
|
e.stopPropagation();
|
|
6219
6280
|
};
|
|
6220
|
-
replaceBtn.innerText = "
|
|
6281
|
+
replaceBtn.innerText = "更换封面";
|
|
6221
6282
|
return replaceBtn;
|
|
6222
6283
|
},
|
|
6223
6284
|
insertImgOperateBtns(editor, data) {
|
|
@@ -6243,7 +6304,7 @@
|
|
|
6243
6304
|
maxlength: "50",
|
|
6244
6305
|
rows: "2",
|
|
6245
6306
|
cols: "50",
|
|
6246
|
-
placeholder: "
|
|
6307
|
+
placeholder: "请输入图片描述(最多50字)",
|
|
6247
6308
|
contenteditable: "false"
|
|
6248
6309
|
});
|
|
6249
6310
|
descInput.disabled = me2.disabled;
|
|
@@ -6252,7 +6313,7 @@
|
|
|
6252
6313
|
const img = parent.querySelector(".halo-picture-area");
|
|
6253
6314
|
img.dataset.desc = e.target.value;
|
|
6254
6315
|
if (e.target.value.length > 49) {
|
|
6255
|
-
return me2.setToast("
|
|
6316
|
+
return me2.setToast("限制50个字符");
|
|
6256
6317
|
}
|
|
6257
6318
|
};
|
|
6258
6319
|
descInput.value = data.content || "";
|
|
@@ -6302,7 +6363,7 @@
|
|
|
6302
6363
|
me2.removeParentByClass(e.target, "halo-img-content");
|
|
6303
6364
|
me2.updateData(true);
|
|
6304
6365
|
};
|
|
6305
|
-
replaceBtn.innerHTML = "
|
|
6366
|
+
replaceBtn.innerHTML = "替换";
|
|
6306
6367
|
return [replaceBtn, delBtn, descInputWrap];
|
|
6307
6368
|
},
|
|
6308
6369
|
removeSeamlessLaster(e) {
|
|
@@ -6326,6 +6387,7 @@
|
|
|
6326
6387
|
}
|
|
6327
6388
|
}
|
|
6328
6389
|
},
|
|
6390
|
+
// 初始化编辑器数据,数据是 html 格式(displayData)
|
|
6329
6391
|
initData(data = "", essayPicRelVOList) {
|
|
6330
6392
|
this.parseHtml(data, essayPicRelVOList).then((res) => {
|
|
6331
6393
|
this.editorDom.innerHTML = "";
|
|
@@ -6333,10 +6395,13 @@
|
|
|
6333
6395
|
this.updateData();
|
|
6334
6396
|
});
|
|
6335
6397
|
},
|
|
6398
|
+
// TODO jsonToHtml、htmlToJson 实现这 2 个方法里面的逻辑,数据结构参考方法里面的注释,出参入参都为字符串,注意:mdd-topic 里面的属性数据 和 json 中的topicPosition数据是一一对应的,startIndex、endIndex为mdd-topic的起止位置 从 content 里面进行分割处理
|
|
6399
|
+
// json、html 数据格式互转,暂时只支持文字、短话题
|
|
6336
6400
|
jsonToHtml(json) {
|
|
6337
6401
|
},
|
|
6338
6402
|
htmlToJson(html) {
|
|
6339
6403
|
},
|
|
6404
|
+
// 设置富文本组件
|
|
6340
6405
|
initSquire() {
|
|
6341
6406
|
const me2 = this;
|
|
6342
6407
|
const editorDom = me2.editorDom;
|
|
@@ -6786,6 +6851,7 @@
|
|
|
6786
6851
|
window.Squire.empty(block)
|
|
6787
6852
|
]);
|
|
6788
6853
|
output.appendChild(
|
|
6854
|
+
// 段落才能添加标题
|
|
6789
6855
|
Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
|
|
6790
6856
|
);
|
|
6791
6857
|
}
|
|
@@ -6808,18 +6874,18 @@
|
|
|
6808
6874
|
});
|
|
6809
6875
|
loading.innerHTML = `
|
|
6810
6876
|
<img class="img-loading-icon" src="/img/upload-image-loading.png"/>
|
|
6811
|
-
<span class="img-loading-tip"
|
|
6877
|
+
<span class="img-loading-tip">上传中...</span>
|
|
6812
6878
|
`;
|
|
6813
6879
|
var fail = this.createElement("div", {
|
|
6814
6880
|
class: "img-fail hide",
|
|
6815
6881
|
contenteditable: "false"
|
|
6816
6882
|
});
|
|
6817
|
-
fail.innerHTML = "
|
|
6883
|
+
fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
|
|
6818
6884
|
var again = this.createElement("button", {
|
|
6819
6885
|
class: "img-again hide",
|
|
6820
6886
|
contenteditable: "false"
|
|
6821
6887
|
});
|
|
6822
|
-
again.innerHTML = "
|
|
6888
|
+
again.innerHTML = "重新上传";
|
|
6823
6889
|
const isGif = src && src.indexOf(".gif") > -1;
|
|
6824
6890
|
if (isGif) {
|
|
6825
6891
|
src = src.replace(".gif", ".gif!nowater");
|
|
@@ -6874,7 +6940,7 @@
|
|
|
6874
6940
|
});
|
|
6875
6941
|
div.innerHTML = `
|
|
6876
6942
|
<div class="video-progress">
|
|
6877
|
-
<div class="label"
|
|
6943
|
+
<div class="label">上传中...</div>
|
|
6878
6944
|
<div class="box">
|
|
6879
6945
|
<div class="inner" style="width:20%"></div>
|
|
6880
6946
|
</div>
|
|
@@ -6897,6 +6963,7 @@
|
|
|
6897
6963
|
data: JSON.stringify(data),
|
|
6898
6964
|
"data-content": data.content || "",
|
|
6899
6965
|
poster: data.img || ""
|
|
6966
|
+
// 'contenteditable': 'true',
|
|
6900
6967
|
});
|
|
6901
6968
|
var delBtn = me2.genIconDom({
|
|
6902
6969
|
class: "pointer video-delete icon",
|
|
@@ -6954,6 +7021,7 @@
|
|
|
6954
7021
|
}
|
|
6955
7022
|
};
|
|
6956
7023
|
},
|
|
7024
|
+
// 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
|
|
6957
7025
|
setListener(dom) {
|
|
6958
7026
|
const me2 = this;
|
|
6959
7027
|
const doms = dom ? [dom] : Array.from(this.editorDom.children);
|
|
@@ -6964,7 +7032,7 @@
|
|
|
6964
7032
|
p.onclick = function(e) {
|
|
6965
7033
|
var _a;
|
|
6966
7034
|
if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
|
|
6967
|
-
me2.setToast("
|
|
7035
|
+
me2.setToast("不支持播放");
|
|
6968
7036
|
}
|
|
6969
7037
|
if (e.target.className.includes("desc-input")) {
|
|
6970
7038
|
return;
|
|
@@ -7028,6 +7096,7 @@
|
|
|
7028
7096
|
};
|
|
7029
7097
|
return del;
|
|
7030
7098
|
},
|
|
7099
|
+
// 转换数据,返回给业务
|
|
7031
7100
|
getEditorData() {
|
|
7032
7101
|
const me2 = this;
|
|
7033
7102
|
const children = Array.from(me2.editorDom.children);
|
|
@@ -7085,9 +7154,11 @@
|
|
|
7085
7154
|
videoIds
|
|
7086
7155
|
};
|
|
7087
7156
|
},
|
|
7157
|
+
// 是否是摩托范的图片
|
|
7088
7158
|
isHaloImage(url = "") {
|
|
7089
7159
|
return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1;
|
|
7090
7160
|
},
|
|
7161
|
+
// 获取待上传图片列表
|
|
7091
7162
|
updateUploads() {
|
|
7092
7163
|
const me2 = this;
|
|
7093
7164
|
setTimeout(() => {
|
|
@@ -7134,8 +7205,8 @@
|
|
|
7134
7205
|
const currentImg = me2.uploadStore[key];
|
|
7135
7206
|
const imageUrl = key.split("|")[1] || "";
|
|
7136
7207
|
if (!currentImg) {
|
|
7137
|
-
console.log("
|
|
7138
|
-
return Promise.reject("
|
|
7208
|
+
console.log("图片不存在", key);
|
|
7209
|
+
return Promise.reject("图片不存在");
|
|
7139
7210
|
}
|
|
7140
7211
|
const parent = currentImg.parentNode || "";
|
|
7141
7212
|
const uploadFailHandler = (currentImg2) => {
|
|
@@ -7179,6 +7250,7 @@
|
|
|
7179
7250
|
parent && uploadFailHandler(currentImg);
|
|
7180
7251
|
});
|
|
7181
7252
|
},
|
|
7253
|
+
// 更新上传的图片
|
|
7182
7254
|
updateImage(img, currentImg = {}) {
|
|
7183
7255
|
const data = JSON.parse(currentImg.getAttribute("data") || "{}");
|
|
7184
7256
|
data.img = img;
|
|
@@ -7201,9 +7273,11 @@
|
|
|
7201
7273
|
parent.appendChild(arr[2]);
|
|
7202
7274
|
}
|
|
7203
7275
|
},
|
|
7276
|
+
// 获取ctrl + v 后内容
|
|
7204
7277
|
getSticker(type, handler) {
|
|
7205
7278
|
this.setSticker(type.fragment.children);
|
|
7206
7279
|
},
|
|
7280
|
+
// 粘贴表格内容,tr换行形成段落
|
|
7207
7281
|
setStickerTableContent(data) {
|
|
7208
7282
|
const me2 = this;
|
|
7209
7283
|
const rows = data.querySelectorAll("tr") || [];
|
|
@@ -7232,6 +7306,7 @@
|
|
|
7232
7306
|
});
|
|
7233
7307
|
this.updateData(true);
|
|
7234
7308
|
},
|
|
7309
|
+
// 粘贴
|
|
7235
7310
|
setSticker(data) {
|
|
7236
7311
|
const me2 = this;
|
|
7237
7312
|
data = Array.from(data);
|
|
@@ -7270,6 +7345,7 @@
|
|
|
7270
7345
|
const me2 = this;
|
|
7271
7346
|
me2.updateData();
|
|
7272
7347
|
},
|
|
7348
|
+
// 监测 添加、撤回、恢复、删除
|
|
7273
7349
|
setBack(e, type) {
|
|
7274
7350
|
const me2 = this;
|
|
7275
7351
|
me2.refreshImg();
|
|
@@ -7302,6 +7378,7 @@
|
|
|
7302
7378
|
}
|
|
7303
7379
|
});
|
|
7304
7380
|
},
|
|
7381
|
+
// 设置scoll
|
|
7305
7382
|
sticky() {
|
|
7306
7383
|
const me2 = this;
|
|
7307
7384
|
me2.$nextTick(function() {
|
|
@@ -7321,6 +7398,8 @@
|
|
|
7321
7398
|
document.addEventListener("scroll", onScroll);
|
|
7322
7399
|
});
|
|
7323
7400
|
},
|
|
7401
|
+
// ==========toolbox==========
|
|
7402
|
+
// 撤回、恢复、段落标题
|
|
7324
7403
|
setContent(e, obj) {
|
|
7325
7404
|
const me2 = this;
|
|
7326
7405
|
const id = e.target.id || e.target.dataset.editorId;
|
|
@@ -7362,10 +7441,11 @@
|
|
|
7362
7441
|
this.fontInfo = this.editor.getFontInfo();
|
|
7363
7442
|
this.updateData(true);
|
|
7364
7443
|
},
|
|
7444
|
+
// 增加link
|
|
7365
7445
|
addLink(type) {
|
|
7366
7446
|
const me2 = this;
|
|
7367
|
-
me2.linkTitleName = type === "link" ? "
|
|
7368
|
-
me2.linkPlaceholder = type === "link" ? "
|
|
7447
|
+
me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
|
|
7448
|
+
me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
|
|
7369
7449
|
me2.viewStatus = true;
|
|
7370
7450
|
me2.linkStatus = true;
|
|
7371
7451
|
},
|
|
@@ -7373,29 +7453,31 @@
|
|
|
7373
7453
|
const objExp = /^(((ht|f)tp(s?)):\/\/)?(www.|[a-zA-Z].)[a-zA-Z0-9-.]+.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|cn|im)(:[0-9]+)*(\/($|[a-zA-Z0-9.,;?'&%$#=~_-]+))*$/;
|
|
7374
7454
|
return objExp.test(url);
|
|
7375
7455
|
},
|
|
7456
|
+
// 确认增加link
|
|
7376
7457
|
confirmLink() {
|
|
7377
7458
|
const me2 = this;
|
|
7378
7459
|
if (!me2.linkContent) {
|
|
7379
|
-
return elementPlus.ElMessage.error("
|
|
7460
|
+
return elementPlus.ElMessage.error("请输入链接地址!");
|
|
7380
7461
|
}
|
|
7381
|
-
if (me2.linkTitleName === "
|
|
7462
|
+
if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
|
|
7382
7463
|
this.visibleCollectArticle = false;
|
|
7383
7464
|
return me2.importLinkData();
|
|
7384
7465
|
}
|
|
7385
7466
|
if (!this.validUrl(me2.linkContent)) {
|
|
7386
|
-
return me2.setToast("URL
|
|
7467
|
+
return me2.setToast("URL无效");
|
|
7387
7468
|
}
|
|
7388
7469
|
if (!me2.isHaloImage(me2.linkContent)) {
|
|
7389
|
-
return me2.setToast("
|
|
7470
|
+
return me2.setToast("请输入摩托范内部网址");
|
|
7390
7471
|
}
|
|
7391
7472
|
me2.editor["insertLink"](me2.linkContent);
|
|
7392
7473
|
me2.linkContent = "";
|
|
7393
7474
|
me2.closeDialog();
|
|
7394
7475
|
},
|
|
7476
|
+
// 增加link导入数据
|
|
7395
7477
|
importLinkData() {
|
|
7396
7478
|
const me2 = this;
|
|
7397
7479
|
if (me2.loading) {
|
|
7398
|
-
return elementPlus.ElMessage("
|
|
7480
|
+
return elementPlus.ElMessage("正在获取信息,请稍后...");
|
|
7399
7481
|
}
|
|
7400
7482
|
me2.loading = true;
|
|
7401
7483
|
const params = {
|
|
@@ -7417,39 +7499,44 @@
|
|
|
7417
7499
|
me2.linkContent = "";
|
|
7418
7500
|
return;
|
|
7419
7501
|
} else {
|
|
7420
|
-
me2.setToast("
|
|
7502
|
+
me2.setToast("导入失败,请重试");
|
|
7421
7503
|
}
|
|
7422
7504
|
}).catch((err) => {
|
|
7423
7505
|
console.log(err.message);
|
|
7424
|
-
me2.setToast("
|
|
7506
|
+
me2.setToast("导入异常,请重试");
|
|
7425
7507
|
}).finally((_) => {
|
|
7426
7508
|
me2.loading = false;
|
|
7427
7509
|
});
|
|
7428
7510
|
},
|
|
7511
|
+
// 打开 图片、视频、一键导入 弹框
|
|
7429
7512
|
openDialog(name) {
|
|
7430
7513
|
const me2 = this;
|
|
7431
|
-
me2.viewName = name === "img" ? "
|
|
7432
|
-
me2.viewButton = name === "img" ? "
|
|
7433
|
-
me2.viewTip = name === "img" ? "" : "
|
|
7514
|
+
me2.viewName = name === "img" ? "添加图片" : "添加视频";
|
|
7515
|
+
me2.viewButton = name === "img" ? "选择图片" : "选择视频";
|
|
7516
|
+
me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
|
|
7434
7517
|
me2.viewStatus = true;
|
|
7435
7518
|
},
|
|
7519
|
+
// 关闭弹框
|
|
7436
7520
|
closeDialog() {
|
|
7437
7521
|
this.viewStatus = false;
|
|
7438
7522
|
this.linkStatus = false;
|
|
7439
7523
|
this.linkContent = "";
|
|
7440
7524
|
},
|
|
7525
|
+
// ==========toolbox end==========
|
|
7526
|
+
// 弹框提示
|
|
7441
7527
|
setToast(content) {
|
|
7442
7528
|
elementPlus.ElMessage.error(content);
|
|
7443
7529
|
},
|
|
7444
7530
|
setMessageBoxNoCancel(content) {
|
|
7445
7531
|
elementPlus.ElMessageBox.confirm(content, "", {
|
|
7446
|
-
confirmButtonText: "
|
|
7447
|
-
cancelButtonText: "
|
|
7532
|
+
confirmButtonText: "确定",
|
|
7533
|
+
cancelButtonText: "取消",
|
|
7448
7534
|
type: "warning"
|
|
7449
7535
|
}).then(() => {
|
|
7450
7536
|
}).catch(() => {
|
|
7451
7537
|
});
|
|
7452
7538
|
},
|
|
7539
|
+
// 检查是否会创建嵌套的halo-paragraph
|
|
7453
7540
|
wouldCreateNestedParagraph(range) {
|
|
7454
7541
|
let container = range.startContainer;
|
|
7455
7542
|
while (container && container !== this.editorDom) {
|
|
@@ -7460,6 +7547,7 @@
|
|
|
7460
7547
|
}
|
|
7461
7548
|
return false;
|
|
7462
7549
|
},
|
|
7550
|
+
// 检查光标是否在两个连续的mdd-topic之间
|
|
7463
7551
|
isBetweenTwoTopics(range) {
|
|
7464
7552
|
const container = range.startContainer;
|
|
7465
7553
|
const offset = range.startOffset;
|
|
@@ -7475,6 +7563,7 @@
|
|
|
7475
7563
|
}
|
|
7476
7564
|
return false;
|
|
7477
7565
|
},
|
|
7566
|
+
// 处理两个话题之间的回车或话题前面的回车
|
|
7478
7567
|
handleEnterBetweenTopics(range) {
|
|
7479
7568
|
var _a;
|
|
7480
7569
|
const me2 = this;
|
|
@@ -7512,6 +7601,7 @@
|
|
|
7512
7601
|
selection.addRange(newRange);
|
|
7513
7602
|
me2.updateData(true);
|
|
7514
7603
|
},
|
|
7604
|
+
// 更精确地提取光标后的内容(专门用于话题分割)
|
|
7515
7605
|
extractContentAfterCursorPrecise(range, paragraph) {
|
|
7516
7606
|
const fragment = document.createDocumentFragment();
|
|
7517
7607
|
const container = range.startContainer;
|
|
@@ -7537,6 +7627,7 @@
|
|
|
7537
7627
|
}
|
|
7538
7628
|
return fragment;
|
|
7539
7629
|
},
|
|
7630
|
+
// 处理包含话题的段落中的回车键
|
|
7540
7631
|
handleEnterKeyInParagraphWithTopic(range) {
|
|
7541
7632
|
var _a;
|
|
7542
7633
|
const me2 = this;
|
|
@@ -7611,6 +7702,7 @@
|
|
|
7611
7702
|
selection.addRange(newRange);
|
|
7612
7703
|
me2.updateData(true);
|
|
7613
7704
|
},
|
|
7705
|
+
// 检查光标是否在第一个话题前面
|
|
7614
7706
|
isCursorBeforeFirstTopic(range, paragraph) {
|
|
7615
7707
|
const container = range.startContainer;
|
|
7616
7708
|
const offset = range.startOffset;
|
|
@@ -7672,6 +7764,7 @@
|
|
|
7672
7764
|
}
|
|
7673
7765
|
return false;
|
|
7674
7766
|
},
|
|
7767
|
+
// 获取不包含mdd-topic内部文本的段落文本
|
|
7675
7768
|
getParagraphTextExcludingTopics(paragraph, range) {
|
|
7676
7769
|
let textContent = "";
|
|
7677
7770
|
let cursorPosition = 0;
|
|
@@ -7702,10 +7795,12 @@
|
|
|
7702
7795
|
}
|
|
7703
7796
|
return { textContent, cursorPosition };
|
|
7704
7797
|
},
|
|
7798
|
+
// 检查光标是否在段落开头
|
|
7705
7799
|
isCursorAtStartOfParagraph(range, paragraph) {
|
|
7706
7800
|
const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
|
|
7707
7801
|
return cursorPosition === 0;
|
|
7708
7802
|
},
|
|
7803
|
+
// 检查光标是否在段落末尾
|
|
7709
7804
|
isCursorAtEndOfParagraph(range, paragraph) {
|
|
7710
7805
|
const walker = document.createTreeWalker(
|
|
7711
7806
|
paragraph,
|
|
@@ -7732,6 +7827,7 @@
|
|
|
7732
7827
|
const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
|
|
7733
7828
|
return cursorPosition >= totalLength;
|
|
7734
7829
|
},
|
|
7830
|
+
// 获取当前段落
|
|
7735
7831
|
getCurrentParagraph(range) {
|
|
7736
7832
|
let container = range.startContainer;
|
|
7737
7833
|
while (container && container !== this.editorDom) {
|
|
@@ -7742,12 +7838,13 @@
|
|
|
7742
7838
|
}
|
|
7743
7839
|
return null;
|
|
7744
7840
|
},
|
|
7841
|
+
// 提取光标后的内容
|
|
7745
7842
|
extractContentAfterCursor(range, paragraph) {
|
|
7746
7843
|
const fragment = document.createDocumentFragment();
|
|
7747
7844
|
const container = range.startContainer;
|
|
7748
7845
|
const offset = range.startOffset;
|
|
7749
7846
|
let topicSpaceNode = null;
|
|
7750
|
-
if (container.nodeType === Node.TEXT_NODE && container.textContent === "
|
|
7847
|
+
if (container.nodeType === Node.TEXT_NODE && container.textContent === " " && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
|
|
7751
7848
|
topicSpaceNode = container;
|
|
7752
7849
|
}
|
|
7753
7850
|
const extractRange = document.createRange();
|
|
@@ -7802,7 +7899,8 @@
|
|
|
7802
7899
|
try {
|
|
7803
7900
|
extractRange.setStartBefore(startNode);
|
|
7804
7901
|
let lastNode = paragraph.lastChild;
|
|
7805
|
-
while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" &&
|
|
7902
|
+
while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && // 只跳过完全空的文本节点
|
|
7903
|
+
lastNode !== startNode) {
|
|
7806
7904
|
lastNode = lastNode.previousSibling;
|
|
7807
7905
|
}
|
|
7808
7906
|
if (lastNode) {
|
|
@@ -7822,6 +7920,7 @@
|
|
|
7822
7920
|
}
|
|
7823
7921
|
return fragment;
|
|
7824
7922
|
},
|
|
7923
|
+
// 统一的光标设置方法 - 设置光标到元素后面
|
|
7825
7924
|
setCursorAfterElement(element) {
|
|
7826
7925
|
const newRange = document.createRange();
|
|
7827
7926
|
newRange.setStartAfter(element);
|
|
@@ -7830,6 +7929,7 @@
|
|
|
7830
7929
|
selection.removeAllRanges();
|
|
7831
7930
|
selection.addRange(newRange);
|
|
7832
7931
|
},
|
|
7932
|
+
// 统一的光标设置方法 - 设置光标到元素前面
|
|
7833
7933
|
setCursorBeforeElement(element) {
|
|
7834
7934
|
const newRange = document.createRange();
|
|
7835
7935
|
newRange.setStartBefore(element);
|
|
@@ -7849,8 +7949,6 @@
|
|
|
7849
7949
|
slot: "footer",
|
|
7850
7950
|
class: "dialog-footer"
|
|
7851
7951
|
};
|
|
7852
|
-
const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\u53D6 \u6D88");
|
|
7853
|
-
const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode("\u786E \u5B9A");
|
|
7854
7952
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7855
7953
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
7856
7954
|
const _component_el_form_item = vue.resolveComponent("el-form-item");
|
|
@@ -7866,7 +7964,7 @@
|
|
|
7866
7964
|
vue.withDirectives(vue.createElementVNode("div", {
|
|
7867
7965
|
style: vue.normalizeStyle({ textAlign: $options.align }),
|
|
7868
7966
|
class: "placeholder"
|
|
7869
|
-
}, vue.toDisplayString($props.placeholder || "
|
|
7967
|
+
}, vue.toDisplayString($props.placeholder || "请输入正文"), 5), [
|
|
7870
7968
|
[vue.vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
|
|
7871
7969
|
]),
|
|
7872
7970
|
$data.overLine ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -7891,26 +7989,26 @@
|
|
|
7891
7989
|
vue.createVNode(_component_el_form, { model: $data.linkForm }, {
|
|
7892
7990
|
default: vue.withCtx(() => [
|
|
7893
7991
|
vue.createVNode(_component_el_form_item, {
|
|
7894
|
-
label: "
|
|
7992
|
+
label: "添加链接",
|
|
7895
7993
|
class: "link-title"
|
|
7896
7994
|
}, {
|
|
7897
7995
|
default: vue.withCtx(() => [
|
|
7898
7996
|
vue.createVNode(_component_el_input, {
|
|
7899
7997
|
modelValue: $data.linkForm.linkAddress,
|
|
7900
7998
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
|
|
7901
|
-
placeholder: "
|
|
7999
|
+
placeholder: "请输入链接地址"
|
|
7902
8000
|
}, null, 8, ["modelValue"])
|
|
7903
8001
|
]),
|
|
7904
8002
|
_: 1
|
|
7905
8003
|
}),
|
|
7906
|
-
vue.createVNode(_component_el_form_item, { label: "
|
|
8004
|
+
vue.createVNode(_component_el_form_item, { label: "链接文案" }, {
|
|
7907
8005
|
default: vue.withCtx(() => [
|
|
7908
8006
|
vue.createVNode(_component_el_input, {
|
|
7909
8007
|
modelValue: $data.linkForm.linkWriting,
|
|
7910
8008
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
|
|
7911
8009
|
type: "textarea",
|
|
7912
8010
|
autosize: "",
|
|
7913
|
-
placeholder: "
|
|
8011
|
+
placeholder: "请输入链接文案"
|
|
7914
8012
|
}, null, 8, ["modelValue"])
|
|
7915
8013
|
]),
|
|
7916
8014
|
_: 1
|
|
@@ -7923,18 +8021,18 @@
|
|
|
7923
8021
|
vue.createVNode(_component_el_button, {
|
|
7924
8022
|
onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
|
|
7925
8023
|
}, {
|
|
7926
|
-
default: vue.withCtx(() => [
|
|
7927
|
-
|
|
7928
|
-
]),
|
|
8024
|
+
default: vue.withCtx(() => _cache[14] || (_cache[14] = [
|
|
8025
|
+
vue.createTextVNode("取 消")
|
|
8026
|
+
])),
|
|
7929
8027
|
_: 1
|
|
7930
8028
|
}),
|
|
7931
8029
|
vue.createVNode(_component_el_button, {
|
|
7932
8030
|
type: "primary",
|
|
7933
8031
|
onClick: $options.insertLink
|
|
7934
8032
|
}, {
|
|
7935
|
-
default: vue.withCtx(() => [
|
|
7936
|
-
|
|
7937
|
-
]),
|
|
8033
|
+
default: vue.withCtx(() => _cache[15] || (_cache[15] = [
|
|
8034
|
+
vue.createTextVNode("确 定")
|
|
8035
|
+
])),
|
|
7938
8036
|
_: 1
|
|
7939
8037
|
}, 8, ["onClick"])
|
|
7940
8038
|
])
|
|
@@ -7951,7 +8049,7 @@
|
|
|
7951
8049
|
}, null, 8, ["article", "visible", "getList", "onDelete", "onChange"]),
|
|
7952
8050
|
vue.createVNode(_component_ImgUpload, {
|
|
7953
8051
|
"img-list": $data.imgList,
|
|
7954
|
-
"onUpdate:
|
|
8052
|
+
"onUpdate:imgList": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
|
|
7955
8053
|
visible: $data.visibleImg,
|
|
7956
8054
|
"onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
|
|
7957
8055
|
chartGallery: $props.chartGallery,
|
|
@@ -7966,7 +8064,7 @@
|
|
|
7966
8064
|
}, null, 8, ["visible", "file-selected"]),
|
|
7967
8065
|
vue.createVNode(_component_CollectArticle, {
|
|
7968
8066
|
"link-content": $data.linkContent,
|
|
7969
|
-
"onUpdate:
|
|
8067
|
+
"onUpdate:linkContent": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
|
|
7970
8068
|
visible: $data.visibleCollectArticle,
|
|
7971
8069
|
"onUpdate:visible": _cache[10] || (_cache[10] = ($event) => $data.visibleCollectArticle = $event),
|
|
7972
8070
|
onSubmit: $options.confirmLink
|
|
@@ -8019,7 +8117,7 @@
|
|
|
8019
8117
|
var COLOUR_CLASS = "colour";
|
|
8020
8118
|
var FONT_FAMILY_CLASS = "font";
|
|
8021
8119
|
var FONT_SIZE_CLASS = "size";
|
|
8022
|
-
var ZWS = "
|
|
8120
|
+
var ZWS = "";
|
|
8023
8121
|
var win = doc.defaultView;
|
|
8024
8122
|
var ua = navigator.userAgent;
|
|
8025
8123
|
var isAndroid = /Android/.test(ua);
|
|
@@ -8049,11 +8147,17 @@
|
|
|
8049
8147
|
};
|
|
8050
8148
|
}
|
|
8051
8149
|
var typeToBitArray = {
|
|
8150
|
+
// ELEMENT_NODE
|
|
8052
8151
|
1: 1,
|
|
8152
|
+
// ATTRIBUTE_NODE
|
|
8053
8153
|
2: 2,
|
|
8154
|
+
// TEXT_NODE
|
|
8054
8155
|
3: 4,
|
|
8156
|
+
// COMMENT_NODE
|
|
8055
8157
|
8: 128,
|
|
8158
|
+
// DOCUMENT_NODE
|
|
8056
8159
|
9: 256,
|
|
8160
|
+
// DOCUMENT_FRAGMENT_NODE
|
|
8057
8161
|
11: 1024
|
|
8058
8162
|
};
|
|
8059
8163
|
function TreeWalker(root, nodeType, filter) {
|
|
@@ -8387,7 +8491,7 @@
|
|
|
8387
8491
|
node.appendChild(fixer);
|
|
8388
8492
|
} catch (error) {
|
|
8389
8493
|
self2.didError({
|
|
8390
|
-
name: "Squire: fixCursor
|
|
8494
|
+
name: "Squire: fixCursor – " + error,
|
|
8391
8495
|
message: "Parent: " + node.nodeName + "/" + node.innerHTML + " appendChild: " + fixer.nodeName
|
|
8392
8496
|
});
|
|
8393
8497
|
}
|
|
@@ -8722,7 +8826,8 @@
|
|
|
8722
8826
|
block = getStartBlockOfRange(range, root);
|
|
8723
8827
|
firstBlockInFrag = getNextBlock(frag, frag);
|
|
8724
8828
|
replaceBlock = !!block && isEmptyBlock(block);
|
|
8725
|
-
if (block && firstBlockInFrag && !replaceBlock &&
|
|
8829
|
+
if (block && firstBlockInFrag && !replaceBlock && // Don't merge table cells or PRE elements into block
|
|
8830
|
+
!getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
|
|
8726
8831
|
moveRangeBoundariesUpTree(range, block, block, root);
|
|
8727
8832
|
range.collapse(true);
|
|
8728
8833
|
container = range.endContainer;
|
|
@@ -8738,7 +8843,10 @@
|
|
|
8738
8843
|
container = nodeAfterSplit.parentNode;
|
|
8739
8844
|
offset = indexOf.call(container.childNodes, nodeAfterSplit);
|
|
8740
8845
|
}
|
|
8741
|
-
if (
|
|
8846
|
+
if (
|
|
8847
|
+
/* isBlock( container ) && */
|
|
8848
|
+
offset !== getLength(container)
|
|
8849
|
+
) {
|
|
8742
8850
|
blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
|
|
8743
8851
|
while (node = container.childNodes[offset]) {
|
|
8744
8852
|
blockContentsAfterSplit.appendChild(node);
|
|
@@ -9787,9 +9895,11 @@
|
|
|
9787
9895
|
if (hasImage) {
|
|
9788
9896
|
this.fireEvent("dragover", {
|
|
9789
9897
|
dataTransfer: clipboardData,
|
|
9898
|
+
/* jshint loopfunc: true */
|
|
9790
9899
|
preventDefault: function() {
|
|
9791
9900
|
fireDrop = true;
|
|
9792
9901
|
}
|
|
9902
|
+
/* jshint loopfunc: false */
|
|
9793
9903
|
});
|
|
9794
9904
|
if (fireDrop) {
|
|
9795
9905
|
this.fireEvent("drop", {
|
|
@@ -9996,7 +10106,9 @@
|
|
|
9996
10106
|
leafNodeNames,
|
|
9997
10107
|
undo: {
|
|
9998
10108
|
documentSizeThreshold: -1,
|
|
10109
|
+
// -1 means no threshold
|
|
9999
10110
|
undoLimit: -1
|
|
10111
|
+
// -1 means no limit
|
|
10000
10112
|
},
|
|
10001
10113
|
isInsertedHTMLSanitized: true,
|
|
10002
10114
|
isSetHTMLSanitized: true,
|
|
@@ -11638,5 +11750,5 @@
|
|
|
11638
11750
|
exports2.Editor = Editor;
|
|
11639
11751
|
exports2.ToolBar = ToolBar;
|
|
11640
11752
|
exports2.ToolsEnum = ToolsEnum;
|
|
11641
|
-
Object.
|
|
11753
|
+
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
11642
11754
|
});
|