@haluo/biz 2.0.37 → 2.0.38
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 +715 -664
- package/dist/haluo-biz.umd.cjs +743 -681
- package/dist/{squire-raw.ca3d11c8.js → squire-raw-97946106.js} +18 -4
- package/dist/style.css +117 -46
- package/package.json +3 -2
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$7 = {
|
|
|
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$7 = {
|
|
|
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$7 = {
|
|
|
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$7 = {
|
|
|
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$3(_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$7, [
|
|
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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_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$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1105
1105
|
])
|
|
1106
1106
|
])) : createCommentVNode("", true);
|
|
1107
1107
|
}
|
|
1108
|
-
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
1108
|
+
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__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$4 = "";
|
|
1111
1110
|
const _hoisted_1$6 = { 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$6 = /* @__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$6 = /* @__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$6 = /* @__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$6, [
|
|
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$6 = /* @__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$6 = /* @__PURE__ */ defineComponent({
|
|
|
1198
1195
|
};
|
|
1199
1196
|
}
|
|
1200
1197
|
});
|
|
1198
|
+
const index_vue_vue_type_style_index_0_lang$4 = "";
|
|
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
|
-
|
|
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));
|
|
3300
|
+
};
|
|
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];
|
|
3305
|
+
}
|
|
3306
|
+
return _obj;
|
|
3307
|
+
};
|
|
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;
|
|
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;
|
|
3226
3338
|
if (!(window && window.document)) {
|
|
3227
|
-
return new Error("
|
|
3339
|
+
return new Error("仅支持浏览器");
|
|
3228
3340
|
}
|
|
3229
|
-
var
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
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
|
+
});
|
|
3361
|
+
};
|
|
3362
|
+
ToolsClass2.prototype.loadCss = function(url) {
|
|
3363
|
+
var _this = this;
|
|
3364
|
+
if (!(window && window.document)) {
|
|
3365
|
+
return new Error("仅支持浏览器");
|
|
3238
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();
|
|
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
|
+
});
|
|
3239
3387
|
};
|
|
3240
|
-
|
|
3388
|
+
ToolsClass2.prototype.clipboard = function(str) {
|
|
3241
3389
|
if (!(window && window.document)) {
|
|
3242
|
-
return new Error("
|
|
3390
|
+
return new Error("仅支持浏览器");
|
|
3391
|
+
}
|
|
3392
|
+
var copy = requireClipboardCopy();
|
|
3393
|
+
return copy(str);
|
|
3394
|
+
};
|
|
3395
|
+
ToolsClass2.prototype.firstUpperCase = function(str) {
|
|
3396
|
+
return str.charAt(0).toUpperCase() + str.toString().slice(1);
|
|
3397
|
+
};
|
|
3398
|
+
ToolsClass2.prototype.slice = function(target, length) {
|
|
3399
|
+
if (target === void 0) {
|
|
3400
|
+
target = "";
|
|
3243
3401
|
}
|
|
3244
|
-
|
|
3245
|
-
|
|
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__);
|
|
3402
|
+
if (length === void 0) {
|
|
3403
|
+
length = 0;
|
|
3253
3404
|
}
|
|
3405
|
+
return target.slice(0, length);
|
|
3254
3406
|
};
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
for (var key in obj) {
|
|
3259
|
-
if (obj.hasOwnProperty(key)) {
|
|
3260
|
-
arr.push([key, obj[key]].join("="));
|
|
3261
|
-
}
|
|
3262
|
-
}
|
|
3407
|
+
ToolsClass2.prototype.guid = function() {
|
|
3408
|
+
function S4() {
|
|
3409
|
+
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
3263
3410
|
}
|
|
3264
|
-
return
|
|
3411
|
+
return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
|
|
3265
3412
|
};
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
for (var key in obj) {
|
|
3270
|
-
if (obj.hasOwnProperty(key)) {
|
|
3271
|
-
result[obj[key]] = key;
|
|
3272
|
-
}
|
|
3273
|
-
}
|
|
3413
|
+
ToolsClass2.prototype.getBytesOfText = function(str) {
|
|
3414
|
+
if (str === void 0) {
|
|
3415
|
+
str = "";
|
|
3274
3416
|
}
|
|
3275
|
-
return
|
|
3417
|
+
return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
|
|
3276
3418
|
};
|
|
3277
|
-
|
|
3278
|
-
return
|
|
3419
|
+
ToolsClass2.prototype.uniqueArr = function(arr) {
|
|
3420
|
+
return Array.from(new Set(arr));
|
|
3279
3421
|
};
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
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;
|
|
3283
3426
|
};
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
return JSON.parse(JSON.stringify(data));
|
|
3287
|
-
};
|
|
3288
|
-
ToolsClass2.prototype.deepCopy2 = function(obj) {
|
|
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);
|
|
3427
|
+
ToolsClass2.prototype.filterEmoji = function(str) {
|
|
3428
|
+
return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
|
|
3307
3429
|
};
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
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
|
+
}
|
|
3316
3459
|
}
|
|
3460
|
+
return false;
|
|
3317
3461
|
};
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
return url && url.split("?")[0].split("/").reverse()[0];
|
|
3322
|
-
};
|
|
3323
|
-
ToolsClass2.prototype.loadJs = function(url) {
|
|
3324
|
-
var _this = this;
|
|
3325
|
-
if (!(window && window.document)) {
|
|
3326
|
-
return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
|
|
3327
|
-
}
|
|
3328
|
-
var name = this.getUrlName(url);
|
|
3329
|
-
var id = "js_" + name;
|
|
3330
|
-
return new Promise(function(resolve, reject) {
|
|
3331
|
-
if (_this.__loaded__[id]) {
|
|
3332
|
-
return resolve();
|
|
3462
|
+
ToolsClass2.prototype.sensitiveField = function(field, before, after) {
|
|
3463
|
+
if (before === void 0) {
|
|
3464
|
+
before = 3;
|
|
3333
3465
|
}
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
script.async = true;
|
|
3337
|
-
script.src = url;
|
|
3338
|
-
script.id = id;
|
|
3339
|
-
script.onload = function() {
|
|
3340
|
-
_this.__loaded__[id] = true;
|
|
3341
|
-
resolve();
|
|
3342
|
-
};
|
|
3343
|
-
script.onerror = function(e) {
|
|
3344
|
-
reject(e);
|
|
3345
|
-
};
|
|
3346
|
-
document.body.appendChild(script);
|
|
3347
|
-
});
|
|
3348
|
-
};
|
|
3349
|
-
ToolsClass2.prototype.loadCss = function(url) {
|
|
3350
|
-
var _this = this;
|
|
3351
|
-
if (!(window && window.document)) {
|
|
3352
|
-
return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
|
|
3353
|
-
}
|
|
3354
|
-
var name = this.getUrlName(url);
|
|
3355
|
-
var id = "css_" + name;
|
|
3356
|
-
return new Promise(function(resolve, reject) {
|
|
3357
|
-
if (_this.__loaded__[id]) {
|
|
3358
|
-
return resolve();
|
|
3466
|
+
if (after === void 0) {
|
|
3467
|
+
after = 4;
|
|
3359
3468
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
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")
|
|
3429
|
-
return false;
|
|
3430
|
-
if (typeof val === "number")
|
|
3431
|
-
return !val;
|
|
3432
|
-
if (val instanceof Error)
|
|
3433
|
-
return val.message === "";
|
|
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;
|
|
3469
|
+
if (!field) {
|
|
3470
|
+
return "";
|
|
3442
3471
|
}
|
|
3443
|
-
|
|
3444
|
-
|
|
3472
|
+
field = String(field);
|
|
3473
|
+
var sensitiveLen = field.length - before - after;
|
|
3474
|
+
if (sensitiveLen < 0) {
|
|
3475
|
+
sensitiveLen = 0;
|
|
3445
3476
|
}
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
if (sensitiveLen < 0) {
|
|
3462
|
-
sensitiveLen = 0;
|
|
3463
|
-
}
|
|
3464
|
-
var regItem = "[\u4E00-\u9FA5a-zA-Z0-9]";
|
|
3465
|
-
var regExp = "(" + regItem + "{" + before + "})" + regItem + "*(" + regItem + "{" + after + "})";
|
|
3466
|
-
var reg = new RegExp(regExp);
|
|
3467
|
-
return field.replace(reg, "$1" + "*".repeat(sensitiveLen) + "$2");
|
|
3468
|
-
};
|
|
3469
|
-
return ToolsClass2;
|
|
3470
|
-
}();
|
|
3471
|
-
tools$1.exports = new ToolsClass();
|
|
3472
|
-
const tools = /* @__PURE__ */ getDefaultExportFromCjs(tools$1.exports);
|
|
3473
|
-
const index_vue_vue_type_style_index_0_lang$3 = "";
|
|
3474
|
-
const _hoisted_1$5 = /* @__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 = {
|
|
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$5 = { 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$5 = /* @__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$5 = /* @__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$5 = /* @__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;
|
|
@@ -3576,6 +3587,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3576
3587
|
autherid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
|
|
3577
3588
|
limit: 20,
|
|
3578
3589
|
allType: data.params.radio,
|
|
3590
|
+
// 只有4 是查视频 其他是文章
|
|
3579
3591
|
title: data.params.title,
|
|
3580
3592
|
page: ++data.page
|
|
3581
3593
|
});
|
|
@@ -3595,21 +3607,21 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3595
3607
|
}, {
|
|
3596
3608
|
title: withCtx(() => [
|
|
3597
3609
|
createElementVNode("span", null, [
|
|
3598
|
-
|
|
3599
|
-
createElementVNode("strong",
|
|
3610
|
+
_cache[8] || (_cache[8] = createTextVNode("插入文章/视频")),
|
|
3611
|
+
createElementVNode("strong", _hoisted_1$5, "平台仅支持插入" + toDisplayString(`${isVideo.value ? "2年" : "18个月"}`) + "内的推荐内容", 1)
|
|
3600
3612
|
])
|
|
3601
3613
|
]),
|
|
3602
3614
|
default: withCtx(() => [
|
|
3603
|
-
createElementVNode("div",
|
|
3615
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
3604
3616
|
createElementVNode("div", null, [
|
|
3605
3617
|
createVNode(unref(ElRadio), {
|
|
3606
3618
|
modelValue: data.params.radio,
|
|
3607
3619
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.params.radio = $event),
|
|
3608
3620
|
label: Radio_Type.MY_ARITICLE
|
|
3609
3621
|
}, {
|
|
3610
|
-
default: withCtx(() => [
|
|
3611
|
-
|
|
3612
|
-
]),
|
|
3622
|
+
default: withCtx(() => _cache[9] || (_cache[9] = [
|
|
3623
|
+
createTextVNode("从我的文章中选择")
|
|
3624
|
+
])),
|
|
3613
3625
|
_: 1
|
|
3614
3626
|
}, 8, ["modelValue", "label"]),
|
|
3615
3627
|
createVNode(unref(ElRadio), {
|
|
@@ -3617,9 +3629,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3617
3629
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.params.radio = $event),
|
|
3618
3630
|
label: Radio_Type.MY_VIDEO
|
|
3619
3631
|
}, {
|
|
3620
|
-
default: withCtx(() => [
|
|
3621
|
-
|
|
3622
|
-
]),
|
|
3632
|
+
default: withCtx(() => _cache[10] || (_cache[10] = [
|
|
3633
|
+
createTextVNode("从我的视频中选择")
|
|
3634
|
+
])),
|
|
3623
3635
|
_: 1
|
|
3624
3636
|
}, 8, ["modelValue", "label"]),
|
|
3625
3637
|
createVNode(unref(ElRadio), {
|
|
@@ -3627,17 +3639,17 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3627
3639
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.params.radio = $event),
|
|
3628
3640
|
label: Radio_Type.ALL_ARITICLE
|
|
3629
3641
|
}, {
|
|
3630
|
-
default: withCtx(() => [
|
|
3631
|
-
|
|
3632
|
-
]),
|
|
3642
|
+
default: withCtx(() => _cache[11] || (_cache[11] = [
|
|
3643
|
+
createTextVNode("从所有文章中选择")
|
|
3644
|
+
])),
|
|
3633
3645
|
_: 1
|
|
3634
3646
|
}, 8, ["modelValue", "label"])
|
|
3635
3647
|
]),
|
|
3636
|
-
createElementVNode("div",
|
|
3648
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
3637
3649
|
createVNode(unref(ElInput), {
|
|
3638
3650
|
modelValue: data.params.title,
|
|
3639
3651
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.params.title = $event),
|
|
3640
|
-
placeholder:
|
|
3652
|
+
placeholder: isVideo.value ? "输入视频描述查找平台发布过的视频" : "输入标题名查找平台发过的文章",
|
|
3641
3653
|
onKeyup: _cache[5] || (_cache[5] = withKeys(($event) => unref(getArticleList)(true), ["enter", "native"])),
|
|
3642
3654
|
onInput: _cache[6] || (_cache[6] = ($event) => unref(getArticleList)(true))
|
|
3643
3655
|
}, {
|
|
@@ -3651,11 +3663,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3651
3663
|
_: 1
|
|
3652
3664
|
}, 8, ["modelValue", "placeholder"])
|
|
3653
3665
|
]),
|
|
3654
|
-
data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div",
|
|
3666
|
+
data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_4$2, toDisplayString(`没有符合条件的${isVideo.value ? "视频" : "文章"}哦,你可以试试搜索其他${isVideo.value ? "视频" : "文章"}~`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
|
|
3655
3667
|
key: 1,
|
|
3656
3668
|
"infinite-scroll-immediate": false,
|
|
3657
3669
|
class: "insert-article_list",
|
|
3658
|
-
"infinite-scroll-disabled":
|
|
3670
|
+
"infinite-scroll-disabled": disable.value
|
|
3659
3671
|
}, [
|
|
3660
3672
|
(openBlock(true), createElementBlock(Fragment, null, renderList(data.data, (item, index) => {
|
|
3661
3673
|
return openBlock(), createElementBlock("div", {
|
|
@@ -3671,24 +3683,24 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3671
3683
|
default: withCtx(() => {
|
|
3672
3684
|
var _a;
|
|
3673
3685
|
return [
|
|
3674
|
-
|
|
3675
|
-
createElementVNode("div",
|
|
3686
|
+
isVideo.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
|
|
3687
|
+
createElementVNode("div", _hoisted_7$1, [
|
|
3676
3688
|
createElementVNode("img", {
|
|
3677
3689
|
class: "video-pic",
|
|
3678
3690
|
src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
|
|
3679
|
-
}, null, 8,
|
|
3691
|
+
}, null, 8, _hoisted_8$1),
|
|
3680
3692
|
createElementVNode("img", {
|
|
3681
3693
|
class: "play",
|
|
3682
3694
|
src: getImageUrl("play.png")
|
|
3683
|
-
}, null, 8,
|
|
3695
|
+
}, null, 8, _hoisted_9$1)
|
|
3684
3696
|
]),
|
|
3685
|
-
createElementVNode("div",
|
|
3686
|
-
createElementVNode("span",
|
|
3687
|
-
createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
3697
|
+
createElementVNode("div", _hoisted_10$1, [
|
|
3698
|
+
createElementVNode("span", _hoisted_11$1, toDisplayString(item.content || "[无标题]"), 1),
|
|
3699
|
+
createElementVNode("span", null, toDisplayString(unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
3688
3700
|
])
|
|
3689
|
-
])) : (openBlock(), createElementBlock("div",
|
|
3690
|
-
createElementVNode("span", null, toDisplayString(item.title || "[
|
|
3691
|
-
createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
3701
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_12$1, [
|
|
3702
|
+
createElementVNode("span", null, toDisplayString(item.title || "[无标题]"), 1),
|
|
3703
|
+
createElementVNode("span", null, toDisplayString(unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
3692
3704
|
]))
|
|
3693
3705
|
];
|
|
3694
3706
|
}),
|
|
@@ -3696,7 +3708,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3696
3708
|
}, 1032, ["modelValue", "label", "onChange"])
|
|
3697
3709
|
]);
|
|
3698
3710
|
}), 128))
|
|
3699
|
-
], 8,
|
|
3711
|
+
], 8, _hoisted_5$2)), [
|
|
3700
3712
|
[unref(vInfiniteScroll), unref(getArticleList)]
|
|
3701
3713
|
])
|
|
3702
3714
|
])
|
|
@@ -3706,6 +3718,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3706
3718
|
};
|
|
3707
3719
|
}
|
|
3708
3720
|
});
|
|
3721
|
+
const index_vue_vue_type_style_index_0_lang$3 = "";
|
|
3709
3722
|
let getRandomValues;
|
|
3710
3723
|
const rnds8 = new Uint8Array(16);
|
|
3711
3724
|
function rng() {
|
|
@@ -3722,7 +3735,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
3722
3735
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
3723
3736
|
}
|
|
3724
3737
|
function unsafeStringify(arr, offset = 0) {
|
|
3725
|
-
return
|
|
3738
|
+
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]];
|
|
3726
3739
|
}
|
|
3727
3740
|
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
3728
3741
|
const native = {
|
|
@@ -3745,15 +3758,14 @@ function v4(options, buf, offset) {
|
|
|
3745
3758
|
}
|
|
3746
3759
|
return unsafeStringify(rnds);
|
|
3747
3760
|
}
|
|
3748
|
-
const index_vue_vue_type_style_index_0_lang$2 = "";
|
|
3749
3761
|
const _hoisted_1$4 = { class: "img-upload-content" };
|
|
3750
|
-
const _hoisted_2$
|
|
3751
|
-
const _hoisted_3$
|
|
3752
|
-
const _hoisted_4$
|
|
3762
|
+
const _hoisted_2$2 = { class: "title-box" };
|
|
3763
|
+
const _hoisted_3$2 = ["onClick"];
|
|
3764
|
+
const _hoisted_4$1 = {
|
|
3753
3765
|
key: 0,
|
|
3754
3766
|
class: "line"
|
|
3755
3767
|
};
|
|
3756
|
-
const _hoisted_5$
|
|
3768
|
+
const _hoisted_5$1 = {
|
|
3757
3769
|
key: 0,
|
|
3758
3770
|
class: "prompt-restriction"
|
|
3759
3771
|
};
|
|
@@ -3777,45 +3789,39 @@ const _hoisted_13 = {
|
|
|
3777
3789
|
key: 0,
|
|
3778
3790
|
class: "upload-wrap"
|
|
3779
3791
|
};
|
|
3780
|
-
const _hoisted_14 =
|
|
3781
|
-
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);
|
|
3782
|
-
const _hoisted_16 = {
|
|
3792
|
+
const _hoisted_14 = {
|
|
3783
3793
|
key: 1,
|
|
3784
3794
|
class: "img-list"
|
|
3785
3795
|
};
|
|
3786
|
-
const
|
|
3787
|
-
const
|
|
3788
|
-
const
|
|
3796
|
+
const _hoisted_15 = ["src"];
|
|
3797
|
+
const _hoisted_16 = { class: "upload-btn" };
|
|
3798
|
+
const _hoisted_17 = {
|
|
3789
3799
|
key: 2,
|
|
3790
3800
|
class: "map-depot"
|
|
3791
3801
|
};
|
|
3792
|
-
const
|
|
3793
|
-
const
|
|
3794
|
-
const
|
|
3795
|
-
const
|
|
3796
|
-
const
|
|
3797
|
-
const _hoisted_25 = {
|
|
3802
|
+
const _hoisted_18 = { class: "screen" };
|
|
3803
|
+
const _hoisted_19 = { key: 0 };
|
|
3804
|
+
const _hoisted_20 = { class: "tab-box" };
|
|
3805
|
+
const _hoisted_21 = ["onClick"];
|
|
3806
|
+
const _hoisted_22 = {
|
|
3798
3807
|
key: 0,
|
|
3799
3808
|
class: "line"
|
|
3800
3809
|
};
|
|
3801
|
-
const
|
|
3802
|
-
const
|
|
3803
|
-
const
|
|
3804
|
-
const
|
|
3810
|
+
const _hoisted_23 = { class: "image-list depot-image" };
|
|
3811
|
+
const _hoisted_24 = ["onClick"];
|
|
3812
|
+
const _hoisted_25 = ["src"];
|
|
3813
|
+
const _hoisted_26 = {
|
|
3805
3814
|
key: 0,
|
|
3806
3815
|
class: "shade"
|
|
3807
3816
|
};
|
|
3808
|
-
const
|
|
3809
|
-
const
|
|
3817
|
+
const _hoisted_27 = { class: "num" };
|
|
3818
|
+
const _hoisted_28 = {
|
|
3810
3819
|
key: 1,
|
|
3811
3820
|
class: "protocol-box"
|
|
3812
3821
|
};
|
|
3813
|
-
const
|
|
3814
|
-
const _hoisted_33 = /* @__PURE__ */ createTextVNode(" \u8BF7\u9605\u8BFB");
|
|
3815
|
-
const _hoisted_34 = ["href"];
|
|
3816
|
-
const _hoisted_35 = /* @__PURE__ */ createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ");
|
|
3822
|
+
const _hoisted_29 = ["href"];
|
|
3817
3823
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3818
|
-
|
|
3824
|
+
__name: "index",
|
|
3819
3825
|
props: {
|
|
3820
3826
|
visible: { type: Boolean, default: false },
|
|
3821
3827
|
imgList: { default: [] },
|
|
@@ -3824,7 +3830,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3824
3830
|
imgNum: { default: 20 }
|
|
3825
3831
|
},
|
|
3826
3832
|
emits: ["update:imgList", "update:visible", "submit"],
|
|
3827
|
-
setup(__props, { emit:
|
|
3833
|
+
setup(__props, { emit: __emit }) {
|
|
3834
|
+
const emits = __emit;
|
|
3828
3835
|
const props = __props;
|
|
3829
3836
|
const drag = ref(false);
|
|
3830
3837
|
const imgListTemp = computed({
|
|
@@ -3848,7 +3855,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3848
3855
|
const tempImgs = [...props.imgList];
|
|
3849
3856
|
Array.from(imgFile).forEach((file) => {
|
|
3850
3857
|
if (file.size > 20 * 1024 * 1024) {
|
|
3851
|
-
ElMessage.error("
|
|
3858
|
+
ElMessage.error("单张图片最大支持20M");
|
|
3852
3859
|
return;
|
|
3853
3860
|
}
|
|
3854
3861
|
const id = v4();
|
|
@@ -3878,14 +3885,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3878
3885
|
const list = [
|
|
3879
3886
|
{
|
|
3880
3887
|
id: 2,
|
|
3881
|
-
value: "
|
|
3888
|
+
value: "上传图片"
|
|
3882
3889
|
}
|
|
3883
3890
|
];
|
|
3884
3891
|
activeTitle.value = 2;
|
|
3885
3892
|
if (props.imgNum < 20) {
|
|
3886
3893
|
list.unshift({
|
|
3887
3894
|
id: 1,
|
|
3888
|
-
value: "
|
|
3895
|
+
value: "正文图片"
|
|
3889
3896
|
});
|
|
3890
3897
|
activeTitle.value = 1;
|
|
3891
3898
|
getContentImgList();
|
|
@@ -3893,7 +3900,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3893
3900
|
if (props.chartGallery) {
|
|
3894
3901
|
list.push({
|
|
3895
3902
|
id: 3,
|
|
3896
|
-
value: isEmotofine ? "
|
|
3903
|
+
value: isEmotofine ? "电摩范图库" : "摩托范图库"
|
|
3897
3904
|
});
|
|
3898
3905
|
}
|
|
3899
3906
|
titleList.value = list;
|
|
@@ -4038,13 +4045,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4038
4045
|
const tabList = ref([]);
|
|
4039
4046
|
const search = () => {
|
|
4040
4047
|
if (!selectData.brandId) {
|
|
4041
|
-
return ElMessage.error("
|
|
4048
|
+
return ElMessage.error("请选择品牌");
|
|
4042
4049
|
}
|
|
4043
4050
|
if (!selectData.goodId) {
|
|
4044
|
-
return ElMessage.error("
|
|
4051
|
+
return ElMessage.error("请选择车型");
|
|
4045
4052
|
}
|
|
4046
4053
|
if (!selectData.carId) {
|
|
4047
|
-
return ElMessage.error("
|
|
4054
|
+
return ElMessage.error("请选择款型");
|
|
4048
4055
|
}
|
|
4049
4056
|
tabList.value = [];
|
|
4050
4057
|
emits("update:imgList", []);
|
|
@@ -4101,7 +4108,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4101
4108
|
}, {
|
|
4102
4109
|
default: withCtx(() => [
|
|
4103
4110
|
createElementVNode("div", _hoisted_1$4, [
|
|
4104
|
-
createElementVNode("div", _hoisted_2$
|
|
4111
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
4105
4112
|
(openBlock(true), createElementBlock(Fragment, null, renderList(titleList.value, (item, index) => {
|
|
4106
4113
|
return openBlock(), createElementBlock("div", {
|
|
4107
4114
|
key: index,
|
|
@@ -4109,15 +4116,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4109
4116
|
onClick: ($event) => changeTab(item)
|
|
4110
4117
|
}, [
|
|
4111
4118
|
createTextVNode(toDisplayString(item.value) + " ", 1),
|
|
4112
|
-
item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
4113
|
-
], 10, _hoisted_3$
|
|
4119
|
+
item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$1)) : createCommentVNode("", true)
|
|
4120
|
+
], 10, _hoisted_3$2);
|
|
4114
4121
|
}), 128)),
|
|
4115
|
-
[1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
4116
|
-
activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "
|
|
4122
|
+
[1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, " 最多可选" + toDisplayString(props.imgNum) + "张图片,已选" + toDisplayString(props.imgList.length) + "张 ", 1)) : createCommentVNode("", true),
|
|
4123
|
+
activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "张上传成功 拖动可调整顺序 ", 1)) : createCommentVNode("", true)
|
|
4117
4124
|
]),
|
|
4118
4125
|
activeTitle.value === 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
4119
4126
|
createElementVNode("div", _hoisted_8, [
|
|
4120
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
4127
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(contentImgList.value, (item, index) => {
|
|
4121
4128
|
return openBlock(), createElementBlock("div", {
|
|
4122
4129
|
key: index,
|
|
4123
4130
|
class: "image-item",
|
|
@@ -4150,13 +4157,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4150
4157
|
]),
|
|
4151
4158
|
_: 1
|
|
4152
4159
|
}),
|
|
4153
|
-
|
|
4160
|
+
_cache[7] || (_cache[7] = createElementVNode("span", null, "本地上传", -1))
|
|
4154
4161
|
]),
|
|
4155
|
-
|
|
4156
|
-
])) : (openBlock(), createElementBlock("div",
|
|
4162
|
+
_cache[8] || (_cache[8] = createElementVNode("span", { class: "remark" }, "支持jpg、jpeg、png等多种格式,单张图片最大支持20MB", -1))
|
|
4163
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
4157
4164
|
createVNode(unref(draggable), {
|
|
4158
|
-
modelValue:
|
|
4159
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
4165
|
+
modelValue: imgListTemp.value,
|
|
4166
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imgListTemp.value = $event),
|
|
4160
4167
|
handle: ".img-item",
|
|
4161
4168
|
class: "img-wrap",
|
|
4162
4169
|
group: "people",
|
|
@@ -4174,7 +4181,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4174
4181
|
style: { "object-fit": "contain" },
|
|
4175
4182
|
width: "120",
|
|
4176
4183
|
height: "120"
|
|
4177
|
-
}, null, 8,
|
|
4184
|
+
}, null, 8, _hoisted_15),
|
|
4178
4185
|
createVNode(unref(CircleCloseFilled), {
|
|
4179
4186
|
class: "icon pointer",
|
|
4180
4187
|
onClick: ($event) => deleteImg(element)
|
|
@@ -4197,7 +4204,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4197
4204
|
_: 1
|
|
4198
4205
|
}, 8, ["modelValue"])
|
|
4199
4206
|
])),
|
|
4200
|
-
createElementVNode("div",
|
|
4207
|
+
createElementVNode("div", _hoisted_16, [
|
|
4201
4208
|
createElementVNode("input", {
|
|
4202
4209
|
type: "file",
|
|
4203
4210
|
name: "file",
|
|
@@ -4208,13 +4215,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4208
4215
|
}, null, 32)
|
|
4209
4216
|
])
|
|
4210
4217
|
], 2)) : createCommentVNode("", true),
|
|
4211
|
-
activeTitle.value === 3 ? (openBlock(), createElementBlock("div",
|
|
4212
|
-
createElementVNode("div",
|
|
4218
|
+
activeTitle.value === 3 ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
4219
|
+
createElementVNode("div", _hoisted_18, [
|
|
4213
4220
|
createElementVNode("div", null, [
|
|
4214
4221
|
createVNode(unref(ElSelect), {
|
|
4215
4222
|
modelValue: selectData.brandId,
|
|
4216
4223
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
|
|
4217
|
-
placeholder: "
|
|
4224
|
+
placeholder: "请选择品牌",
|
|
4218
4225
|
size: "large",
|
|
4219
4226
|
class: "select_1",
|
|
4220
4227
|
filterable: "",
|
|
@@ -4235,7 +4242,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4235
4242
|
createVNode(unref(ElSelect), {
|
|
4236
4243
|
modelValue: selectData.goodId,
|
|
4237
4244
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
|
|
4238
|
-
placeholder: "
|
|
4245
|
+
placeholder: "请选择车型",
|
|
4239
4246
|
size: "large",
|
|
4240
4247
|
class: "select_1",
|
|
4241
4248
|
filterable: "",
|
|
@@ -4256,7 +4263,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4256
4263
|
createVNode(unref(ElSelect), {
|
|
4257
4264
|
modelValue: selectData.carId,
|
|
4258
4265
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
|
|
4259
|
-
placeholder: "
|
|
4266
|
+
placeholder: "请选择款型",
|
|
4260
4267
|
size: "large",
|
|
4261
4268
|
class: "select_2",
|
|
4262
4269
|
filterable: "",
|
|
@@ -4280,14 +4287,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4280
4287
|
style: { "width": "80px" },
|
|
4281
4288
|
onClick: search
|
|
4282
4289
|
}, {
|
|
4283
|
-
default: withCtx(() => [
|
|
4284
|
-
|
|
4285
|
-
]),
|
|
4290
|
+
default: withCtx(() => _cache[9] || (_cache[9] = [
|
|
4291
|
+
createTextVNode("搜索")
|
|
4292
|
+
])),
|
|
4286
4293
|
_: 1
|
|
4287
4294
|
})
|
|
4288
4295
|
]),
|
|
4289
|
-
tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div",
|
|
4290
|
-
createElementVNode("div",
|
|
4296
|
+
tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
4297
|
+
createElementVNode("div", _hoisted_20, [
|
|
4291
4298
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tabList.value, (item, index) => {
|
|
4292
4299
|
return openBlock(), createElementBlock("div", {
|
|
4293
4300
|
key: index,
|
|
@@ -4295,12 +4302,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4295
4302
|
onClick: ($event) => activeTab.value = item.type
|
|
4296
4303
|
}, [
|
|
4297
4304
|
createTextVNode(toDisplayString(item.name) + " ", 1),
|
|
4298
|
-
item.type === activeTab.value ? (openBlock(), createElementBlock("div",
|
|
4299
|
-
], 10,
|
|
4305
|
+
item.type === activeTab.value ? (openBlock(), createElementBlock("div", _hoisted_22)) : createCommentVNode("", true)
|
|
4306
|
+
], 10, _hoisted_21);
|
|
4300
4307
|
}), 128))
|
|
4301
4308
|
]),
|
|
4302
|
-
createElementVNode("div",
|
|
4303
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
4309
|
+
createElementVNode("div", _hoisted_23, [
|
|
4310
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(imageList.value, (item, index) => {
|
|
4304
4311
|
return openBlock(), createElementBlock("div", {
|
|
4305
4312
|
key: index,
|
|
4306
4313
|
class: "image-item",
|
|
@@ -4310,25 +4317,25 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4310
4317
|
src: item.imgOrgUrl,
|
|
4311
4318
|
alt: "",
|
|
4312
4319
|
class: "image"
|
|
4313
|
-
}, null, 8,
|
|
4314
|
-
item.num ? (openBlock(), createElementBlock("div",
|
|
4315
|
-
createElementVNode("div",
|
|
4320
|
+
}, null, 8, _hoisted_25),
|
|
4321
|
+
item.num ? (openBlock(), createElementBlock("div", _hoisted_26, [
|
|
4322
|
+
createElementVNode("div", _hoisted_27, toDisplayString(item.num), 1)
|
|
4316
4323
|
])) : createCommentVNode("", true)
|
|
4317
|
-
], 8,
|
|
4324
|
+
], 8, _hoisted_24);
|
|
4318
4325
|
}), 128))
|
|
4319
4326
|
])
|
|
4320
|
-
])) : (openBlock(), createElementBlock("div",
|
|
4327
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_28, [
|
|
4321
4328
|
createElementVNode("div", null, [
|
|
4322
|
-
|
|
4329
|
+
_cache[12] || (_cache[12] = createElementVNode("div", null, " 图库中的图片仅限下载摩托范以编辑发布文章使用,不得用于其他任何平台及用途 ", -1)),
|
|
4323
4330
|
createElementVNode("div", null, [
|
|
4324
|
-
|
|
4331
|
+
_cache[10] || (_cache[10] = createTextVNode(" 请阅读")),
|
|
4325
4332
|
createElementVNode("a", {
|
|
4326
4333
|
href: `https://${unref(hostName)}/about?type=imageLicenseAgreement`,
|
|
4327
4334
|
target: "_blank",
|
|
4328
4335
|
rel: "noopener noreferrer",
|
|
4329
4336
|
class: "link"
|
|
4330
|
-
}, "
|
|
4331
|
-
|
|
4337
|
+
}, "《摩托范图片许可使用协议》", 8, _hoisted_29),
|
|
4338
|
+
_cache[11] || (_cache[11] = createTextVNode(",您的行为视为您已同意该协议。 "))
|
|
4332
4339
|
])
|
|
4333
4340
|
])
|
|
4334
4341
|
]))
|
|
@@ -4340,25 +4347,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4340
4347
|
};
|
|
4341
4348
|
}
|
|
4342
4349
|
});
|
|
4343
|
-
const index_vue_vue_type_style_index_0_lang$
|
|
4344
|
-
const _hoisted_1$3 =
|
|
4345
|
-
const _hoisted_2$3 = { class: "insert-video" };
|
|
4346
|
-
const _hoisted_3$3 = /* @__PURE__ */ createTextVNode("\u9009\u62E9\u89C6\u9891");
|
|
4347
|
-
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);
|
|
4350
|
+
const index_vue_vue_type_style_index_0_lang$2 = "";
|
|
4351
|
+
const _hoisted_1$3 = { class: "insert-video" };
|
|
4348
4352
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
4349
|
-
|
|
4353
|
+
__name: "index",
|
|
4350
4354
|
props: {
|
|
4351
4355
|
visible: { type: Boolean, default: false },
|
|
4352
|
-
fileSelected:
|
|
4356
|
+
fileSelected: {}
|
|
4353
4357
|
},
|
|
4354
4358
|
emits: ["update:visible"],
|
|
4355
|
-
setup(__props, { emit:
|
|
4356
|
-
const
|
|
4359
|
+
setup(__props, { emit: __emit }) {
|
|
4360
|
+
const emits = __emit;
|
|
4357
4361
|
provide("vm", {
|
|
4358
4362
|
setStatus(val) {
|
|
4359
4363
|
emits("update:visible", val);
|
|
4360
4364
|
}
|
|
4361
4365
|
});
|
|
4366
|
+
const props = __props;
|
|
4362
4367
|
const { visible, fileSelected } = toRefs(props);
|
|
4363
4368
|
const emitEvent = () => {
|
|
4364
4369
|
var event = new MouseEvent("click");
|
|
@@ -4372,23 +4377,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4372
4377
|
width: "600px",
|
|
4373
4378
|
height: "100px"
|
|
4374
4379
|
}, {
|
|
4375
|
-
title: withCtx(() => [
|
|
4376
|
-
|
|
4377
|
-
]),
|
|
4380
|
+
title: withCtx(() => _cache[1] || (_cache[1] = [
|
|
4381
|
+
createElementVNode("span", null, "插入视频", -1)
|
|
4382
|
+
])),
|
|
4378
4383
|
default: withCtx(() => [
|
|
4379
|
-
createElementVNode("div",
|
|
4384
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
4380
4385
|
createVNode(unref(ElButton), {
|
|
4381
4386
|
style: { "width": "120px" },
|
|
4382
4387
|
round: "",
|
|
4383
4388
|
type: "primary",
|
|
4384
4389
|
onClick: emitEvent
|
|
4385
4390
|
}, {
|
|
4386
|
-
default: withCtx(() => [
|
|
4387
|
-
|
|
4388
|
-
]),
|
|
4391
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
4392
|
+
createTextVNode("选择视频")
|
|
4393
|
+
])),
|
|
4389
4394
|
_: 1
|
|
4390
4395
|
}),
|
|
4391
|
-
|
|
4396
|
+
_cache[3] || (_cache[3] = createElementVNode("span", { class: "remark" }, "为了获得更高的推荐量和点击量,建议上传720p(1280*720)或更高分辨率的视频,视频格式为.mp4或.mov,大小不超过1G", -1)),
|
|
4392
4397
|
createElementVNode("input", {
|
|
4393
4398
|
type: "file",
|
|
4394
4399
|
accept: "video/*",
|
|
@@ -4403,6 +4408,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4403
4408
|
};
|
|
4404
4409
|
}
|
|
4405
4410
|
});
|
|
4411
|
+
const index_vue_vue_type_style_index_0_lang$1 = "";
|
|
4406
4412
|
const index_vue_vue_type_style_index_0_lang = "";
|
|
4407
4413
|
const _sfc_main$2 = {
|
|
4408
4414
|
provide() {
|
|
@@ -4454,14 +4460,12 @@ const _sfc_main$2 = {
|
|
|
4454
4460
|
setStatus(val) {
|
|
4455
4461
|
this.$emit("update:visible", val);
|
|
4456
4462
|
}
|
|
4463
|
+
// submit() {
|
|
4464
|
+
// this.$emit('submit')
|
|
4465
|
+
// }
|
|
4457
4466
|
}
|
|
4458
4467
|
};
|
|
4459
|
-
const _hoisted_1$2 =
|
|
4460
|
-
/* @__PURE__ */ createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
|
|
4461
|
-
/* @__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")
|
|
4462
|
-
], -1);
|
|
4463
|
-
const _hoisted_2$2 = { class: "collect-article_content" };
|
|
4464
|
-
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);
|
|
4468
|
+
const _hoisted_1$2 = { class: "collect-article_content" };
|
|
4465
4469
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4466
4470
|
const _component_el_input = resolveComponent("el-input");
|
|
4467
4471
|
const _component_BasicDialog = resolveComponent("BasicDialog");
|
|
@@ -4470,16 +4474,19 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4470
4474
|
width: "600px",
|
|
4471
4475
|
height: "50px"
|
|
4472
4476
|
}, {
|
|
4473
|
-
title: withCtx(() => [
|
|
4474
|
-
|
|
4475
|
-
|
|
4477
|
+
title: withCtx(() => _cache[1] || (_cache[1] = [
|
|
4478
|
+
createElementVNode("div", null, [
|
|
4479
|
+
createElementVNode("span", null, "采集文章"),
|
|
4480
|
+
createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
|
|
4481
|
+
], -1)
|
|
4482
|
+
])),
|
|
4476
4483
|
default: withCtx(() => [
|
|
4477
|
-
createElementVNode("div",
|
|
4478
|
-
|
|
4484
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
4485
|
+
_cache[2] || (_cache[2] = createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
|
|
4479
4486
|
createVNode(_component_el_input, {
|
|
4480
4487
|
modelValue: $options.input,
|
|
4481
4488
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
|
|
4482
|
-
placeholder: "
|
|
4489
|
+
placeholder: "仅支持微信链接"
|
|
4483
4490
|
}, null, 8, ["modelValue"])
|
|
4484
4491
|
])
|
|
4485
4492
|
]),
|
|
@@ -4487,7 +4494,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4487
4494
|
}, 8, ["visible"]);
|
|
4488
4495
|
}
|
|
4489
4496
|
const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
4490
|
-
const
|
|
4497
|
+
const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
|
|
4491
4498
|
const _sfc_main$1 = {
|
|
4492
4499
|
components: {
|
|
4493
4500
|
ElIconError: CircleCloseFilled
|
|
@@ -4518,8 +4525,8 @@ const _hoisted_1$1 = {
|
|
|
4518
4525
|
};
|
|
4519
4526
|
const _hoisted_2$1 = ["src"];
|
|
4520
4527
|
const _hoisted_3$1 = { class: "article-item_right" };
|
|
4521
|
-
const _hoisted_4
|
|
4522
|
-
const _hoisted_5
|
|
4528
|
+
const _hoisted_4 = { class: "name" };
|
|
4529
|
+
const _hoisted_5 = { class: "score" };
|
|
4523
4530
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4524
4531
|
const _component_el_icon_error = resolveComponent("el-icon-error");
|
|
4525
4532
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
@@ -4529,11 +4536,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4529
4536
|
alt: ""
|
|
4530
4537
|
}, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
|
|
4531
4538
|
createElementVNode("div", _hoisted_3$1, [
|
|
4532
|
-
createElementVNode("div", _hoisted_4
|
|
4533
|
-
createElementVNode("div", _hoisted_5
|
|
4539
|
+
createElementVNode("div", _hoisted_4, toDisplayString($props.article.title), 1),
|
|
4540
|
+
createElementVNode("div", _hoisted_5, [
|
|
4534
4541
|
createElementVNode("span", null, toDisplayString($props.article.author), 1),
|
|
4535
|
-
createElementVNode("span", null, toDisplayString($props.article.viewNum) + "
|
|
4536
|
-
createElementVNode("span", null, toDisplayString($props.article.replycnt) + "
|
|
4542
|
+
createElementVNode("span", null, toDisplayString($props.article.viewNum) + "浏览", 1),
|
|
4543
|
+
createElementVNode("span", null, toDisplayString($props.article.replycnt) + "评论", 1)
|
|
4537
4544
|
])
|
|
4538
4545
|
]),
|
|
4539
4546
|
createVNode(_component_el_icon_error, {
|
|
@@ -4545,10 +4552,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4545
4552
|
class: normalizeClass([{
|
|
4546
4553
|
"article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
|
|
4547
4554
|
}, "article-bg"])
|
|
4548
|
-
}, "
|
|
4555
|
+
}, " 平台仅支持展示18个月的推荐内容 ", 2)) : createCommentVNode("", true)
|
|
4549
4556
|
]);
|
|
4550
4557
|
}
|
|
4551
|
-
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
4558
|
+
const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
|
|
4552
4559
|
const mountArticleDom = (props, del) => {
|
|
4553
4560
|
const className = "article-wrap";
|
|
4554
4561
|
const article = props.article;
|
|
@@ -4606,6 +4613,7 @@ const _sfc_main = {
|
|
|
4606
4613
|
hasArticleCard: false,
|
|
4607
4614
|
cursorStyle: "auto",
|
|
4608
4615
|
titleCount: 0,
|
|
4616
|
+
// 标题数量
|
|
4609
4617
|
viewLinkDialog: false,
|
|
4610
4618
|
linkForm: {
|
|
4611
4619
|
linkAddress: "",
|
|
@@ -4613,39 +4621,54 @@ const _sfc_main = {
|
|
|
4613
4621
|
},
|
|
4614
4622
|
setAlignFlag: true,
|
|
4615
4623
|
article: {},
|
|
4624
|
+
// 插入的文章
|
|
4616
4625
|
imgList: [],
|
|
4617
4626
|
imgNum: 20,
|
|
4618
4627
|
videoList: [],
|
|
4619
4628
|
visibleVideo: false,
|
|
4620
4629
|
visibleCollectArticle: false,
|
|
4621
4630
|
visibleArticle: false,
|
|
4631
|
+
// 插入文章
|
|
4622
4632
|
visibleImg: false,
|
|
4633
|
+
// 插入图片
|
|
4623
4634
|
imgType: "normal",
|
|
4635
|
+
//
|
|
4624
4636
|
typeEnum: {
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4637
|
+
文字: "1",
|
|
4638
|
+
图片: "2",
|
|
4639
|
+
图文: "3",
|
|
4640
|
+
段落标题: "4",
|
|
4641
|
+
关联: "5",
|
|
4642
|
+
// 关联车辆、轨迹、活动、商家、话题
|
|
4643
|
+
单视频: "6",
|
|
4644
|
+
视频文字: "7",
|
|
4632
4645
|
URL: "8",
|
|
4633
|
-
|
|
4646
|
+
文章卡片: "11"
|
|
4634
4647
|
},
|
|
4635
4648
|
fontInfo: {
|
|
4636
4649
|
size: ""
|
|
4637
4650
|
},
|
|
4638
4651
|
user: {},
|
|
4652
|
+
// 用户
|
|
4639
4653
|
editor: {},
|
|
4654
|
+
// 编辑器实例对象
|
|
4640
4655
|
editorDom: {},
|
|
4656
|
+
// 编辑器Dom
|
|
4641
4657
|
uploadStore: {},
|
|
4658
|
+
// 待上传的图片池
|
|
4642
4659
|
linkContent: "",
|
|
4660
|
+
// 插入链接的地址
|
|
4643
4661
|
loadingText: "",
|
|
4662
|
+
// loaing的提示文字
|
|
4644
4663
|
progressPercent: "",
|
|
4664
|
+
// 上传进度
|
|
4645
4665
|
currentIndex: 0,
|
|
4646
4666
|
loading: false,
|
|
4667
|
+
// 是否提交中
|
|
4647
4668
|
viewStatus: false,
|
|
4669
|
+
// todo: 改名
|
|
4648
4670
|
linkStatus: false,
|
|
4671
|
+
// todo: 改名
|
|
4649
4672
|
styleStatus: {
|
|
4650
4673
|
bold: false,
|
|
4651
4674
|
italic: false,
|
|
@@ -4669,6 +4692,7 @@ const _sfc_main = {
|
|
|
4669
4692
|
targetMove: "",
|
|
4670
4693
|
moverClasses: ["halo-img-content", "halo-video-content"],
|
|
4671
4694
|
selectDom: null
|
|
4695
|
+
//选中的dom
|
|
4672
4696
|
};
|
|
4673
4697
|
},
|
|
4674
4698
|
computed: {
|
|
@@ -4685,12 +4709,12 @@ const _sfc_main = {
|
|
|
4685
4709
|
watch: {
|
|
4686
4710
|
progressPercent(val) {
|
|
4687
4711
|
const inner = document.querySelector(".video-progress .inner");
|
|
4688
|
-
console.log(val, "
|
|
4712
|
+
console.log(val, "视频上传进度");
|
|
4689
4713
|
if (inner) {
|
|
4690
4714
|
inner.style.width = val + "%";
|
|
4691
4715
|
if (val === 100) {
|
|
4692
4716
|
document.querySelector(".video-progress").innerHTML = `
|
|
4693
|
-
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;"
|
|
4717
|
+
<div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
|
|
4694
4718
|
`;
|
|
4695
4719
|
}
|
|
4696
4720
|
}
|
|
@@ -4719,7 +4743,7 @@ const _sfc_main = {
|
|
|
4719
4743
|
me2.editorDom = document.getElementById("editor-content");
|
|
4720
4744
|
me2.editorDom.addEventListener("blur", this.canSetAlign);
|
|
4721
4745
|
if (!window.Squire) {
|
|
4722
|
-
import("./squire-raw.
|
|
4746
|
+
import("./squire-raw-97946106.js").then(function() {
|
|
4723
4747
|
me2.initSquire();
|
|
4724
4748
|
});
|
|
4725
4749
|
} else {
|
|
@@ -4780,10 +4804,10 @@ const _sfc_main = {
|
|
|
4780
4804
|
this.visibleVideo = false;
|
|
4781
4805
|
const fileName = (files[0] && files[0].name || "").toLowerCase();
|
|
4782
4806
|
if (files[0].size > 1 * 1024 * 1024 * 1024) {
|
|
4783
|
-
return me2.setToast("
|
|
4807
|
+
return me2.setToast("视频大小不能超过1GB");
|
|
4784
4808
|
}
|
|
4785
4809
|
if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
|
|
4786
|
-
return me2.setToast("
|
|
4810
|
+
return me2.setToast("视频格式不是mp4或mov");
|
|
4787
4811
|
}
|
|
4788
4812
|
const me2 = this;
|
|
4789
4813
|
if (me2.loading)
|
|
@@ -4803,7 +4827,9 @@ const _sfc_main = {
|
|
|
4803
4827
|
id: result.videoId,
|
|
4804
4828
|
desc: "",
|
|
4805
4829
|
vodSize: result.vodSize || "",
|
|
4830
|
+
// 视频大小
|
|
4806
4831
|
vodType: result.vodType || ""
|
|
4832
|
+
// 图片尺寸
|
|
4807
4833
|
};
|
|
4808
4834
|
me2.$emit("updateAddVideo", true);
|
|
4809
4835
|
me2.editor["insertVideo"](result.videoUrl, video);
|
|
@@ -4857,11 +4883,11 @@ const _sfc_main = {
|
|
|
4857
4883
|
},
|
|
4858
4884
|
insertLink() {
|
|
4859
4885
|
if (!this.linkForm.linkAddress)
|
|
4860
|
-
return ElMessage.error("
|
|
4886
|
+
return ElMessage.error("请输入链接地址");
|
|
4861
4887
|
if (!this.linkForm.linkWriting)
|
|
4862
|
-
return ElMessage.error("
|
|
4888
|
+
return ElMessage.error("请输入链接文案");
|
|
4863
4889
|
if (!this.validUrl(this.linkForm.linkAddress)) {
|
|
4864
|
-
return this.setToast("URL
|
|
4890
|
+
return this.setToast("URL无效");
|
|
4865
4891
|
}
|
|
4866
4892
|
this.editor.insertLink(
|
|
4867
4893
|
this.linkForm.linkAddress,
|
|
@@ -4870,6 +4896,7 @@ const _sfc_main = {
|
|
|
4870
4896
|
this.updateData(true);
|
|
4871
4897
|
this.viewLinkDialog = false;
|
|
4872
4898
|
},
|
|
4899
|
+
// mark MDD-TOPIC
|
|
4873
4900
|
updateTopicPosition() {
|
|
4874
4901
|
const paragraphList = document.querySelectorAll("#editor-content .halo-paragraph") || [];
|
|
4875
4902
|
Array.from(paragraphList).forEach((paragraph) => {
|
|
@@ -4985,7 +5012,7 @@ const _sfc_main = {
|
|
|
4985
5012
|
this.initData();
|
|
4986
5013
|
},
|
|
4987
5014
|
async parseHtml(html, essayPicRelVOList) {
|
|
4988
|
-
var _a, _b;
|
|
5015
|
+
var _a, _b, _c, _d;
|
|
4989
5016
|
const div = document.createElement("div");
|
|
4990
5017
|
div.innerHTML = html;
|
|
4991
5018
|
const frag = document.createDocumentFragment();
|
|
@@ -4998,8 +5025,8 @@ const _sfc_main = {
|
|
|
4998
5025
|
await this.parseArticle(node);
|
|
4999
5026
|
} else if (node.tagName.toLowerCase() === "halo-good") {
|
|
5000
5027
|
this.parseGood(node);
|
|
5001
|
-
} else if (node.classList.contains("halo-img-content")) {
|
|
5002
|
-
const img = node.querySelector("img");
|
|
5028
|
+
} else if (node.classList.contains("halo-img-content") || node.classList.contains("halo-modify-content")) {
|
|
5029
|
+
const img = node.querySelector("img") || node.querySelector("modify");
|
|
5003
5030
|
node.setAttribute("tabindex", -1);
|
|
5004
5031
|
node.setAttribute("draggable", true);
|
|
5005
5032
|
node.setAttribute("contenteditable", false);
|
|
@@ -5008,12 +5035,14 @@ const _sfc_main = {
|
|
|
5008
5035
|
const desc = img.dataset.desc;
|
|
5009
5036
|
img.style.margin = "0";
|
|
5010
5037
|
const seamlessFlag = ((_a = JSON.parse(img.getAttribute("data"))) == null ? void 0 : _a.seamlessFlag) || "0";
|
|
5038
|
+
const paintCopyable = ((_b = JSON.parse(img.getAttribute("data"))) == null ? void 0 : _b.paintCopyable) || "0";
|
|
5039
|
+
const id = ((_c = JSON.parse(img.getAttribute("data"))) == null ? void 0 : _c.id) || "";
|
|
5011
5040
|
if (essayPicRelVOList) {
|
|
5012
5041
|
const arr = img.src.split("/");
|
|
5013
|
-
const
|
|
5014
|
-
let url = (
|
|
5015
|
-
(obj) => obj.id === String(
|
|
5016
|
-
)) == null ? void 0 :
|
|
5042
|
+
const id2 = arr[arr.length - 1];
|
|
5043
|
+
let url = (_d = essayPicRelVOList.find(
|
|
5044
|
+
(obj) => obj.id === String(id2)
|
|
5045
|
+
)) == null ? void 0 : _d.url;
|
|
5017
5046
|
if (url) {
|
|
5018
5047
|
img.src = url;
|
|
5019
5048
|
}
|
|
@@ -5022,7 +5051,9 @@ const _sfc_main = {
|
|
|
5022
5051
|
this.editor,
|
|
5023
5052
|
{
|
|
5024
5053
|
content: desc,
|
|
5025
|
-
seamlessFlag
|
|
5054
|
+
seamlessFlag,
|
|
5055
|
+
paintCopyable,
|
|
5056
|
+
id
|
|
5026
5057
|
},
|
|
5027
5058
|
nodes.length === i
|
|
5028
5059
|
).forEach((child) => {
|
|
@@ -5336,7 +5367,7 @@ const _sfc_main = {
|
|
|
5336
5367
|
}
|
|
5337
5368
|
this.updateData(true);
|
|
5338
5369
|
} else {
|
|
5339
|
-
this.setToast(rst.origin.name + "
|
|
5370
|
+
this.setToast(rst.origin.name + "上传失败,请重试");
|
|
5340
5371
|
}
|
|
5341
5372
|
},
|
|
5342
5373
|
insertVideoBtns(editor, node) {
|
|
@@ -5351,7 +5382,7 @@ const _sfc_main = {
|
|
|
5351
5382
|
me2.currentVideo = node;
|
|
5352
5383
|
e.stopPropagation();
|
|
5353
5384
|
};
|
|
5354
|
-
replaceBtn.innerText = "
|
|
5385
|
+
replaceBtn.innerText = "更换封面";
|
|
5355
5386
|
return replaceBtn;
|
|
5356
5387
|
},
|
|
5357
5388
|
insertImgOperateBtns(editor, data) {
|
|
@@ -5378,7 +5409,7 @@ const _sfc_main = {
|
|
|
5378
5409
|
maxlength: "50",
|
|
5379
5410
|
rows: "2",
|
|
5380
5411
|
cols: "50",
|
|
5381
|
-
placeholder: "
|
|
5412
|
+
placeholder: "请输入图片描述(最多50字)",
|
|
5382
5413
|
contenteditable: "false"
|
|
5383
5414
|
});
|
|
5384
5415
|
descInput.disabled = me2.disabled;
|
|
@@ -5387,7 +5418,7 @@ const _sfc_main = {
|
|
|
5387
5418
|
const img = parent.querySelector(".halo-picture-area");
|
|
5388
5419
|
img.dataset.desc = e.target.value;
|
|
5389
5420
|
if (e.target.value.length > 49) {
|
|
5390
|
-
return me2.setToast("
|
|
5421
|
+
return me2.setToast("限制50个字符");
|
|
5391
5422
|
}
|
|
5392
5423
|
};
|
|
5393
5424
|
descInput.value = data.content || "";
|
|
@@ -5437,7 +5468,7 @@ const _sfc_main = {
|
|
|
5437
5468
|
me2.removeParentByClass(e.target, "halo-img-content");
|
|
5438
5469
|
me2.updateData(true);
|
|
5439
5470
|
};
|
|
5440
|
-
replaceBtn.innerHTML = "
|
|
5471
|
+
replaceBtn.innerHTML = "替换";
|
|
5441
5472
|
return [replaceBtn, delBtn, descInputWrap];
|
|
5442
5473
|
},
|
|
5443
5474
|
removeSeamlessLaster(e) {
|
|
@@ -5461,6 +5492,7 @@ const _sfc_main = {
|
|
|
5461
5492
|
}
|
|
5462
5493
|
}
|
|
5463
5494
|
},
|
|
5495
|
+
// 初始化编辑器数据 displayData
|
|
5464
5496
|
initData(data = "", essayPicRelVOList) {
|
|
5465
5497
|
this.parseHtml(data, essayPicRelVOList).then((res) => {
|
|
5466
5498
|
this.editorDom.innerHTML = "";
|
|
@@ -5468,6 +5500,7 @@ const _sfc_main = {
|
|
|
5468
5500
|
this.updateData();
|
|
5469
5501
|
});
|
|
5470
5502
|
},
|
|
5503
|
+
// 设置富文本组件
|
|
5471
5504
|
initSquire() {
|
|
5472
5505
|
const me2 = this;
|
|
5473
5506
|
const editorDom = me2.editorDom;
|
|
@@ -5715,6 +5748,7 @@ const _sfc_main = {
|
|
|
5715
5748
|
window.Squire.empty(block)
|
|
5716
5749
|
]);
|
|
5717
5750
|
output.appendChild(
|
|
5751
|
+
// 段落才能添加标题
|
|
5718
5752
|
Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
|
|
5719
5753
|
);
|
|
5720
5754
|
}
|
|
@@ -5738,18 +5772,18 @@ const _sfc_main = {
|
|
|
5738
5772
|
});
|
|
5739
5773
|
loading.innerHTML = `
|
|
5740
5774
|
<img class="img-loading-icon" src="/img/upload-image-loading.png"/>
|
|
5741
|
-
<span class="img-loading-tip"
|
|
5775
|
+
<span class="img-loading-tip">上传中...</span>
|
|
5742
5776
|
`;
|
|
5743
5777
|
var fail = this.createElement("div", {
|
|
5744
5778
|
class: "img-fail hide",
|
|
5745
5779
|
contenteditable: "false"
|
|
5746
5780
|
});
|
|
5747
|
-
fail.innerHTML = "
|
|
5781
|
+
fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
|
|
5748
5782
|
var again = this.createElement("button", {
|
|
5749
5783
|
class: "img-again hide",
|
|
5750
5784
|
contenteditable: "false"
|
|
5751
5785
|
});
|
|
5752
|
-
again.innerHTML = "
|
|
5786
|
+
again.innerHTML = "重新上传";
|
|
5753
5787
|
const isGif = src && src.indexOf(".gif") > -1;
|
|
5754
5788
|
if (isGif) {
|
|
5755
5789
|
src = src.replace(".gif", ".gif!nowater");
|
|
@@ -5804,7 +5838,7 @@ const _sfc_main = {
|
|
|
5804
5838
|
});
|
|
5805
5839
|
div.innerHTML = `
|
|
5806
5840
|
<div class="video-progress">
|
|
5807
|
-
<div class="label"
|
|
5841
|
+
<div class="label">上传中...</div>
|
|
5808
5842
|
<div class="box">
|
|
5809
5843
|
<div class="inner" style="width:20%"></div>
|
|
5810
5844
|
</div>
|
|
@@ -5827,6 +5861,7 @@ const _sfc_main = {
|
|
|
5827
5861
|
data: JSON.stringify(data),
|
|
5828
5862
|
"data-content": data.content || "",
|
|
5829
5863
|
poster: data.img || ""
|
|
5864
|
+
// 'contenteditable': 'true',
|
|
5830
5865
|
});
|
|
5831
5866
|
var delBtn = me2.genIconDom({
|
|
5832
5867
|
class: "pointer video-delete icon",
|
|
@@ -5885,6 +5920,7 @@ const _sfc_main = {
|
|
|
5885
5920
|
}
|
|
5886
5921
|
};
|
|
5887
5922
|
},
|
|
5923
|
+
// 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
|
|
5888
5924
|
setListener(dom) {
|
|
5889
5925
|
const me2 = this;
|
|
5890
5926
|
const doms = dom ? [dom] : Array.from(this.editorDom.children);
|
|
@@ -5895,7 +5931,7 @@ const _sfc_main = {
|
|
|
5895
5931
|
p.onclick = function(e) {
|
|
5896
5932
|
var _a;
|
|
5897
5933
|
if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
|
|
5898
|
-
me2.setToast("
|
|
5934
|
+
me2.setToast("不支持播放");
|
|
5899
5935
|
}
|
|
5900
5936
|
if (e.target.className.includes("desc-input")) {
|
|
5901
5937
|
return;
|
|
@@ -5959,6 +5995,7 @@ const _sfc_main = {
|
|
|
5959
5995
|
};
|
|
5960
5996
|
return del;
|
|
5961
5997
|
},
|
|
5998
|
+
// 转换数据,返回给业务
|
|
5962
5999
|
getEditorData() {
|
|
5963
6000
|
const me2 = this;
|
|
5964
6001
|
const children = Array.from(me2.editorDom.children);
|
|
@@ -6016,9 +6053,11 @@ const _sfc_main = {
|
|
|
6016
6053
|
videoIds
|
|
6017
6054
|
};
|
|
6018
6055
|
},
|
|
6056
|
+
// 是否是摩托范的图片
|
|
6019
6057
|
isHaloImage(url = "") {
|
|
6020
6058
|
return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1;
|
|
6021
6059
|
},
|
|
6060
|
+
// 获取待上传图片列表
|
|
6022
6061
|
updateUploads() {
|
|
6023
6062
|
const me2 = this;
|
|
6024
6063
|
setTimeout(() => {
|
|
@@ -6065,8 +6104,8 @@ const _sfc_main = {
|
|
|
6065
6104
|
const currentImg = me2.uploadStore[key];
|
|
6066
6105
|
const imageUrl = key.split("|")[1] || "";
|
|
6067
6106
|
if (!currentImg) {
|
|
6068
|
-
console.log("
|
|
6069
|
-
return Promise.reject("
|
|
6107
|
+
console.log("图片不存在", key);
|
|
6108
|
+
return Promise.reject("图片不存在");
|
|
6070
6109
|
}
|
|
6071
6110
|
const parent = currentImg.parentNode || "";
|
|
6072
6111
|
const uploadFailHandler = (currentImg2) => {
|
|
@@ -6110,6 +6149,7 @@ const _sfc_main = {
|
|
|
6110
6149
|
parent && uploadFailHandler(currentImg);
|
|
6111
6150
|
});
|
|
6112
6151
|
},
|
|
6152
|
+
// 更新上传的图片
|
|
6113
6153
|
updateImage(img, currentImg = {}) {
|
|
6114
6154
|
const data = JSON.parse(currentImg.getAttribute("data") || "{}");
|
|
6115
6155
|
data.img = img;
|
|
@@ -6132,6 +6172,7 @@ const _sfc_main = {
|
|
|
6132
6172
|
parent.appendChild(arr[2]);
|
|
6133
6173
|
}
|
|
6134
6174
|
},
|
|
6175
|
+
// 获取ctrl + v 后内容
|
|
6135
6176
|
getSticker(type, handler) {
|
|
6136
6177
|
this.setSticker(type.fragment.children);
|
|
6137
6178
|
},
|
|
@@ -6149,6 +6190,7 @@ const _sfc_main = {
|
|
|
6149
6190
|
});
|
|
6150
6191
|
this.updateData(true);
|
|
6151
6192
|
},
|
|
6193
|
+
// 粘贴
|
|
6152
6194
|
setSticker(data) {
|
|
6153
6195
|
const me2 = this;
|
|
6154
6196
|
data = Array.from(data);
|
|
@@ -6187,6 +6229,7 @@ const _sfc_main = {
|
|
|
6187
6229
|
const me2 = this;
|
|
6188
6230
|
me2.updateData();
|
|
6189
6231
|
},
|
|
6232
|
+
// 监测 添加、撤回、恢复、删除
|
|
6190
6233
|
setBack(e, type) {
|
|
6191
6234
|
const me2 = this;
|
|
6192
6235
|
me2.refreshImg();
|
|
@@ -6219,6 +6262,7 @@ const _sfc_main = {
|
|
|
6219
6262
|
}
|
|
6220
6263
|
});
|
|
6221
6264
|
},
|
|
6265
|
+
// 设置scoll
|
|
6222
6266
|
sticky() {
|
|
6223
6267
|
const me2 = this;
|
|
6224
6268
|
me2.$nextTick(function() {
|
|
@@ -6238,6 +6282,8 @@ const _sfc_main = {
|
|
|
6238
6282
|
document.addEventListener("scroll", onScroll);
|
|
6239
6283
|
});
|
|
6240
6284
|
},
|
|
6285
|
+
// ==========toolbox==========
|
|
6286
|
+
// 撤回、恢复、段落标题
|
|
6241
6287
|
setContent(e, obj) {
|
|
6242
6288
|
const me2 = this;
|
|
6243
6289
|
const id = e.target.id || e.target.dataset.editorId;
|
|
@@ -6279,10 +6325,11 @@ const _sfc_main = {
|
|
|
6279
6325
|
this.fontInfo = this.editor.getFontInfo();
|
|
6280
6326
|
this.updateData(true);
|
|
6281
6327
|
},
|
|
6328
|
+
// 增加link
|
|
6282
6329
|
addLink(type) {
|
|
6283
6330
|
const me2 = this;
|
|
6284
|
-
me2.linkTitleName = type === "link" ? "
|
|
6285
|
-
me2.linkPlaceholder = type === "link" ? "
|
|
6331
|
+
me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
|
|
6332
|
+
me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
|
|
6286
6333
|
me2.viewStatus = true;
|
|
6287
6334
|
me2.linkStatus = true;
|
|
6288
6335
|
},
|
|
@@ -6290,29 +6337,31 @@ const _sfc_main = {
|
|
|
6290
6337
|
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.,;?'&%$#=~_-]+))*$/;
|
|
6291
6338
|
return objExp.test(url);
|
|
6292
6339
|
},
|
|
6340
|
+
// 确认增加link
|
|
6293
6341
|
confirmLink() {
|
|
6294
6342
|
const me2 = this;
|
|
6295
6343
|
if (!me2.linkContent) {
|
|
6296
|
-
return ElMessage.error("
|
|
6344
|
+
return ElMessage.error("请输入链接地址!");
|
|
6297
6345
|
}
|
|
6298
|
-
if (me2.linkTitleName === "
|
|
6346
|
+
if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
|
|
6299
6347
|
this.visibleCollectArticle = false;
|
|
6300
6348
|
return me2.importLinkData();
|
|
6301
6349
|
}
|
|
6302
6350
|
if (!this.validUrl(me2.linkContent)) {
|
|
6303
|
-
return me2.setToast("URL
|
|
6351
|
+
return me2.setToast("URL无效");
|
|
6304
6352
|
}
|
|
6305
6353
|
if (!me2.isHaloImage(me2.linkContent)) {
|
|
6306
|
-
return me2.setToast("
|
|
6354
|
+
return me2.setToast("请输入摩托范内部网址");
|
|
6307
6355
|
}
|
|
6308
6356
|
me2.editor["insertLink"](me2.linkContent);
|
|
6309
6357
|
me2.linkContent = "";
|
|
6310
6358
|
me2.closeDialog();
|
|
6311
6359
|
},
|
|
6360
|
+
// 增加link导入数据
|
|
6312
6361
|
importLinkData() {
|
|
6313
6362
|
const me2 = this;
|
|
6314
6363
|
if (me2.loading) {
|
|
6315
|
-
return ElMessage("
|
|
6364
|
+
return ElMessage("正在获取信息,请稍后...");
|
|
6316
6365
|
}
|
|
6317
6366
|
me2.loading = true;
|
|
6318
6367
|
const params = {
|
|
@@ -6334,34 +6383,38 @@ const _sfc_main = {
|
|
|
6334
6383
|
me2.linkContent = "";
|
|
6335
6384
|
return;
|
|
6336
6385
|
} else {
|
|
6337
|
-
me2.setToast("
|
|
6386
|
+
me2.setToast("导入失败,请重试");
|
|
6338
6387
|
}
|
|
6339
6388
|
}).catch((err) => {
|
|
6340
6389
|
console.log(err.message);
|
|
6341
|
-
me2.setToast("
|
|
6390
|
+
me2.setToast("导入异常,请重试");
|
|
6342
6391
|
}).finally((_) => {
|
|
6343
6392
|
me2.loading = false;
|
|
6344
6393
|
});
|
|
6345
6394
|
},
|
|
6395
|
+
// 打开 图片、视频、一键导入 弹框
|
|
6346
6396
|
openDialog(name) {
|
|
6347
6397
|
const me2 = this;
|
|
6348
|
-
me2.viewName = name === "img" ? "
|
|
6349
|
-
me2.viewButton = name === "img" ? "
|
|
6350
|
-
me2.viewTip = name === "img" ? "" : "
|
|
6398
|
+
me2.viewName = name === "img" ? "添加图片" : "添加视频";
|
|
6399
|
+
me2.viewButton = name === "img" ? "选择图片" : "选择视频";
|
|
6400
|
+
me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
|
|
6351
6401
|
me2.viewStatus = true;
|
|
6352
6402
|
},
|
|
6403
|
+
// 关闭弹框
|
|
6353
6404
|
closeDialog() {
|
|
6354
6405
|
this.viewStatus = false;
|
|
6355
6406
|
this.linkStatus = false;
|
|
6356
6407
|
this.linkContent = "";
|
|
6357
6408
|
},
|
|
6409
|
+
// ==========toolbox end==========
|
|
6410
|
+
// 弹框提示
|
|
6358
6411
|
setToast(content) {
|
|
6359
6412
|
ElMessage.error(content);
|
|
6360
6413
|
},
|
|
6361
6414
|
setMessageBoxNoCancel(content) {
|
|
6362
6415
|
ElMessageBox.confirm(content, "", {
|
|
6363
|
-
confirmButtonText: "
|
|
6364
|
-
cancelButtonText: "
|
|
6416
|
+
confirmButtonText: "确定",
|
|
6417
|
+
cancelButtonText: "取消",
|
|
6365
6418
|
type: "warning"
|
|
6366
6419
|
}).then(() => {
|
|
6367
6420
|
}).catch(() => {
|
|
@@ -6378,8 +6431,6 @@ const _hoisted_3 = {
|
|
|
6378
6431
|
slot: "footer",
|
|
6379
6432
|
class: "dialog-footer"
|
|
6380
6433
|
};
|
|
6381
|
-
const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u53D6 \u6D88");
|
|
6382
|
-
const _hoisted_5 = /* @__PURE__ */ createTextVNode("\u786E \u5B9A");
|
|
6383
6434
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6384
6435
|
const _component_el_input = resolveComponent("el-input");
|
|
6385
6436
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
@@ -6394,7 +6445,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6394
6445
|
withDirectives(createElementVNode("div", {
|
|
6395
6446
|
style: normalizeStyle({ textAlign: $options.align }),
|
|
6396
6447
|
class: "placeholder"
|
|
6397
|
-
}, "
|
|
6448
|
+
}, " 请输入正文 ", 4), [
|
|
6398
6449
|
[vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
|
|
6399
6450
|
]),
|
|
6400
6451
|
$data.overLine ? (openBlock(), createElementBlock("div", {
|
|
@@ -6419,26 +6470,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6419
6470
|
createVNode(_component_el_form, { model: $data.linkForm }, {
|
|
6420
6471
|
default: withCtx(() => [
|
|
6421
6472
|
createVNode(_component_el_form_item, {
|
|
6422
|
-
label: "
|
|
6473
|
+
label: "添加链接",
|
|
6423
6474
|
class: "link-title"
|
|
6424
6475
|
}, {
|
|
6425
6476
|
default: withCtx(() => [
|
|
6426
6477
|
createVNode(_component_el_input, {
|
|
6427
6478
|
modelValue: $data.linkForm.linkAddress,
|
|
6428
6479
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
|
|
6429
|
-
placeholder: "
|
|
6480
|
+
placeholder: "请输入链接地址"
|
|
6430
6481
|
}, null, 8, ["modelValue"])
|
|
6431
6482
|
]),
|
|
6432
6483
|
_: 1
|
|
6433
6484
|
}),
|
|
6434
|
-
createVNode(_component_el_form_item, { label: "
|
|
6485
|
+
createVNode(_component_el_form_item, { label: "链接文案" }, {
|
|
6435
6486
|
default: withCtx(() => [
|
|
6436
6487
|
createVNode(_component_el_input, {
|
|
6437
6488
|
modelValue: $data.linkForm.linkWriting,
|
|
6438
6489
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
|
|
6439
6490
|
type: "textarea",
|
|
6440
6491
|
autosize: "",
|
|
6441
|
-
placeholder: "
|
|
6492
|
+
placeholder: "请输入链接文案"
|
|
6442
6493
|
}, null, 8, ["modelValue"])
|
|
6443
6494
|
]),
|
|
6444
6495
|
_: 1
|
|
@@ -6451,18 +6502,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6451
6502
|
createVNode(_component_el_button, {
|
|
6452
6503
|
onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
|
|
6453
6504
|
}, {
|
|
6454
|
-
default: withCtx(() => [
|
|
6455
|
-
|
|
6456
|
-
]),
|
|
6505
|
+
default: withCtx(() => _cache[14] || (_cache[14] = [
|
|
6506
|
+
createTextVNode("取 消")
|
|
6507
|
+
])),
|
|
6457
6508
|
_: 1
|
|
6458
6509
|
}),
|
|
6459
6510
|
createVNode(_component_el_button, {
|
|
6460
6511
|
type: "primary",
|
|
6461
6512
|
onClick: $options.insertLink
|
|
6462
6513
|
}, {
|
|
6463
|
-
default: withCtx(() => [
|
|
6464
|
-
|
|
6465
|
-
]),
|
|
6514
|
+
default: withCtx(() => _cache[15] || (_cache[15] = [
|
|
6515
|
+
createTextVNode("确 定")
|
|
6516
|
+
])),
|
|
6466
6517
|
_: 1
|
|
6467
6518
|
}, 8, ["onClick"])
|
|
6468
6519
|
])
|
|
@@ -6479,7 +6530,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6479
6530
|
}, null, 8, ["article", "visible", "getList", "onDelete", "onChange"]),
|
|
6480
6531
|
createVNode(_component_ImgUpload, {
|
|
6481
6532
|
"img-list": $data.imgList,
|
|
6482
|
-
"onUpdate:
|
|
6533
|
+
"onUpdate:imgList": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
|
|
6483
6534
|
visible: $data.visibleImg,
|
|
6484
6535
|
"onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
|
|
6485
6536
|
chartGallery: $props.chartGallery,
|
|
@@ -6494,7 +6545,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6494
6545
|
}, null, 8, ["visible", "file-selected"]),
|
|
6495
6546
|
createVNode(_component_CollectArticle, {
|
|
6496
6547
|
"link-content": $data.linkContent,
|
|
6497
|
-
"onUpdate:
|
|
6548
|
+
"onUpdate:linkContent": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
|
|
6498
6549
|
visible: $data.visibleCollectArticle,
|
|
6499
6550
|
"onUpdate:visible": _cache[10] || (_cache[10] = ($event) => $data.visibleCollectArticle = $event),
|
|
6500
6551
|
onSubmit: $options.confirmLink
|