@haluo/biz 2.0.51 → 2.0.52
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/README.md +2 -0
- package/dist/haluo-biz.js +901 -690
- package/dist/haluo-biz.umd.cjs +924 -702
- package/dist/{squire-raw.3e73a64b.js → squire-raw-1aaeff0b.js} +18 -4
- package/dist/style.css +47 -52
- package/package.json +1 -1
package/dist/haluo-biz.js
CHANGED
|
@@ -111,7 +111,6 @@ function _e(e, t, o = {}) {
|
|
|
111
111
|
}
|
|
112
112
|
const D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, R = "__vueuse_ssr_handlers__";
|
|
113
113
|
D[R] = D[R] || {};
|
|
114
|
-
D[R];
|
|
115
114
|
var q;
|
|
116
115
|
(function(e) {
|
|
117
116
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
@@ -153,7 +152,7 @@ const he = {
|
|
|
153
152
|
ke({
|
|
154
153
|
linear: me
|
|
155
154
|
}, he);
|
|
156
|
-
const J = (e) => (pushScopeId("data-v-b46fc003"), e = e(), popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ createElementVNode("h3", null, "
|
|
155
|
+
const J = (e) => (pushScopeId("data-v-b46fc003"), e = e(), popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ createElementVNode("h3", null, "主题颜色", -1)), Ee = { class: "tColor" }, Pe = ["onMouseover", "onClick"], Me = { class: "bColor" }, Ae = ["onMouseover", "onClick"], $e = /* @__PURE__ */ J(() => /* @__PURE__ */ createElementVNode("h3", null, "标准颜色", -1)), Te = { class: "tColor" }, Be = ["onMouseover", "onClick"], Ve = {
|
|
157
156
|
name: "colorPicker"
|
|
158
157
|
}, Ne = /* @__PURE__ */ defineComponent({
|
|
159
158
|
...Ve,
|
|
@@ -218,13 +217,13 @@ const J = (e) => (pushScopeId("data-v-b46fc003"), e = e(), popScopeId(), e), we
|
|
|
218
217
|
l.stopPropagation();
|
|
219
218
|
})
|
|
220
219
|
}, [
|
|
221
|
-
createCommentVNode("
|
|
220
|
+
createCommentVNode(" 颜色显示小方块 "),
|
|
222
221
|
createElementVNode("div", {
|
|
223
222
|
class: normalizeClass(["colorBtn", { disabled: e.disabled }]),
|
|
224
223
|
style: normalizeStyle(`background-color: ${unref(a)}`),
|
|
225
224
|
onClick: p
|
|
226
225
|
}, null, 6),
|
|
227
|
-
createCommentVNode("
|
|
226
|
+
createCommentVNode(" 颜色色盘 "),
|
|
228
227
|
createElementVNode("div", {
|
|
229
228
|
class: normalizeClass(["box", { open: s.value }])
|
|
230
229
|
}, [
|
|
@@ -238,7 +237,7 @@ const J = (e) => (pushScopeId("data-v-b46fc003"), e = e(), popScopeId(), e), we
|
|
|
238
237
|
onClick: Y,
|
|
239
238
|
onMouseover: r[0] || (r[0] = (l) => d(e.defaultColor)),
|
|
240
239
|
onMouseout: r[1] || (r[1] = (l) => d(""))
|
|
241
|
-
}, "
|
|
240
|
+
}, "默认颜色", 32)
|
|
242
241
|
]),
|
|
243
242
|
createElementVNode("div", Oe, [
|
|
244
243
|
Ie,
|
|
@@ -274,8 +273,8 @@ const J = (e) => (pushScopeId("data-v-b46fc003"), e = e(), popScopeId(), e), we
|
|
|
274
273
|
onClick: (f) => E(l)
|
|
275
274
|
}, null, 44, Be)), 64))
|
|
276
275
|
]),
|
|
277
|
-
createElementVNode("h3", { onClick: X }, "
|
|
278
|
-
createCommentVNode("
|
|
276
|
+
createElementVNode("h3", { onClick: X }, "更多颜色..."),
|
|
277
|
+
createCommentVNode(" 用以激活HTML5颜色面板 "),
|
|
279
278
|
withDirectives(createElementVNode("input", {
|
|
280
279
|
type: "color",
|
|
281
280
|
ref_key: "html5ColorEl",
|
|
@@ -309,7 +308,7 @@ const Se = [
|
|
|
309
308
|
colorPicker: O
|
|
310
309
|
};
|
|
311
310
|
const style = "";
|
|
312
|
-
const
|
|
311
|
+
const ToolBar_vue_vue_type_style_index_0_scoped_50235bb8_lang = "";
|
|
313
312
|
const ToolBar_vue_vue_type_style_index_1_lang = "";
|
|
314
313
|
const _export_sfc = (sfc, props) => {
|
|
315
314
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -339,15 +338,15 @@ const _sfc_main$8 = {
|
|
|
339
338
|
activeImgType: false,
|
|
340
339
|
activeAlign: "",
|
|
341
340
|
alignMethods: [
|
|
342
|
-
{ value: "left", name: "
|
|
343
|
-
{ value: "right", name: "
|
|
344
|
-
{ value: "center", name: "
|
|
345
|
-
{ value: "justify", name: "
|
|
341
|
+
{ value: "left", name: "左对齐" },
|
|
342
|
+
{ value: "right", name: "右对齐" },
|
|
343
|
+
{ value: "center", name: "居中对齐" },
|
|
344
|
+
{ value: "justify", name: "两端对齐" }
|
|
346
345
|
],
|
|
347
346
|
activeFontsize: "17",
|
|
348
347
|
fontsizes: [
|
|
349
|
-
{ value: "17px", name: "17", desc: "
|
|
350
|
-
{ value: "18px", name: "18", desc: "
|
|
348
|
+
{ value: "17px", name: "17", desc: "默认正文字号" },
|
|
349
|
+
{ value: "18px", name: "18", desc: "默认标题字号" },
|
|
351
350
|
{ value: "19px", name: "19" },
|
|
352
351
|
{ value: "20px", name: "20" },
|
|
353
352
|
{ value: "24px", name: "24" },
|
|
@@ -428,7 +427,7 @@ const _sfc_main$8 = {
|
|
|
428
427
|
this.editor.clearFormat();
|
|
429
428
|
},
|
|
430
429
|
setColor(val) {
|
|
431
|
-
console.log("
|
|
430
|
+
console.log("文字颜色");
|
|
432
431
|
this.updatePosition(() => {
|
|
433
432
|
this.editor.setColor(val);
|
|
434
433
|
});
|
|
@@ -487,6 +486,7 @@ const _sfc_main$8 = {
|
|
|
487
486
|
this.popoverVisibleList = false;
|
|
488
487
|
this.popoverVisibleImg = false;
|
|
489
488
|
},
|
|
489
|
+
// todo 富文本设置样式位置会回到顶部
|
|
490
490
|
updatePosition(fn) {
|
|
491
491
|
const scrollTop = document.documentElement.scrollTop;
|
|
492
492
|
fn && fn();
|
|
@@ -523,11 +523,11 @@ const _hoisted_1$8 = {
|
|
|
523
523
|
key: 0,
|
|
524
524
|
class: "tools"
|
|
525
525
|
};
|
|
526
|
-
const _hoisted_2$
|
|
527
|
-
const _hoisted_3$
|
|
528
|
-
const _hoisted_4$
|
|
529
|
-
const _hoisted_5$
|
|
530
|
-
const _hoisted_6$
|
|
526
|
+
const _hoisted_2$5 = { class: "tools-content" };
|
|
527
|
+
const _hoisted_3$5 = ["src"];
|
|
528
|
+
const _hoisted_4$3 = ["src"];
|
|
529
|
+
const _hoisted_5$3 = ["src"];
|
|
530
|
+
const _hoisted_6$2 = { class: "box" };
|
|
531
531
|
const _hoisted_7$2 = ["src"];
|
|
532
532
|
const _hoisted_8$2 = {
|
|
533
533
|
key: 0,
|
|
@@ -537,10 +537,10 @@ const _hoisted_9$2 = { class: "tools-title" };
|
|
|
537
537
|
const _hoisted_10$2 = ["src"];
|
|
538
538
|
const _hoisted_11$2 = { class: "tools-font" };
|
|
539
539
|
const _hoisted_12$2 = ["onClick"];
|
|
540
|
-
const _hoisted_13$
|
|
541
|
-
const _hoisted_14$
|
|
542
|
-
const _hoisted_15$
|
|
543
|
-
const _hoisted_16$
|
|
540
|
+
const _hoisted_13$1 = { style: { "font-size": "10px" } };
|
|
541
|
+
const _hoisted_14$1 = { class: "box" };
|
|
542
|
+
const _hoisted_15$1 = ["src"];
|
|
543
|
+
const _hoisted_16$1 = {
|
|
544
544
|
key: 0,
|
|
545
545
|
class: "box-mask"
|
|
546
546
|
};
|
|
@@ -566,12 +566,12 @@ const _hoisted_29$1 = {
|
|
|
566
566
|
key: 0,
|
|
567
567
|
class: "box-mask"
|
|
568
568
|
};
|
|
569
|
-
const _hoisted_30
|
|
570
|
-
const _hoisted_31
|
|
571
|
-
const _hoisted_32
|
|
572
|
-
const _hoisted_33
|
|
573
|
-
const _hoisted_34
|
|
574
|
-
const _hoisted_35
|
|
569
|
+
const _hoisted_30 = { class: "box" };
|
|
570
|
+
const _hoisted_31 = ["src"];
|
|
571
|
+
const _hoisted_32 = ["src"];
|
|
572
|
+
const _hoisted_33 = ["src"];
|
|
573
|
+
const _hoisted_34 = ["src"];
|
|
574
|
+
const _hoisted_35 = { class: "tools-title" };
|
|
575
575
|
const _hoisted_36 = ["src"];
|
|
576
576
|
const _hoisted_37 = ["src"];
|
|
577
577
|
const _hoisted_38 = { class: "tools-title_content" };
|
|
@@ -592,11 +592,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
592
592
|
const _component_colorPicker = resolveComponent("colorPicker");
|
|
593
593
|
const _directive_click_outside = resolveDirective("click-outside");
|
|
594
594
|
return $props.editor.fontInfo ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
595
|
-
createElementVNode("div", _hoisted_2$
|
|
595
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
596
596
|
createVNode(_component_el_tooltip, {
|
|
597
597
|
class: "item",
|
|
598
598
|
effect: "dark",
|
|
599
|
-
content: "
|
|
599
|
+
content: "撤回",
|
|
600
600
|
placement: "top"
|
|
601
601
|
}, {
|
|
602
602
|
default: withCtx(() => [
|
|
@@ -608,14 +608,14 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
608
608
|
height: "40",
|
|
609
609
|
alt: "",
|
|
610
610
|
onClick: _cache[0] || (_cache[0] = ($event) => $options.back($event))
|
|
611
|
-
}, null, 12, _hoisted_3$
|
|
611
|
+
}, null, 12, _hoisted_3$5)
|
|
612
612
|
]),
|
|
613
613
|
_: 1
|
|
614
614
|
}),
|
|
615
615
|
createVNode(_component_el_tooltip, {
|
|
616
616
|
class: "item",
|
|
617
617
|
effect: "dark",
|
|
618
|
-
content: "
|
|
618
|
+
content: "反撤回",
|
|
619
619
|
placement: "top"
|
|
620
620
|
}, {
|
|
621
621
|
default: withCtx(() => [
|
|
@@ -627,7 +627,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
627
627
|
height: "40",
|
|
628
628
|
alt: "",
|
|
629
629
|
onClick: _cache[1] || (_cache[1] = ($event) => $options.forward($event))
|
|
630
|
-
}, null, 12, _hoisted_4$
|
|
630
|
+
}, null, 12, _hoisted_4$3)
|
|
631
631
|
]),
|
|
632
632
|
_: 1
|
|
633
633
|
}),
|
|
@@ -638,7 +638,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
638
638
|
createVNode(_component_el_tooltip, {
|
|
639
639
|
class: "item",
|
|
640
640
|
effect: "dark",
|
|
641
|
-
content: "
|
|
641
|
+
content: "清除格式",
|
|
642
642
|
placement: "top"
|
|
643
643
|
}, {
|
|
644
644
|
default: withCtx(() => [
|
|
@@ -648,18 +648,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
648
648
|
height: "40",
|
|
649
649
|
alt: "",
|
|
650
650
|
onClick: _cache[2] || (_cache[2] = (...args) => $options.clearFormat && $options.clearFormat(...args))
|
|
651
|
-
}, null, 8, _hoisted_5$
|
|
651
|
+
}, null, 8, _hoisted_5$3)
|
|
652
652
|
]),
|
|
653
653
|
_: 1
|
|
654
654
|
}),
|
|
655
655
|
createVNode(_component_el_tooltip, {
|
|
656
656
|
class: "item",
|
|
657
657
|
effect: "dark",
|
|
658
|
-
content: "
|
|
658
|
+
content: "格式刷",
|
|
659
659
|
placement: "top"
|
|
660
660
|
}, {
|
|
661
661
|
default: withCtx(() => [
|
|
662
|
-
createElementVNode("div", _hoisted_6$
|
|
662
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
663
663
|
createElementVNode("img", {
|
|
664
664
|
src: $options.getImageUrl("tools_refresh@3x.png"),
|
|
665
665
|
width: "40",
|
|
@@ -686,7 +686,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
686
686
|
createVNode(_component_el_tooltip, {
|
|
687
687
|
class: "item",
|
|
688
688
|
effect: "dark",
|
|
689
|
-
content: "
|
|
689
|
+
content: "字号",
|
|
690
690
|
placement: "top"
|
|
691
691
|
}, {
|
|
692
692
|
default: withCtx(() => [
|
|
@@ -720,7 +720,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
720
720
|
createElementVNode("span", {
|
|
721
721
|
style: normalizeStyle({ fontSize: item.value })
|
|
722
722
|
}, toDisplayString(item.name), 5),
|
|
723
|
-
createElementVNode("span", _hoisted_13$
|
|
723
|
+
createElementVNode("span", _hoisted_13$1, toDisplayString(item.desc), 1)
|
|
724
724
|
], 10, _hoisted_12$2);
|
|
725
725
|
}), 128))
|
|
726
726
|
])), [
|
|
@@ -736,11 +736,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
736
736
|
createVNode(_component_el_tooltip, {
|
|
737
737
|
class: "item",
|
|
738
738
|
effect: "dark",
|
|
739
|
-
content: "
|
|
739
|
+
content: "标题",
|
|
740
740
|
placement: "top"
|
|
741
741
|
}, {
|
|
742
742
|
default: withCtx(() => [
|
|
743
|
-
createElementVNode("div", _hoisted_14$
|
|
743
|
+
createElementVNode("div", _hoisted_14$1, [
|
|
744
744
|
createElementVNode("img", {
|
|
745
745
|
src: $options.getImageUrl("tools_title@3x.png"),
|
|
746
746
|
"data-editor-id": "makeHeader",
|
|
@@ -748,8 +748,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
748
748
|
height: "40",
|
|
749
749
|
alt: "",
|
|
750
750
|
onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
|
|
751
|
-
}, null, 8, _hoisted_15$
|
|
752
|
-
$data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$
|
|
751
|
+
}, null, 8, _hoisted_15$1),
|
|
752
|
+
$data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$1)) : createCommentVNode("", true)
|
|
753
753
|
])
|
|
754
754
|
]),
|
|
755
755
|
_: 1
|
|
@@ -757,7 +757,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
757
757
|
createVNode(_component_el_tooltip, {
|
|
758
758
|
class: "item",
|
|
759
759
|
effect: "dark",
|
|
760
|
-
content: "
|
|
760
|
+
content: "加粗",
|
|
761
761
|
placement: "top"
|
|
762
762
|
}, {
|
|
763
763
|
default: withCtx(() => [
|
|
@@ -785,7 +785,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
785
785
|
createVNode(_component_el_tooltip, {
|
|
786
786
|
class: "item",
|
|
787
787
|
effect: "dark",
|
|
788
|
-
content: "
|
|
788
|
+
content: "列表",
|
|
789
789
|
placement: "top"
|
|
790
790
|
}, {
|
|
791
791
|
default: withCtx(() => [
|
|
@@ -819,13 +819,13 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
819
819
|
onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
|
|
820
820
|
$options.setStyle("makeUnorderedList");
|
|
821
821
|
}))
|
|
822
|
-
}, "
|
|
822
|
+
}, "无序列表"),
|
|
823
823
|
createElementVNode("li", {
|
|
824
824
|
"data-editor-id": "makeHeader",
|
|
825
825
|
onClick: _cache[9] || (_cache[9] = ($event) => $options.updatePosition(() => {
|
|
826
826
|
$options.setStyle("makeOrderedList");
|
|
827
827
|
}))
|
|
828
|
-
}, "
|
|
828
|
+
}, "有序列表")
|
|
829
829
|
])), [
|
|
830
830
|
[_directive_click_outside, $options.handlePopover]
|
|
831
831
|
])
|
|
@@ -836,7 +836,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
836
836
|
createVNode(_component_el_tooltip, {
|
|
837
837
|
class: "item",
|
|
838
838
|
effect: "dark",
|
|
839
|
-
content: "
|
|
839
|
+
content: "倾斜",
|
|
840
840
|
placement: "top"
|
|
841
841
|
}, {
|
|
842
842
|
default: withCtx(() => [
|
|
@@ -856,7 +856,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
856
856
|
createVNode(_component_el_tooltip, {
|
|
857
857
|
class: "item",
|
|
858
858
|
effect: "dark",
|
|
859
|
-
content: "
|
|
859
|
+
content: "下划线",
|
|
860
860
|
placement: "top"
|
|
861
861
|
}, {
|
|
862
862
|
default: withCtx(() => [
|
|
@@ -877,18 +877,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
877
877
|
key: 0,
|
|
878
878
|
class: "item",
|
|
879
879
|
effect: "dark",
|
|
880
|
-
content: "
|
|
880
|
+
content: "链接",
|
|
881
881
|
placement: "top"
|
|
882
882
|
}, {
|
|
883
883
|
default: withCtx(() => [
|
|
884
|
-
createElementVNode("div", _hoisted_30
|
|
884
|
+
createElementVNode("div", _hoisted_30, [
|
|
885
885
|
createElementVNode("img", {
|
|
886
886
|
src: $options.getImageUrl("icon_web_link@2x.png"),
|
|
887
887
|
width: "40",
|
|
888
888
|
height: "40",
|
|
889
889
|
alt: "",
|
|
890
890
|
onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
|
|
891
|
-
}, null, 8, _hoisted_31
|
|
891
|
+
}, null, 8, _hoisted_31)
|
|
892
892
|
])
|
|
893
893
|
]),
|
|
894
894
|
_: 1
|
|
@@ -896,7 +896,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
896
896
|
createVNode(_component_el_tooltip, {
|
|
897
897
|
class: "item",
|
|
898
898
|
effect: "dark",
|
|
899
|
-
content: "
|
|
899
|
+
content: "首行缩进",
|
|
900
900
|
placement: "top"
|
|
901
901
|
}, {
|
|
902
902
|
default: withCtx(() => [
|
|
@@ -906,14 +906,14 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
906
906
|
height: "40",
|
|
907
907
|
alt: "",
|
|
908
908
|
onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
|
|
909
|
-
}, null, 8, _hoisted_32
|
|
909
|
+
}, null, 8, _hoisted_32)
|
|
910
910
|
]),
|
|
911
911
|
_: 1
|
|
912
912
|
}),
|
|
913
913
|
createVNode(_component_el_tooltip, {
|
|
914
914
|
class: "item",
|
|
915
915
|
effect: "dark",
|
|
916
|
-
content: "
|
|
916
|
+
content: "文字颜色",
|
|
917
917
|
placement: "top"
|
|
918
918
|
}, {
|
|
919
919
|
default: withCtx(() => [
|
|
@@ -926,13 +926,13 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
926
926
|
width: "24",
|
|
927
927
|
height: "40",
|
|
928
928
|
alt: ""
|
|
929
|
-
}, null, 8, _hoisted_33
|
|
929
|
+
}, null, 8, _hoisted_33),
|
|
930
930
|
createElementVNode("img", {
|
|
931
931
|
src: $options.getImageUrl("tools_arrow@3x.png"),
|
|
932
932
|
width: "16",
|
|
933
933
|
height: "40",
|
|
934
934
|
alt: ""
|
|
935
|
-
}, null, 8, _hoisted_34
|
|
935
|
+
}, null, 8, _hoisted_34),
|
|
936
936
|
createVNode(_component_colorPicker, {
|
|
937
937
|
ref: "colorPicker",
|
|
938
938
|
modelValue: $data.color,
|
|
@@ -953,11 +953,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
953
953
|
width: "152"
|
|
954
954
|
}, {
|
|
955
955
|
reference: withCtx(() => [
|
|
956
|
-
createElementVNode("div", _hoisted_35
|
|
956
|
+
createElementVNode("div", _hoisted_35, [
|
|
957
957
|
createVNode(_component_el_tooltip, {
|
|
958
958
|
class: "item",
|
|
959
959
|
effect: "dark",
|
|
960
|
-
content: "
|
|
960
|
+
content: "对齐方式",
|
|
961
961
|
placement: "top"
|
|
962
962
|
}, {
|
|
963
963
|
default: withCtx(() => [
|
|
@@ -1015,7 +1015,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1015
1015
|
createVNode(_component_el_tooltip, {
|
|
1016
1016
|
class: "item",
|
|
1017
1017
|
effect: "dark",
|
|
1018
|
-
content: "
|
|
1018
|
+
content: "插入图片",
|
|
1019
1019
|
placement: "top"
|
|
1020
1020
|
}, {
|
|
1021
1021
|
default: withCtx(() => [
|
|
@@ -1037,11 +1037,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1037
1037
|
createElementVNode("li", {
|
|
1038
1038
|
class: normalizeClass([$data.activeImgType === "normal" ? "active" : ""]),
|
|
1039
1039
|
onClick: _cache[18] || (_cache[18] = ($event) => $options.insertImg("normal"))
|
|
1040
|
-
}, toDisplayString("
|
|
1040
|
+
}, toDisplayString("上传图片"), 2),
|
|
1041
1041
|
createElementVNode("li", {
|
|
1042
1042
|
class: normalizeClass([$data.activeImgType === "seamless" ? "active" : ""]),
|
|
1043
1043
|
onClick: _cache[19] || (_cache[19] = ($event) => $options.insertImg("seamless"))
|
|
1044
|
-
}, toDisplayString("
|
|
1044
|
+
}, toDisplayString("上传无缝拼接图片"), 2)
|
|
1045
1045
|
])), [
|
|
1046
1046
|
[_directive_click_outside, $options.handlePopover]
|
|
1047
1047
|
])
|
|
@@ -1052,7 +1052,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1052
1052
|
key: 2,
|
|
1053
1053
|
class: "item",
|
|
1054
1054
|
effect: "dark",
|
|
1055
|
-
content: "
|
|
1055
|
+
content: "插入视频",
|
|
1056
1056
|
placement: "top"
|
|
1057
1057
|
}, {
|
|
1058
1058
|
default: withCtx(() => [
|
|
@@ -1070,7 +1070,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1070
1070
|
key: 3,
|
|
1071
1071
|
class: "item",
|
|
1072
1072
|
effect: "dark",
|
|
1073
|
-
content: "
|
|
1073
|
+
content: "插入文章/视频",
|
|
1074
1074
|
placement: "top"
|
|
1075
1075
|
}, {
|
|
1076
1076
|
default: withCtx(() => [
|
|
@@ -1088,7 +1088,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1088
1088
|
key: 4,
|
|
1089
1089
|
class: "item",
|
|
1090
1090
|
effect: "dark",
|
|
1091
|
-
content: "
|
|
1091
|
+
content: "采集文章",
|
|
1092
1092
|
placement: "top"
|
|
1093
1093
|
}, {
|
|
1094
1094
|
default: withCtx(() => [
|
|
@@ -1105,20 +1105,16 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1105
1105
|
])
|
|
1106
1106
|
])) : createCommentVNode("", true);
|
|
1107
1107
|
}
|
|
1108
|
-
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-
|
|
1108
|
+
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-50235bb8"]]);
|
|
1109
1109
|
const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
|
|
1110
|
-
const index_vue_vue_type_style_index_0_lang$5 = "";
|
|
1111
1110
|
const _hoisted_1$7 = { key: 0 };
|
|
1112
|
-
const _hoisted_2$
|
|
1113
|
-
const _hoisted_3$
|
|
1114
|
-
const _hoisted_4$5 = {
|
|
1111
|
+
const _hoisted_2$4 = { class: "basic-dialog_title" };
|
|
1112
|
+
const _hoisted_3$4 = {
|
|
1115
1113
|
key: 0,
|
|
1116
1114
|
class: "dialog-footer"
|
|
1117
1115
|
};
|
|
1118
|
-
const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
1119
|
-
const _hoisted_6$2 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
|
|
1120
1116
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1121
|
-
|
|
1117
|
+
__name: "index",
|
|
1122
1118
|
props: {
|
|
1123
1119
|
visible: { type: Boolean, default: false },
|
|
1124
1120
|
showBtn: { type: Boolean, default: true },
|
|
@@ -1126,9 +1122,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1126
1122
|
showTitle: { type: Boolean, default: true }
|
|
1127
1123
|
},
|
|
1128
1124
|
emits: ["submit", "cancel"],
|
|
1129
|
-
setup(__props, { emit:
|
|
1125
|
+
setup(__props, { emit: __emit }) {
|
|
1130
1126
|
const props = __props;
|
|
1131
1127
|
const parent = inject("vm");
|
|
1128
|
+
const emits = __emit;
|
|
1132
1129
|
const handleClose = () => {
|
|
1133
1130
|
var _a;
|
|
1134
1131
|
(_a = parent.setStatus) == null ? void 0 : _a.call(parent, false);
|
|
@@ -1150,31 +1147,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1150
1147
|
});
|
|
1151
1148
|
return (_ctx, _cache) => {
|
|
1152
1149
|
return openBlock(), createBlock(unref(ElDialog), {
|
|
1153
|
-
modelValue:
|
|
1154
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
1150
|
+
modelValue: dialogVisible.value,
|
|
1151
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
|
|
1155
1152
|
"before-close": handleClose,
|
|
1156
1153
|
width: __props.width,
|
|
1157
1154
|
class: normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
|
|
1158
1155
|
}, {
|
|
1159
1156
|
header: withCtx(() => [
|
|
1160
1157
|
__props.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1161
|
-
createElementVNode("div", _hoisted_2$
|
|
1162
|
-
|
|
1158
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
1159
|
+
_cache[1] || (_cache[1] = createElementVNode("span", { class: "basic-dialog_divider" }, null, -1)),
|
|
1163
1160
|
renderSlot(_ctx.$slots, "title")
|
|
1164
1161
|
])
|
|
1165
1162
|
])) : createCommentVNode("", true)
|
|
1166
1163
|
]),
|
|
1167
1164
|
footer: withCtx(() => [
|
|
1168
|
-
__props.showBtn ? (openBlock(), createElementBlock("span",
|
|
1165
|
+
__props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_3$4, [
|
|
1169
1166
|
createVNode(unref(ElButton), {
|
|
1170
1167
|
style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
|
|
1171
1168
|
plain: "",
|
|
1172
1169
|
round: "",
|
|
1173
1170
|
onClick: handleClose
|
|
1174
1171
|
}, {
|
|
1175
|
-
default: withCtx(() => [
|
|
1176
|
-
|
|
1177
|
-
]),
|
|
1172
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
1173
|
+
createTextVNode("取消", -1)
|
|
1174
|
+
])]),
|
|
1178
1175
|
_: 1
|
|
1179
1176
|
}),
|
|
1180
1177
|
createVNode(unref(ElButton), {
|
|
@@ -1183,9 +1180,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1183
1180
|
type: "primary",
|
|
1184
1181
|
onClick: confirm
|
|
1185
1182
|
}, {
|
|
1186
|
-
default: withCtx(() => [
|
|
1187
|
-
|
|
1188
|
-
]),
|
|
1183
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
1184
|
+
createTextVNode("确认", -1)
|
|
1185
|
+
])]),
|
|
1189
1186
|
_: 1
|
|
1190
1187
|
})
|
|
1191
1188
|
])) : createCommentVNode("", true)
|
|
@@ -1198,16 +1195,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1198
1195
|
};
|
|
1199
1196
|
}
|
|
1200
1197
|
});
|
|
1198
|
+
const index_vue_vue_type_style_index_0_lang$5 = "";
|
|
1201
1199
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1202
1200
|
function getDefaultExportFromCjs(x) {
|
|
1203
1201
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1204
1202
|
}
|
|
1205
|
-
var date$
|
|
1206
|
-
|
|
1203
|
+
var date$2 = { exports: {} };
|
|
1204
|
+
var date = date$2.exports;
|
|
1205
|
+
Object.defineProperty(date, "__esModule", { value: true });
|
|
1207
1206
|
function replacementDate(data, fmt) {
|
|
1208
1207
|
for (var k in data) {
|
|
1209
1208
|
if (new RegExp("(" + k + ")").test(fmt)) {
|
|
1210
|
-
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? data[k] :
|
|
1209
|
+
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? data[k] : "00".concat(data[k]).substr(("" + data[k]).length));
|
|
1211
1210
|
}
|
|
1212
1211
|
}
|
|
1213
1212
|
return fmt;
|
|
@@ -1218,126 +1217,130 @@ function replacementYear(date2, fmt) {
|
|
|
1218
1217
|
}
|
|
1219
1218
|
return fmt;
|
|
1220
1219
|
}
|
|
1221
|
-
var DateClass =
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
if (fmt === void 0) {
|
|
1226
|
-
fmt = "YYYY-MM-DD HH:mm:ss";
|
|
1220
|
+
var DateClass = (
|
|
1221
|
+
/** @class */
|
|
1222
|
+
function() {
|
|
1223
|
+
function DateClass2() {
|
|
1227
1224
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
"
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1225
|
+
DateClass2.prototype.format = function(date2, fmt) {
|
|
1226
|
+
if (fmt === void 0) {
|
|
1227
|
+
fmt = "YYYY-MM-DD HH:mm:ss";
|
|
1228
|
+
}
|
|
1229
|
+
if (!date2)
|
|
1230
|
+
return "";
|
|
1231
|
+
var timeData = typeof date2 === "string" ? new Date(date2.replace(/-/g, "/")) : date2;
|
|
1232
|
+
timeData = typeof date2 === "number" ? new Date(date2) : timeData;
|
|
1233
|
+
var o = {
|
|
1234
|
+
"M+": timeData.getMonth() + 1,
|
|
1235
|
+
"D+": timeData.getDate(),
|
|
1236
|
+
"h+": timeData.getHours() % 12 === 0 ? 12 : timeData.getHours() % 12,
|
|
1237
|
+
"H+": timeData.getHours(),
|
|
1238
|
+
"m+": timeData.getMinutes(),
|
|
1239
|
+
"s+": timeData.getSeconds(),
|
|
1240
|
+
"q+": Math.floor((timeData.getMonth() + 3) / 3),
|
|
1241
|
+
"S": timeData.getMilliseconds()
|
|
1242
|
+
};
|
|
1243
|
+
var week = {
|
|
1244
|
+
"0": "日",
|
|
1245
|
+
"1": "一",
|
|
1246
|
+
"2": "二",
|
|
1247
|
+
"3": "三",
|
|
1248
|
+
"4": "四",
|
|
1249
|
+
"5": "五",
|
|
1250
|
+
"6": "六"
|
|
1251
|
+
};
|
|
1252
|
+
fmt = replacementYear(timeData, fmt);
|
|
1253
|
+
if (/(E+)/.test(fmt)) {
|
|
1254
|
+
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "星期" : "周" : "") + week["".concat(timeData.getDay(), " ")]);
|
|
1255
|
+
}
|
|
1256
|
+
return replacementDate(o, fmt);
|
|
1241
1257
|
};
|
|
1242
|
-
|
|
1243
|
-
"
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
"3": "\u4E09",
|
|
1247
|
-
"4": "\u56DB",
|
|
1248
|
-
"5": "\u4E94",
|
|
1249
|
-
"6": "\u516D"
|
|
1258
|
+
DateClass2.prototype.addDaysToDate = function(date2, days) {
|
|
1259
|
+
var d = typeof date2 === "object" ? date2 : new Date(date2);
|
|
1260
|
+
d.setDate(d.getDate() + days);
|
|
1261
|
+
return d.toISOString().split("T")[0];
|
|
1250
1262
|
};
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
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" + dd : dd,
|
|
1275
|
-
hh: hh < 10 ? "0" + hh : hh,
|
|
1276
|
-
mm: mm < 10 ? "0" + mm : mm,
|
|
1277
|
-
ss: ss < 10 ? "0" + ss : ss
|
|
1263
|
+
DateClass2.prototype.remainTime = function(endTime, startTime) {
|
|
1264
|
+
if (startTime === void 0) {
|
|
1265
|
+
startTime = /* @__PURE__ */ new Date();
|
|
1266
|
+
}
|
|
1267
|
+
var ts = Number(endTime) - Number(startTime);
|
|
1268
|
+
var dd = Math.floor(ts / 1e3 / 60 / 60 / 24);
|
|
1269
|
+
var hh = Math.floor(ts / 1e3 / 60 / 60 % 24);
|
|
1270
|
+
var mm = Math.floor(ts / 1e3 / 60 % 60);
|
|
1271
|
+
var ss = Math.floor(ts / 1e3 % 60);
|
|
1272
|
+
if (ts <= 0)
|
|
1273
|
+
return false;
|
|
1274
|
+
return {
|
|
1275
|
+
dd: dd < 10 ? "0".concat(dd) : dd,
|
|
1276
|
+
hh: hh < 10 ? "0".concat(hh) : hh,
|
|
1277
|
+
mm: mm < 10 ? "0".concat(mm) : mm,
|
|
1278
|
+
ss: ss < 10 ? "0".concat(ss) : ss
|
|
1279
|
+
};
|
|
1278
1280
|
};
|
|
1279
|
-
|
|
1280
|
-
|
|
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
|
-
|
|
1281
|
+
DateClass2.prototype.formatPassTime = function(startTime) {
|
|
1282
|
+
var currentTime = /* @__PURE__ */ new Date();
|
|
1283
|
+
var time = currentTime - startTime;
|
|
1284
|
+
var year = Math.floor(time / (1e3 * 60 * 60 * 24) / 30 / 12);
|
|
1285
|
+
if (year)
|
|
1286
|
+
return "".concat(year, "年前");
|
|
1287
|
+
var month = Math.floor(time / (1e3 * 60 * 60 * 24) / 30);
|
|
1288
|
+
if (month)
|
|
1289
|
+
return "".concat(month, "个月前");
|
|
1290
|
+
var day = Math.floor(time / (1e3 * 60 * 60 * 24));
|
|
1291
|
+
if (day)
|
|
1292
|
+
return "".concat(day, "天前");
|
|
1293
|
+
var hour = Math.floor(time / (1e3 * 60 * 60));
|
|
1294
|
+
if (hour)
|
|
1295
|
+
return "".concat(hour, "小时前");
|
|
1296
|
+
var min = Math.floor(time / (1e3 * 60));
|
|
1297
|
+
if (min)
|
|
1298
|
+
return "".concat(min, "分钟前");
|
|
1299
|
+
else
|
|
1300
|
+
return "刚刚";
|
|
1301
|
+
};
|
|
1302
|
+
DateClass2.prototype.formatPassTimeForList = function(time) {
|
|
1303
|
+
return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY年MM月DD日", true);
|
|
1304
|
+
};
|
|
1305
|
+
DateClass2.prototype.formatPassTimeForDetail = function(time, fmt, noYear) {
|
|
1306
|
+
if (fmt === void 0) {
|
|
1307
|
+
fmt = "YYYY-MM-DD";
|
|
1308
|
+
}
|
|
1309
|
+
var date2 = typeof time === "number" ? new Date(time) : new Date((time || "").replace(/-/g, "/"));
|
|
1310
|
+
var diff = ((/* @__PURE__ */ new Date()).getTime() - date2.getTime()) / 1e3;
|
|
1311
|
+
var dayDiff = Math.floor(diff / 86400);
|
|
1312
|
+
var isValidDate = Object.prototype.toString.call(date2) === "[object Date]" && !isNaN(date2.getTime());
|
|
1313
|
+
if (!isValidDate)
|
|
1314
|
+
return "";
|
|
1315
|
+
var formatDate = function() {
|
|
1316
|
+
var today = new Date(date2);
|
|
1317
|
+
var o = {
|
|
1318
|
+
"Y+": today.getFullYear(),
|
|
1319
|
+
"M+": ("0" + (today.getMonth() + 1)).slice(-2),
|
|
1320
|
+
"D+": ("0" + today.getDate()).slice(-2)
|
|
1321
|
+
};
|
|
1322
|
+
fmt = replacementYear(date2, fmt);
|
|
1323
|
+
var year = today.getFullYear();
|
|
1324
|
+
if (!((/* @__PURE__ */ new Date()).getFullYear() > year) && noYear) {
|
|
1325
|
+
var backData = replacementDate(o, fmt);
|
|
1326
|
+
return backData.split("年")[1];
|
|
1327
|
+
}
|
|
1328
|
+
return replacementDate(o, fmt);
|
|
1320
1329
|
};
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
if (
|
|
1324
|
-
|
|
1325
|
-
return backData.split("\u5E74")[1];
|
|
1330
|
+
if (dayDiff === -1) {
|
|
1331
|
+
return "刚刚";
|
|
1332
|
+
} else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
|
|
1333
|
+
return formatDate();
|
|
1326
1334
|
}
|
|
1327
|
-
return
|
|
1335
|
+
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 + "天前";
|
|
1328
1336
|
};
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
return DateClass2;
|
|
1337
|
-
}();
|
|
1338
|
-
date$1.exports = new DateClass();
|
|
1339
|
-
const date = /* @__PURE__ */ getDefaultExportFromCjs(date$1.exports);
|
|
1340
|
-
var tools$1 = { exports: {} };
|
|
1337
|
+
return DateClass2;
|
|
1338
|
+
}()
|
|
1339
|
+
);
|
|
1340
|
+
date$2.exports = new DateClass();
|
|
1341
|
+
var dateExports = date$2.exports;
|
|
1342
|
+
const date$1 = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
|
|
1343
|
+
var tools$2 = { exports: {} };
|
|
1341
1344
|
var _listCacheClear;
|
|
1342
1345
|
var hasRequired_listCacheClear;
|
|
1343
1346
|
function require_listCacheClear() {
|
|
@@ -2244,6 +2247,7 @@ function requireStubFalse() {
|
|
|
2244
2247
|
stubFalse_1 = stubFalse;
|
|
2245
2248
|
return stubFalse_1;
|
|
2246
2249
|
}
|
|
2250
|
+
isBuffer.exports;
|
|
2247
2251
|
var hasRequiredIsBuffer;
|
|
2248
2252
|
function requireIsBuffer() {
|
|
2249
2253
|
if (hasRequiredIsBuffer)
|
|
@@ -2323,6 +2327,7 @@ function require_baseUnary() {
|
|
|
2323
2327
|
return _baseUnary;
|
|
2324
2328
|
}
|
|
2325
2329
|
var _nodeUtil = { exports: {} };
|
|
2330
|
+
_nodeUtil.exports;
|
|
2326
2331
|
var hasRequired_nodeUtil;
|
|
2327
2332
|
function require_nodeUtil() {
|
|
2328
2333
|
if (hasRequired_nodeUtil)
|
|
@@ -2372,7 +2377,11 @@ function require_arrayLikeKeys() {
|
|
|
2372
2377
|
function arrayLikeKeys(value, inherited) {
|
|
2373
2378
|
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;
|
|
2374
2379
|
for (var key in value) {
|
|
2375
|
-
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes &&
|
|
2380
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2381
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2382
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2383
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
2384
|
+
isIndex(key, length)))) {
|
|
2376
2385
|
result.push(key);
|
|
2377
2386
|
}
|
|
2378
2387
|
}
|
|
@@ -2552,6 +2561,7 @@ function require_baseAssignIn() {
|
|
|
2552
2561
|
return _baseAssignIn;
|
|
2553
2562
|
}
|
|
2554
2563
|
var _cloneBuffer = { exports: {} };
|
|
2564
|
+
_cloneBuffer.exports;
|
|
2555
2565
|
var hasRequired_cloneBuffer;
|
|
2556
2566
|
function require_cloneBuffer() {
|
|
2557
2567
|
if (hasRequired_cloneBuffer)
|
|
@@ -3216,296 +3226,295 @@ function requireClipboardCopy() {
|
|
|
3216
3226
|
}
|
|
3217
3227
|
return clipboardCopy_1;
|
|
3218
3228
|
}
|
|
3219
|
-
|
|
3229
|
+
var tools = tools$2.exports;
|
|
3230
|
+
Object.defineProperty(tools, "__esModule", { value: true });
|
|
3220
3231
|
var previous = 0;
|
|
3221
3232
|
var timeout = null;
|
|
3222
|
-
var ToolsClass =
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3233
|
+
var ToolsClass = (
|
|
3234
|
+
/** @class */
|
|
3235
|
+
function() {
|
|
3236
|
+
function ToolsClass2() {
|
|
3237
|
+
var _this = this;
|
|
3238
|
+
this.stopScroll = function(className) {
|
|
3239
|
+
if (!(window && window.document)) {
|
|
3240
|
+
return new Error("仅支持浏览器");
|
|
3241
|
+
}
|
|
3242
|
+
var html = document.documentElement;
|
|
3243
|
+
html.style.overflow = "hidden";
|
|
3244
|
+
html.style.height = "100%";
|
|
3245
|
+
var body = document.body;
|
|
3246
|
+
body.style.overflow = "hidden";
|
|
3247
|
+
body.style.height = "100%";
|
|
3248
|
+
if (className) {
|
|
3249
|
+
var dom = document.querySelector(".".concat(className));
|
|
3250
|
+
dom && dom.addEventListener("touchmove", _this.__setDefault__);
|
|
3251
|
+
}
|
|
3252
|
+
};
|
|
3253
|
+
this.startScroll = function(className) {
|
|
3254
|
+
if (!(window && window.document)) {
|
|
3255
|
+
return new Error("仅支持浏览器");
|
|
3256
|
+
}
|
|
3257
|
+
var html = document.documentElement;
|
|
3258
|
+
html.style.overflow = "visible";
|
|
3259
|
+
html.style.height = "auto";
|
|
3260
|
+
var body = document.body;
|
|
3261
|
+
body.style.overflow = "visible";
|
|
3262
|
+
body.style.height = "auto";
|
|
3263
|
+
if (className) {
|
|
3264
|
+
var dom = document.querySelector(".".concat(className));
|
|
3265
|
+
dom && dom.removeEventListener("touchmove", _this.__setDefault__);
|
|
3266
|
+
}
|
|
3267
|
+
};
|
|
3268
|
+
this.objectToArray = function(obj) {
|
|
3269
|
+
var arr = [];
|
|
3270
|
+
if (typeof obj === "object") {
|
|
3271
|
+
for (var key in obj) {
|
|
3272
|
+
if (obj.hasOwnProperty(key)) {
|
|
3273
|
+
arr.push([key, obj[key]].join("="));
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
return arr;
|
|
3278
|
+
};
|
|
3279
|
+
this.convertKeyValueEnum = function(obj) {
|
|
3280
|
+
var result = {};
|
|
3281
|
+
if (typeof obj === "object") {
|
|
3282
|
+
for (var key in obj) {
|
|
3283
|
+
if (obj.hasOwnProperty(key)) {
|
|
3284
|
+
result[obj[key]] = key;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
return result;
|
|
3289
|
+
};
|
|
3290
|
+
this.isDefined = function(val) {
|
|
3291
|
+
return val !== void 0 && val !== null;
|
|
3292
|
+
};
|
|
3293
|
+
this.__loaded__ = {};
|
|
3294
|
+
this.__setDefault__ = function(e) {
|
|
3295
|
+
e && e.preventDefault();
|
|
3296
|
+
};
|
|
3297
|
+
}
|
|
3298
|
+
ToolsClass2.prototype.deepCopy = function(data) {
|
|
3299
|
+
return JSON.parse(JSON.stringify(data));
|
|
3239
3300
|
};
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
var html = document.documentElement;
|
|
3245
|
-
html.style.overflow = "visible";
|
|
3246
|
-
html.style.height = "auto";
|
|
3247
|
-
var body = document.body;
|
|
3248
|
-
body.style.overflow = "visible";
|
|
3249
|
-
body.style.height = "auto";
|
|
3250
|
-
if (className) {
|
|
3251
|
-
var dom = document.querySelector("." + className);
|
|
3252
|
-
dom && dom.removeEventListener("touchmove", _this.__setDefault__);
|
|
3301
|
+
ToolsClass2.prototype.deepCopy2 = function(obj) {
|
|
3302
|
+
var _obj = Array.isArray(obj) ? [] : {};
|
|
3303
|
+
for (var i in obj) {
|
|
3304
|
+
_obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
|
|
3253
3305
|
}
|
|
3306
|
+
return _obj;
|
|
3254
3307
|
};
|
|
3255
|
-
|
|
3256
|
-
var
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3308
|
+
ToolsClass2.prototype.deepCopy3 = function(obj) {
|
|
3309
|
+
var deepcopy = requireCloneDeep();
|
|
3310
|
+
return deepcopy(obj);
|
|
3311
|
+
};
|
|
3312
|
+
ToolsClass2.prototype.debounce = function(func, wait) {
|
|
3313
|
+
var delay = function() {
|
|
3314
|
+
var args = arguments;
|
|
3315
|
+
if (timeout)
|
|
3316
|
+
clearTimeout(timeout);
|
|
3317
|
+
timeout = setTimeout(function() {
|
|
3318
|
+
func.apply(delay, args);
|
|
3319
|
+
}, wait);
|
|
3320
|
+
};
|
|
3321
|
+
return delay;
|
|
3322
|
+
};
|
|
3323
|
+
ToolsClass2.prototype.throttle = function(func, wait) {
|
|
3324
|
+
var delay = function() {
|
|
3325
|
+
var now = Date.now();
|
|
3326
|
+
if (now - previous > wait) {
|
|
3327
|
+
func.apply(delay, arguments);
|
|
3328
|
+
previous = now;
|
|
3262
3329
|
}
|
|
3330
|
+
};
|
|
3331
|
+
return delay;
|
|
3332
|
+
};
|
|
3333
|
+
ToolsClass2.prototype.getUrlName = function(url) {
|
|
3334
|
+
return url && url.split("?")[0].split("/").reverse()[0];
|
|
3335
|
+
};
|
|
3336
|
+
ToolsClass2.prototype.loadJs = function(url) {
|
|
3337
|
+
var _this = this;
|
|
3338
|
+
if (!(window && window.document)) {
|
|
3339
|
+
return new Error("仅支持浏览器");
|
|
3263
3340
|
}
|
|
3264
|
-
|
|
3341
|
+
var name = this.getUrlName(url);
|
|
3342
|
+
var id = "js_" + name;
|
|
3343
|
+
return new Promise(function(resolve, reject) {
|
|
3344
|
+
if (_this.__loaded__[id]) {
|
|
3345
|
+
return resolve();
|
|
3346
|
+
}
|
|
3347
|
+
var script = document.createElement("script");
|
|
3348
|
+
script.type = "text/javascript";
|
|
3349
|
+
script.async = true;
|
|
3350
|
+
script.src = url;
|
|
3351
|
+
script.id = id;
|
|
3352
|
+
script.onload = function() {
|
|
3353
|
+
_this.__loaded__[id] = true;
|
|
3354
|
+
resolve();
|
|
3355
|
+
};
|
|
3356
|
+
script.onerror = function(e) {
|
|
3357
|
+
reject(e);
|
|
3358
|
+
};
|
|
3359
|
+
document.body.appendChild(script);
|
|
3360
|
+
});
|
|
3265
3361
|
};
|
|
3266
|
-
|
|
3267
|
-
var
|
|
3268
|
-
if (
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3362
|
+
ToolsClass2.prototype.loadCss = function(url) {
|
|
3363
|
+
var _this = this;
|
|
3364
|
+
if (!(window && window.document)) {
|
|
3365
|
+
return new Error("仅支持浏览器");
|
|
3366
|
+
}
|
|
3367
|
+
var name = this.getUrlName(url);
|
|
3368
|
+
var id = "css_" + name;
|
|
3369
|
+
return new Promise(function(resolve, reject) {
|
|
3370
|
+
if (_this.__loaded__[id]) {
|
|
3371
|
+
return resolve();
|
|
3273
3372
|
}
|
|
3373
|
+
var link = document.createElement("link");
|
|
3374
|
+
link.type = "text/css";
|
|
3375
|
+
link.rel = "stylesheet";
|
|
3376
|
+
link.href = url;
|
|
3377
|
+
link.id = id;
|
|
3378
|
+
link.onload = function() {
|
|
3379
|
+
_this.__loaded__[id] = true;
|
|
3380
|
+
resolve();
|
|
3381
|
+
};
|
|
3382
|
+
link.onerror = function(e) {
|
|
3383
|
+
reject(e);
|
|
3384
|
+
};
|
|
3385
|
+
document.head.appendChild(link);
|
|
3386
|
+
});
|
|
3387
|
+
};
|
|
3388
|
+
ToolsClass2.prototype.clipboard = function(str) {
|
|
3389
|
+
if (!(window && window.document)) {
|
|
3390
|
+
return new Error("仅支持浏览器");
|
|
3274
3391
|
}
|
|
3275
|
-
|
|
3392
|
+
var copy = requireClipboardCopy();
|
|
3393
|
+
return copy(str);
|
|
3276
3394
|
};
|
|
3277
|
-
|
|
3278
|
-
return
|
|
3395
|
+
ToolsClass2.prototype.firstUpperCase = function(str) {
|
|
3396
|
+
return str.charAt(0).toUpperCase() + str.toString().slice(1);
|
|
3279
3397
|
};
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3398
|
+
ToolsClass2.prototype.slice = function(target, length) {
|
|
3399
|
+
if (target === void 0) {
|
|
3400
|
+
target = "";
|
|
3401
|
+
}
|
|
3402
|
+
if (length === void 0) {
|
|
3403
|
+
length = 0;
|
|
3404
|
+
}
|
|
3405
|
+
return target.slice(0, length);
|
|
3283
3406
|
};
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
var _obj = Array.isArray(obj) ? [] : {};
|
|
3290
|
-
for (var i in obj) {
|
|
3291
|
-
_obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
|
|
3292
|
-
}
|
|
3293
|
-
return _obj;
|
|
3294
|
-
};
|
|
3295
|
-
ToolsClass2.prototype.deepCopy3 = function(obj) {
|
|
3296
|
-
var deepcopy = requireCloneDeep();
|
|
3297
|
-
return deepcopy(obj);
|
|
3298
|
-
};
|
|
3299
|
-
ToolsClass2.prototype.debounce = function(func, wait) {
|
|
3300
|
-
var delay = function() {
|
|
3301
|
-
var args = arguments;
|
|
3302
|
-
if (timeout)
|
|
3303
|
-
clearTimeout(timeout);
|
|
3304
|
-
timeout = setTimeout(function() {
|
|
3305
|
-
func.apply(delay, args);
|
|
3306
|
-
}, wait);
|
|
3407
|
+
ToolsClass2.prototype.guid = function() {
|
|
3408
|
+
function S4() {
|
|
3409
|
+
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
3410
|
+
}
|
|
3411
|
+
return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
|
|
3307
3412
|
};
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
var delay = function() {
|
|
3312
|
-
var now = Date.now();
|
|
3313
|
-
if (now - previous > wait) {
|
|
3314
|
-
func.apply(delay, arguments);
|
|
3315
|
-
previous = now;
|
|
3413
|
+
ToolsClass2.prototype.getBytesOfText = function(str) {
|
|
3414
|
+
if (str === void 0) {
|
|
3415
|
+
str = "";
|
|
3316
3416
|
}
|
|
3417
|
+
return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
|
|
3317
3418
|
};
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
var
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
}
|
|
3360
|
-
var link = document.createElement("link");
|
|
3361
|
-
link.type = "text/css";
|
|
3362
|
-
link.rel = "stylesheet";
|
|
3363
|
-
link.href = url;
|
|
3364
|
-
link.id = id;
|
|
3365
|
-
link.onload = function() {
|
|
3366
|
-
_this.__loaded__[id] = true;
|
|
3367
|
-
resolve();
|
|
3368
|
-
};
|
|
3369
|
-
link.onerror = function(e) {
|
|
3370
|
-
reject(e);
|
|
3371
|
-
};
|
|
3372
|
-
document.head.appendChild(link);
|
|
3373
|
-
});
|
|
3374
|
-
};
|
|
3375
|
-
ToolsClass2.prototype.clipboard = function(str) {
|
|
3376
|
-
if (!(window && window.document)) {
|
|
3377
|
-
return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
|
|
3378
|
-
}
|
|
3379
|
-
var copy = requireClipboardCopy();
|
|
3380
|
-
return copy(str);
|
|
3381
|
-
};
|
|
3382
|
-
ToolsClass2.prototype.firstUpperCase = function(str) {
|
|
3383
|
-
return str.charAt(0).toUpperCase() + str.toString().slice(1);
|
|
3384
|
-
};
|
|
3385
|
-
ToolsClass2.prototype.slice = function(target, length) {
|
|
3386
|
-
if (target === void 0) {
|
|
3387
|
-
target = "";
|
|
3388
|
-
}
|
|
3389
|
-
if (length === void 0) {
|
|
3390
|
-
length = 0;
|
|
3391
|
-
}
|
|
3392
|
-
return target.slice(0, length);
|
|
3393
|
-
};
|
|
3394
|
-
ToolsClass2.prototype.guid = function() {
|
|
3395
|
-
function S4() {
|
|
3396
|
-
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
3397
|
-
}
|
|
3398
|
-
return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
|
|
3399
|
-
};
|
|
3400
|
-
ToolsClass2.prototype.getBytesOfText = function(str) {
|
|
3401
|
-
if (str === void 0) {
|
|
3402
|
-
str = "";
|
|
3403
|
-
}
|
|
3404
|
-
return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
|
|
3405
|
-
};
|
|
3406
|
-
ToolsClass2.prototype.uniqueArr = function(arr) {
|
|
3407
|
-
return Array.from(new Set(arr));
|
|
3408
|
-
};
|
|
3409
|
-
ToolsClass2.prototype.swapArray = function(array, index1, index2) {
|
|
3410
|
-
var _a;
|
|
3411
|
-
_a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
|
|
3412
|
-
return array;
|
|
3413
|
-
};
|
|
3414
|
-
ToolsClass2.prototype.filterEmoji = function(str) {
|
|
3415
|
-
return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
|
|
3416
|
-
};
|
|
3417
|
-
ToolsClass2.prototype.containsEmoji = function(str) {
|
|
3418
|
-
var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
|
|
3419
|
-
return reg.test(str);
|
|
3420
|
-
};
|
|
3421
|
-
ToolsClass2.prototype.containsHanZi = function(str) {
|
|
3422
|
-
var reg = /[\u4e00-\u9fa5]/mg;
|
|
3423
|
-
return reg.test(str);
|
|
3424
|
-
};
|
|
3425
|
-
ToolsClass2.prototype.isEmpty = function(val) {
|
|
3426
|
-
if (val == null)
|
|
3427
|
-
return true;
|
|
3428
|
-
if (typeof val === "boolean")
|
|
3419
|
+
ToolsClass2.prototype.uniqueArr = function(arr) {
|
|
3420
|
+
return Array.from(new Set(arr));
|
|
3421
|
+
};
|
|
3422
|
+
ToolsClass2.prototype.swapArray = function(array, index1, index2) {
|
|
3423
|
+
var _a;
|
|
3424
|
+
_a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
|
|
3425
|
+
return array;
|
|
3426
|
+
};
|
|
3427
|
+
ToolsClass2.prototype.filterEmoji = function(str) {
|
|
3428
|
+
return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
|
|
3429
|
+
};
|
|
3430
|
+
ToolsClass2.prototype.containsEmoji = function(str) {
|
|
3431
|
+
var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
|
|
3432
|
+
return reg.test(str);
|
|
3433
|
+
};
|
|
3434
|
+
ToolsClass2.prototype.containsHanZi = function(str) {
|
|
3435
|
+
var reg = /[\u4e00-\u9fa5]/mg;
|
|
3436
|
+
return reg.test(str);
|
|
3437
|
+
};
|
|
3438
|
+
ToolsClass2.prototype.isEmpty = function(val) {
|
|
3439
|
+
if (val == null)
|
|
3440
|
+
return true;
|
|
3441
|
+
if (typeof val === "boolean")
|
|
3442
|
+
return false;
|
|
3443
|
+
if (typeof val === "number")
|
|
3444
|
+
return !val;
|
|
3445
|
+
if (val instanceof Error)
|
|
3446
|
+
return val.message === "";
|
|
3447
|
+
switch (Object.prototype.toString.call(val)) {
|
|
3448
|
+
case "[object String]":
|
|
3449
|
+
case "[object Array]":
|
|
3450
|
+
return !val.length;
|
|
3451
|
+
case "[object File]":
|
|
3452
|
+
case "[object Map]":
|
|
3453
|
+
case "[object Set]": {
|
|
3454
|
+
return !val.size;
|
|
3455
|
+
}
|
|
3456
|
+
case "[object Object]": {
|
|
3457
|
+
return !Object.keys(val).length;
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3429
3460
|
return false;
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
switch (Object.prototype.toString.call(val)) {
|
|
3435
|
-
case "[object String]":
|
|
3436
|
-
case "[object Array]":
|
|
3437
|
-
return !val.length;
|
|
3438
|
-
case "[object File]":
|
|
3439
|
-
case "[object Map]":
|
|
3440
|
-
case "[object Set]": {
|
|
3441
|
-
return !val.size;
|
|
3442
|
-
}
|
|
3443
|
-
case "[object Object]": {
|
|
3444
|
-
return !Object.keys(val).length;
|
|
3461
|
+
};
|
|
3462
|
+
ToolsClass2.prototype.sensitiveField = function(field, before, after) {
|
|
3463
|
+
if (before === void 0) {
|
|
3464
|
+
before = 3;
|
|
3445
3465
|
}
|
|
3446
|
-
|
|
3447
|
-
|
|
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
|
-
const tools = /* @__PURE__ */ getDefaultExportFromCjs(tools$1.exports);
|
|
3473
|
-
const index_vue_vue_type_style_index_0_lang$4 = "";
|
|
3474
|
-
const _hoisted_1$6 = /* @__PURE__ */ createTextVNode("\u63D2\u5165\u6587\u7AE0/\u89C6\u9891");
|
|
3475
|
-
const _hoisted_2$5 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
|
|
3476
|
-
const _hoisted_3$5 = { class: "insert-article" };
|
|
3477
|
-
const _hoisted_4$4 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u6587\u7AE0\u4E2D\u9009\u62E9");
|
|
3478
|
-
const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
|
|
3479
|
-
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
|
|
3480
|
-
const _hoisted_7$1 = { class: "insert-article_input" };
|
|
3481
|
-
const _hoisted_8$1 = {
|
|
3466
|
+
if (after === void 0) {
|
|
3467
|
+
after = 4;
|
|
3468
|
+
}
|
|
3469
|
+
if (!field) {
|
|
3470
|
+
return "";
|
|
3471
|
+
}
|
|
3472
|
+
field = String(field);
|
|
3473
|
+
var sensitiveLen = field.length - before - after;
|
|
3474
|
+
if (sensitiveLen < 0) {
|
|
3475
|
+
sensitiveLen = 0;
|
|
3476
|
+
}
|
|
3477
|
+
var regItem = "[一-龥a-zA-Z0-9]";
|
|
3478
|
+
var regExp = "(".concat(regItem, "{").concat(before, "})").concat(regItem, "*(").concat(regItem, "{").concat(after, "})");
|
|
3479
|
+
var reg = new RegExp(regExp);
|
|
3480
|
+
return field.replace(reg, "$1".concat("*".repeat(sensitiveLen), "$2"));
|
|
3481
|
+
};
|
|
3482
|
+
return ToolsClass2;
|
|
3483
|
+
}()
|
|
3484
|
+
);
|
|
3485
|
+
tools$2.exports = new ToolsClass();
|
|
3486
|
+
var toolsExports = tools$2.exports;
|
|
3487
|
+
const tools$1 = /* @__PURE__ */ getDefaultExportFromCjs(toolsExports);
|
|
3488
|
+
const _hoisted_1$6 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
|
|
3489
|
+
const _hoisted_2$3 = { class: "insert-article" };
|
|
3490
|
+
const _hoisted_3$3 = { class: "insert-article_input" };
|
|
3491
|
+
const _hoisted_4$2 = {
|
|
3482
3492
|
key: 0,
|
|
3483
3493
|
class: "nodata"
|
|
3484
3494
|
};
|
|
3485
|
-
const
|
|
3486
|
-
const
|
|
3495
|
+
const _hoisted_5$2 = ["infinite-scroll-disabled"];
|
|
3496
|
+
const _hoisted_6$1 = {
|
|
3487
3497
|
key: 0,
|
|
3488
3498
|
class: "video-item"
|
|
3489
3499
|
};
|
|
3490
|
-
const
|
|
3491
|
-
const
|
|
3492
|
-
const
|
|
3493
|
-
const
|
|
3494
|
-
const
|
|
3495
|
-
const
|
|
3500
|
+
const _hoisted_7$1 = { class: "video-pic" };
|
|
3501
|
+
const _hoisted_8$1 = ["src"];
|
|
3502
|
+
const _hoisted_9$1 = ["src"];
|
|
3503
|
+
const _hoisted_10$1 = { class: "video-text" };
|
|
3504
|
+
const _hoisted_11$1 = { class: "dotdotdot2" };
|
|
3505
|
+
const _hoisted_12$1 = {
|
|
3496
3506
|
key: 1,
|
|
3497
3507
|
style: { "display": "inline-flex", "flex-direction": "column" }
|
|
3498
3508
|
};
|
|
3499
3509
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3500
|
-
|
|
3510
|
+
__name: "index",
|
|
3501
3511
|
props: {
|
|
3502
3512
|
visible: { type: Boolean, default: false },
|
|
3503
|
-
getList:
|
|
3513
|
+
getList: {}
|
|
3504
3514
|
},
|
|
3505
3515
|
emits: ["change", "submit", "update:visible"],
|
|
3506
|
-
setup(__props, { emit:
|
|
3507
|
-
const
|
|
3508
|
-
const { debounce } = tools;
|
|
3516
|
+
setup(__props, { emit: __emit }) {
|
|
3517
|
+
const { debounce } = tools$1;
|
|
3509
3518
|
const vInfiniteScroll = ElInfiniteScroll;
|
|
3510
3519
|
const Radio_Type = {
|
|
3511
3520
|
MY_ARITICLE: "1",
|
|
@@ -3523,7 +3532,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3523
3532
|
emits("update:visible", val);
|
|
3524
3533
|
}
|
|
3525
3534
|
});
|
|
3535
|
+
const props = __props;
|
|
3526
3536
|
const { visible, getList } = toRefs(props);
|
|
3537
|
+
const emits = __emit;
|
|
3527
3538
|
const data = reactive({
|
|
3528
3539
|
params: {
|
|
3529
3540
|
autherid: "",
|
|
@@ -3554,7 +3565,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3554
3565
|
};
|
|
3555
3566
|
const confirm = () => {
|
|
3556
3567
|
if (!data.article) {
|
|
3557
|
-
ElMessage.error(
|
|
3568
|
+
ElMessage.error(`请选择${isVideo ? "视频" : "文章"}`);
|
|
3558
3569
|
return;
|
|
3559
3570
|
}
|
|
3560
3571
|
data.article.isVideo = isVideo;
|
|
@@ -3578,6 +3589,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3578
3589
|
autherid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
|
|
3579
3590
|
limit: 20,
|
|
3580
3591
|
allType: data.params.radio,
|
|
3592
|
+
// 只有4 是查视频 其他是文章
|
|
3581
3593
|
title: data.params.title,
|
|
3582
3594
|
page: ++data.page
|
|
3583
3595
|
});
|
|
@@ -3597,21 +3609,21 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3597
3609
|
}, {
|
|
3598
3610
|
title: withCtx(() => [
|
|
3599
3611
|
createElementVNode("span", null, [
|
|
3600
|
-
|
|
3601
|
-
createElementVNode("strong",
|
|
3612
|
+
_cache[8] || (_cache[8] = createTextVNode("插入文章/视频", -1)),
|
|
3613
|
+
createElementVNode("strong", _hoisted_1$6, "平台仅支持插入" + toDisplayString(`${isVideo.value ? "2年" : "18个月"}`) + "内的推荐内容", 1)
|
|
3602
3614
|
])
|
|
3603
3615
|
]),
|
|
3604
3616
|
default: withCtx(() => [
|
|
3605
|
-
createElementVNode("div",
|
|
3617
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
3606
3618
|
createElementVNode("div", null, [
|
|
3607
3619
|
createVNode(unref(ElRadio), {
|
|
3608
3620
|
modelValue: data.params.radio,
|
|
3609
3621
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.params.radio = $event),
|
|
3610
3622
|
label: Radio_Type.MY_ARITICLE
|
|
3611
3623
|
}, {
|
|
3612
|
-
default: withCtx(() => [
|
|
3613
|
-
|
|
3614
|
-
]),
|
|
3624
|
+
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
3625
|
+
createTextVNode("从我的文章中选择", -1)
|
|
3626
|
+
])]),
|
|
3615
3627
|
_: 1
|
|
3616
3628
|
}, 8, ["modelValue", "label"]),
|
|
3617
3629
|
createVNode(unref(ElRadio), {
|
|
@@ -3619,9 +3631,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3619
3631
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.params.radio = $event),
|
|
3620
3632
|
label: Radio_Type.MY_VIDEO
|
|
3621
3633
|
}, {
|
|
3622
|
-
default: withCtx(() => [
|
|
3623
|
-
|
|
3624
|
-
]),
|
|
3634
|
+
default: withCtx(() => [..._cache[10] || (_cache[10] = [
|
|
3635
|
+
createTextVNode("从我的视频中选择", -1)
|
|
3636
|
+
])]),
|
|
3625
3637
|
_: 1
|
|
3626
3638
|
}, 8, ["modelValue", "label"]),
|
|
3627
3639
|
createVNode(unref(ElRadio), {
|
|
@@ -3629,17 +3641,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3629
3641
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.params.radio = $event),
|
|
3630
3642
|
label: Radio_Type.ALL_ARITICLE
|
|
3631
3643
|
}, {
|
|
3632
|
-
default: withCtx(() => [
|
|
3633
|
-
|
|
3634
|
-
]),
|
|
3644
|
+
default: withCtx(() => [..._cache[11] || (_cache[11] = [
|
|
3645
|
+
createTextVNode("从所有文章中选择", -1)
|
|
3646
|
+
])]),
|
|
3635
3647
|
_: 1
|
|
3636
3648
|
}, 8, ["modelValue", "label"])
|
|
3637
3649
|
]),
|
|
3638
|
-
createElementVNode("div",
|
|
3650
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
3639
3651
|
createVNode(unref(ElInput), {
|
|
3640
3652
|
modelValue: data.params.title,
|
|
3641
3653
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.params.title = $event),
|
|
3642
|
-
placeholder:
|
|
3654
|
+
placeholder: isVideo.value ? "输入视频描述查找平台发布过的视频" : "输入标题名查找平台发过的文章",
|
|
3643
3655
|
onKeyup: _cache[5] || (_cache[5] = withKeys(($event) => unref(getArticleList)(true), ["enter", "native"])),
|
|
3644
3656
|
onInput: _cache[6] || (_cache[6] = ($event) => unref(getArticleList)(true))
|
|
3645
3657
|
}, {
|
|
@@ -3653,11 +3665,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3653
3665
|
_: 1
|
|
3654
3666
|
}, 8, ["modelValue", "placeholder"])
|
|
3655
3667
|
]),
|
|
3656
|
-
data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div",
|
|
3668
|
+
data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_4$2, toDisplayString(`没有符合条件的${isVideo.value ? "视频" : "文章"}哦,你可以试试搜索其他${isVideo.value ? "视频" : "文章"}~`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
|
|
3657
3669
|
key: 1,
|
|
3658
3670
|
"infinite-scroll-immediate": false,
|
|
3659
3671
|
class: "insert-article_list",
|
|
3660
|
-
"infinite-scroll-disabled":
|
|
3672
|
+
"infinite-scroll-disabled": disable.value
|
|
3661
3673
|
}, [
|
|
3662
3674
|
(openBlock(true), createElementBlock(Fragment, null, renderList(data.data, (item, index) => {
|
|
3663
3675
|
return openBlock(), createElementBlock("div", {
|
|
@@ -3673,24 +3685,24 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3673
3685
|
default: withCtx(() => {
|
|
3674
3686
|
var _a;
|
|
3675
3687
|
return [
|
|
3676
|
-
|
|
3677
|
-
createElementVNode("div",
|
|
3688
|
+
isVideo.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
3689
|
+
createElementVNode("div", _hoisted_7$1, [
|
|
3678
3690
|
createElementVNode("img", {
|
|
3679
3691
|
class: "video-pic",
|
|
3680
3692
|
src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
|
|
3681
|
-
}, null, 8,
|
|
3693
|
+
}, null, 8, _hoisted_8$1),
|
|
3682
3694
|
createElementVNode("img", {
|
|
3683
3695
|
class: "play",
|
|
3684
3696
|
src: getImageUrl("play.png")
|
|
3685
|
-
}, null, 8,
|
|
3697
|
+
}, null, 8, _hoisted_9$1)
|
|
3686
3698
|
]),
|
|
3687
|
-
createElementVNode("div",
|
|
3688
|
-
createElementVNode("span",
|
|
3689
|
-
createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
3699
|
+
createElementVNode("div", _hoisted_10$1, [
|
|
3700
|
+
createElementVNode("span", _hoisted_11$1, toDisplayString(item.content || "[无标题]"), 1),
|
|
3701
|
+
createElementVNode("span", null, toDisplayString(unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
3690
3702
|
])
|
|
3691
|
-
])) : (openBlock(), createElementBlock("div",
|
|
3692
|
-
createElementVNode("span", null, toDisplayString(item.title || "[
|
|
3693
|
-
createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
3703
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_12$1, [
|
|
3704
|
+
createElementVNode("span", null, toDisplayString(item.title || "[无标题]"), 1),
|
|
3705
|
+
createElementVNode("span", null, toDisplayString(unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
3694
3706
|
]))
|
|
3695
3707
|
];
|
|
3696
3708
|
}),
|
|
@@ -3698,7 +3710,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3698
3710
|
}, 1032, ["modelValue", "label", "onChange"])
|
|
3699
3711
|
]);
|
|
3700
3712
|
}), 128))
|
|
3701
|
-
], 8,
|
|
3713
|
+
], 8, _hoisted_5$2)), [
|
|
3702
3714
|
[unref(vInfiniteScroll), unref(getArticleList)]
|
|
3703
3715
|
])
|
|
3704
3716
|
])
|
|
@@ -3708,6 +3720,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3708
3720
|
};
|
|
3709
3721
|
}
|
|
3710
3722
|
});
|
|
3723
|
+
const index_vue_vue_type_style_index_0_lang$4 = "";
|
|
3711
3724
|
let getRandomValues;
|
|
3712
3725
|
const rnds8 = new Uint8Array(16);
|
|
3713
3726
|
function rng() {
|
|
@@ -3724,7 +3737,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
3724
3737
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
3725
3738
|
}
|
|
3726
3739
|
function unsafeStringify(arr, offset = 0) {
|
|
3727
|
-
return
|
|
3740
|
+
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]];
|
|
3728
3741
|
}
|
|
3729
3742
|
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3730
3743
|
const native = {
|
|
@@ -3747,15 +3760,14 @@ function v4(options, buf, offset) {
|
|
|
3747
3760
|
}
|
|
3748
3761
|
return unsafeStringify(rnds);
|
|
3749
3762
|
}
|
|
3750
|
-
const index_vue_vue_type_style_index_0_lang$3 = "";
|
|
3751
3763
|
const _hoisted_1$5 = { class: "img-upload-content" };
|
|
3752
|
-
const _hoisted_2$
|
|
3753
|
-
const _hoisted_3$
|
|
3754
|
-
const _hoisted_4$
|
|
3764
|
+
const _hoisted_2$2 = { class: "title-box" };
|
|
3765
|
+
const _hoisted_3$2 = ["onClick"];
|
|
3766
|
+
const _hoisted_4$1 = {
|
|
3755
3767
|
key: 0,
|
|
3756
3768
|
class: "line"
|
|
3757
3769
|
};
|
|
3758
|
-
const _hoisted_5$
|
|
3770
|
+
const _hoisted_5$1 = {
|
|
3759
3771
|
key: 0,
|
|
3760
3772
|
class: "prompt-restriction"
|
|
3761
3773
|
};
|
|
@@ -3779,45 +3791,39 @@ const _hoisted_13 = {
|
|
|
3779
3791
|
key: 0,
|
|
3780
3792
|
class: "upload-wrap"
|
|
3781
3793
|
};
|
|
3782
|
-
const _hoisted_14 =
|
|
3783
|
-
const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
|
|
3784
|
-
const _hoisted_16 = {
|
|
3794
|
+
const _hoisted_14 = {
|
|
3785
3795
|
key: 1,
|
|
3786
3796
|
class: "img-list"
|
|
3787
3797
|
};
|
|
3788
|
-
const
|
|
3789
|
-
const
|
|
3790
|
-
const
|
|
3798
|
+
const _hoisted_15 = ["src"];
|
|
3799
|
+
const _hoisted_16 = { class: "upload-btn" };
|
|
3800
|
+
const _hoisted_17 = {
|
|
3791
3801
|
key: 2,
|
|
3792
3802
|
class: "map-depot"
|
|
3793
3803
|
};
|
|
3794
|
-
const
|
|
3795
|
-
const
|
|
3796
|
-
const
|
|
3797
|
-
const
|
|
3798
|
-
const
|
|
3799
|
-
const _hoisted_25 = {
|
|
3804
|
+
const _hoisted_18 = { class: "screen" };
|
|
3805
|
+
const _hoisted_19 = { key: 0 };
|
|
3806
|
+
const _hoisted_20 = { class: "tab-box" };
|
|
3807
|
+
const _hoisted_21 = ["onClick"];
|
|
3808
|
+
const _hoisted_22 = {
|
|
3800
3809
|
key: 0,
|
|
3801
3810
|
class: "line"
|
|
3802
3811
|
};
|
|
3803
|
-
const
|
|
3804
|
-
const
|
|
3805
|
-
const
|
|
3806
|
-
const
|
|
3812
|
+
const _hoisted_23 = { class: "image-list depot-image" };
|
|
3813
|
+
const _hoisted_24 = ["onClick"];
|
|
3814
|
+
const _hoisted_25 = ["src"];
|
|
3815
|
+
const _hoisted_26 = {
|
|
3807
3816
|
key: 0,
|
|
3808
3817
|
class: "shade"
|
|
3809
3818
|
};
|
|
3810
|
-
const
|
|
3811
|
-
const
|
|
3819
|
+
const _hoisted_27 = { class: "num" };
|
|
3820
|
+
const _hoisted_28 = {
|
|
3812
3821
|
key: 1,
|
|
3813
3822
|
class: "protocol-box"
|
|
3814
3823
|
};
|
|
3815
|
-
const
|
|
3816
|
-
const _hoisted_33 = /* @__PURE__ */ createTextVNode(" \u8BF7\u9605\u8BFB");
|
|
3817
|
-
const _hoisted_34 = ["href"];
|
|
3818
|
-
const _hoisted_35 = /* @__PURE__ */ createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ");
|
|
3824
|
+
const _hoisted_29 = ["href"];
|
|
3819
3825
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3820
|
-
|
|
3826
|
+
__name: "index",
|
|
3821
3827
|
props: {
|
|
3822
3828
|
visible: { type: Boolean, default: false },
|
|
3823
3829
|
imgList: { default: [] },
|
|
@@ -3826,7 +3832,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3826
3832
|
imgNum: { default: 20 }
|
|
3827
3833
|
},
|
|
3828
3834
|
emits: ["update:imgList", "update:visible", "submit"],
|
|
3829
|
-
setup(__props, { emit:
|
|
3835
|
+
setup(__props, { emit: __emit }) {
|
|
3836
|
+
const emits = __emit;
|
|
3830
3837
|
const props = __props;
|
|
3831
3838
|
const drag = ref(false);
|
|
3832
3839
|
const imgListTemp = computed({
|
|
@@ -3850,7 +3857,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3850
3857
|
const tempImgs = [...props.imgList];
|
|
3851
3858
|
Array.from(imgFile).forEach((file) => {
|
|
3852
3859
|
if (file.size > 20 * 1024 * 1024) {
|
|
3853
|
-
ElMessage.error("
|
|
3860
|
+
ElMessage.error("单张图片最大支持20M");
|
|
3854
3861
|
return;
|
|
3855
3862
|
}
|
|
3856
3863
|
const id = v4();
|
|
@@ -3880,14 +3887,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3880
3887
|
const list = [
|
|
3881
3888
|
{
|
|
3882
3889
|
id: 2,
|
|
3883
|
-
value: "
|
|
3890
|
+
value: "上传图片"
|
|
3884
3891
|
}
|
|
3885
3892
|
];
|
|
3886
3893
|
activeTitle.value = 2;
|
|
3887
3894
|
if (props.imgNum < 20) {
|
|
3888
3895
|
list.unshift({
|
|
3889
3896
|
id: 1,
|
|
3890
|
-
value: "
|
|
3897
|
+
value: "正文图片"
|
|
3891
3898
|
});
|
|
3892
3899
|
activeTitle.value = 1;
|
|
3893
3900
|
getContentImgList();
|
|
@@ -3895,7 +3902,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3895
3902
|
if (props.chartGallery) {
|
|
3896
3903
|
list.push({
|
|
3897
3904
|
id: 3,
|
|
3898
|
-
value: isEmotofine ? "
|
|
3905
|
+
value: isEmotofine ? "电摩范图库" : "摩托范图库"
|
|
3899
3906
|
});
|
|
3900
3907
|
}
|
|
3901
3908
|
titleList.value = list;
|
|
@@ -4040,13 +4047,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4040
4047
|
const tabList = ref([]);
|
|
4041
4048
|
const search = () => {
|
|
4042
4049
|
if (!selectData.brandId) {
|
|
4043
|
-
return ElMessage.error("
|
|
4050
|
+
return ElMessage.error("请选择品牌");
|
|
4044
4051
|
}
|
|
4045
4052
|
if (!selectData.goodId) {
|
|
4046
|
-
return ElMessage.error("
|
|
4053
|
+
return ElMessage.error("请选择车型");
|
|
4047
4054
|
}
|
|
4048
4055
|
if (!selectData.carId) {
|
|
4049
|
-
return ElMessage.error("
|
|
4056
|
+
return ElMessage.error("请选择款型");
|
|
4050
4057
|
}
|
|
4051
4058
|
tabList.value = [];
|
|
4052
4059
|
emits("update:imgList", []);
|
|
@@ -4103,7 +4110,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4103
4110
|
}, {
|
|
4104
4111
|
default: withCtx(() => [
|
|
4105
4112
|
createElementVNode("div", _hoisted_1$5, [
|
|
4106
|
-
createElementVNode("div", _hoisted_2$
|
|
4113
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
4107
4114
|
(openBlock(true), createElementBlock(Fragment, null, renderList(titleList.value, (item, index) => {
|
|
4108
4115
|
return openBlock(), createElementBlock("div", {
|
|
4109
4116
|
key: index,
|
|
@@ -4111,15 +4118,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4111
4118
|
onClick: ($event) => changeTab(item)
|
|
4112
4119
|
}, [
|
|
4113
4120
|
createTextVNode(toDisplayString(item.value) + " ", 1),
|
|
4114
|
-
item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
4115
|
-
], 10, _hoisted_3$
|
|
4121
|
+
item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$1)) : createCommentVNode("", true)
|
|
4122
|
+
], 10, _hoisted_3$2);
|
|
4116
4123
|
}), 128)),
|
|
4117
|
-
[1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
4118
|
-
activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "
|
|
4124
|
+
[1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, " 最多可选" + toDisplayString(props.imgNum) + "张图片,已选" + toDisplayString(props.imgList.length) + "张 ", 1)) : createCommentVNode("", true),
|
|
4125
|
+
activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "张上传成功 拖动可调整顺序 ", 1)) : createCommentVNode("", true)
|
|
4119
4126
|
]),
|
|
4120
4127
|
activeTitle.value === 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
4121
4128
|
createElementVNode("div", _hoisted_8, [
|
|
4122
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
4129
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(contentImgList.value, (item, index) => {
|
|
4123
4130
|
return openBlock(), createElementBlock("div", {
|
|
4124
4131
|
key: index,
|
|
4125
4132
|
class: "image-item",
|
|
@@ -4152,13 +4159,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4152
4159
|
]),
|
|
4153
4160
|
_: 1
|
|
4154
4161
|
}),
|
|
4155
|
-
|
|
4162
|
+
_cache[7] || (_cache[7] = createElementVNode("span", null, "本地上传", -1))
|
|
4156
4163
|
]),
|
|
4157
|
-
|
|
4158
|
-
])) : (openBlock(), createElementBlock("div",
|
|
4164
|
+
_cache[8] || (_cache[8] = createElementVNode("span", { class: "remark" }, "支持jpg、jpeg、png等多种格式,单张图片最大支持20MB", -1))
|
|
4165
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
4159
4166
|
createVNode(unref(draggable), {
|
|
4160
|
-
modelValue:
|
|
4161
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
4167
|
+
modelValue: imgListTemp.value,
|
|
4168
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imgListTemp.value = $event),
|
|
4162
4169
|
handle: ".img-item",
|
|
4163
4170
|
class: "img-wrap",
|
|
4164
4171
|
group: "people",
|
|
@@ -4176,7 +4183,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4176
4183
|
style: { "object-fit": "contain" },
|
|
4177
4184
|
width: "120",
|
|
4178
4185
|
height: "120"
|
|
4179
|
-
}, null, 8,
|
|
4186
|
+
}, null, 8, _hoisted_15),
|
|
4180
4187
|
createVNode(unref(CircleCloseFilled), {
|
|
4181
4188
|
class: "icon pointer",
|
|
4182
4189
|
onClick: ($event) => deleteImg(element)
|
|
@@ -4199,7 +4206,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4199
4206
|
_: 1
|
|
4200
4207
|
}, 8, ["modelValue"])
|
|
4201
4208
|
])),
|
|
4202
|
-
createElementVNode("div",
|
|
4209
|
+
createElementVNode("div", _hoisted_16, [
|
|
4203
4210
|
createElementVNode("input", {
|
|
4204
4211
|
type: "file",
|
|
4205
4212
|
name: "file",
|
|
@@ -4210,13 +4217,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4210
4217
|
}, null, 32)
|
|
4211
4218
|
])
|
|
4212
4219
|
], 2)) : createCommentVNode("", true),
|
|
4213
|
-
activeTitle.value === 3 ? (openBlock(), createElementBlock("div",
|
|
4214
|
-
createElementVNode("div",
|
|
4220
|
+
activeTitle.value === 3 ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
4221
|
+
createElementVNode("div", _hoisted_18, [
|
|
4215
4222
|
createElementVNode("div", null, [
|
|
4216
4223
|
createVNode(unref(ElSelect), {
|
|
4217
4224
|
modelValue: selectData.brandId,
|
|
4218
4225
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
|
|
4219
|
-
placeholder: "
|
|
4226
|
+
placeholder: "请选择品牌",
|
|
4220
4227
|
size: "large",
|
|
4221
4228
|
class: "select_1",
|
|
4222
4229
|
filterable: "",
|
|
@@ -4237,7 +4244,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4237
4244
|
createVNode(unref(ElSelect), {
|
|
4238
4245
|
modelValue: selectData.goodId,
|
|
4239
4246
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
|
|
4240
|
-
placeholder: "
|
|
4247
|
+
placeholder: "请选择车型",
|
|
4241
4248
|
size: "large",
|
|
4242
4249
|
class: "select_1",
|
|
4243
4250
|
filterable: "",
|
|
@@ -4258,7 +4265,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4258
4265
|
createVNode(unref(ElSelect), {
|
|
4259
4266
|
modelValue: selectData.carId,
|
|
4260
4267
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
|
|
4261
|
-
placeholder: "
|
|
4268
|
+
placeholder: "请选择款型",
|
|
4262
4269
|
size: "large",
|
|
4263
4270
|
class: "select_2",
|
|
4264
4271
|
filterable: "",
|
|
@@ -4282,14 +4289,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4282
4289
|
style: { "width": "80px" },
|
|
4283
4290
|
onClick: search
|
|
4284
4291
|
}, {
|
|
4285
|
-
default: withCtx(() => [
|
|
4286
|
-
|
|
4287
|
-
]),
|
|
4292
|
+
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
4293
|
+
createTextVNode("搜索", -1)
|
|
4294
|
+
])]),
|
|
4288
4295
|
_: 1
|
|
4289
4296
|
})
|
|
4290
4297
|
]),
|
|
4291
|
-
tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div",
|
|
4292
|
-
createElementVNode("div",
|
|
4298
|
+
tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
4299
|
+
createElementVNode("div", _hoisted_20, [
|
|
4293
4300
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tabList.value, (item, index) => {
|
|
4294
4301
|
return openBlock(), createElementBlock("div", {
|
|
4295
4302
|
key: index,
|
|
@@ -4297,12 +4304,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4297
4304
|
onClick: ($event) => activeTab.value = item.type
|
|
4298
4305
|
}, [
|
|
4299
4306
|
createTextVNode(toDisplayString(item.name) + " ", 1),
|
|
4300
|
-
item.type === activeTab.value ? (openBlock(), createElementBlock("div",
|
|
4301
|
-
], 10,
|
|
4307
|
+
item.type === activeTab.value ? (openBlock(), createElementBlock("div", _hoisted_22)) : createCommentVNode("", true)
|
|
4308
|
+
], 10, _hoisted_21);
|
|
4302
4309
|
}), 128))
|
|
4303
4310
|
]),
|
|
4304
|
-
createElementVNode("div",
|
|
4305
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
4311
|
+
createElementVNode("div", _hoisted_23, [
|
|
4312
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(imageList.value, (item, index) => {
|
|
4306
4313
|
return openBlock(), createElementBlock("div", {
|
|
4307
4314
|
key: index,
|
|
4308
4315
|
class: "image-item",
|
|
@@ -4312,25 +4319,25 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4312
4319
|
src: item.imgOrgUrl,
|
|
4313
4320
|
alt: "",
|
|
4314
4321
|
class: "image"
|
|
4315
|
-
}, null, 8,
|
|
4316
|
-
item.num ? (openBlock(), createElementBlock("div",
|
|
4317
|
-
createElementVNode("div",
|
|
4322
|
+
}, null, 8, _hoisted_25),
|
|
4323
|
+
item.num ? (openBlock(), createElementBlock("div", _hoisted_26, [
|
|
4324
|
+
createElementVNode("div", _hoisted_27, toDisplayString(item.num), 1)
|
|
4318
4325
|
])) : createCommentVNode("", true)
|
|
4319
|
-
], 8,
|
|
4326
|
+
], 8, _hoisted_24);
|
|
4320
4327
|
}), 128))
|
|
4321
4328
|
])
|
|
4322
|
-
])) : (openBlock(), createElementBlock("div",
|
|
4329
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_28, [
|
|
4323
4330
|
createElementVNode("div", null, [
|
|
4324
|
-
|
|
4331
|
+
_cache[12] || (_cache[12] = createElementVNode("div", null, " 图库中的图片仅限下载摩托范以编辑发布文章使用,不得用于其他任何平台及用途 ", -1)),
|
|
4325
4332
|
createElementVNode("div", null, [
|
|
4326
|
-
|
|
4333
|
+
_cache[10] || (_cache[10] = createTextVNode(" 请阅读", -1)),
|
|
4327
4334
|
createElementVNode("a", {
|
|
4328
4335
|
href: `https://${unref(hostName)}/about?type=imageLicenseAgreement`,
|
|
4329
4336
|
target: "_blank",
|
|
4330
4337
|
rel: "noopener noreferrer",
|
|
4331
4338
|
class: "link"
|
|
4332
|
-
}, "
|
|
4333
|
-
|
|
4339
|
+
}, "《摩托范图片许可使用协议》", 8, _hoisted_29),
|
|
4340
|
+
_cache[11] || (_cache[11] = createTextVNode(",您的行为视为您已同意该协议。 ", -1))
|
|
4334
4341
|
])
|
|
4335
4342
|
])
|
|
4336
4343
|
]))
|
|
@@ -4342,25 +4349,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4342
4349
|
};
|
|
4343
4350
|
}
|
|
4344
4351
|
});
|
|
4345
|
-
const index_vue_vue_type_style_index_0_lang$
|
|
4346
|
-
const _hoisted_1$4 =
|
|
4347
|
-
const _hoisted_2$3 = { class: "insert-video" };
|
|
4348
|
-
const _hoisted_3$3 = /* @__PURE__ */ createTextVNode("\u9009\u62E9\u89C6\u9891");
|
|
4349
|
-
const _hoisted_4$2 = /* @__PURE__ */ 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);
|
|
4352
|
+
const index_vue_vue_type_style_index_0_lang$3 = "";
|
|
4353
|
+
const _hoisted_1$4 = { class: "insert-video" };
|
|
4350
4354
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
4351
|
-
|
|
4355
|
+
__name: "index",
|
|
4352
4356
|
props: {
|
|
4353
4357
|
visible: { type: Boolean, default: false },
|
|
4354
|
-
fileSelected:
|
|
4358
|
+
fileSelected: {}
|
|
4355
4359
|
},
|
|
4356
4360
|
emits: ["update:visible"],
|
|
4357
|
-
setup(__props, { emit:
|
|
4358
|
-
const
|
|
4361
|
+
setup(__props, { emit: __emit }) {
|
|
4362
|
+
const emits = __emit;
|
|
4359
4363
|
provide("vm", {
|
|
4360
4364
|
setStatus(val) {
|
|
4361
4365
|
emits("update:visible", val);
|
|
4362
4366
|
}
|
|
4363
4367
|
});
|
|
4368
|
+
const props = __props;
|
|
4364
4369
|
const { visible, fileSelected } = toRefs(props);
|
|
4365
4370
|
const emitEvent = () => {
|
|
4366
4371
|
var event = new MouseEvent("click");
|
|
@@ -4374,23 +4379,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4374
4379
|
width: "600px",
|
|
4375
4380
|
height: "100px"
|
|
4376
4381
|
}, {
|
|
4377
|
-
title: withCtx(() => [
|
|
4378
|
-
|
|
4379
|
-
]),
|
|
4382
|
+
title: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
4383
|
+
createElementVNode("span", null, "插入视频", -1)
|
|
4384
|
+
])]),
|
|
4380
4385
|
default: withCtx(() => [
|
|
4381
|
-
createElementVNode("div",
|
|
4386
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
4382
4387
|
createVNode(unref(ElButton), {
|
|
4383
4388
|
style: { "width": "120px" },
|
|
4384
4389
|
round: "",
|
|
4385
4390
|
type: "primary",
|
|
4386
4391
|
onClick: emitEvent
|
|
4387
4392
|
}, {
|
|
4388
|
-
default: withCtx(() => [
|
|
4389
|
-
|
|
4390
|
-
]),
|
|
4393
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
4394
|
+
createTextVNode("选择视频", -1)
|
|
4395
|
+
])]),
|
|
4391
4396
|
_: 1
|
|
4392
4397
|
}),
|
|
4393
|
-
|
|
4398
|
+
_cache[3] || (_cache[3] = createElementVNode("span", { class: "remark" }, "为了获得更高的推荐量和点击量,建议上传720p(1280*720)或更高分辨率的视频,视频格式为.mp4或.mov,大小不超过1G", -1)),
|
|
4394
4399
|
createElementVNode("input", {
|
|
4395
4400
|
type: "file",
|
|
4396
4401
|
accept: "video/*",
|
|
@@ -4405,14 +4410,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4405
4410
|
};
|
|
4406
4411
|
}
|
|
4407
4412
|
});
|
|
4413
|
+
const index_vue_vue_type_style_index_0_lang$2 = "";
|
|
4408
4414
|
const index_vue_vue_type_style_index_0_lang$1 = "";
|
|
4409
4415
|
const _sfc_main$3 = {
|
|
4410
4416
|
name: "TopicManager",
|
|
4411
4417
|
props: {
|
|
4418
|
+
// 编辑器DOM引用
|
|
4412
4419
|
editorDom: {
|
|
4413
4420
|
type: Object,
|
|
4414
4421
|
default: null
|
|
4415
4422
|
},
|
|
4423
|
+
// 话题API请求方法
|
|
4416
4424
|
request: {
|
|
4417
4425
|
type: Object,
|
|
4418
4426
|
default: null
|
|
@@ -4420,10 +4428,13 @@ const _sfc_main$3 = {
|
|
|
4420
4428
|
},
|
|
4421
4429
|
data() {
|
|
4422
4430
|
return {
|
|
4431
|
+
// 话题弹框相关数据
|
|
4423
4432
|
topicPopover: {
|
|
4424
4433
|
visible: false,
|
|
4425
4434
|
type: "hot",
|
|
4435
|
+
// 'hot' 热门话题, 'search' 搜索话题
|
|
4426
4436
|
activeTab: "hot",
|
|
4437
|
+
// 'hot' 热门话题, 'recent' 最近使用
|
|
4427
4438
|
position: { top: 0, left: 0 },
|
|
4428
4439
|
searchKeyword: "",
|
|
4429
4440
|
hotTopics: [],
|
|
@@ -4434,22 +4445,30 @@ const _sfc_main$3 = {
|
|
|
4434
4445
|
hasMore: true,
|
|
4435
4446
|
searchPage: 1,
|
|
4436
4447
|
searchHasMore: true,
|
|
4448
|
+
// 用于增量更新的计数器
|
|
4437
4449
|
newHotTopicsCount: 0,
|
|
4438
4450
|
newSearchTopicsCount: 0,
|
|
4451
|
+
// 保存原始的selection和range信息
|
|
4439
4452
|
originalRange: null,
|
|
4440
4453
|
originalSelection: null,
|
|
4454
|
+
// 保存触发位置信息
|
|
4441
4455
|
triggerInfo: {
|
|
4442
4456
|
paragraph: null,
|
|
4443
4457
|
hashIndex: -1,
|
|
4444
4458
|
cursorPosition: 0
|
|
4445
4459
|
},
|
|
4460
|
+
// 全局弹框DOM引用
|
|
4446
4461
|
globalContainer: null,
|
|
4447
4462
|
globalMask: null
|
|
4448
4463
|
},
|
|
4449
|
-
|
|
4464
|
+
// 中文输入法状态
|
|
4465
|
+
isComposing: false,
|
|
4466
|
+
// 保存的光标位置(外部调用insertHotTopic时使用)
|
|
4467
|
+
savedRange: null
|
|
4450
4468
|
};
|
|
4451
4469
|
},
|
|
4452
4470
|
methods: {
|
|
4471
|
+
// 初始化话题管理器
|
|
4453
4472
|
init() {
|
|
4454
4473
|
if (!this.editorDom) {
|
|
4455
4474
|
console.warn("TopicManager: editorDom is required");
|
|
@@ -4457,6 +4476,7 @@ const _sfc_main$3 = {
|
|
|
4457
4476
|
}
|
|
4458
4477
|
setTimeout(() => this.bindEditorEvents(), 0);
|
|
4459
4478
|
},
|
|
4479
|
+
// 绑定编辑器事件
|
|
4460
4480
|
bindEditorEvents() {
|
|
4461
4481
|
if (!this.editorDom)
|
|
4462
4482
|
return;
|
|
@@ -4464,7 +4484,9 @@ const _sfc_main$3 = {
|
|
|
4464
4484
|
this.editorDom.addEventListener("compositionstart", this.handleCompositionStart.bind(this));
|
|
4465
4485
|
this.editorDom.addEventListener("compositionend", this.handleCompositionEnd.bind(this));
|
|
4466
4486
|
this.editorDom.addEventListener("input", this.handleInput.bind(this));
|
|
4487
|
+
document.addEventListener("mousedown", this.handleExternalMouseDown.bind(this));
|
|
4467
4488
|
},
|
|
4489
|
+
// 解绑编辑器事件
|
|
4468
4490
|
unbindEditorEvents() {
|
|
4469
4491
|
if (!this.editorDom)
|
|
4470
4492
|
return;
|
|
@@ -4472,16 +4494,34 @@ const _sfc_main$3 = {
|
|
|
4472
4494
|
this.editorDom.removeEventListener("compositionstart", this.handleCompositionStart.bind(this));
|
|
4473
4495
|
this.editorDom.removeEventListener("compositionend", this.handleCompositionEnd.bind(this));
|
|
4474
4496
|
this.editorDom.removeEventListener("input", this.handleInput.bind(this));
|
|
4497
|
+
document.removeEventListener("mousedown", this.handleExternalMouseDown.bind(this));
|
|
4498
|
+
},
|
|
4499
|
+
// 处理外部鼠标按下事件,保存编辑器光标位置
|
|
4500
|
+
handleExternalMouseDown(event) {
|
|
4501
|
+
console.log(929);
|
|
4502
|
+
const hotTopicBtn = event.target.closest(".add-hot-topic");
|
|
4503
|
+
if (hotTopicBtn) {
|
|
4504
|
+
const selection = window.getSelection();
|
|
4505
|
+
if (selection.rangeCount > 0) {
|
|
4506
|
+
const range = selection.getRangeAt(0);
|
|
4507
|
+
if (this.editorDom.contains(range.startContainer)) {
|
|
4508
|
+
this.savedRange = range.cloneRange();
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4475
4512
|
},
|
|
4513
|
+
// 中文输入法开始事件
|
|
4476
4514
|
handleCompositionStart() {
|
|
4477
4515
|
this.isComposing = true;
|
|
4478
4516
|
},
|
|
4517
|
+
// 中文输入法结束事件(中文)
|
|
4479
4518
|
handleCompositionEnd() {
|
|
4480
4519
|
this.isComposing = false;
|
|
4481
4520
|
setTimeout(() => {
|
|
4482
4521
|
this.handleInputChange();
|
|
4483
4522
|
}, 10);
|
|
4484
4523
|
},
|
|
4524
|
+
// input事件处理(英文)
|
|
4485
4525
|
handleInput() {
|
|
4486
4526
|
if (!this.isComposing) {
|
|
4487
4527
|
setTimeout(() => {
|
|
@@ -4489,6 +4529,7 @@ const _sfc_main$3 = {
|
|
|
4489
4529
|
}, 10);
|
|
4490
4530
|
}
|
|
4491
4531
|
},
|
|
4532
|
+
// 处理输入变化
|
|
4492
4533
|
handleInputChange() {
|
|
4493
4534
|
var _a;
|
|
4494
4535
|
const selection = window.getSelection();
|
|
@@ -4516,6 +4557,7 @@ const _sfc_main$3 = {
|
|
|
4516
4557
|
return;
|
|
4517
4558
|
this.checkAndTriggerSearch(paragraph);
|
|
4518
4559
|
},
|
|
4560
|
+
// 话题输入处理
|
|
4519
4561
|
handleTopicInput(event) {
|
|
4520
4562
|
var _a;
|
|
4521
4563
|
const activeElement = document.activeElement;
|
|
@@ -4556,7 +4598,9 @@ const _sfc_main$3 = {
|
|
|
4556
4598
|
const triggerInfo = {
|
|
4557
4599
|
paragraph,
|
|
4558
4600
|
hashIndex: cursorPosition,
|
|
4601
|
+
// #号的位置
|
|
4559
4602
|
cursorPosition: cursorPosition + 1
|
|
4603
|
+
// #号后的位置
|
|
4560
4604
|
};
|
|
4561
4605
|
this.showTopicPopover("hot", position, "", triggerInfo);
|
|
4562
4606
|
}, 10);
|
|
@@ -4652,6 +4696,7 @@ const _sfc_main$3 = {
|
|
|
4652
4696
|
tempElement.remove();
|
|
4653
4697
|
const position = {
|
|
4654
4698
|
top: rect.bottom,
|
|
4699
|
+
// 弹框显示在光标下方
|
|
4655
4700
|
left: rect.left
|
|
4656
4701
|
};
|
|
4657
4702
|
const viewportWidth = window.innerWidth;
|
|
@@ -4669,7 +4714,7 @@ const _sfc_main$3 = {
|
|
|
4669
4714
|
}
|
|
4670
4715
|
return position;
|
|
4671
4716
|
} catch (error) {
|
|
4672
|
-
console.warn("
|
|
4717
|
+
console.warn("获取光标位置失败,使用fallback方法:", error);
|
|
4673
4718
|
const rect = range.getBoundingClientRect();
|
|
4674
4719
|
return {
|
|
4675
4720
|
top: rect.bottom,
|
|
@@ -4677,9 +4722,10 @@ const _sfc_main$3 = {
|
|
|
4677
4722
|
};
|
|
4678
4723
|
}
|
|
4679
4724
|
},
|
|
4725
|
+
// 话题弹框相关方法
|
|
4680
4726
|
showTopicPopover(type, position, searchKeyword = "", triggerInfo = null) {
|
|
4681
4727
|
if (!this.request || !this.request.getTopic) {
|
|
4682
|
-
console.warn("
|
|
4728
|
+
console.warn("话题功能需要提供 request.getTopic 方法");
|
|
4683
4729
|
return;
|
|
4684
4730
|
}
|
|
4685
4731
|
const selection = window.getSelection();
|
|
@@ -4752,11 +4798,11 @@ const _sfc_main$3 = {
|
|
|
4752
4798
|
}
|
|
4753
4799
|
}
|
|
4754
4800
|
} else {
|
|
4755
|
-
console.warn("
|
|
4801
|
+
console.warn("加载热门话题失败:", response);
|
|
4756
4802
|
this.topicPopover.hasMore = false;
|
|
4757
4803
|
}
|
|
4758
4804
|
} catch (error) {
|
|
4759
|
-
console.error("
|
|
4805
|
+
console.error("加载热门话题失败:", error);
|
|
4760
4806
|
this.topicPopover.hasMore = false;
|
|
4761
4807
|
} finally {
|
|
4762
4808
|
this.topicPopover.loading = false;
|
|
@@ -4790,17 +4836,18 @@ const _sfc_main$3 = {
|
|
|
4790
4836
|
this.topicPopover.searchHasMore = topics.length >= 50;
|
|
4791
4837
|
}
|
|
4792
4838
|
} else {
|
|
4793
|
-
console.warn("
|
|
4839
|
+
console.warn("搜索话题失败:", response);
|
|
4794
4840
|
this.topicPopover.searchHasMore = false;
|
|
4795
4841
|
}
|
|
4796
4842
|
} catch (error) {
|
|
4797
|
-
console.error("
|
|
4843
|
+
console.error("搜索话题失败:", error);
|
|
4798
4844
|
this.topicPopover.searchHasMore = false;
|
|
4799
4845
|
} finally {
|
|
4800
4846
|
this.topicPopover.loading = false;
|
|
4801
4847
|
this.updateGlobalTopicPopover();
|
|
4802
4848
|
}
|
|
4803
4849
|
},
|
|
4850
|
+
// 加载更多搜索话题
|
|
4804
4851
|
async loadSearchTopics() {
|
|
4805
4852
|
if (this.topicPopover.loading || !this.topicPopover.searchHasMore)
|
|
4806
4853
|
return;
|
|
@@ -4828,11 +4875,11 @@ const _sfc_main$3 = {
|
|
|
4828
4875
|
}
|
|
4829
4876
|
}
|
|
4830
4877
|
} else {
|
|
4831
|
-
console.warn("
|
|
4878
|
+
console.warn("加载更多搜索话题失败:", response);
|
|
4832
4879
|
this.topicPopover.searchHasMore = false;
|
|
4833
4880
|
}
|
|
4834
4881
|
} catch (error) {
|
|
4835
|
-
console.error("
|
|
4882
|
+
console.error("加载更多搜索话题失败:", error);
|
|
4836
4883
|
this.topicPopover.searchHasMore = false;
|
|
4837
4884
|
} finally {
|
|
4838
4885
|
this.topicPopover.loading = false;
|
|
@@ -4844,7 +4891,7 @@ const _sfc_main$3 = {
|
|
|
4844
4891
|
const localTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
|
|
4845
4892
|
this.topicPopover.recentTopics = localTopics;
|
|
4846
4893
|
} catch (error) {
|
|
4847
|
-
console.error("
|
|
4894
|
+
console.error("加载最近使用话题失败:", error);
|
|
4848
4895
|
this.topicPopover.recentTopics = [];
|
|
4849
4896
|
}
|
|
4850
4897
|
},
|
|
@@ -4864,9 +4911,10 @@ const _sfc_main$3 = {
|
|
|
4864
4911
|
}
|
|
4865
4912
|
localStorage.setItem("localTopic", JSON.stringify(recentTopics));
|
|
4866
4913
|
} catch (error) {
|
|
4867
|
-
console.error("
|
|
4914
|
+
console.error("保存最近使用话题失败:", error);
|
|
4868
4915
|
}
|
|
4869
4916
|
},
|
|
4917
|
+
// 创建全局话题弹框
|
|
4870
4918
|
createGlobalTopicPopover() {
|
|
4871
4919
|
this.removeGlobalTopicPopover();
|
|
4872
4920
|
const mask = document.createElement("div");
|
|
@@ -4890,6 +4938,7 @@ const _sfc_main$3 = {
|
|
|
4890
4938
|
this.topicPopover.globalContainer = container;
|
|
4891
4939
|
this.bindTopicPopoverEvents();
|
|
4892
4940
|
},
|
|
4941
|
+
// 移除全局话题弹框
|
|
4893
4942
|
removeGlobalTopicPopover() {
|
|
4894
4943
|
if (this.topicPopover.globalMask) {
|
|
4895
4944
|
document.body.removeChild(this.topicPopover.globalMask);
|
|
@@ -4900,12 +4949,14 @@ const _sfc_main$3 = {
|
|
|
4900
4949
|
this.topicPopover.globalContainer = null;
|
|
4901
4950
|
}
|
|
4902
4951
|
},
|
|
4952
|
+
// 更新全局话题弹框内容
|
|
4903
4953
|
updateGlobalTopicPopover() {
|
|
4904
4954
|
if (!this.topicPopover.globalContainer)
|
|
4905
4955
|
return;
|
|
4906
4956
|
this.topicPopover.globalContainer.innerHTML = this.createTopicPopoverContent();
|
|
4907
4957
|
this.bindTopicPopoverEvents();
|
|
4908
4958
|
},
|
|
4959
|
+
// 增量添加热门话题到DOM,避免重绘
|
|
4909
4960
|
appendHotTopicsToDOM() {
|
|
4910
4961
|
if (!this.topicPopover.globalContainer || this.topicPopover.newHotTopicsCount === 0)
|
|
4911
4962
|
return;
|
|
@@ -4920,7 +4971,8 @@ const _sfc_main$3 = {
|
|
|
4920
4971
|
topicElement.className = "topic-item";
|
|
4921
4972
|
topicElement.setAttribute("data-topic-id", topic.id);
|
|
4922
4973
|
topicElement.setAttribute("data-topic-type", topic.type);
|
|
4923
|
-
|
|
4974
|
+
const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
|
|
4975
|
+
topicElement.innerHTML = `<span>#${topic.title}</span>${viewHtml}</span>`;
|
|
4924
4976
|
topicElement.addEventListener("click", () => {
|
|
4925
4977
|
this.insertTopicToEditor(topic);
|
|
4926
4978
|
});
|
|
@@ -4929,6 +4981,7 @@ const _sfc_main$3 = {
|
|
|
4929
4981
|
this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.hasMore);
|
|
4930
4982
|
this.topicPopover.newHotTopicsCount = 0;
|
|
4931
4983
|
},
|
|
4984
|
+
// 增量添加搜索话题到DOM,避免重绘
|
|
4932
4985
|
appendSearchTopicsToDOM() {
|
|
4933
4986
|
if (!this.topicPopover.globalContainer || this.topicPopover.newSearchTopicsCount === 0)
|
|
4934
4987
|
return;
|
|
@@ -4952,6 +5005,7 @@ const _sfc_main$3 = {
|
|
|
4952
5005
|
this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.searchHasMore);
|
|
4953
5006
|
this.topicPopover.newSearchTopicsCount = 0;
|
|
4954
5007
|
},
|
|
5008
|
+
// 更新加载状态显示
|
|
4955
5009
|
updateLoadingState(topicList, loading, hasMore) {
|
|
4956
5010
|
const existingLoading = topicList.querySelector(".topic-loading");
|
|
4957
5011
|
const existingEmpty = topicList.querySelector(".topic-empty");
|
|
@@ -4962,15 +5016,16 @@ const _sfc_main$3 = {
|
|
|
4962
5016
|
if (loading) {
|
|
4963
5017
|
const loadingElement = document.createElement("div");
|
|
4964
5018
|
loadingElement.className = "topic-loading";
|
|
4965
|
-
loadingElement.textContent = "
|
|
5019
|
+
loadingElement.textContent = "加载更多...";
|
|
4966
5020
|
topicList.appendChild(loadingElement);
|
|
4967
5021
|
} else if (!hasMore) {
|
|
4968
5022
|
const emptyElement = document.createElement("div");
|
|
4969
5023
|
emptyElement.className = "topic-empty";
|
|
4970
|
-
emptyElement.textContent = "
|
|
5024
|
+
emptyElement.textContent = "没有更多了";
|
|
4971
5025
|
topicList.appendChild(emptyElement);
|
|
4972
5026
|
}
|
|
4973
5027
|
},
|
|
5028
|
+
// 创建话题弹框内容
|
|
4974
5029
|
createTopicPopoverContent() {
|
|
4975
5030
|
if (this.topicPopover.type === "hot") {
|
|
4976
5031
|
return this.getHotTopicPopoverHTML();
|
|
@@ -4979,6 +5034,7 @@ const _sfc_main$3 = {
|
|
|
4979
5034
|
}
|
|
4980
5035
|
return "";
|
|
4981
5036
|
},
|
|
5037
|
+
// 获取热门话题弹框HTML
|
|
4982
5038
|
getHotTopicPopoverHTML() {
|
|
4983
5039
|
const activeTab = this.topicPopover.activeTab;
|
|
4984
5040
|
const hotTopics = this.topicPopover.hotTopics;
|
|
@@ -4988,25 +5044,26 @@ const _sfc_main$3 = {
|
|
|
4988
5044
|
let topicListHTML = "";
|
|
4989
5045
|
if (activeTab === "hot") {
|
|
4990
5046
|
if (loading && hotTopics.length === 0) {
|
|
4991
|
-
topicListHTML = '<div class="topic-loading"
|
|
5047
|
+
topicListHTML = '<div class="topic-loading">加载中...</div>';
|
|
4992
5048
|
} else if (hotTopics.length === 0) {
|
|
4993
|
-
topicListHTML = '<div class="topic-empty"
|
|
5049
|
+
topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
|
|
4994
5050
|
} else {
|
|
4995
|
-
topicListHTML = hotTopics.map(
|
|
4996
|
-
|
|
4997
|
-
|
|
5051
|
+
topicListHTML = hotTopics.map((topic) => {
|
|
5052
|
+
const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
|
|
5053
|
+
return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
|
|
5054
|
+
}).join("");
|
|
4998
5055
|
if (loading) {
|
|
4999
|
-
topicListHTML += '<div class="topic-loading"
|
|
5056
|
+
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
5000
5057
|
} else if (!hasMore) {
|
|
5001
|
-
topicListHTML += '<div class="topic-empty"
|
|
5058
|
+
topicListHTML += '<div class="topic-empty">没有更多了</div>';
|
|
5002
5059
|
}
|
|
5003
5060
|
}
|
|
5004
5061
|
} else {
|
|
5005
5062
|
if (recentTopics.length === 0) {
|
|
5006
|
-
topicListHTML = '<div class="topic-empty"
|
|
5063
|
+
topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
|
|
5007
5064
|
} else {
|
|
5008
5065
|
topicListHTML = recentTopics.map(
|
|
5009
|
-
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
|
|
5066
|
+
(topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span></div>`
|
|
5010
5067
|
).join("");
|
|
5011
5068
|
}
|
|
5012
5069
|
}
|
|
@@ -5014,10 +5071,10 @@ const _sfc_main$3 = {
|
|
|
5014
5071
|
<div class="topic-popover-content">
|
|
5015
5072
|
<div class="topic-tabs">
|
|
5016
5073
|
<div class="topic-tab ${activeTab === "hot" ? "active" : ""}" data-tab="hot">
|
|
5017
|
-
|
|
5074
|
+
热门话题
|
|
5018
5075
|
</div>
|
|
5019
5076
|
<div class="topic-tab ${activeTab === "recent" ? "active" : ""}" data-tab="recent">
|
|
5020
|
-
|
|
5077
|
+
最近使用
|
|
5021
5078
|
</div>
|
|
5022
5079
|
</div>
|
|
5023
5080
|
<div class="topic-list-container">
|
|
@@ -5028,6 +5085,7 @@ const _sfc_main$3 = {
|
|
|
5028
5085
|
</div>
|
|
5029
5086
|
`;
|
|
5030
5087
|
},
|
|
5088
|
+
// 获取搜索话题弹框HTML
|
|
5031
5089
|
getSearchTopicPopoverHTML() {
|
|
5032
5090
|
const searchKeyword = this.topicPopover.searchKeyword;
|
|
5033
5091
|
const searchTopics = this.topicPopover.searchTopics;
|
|
@@ -5035,17 +5093,20 @@ const _sfc_main$3 = {
|
|
|
5035
5093
|
const searchHasMore = this.topicPopover.searchHasMore;
|
|
5036
5094
|
let topicListHTML = "";
|
|
5037
5095
|
if (loading && searchTopics.length === 0) {
|
|
5038
|
-
topicListHTML = '<div class="topic-loading"
|
|
5096
|
+
topicListHTML = '<div class="topic-loading">搜索中...</div>';
|
|
5039
5097
|
} else if (searchTopics.length === 0) {
|
|
5040
|
-
topicListHTML = '<div class="topic-empty"
|
|
5098
|
+
topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
|
|
5041
5099
|
} else {
|
|
5042
5100
|
topicListHTML = searchTopics.map(
|
|
5043
|
-
(topic) =>
|
|
5101
|
+
(topic) => {
|
|
5102
|
+
const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
|
|
5103
|
+
return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
|
|
5104
|
+
}
|
|
5044
5105
|
).join("");
|
|
5045
5106
|
if (loading) {
|
|
5046
|
-
topicListHTML += '<div class="topic-loading"
|
|
5107
|
+
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
5047
5108
|
} else if (!searchHasMore) {
|
|
5048
|
-
topicListHTML += '<div class="topic-empty"
|
|
5109
|
+
topicListHTML += '<div class="topic-empty">没有更多了</div>';
|
|
5049
5110
|
}
|
|
5050
5111
|
}
|
|
5051
5112
|
return `
|
|
@@ -5061,6 +5122,7 @@ const _sfc_main$3 = {
|
|
|
5061
5122
|
</div>
|
|
5062
5123
|
`;
|
|
5063
5124
|
},
|
|
5125
|
+
// 绑定话题弹框事件
|
|
5064
5126
|
bindTopicPopoverEvents() {
|
|
5065
5127
|
if (!this.topicPopover.globalContainer)
|
|
5066
5128
|
return;
|
|
@@ -5092,6 +5154,7 @@ const _sfc_main$3 = {
|
|
|
5092
5154
|
});
|
|
5093
5155
|
}
|
|
5094
5156
|
},
|
|
5157
|
+
// 根据ID查找话题
|
|
5095
5158
|
findTopicById(topicId) {
|
|
5096
5159
|
let topic = this.topicPopover.hotTopics.find((t) => t.id === topicId);
|
|
5097
5160
|
if (topic)
|
|
@@ -5210,13 +5273,15 @@ const _sfc_main$3 = {
|
|
|
5210
5273
|
topicId: topic.id,
|
|
5211
5274
|
topicType: topic.type || 0,
|
|
5212
5275
|
startIndex: 0,
|
|
5276
|
+
// 会在updateTopicPosition中更新
|
|
5213
5277
|
endIndex: 0
|
|
5278
|
+
// 会在updateTopicPosition中更新
|
|
5214
5279
|
}));
|
|
5215
5280
|
topicElement.textContent = topicText;
|
|
5216
5281
|
topicElement.setAttribute("contenteditable", "false");
|
|
5217
5282
|
range.deleteContents();
|
|
5218
5283
|
range.insertNode(topicElement);
|
|
5219
|
-
const spaceNode = document.createTextNode("
|
|
5284
|
+
const spaceNode = document.createTextNode(" ");
|
|
5220
5285
|
range.setStartAfter(topicElement);
|
|
5221
5286
|
range.insertNode(spaceNode);
|
|
5222
5287
|
const newRange = document.createRange();
|
|
@@ -5240,6 +5305,83 @@ const _sfc_main$3 = {
|
|
|
5240
5305
|
}, 0);
|
|
5241
5306
|
this.$emit("update-topic-position");
|
|
5242
5307
|
},
|
|
5308
|
+
moveCursor(spaceNode) {
|
|
5309
|
+
setTimeout(() => {
|
|
5310
|
+
const currentSelection = window.getSelection();
|
|
5311
|
+
if (currentSelection.rangeCount > 0) {
|
|
5312
|
+
const currentRange = currentSelection.getRangeAt(0);
|
|
5313
|
+
if (currentRange.startContainer !== spaceNode.nextSibling) {
|
|
5314
|
+
const correctRange = document.createRange();
|
|
5315
|
+
correctRange.setStartAfter(spaceNode);
|
|
5316
|
+
correctRange.collapse(true);
|
|
5317
|
+
currentSelection.removeAllRanges();
|
|
5318
|
+
currentSelection.addRange(correctRange);
|
|
5319
|
+
}
|
|
5320
|
+
}
|
|
5321
|
+
}, 0);
|
|
5322
|
+
},
|
|
5323
|
+
// 供外部项目调用:插入热门话题
|
|
5324
|
+
// 组件内部会自动监听外部点击并保存光标位置
|
|
5325
|
+
// topic: { id, type, title, exactlyMatchTitle }
|
|
5326
|
+
insertHotTopic(topic) {
|
|
5327
|
+
if (!this.editorDom) {
|
|
5328
|
+
console.warn("TopicManager: editorDom is required");
|
|
5329
|
+
return;
|
|
5330
|
+
}
|
|
5331
|
+
if (!topic || !topic.id) {
|
|
5332
|
+
console.warn("TopicManager: topic is required");
|
|
5333
|
+
return;
|
|
5334
|
+
}
|
|
5335
|
+
const topicText = topic.exactlyMatchTitle ? `#${topic.exactlyMatchTitle}` : `#${topic.title || topic.name || ""}`;
|
|
5336
|
+
const editorContent = this.editorDom.querySelector(".editor-content") || this.editorDom.querySelector(".editor") || this.editorDom;
|
|
5337
|
+
let range = this.savedRange;
|
|
5338
|
+
const selection = window.getSelection();
|
|
5339
|
+
this.savedRange = null;
|
|
5340
|
+
const topicElement = document.createElement("mdd-topic");
|
|
5341
|
+
topicElement.setAttribute("data-topic", JSON.stringify({
|
|
5342
|
+
topicId: topic.id,
|
|
5343
|
+
topicType: topic.type || 0,
|
|
5344
|
+
startIndex: 0,
|
|
5345
|
+
endIndex: 0
|
|
5346
|
+
}));
|
|
5347
|
+
topicElement.textContent = topicText;
|
|
5348
|
+
topicElement.setAttribute("contenteditable", "false");
|
|
5349
|
+
if (range) {
|
|
5350
|
+
range.deleteContents();
|
|
5351
|
+
range.insertNode(topicElement);
|
|
5352
|
+
const spaceNode = document.createTextNode(" ");
|
|
5353
|
+
range.setStartAfter(topicElement);
|
|
5354
|
+
range.insertNode(spaceNode);
|
|
5355
|
+
const newRange = document.createRange();
|
|
5356
|
+
newRange.setStartAfter(spaceNode);
|
|
5357
|
+
newRange.collapse(true);
|
|
5358
|
+
selection.removeAllRanges();
|
|
5359
|
+
selection.addRange(newRange);
|
|
5360
|
+
this.moveCursor(spaceNode);
|
|
5361
|
+
} else {
|
|
5362
|
+
let lastParagraph = editorContent.lastElementChild;
|
|
5363
|
+
if (!lastParagraph || lastParagraph.nodeName !== "P" && !lastParagraph.classList.contains("halo-paragraph") && !lastParagraph.classList.contains("halo-paragraph-title")) {
|
|
5364
|
+
lastParagraph = document.createElement("p");
|
|
5365
|
+
lastParagraph.className = "halo-paragraph";
|
|
5366
|
+
editorContent.appendChild(lastParagraph);
|
|
5367
|
+
}
|
|
5368
|
+
if (lastParagraph) {
|
|
5369
|
+
lastParagraph.appendChild(topicElement);
|
|
5370
|
+
const spaceNode = document.createTextNode(" ");
|
|
5371
|
+
lastParagraph.appendChild(spaceNode);
|
|
5372
|
+
const newRange = document.createRange();
|
|
5373
|
+
newRange.setStartAfter(spaceNode);
|
|
5374
|
+
newRange.collapse(true);
|
|
5375
|
+
selection.removeAllRanges();
|
|
5376
|
+
selection.addRange(newRange);
|
|
5377
|
+
this.moveCursor(spaceNode);
|
|
5378
|
+
} else {
|
|
5379
|
+
editorContent.appendChild(topicElement);
|
|
5380
|
+
}
|
|
5381
|
+
}
|
|
5382
|
+
this.$emit("update-topic-position");
|
|
5383
|
+
},
|
|
5384
|
+
// 销毁话题管理器
|
|
5243
5385
|
destroy() {
|
|
5244
5386
|
this.unbindEditorEvents();
|
|
5245
5387
|
this.hideTopicPopover();
|
|
@@ -5308,14 +5450,12 @@ const _sfc_main$2 = {
|
|
|
5308
5450
|
setStatus(val) {
|
|
5309
5451
|
this.$emit("update:visible", val);
|
|
5310
5452
|
}
|
|
5453
|
+
// submit() {
|
|
5454
|
+
// this.$emit('submit')
|
|
5455
|
+
// }
|
|
5311
5456
|
}
|
|
5312
5457
|
};
|
|
5313
|
-
const _hoisted_1$2 =
|
|
5314
|
-
/* @__PURE__ */ createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
|
|
5315
|
-
/* @__PURE__ */ 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__ */ 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);
|
|
5458
|
+
const _hoisted_1$2 = { class: "collect-article_content" };
|
|
5319
5459
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5320
5460
|
const _component_el_input = resolveComponent("el-input");
|
|
5321
5461
|
const _component_BasicDialog = resolveComponent("BasicDialog");
|
|
@@ -5324,16 +5464,19 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5324
5464
|
width: "600px",
|
|
5325
5465
|
height: "50px"
|
|
5326
5466
|
}, {
|
|
5327
|
-
title: withCtx(() => [
|
|
5328
|
-
|
|
5329
|
-
|
|
5467
|
+
title: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5468
|
+
createElementVNode("div", null, [
|
|
5469
|
+
createElementVNode("span", null, "采集文章"),
|
|
5470
|
+
createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
|
|
5471
|
+
], -1)
|
|
5472
|
+
])]),
|
|
5330
5473
|
default: withCtx(() => [
|
|
5331
|
-
createElementVNode("div",
|
|
5332
|
-
|
|
5474
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
5475
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
|
|
5333
5476
|
createVNode(_component_el_input, {
|
|
5334
5477
|
modelValue: $options.input,
|
|
5335
5478
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
|
|
5336
|
-
placeholder: "
|
|
5479
|
+
placeholder: "仅支持微信链接"
|
|
5337
5480
|
}, null, 8, ["modelValue"])
|
|
5338
5481
|
])
|
|
5339
5482
|
]),
|
|
@@ -5341,7 +5484,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5341
5484
|
}, 8, ["visible"]);
|
|
5342
5485
|
}
|
|
5343
5486
|
const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
5344
|
-
const
|
|
5487
|
+
const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
|
|
5345
5488
|
const _sfc_main$1 = {
|
|
5346
5489
|
components: {
|
|
5347
5490
|
ElIconError: CircleCloseFilled
|
|
@@ -5372,8 +5515,8 @@ const _hoisted_1$1 = {
|
|
|
5372
5515
|
};
|
|
5373
5516
|
const _hoisted_2$1 = ["src"];
|
|
5374
5517
|
const _hoisted_3$1 = { class: "article-item_right" };
|
|
5375
|
-
const _hoisted_4
|
|
5376
|
-
const _hoisted_5
|
|
5518
|
+
const _hoisted_4 = { class: "name" };
|
|
5519
|
+
const _hoisted_5 = { class: "score" };
|
|
5377
5520
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5378
5521
|
const _component_el_icon_error = resolveComponent("el-icon-error");
|
|
5379
5522
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
@@ -5383,11 +5526,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5383
5526
|
alt: ""
|
|
5384
5527
|
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
5385
5528
|
createElementVNode("div", _hoisted_3$1, [
|
|
5386
|
-
createElementVNode("div", _hoisted_4
|
|
5387
|
-
createElementVNode("div", _hoisted_5
|
|
5529
|
+
createElementVNode("div", _hoisted_4, toDisplayString($props.article.title), 1),
|
|
5530
|
+
createElementVNode("div", _hoisted_5, [
|
|
5388
5531
|
createElementVNode("span", null, toDisplayString($props.article.author), 1),
|
|
5389
|
-
createElementVNode("span", null, toDisplayString($props.article.viewNum) + "
|
|
5390
|
-
createElementVNode("span", null, toDisplayString($props.article.replycnt) + "
|
|
5532
|
+
createElementVNode("span", null, toDisplayString($props.article.viewNum) + "浏览", 1),
|
|
5533
|
+
createElementVNode("span", null, toDisplayString($props.article.replycnt) + "评论", 1)
|
|
5391
5534
|
])
|
|
5392
5535
|
]),
|
|
5393
5536
|
createVNode(_component_el_icon_error, {
|
|
@@ -5399,10 +5542,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5399
5542
|
class: normalizeClass([{
|
|
5400
5543
|
"article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
|
|
5401
5544
|
}, "article-bg"])
|
|
5402
|
-
}, "
|
|
5545
|
+
}, " 平台仅支持展示18个月的推荐内容 ", 2)) : createCommentVNode("", true)
|
|
5403
5546
|
]);
|
|
5404
5547
|
}
|
|
5405
|
-
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
5548
|
+
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
|
|
5406
5549
|
const mountArticleDom = (props, del) => {
|
|
5407
5550
|
const className = "article-wrap";
|
|
5408
5551
|
const article = props.article;
|
|
@@ -5462,6 +5605,7 @@ const _sfc_main = {
|
|
|
5462
5605
|
hasArticleCard: false,
|
|
5463
5606
|
cursorStyle: "auto",
|
|
5464
5607
|
titleCount: 0,
|
|
5608
|
+
// 标题数量
|
|
5465
5609
|
viewLinkDialog: false,
|
|
5466
5610
|
linkForm: {
|
|
5467
5611
|
linkAddress: "",
|
|
@@ -5469,40 +5613,56 @@ const _sfc_main = {
|
|
|
5469
5613
|
},
|
|
5470
5614
|
setAlignFlag: true,
|
|
5471
5615
|
article: {},
|
|
5616
|
+
// 插入的文章
|
|
5472
5617
|
imgList: [],
|
|
5473
5618
|
imgNum: 20,
|
|
5474
5619
|
videoList: [],
|
|
5475
5620
|
visibleVideo: false,
|
|
5476
5621
|
visibleCollectArticle: false,
|
|
5477
5622
|
visibleArticle: false,
|
|
5623
|
+
// 插入文章
|
|
5478
5624
|
visibleImg: false,
|
|
5625
|
+
// 插入图片
|
|
5479
5626
|
imgType: "normal",
|
|
5627
|
+
//
|
|
5480
5628
|
typeEnum: {
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5629
|
+
文字: "1",
|
|
5630
|
+
图片: "2",
|
|
5631
|
+
图文: "3",
|
|
5632
|
+
段落标题: "4",
|
|
5633
|
+
关联: "5",
|
|
5634
|
+
// 关联车辆、轨迹、活动、商家、话题
|
|
5635
|
+
单视频: "6",
|
|
5636
|
+
视频文字: "7",
|
|
5488
5637
|
URL: "8",
|
|
5489
|
-
|
|
5638
|
+
文章卡片: "11"
|
|
5490
5639
|
},
|
|
5491
5640
|
fontInfo: {
|
|
5492
5641
|
size: ""
|
|
5493
5642
|
},
|
|
5494
5643
|
user: {},
|
|
5644
|
+
// 用户
|
|
5495
5645
|
editor: {},
|
|
5646
|
+
// 编辑器实例对象
|
|
5496
5647
|
editorDom: {},
|
|
5648
|
+
// 编辑器Dom
|
|
5497
5649
|
uploadStore: {},
|
|
5650
|
+
// 待上传的图片池
|
|
5498
5651
|
failedUploads: [],
|
|
5652
|
+
// 失败图片列表,用于外部项目定位
|
|
5499
5653
|
linkContent: "",
|
|
5654
|
+
// 插入链接的地址
|
|
5500
5655
|
loadingText: "",
|
|
5656
|
+
// loaing的提示文字
|
|
5501
5657
|
progressPercent: "",
|
|
5658
|
+
// 上传进度
|
|
5502
5659
|
currentIndex: 0,
|
|
5503
5660
|
loading: false,
|
|
5661
|
+
// 是否提交中
|
|
5504
5662
|
viewStatus: false,
|
|
5663
|
+
// todo: 改名
|
|
5505
5664
|
linkStatus: false,
|
|
5665
|
+
// todo: 改名
|
|
5506
5666
|
styleStatus: {
|
|
5507
5667
|
bold: false,
|
|
5508
5668
|
italic: false,
|
|
@@ -5526,6 +5686,7 @@ const _sfc_main = {
|
|
|
5526
5686
|
targetMove: "",
|
|
5527
5687
|
moverClasses: ["halo-img-content", "halo-video-content"],
|
|
5528
5688
|
selectDom: null
|
|
5689
|
+
//选中的dom
|
|
5529
5690
|
};
|
|
5530
5691
|
},
|
|
5531
5692
|
computed: {
|
|
@@ -5542,12 +5703,12 @@ const _sfc_main = {
|
|
|
5542
5703
|
watch: {
|
|
5543
5704
|
progressPercent(val) {
|
|
5544
5705
|
const inner = document.querySelector(".video-progress .inner");
|
|
5545
|
-
console.log(val, "
|
|
5706
|
+
console.log(val, "视频上传进度");
|
|
5546
5707
|
if (inner) {
|
|
5547
5708
|
inner.style.width = val + "%";
|
|
5548
5709
|
if (val === 100) {
|
|
5549
5710
|
document.querySelector(".video-progress").innerHTML = `
|
|
5550
|
-
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;"
|
|
5711
|
+
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
|
|
5551
5712
|
`;
|
|
5552
5713
|
}
|
|
5553
5714
|
}
|
|
@@ -5576,7 +5737,7 @@ const _sfc_main = {
|
|
|
5576
5737
|
me2.editorDom = document.getElementById("editor-content");
|
|
5577
5738
|
me2.editorDom.addEventListener("blur", this.canSetAlign);
|
|
5578
5739
|
if (!window.Squire) {
|
|
5579
|
-
import("./squire-raw.
|
|
5740
|
+
import("./squire-raw-1aaeff0b.js").then(function() {
|
|
5580
5741
|
me2.initSquire();
|
|
5581
5742
|
});
|
|
5582
5743
|
} else {
|
|
@@ -5636,10 +5797,10 @@ const _sfc_main = {
|
|
|
5636
5797
|
this.visibleVideo = false;
|
|
5637
5798
|
const fileName = (files[0] && files[0].name || "").toLowerCase();
|
|
5638
5799
|
if (files[0].size > 1 * 1024 * 1024 * 1024) {
|
|
5639
|
-
return me2.setToast("
|
|
5800
|
+
return me2.setToast("视频大小不能超过1GB");
|
|
5640
5801
|
}
|
|
5641
5802
|
if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
|
|
5642
|
-
return me2.setToast("
|
|
5803
|
+
return me2.setToast("视频格式不是mp4或mov");
|
|
5643
5804
|
}
|
|
5644
5805
|
const me2 = this;
|
|
5645
5806
|
if (me2.loading)
|
|
@@ -5659,7 +5820,9 @@ const _sfc_main = {
|
|
|
5659
5820
|
id: result.videoId,
|
|
5660
5821
|
desc: "",
|
|
5661
5822
|
vodSize: result.vodSize || "",
|
|
5823
|
+
// 视频大小
|
|
5662
5824
|
vodType: result.vodType || ""
|
|
5825
|
+
// 图片尺寸
|
|
5663
5826
|
};
|
|
5664
5827
|
me2.$emit("updateAddVideo", true);
|
|
5665
5828
|
me2.editor["insertVideo"](result.videoUrl, video);
|
|
@@ -5713,11 +5876,11 @@ const _sfc_main = {
|
|
|
5713
5876
|
},
|
|
5714
5877
|
insertLink() {
|
|
5715
5878
|
if (!this.linkForm.linkAddress)
|
|
5716
|
-
return ElMessage.error("
|
|
5879
|
+
return ElMessage.error("请输入链接地址");
|
|
5717
5880
|
if (!this.linkForm.linkWriting)
|
|
5718
|
-
return ElMessage.error("
|
|
5881
|
+
return ElMessage.error("请输入链接文案");
|
|
5719
5882
|
if (!this.validUrl(this.linkForm.linkAddress)) {
|
|
5720
|
-
return this.setToast("URL
|
|
5883
|
+
return this.setToast("URL无效");
|
|
5721
5884
|
}
|
|
5722
5885
|
this.editor.insertLink(
|
|
5723
5886
|
this.linkForm.linkAddress,
|
|
@@ -5746,9 +5909,19 @@ const _sfc_main = {
|
|
|
5746
5909
|
});
|
|
5747
5910
|
});
|
|
5748
5911
|
},
|
|
5912
|
+
// TopicManager事件处理
|
|
5749
5913
|
onTopicInserted(topic) {
|
|
5750
5914
|
this.updateData(true);
|
|
5751
5915
|
},
|
|
5916
|
+
// 供外部项目调用:插入热门话题
|
|
5917
|
+
// 如果编辑器有光标则插入光标位置,否则插入文档末尾
|
|
5918
|
+
// topic: { id, type, title, exactlyMatchTitle }
|
|
5919
|
+
insertHotTopic(topic) {
|
|
5920
|
+
if (this.$refs.topicManager) {
|
|
5921
|
+
this.$refs.topicManager.insertHotTopic(topic);
|
|
5922
|
+
this.updateData(true);
|
|
5923
|
+
}
|
|
5924
|
+
},
|
|
5752
5925
|
getHtml(type) {
|
|
5753
5926
|
this.updateTopicPosition();
|
|
5754
5927
|
const html = this.editor.getHTML();
|
|
@@ -6216,7 +6389,7 @@ const _sfc_main = {
|
|
|
6216
6389
|
me2.currentVideo = node;
|
|
6217
6390
|
e.stopPropagation();
|
|
6218
6391
|
};
|
|
6219
|
-
replaceBtn.innerText = "
|
|
6392
|
+
replaceBtn.innerText = "更换封面";
|
|
6220
6393
|
return replaceBtn;
|
|
6221
6394
|
},
|
|
6222
6395
|
insertImgOperateBtns(editor, data) {
|
|
@@ -6241,7 +6414,7 @@ const _sfc_main = {
|
|
|
6241
6414
|
class: "desc-input",
|
|
6242
6415
|
maxlength: "100",
|
|
6243
6416
|
cols: "50",
|
|
6244
|
-
placeholder: "
|
|
6417
|
+
placeholder: "请输入图片描述(最多100字)",
|
|
6245
6418
|
contenteditable: "false"
|
|
6246
6419
|
});
|
|
6247
6420
|
descInput.disabled = me2.disabled;
|
|
@@ -6253,7 +6426,7 @@ const _sfc_main = {
|
|
|
6253
6426
|
const img = parent.querySelector(".halo-picture-area");
|
|
6254
6427
|
img.dataset.desc = e.target.value;
|
|
6255
6428
|
if (e.target.value.length > 99) {
|
|
6256
|
-
return me2.setToast("
|
|
6429
|
+
return me2.setToast("限制100个字符");
|
|
6257
6430
|
}
|
|
6258
6431
|
};
|
|
6259
6432
|
descInput.value = data.content || "";
|
|
@@ -6303,7 +6476,7 @@ const _sfc_main = {
|
|
|
6303
6476
|
me2.removeParentByClass(e.target, "halo-img-content");
|
|
6304
6477
|
me2.updateData(true);
|
|
6305
6478
|
};
|
|
6306
|
-
replaceBtn.innerHTML = "
|
|
6479
|
+
replaceBtn.innerHTML = "替换";
|
|
6307
6480
|
return [replaceBtn, delBtn, descInputWrap];
|
|
6308
6481
|
},
|
|
6309
6482
|
removeSeamlessLaster(e) {
|
|
@@ -6327,6 +6500,7 @@ const _sfc_main = {
|
|
|
6327
6500
|
}
|
|
6328
6501
|
}
|
|
6329
6502
|
},
|
|
6503
|
+
// 初始化编辑器数据,数据是 html 格式(displayData)
|
|
6330
6504
|
initData(data = "", essayPicRelVOList) {
|
|
6331
6505
|
this.parseHtml(data, essayPicRelVOList).then((res) => {
|
|
6332
6506
|
this.editorDom.innerHTML = "";
|
|
@@ -6334,10 +6508,13 @@ const _sfc_main = {
|
|
|
6334
6508
|
this.updateData();
|
|
6335
6509
|
});
|
|
6336
6510
|
},
|
|
6511
|
+
// TODO jsonToHtml、htmlToJson 实现这 2 个方法里面的逻辑,数据结构参考方法里面的注释,出参入参都为字符串,注意:mdd-topic 里面的属性数据 和 json 中的topicPosition数据是一一对应的,startIndex、endIndex为mdd-topic的起止位置 从 content 里面进行分割处理
|
|
6512
|
+
// json、html 数据格式互转,暂时只支持文字、短话题
|
|
6337
6513
|
jsonToHtml(json) {
|
|
6338
6514
|
},
|
|
6339
6515
|
htmlToJson(html) {
|
|
6340
6516
|
},
|
|
6517
|
+
// 设置富文本组件
|
|
6341
6518
|
initSquire() {
|
|
6342
6519
|
const me2 = this;
|
|
6343
6520
|
const editorDom = me2.editorDom;
|
|
@@ -6787,6 +6964,7 @@ const _sfc_main = {
|
|
|
6787
6964
|
window.Squire.empty(block)
|
|
6788
6965
|
]);
|
|
6789
6966
|
output.appendChild(
|
|
6967
|
+
// 段落才能添加标题
|
|
6790
6968
|
Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
|
|
6791
6969
|
);
|
|
6792
6970
|
}
|
|
@@ -6809,18 +6987,18 @@ const _sfc_main = {
|
|
|
6809
6987
|
});
|
|
6810
6988
|
loading.innerHTML = `
|
|
6811
6989
|
<img class="img-loading-icon" src="/img/upload-image-loading.png"/>
|
|
6812
|
-
<span class="img-loading-tip"
|
|
6990
|
+
<span class="img-loading-tip">上传中...</span>
|
|
6813
6991
|
`;
|
|
6814
6992
|
var fail = this.createElement("div", {
|
|
6815
6993
|
class: "img-fail hide",
|
|
6816
6994
|
contenteditable: "false"
|
|
6817
6995
|
});
|
|
6818
|
-
fail.innerHTML = "
|
|
6996
|
+
fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
|
|
6819
6997
|
var again = this.createElement("button", {
|
|
6820
6998
|
class: "img-again hide",
|
|
6821
6999
|
contenteditable: "false"
|
|
6822
7000
|
});
|
|
6823
|
-
again.innerHTML = "
|
|
7001
|
+
again.innerHTML = "重新上传";
|
|
6824
7002
|
const isGif = src && src.indexOf(".gif") > -1;
|
|
6825
7003
|
const isGifNowater = src && src.indexOf(".gif!nowater") > -1;
|
|
6826
7004
|
if (isGif && !isGifNowater) {
|
|
@@ -6876,7 +7054,7 @@ const _sfc_main = {
|
|
|
6876
7054
|
});
|
|
6877
7055
|
div.innerHTML = `
|
|
6878
7056
|
<div class="video-progress">
|
|
6879
|
-
<div class="label"
|
|
7057
|
+
<div class="label">上传中...</div>
|
|
6880
7058
|
<div class="box">
|
|
6881
7059
|
<div class="inner" style="width:20%"></div>
|
|
6882
7060
|
</div>
|
|
@@ -6899,6 +7077,7 @@ const _sfc_main = {
|
|
|
6899
7077
|
data: JSON.stringify(data),
|
|
6900
7078
|
"data-content": data.content || "",
|
|
6901
7079
|
poster: data.img || ""
|
|
7080
|
+
// 'contenteditable': 'true',
|
|
6902
7081
|
});
|
|
6903
7082
|
var delBtn = me2.genIconDom({
|
|
6904
7083
|
class: "pointer video-delete icon",
|
|
@@ -6956,6 +7135,7 @@ const _sfc_main = {
|
|
|
6956
7135
|
}
|
|
6957
7136
|
};
|
|
6958
7137
|
},
|
|
7138
|
+
// 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
|
|
6959
7139
|
setListener(dom) {
|
|
6960
7140
|
const me2 = this;
|
|
6961
7141
|
const doms = dom ? [dom] : Array.from(this.editorDom.children);
|
|
@@ -6966,7 +7146,7 @@ const _sfc_main = {
|
|
|
6966
7146
|
p.onclick = function(e) {
|
|
6967
7147
|
var _a;
|
|
6968
7148
|
if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
|
|
6969
|
-
me2.setToast("
|
|
7149
|
+
me2.setToast("不支持播放");
|
|
6970
7150
|
}
|
|
6971
7151
|
if (e.target.className.includes("desc-input")) {
|
|
6972
7152
|
return;
|
|
@@ -7030,6 +7210,7 @@ const _sfc_main = {
|
|
|
7030
7210
|
};
|
|
7031
7211
|
return del;
|
|
7032
7212
|
},
|
|
7213
|
+
// 转换数据,返回给业务
|
|
7033
7214
|
getEditorData() {
|
|
7034
7215
|
const me2 = this;
|
|
7035
7216
|
const children = Array.from(me2.editorDom.children);
|
|
@@ -7087,9 +7268,11 @@ const _sfc_main = {
|
|
|
7087
7268
|
videoIds
|
|
7088
7269
|
};
|
|
7089
7270
|
},
|
|
7271
|
+
// 是否是摩托范的图片
|
|
7090
7272
|
isHaloImage(url = "") {
|
|
7091
7273
|
return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1 || url.indexOf("evtolfine") > -1 || url.indexOf("biaofine") > -1 || url.indexOf("robotbaodian") > -1;
|
|
7092
7274
|
},
|
|
7275
|
+
// 获取待上传图片列表
|
|
7093
7276
|
updateUploads() {
|
|
7094
7277
|
const me2 = this;
|
|
7095
7278
|
setTimeout(() => {
|
|
@@ -7137,8 +7320,8 @@ const _sfc_main = {
|
|
|
7137
7320
|
const currentImg = me2.uploadStore[key];
|
|
7138
7321
|
const imageUrl = key.split("|")[1] || "";
|
|
7139
7322
|
if (!currentImg) {
|
|
7140
|
-
console.log("
|
|
7141
|
-
return Promise.reject("
|
|
7323
|
+
console.log("图片不存在", key);
|
|
7324
|
+
return Promise.reject("图片不存在");
|
|
7142
7325
|
}
|
|
7143
7326
|
const parent = currentImg.parentNode || "";
|
|
7144
7327
|
const uploadFailHandler = (currentImg2) => {
|
|
@@ -7188,6 +7371,7 @@ const _sfc_main = {
|
|
|
7188
7371
|
parent && uploadFailHandler(currentImg);
|
|
7189
7372
|
});
|
|
7190
7373
|
},
|
|
7374
|
+
// 更新上传的图片
|
|
7191
7375
|
updateImage(img, currentImg = {}) {
|
|
7192
7376
|
const data = JSON.parse(currentImg.getAttribute("data") || "{}");
|
|
7193
7377
|
data.img = img;
|
|
@@ -7212,6 +7396,7 @@ const _sfc_main = {
|
|
|
7212
7396
|
const imgId = currentImg.getAttribute("id") || "";
|
|
7213
7397
|
this.failedUploads = this.failedUploads.filter((item) => item.id !== imgId);
|
|
7214
7398
|
},
|
|
7399
|
+
// 滚动到第一个失败图片的位置,供外部项目调用
|
|
7215
7400
|
scrollToFirstFailedImage() {
|
|
7216
7401
|
this.failedUploads = this.failedUploads.filter((item) => {
|
|
7217
7402
|
return item.element && document.body.contains(item.element);
|
|
@@ -7236,9 +7421,11 @@ const _sfc_main = {
|
|
|
7236
7421
|
}
|
|
7237
7422
|
return false;
|
|
7238
7423
|
},
|
|
7424
|
+
// 获取ctrl + v 后内容
|
|
7239
7425
|
getSticker(type, handler) {
|
|
7240
7426
|
this.setSticker(type.fragment.children);
|
|
7241
7427
|
},
|
|
7428
|
+
// 粘贴表格内容,tr换行形成段落
|
|
7242
7429
|
setStickerTableContent(data) {
|
|
7243
7430
|
const me2 = this;
|
|
7244
7431
|
const rows = data.querySelectorAll("tr") || [];
|
|
@@ -7267,6 +7454,7 @@ const _sfc_main = {
|
|
|
7267
7454
|
});
|
|
7268
7455
|
this.updateData(true);
|
|
7269
7456
|
},
|
|
7457
|
+
// 粘贴
|
|
7270
7458
|
setSticker(data) {
|
|
7271
7459
|
const me2 = this;
|
|
7272
7460
|
data = Array.from(data);
|
|
@@ -7305,6 +7493,7 @@ const _sfc_main = {
|
|
|
7305
7493
|
const me2 = this;
|
|
7306
7494
|
me2.updateData();
|
|
7307
7495
|
},
|
|
7496
|
+
// 监测 添加、撤回、恢复、删除
|
|
7308
7497
|
setBack(e, type) {
|
|
7309
7498
|
const me2 = this;
|
|
7310
7499
|
me2.refreshImg();
|
|
@@ -7337,6 +7526,7 @@ const _sfc_main = {
|
|
|
7337
7526
|
}
|
|
7338
7527
|
});
|
|
7339
7528
|
},
|
|
7529
|
+
// 设置scoll
|
|
7340
7530
|
sticky() {
|
|
7341
7531
|
const me2 = this;
|
|
7342
7532
|
me2.$nextTick(function() {
|
|
@@ -7356,6 +7546,8 @@ const _sfc_main = {
|
|
|
7356
7546
|
document.addEventListener("scroll", onScroll);
|
|
7357
7547
|
});
|
|
7358
7548
|
},
|
|
7549
|
+
// ==========toolbox==========
|
|
7550
|
+
// 撤回、恢复、段落标题
|
|
7359
7551
|
setContent(e, obj) {
|
|
7360
7552
|
const me2 = this;
|
|
7361
7553
|
const id = e.target.id || e.target.dataset.editorId;
|
|
@@ -7397,10 +7589,11 @@ const _sfc_main = {
|
|
|
7397
7589
|
this.fontInfo = this.editor.getFontInfo();
|
|
7398
7590
|
this.updateData(true);
|
|
7399
7591
|
},
|
|
7592
|
+
// 增加link
|
|
7400
7593
|
addLink(type) {
|
|
7401
7594
|
const me2 = this;
|
|
7402
|
-
me2.linkTitleName = type === "link" ? "
|
|
7403
|
-
me2.linkPlaceholder = type === "link" ? "
|
|
7595
|
+
me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
|
|
7596
|
+
me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
|
|
7404
7597
|
me2.viewStatus = true;
|
|
7405
7598
|
me2.linkStatus = true;
|
|
7406
7599
|
},
|
|
@@ -7408,29 +7601,31 @@ const _sfc_main = {
|
|
|
7408
7601
|
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.,;?'&%$#=~_-]+))*$/;
|
|
7409
7602
|
return objExp.test(url);
|
|
7410
7603
|
},
|
|
7604
|
+
// 确认增加link
|
|
7411
7605
|
confirmLink() {
|
|
7412
7606
|
const me2 = this;
|
|
7413
7607
|
if (!me2.linkContent) {
|
|
7414
|
-
return ElMessage.error("
|
|
7608
|
+
return ElMessage.error("请输入链接地址!");
|
|
7415
7609
|
}
|
|
7416
|
-
if (me2.linkTitleName === "
|
|
7610
|
+
if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
|
|
7417
7611
|
this.visibleCollectArticle = false;
|
|
7418
7612
|
return me2.importLinkData();
|
|
7419
7613
|
}
|
|
7420
7614
|
if (!this.validUrl(me2.linkContent)) {
|
|
7421
|
-
return me2.setToast("URL
|
|
7615
|
+
return me2.setToast("URL无效");
|
|
7422
7616
|
}
|
|
7423
7617
|
if (!me2.isHaloImage(me2.linkContent)) {
|
|
7424
|
-
return me2.setToast("
|
|
7618
|
+
return me2.setToast("请输入摩托范内部网址");
|
|
7425
7619
|
}
|
|
7426
7620
|
me2.editor["insertLink"](me2.linkContent);
|
|
7427
7621
|
me2.linkContent = "";
|
|
7428
7622
|
me2.closeDialog();
|
|
7429
7623
|
},
|
|
7624
|
+
// 增加link导入数据
|
|
7430
7625
|
importLinkData() {
|
|
7431
7626
|
const me2 = this;
|
|
7432
7627
|
if (me2.loading) {
|
|
7433
|
-
return ElMessage("
|
|
7628
|
+
return ElMessage("正在获取信息,请稍后...");
|
|
7434
7629
|
}
|
|
7435
7630
|
me2.loading = true;
|
|
7436
7631
|
const params = {
|
|
@@ -7452,39 +7647,44 @@ const _sfc_main = {
|
|
|
7452
7647
|
me2.linkContent = "";
|
|
7453
7648
|
return;
|
|
7454
7649
|
} else {
|
|
7455
|
-
me2.setToast("
|
|
7650
|
+
me2.setToast("导入失败,请重试");
|
|
7456
7651
|
}
|
|
7457
7652
|
}).catch((err) => {
|
|
7458
7653
|
console.log(err.message);
|
|
7459
|
-
me2.setToast("
|
|
7654
|
+
me2.setToast("导入异常,请重试");
|
|
7460
7655
|
}).finally((_) => {
|
|
7461
7656
|
me2.loading = false;
|
|
7462
7657
|
});
|
|
7463
7658
|
},
|
|
7659
|
+
// 打开 图片、视频、一键导入 弹框
|
|
7464
7660
|
openDialog(name) {
|
|
7465
7661
|
const me2 = this;
|
|
7466
|
-
me2.viewName = name === "img" ? "
|
|
7467
|
-
me2.viewButton = name === "img" ? "
|
|
7468
|
-
me2.viewTip = name === "img" ? "" : "
|
|
7662
|
+
me2.viewName = name === "img" ? "添加图片" : "添加视频";
|
|
7663
|
+
me2.viewButton = name === "img" ? "选择图片" : "选择视频";
|
|
7664
|
+
me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
|
|
7469
7665
|
me2.viewStatus = true;
|
|
7470
7666
|
},
|
|
7667
|
+
// 关闭弹框
|
|
7471
7668
|
closeDialog() {
|
|
7472
7669
|
this.viewStatus = false;
|
|
7473
7670
|
this.linkStatus = false;
|
|
7474
7671
|
this.linkContent = "";
|
|
7475
7672
|
},
|
|
7673
|
+
// ==========toolbox end==========
|
|
7674
|
+
// 弹框提示
|
|
7476
7675
|
setToast(content) {
|
|
7477
7676
|
ElMessage.error(content);
|
|
7478
7677
|
},
|
|
7479
7678
|
setMessageBoxNoCancel(content) {
|
|
7480
7679
|
ElMessageBox.confirm(content, "", {
|
|
7481
|
-
confirmButtonText: "
|
|
7482
|
-
cancelButtonText: "
|
|
7680
|
+
confirmButtonText: "确定",
|
|
7681
|
+
cancelButtonText: "取消",
|
|
7483
7682
|
type: "warning"
|
|
7484
7683
|
}).then(() => {
|
|
7485
7684
|
}).catch(() => {
|
|
7486
7685
|
});
|
|
7487
7686
|
},
|
|
7687
|
+
// 检查是否会创建嵌套的halo-paragraph
|
|
7488
7688
|
wouldCreateNestedParagraph(range) {
|
|
7489
7689
|
let container = range.startContainer;
|
|
7490
7690
|
while (container && container !== this.editorDom) {
|
|
@@ -7495,6 +7695,7 @@ const _sfc_main = {
|
|
|
7495
7695
|
}
|
|
7496
7696
|
return false;
|
|
7497
7697
|
},
|
|
7698
|
+
// 检查光标是否在两个连续的mdd-topic之间
|
|
7498
7699
|
isBetweenTwoTopics(range) {
|
|
7499
7700
|
const container = range.startContainer;
|
|
7500
7701
|
const offset = range.startOffset;
|
|
@@ -7510,6 +7711,7 @@ const _sfc_main = {
|
|
|
7510
7711
|
}
|
|
7511
7712
|
return false;
|
|
7512
7713
|
},
|
|
7714
|
+
// 处理两个话题之间的回车或话题前面的回车
|
|
7513
7715
|
handleEnterBetweenTopics(range) {
|
|
7514
7716
|
var _a;
|
|
7515
7717
|
const me2 = this;
|
|
@@ -7547,6 +7749,7 @@ const _sfc_main = {
|
|
|
7547
7749
|
selection.addRange(newRange);
|
|
7548
7750
|
me2.updateData(true);
|
|
7549
7751
|
},
|
|
7752
|
+
// 更精确地提取光标后的内容(专门用于话题分割)
|
|
7550
7753
|
extractContentAfterCursorPrecise(range, paragraph) {
|
|
7551
7754
|
const fragment = document.createDocumentFragment();
|
|
7552
7755
|
const container = range.startContainer;
|
|
@@ -7572,6 +7775,7 @@ const _sfc_main = {
|
|
|
7572
7775
|
}
|
|
7573
7776
|
return fragment;
|
|
7574
7777
|
},
|
|
7778
|
+
// 处理包含话题的段落中的回车键
|
|
7575
7779
|
handleEnterKeyInParagraphWithTopic(range) {
|
|
7576
7780
|
var _a;
|
|
7577
7781
|
const me2 = this;
|
|
@@ -7646,6 +7850,7 @@ const _sfc_main = {
|
|
|
7646
7850
|
selection.addRange(newRange);
|
|
7647
7851
|
me2.updateData(true);
|
|
7648
7852
|
},
|
|
7853
|
+
// 检查光标是否在第一个话题前面
|
|
7649
7854
|
isCursorBeforeFirstTopic(range, paragraph) {
|
|
7650
7855
|
const container = range.startContainer;
|
|
7651
7856
|
const offset = range.startOffset;
|
|
@@ -7707,6 +7912,7 @@ const _sfc_main = {
|
|
|
7707
7912
|
}
|
|
7708
7913
|
return false;
|
|
7709
7914
|
},
|
|
7915
|
+
// 获取不包含mdd-topic内部文本的段落文本
|
|
7710
7916
|
getParagraphTextExcludingTopics(paragraph, range) {
|
|
7711
7917
|
let textContent = "";
|
|
7712
7918
|
let cursorPosition = 0;
|
|
@@ -7737,10 +7943,12 @@ const _sfc_main = {
|
|
|
7737
7943
|
}
|
|
7738
7944
|
return { textContent, cursorPosition };
|
|
7739
7945
|
},
|
|
7946
|
+
// 检查光标是否在段落开头
|
|
7740
7947
|
isCursorAtStartOfParagraph(range, paragraph) {
|
|
7741
7948
|
const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
|
|
7742
7949
|
return cursorPosition === 0;
|
|
7743
7950
|
},
|
|
7951
|
+
// 检查光标是否在段落末尾
|
|
7744
7952
|
isCursorAtEndOfParagraph(range, paragraph) {
|
|
7745
7953
|
const walker = document.createTreeWalker(
|
|
7746
7954
|
paragraph,
|
|
@@ -7767,6 +7975,7 @@ const _sfc_main = {
|
|
|
7767
7975
|
const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
|
|
7768
7976
|
return cursorPosition >= totalLength;
|
|
7769
7977
|
},
|
|
7978
|
+
// 获取当前段落
|
|
7770
7979
|
getCurrentParagraph(range) {
|
|
7771
7980
|
let container = range.startContainer;
|
|
7772
7981
|
while (container && container !== this.editorDom) {
|
|
@@ -7777,12 +7986,13 @@ const _sfc_main = {
|
|
|
7777
7986
|
}
|
|
7778
7987
|
return null;
|
|
7779
7988
|
},
|
|
7989
|
+
// 提取光标后的内容
|
|
7780
7990
|
extractContentAfterCursor(range, paragraph) {
|
|
7781
7991
|
const fragment = document.createDocumentFragment();
|
|
7782
7992
|
const container = range.startContainer;
|
|
7783
7993
|
const offset = range.startOffset;
|
|
7784
7994
|
let topicSpaceNode = null;
|
|
7785
|
-
if (container.nodeType === Node.TEXT_NODE && container.textContent === "
|
|
7995
|
+
if (container.nodeType === Node.TEXT_NODE && container.textContent === " " && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
|
|
7786
7996
|
topicSpaceNode = container;
|
|
7787
7997
|
}
|
|
7788
7998
|
const extractRange = document.createRange();
|
|
@@ -7837,7 +8047,8 @@ const _sfc_main = {
|
|
|
7837
8047
|
try {
|
|
7838
8048
|
extractRange.setStartBefore(startNode);
|
|
7839
8049
|
let lastNode = paragraph.lastChild;
|
|
7840
|
-
while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" &&
|
|
8050
|
+
while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && // 只跳过完全空的文本节点
|
|
8051
|
+
lastNode !== startNode) {
|
|
7841
8052
|
lastNode = lastNode.previousSibling;
|
|
7842
8053
|
}
|
|
7843
8054
|
if (lastNode) {
|
|
@@ -7857,6 +8068,7 @@ const _sfc_main = {
|
|
|
7857
8068
|
}
|
|
7858
8069
|
return fragment;
|
|
7859
8070
|
},
|
|
8071
|
+
// 统一的光标设置方法 - 设置光标到元素后面
|
|
7860
8072
|
setCursorAfterElement(element) {
|
|
7861
8073
|
const newRange = document.createRange();
|
|
7862
8074
|
newRange.setStartAfter(element);
|
|
@@ -7865,6 +8077,7 @@ const _sfc_main = {
|
|
|
7865
8077
|
selection.removeAllRanges();
|
|
7866
8078
|
selection.addRange(newRange);
|
|
7867
8079
|
},
|
|
8080
|
+
// 统一的光标设置方法 - 设置光标到元素前面
|
|
7868
8081
|
setCursorBeforeElement(element) {
|
|
7869
8082
|
const newRange = document.createRange();
|
|
7870
8083
|
newRange.setStartBefore(element);
|
|
@@ -7884,8 +8097,6 @@ const _hoisted_3 = {
|
|
|
7884
8097
|
slot: "footer",
|
|
7885
8098
|
class: "dialog-footer"
|
|
7886
8099
|
};
|
|
7887
|
-
const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u53D6 \u6D88");
|
|
7888
|
-
const _hoisted_5 = /* @__PURE__ */ createTextVNode("\u786E \u5B9A");
|
|
7889
8100
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7890
8101
|
const _component_el_input = resolveComponent("el-input");
|
|
7891
8102
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -7901,7 +8112,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7901
8112
|
withDirectives(createElementVNode("div", {
|
|
7902
8113
|
style: normalizeStyle({ textAlign: $options.align }),
|
|
7903
8114
|
class: "placeholder"
|
|
7904
|
-
}, toDisplayString($props.placeholder || "
|
|
8115
|
+
}, toDisplayString($props.placeholder || "请输入正文"), 5), [
|
|
7905
8116
|
[vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
|
|
7906
8117
|
]),
|
|
7907
8118
|
$data.overLine ? (openBlock(), createElementBlock("div", {
|
|
@@ -7926,26 +8137,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7926
8137
|
createVNode(_component_el_form, { model: $data.linkForm }, {
|
|
7927
8138
|
default: withCtx(() => [
|
|
7928
8139
|
createVNode(_component_el_form_item, {
|
|
7929
|
-
label: "
|
|
8140
|
+
label: "添加链接",
|
|
7930
8141
|
class: "link-title"
|
|
7931
8142
|
}, {
|
|
7932
8143
|
default: withCtx(() => [
|
|
7933
8144
|
createVNode(_component_el_input, {
|
|
7934
8145
|
modelValue: $data.linkForm.linkAddress,
|
|
7935
8146
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
|
|
7936
|
-
placeholder: "
|
|
8147
|
+
placeholder: "请输入链接地址"
|
|
7937
8148
|
}, null, 8, ["modelValue"])
|
|
7938
8149
|
]),
|
|
7939
8150
|
_: 1
|
|
7940
8151
|
}),
|
|
7941
|
-
createVNode(_component_el_form_item, { label: "
|
|
8152
|
+
createVNode(_component_el_form_item, { label: "链接文案" }, {
|
|
7942
8153
|
default: withCtx(() => [
|
|
7943
8154
|
createVNode(_component_el_input, {
|
|
7944
8155
|
modelValue: $data.linkForm.linkWriting,
|
|
7945
8156
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
|
|
7946
8157
|
type: "textarea",
|
|
7947
8158
|
autosize: "",
|
|
7948
|
-
placeholder: "
|
|
8159
|
+
placeholder: "请输入链接文案"
|
|
7949
8160
|
}, null, 8, ["modelValue"])
|
|
7950
8161
|
]),
|
|
7951
8162
|
_: 1
|
|
@@ -7958,18 +8169,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7958
8169
|
createVNode(_component_el_button, {
|
|
7959
8170
|
onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
|
|
7960
8171
|
}, {
|
|
7961
|
-
default: withCtx(() => [
|
|
7962
|
-
|
|
7963
|
-
]),
|
|
8172
|
+
default: withCtx(() => [..._cache[14] || (_cache[14] = [
|
|
8173
|
+
createTextVNode("取 消", -1)
|
|
8174
|
+
])]),
|
|
7964
8175
|
_: 1
|
|
7965
8176
|
}),
|
|
7966
8177
|
createVNode(_component_el_button, {
|
|
7967
8178
|
type: "primary",
|
|
7968
8179
|
onClick: $options.insertLink
|
|
7969
8180
|
}, {
|
|
7970
|
-
default: withCtx(() => [
|
|
7971
|
-
|
|
7972
|
-
]),
|
|
8181
|
+
default: withCtx(() => [..._cache[15] || (_cache[15] = [
|
|
8182
|
+
createTextVNode("确 定", -1)
|
|
8183
|
+
])]),
|
|
7973
8184
|
_: 1
|
|
7974
8185
|
}, 8, ["onClick"])
|
|
7975
8186
|
])
|
|
@@ -7986,7 +8197,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7986
8197
|
}, null, 8, ["article", "visible", "getList", "onDelete", "onChange"]),
|
|
7987
8198
|
createVNode(_component_ImgUpload, {
|
|
7988
8199
|
"img-list": $data.imgList,
|
|
7989
|
-
"onUpdate:
|
|
8200
|
+
"onUpdate:imgList": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
|
|
7990
8201
|
visible: $data.visibleImg,
|
|
7991
8202
|
"onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
|
|
7992
8203
|
chartGallery: $props.chartGallery,
|
|
@@ -8001,7 +8212,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
8001
8212
|
}, null, 8, ["visible", "file-selected"]),
|
|
8002
8213
|
createVNode(_component_CollectArticle, {
|
|
8003
8214
|
"link-content": $data.linkContent,
|
|
8004
|
-
"onUpdate:
|
|
8215
|
+
"onUpdate:linkContent": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
|
|
8005
8216
|
visible: $data.visibleCollectArticle,
|
|
8006
8217
|
"onUpdate:visible": _cache[10] || (_cache[10] = ($event) => $data.visibleCollectArticle = $event),
|
|
8007
8218
|
onSubmit: $options.confirmLink
|