@haluo/biz 2.0.44 → 2.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/haluo-biz.js +789 -688
- package/dist/haluo-biz.umd.cjs +812 -700
- package/dist/{squire-raw.3e73a64b.js → squire-raw-1aaeff0b.js} +18 -4
- package/dist/style.css +40 -52
- package/package.json +1 -1
package/dist/haluo-biz.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
|
-
width:
|
|
1157
|
-
class: normalizeClass(["basic-dialog", { "hide-title": !
|
|
1153
|
+
width: _ctx.width,
|
|
1154
|
+
class: normalizeClass(["basic-dialog", { "hide-title": !_ctx.showTitle }])
|
|
1158
1155
|
}, {
|
|
1159
1156
|
header: withCtx(() => [
|
|
1160
|
-
|
|
1161
|
-
createElementVNode("div", _hoisted_2$
|
|
1162
|
-
|
|
1157
|
+
_ctx.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
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
|
-
|
|
1165
|
+
_ctx.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("取消")
|
|
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("确认")
|
|
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("插入文章/视频")),
|
|
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("从我的文章中选择")
|
|
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("从我的视频中选择")
|
|
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("从所有文章中选择")
|
|
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("搜索")
|
|
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(" 请阅读")),
|
|
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(",您的行为视为您已同意该协议。 "))
|
|
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("选择视频")
|
|
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,28 @@ 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
|
},
|
|
4464
|
+
// 中文输入法状态
|
|
4449
4465
|
isComposing: false
|
|
4450
4466
|
};
|
|
4451
4467
|
},
|
|
4452
4468
|
methods: {
|
|
4469
|
+
// 初始化话题管理器
|
|
4453
4470
|
init() {
|
|
4454
4471
|
if (!this.editorDom) {
|
|
4455
4472
|
console.warn("TopicManager: editorDom is required");
|
|
@@ -4457,6 +4474,7 @@ const _sfc_main$3 = {
|
|
|
4457
4474
|
}
|
|
4458
4475
|
setTimeout(() => this.bindEditorEvents(), 0);
|
|
4459
4476
|
},
|
|
4477
|
+
// 绑定编辑器事件
|
|
4460
4478
|
bindEditorEvents() {
|
|
4461
4479
|
if (!this.editorDom)
|
|
4462
4480
|
return;
|
|
@@ -4465,6 +4483,7 @@ const _sfc_main$3 = {
|
|
|
4465
4483
|
this.editorDom.addEventListener("compositionend", this.handleCompositionEnd.bind(this));
|
|
4466
4484
|
this.editorDom.addEventListener("input", this.handleInput.bind(this));
|
|
4467
4485
|
},
|
|
4486
|
+
// 解绑编辑器事件
|
|
4468
4487
|
unbindEditorEvents() {
|
|
4469
4488
|
if (!this.editorDom)
|
|
4470
4489
|
return;
|
|
@@ -4473,15 +4492,18 @@ const _sfc_main$3 = {
|
|
|
4473
4492
|
this.editorDom.removeEventListener("compositionend", this.handleCompositionEnd.bind(this));
|
|
4474
4493
|
this.editorDom.removeEventListener("input", this.handleInput.bind(this));
|
|
4475
4494
|
},
|
|
4495
|
+
// 中文输入法开始事件
|
|
4476
4496
|
handleCompositionStart() {
|
|
4477
4497
|
this.isComposing = true;
|
|
4478
4498
|
},
|
|
4499
|
+
// 中文输入法结束事件(中文)
|
|
4479
4500
|
handleCompositionEnd() {
|
|
4480
4501
|
this.isComposing = false;
|
|
4481
4502
|
setTimeout(() => {
|
|
4482
4503
|
this.handleInputChange();
|
|
4483
4504
|
}, 10);
|
|
4484
4505
|
},
|
|
4506
|
+
// input事件处理(英文)
|
|
4485
4507
|
handleInput() {
|
|
4486
4508
|
if (!this.isComposing) {
|
|
4487
4509
|
setTimeout(() => {
|
|
@@ -4489,6 +4511,7 @@ const _sfc_main$3 = {
|
|
|
4489
4511
|
}, 10);
|
|
4490
4512
|
}
|
|
4491
4513
|
},
|
|
4514
|
+
// 处理输入变化
|
|
4492
4515
|
handleInputChange() {
|
|
4493
4516
|
var _a;
|
|
4494
4517
|
const selection = window.getSelection();
|
|
@@ -4516,6 +4539,7 @@ const _sfc_main$3 = {
|
|
|
4516
4539
|
return;
|
|
4517
4540
|
this.checkAndTriggerSearch(paragraph);
|
|
4518
4541
|
},
|
|
4542
|
+
// 话题输入处理
|
|
4519
4543
|
handleTopicInput(event) {
|
|
4520
4544
|
var _a;
|
|
4521
4545
|
const activeElement = document.activeElement;
|
|
@@ -4556,7 +4580,9 @@ const _sfc_main$3 = {
|
|
|
4556
4580
|
const triggerInfo = {
|
|
4557
4581
|
paragraph,
|
|
4558
4582
|
hashIndex: cursorPosition,
|
|
4583
|
+
// #号的位置
|
|
4559
4584
|
cursorPosition: cursorPosition + 1
|
|
4585
|
+
// #号后的位置
|
|
4560
4586
|
};
|
|
4561
4587
|
this.showTopicPopover("hot", position, "", triggerInfo);
|
|
4562
4588
|
}, 10);
|
|
@@ -4652,6 +4678,7 @@ const _sfc_main$3 = {
|
|
|
4652
4678
|
tempElement.remove();
|
|
4653
4679
|
const position = {
|
|
4654
4680
|
top: rect.bottom,
|
|
4681
|
+
// 弹框显示在光标下方
|
|
4655
4682
|
left: rect.left
|
|
4656
4683
|
};
|
|
4657
4684
|
const viewportWidth = window.innerWidth;
|
|
@@ -4669,7 +4696,7 @@ const _sfc_main$3 = {
|
|
|
4669
4696
|
}
|
|
4670
4697
|
return position;
|
|
4671
4698
|
} catch (error) {
|
|
4672
|
-
console.warn("
|
|
4699
|
+
console.warn("获取光标位置失败,使用fallback方法:", error);
|
|
4673
4700
|
const rect = range.getBoundingClientRect();
|
|
4674
4701
|
return {
|
|
4675
4702
|
top: rect.bottom,
|
|
@@ -4677,9 +4704,10 @@ const _sfc_main$3 = {
|
|
|
4677
4704
|
};
|
|
4678
4705
|
}
|
|
4679
4706
|
},
|
|
4707
|
+
// 话题弹框相关方法
|
|
4680
4708
|
showTopicPopover(type, position, searchKeyword = "", triggerInfo = null) {
|
|
4681
4709
|
if (!this.request || !this.request.getTopic) {
|
|
4682
|
-
console.warn("
|
|
4710
|
+
console.warn("话题功能需要提供 request.getTopic 方法");
|
|
4683
4711
|
return;
|
|
4684
4712
|
}
|
|
4685
4713
|
const selection = window.getSelection();
|
|
@@ -4752,11 +4780,11 @@ const _sfc_main$3 = {
|
|
|
4752
4780
|
}
|
|
4753
4781
|
}
|
|
4754
4782
|
} else {
|
|
4755
|
-
console.warn("
|
|
4783
|
+
console.warn("加载热门话题失败:", response);
|
|
4756
4784
|
this.topicPopover.hasMore = false;
|
|
4757
4785
|
}
|
|
4758
4786
|
} catch (error) {
|
|
4759
|
-
console.error("
|
|
4787
|
+
console.error("加载热门话题失败:", error);
|
|
4760
4788
|
this.topicPopover.hasMore = false;
|
|
4761
4789
|
} finally {
|
|
4762
4790
|
this.topicPopover.loading = false;
|
|
@@ -4790,17 +4818,18 @@ const _sfc_main$3 = {
|
|
|
4790
4818
|
this.topicPopover.searchHasMore = topics.length >= 50;
|
|
4791
4819
|
}
|
|
4792
4820
|
} else {
|
|
4793
|
-
console.warn("
|
|
4821
|
+
console.warn("搜索话题失败:", response);
|
|
4794
4822
|
this.topicPopover.searchHasMore = false;
|
|
4795
4823
|
}
|
|
4796
4824
|
} catch (error) {
|
|
4797
|
-
console.error("
|
|
4825
|
+
console.error("搜索话题失败:", error);
|
|
4798
4826
|
this.topicPopover.searchHasMore = false;
|
|
4799
4827
|
} finally {
|
|
4800
4828
|
this.topicPopover.loading = false;
|
|
4801
4829
|
this.updateGlobalTopicPopover();
|
|
4802
4830
|
}
|
|
4803
4831
|
},
|
|
4832
|
+
// 加载更多搜索话题
|
|
4804
4833
|
async loadSearchTopics() {
|
|
4805
4834
|
if (this.topicPopover.loading || !this.topicPopover.searchHasMore)
|
|
4806
4835
|
return;
|
|
@@ -4828,11 +4857,11 @@ const _sfc_main$3 = {
|
|
|
4828
4857
|
}
|
|
4829
4858
|
}
|
|
4830
4859
|
} else {
|
|
4831
|
-
console.warn("
|
|
4860
|
+
console.warn("加载更多搜索话题失败:", response);
|
|
4832
4861
|
this.topicPopover.searchHasMore = false;
|
|
4833
4862
|
}
|
|
4834
4863
|
} catch (error) {
|
|
4835
|
-
console.error("
|
|
4864
|
+
console.error("加载更多搜索话题失败:", error);
|
|
4836
4865
|
this.topicPopover.searchHasMore = false;
|
|
4837
4866
|
} finally {
|
|
4838
4867
|
this.topicPopover.loading = false;
|
|
@@ -4844,7 +4873,7 @@ const _sfc_main$3 = {
|
|
|
4844
4873
|
const localTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
|
|
4845
4874
|
this.topicPopover.recentTopics = localTopics;
|
|
4846
4875
|
} catch (error) {
|
|
4847
|
-
console.error("
|
|
4876
|
+
console.error("加载最近使用话题失败:", error);
|
|
4848
4877
|
this.topicPopover.recentTopics = [];
|
|
4849
4878
|
}
|
|
4850
4879
|
},
|
|
@@ -4864,9 +4893,10 @@ const _sfc_main$3 = {
|
|
|
4864
4893
|
}
|
|
4865
4894
|
localStorage.setItem("localTopic", JSON.stringify(recentTopics));
|
|
4866
4895
|
} catch (error) {
|
|
4867
|
-
console.error("
|
|
4896
|
+
console.error("保存最近使用话题失败:", error);
|
|
4868
4897
|
}
|
|
4869
4898
|
},
|
|
4899
|
+
// 创建全局话题弹框
|
|
4870
4900
|
createGlobalTopicPopover() {
|
|
4871
4901
|
this.removeGlobalTopicPopover();
|
|
4872
4902
|
const mask = document.createElement("div");
|
|
@@ -4890,6 +4920,7 @@ const _sfc_main$3 = {
|
|
|
4890
4920
|
this.topicPopover.globalContainer = container;
|
|
4891
4921
|
this.bindTopicPopoverEvents();
|
|
4892
4922
|
},
|
|
4923
|
+
// 移除全局话题弹框
|
|
4893
4924
|
removeGlobalTopicPopover() {
|
|
4894
4925
|
if (this.topicPopover.globalMask) {
|
|
4895
4926
|
document.body.removeChild(this.topicPopover.globalMask);
|
|
@@ -4900,12 +4931,14 @@ const _sfc_main$3 = {
|
|
|
4900
4931
|
this.topicPopover.globalContainer = null;
|
|
4901
4932
|
}
|
|
4902
4933
|
},
|
|
4934
|
+
// 更新全局话题弹框内容
|
|
4903
4935
|
updateGlobalTopicPopover() {
|
|
4904
4936
|
if (!this.topicPopover.globalContainer)
|
|
4905
4937
|
return;
|
|
4906
4938
|
this.topicPopover.globalContainer.innerHTML = this.createTopicPopoverContent();
|
|
4907
4939
|
this.bindTopicPopoverEvents();
|
|
4908
4940
|
},
|
|
4941
|
+
// 增量添加热门话题到DOM,避免重绘
|
|
4909
4942
|
appendHotTopicsToDOM() {
|
|
4910
4943
|
if (!this.topicPopover.globalContainer || this.topicPopover.newHotTopicsCount === 0)
|
|
4911
4944
|
return;
|
|
@@ -4928,6 +4961,7 @@ const _sfc_main$3 = {
|
|
|
4928
4961
|
this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.hasMore);
|
|
4929
4962
|
this.topicPopover.newHotTopicsCount = 0;
|
|
4930
4963
|
},
|
|
4964
|
+
// 增量添加搜索话题到DOM,避免重绘
|
|
4931
4965
|
appendSearchTopicsToDOM() {
|
|
4932
4966
|
if (!this.topicPopover.globalContainer || this.topicPopover.newSearchTopicsCount === 0)
|
|
4933
4967
|
return;
|
|
@@ -4950,6 +4984,7 @@ const _sfc_main$3 = {
|
|
|
4950
4984
|
this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.searchHasMore);
|
|
4951
4985
|
this.topicPopover.newSearchTopicsCount = 0;
|
|
4952
4986
|
},
|
|
4987
|
+
// 更新加载状态显示
|
|
4953
4988
|
updateLoadingState(topicList, loading, hasMore) {
|
|
4954
4989
|
const existingLoading = topicList.querySelector(".topic-loading");
|
|
4955
4990
|
const existingEmpty = topicList.querySelector(".topic-empty");
|
|
@@ -4960,15 +4995,16 @@ const _sfc_main$3 = {
|
|
|
4960
4995
|
if (loading) {
|
|
4961
4996
|
const loadingElement = document.createElement("div");
|
|
4962
4997
|
loadingElement.className = "topic-loading";
|
|
4963
|
-
loadingElement.textContent = "
|
|
4998
|
+
loadingElement.textContent = "加载更多...";
|
|
4964
4999
|
topicList.appendChild(loadingElement);
|
|
4965
5000
|
} else if (!hasMore) {
|
|
4966
5001
|
const emptyElement = document.createElement("div");
|
|
4967
5002
|
emptyElement.className = "topic-empty";
|
|
4968
|
-
emptyElement.textContent = "
|
|
5003
|
+
emptyElement.textContent = "没有更多了";
|
|
4969
5004
|
topicList.appendChild(emptyElement);
|
|
4970
5005
|
}
|
|
4971
5006
|
},
|
|
5007
|
+
// 创建话题弹框内容
|
|
4972
5008
|
createTopicPopoverContent() {
|
|
4973
5009
|
if (this.topicPopover.type === "hot") {
|
|
4974
5010
|
return this.getHotTopicPopoverHTML();
|
|
@@ -4977,6 +5013,7 @@ const _sfc_main$3 = {
|
|
|
4977
5013
|
}
|
|
4978
5014
|
return "";
|
|
4979
5015
|
},
|
|
5016
|
+
// 获取热门话题弹框HTML
|
|
4980
5017
|
getHotTopicPopoverHTML() {
|
|
4981
5018
|
const activeTab = this.topicPopover.activeTab;
|
|
4982
5019
|
const hotTopics = this.topicPopover.hotTopics;
|
|
@@ -4986,22 +5023,22 @@ const _sfc_main$3 = {
|
|
|
4986
5023
|
let topicListHTML = "";
|
|
4987
5024
|
if (activeTab === "hot") {
|
|
4988
5025
|
if (loading && hotTopics.length === 0) {
|
|
4989
|
-
topicListHTML = '<div class="topic-loading"
|
|
5026
|
+
topicListHTML = '<div class="topic-loading">加载中...</div>';
|
|
4990
5027
|
} else if (hotTopics.length === 0) {
|
|
4991
|
-
topicListHTML = '<div class="topic-empty"
|
|
5028
|
+
topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
|
|
4992
5029
|
} else {
|
|
4993
5030
|
topicListHTML = hotTopics.map(
|
|
4994
5031
|
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
4995
5032
|
).join("");
|
|
4996
5033
|
if (loading) {
|
|
4997
|
-
topicListHTML += '<div class="topic-loading"
|
|
5034
|
+
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
4998
5035
|
} else if (!hasMore) {
|
|
4999
|
-
topicListHTML += '<div class="topic-empty"
|
|
5036
|
+
topicListHTML += '<div class="topic-empty">没有更多了</div>';
|
|
5000
5037
|
}
|
|
5001
5038
|
}
|
|
5002
5039
|
} else {
|
|
5003
5040
|
if (recentTopics.length === 0) {
|
|
5004
|
-
topicListHTML = '<div class="topic-empty"
|
|
5041
|
+
topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
|
|
5005
5042
|
} else {
|
|
5006
5043
|
topicListHTML = recentTopics.map(
|
|
5007
5044
|
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
@@ -5012,10 +5049,10 @@ const _sfc_main$3 = {
|
|
|
5012
5049
|
<div class="topic-popover-content">
|
|
5013
5050
|
<div class="topic-tabs">
|
|
5014
5051
|
<div class="topic-tab ${activeTab === "hot" ? "active" : ""}" data-tab="hot">
|
|
5015
|
-
|
|
5052
|
+
热门话题
|
|
5016
5053
|
</div>
|
|
5017
5054
|
<div class="topic-tab ${activeTab === "recent" ? "active" : ""}" data-tab="recent">
|
|
5018
|
-
|
|
5055
|
+
最近使用
|
|
5019
5056
|
</div>
|
|
5020
5057
|
</div>
|
|
5021
5058
|
<div class="topic-list-container">
|
|
@@ -5026,6 +5063,7 @@ const _sfc_main$3 = {
|
|
|
5026
5063
|
</div>
|
|
5027
5064
|
`;
|
|
5028
5065
|
},
|
|
5066
|
+
// 获取搜索话题弹框HTML
|
|
5029
5067
|
getSearchTopicPopoverHTML() {
|
|
5030
5068
|
const searchKeyword = this.topicPopover.searchKeyword;
|
|
5031
5069
|
const searchTopics = this.topicPopover.searchTopics;
|
|
@@ -5033,17 +5071,17 @@ const _sfc_main$3 = {
|
|
|
5033
5071
|
const searchHasMore = this.topicPopover.searchHasMore;
|
|
5034
5072
|
let topicListHTML = "";
|
|
5035
5073
|
if (loading && searchTopics.length === 0) {
|
|
5036
|
-
topicListHTML = '<div class="topic-loading"
|
|
5074
|
+
topicListHTML = '<div class="topic-loading">搜索中...</div>';
|
|
5037
5075
|
} else if (searchTopics.length === 0) {
|
|
5038
|
-
topicListHTML = '<div class="topic-empty"
|
|
5076
|
+
topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
|
|
5039
5077
|
} else {
|
|
5040
5078
|
topicListHTML = searchTopics.map(
|
|
5041
5079
|
(topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
|
|
5042
5080
|
).join("");
|
|
5043
5081
|
if (loading) {
|
|
5044
|
-
topicListHTML += '<div class="topic-loading"
|
|
5082
|
+
topicListHTML += '<div class="topic-loading">加载更多...</div>';
|
|
5045
5083
|
} else if (!searchHasMore) {
|
|
5046
|
-
topicListHTML += '<div class="topic-empty"
|
|
5084
|
+
topicListHTML += '<div class="topic-empty">没有更多了</div>';
|
|
5047
5085
|
}
|
|
5048
5086
|
}
|
|
5049
5087
|
return `
|
|
@@ -5059,6 +5097,7 @@ const _sfc_main$3 = {
|
|
|
5059
5097
|
</div>
|
|
5060
5098
|
`;
|
|
5061
5099
|
},
|
|
5100
|
+
// 绑定话题弹框事件
|
|
5062
5101
|
bindTopicPopoverEvents() {
|
|
5063
5102
|
if (!this.topicPopover.globalContainer)
|
|
5064
5103
|
return;
|
|
@@ -5090,6 +5129,7 @@ const _sfc_main$3 = {
|
|
|
5090
5129
|
});
|
|
5091
5130
|
}
|
|
5092
5131
|
},
|
|
5132
|
+
// 根据ID查找话题
|
|
5093
5133
|
findTopicById(topicId) {
|
|
5094
5134
|
let topic = this.topicPopover.hotTopics.find((t) => t.id === topicId);
|
|
5095
5135
|
if (topic)
|
|
@@ -5206,15 +5246,17 @@ const _sfc_main$3 = {
|
|
|
5206
5246
|
const topicElement = document.createElement("mdd-topic");
|
|
5207
5247
|
topicElement.setAttribute("data-topic", JSON.stringify({
|
|
5208
5248
|
topicId: topic.id,
|
|
5209
|
-
topicType: 0,
|
|
5249
|
+
topicType: topic.type || 0,
|
|
5210
5250
|
startIndex: 0,
|
|
5251
|
+
// 会在updateTopicPosition中更新
|
|
5211
5252
|
endIndex: 0
|
|
5253
|
+
// 会在updateTopicPosition中更新
|
|
5212
5254
|
}));
|
|
5213
5255
|
topicElement.textContent = topicText;
|
|
5214
5256
|
topicElement.setAttribute("contenteditable", "false");
|
|
5215
5257
|
range.deleteContents();
|
|
5216
5258
|
range.insertNode(topicElement);
|
|
5217
|
-
const spaceNode = document.createTextNode("
|
|
5259
|
+
const spaceNode = document.createTextNode(" ");
|
|
5218
5260
|
range.setStartAfter(topicElement);
|
|
5219
5261
|
range.insertNode(spaceNode);
|
|
5220
5262
|
const newRange = document.createRange();
|
|
@@ -5238,6 +5280,7 @@ const _sfc_main$3 = {
|
|
|
5238
5280
|
}, 0);
|
|
5239
5281
|
this.$emit("update-topic-position");
|
|
5240
5282
|
},
|
|
5283
|
+
// 销毁话题管理器
|
|
5241
5284
|
destroy() {
|
|
5242
5285
|
this.unbindEditorEvents();
|
|
5243
5286
|
this.hideTopicPopover();
|
|
@@ -5306,14 +5349,12 @@ const _sfc_main$2 = {
|
|
|
5306
5349
|
setStatus(val) {
|
|
5307
5350
|
this.$emit("update:visible", val);
|
|
5308
5351
|
}
|
|
5352
|
+
// submit() {
|
|
5353
|
+
// this.$emit('submit')
|
|
5354
|
+
// }
|
|
5309
5355
|
}
|
|
5310
5356
|
};
|
|
5311
|
-
const _hoisted_1$2 =
|
|
5312
|
-
/* @__PURE__ */ createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
|
|
5313
|
-
/* @__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")
|
|
5314
|
-
], -1);
|
|
5315
|
-
const _hoisted_2$2 = { class: "collect-article_content" };
|
|
5316
|
-
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);
|
|
5357
|
+
const _hoisted_1$2 = { class: "collect-article_content" };
|
|
5317
5358
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5318
5359
|
const _component_el_input = resolveComponent("el-input");
|
|
5319
5360
|
const _component_BasicDialog = resolveComponent("BasicDialog");
|
|
@@ -5322,16 +5363,19 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5322
5363
|
width: "600px",
|
|
5323
5364
|
height: "50px"
|
|
5324
5365
|
}, {
|
|
5325
|
-
title: withCtx(() => [
|
|
5326
|
-
|
|
5327
|
-
|
|
5366
|
+
title: withCtx(() => _cache[1] || (_cache[1] = [
|
|
5367
|
+
createElementVNode("div", null, [
|
|
5368
|
+
createElementVNode("span", null, "采集文章"),
|
|
5369
|
+
createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
|
|
5370
|
+
], -1)
|
|
5371
|
+
])),
|
|
5328
5372
|
default: withCtx(() => [
|
|
5329
|
-
createElementVNode("div",
|
|
5330
|
-
|
|
5373
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
5374
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
|
|
5331
5375
|
createVNode(_component_el_input, {
|
|
5332
5376
|
modelValue: $options.input,
|
|
5333
5377
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
|
|
5334
|
-
placeholder: "
|
|
5378
|
+
placeholder: "仅支持微信链接"
|
|
5335
5379
|
}, null, 8, ["modelValue"])
|
|
5336
5380
|
])
|
|
5337
5381
|
]),
|
|
@@ -5339,7 +5383,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5339
5383
|
}, 8, ["visible"]);
|
|
5340
5384
|
}
|
|
5341
5385
|
const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
5342
|
-
const
|
|
5386
|
+
const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
|
|
5343
5387
|
const _sfc_main$1 = {
|
|
5344
5388
|
components: {
|
|
5345
5389
|
ElIconError: CircleCloseFilled
|
|
@@ -5370,8 +5414,8 @@ const _hoisted_1$1 = {
|
|
|
5370
5414
|
};
|
|
5371
5415
|
const _hoisted_2$1 = ["src"];
|
|
5372
5416
|
const _hoisted_3$1 = { class: "article-item_right" };
|
|
5373
|
-
const _hoisted_4
|
|
5374
|
-
const _hoisted_5
|
|
5417
|
+
const _hoisted_4 = { class: "name" };
|
|
5418
|
+
const _hoisted_5 = { class: "score" };
|
|
5375
5419
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5376
5420
|
const _component_el_icon_error = resolveComponent("el-icon-error");
|
|
5377
5421
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
@@ -5381,11 +5425,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5381
5425
|
alt: ""
|
|
5382
5426
|
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
5383
5427
|
createElementVNode("div", _hoisted_3$1, [
|
|
5384
|
-
createElementVNode("div", _hoisted_4
|
|
5385
|
-
createElementVNode("div", _hoisted_5
|
|
5428
|
+
createElementVNode("div", _hoisted_4, toDisplayString($props.article.title), 1),
|
|
5429
|
+
createElementVNode("div", _hoisted_5, [
|
|
5386
5430
|
createElementVNode("span", null, toDisplayString($props.article.author), 1),
|
|
5387
|
-
createElementVNode("span", null, toDisplayString($props.article.viewNum) + "
|
|
5388
|
-
createElementVNode("span", null, toDisplayString($props.article.replycnt) + "
|
|
5431
|
+
createElementVNode("span", null, toDisplayString($props.article.viewNum) + "浏览", 1),
|
|
5432
|
+
createElementVNode("span", null, toDisplayString($props.article.replycnt) + "评论", 1)
|
|
5389
5433
|
])
|
|
5390
5434
|
]),
|
|
5391
5435
|
createVNode(_component_el_icon_error, {
|
|
@@ -5397,10 +5441,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5397
5441
|
class: normalizeClass([{
|
|
5398
5442
|
"article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
|
|
5399
5443
|
}, "article-bg"])
|
|
5400
|
-
}, "
|
|
5444
|
+
}, " 平台仅支持展示18个月的推荐内容 ", 2)) : createCommentVNode("", true)
|
|
5401
5445
|
]);
|
|
5402
5446
|
}
|
|
5403
|
-
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
5447
|
+
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
|
|
5404
5448
|
const mountArticleDom = (props, del) => {
|
|
5405
5449
|
const className = "article-wrap";
|
|
5406
5450
|
const article = props.article;
|
|
@@ -5460,6 +5504,7 @@ const _sfc_main = {
|
|
|
5460
5504
|
hasArticleCard: false,
|
|
5461
5505
|
cursorStyle: "auto",
|
|
5462
5506
|
titleCount: 0,
|
|
5507
|
+
// 标题数量
|
|
5463
5508
|
viewLinkDialog: false,
|
|
5464
5509
|
linkForm: {
|
|
5465
5510
|
linkAddress: "",
|
|
@@ -5467,39 +5512,54 @@ const _sfc_main = {
|
|
|
5467
5512
|
},
|
|
5468
5513
|
setAlignFlag: true,
|
|
5469
5514
|
article: {},
|
|
5515
|
+
// 插入的文章
|
|
5470
5516
|
imgList: [],
|
|
5471
5517
|
imgNum: 20,
|
|
5472
5518
|
videoList: [],
|
|
5473
5519
|
visibleVideo: false,
|
|
5474
5520
|
visibleCollectArticle: false,
|
|
5475
5521
|
visibleArticle: false,
|
|
5522
|
+
// 插入文章
|
|
5476
5523
|
visibleImg: false,
|
|
5524
|
+
// 插入图片
|
|
5477
5525
|
imgType: "normal",
|
|
5526
|
+
//
|
|
5478
5527
|
typeEnum: {
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5528
|
+
文字: "1",
|
|
5529
|
+
图片: "2",
|
|
5530
|
+
图文: "3",
|
|
5531
|
+
段落标题: "4",
|
|
5532
|
+
关联: "5",
|
|
5533
|
+
// 关联车辆、轨迹、活动、商家、话题
|
|
5534
|
+
单视频: "6",
|
|
5535
|
+
视频文字: "7",
|
|
5486
5536
|
URL: "8",
|
|
5487
|
-
|
|
5537
|
+
文章卡片: "11"
|
|
5488
5538
|
},
|
|
5489
5539
|
fontInfo: {
|
|
5490
5540
|
size: ""
|
|
5491
5541
|
},
|
|
5492
5542
|
user: {},
|
|
5543
|
+
// 用户
|
|
5493
5544
|
editor: {},
|
|
5545
|
+
// 编辑器实例对象
|
|
5494
5546
|
editorDom: {},
|
|
5547
|
+
// 编辑器Dom
|
|
5495
5548
|
uploadStore: {},
|
|
5549
|
+
// 待上传的图片池
|
|
5496
5550
|
linkContent: "",
|
|
5551
|
+
// 插入链接的地址
|
|
5497
5552
|
loadingText: "",
|
|
5553
|
+
// loaing的提示文字
|
|
5498
5554
|
progressPercent: "",
|
|
5555
|
+
// 上传进度
|
|
5499
5556
|
currentIndex: 0,
|
|
5500
5557
|
loading: false,
|
|
5558
|
+
// 是否提交中
|
|
5501
5559
|
viewStatus: false,
|
|
5560
|
+
// todo: 改名
|
|
5502
5561
|
linkStatus: false,
|
|
5562
|
+
// todo: 改名
|
|
5503
5563
|
styleStatus: {
|
|
5504
5564
|
bold: false,
|
|
5505
5565
|
italic: false,
|
|
@@ -5523,6 +5583,7 @@ const _sfc_main = {
|
|
|
5523
5583
|
targetMove: "",
|
|
5524
5584
|
moverClasses: ["halo-img-content", "halo-video-content"],
|
|
5525
5585
|
selectDom: null
|
|
5586
|
+
//选中的dom
|
|
5526
5587
|
};
|
|
5527
5588
|
},
|
|
5528
5589
|
computed: {
|
|
@@ -5539,12 +5600,12 @@ const _sfc_main = {
|
|
|
5539
5600
|
watch: {
|
|
5540
5601
|
progressPercent(val) {
|
|
5541
5602
|
const inner = document.querySelector(".video-progress .inner");
|
|
5542
|
-
console.log(val, "
|
|
5603
|
+
console.log(val, "视频上传进度");
|
|
5543
5604
|
if (inner) {
|
|
5544
5605
|
inner.style.width = val + "%";
|
|
5545
5606
|
if (val === 100) {
|
|
5546
5607
|
document.querySelector(".video-progress").innerHTML = `
|
|
5547
|
-
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;"
|
|
5608
|
+
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
|
|
5548
5609
|
`;
|
|
5549
5610
|
}
|
|
5550
5611
|
}
|
|
@@ -5573,7 +5634,7 @@ const _sfc_main = {
|
|
|
5573
5634
|
me2.editorDom = document.getElementById("editor-content");
|
|
5574
5635
|
me2.editorDom.addEventListener("blur", this.canSetAlign);
|
|
5575
5636
|
if (!window.Squire) {
|
|
5576
|
-
import("./squire-raw.
|
|
5637
|
+
import("./squire-raw-1aaeff0b.js").then(function() {
|
|
5577
5638
|
me2.initSquire();
|
|
5578
5639
|
});
|
|
5579
5640
|
} else {
|
|
@@ -5633,10 +5694,10 @@ const _sfc_main = {
|
|
|
5633
5694
|
this.visibleVideo = false;
|
|
5634
5695
|
const fileName = (files[0] && files[0].name || "").toLowerCase();
|
|
5635
5696
|
if (files[0].size > 1 * 1024 * 1024 * 1024) {
|
|
5636
|
-
return me2.setToast("
|
|
5697
|
+
return me2.setToast("视频大小不能超过1GB");
|
|
5637
5698
|
}
|
|
5638
5699
|
if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
|
|
5639
|
-
return me2.setToast("
|
|
5700
|
+
return me2.setToast("视频格式不是mp4或mov");
|
|
5640
5701
|
}
|
|
5641
5702
|
const me2 = this;
|
|
5642
5703
|
if (me2.loading)
|
|
@@ -5656,7 +5717,9 @@ const _sfc_main = {
|
|
|
5656
5717
|
id: result.videoId,
|
|
5657
5718
|
desc: "",
|
|
5658
5719
|
vodSize: result.vodSize || "",
|
|
5720
|
+
// 视频大小
|
|
5659
5721
|
vodType: result.vodType || ""
|
|
5722
|
+
// 图片尺寸
|
|
5660
5723
|
};
|
|
5661
5724
|
me2.$emit("updateAddVideo", true);
|
|
5662
5725
|
me2.editor["insertVideo"](result.videoUrl, video);
|
|
@@ -5710,11 +5773,11 @@ const _sfc_main = {
|
|
|
5710
5773
|
},
|
|
5711
5774
|
insertLink() {
|
|
5712
5775
|
if (!this.linkForm.linkAddress)
|
|
5713
|
-
return ElMessage.error("
|
|
5776
|
+
return ElMessage.error("请输入链接地址");
|
|
5714
5777
|
if (!this.linkForm.linkWriting)
|
|
5715
|
-
return ElMessage.error("
|
|
5778
|
+
return ElMessage.error("请输入链接文案");
|
|
5716
5779
|
if (!this.validUrl(this.linkForm.linkAddress)) {
|
|
5717
|
-
return this.setToast("URL
|
|
5780
|
+
return this.setToast("URL无效");
|
|
5718
5781
|
}
|
|
5719
5782
|
this.editor.insertLink(
|
|
5720
5783
|
this.linkForm.linkAddress,
|
|
@@ -5743,6 +5806,7 @@ const _sfc_main = {
|
|
|
5743
5806
|
});
|
|
5744
5807
|
});
|
|
5745
5808
|
},
|
|
5809
|
+
// TopicManager事件处理
|
|
5746
5810
|
onTopicInserted(topic) {
|
|
5747
5811
|
this.updateData(true);
|
|
5748
5812
|
},
|
|
@@ -6200,7 +6264,7 @@ const _sfc_main = {
|
|
|
6200
6264
|
}
|
|
6201
6265
|
this.updateData(true);
|
|
6202
6266
|
} else {
|
|
6203
|
-
this.setToast(rst.origin.name + "
|
|
6267
|
+
this.setToast(rst.origin.name + "上传失败,请重试");
|
|
6204
6268
|
}
|
|
6205
6269
|
},
|
|
6206
6270
|
insertVideoBtns(editor, node) {
|
|
@@ -6215,7 +6279,7 @@ const _sfc_main = {
|
|
|
6215
6279
|
me2.currentVideo = node;
|
|
6216
6280
|
e.stopPropagation();
|
|
6217
6281
|
};
|
|
6218
|
-
replaceBtn.innerText = "
|
|
6282
|
+
replaceBtn.innerText = "更换封面";
|
|
6219
6283
|
return replaceBtn;
|
|
6220
6284
|
},
|
|
6221
6285
|
insertImgOperateBtns(editor, data) {
|
|
@@ -6241,7 +6305,7 @@ const _sfc_main = {
|
|
|
6241
6305
|
maxlength: "50",
|
|
6242
6306
|
rows: "2",
|
|
6243
6307
|
cols: "50",
|
|
6244
|
-
placeholder: "
|
|
6308
|
+
placeholder: "请输入图片描述(最多50字)",
|
|
6245
6309
|
contenteditable: "false"
|
|
6246
6310
|
});
|
|
6247
6311
|
descInput.disabled = me2.disabled;
|
|
@@ -6250,7 +6314,7 @@ const _sfc_main = {
|
|
|
6250
6314
|
const img = parent.querySelector(".halo-picture-area");
|
|
6251
6315
|
img.dataset.desc = e.target.value;
|
|
6252
6316
|
if (e.target.value.length > 49) {
|
|
6253
|
-
return me2.setToast("
|
|
6317
|
+
return me2.setToast("限制50个字符");
|
|
6254
6318
|
}
|
|
6255
6319
|
};
|
|
6256
6320
|
descInput.value = data.content || "";
|
|
@@ -6300,7 +6364,7 @@ const _sfc_main = {
|
|
|
6300
6364
|
me2.removeParentByClass(e.target, "halo-img-content");
|
|
6301
6365
|
me2.updateData(true);
|
|
6302
6366
|
};
|
|
6303
|
-
replaceBtn.innerHTML = "
|
|
6367
|
+
replaceBtn.innerHTML = "替换";
|
|
6304
6368
|
return [replaceBtn, delBtn, descInputWrap];
|
|
6305
6369
|
},
|
|
6306
6370
|
removeSeamlessLaster(e) {
|
|
@@ -6324,6 +6388,7 @@ const _sfc_main = {
|
|
|
6324
6388
|
}
|
|
6325
6389
|
}
|
|
6326
6390
|
},
|
|
6391
|
+
// 初始化编辑器数据,数据是 html 格式(displayData)
|
|
6327
6392
|
initData(data = "", essayPicRelVOList) {
|
|
6328
6393
|
this.parseHtml(data, essayPicRelVOList).then((res) => {
|
|
6329
6394
|
this.editorDom.innerHTML = "";
|
|
@@ -6331,10 +6396,13 @@ const _sfc_main = {
|
|
|
6331
6396
|
this.updateData();
|
|
6332
6397
|
});
|
|
6333
6398
|
},
|
|
6399
|
+
// TODO jsonToHtml、htmlToJson 实现这 2 个方法里面的逻辑,数据结构参考方法里面的注释,出参入参都为字符串,注意:mdd-topic 里面的属性数据 和 json 中的topicPosition数据是一一对应的,startIndex、endIndex为mdd-topic的起止位置 从 content 里面进行分割处理
|
|
6400
|
+
// json、html 数据格式互转,暂时只支持文字、短话题
|
|
6334
6401
|
jsonToHtml(json) {
|
|
6335
6402
|
},
|
|
6336
6403
|
htmlToJson(html) {
|
|
6337
6404
|
},
|
|
6405
|
+
// 设置富文本组件
|
|
6338
6406
|
initSquire() {
|
|
6339
6407
|
const me2 = this;
|
|
6340
6408
|
const editorDom = me2.editorDom;
|
|
@@ -6784,6 +6852,7 @@ const _sfc_main = {
|
|
|
6784
6852
|
window.Squire.empty(block)
|
|
6785
6853
|
]);
|
|
6786
6854
|
output.appendChild(
|
|
6855
|
+
// 段落才能添加标题
|
|
6787
6856
|
Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
|
|
6788
6857
|
);
|
|
6789
6858
|
}
|
|
@@ -6806,18 +6875,18 @@ const _sfc_main = {
|
|
|
6806
6875
|
});
|
|
6807
6876
|
loading.innerHTML = `
|
|
6808
6877
|
<img class="img-loading-icon" src="/img/upload-image-loading.png"/>
|
|
6809
|
-
<span class="img-loading-tip"
|
|
6878
|
+
<span class="img-loading-tip">上传中...</span>
|
|
6810
6879
|
`;
|
|
6811
6880
|
var fail = this.createElement("div", {
|
|
6812
6881
|
class: "img-fail hide",
|
|
6813
6882
|
contenteditable: "false"
|
|
6814
6883
|
});
|
|
6815
|
-
fail.innerHTML = "
|
|
6884
|
+
fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
|
|
6816
6885
|
var again = this.createElement("button", {
|
|
6817
6886
|
class: "img-again hide",
|
|
6818
6887
|
contenteditable: "false"
|
|
6819
6888
|
});
|
|
6820
|
-
again.innerHTML = "
|
|
6889
|
+
again.innerHTML = "重新上传";
|
|
6821
6890
|
const isGif = src && src.indexOf(".gif") > -1;
|
|
6822
6891
|
if (isGif) {
|
|
6823
6892
|
src = src.replace(".gif", ".gif!nowater");
|
|
@@ -6872,7 +6941,7 @@ const _sfc_main = {
|
|
|
6872
6941
|
});
|
|
6873
6942
|
div.innerHTML = `
|
|
6874
6943
|
<div class="video-progress">
|
|
6875
|
-
<div class="label"
|
|
6944
|
+
<div class="label">上传中...</div>
|
|
6876
6945
|
<div class="box">
|
|
6877
6946
|
<div class="inner" style="width:20%"></div>
|
|
6878
6947
|
</div>
|
|
@@ -6895,6 +6964,7 @@ const _sfc_main = {
|
|
|
6895
6964
|
data: JSON.stringify(data),
|
|
6896
6965
|
"data-content": data.content || "",
|
|
6897
6966
|
poster: data.img || ""
|
|
6967
|
+
// 'contenteditable': 'true',
|
|
6898
6968
|
});
|
|
6899
6969
|
var delBtn = me2.genIconDom({
|
|
6900
6970
|
class: "pointer video-delete icon",
|
|
@@ -6952,6 +7022,7 @@ const _sfc_main = {
|
|
|
6952
7022
|
}
|
|
6953
7023
|
};
|
|
6954
7024
|
},
|
|
7025
|
+
// 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
|
|
6955
7026
|
setListener(dom) {
|
|
6956
7027
|
const me2 = this;
|
|
6957
7028
|
const doms = dom ? [dom] : Array.from(this.editorDom.children);
|
|
@@ -6962,7 +7033,7 @@ const _sfc_main = {
|
|
|
6962
7033
|
p.onclick = function(e) {
|
|
6963
7034
|
var _a;
|
|
6964
7035
|
if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
|
|
6965
|
-
me2.setToast("
|
|
7036
|
+
me2.setToast("不支持播放");
|
|
6966
7037
|
}
|
|
6967
7038
|
if (e.target.className.includes("desc-input")) {
|
|
6968
7039
|
return;
|
|
@@ -7026,6 +7097,7 @@ const _sfc_main = {
|
|
|
7026
7097
|
};
|
|
7027
7098
|
return del;
|
|
7028
7099
|
},
|
|
7100
|
+
// 转换数据,返回给业务
|
|
7029
7101
|
getEditorData() {
|
|
7030
7102
|
const me2 = this;
|
|
7031
7103
|
const children = Array.from(me2.editorDom.children);
|
|
@@ -7083,9 +7155,11 @@ const _sfc_main = {
|
|
|
7083
7155
|
videoIds
|
|
7084
7156
|
};
|
|
7085
7157
|
},
|
|
7158
|
+
// 是否是摩托范的图片
|
|
7086
7159
|
isHaloImage(url = "") {
|
|
7087
7160
|
return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1;
|
|
7088
7161
|
},
|
|
7162
|
+
// 获取待上传图片列表
|
|
7089
7163
|
updateUploads() {
|
|
7090
7164
|
const me2 = this;
|
|
7091
7165
|
setTimeout(() => {
|
|
@@ -7132,8 +7206,8 @@ const _sfc_main = {
|
|
|
7132
7206
|
const currentImg = me2.uploadStore[key];
|
|
7133
7207
|
const imageUrl = key.split("|")[1] || "";
|
|
7134
7208
|
if (!currentImg) {
|
|
7135
|
-
console.log("
|
|
7136
|
-
return Promise.reject("
|
|
7209
|
+
console.log("图片不存在", key);
|
|
7210
|
+
return Promise.reject("图片不存在");
|
|
7137
7211
|
}
|
|
7138
7212
|
const parent = currentImg.parentNode || "";
|
|
7139
7213
|
const uploadFailHandler = (currentImg2) => {
|
|
@@ -7177,6 +7251,7 @@ const _sfc_main = {
|
|
|
7177
7251
|
parent && uploadFailHandler(currentImg);
|
|
7178
7252
|
});
|
|
7179
7253
|
},
|
|
7254
|
+
// 更新上传的图片
|
|
7180
7255
|
updateImage(img, currentImg = {}) {
|
|
7181
7256
|
const data = JSON.parse(currentImg.getAttribute("data") || "{}");
|
|
7182
7257
|
data.img = img;
|
|
@@ -7199,9 +7274,11 @@ const _sfc_main = {
|
|
|
7199
7274
|
parent.appendChild(arr[2]);
|
|
7200
7275
|
}
|
|
7201
7276
|
},
|
|
7277
|
+
// 获取ctrl + v 后内容
|
|
7202
7278
|
getSticker(type, handler) {
|
|
7203
7279
|
this.setSticker(type.fragment.children);
|
|
7204
7280
|
},
|
|
7281
|
+
// 粘贴表格内容,tr换行形成段落
|
|
7205
7282
|
setStickerTableContent(data) {
|
|
7206
7283
|
const me2 = this;
|
|
7207
7284
|
const rows = data.querySelectorAll("tr") || [];
|
|
@@ -7230,6 +7307,7 @@ const _sfc_main = {
|
|
|
7230
7307
|
});
|
|
7231
7308
|
this.updateData(true);
|
|
7232
7309
|
},
|
|
7310
|
+
// 粘贴
|
|
7233
7311
|
setSticker(data) {
|
|
7234
7312
|
const me2 = this;
|
|
7235
7313
|
data = Array.from(data);
|
|
@@ -7268,6 +7346,7 @@ const _sfc_main = {
|
|
|
7268
7346
|
const me2 = this;
|
|
7269
7347
|
me2.updateData();
|
|
7270
7348
|
},
|
|
7349
|
+
// 监测 添加、撤回、恢复、删除
|
|
7271
7350
|
setBack(e, type) {
|
|
7272
7351
|
const me2 = this;
|
|
7273
7352
|
me2.refreshImg();
|
|
@@ -7300,6 +7379,7 @@ const _sfc_main = {
|
|
|
7300
7379
|
}
|
|
7301
7380
|
});
|
|
7302
7381
|
},
|
|
7382
|
+
// 设置scoll
|
|
7303
7383
|
sticky() {
|
|
7304
7384
|
const me2 = this;
|
|
7305
7385
|
me2.$nextTick(function() {
|
|
@@ -7319,6 +7399,8 @@ const _sfc_main = {
|
|
|
7319
7399
|
document.addEventListener("scroll", onScroll);
|
|
7320
7400
|
});
|
|
7321
7401
|
},
|
|
7402
|
+
// ==========toolbox==========
|
|
7403
|
+
// 撤回、恢复、段落标题
|
|
7322
7404
|
setContent(e, obj) {
|
|
7323
7405
|
const me2 = this;
|
|
7324
7406
|
const id = e.target.id || e.target.dataset.editorId;
|
|
@@ -7360,10 +7442,11 @@ const _sfc_main = {
|
|
|
7360
7442
|
this.fontInfo = this.editor.getFontInfo();
|
|
7361
7443
|
this.updateData(true);
|
|
7362
7444
|
},
|
|
7445
|
+
// 增加link
|
|
7363
7446
|
addLink(type) {
|
|
7364
7447
|
const me2 = this;
|
|
7365
|
-
me2.linkTitleName = type === "link" ? "
|
|
7366
|
-
me2.linkPlaceholder = type === "link" ? "
|
|
7448
|
+
me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
|
|
7449
|
+
me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
|
|
7367
7450
|
me2.viewStatus = true;
|
|
7368
7451
|
me2.linkStatus = true;
|
|
7369
7452
|
},
|
|
@@ -7371,29 +7454,31 @@ const _sfc_main = {
|
|
|
7371
7454
|
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.,;?'&%$#=~_-]+))*$/;
|
|
7372
7455
|
return objExp.test(url);
|
|
7373
7456
|
},
|
|
7457
|
+
// 确认增加link
|
|
7374
7458
|
confirmLink() {
|
|
7375
7459
|
const me2 = this;
|
|
7376
7460
|
if (!me2.linkContent) {
|
|
7377
|
-
return ElMessage.error("
|
|
7461
|
+
return ElMessage.error("请输入链接地址!");
|
|
7378
7462
|
}
|
|
7379
|
-
if (me2.linkTitleName === "
|
|
7463
|
+
if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
|
|
7380
7464
|
this.visibleCollectArticle = false;
|
|
7381
7465
|
return me2.importLinkData();
|
|
7382
7466
|
}
|
|
7383
7467
|
if (!this.validUrl(me2.linkContent)) {
|
|
7384
|
-
return me2.setToast("URL
|
|
7468
|
+
return me2.setToast("URL无效");
|
|
7385
7469
|
}
|
|
7386
7470
|
if (!me2.isHaloImage(me2.linkContent)) {
|
|
7387
|
-
return me2.setToast("
|
|
7471
|
+
return me2.setToast("请输入摩托范内部网址");
|
|
7388
7472
|
}
|
|
7389
7473
|
me2.editor["insertLink"](me2.linkContent);
|
|
7390
7474
|
me2.linkContent = "";
|
|
7391
7475
|
me2.closeDialog();
|
|
7392
7476
|
},
|
|
7477
|
+
// 增加link导入数据
|
|
7393
7478
|
importLinkData() {
|
|
7394
7479
|
const me2 = this;
|
|
7395
7480
|
if (me2.loading) {
|
|
7396
|
-
return ElMessage("
|
|
7481
|
+
return ElMessage("正在获取信息,请稍后...");
|
|
7397
7482
|
}
|
|
7398
7483
|
me2.loading = true;
|
|
7399
7484
|
const params = {
|
|
@@ -7415,39 +7500,44 @@ const _sfc_main = {
|
|
|
7415
7500
|
me2.linkContent = "";
|
|
7416
7501
|
return;
|
|
7417
7502
|
} else {
|
|
7418
|
-
me2.setToast("
|
|
7503
|
+
me2.setToast("导入失败,请重试");
|
|
7419
7504
|
}
|
|
7420
7505
|
}).catch((err) => {
|
|
7421
7506
|
console.log(err.message);
|
|
7422
|
-
me2.setToast("
|
|
7507
|
+
me2.setToast("导入异常,请重试");
|
|
7423
7508
|
}).finally((_) => {
|
|
7424
7509
|
me2.loading = false;
|
|
7425
7510
|
});
|
|
7426
7511
|
},
|
|
7512
|
+
// 打开 图片、视频、一键导入 弹框
|
|
7427
7513
|
openDialog(name) {
|
|
7428
7514
|
const me2 = this;
|
|
7429
|
-
me2.viewName = name === "img" ? "
|
|
7430
|
-
me2.viewButton = name === "img" ? "
|
|
7431
|
-
me2.viewTip = name === "img" ? "" : "
|
|
7515
|
+
me2.viewName = name === "img" ? "添加图片" : "添加视频";
|
|
7516
|
+
me2.viewButton = name === "img" ? "选择图片" : "选择视频";
|
|
7517
|
+
me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
|
|
7432
7518
|
me2.viewStatus = true;
|
|
7433
7519
|
},
|
|
7520
|
+
// 关闭弹框
|
|
7434
7521
|
closeDialog() {
|
|
7435
7522
|
this.viewStatus = false;
|
|
7436
7523
|
this.linkStatus = false;
|
|
7437
7524
|
this.linkContent = "";
|
|
7438
7525
|
},
|
|
7526
|
+
// ==========toolbox end==========
|
|
7527
|
+
// 弹框提示
|
|
7439
7528
|
setToast(content) {
|
|
7440
7529
|
ElMessage.error(content);
|
|
7441
7530
|
},
|
|
7442
7531
|
setMessageBoxNoCancel(content) {
|
|
7443
7532
|
ElMessageBox.confirm(content, "", {
|
|
7444
|
-
confirmButtonText: "
|
|
7445
|
-
cancelButtonText: "
|
|
7533
|
+
confirmButtonText: "确定",
|
|
7534
|
+
cancelButtonText: "取消",
|
|
7446
7535
|
type: "warning"
|
|
7447
7536
|
}).then(() => {
|
|
7448
7537
|
}).catch(() => {
|
|
7449
7538
|
});
|
|
7450
7539
|
},
|
|
7540
|
+
// 检查是否会创建嵌套的halo-paragraph
|
|
7451
7541
|
wouldCreateNestedParagraph(range) {
|
|
7452
7542
|
let container = range.startContainer;
|
|
7453
7543
|
while (container && container !== this.editorDom) {
|
|
@@ -7458,6 +7548,7 @@ const _sfc_main = {
|
|
|
7458
7548
|
}
|
|
7459
7549
|
return false;
|
|
7460
7550
|
},
|
|
7551
|
+
// 检查光标是否在两个连续的mdd-topic之间
|
|
7461
7552
|
isBetweenTwoTopics(range) {
|
|
7462
7553
|
const container = range.startContainer;
|
|
7463
7554
|
const offset = range.startOffset;
|
|
@@ -7473,6 +7564,7 @@ const _sfc_main = {
|
|
|
7473
7564
|
}
|
|
7474
7565
|
return false;
|
|
7475
7566
|
},
|
|
7567
|
+
// 处理两个话题之间的回车或话题前面的回车
|
|
7476
7568
|
handleEnterBetweenTopics(range) {
|
|
7477
7569
|
var _a;
|
|
7478
7570
|
const me2 = this;
|
|
@@ -7510,6 +7602,7 @@ const _sfc_main = {
|
|
|
7510
7602
|
selection.addRange(newRange);
|
|
7511
7603
|
me2.updateData(true);
|
|
7512
7604
|
},
|
|
7605
|
+
// 更精确地提取光标后的内容(专门用于话题分割)
|
|
7513
7606
|
extractContentAfterCursorPrecise(range, paragraph) {
|
|
7514
7607
|
const fragment = document.createDocumentFragment();
|
|
7515
7608
|
const container = range.startContainer;
|
|
@@ -7535,6 +7628,7 @@ const _sfc_main = {
|
|
|
7535
7628
|
}
|
|
7536
7629
|
return fragment;
|
|
7537
7630
|
},
|
|
7631
|
+
// 处理包含话题的段落中的回车键
|
|
7538
7632
|
handleEnterKeyInParagraphWithTopic(range) {
|
|
7539
7633
|
var _a;
|
|
7540
7634
|
const me2 = this;
|
|
@@ -7609,6 +7703,7 @@ const _sfc_main = {
|
|
|
7609
7703
|
selection.addRange(newRange);
|
|
7610
7704
|
me2.updateData(true);
|
|
7611
7705
|
},
|
|
7706
|
+
// 检查光标是否在第一个话题前面
|
|
7612
7707
|
isCursorBeforeFirstTopic(range, paragraph) {
|
|
7613
7708
|
const container = range.startContainer;
|
|
7614
7709
|
const offset = range.startOffset;
|
|
@@ -7670,6 +7765,7 @@ const _sfc_main = {
|
|
|
7670
7765
|
}
|
|
7671
7766
|
return false;
|
|
7672
7767
|
},
|
|
7768
|
+
// 获取不包含mdd-topic内部文本的段落文本
|
|
7673
7769
|
getParagraphTextExcludingTopics(paragraph, range) {
|
|
7674
7770
|
let textContent = "";
|
|
7675
7771
|
let cursorPosition = 0;
|
|
@@ -7700,10 +7796,12 @@ const _sfc_main = {
|
|
|
7700
7796
|
}
|
|
7701
7797
|
return { textContent, cursorPosition };
|
|
7702
7798
|
},
|
|
7799
|
+
// 检查光标是否在段落开头
|
|
7703
7800
|
isCursorAtStartOfParagraph(range, paragraph) {
|
|
7704
7801
|
const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
|
|
7705
7802
|
return cursorPosition === 0;
|
|
7706
7803
|
},
|
|
7804
|
+
// 检查光标是否在段落末尾
|
|
7707
7805
|
isCursorAtEndOfParagraph(range, paragraph) {
|
|
7708
7806
|
const walker = document.createTreeWalker(
|
|
7709
7807
|
paragraph,
|
|
@@ -7730,6 +7828,7 @@ const _sfc_main = {
|
|
|
7730
7828
|
const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
|
|
7731
7829
|
return cursorPosition >= totalLength;
|
|
7732
7830
|
},
|
|
7831
|
+
// 获取当前段落
|
|
7733
7832
|
getCurrentParagraph(range) {
|
|
7734
7833
|
let container = range.startContainer;
|
|
7735
7834
|
while (container && container !== this.editorDom) {
|
|
@@ -7740,12 +7839,13 @@ const _sfc_main = {
|
|
|
7740
7839
|
}
|
|
7741
7840
|
return null;
|
|
7742
7841
|
},
|
|
7842
|
+
// 提取光标后的内容
|
|
7743
7843
|
extractContentAfterCursor(range, paragraph) {
|
|
7744
7844
|
const fragment = document.createDocumentFragment();
|
|
7745
7845
|
const container = range.startContainer;
|
|
7746
7846
|
const offset = range.startOffset;
|
|
7747
7847
|
let topicSpaceNode = null;
|
|
7748
|
-
if (container.nodeType === Node.TEXT_NODE && container.textContent === "
|
|
7848
|
+
if (container.nodeType === Node.TEXT_NODE && container.textContent === " " && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
|
|
7749
7849
|
topicSpaceNode = container;
|
|
7750
7850
|
}
|
|
7751
7851
|
const extractRange = document.createRange();
|
|
@@ -7800,7 +7900,8 @@ const _sfc_main = {
|
|
|
7800
7900
|
try {
|
|
7801
7901
|
extractRange.setStartBefore(startNode);
|
|
7802
7902
|
let lastNode = paragraph.lastChild;
|
|
7803
|
-
while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" &&
|
|
7903
|
+
while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && // 只跳过完全空的文本节点
|
|
7904
|
+
lastNode !== startNode) {
|
|
7804
7905
|
lastNode = lastNode.previousSibling;
|
|
7805
7906
|
}
|
|
7806
7907
|
if (lastNode) {
|
|
@@ -7820,6 +7921,7 @@ const _sfc_main = {
|
|
|
7820
7921
|
}
|
|
7821
7922
|
return fragment;
|
|
7822
7923
|
},
|
|
7924
|
+
// 统一的光标设置方法 - 设置光标到元素后面
|
|
7823
7925
|
setCursorAfterElement(element) {
|
|
7824
7926
|
const newRange = document.createRange();
|
|
7825
7927
|
newRange.setStartAfter(element);
|
|
@@ -7828,6 +7930,7 @@ const _sfc_main = {
|
|
|
7828
7930
|
selection.removeAllRanges();
|
|
7829
7931
|
selection.addRange(newRange);
|
|
7830
7932
|
},
|
|
7933
|
+
// 统一的光标设置方法 - 设置光标到元素前面
|
|
7831
7934
|
setCursorBeforeElement(element) {
|
|
7832
7935
|
const newRange = document.createRange();
|
|
7833
7936
|
newRange.setStartBefore(element);
|
|
@@ -7847,8 +7950,6 @@ const _hoisted_3 = {
|
|
|
7847
7950
|
slot: "footer",
|
|
7848
7951
|
class: "dialog-footer"
|
|
7849
7952
|
};
|
|
7850
|
-
const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u53D6 \u6D88");
|
|
7851
|
-
const _hoisted_5 = /* @__PURE__ */ createTextVNode("\u786E \u5B9A");
|
|
7852
7953
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7853
7954
|
const _component_el_input = resolveComponent("el-input");
|
|
7854
7955
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -7864,7 +7965,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7864
7965
|
withDirectives(createElementVNode("div", {
|
|
7865
7966
|
style: normalizeStyle({ textAlign: $options.align }),
|
|
7866
7967
|
class: "placeholder"
|
|
7867
|
-
}, toDisplayString($props.placeholder || "
|
|
7968
|
+
}, toDisplayString($props.placeholder || "请输入正文"), 5), [
|
|
7868
7969
|
[vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
|
|
7869
7970
|
]),
|
|
7870
7971
|
$data.overLine ? (openBlock(), createElementBlock("div", {
|
|
@@ -7889,26 +7990,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7889
7990
|
createVNode(_component_el_form, { model: $data.linkForm }, {
|
|
7890
7991
|
default: withCtx(() => [
|
|
7891
7992
|
createVNode(_component_el_form_item, {
|
|
7892
|
-
label: "
|
|
7993
|
+
label: "添加链接",
|
|
7893
7994
|
class: "link-title"
|
|
7894
7995
|
}, {
|
|
7895
7996
|
default: withCtx(() => [
|
|
7896
7997
|
createVNode(_component_el_input, {
|
|
7897
7998
|
modelValue: $data.linkForm.linkAddress,
|
|
7898
7999
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
|
|
7899
|
-
placeholder: "
|
|
8000
|
+
placeholder: "请输入链接地址"
|
|
7900
8001
|
}, null, 8, ["modelValue"])
|
|
7901
8002
|
]),
|
|
7902
8003
|
_: 1
|
|
7903
8004
|
}),
|
|
7904
|
-
createVNode(_component_el_form_item, { label: "
|
|
8005
|
+
createVNode(_component_el_form_item, { label: "链接文案" }, {
|
|
7905
8006
|
default: withCtx(() => [
|
|
7906
8007
|
createVNode(_component_el_input, {
|
|
7907
8008
|
modelValue: $data.linkForm.linkWriting,
|
|
7908
8009
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
|
|
7909
8010
|
type: "textarea",
|
|
7910
8011
|
autosize: "",
|
|
7911
|
-
placeholder: "
|
|
8012
|
+
placeholder: "请输入链接文案"
|
|
7912
8013
|
}, null, 8, ["modelValue"])
|
|
7913
8014
|
]),
|
|
7914
8015
|
_: 1
|
|
@@ -7921,18 +8022,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7921
8022
|
createVNode(_component_el_button, {
|
|
7922
8023
|
onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
|
|
7923
8024
|
}, {
|
|
7924
|
-
default: withCtx(() => [
|
|
7925
|
-
|
|
7926
|
-
]),
|
|
8025
|
+
default: withCtx(() => _cache[14] || (_cache[14] = [
|
|
8026
|
+
createTextVNode("取 消")
|
|
8027
|
+
])),
|
|
7927
8028
|
_: 1
|
|
7928
8029
|
}),
|
|
7929
8030
|
createVNode(_component_el_button, {
|
|
7930
8031
|
type: "primary",
|
|
7931
8032
|
onClick: $options.insertLink
|
|
7932
8033
|
}, {
|
|
7933
|
-
default: withCtx(() => [
|
|
7934
|
-
|
|
7935
|
-
]),
|
|
8034
|
+
default: withCtx(() => _cache[15] || (_cache[15] = [
|
|
8035
|
+
createTextVNode("确 定")
|
|
8036
|
+
])),
|
|
7936
8037
|
_: 1
|
|
7937
8038
|
}, 8, ["onClick"])
|
|
7938
8039
|
])
|
|
@@ -7949,7 +8050,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7949
8050
|
}, null, 8, ["article", "visible", "getList", "onDelete", "onChange"]),
|
|
7950
8051
|
createVNode(_component_ImgUpload, {
|
|
7951
8052
|
"img-list": $data.imgList,
|
|
7952
|
-
"onUpdate:
|
|
8053
|
+
"onUpdate:imgList": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
|
|
7953
8054
|
visible: $data.visibleImg,
|
|
7954
8055
|
"onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
|
|
7955
8056
|
chartGallery: $props.chartGallery,
|
|
@@ -7964,7 +8065,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7964
8065
|
}, null, 8, ["visible", "file-selected"]),
|
|
7965
8066
|
createVNode(_component_CollectArticle, {
|
|
7966
8067
|
"link-content": $data.linkContent,
|
|
7967
|
-
"onUpdate:
|
|
8068
|
+
"onUpdate:linkContent": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
|
|
7968
8069
|
visible: $data.visibleCollectArticle,
|
|
7969
8070
|
"onUpdate:visible": _cache[10] || (_cache[10] = ($event) => $data.visibleCollectArticle = $event),
|
|
7970
8071
|
onSubmit: $options.confirmLink
|