@haluo/biz 2.0.44 → 2.0.46

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 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, "\u4E3B\u9898\u989C\u8272", -1)), Ee = { class: "tColor" }, Pe = ["onMouseover", "onClick"], Me = { class: "bColor" }, Ae = ["onMouseover", "onClick"], $e = /* @__PURE__ */ J(() => /* @__PURE__ */ createElementVNode("h3", null, "\u6807\u51C6\u989C\u8272", -1)), Te = { class: "tColor" }, Be = ["onMouseover", "onClick"], Ve = {
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(" \u989C\u8272\u663E\u793A\u5C0F\u65B9\u5757 "),
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(" \u989C\u8272\u8272\u76D8 "),
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
- }, "\u9ED8\u8BA4\u989C\u8272", 32)
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 }, "\u66F4\u591A\u989C\u8272..."),
278
- createCommentVNode(" \u7528\u4EE5\u6FC0\u6D3BHTML5\u989C\u8272\u9762\u677F "),
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 ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
311
+ const ToolBar_vue_vue_type_style_index_0_scoped_50235bb8_lang = "";
313
312
  const ToolBar_vue_vue_type_style_index_1_lang = "";
314
313
  const _export_sfc = (sfc, props) => {
315
314
  const target = sfc.__vccOpts || sfc;
@@ -339,15 +338,15 @@ const _sfc_main$8 = {
339
338
  activeImgType: false,
340
339
  activeAlign: "",
341
340
  alignMethods: [
342
- { value: "left", name: "\u5DE6\u5BF9\u9F50" },
343
- { value: "right", name: "\u53F3\u5BF9\u9F50" },
344
- { value: "center", name: "\u5C45\u4E2D\u5BF9\u9F50" },
345
- { value: "justify", name: "\u4E24\u7AEF\u5BF9\u9F50" }
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: "\u9ED8\u8BA4\u6B63\u6587\u5B57\u53F7" },
350
- { value: "18px", name: "18", desc: "\u9ED8\u8BA4\u6807\u9898\u5B57\u53F7" },
348
+ { value: "17px", name: "17", desc: "默认正文字号" },
349
+ { value: "18px", name: "18", desc: "默认标题字号" },
351
350
  { value: "19px", name: "19" },
352
351
  { value: "20px", name: "20" },
353
352
  { value: "24px", name: "24" },
@@ -428,7 +427,7 @@ const _sfc_main$8 = {
428
427
  this.editor.clearFormat();
429
428
  },
430
429
  setColor(val) {
431
- console.log("\u6587\u5B57\u989C\u8272");
430
+ console.log("文字颜色");
432
431
  this.updatePosition(() => {
433
432
  this.editor.setColor(val);
434
433
  });
@@ -487,6 +486,7 @@ const _sfc_main$8 = {
487
486
  this.popoverVisibleList = false;
488
487
  this.popoverVisibleImg = false;
489
488
  },
489
+ // todo 富文本设置样式位置会回到顶部
490
490
  updatePosition(fn) {
491
491
  const scrollTop = document.documentElement.scrollTop;
492
492
  fn && fn();
@@ -523,11 +523,11 @@ const _hoisted_1$8 = {
523
523
  key: 0,
524
524
  class: "tools"
525
525
  };
526
- const _hoisted_2$7 = { class: "tools-content" };
527
- const _hoisted_3$7 = ["src"];
528
- const _hoisted_4$6 = ["src"];
529
- const _hoisted_5$5 = ["src"];
530
- const _hoisted_6$3 = { class: "box" };
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$2 = { style: { "font-size": "10px" } };
541
- const _hoisted_14$2 = { class: "box" };
542
- const _hoisted_15$2 = ["src"];
543
- const _hoisted_16$2 = {
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$1 = { class: "box" };
570
- const _hoisted_31$1 = ["src"];
571
- const _hoisted_32$1 = ["src"];
572
- const _hoisted_33$1 = ["src"];
573
- const _hoisted_34$1 = ["src"];
574
- const _hoisted_35$1 = { class: "tools-title" };
569
+ const _hoisted_30 = { class: "box" };
570
+ const _hoisted_31 = ["src"];
571
+ const _hoisted_32 = ["src"];
572
+ const _hoisted_33 = ["src"];
573
+ const _hoisted_34 = ["src"];
574
+ const _hoisted_35 = { class: "tools-title" };
575
575
  const _hoisted_36 = ["src"];
576
576
  const _hoisted_37 = ["src"];
577
577
  const _hoisted_38 = { class: "tools-title_content" };
@@ -592,11 +592,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
592
592
  const _component_colorPicker = resolveComponent("colorPicker");
593
593
  const _directive_click_outside = resolveDirective("click-outside");
594
594
  return $props.editor.fontInfo ? (openBlock(), createElementBlock("div", _hoisted_1$8, [
595
- createElementVNode("div", _hoisted_2$7, [
595
+ createElementVNode("div", _hoisted_2$5, [
596
596
  createVNode(_component_el_tooltip, {
597
597
  class: "item",
598
598
  effect: "dark",
599
- content: "\u64A4\u56DE",
599
+ content: "撤回",
600
600
  placement: "top"
601
601
  }, {
602
602
  default: withCtx(() => [
@@ -608,14 +608,14 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
608
608
  height: "40",
609
609
  alt: "",
610
610
  onClick: _cache[0] || (_cache[0] = ($event) => $options.back($event))
611
- }, null, 12, _hoisted_3$7)
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: "\u53CD\u64A4\u56DE",
618
+ content: "反撤回",
619
619
  placement: "top"
620
620
  }, {
621
621
  default: withCtx(() => [
@@ -627,7 +627,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
627
627
  height: "40",
628
628
  alt: "",
629
629
  onClick: _cache[1] || (_cache[1] = ($event) => $options.forward($event))
630
- }, null, 12, _hoisted_4$6)
630
+ }, null, 12, _hoisted_4$3)
631
631
  ]),
632
632
  _: 1
633
633
  }),
@@ -638,7 +638,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
638
638
  createVNode(_component_el_tooltip, {
639
639
  class: "item",
640
640
  effect: "dark",
641
- content: "\u6E05\u9664\u683C\u5F0F",
641
+ content: "清除格式",
642
642
  placement: "top"
643
643
  }, {
644
644
  default: withCtx(() => [
@@ -648,18 +648,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
648
648
  height: "40",
649
649
  alt: "",
650
650
  onClick: _cache[2] || (_cache[2] = (...args) => $options.clearFormat && $options.clearFormat(...args))
651
- }, null, 8, _hoisted_5$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: "\u683C\u5F0F\u5237",
658
+ content: "格式刷",
659
659
  placement: "top"
660
660
  }, {
661
661
  default: withCtx(() => [
662
- createElementVNode("div", _hoisted_6$3, [
662
+ createElementVNode("div", _hoisted_6$2, [
663
663
  createElementVNode("img", {
664
664
  src: $options.getImageUrl("tools_refresh@3x.png"),
665
665
  width: "40",
@@ -686,7 +686,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
686
686
  createVNode(_component_el_tooltip, {
687
687
  class: "item",
688
688
  effect: "dark",
689
- content: "\u5B57\u53F7",
689
+ content: "字号",
690
690
  placement: "top"
691
691
  }, {
692
692
  default: withCtx(() => [
@@ -720,7 +720,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
720
720
  createElementVNode("span", {
721
721
  style: normalizeStyle({ fontSize: item.value })
722
722
  }, toDisplayString(item.name), 5),
723
- createElementVNode("span", _hoisted_13$2, toDisplayString(item.desc), 1)
723
+ createElementVNode("span", _hoisted_13$1, toDisplayString(item.desc), 1)
724
724
  ], 10, _hoisted_12$2);
725
725
  }), 128))
726
726
  ])), [
@@ -736,11 +736,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
736
736
  createVNode(_component_el_tooltip, {
737
737
  class: "item",
738
738
  effect: "dark",
739
- content: "\u6807\u9898",
739
+ content: "标题",
740
740
  placement: "top"
741
741
  }, {
742
742
  default: withCtx(() => [
743
- createElementVNode("div", _hoisted_14$2, [
743
+ createElementVNode("div", _hoisted_14$1, [
744
744
  createElementVNode("img", {
745
745
  src: $options.getImageUrl("tools_title@3x.png"),
746
746
  "data-editor-id": "makeHeader",
@@ -748,8 +748,8 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
748
748
  height: "40",
749
749
  alt: "",
750
750
  onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
751
- }, null, 8, _hoisted_15$2),
752
- $data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$2)) : createCommentVNode("", true)
751
+ }, null, 8, _hoisted_15$1),
752
+ $data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$1)) : createCommentVNode("", true)
753
753
  ])
754
754
  ]),
755
755
  _: 1
@@ -757,7 +757,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
757
757
  createVNode(_component_el_tooltip, {
758
758
  class: "item",
759
759
  effect: "dark",
760
- content: "\u52A0\u7C97",
760
+ content: "加粗",
761
761
  placement: "top"
762
762
  }, {
763
763
  default: withCtx(() => [
@@ -785,7 +785,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
785
785
  createVNode(_component_el_tooltip, {
786
786
  class: "item",
787
787
  effect: "dark",
788
- content: "\u5217\u8868",
788
+ content: "列表",
789
789
  placement: "top"
790
790
  }, {
791
791
  default: withCtx(() => [
@@ -819,13 +819,13 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
819
819
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
820
820
  $options.setStyle("makeUnorderedList");
821
821
  }))
822
- }, "\u65E0\u5E8F\u5217\u8868"),
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
- }, "\u6709\u5E8F\u5217\u8868")
828
+ }, "有序列表")
829
829
  ])), [
830
830
  [_directive_click_outside, $options.handlePopover]
831
831
  ])
@@ -836,7 +836,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
836
836
  createVNode(_component_el_tooltip, {
837
837
  class: "item",
838
838
  effect: "dark",
839
- content: "\u503E\u659C",
839
+ content: "倾斜",
840
840
  placement: "top"
841
841
  }, {
842
842
  default: withCtx(() => [
@@ -856,7 +856,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
856
856
  createVNode(_component_el_tooltip, {
857
857
  class: "item",
858
858
  effect: "dark",
859
- content: "\u4E0B\u5212\u7EBF",
859
+ content: "下划线",
860
860
  placement: "top"
861
861
  }, {
862
862
  default: withCtx(() => [
@@ -877,18 +877,18 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
877
877
  key: 0,
878
878
  class: "item",
879
879
  effect: "dark",
880
- content: "\u94FE\u63A5",
880
+ content: "链接",
881
881
  placement: "top"
882
882
  }, {
883
883
  default: withCtx(() => [
884
- createElementVNode("div", _hoisted_30$1, [
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$1)
891
+ }, null, 8, _hoisted_31)
892
892
  ])
893
893
  ]),
894
894
  _: 1
@@ -896,7 +896,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
896
896
  createVNode(_component_el_tooltip, {
897
897
  class: "item",
898
898
  effect: "dark",
899
- content: "\u9996\u884C\u7F29\u8FDB",
899
+ content: "首行缩进",
900
900
  placement: "top"
901
901
  }, {
902
902
  default: withCtx(() => [
@@ -906,14 +906,14 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
906
906
  height: "40",
907
907
  alt: "",
908
908
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
909
- }, null, 8, _hoisted_32$1)
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: "\u6587\u5B57\u989C\u8272",
916
+ content: "文字颜色",
917
917
  placement: "top"
918
918
  }, {
919
919
  default: withCtx(() => [
@@ -926,13 +926,13 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
926
926
  width: "24",
927
927
  height: "40",
928
928
  alt: ""
929
- }, null, 8, _hoisted_33$1),
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$1),
935
+ }, null, 8, _hoisted_34),
936
936
  createVNode(_component_colorPicker, {
937
937
  ref: "colorPicker",
938
938
  modelValue: $data.color,
@@ -953,11 +953,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
953
953
  width: "152"
954
954
  }, {
955
955
  reference: withCtx(() => [
956
- createElementVNode("div", _hoisted_35$1, [
956
+ createElementVNode("div", _hoisted_35, [
957
957
  createVNode(_component_el_tooltip, {
958
958
  class: "item",
959
959
  effect: "dark",
960
- content: "\u5BF9\u9F50\u65B9\u5F0F",
960
+ content: "对齐方式",
961
961
  placement: "top"
962
962
  }, {
963
963
  default: withCtx(() => [
@@ -1015,7 +1015,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1015
1015
  createVNode(_component_el_tooltip, {
1016
1016
  class: "item",
1017
1017
  effect: "dark",
1018
- content: "\u63D2\u5165\u56FE\u7247",
1018
+ content: "插入图片",
1019
1019
  placement: "top"
1020
1020
  }, {
1021
1021
  default: withCtx(() => [
@@ -1037,11 +1037,11 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1037
1037
  createElementVNode("li", {
1038
1038
  class: normalizeClass([$data.activeImgType === "normal" ? "active" : ""]),
1039
1039
  onClick: _cache[18] || (_cache[18] = ($event) => $options.insertImg("normal"))
1040
- }, toDisplayString("\u4E0A\u4F20\u56FE\u7247"), 2),
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("\u4E0A\u4F20\u65E0\u7F1D\u62FC\u63A5\u56FE\u7247"), 2)
1044
+ }, toDisplayString("上传无缝拼接图片"), 2)
1045
1045
  ])), [
1046
1046
  [_directive_click_outside, $options.handlePopover]
1047
1047
  ])
@@ -1052,7 +1052,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1052
1052
  key: 2,
1053
1053
  class: "item",
1054
1054
  effect: "dark",
1055
- content: "\u63D2\u5165\u89C6\u9891",
1055
+ content: "插入视频",
1056
1056
  placement: "top"
1057
1057
  }, {
1058
1058
  default: withCtx(() => [
@@ -1070,7 +1070,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1070
1070
  key: 3,
1071
1071
  class: "item",
1072
1072
  effect: "dark",
1073
- content: "\u63D2\u5165\u6587\u7AE0/\u89C6\u9891",
1073
+ content: "插入文章/视频",
1074
1074
  placement: "top"
1075
1075
  }, {
1076
1076
  default: withCtx(() => [
@@ -1088,7 +1088,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1088
1088
  key: 4,
1089
1089
  class: "item",
1090
1090
  effect: "dark",
1091
- content: "\u91C7\u96C6\u6587\u7AE0",
1091
+ content: "采集文章",
1092
1092
  placement: "top"
1093
1093
  }, {
1094
1094
  default: withCtx(() => [
@@ -1105,20 +1105,16 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1105
1105
  ])
1106
1106
  ])) : createCommentVNode("", true);
1107
1107
  }
1108
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-24d161f2"]]);
1108
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-50235bb8"]]);
1109
1109
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
1110
- const index_vue_vue_type_style_index_0_lang$5 = "";
1111
1110
  const _hoisted_1$7 = { key: 0 };
1112
- const _hoisted_2$6 = { class: "basic-dialog_title" };
1113
- const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1114
- const _hoisted_4$5 = {
1111
+ const _hoisted_2$4 = { class: "basic-dialog_title" };
1112
+ const _hoisted_3$4 = {
1115
1113
  key: 0,
1116
1114
  class: "dialog-footer"
1117
1115
  };
1118
- const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
1119
- const _hoisted_6$2 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
1120
1116
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1121
- name: "index",
1117
+ __name: "index",
1122
1118
  props: {
1123
1119
  visible: { type: Boolean, default: false },
1124
1120
  showBtn: { type: Boolean, default: true },
@@ -1126,9 +1122,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1126
1122
  showTitle: { type: Boolean, default: true }
1127
1123
  },
1128
1124
  emits: ["submit", "cancel"],
1129
- setup(__props, { emit: emits }) {
1125
+ setup(__props, { emit: __emit }) {
1130
1126
  const props = __props;
1131
1127
  const parent = inject("vm");
1128
+ const emits = __emit;
1132
1129
  const handleClose = () => {
1133
1130
  var _a;
1134
1131
  (_a = parent.setStatus) == null ? void 0 : _a.call(parent, false);
@@ -1150,31 +1147,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1150
1147
  });
1151
1148
  return (_ctx, _cache) => {
1152
1149
  return openBlock(), createBlock(unref(ElDialog), {
1153
- modelValue: unref(dialogVisible),
1154
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
1150
+ modelValue: dialogVisible.value,
1151
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
1155
1152
  "before-close": handleClose,
1156
- width: __props.width,
1157
- class: normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
1153
+ width: _ctx.width,
1154
+ class: normalizeClass(["basic-dialog", { "hide-title": !_ctx.showTitle }])
1158
1155
  }, {
1159
1156
  header: withCtx(() => [
1160
- __props.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
1161
- createElementVNode("div", _hoisted_2$6, [
1162
- _hoisted_3$6,
1157
+ _ctx.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
1158
+ createElementVNode("div", _hoisted_2$4, [
1159
+ _cache[1] || (_cache[1] = createElementVNode("span", { class: "basic-dialog_divider" }, null, -1)),
1163
1160
  renderSlot(_ctx.$slots, "title")
1164
1161
  ])
1165
1162
  ])) : createCommentVNode("", true)
1166
1163
  ]),
1167
1164
  footer: withCtx(() => [
1168
- __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
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
- _hoisted_5$4
1177
- ]),
1172
+ default: withCtx(() => _cache[2] || (_cache[2] = [
1173
+ createTextVNode("取消")
1174
+ ])),
1178
1175
  _: 1
1179
1176
  }),
1180
1177
  createVNode(unref(ElButton), {
@@ -1183,9 +1180,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1183
1180
  type: "primary",
1184
1181
  onClick: confirm
1185
1182
  }, {
1186
- default: withCtx(() => [
1187
- _hoisted_6$2
1188
- ]),
1183
+ default: withCtx(() => _cache[3] || (_cache[3] = [
1184
+ createTextVNode("确认")
1185
+ ])),
1189
1186
  _: 1
1190
1187
  })
1191
1188
  ])) : createCommentVNode("", true)
@@ -1198,16 +1195,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1198
1195
  };
1199
1196
  }
1200
1197
  });
1198
+ const index_vue_vue_type_style_index_0_lang$5 = "";
1201
1199
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1202
1200
  function getDefaultExportFromCjs(x) {
1203
1201
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1204
1202
  }
1205
- var date$1 = { exports: {} };
1206
- Object.defineProperty(date$1.exports, "__esModule", { value: true });
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] : ("00" + data[k]).substr(("" + data[k]).length));
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 = function() {
1222
- function DateClass2() {
1223
- }
1224
- DateClass2.prototype.format = function(date2, fmt) {
1225
- if (fmt === void 0) {
1226
- fmt = "YYYY-MM-DD HH:mm:ss";
1220
+ var DateClass = (
1221
+ /** @class */
1222
+ function() {
1223
+ function DateClass2() {
1227
1224
  }
1228
- if (!date2)
1229
- return "";
1230
- var timeData = typeof date2 === "string" ? new Date(date2.replace(/-/g, "/")) : date2;
1231
- timeData = typeof date2 === "number" ? new Date(date2) : timeData;
1232
- var o = {
1233
- "M+": timeData.getMonth() + 1,
1234
- "D+": timeData.getDate(),
1235
- "h+": timeData.getHours() % 12 === 0 ? 12 : timeData.getHours() % 12,
1236
- "H+": timeData.getHours(),
1237
- "m+": timeData.getMinutes(),
1238
- "s+": timeData.getSeconds(),
1239
- "q+": Math.floor((timeData.getMonth() + 3) / 3),
1240
- "S": timeData.getMilliseconds()
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
- var week = {
1243
- "0": "\u65E5",
1244
- "1": "\u4E00",
1245
- "2": "\u4E8C",
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
- fmt = replacementYear(timeData, fmt);
1252
- if (/(E+)/.test(fmt)) {
1253
- fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "\u661F\u671F" : "\u5468" : "") + week[timeData.getDay() + " "]);
1254
- }
1255
- return replacementDate(o, fmt);
1256
- };
1257
- DateClass2.prototype.addDaysToDate = function(date2, days) {
1258
- var d = typeof date2 === "object" ? date2 : new Date(date2);
1259
- d.setDate(d.getDate() + days);
1260
- return d.toISOString().split("T")[0];
1261
- };
1262
- DateClass2.prototype.remainTime = function(endTime, startTime) {
1263
- if (startTime === void 0) {
1264
- startTime = new Date();
1265
- }
1266
- var ts = Number(endTime) - Number(startTime);
1267
- var dd = Math.floor(ts / 1e3 / 60 / 60 / 24);
1268
- var hh = Math.floor(ts / 1e3 / 60 / 60 % 24);
1269
- var mm = Math.floor(ts / 1e3 / 60 % 60);
1270
- var ss = Math.floor(ts / 1e3 % 60);
1271
- if (ts <= 0)
1272
- return false;
1273
- return {
1274
- dd: dd < 10 ? "0" + 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
- DateClass2.prototype.formatPassTime = function(startTime) {
1281
- var currentTime = new Date();
1282
- var time = currentTime - startTime;
1283
- var year = Math.floor(time / (1e3 * 60 * 60 * 24) / 30 / 12);
1284
- if (year)
1285
- return year + "\u5E74\u524D";
1286
- var month = Math.floor(time / (1e3 * 60 * 60 * 24) / 30);
1287
- if (month)
1288
- return month + "\u4E2A\u6708\u524D";
1289
- var day = Math.floor(time / (1e3 * 60 * 60 * 24));
1290
- if (day)
1291
- return day + "\u5929\u524D";
1292
- var hour = Math.floor(time / (1e3 * 60 * 60));
1293
- if (hour)
1294
- return hour + "\u5C0F\u65F6\u524D";
1295
- var min = Math.floor(time / (1e3 * 60));
1296
- if (min)
1297
- return min + "\u5206\u949F\u524D";
1298
- else
1299
- return "\u521A\u521A";
1300
- };
1301
- DateClass2.prototype.formatPassTimeForList = function(time) {
1302
- return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY\u5E74MM\u6708DD\u65E5", true);
1303
- };
1304
- DateClass2.prototype.formatPassTimeForDetail = function(time, fmt, noYear) {
1305
- if (fmt === void 0) {
1306
- fmt = "YYYY-MM-DD";
1307
- }
1308
- var date2 = typeof time === "number" ? new Date(time) : new Date((time || "").replace(/-/g, "/"));
1309
- var diff = (new Date().getTime() - date2.getTime()) / 1e3;
1310
- var dayDiff = Math.floor(diff / 86400);
1311
- var isValidDate = Object.prototype.toString.call(date2) === "[object Date]" && !isNaN(date2.getTime());
1312
- if (!isValidDate)
1313
- return "";
1314
- var formatDate = function() {
1315
- var today = new Date(date2);
1316
- var o = {
1317
- "Y+": today.getFullYear(),
1318
- "M+": ("0" + (today.getMonth() + 1)).slice(-2),
1319
- "D+": ("0" + today.getDate()).slice(-2)
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
- fmt = replacementYear(date2, fmt);
1322
- var year = today.getFullYear();
1323
- if (!(new Date().getFullYear() > year) && noYear) {
1324
- var backData = replacementDate(o, fmt);
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 replacementDate(o, fmt);
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
- if (dayDiff === -1) {
1330
- return "\u521A\u521A";
1331
- } else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
1332
- return formatDate();
1333
- }
1334
- return dayDiff === 0 && (diff < 60 && "\u521A\u521A" || diff < 120 && "1\u5206\u949F\u524D" || diff < 3600 && Math.floor(diff / 60) + "\u5206\u949F\u524D" || diff < 7200 && "1\u5C0F\u65F6\u524D" || diff < 86400 && Math.floor(diff / 3600) + "\u5C0F\u65F6\u524D") || dayDiff < 16 && dayDiff + "\u5929\u524D";
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 && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
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
- Object.defineProperty(tools$1.exports, "__esModule", { value: true });
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 = function() {
3223
- function ToolsClass2() {
3224
- var _this = this;
3225
- this.stopScroll = function(className) {
3226
- if (!(window && window.document)) {
3227
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3228
- }
3229
- var html = document.documentElement;
3230
- html.style.overflow = "hidden";
3231
- html.style.height = "100%";
3232
- var body = document.body;
3233
- body.style.overflow = "hidden";
3234
- body.style.height = "100%";
3235
- if (className) {
3236
- var dom = document.querySelector("." + className);
3237
- dom && dom.addEventListener("touchmove", _this.__setDefault__);
3238
- }
3233
+ var ToolsClass = (
3234
+ /** @class */
3235
+ function() {
3236
+ function ToolsClass2() {
3237
+ var _this = this;
3238
+ this.stopScroll = function(className) {
3239
+ if (!(window && window.document)) {
3240
+ return new Error("仅支持浏览器");
3241
+ }
3242
+ var html = document.documentElement;
3243
+ html.style.overflow = "hidden";
3244
+ html.style.height = "100%";
3245
+ var body = document.body;
3246
+ body.style.overflow = "hidden";
3247
+ body.style.height = "100%";
3248
+ if (className) {
3249
+ var dom = document.querySelector(".".concat(className));
3250
+ dom && dom.addEventListener("touchmove", _this.__setDefault__);
3251
+ }
3252
+ };
3253
+ this.startScroll = function(className) {
3254
+ if (!(window && window.document)) {
3255
+ return new Error("仅支持浏览器");
3256
+ }
3257
+ var html = document.documentElement;
3258
+ html.style.overflow = "visible";
3259
+ html.style.height = "auto";
3260
+ var body = document.body;
3261
+ body.style.overflow = "visible";
3262
+ body.style.height = "auto";
3263
+ if (className) {
3264
+ var dom = document.querySelector(".".concat(className));
3265
+ dom && dom.removeEventListener("touchmove", _this.__setDefault__);
3266
+ }
3267
+ };
3268
+ this.objectToArray = function(obj) {
3269
+ var arr = [];
3270
+ if (typeof obj === "object") {
3271
+ for (var key in obj) {
3272
+ if (obj.hasOwnProperty(key)) {
3273
+ arr.push([key, obj[key]].join("="));
3274
+ }
3275
+ }
3276
+ }
3277
+ return arr;
3278
+ };
3279
+ this.convertKeyValueEnum = function(obj) {
3280
+ var result = {};
3281
+ if (typeof obj === "object") {
3282
+ for (var key in obj) {
3283
+ if (obj.hasOwnProperty(key)) {
3284
+ result[obj[key]] = key;
3285
+ }
3286
+ }
3287
+ }
3288
+ return result;
3289
+ };
3290
+ this.isDefined = function(val) {
3291
+ return val !== void 0 && val !== null;
3292
+ };
3293
+ this.__loaded__ = {};
3294
+ this.__setDefault__ = function(e) {
3295
+ e && e.preventDefault();
3296
+ };
3297
+ }
3298
+ ToolsClass2.prototype.deepCopy = function(data) {
3299
+ return JSON.parse(JSON.stringify(data));
3239
3300
  };
3240
- this.startScroll = function(className) {
3241
- if (!(window && window.document)) {
3242
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3243
- }
3244
- var html = document.documentElement;
3245
- html.style.overflow = "visible";
3246
- html.style.height = "auto";
3247
- var body = document.body;
3248
- body.style.overflow = "visible";
3249
- body.style.height = "auto";
3250
- if (className) {
3251
- var dom = document.querySelector("." + className);
3252
- dom && dom.removeEventListener("touchmove", _this.__setDefault__);
3301
+ ToolsClass2.prototype.deepCopy2 = function(obj) {
3302
+ var _obj = Array.isArray(obj) ? [] : {};
3303
+ for (var i in obj) {
3304
+ _obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
3253
3305
  }
3306
+ return _obj;
3254
3307
  };
3255
- this.objectToArray = function(obj) {
3256
- var arr = [];
3257
- if (typeof obj === "object") {
3258
- for (var key in obj) {
3259
- if (obj.hasOwnProperty(key)) {
3260
- arr.push([key, obj[key]].join("="));
3261
- }
3308
+ ToolsClass2.prototype.deepCopy3 = function(obj) {
3309
+ var deepcopy = requireCloneDeep();
3310
+ return deepcopy(obj);
3311
+ };
3312
+ ToolsClass2.prototype.debounce = function(func, wait) {
3313
+ var delay = function() {
3314
+ var args = arguments;
3315
+ if (timeout)
3316
+ clearTimeout(timeout);
3317
+ timeout = setTimeout(function() {
3318
+ func.apply(delay, args);
3319
+ }, wait);
3320
+ };
3321
+ return delay;
3322
+ };
3323
+ ToolsClass2.prototype.throttle = function(func, wait) {
3324
+ var delay = function() {
3325
+ var now = Date.now();
3326
+ if (now - previous > wait) {
3327
+ func.apply(delay, arguments);
3328
+ previous = now;
3262
3329
  }
3330
+ };
3331
+ return delay;
3332
+ };
3333
+ ToolsClass2.prototype.getUrlName = function(url) {
3334
+ return url && url.split("?")[0].split("/").reverse()[0];
3335
+ };
3336
+ ToolsClass2.prototype.loadJs = function(url) {
3337
+ var _this = this;
3338
+ if (!(window && window.document)) {
3339
+ return new Error("仅支持浏览器");
3263
3340
  }
3264
- return arr;
3341
+ var name = this.getUrlName(url);
3342
+ var id = "js_" + name;
3343
+ return new Promise(function(resolve, reject) {
3344
+ if (_this.__loaded__[id]) {
3345
+ return resolve();
3346
+ }
3347
+ var script = document.createElement("script");
3348
+ script.type = "text/javascript";
3349
+ script.async = true;
3350
+ script.src = url;
3351
+ script.id = id;
3352
+ script.onload = function() {
3353
+ _this.__loaded__[id] = true;
3354
+ resolve();
3355
+ };
3356
+ script.onerror = function(e) {
3357
+ reject(e);
3358
+ };
3359
+ document.body.appendChild(script);
3360
+ });
3265
3361
  };
3266
- this.convertKeyValueEnum = function(obj) {
3267
- var result = {};
3268
- if (typeof obj === "object") {
3269
- for (var key in obj) {
3270
- if (obj.hasOwnProperty(key)) {
3271
- result[obj[key]] = key;
3272
- }
3362
+ ToolsClass2.prototype.loadCss = function(url) {
3363
+ var _this = this;
3364
+ if (!(window && window.document)) {
3365
+ return new Error("仅支持浏览器");
3366
+ }
3367
+ var name = this.getUrlName(url);
3368
+ var id = "css_" + name;
3369
+ return new Promise(function(resolve, reject) {
3370
+ if (_this.__loaded__[id]) {
3371
+ return resolve();
3273
3372
  }
3373
+ var link = document.createElement("link");
3374
+ link.type = "text/css";
3375
+ link.rel = "stylesheet";
3376
+ link.href = url;
3377
+ link.id = id;
3378
+ link.onload = function() {
3379
+ _this.__loaded__[id] = true;
3380
+ resolve();
3381
+ };
3382
+ link.onerror = function(e) {
3383
+ reject(e);
3384
+ };
3385
+ document.head.appendChild(link);
3386
+ });
3387
+ };
3388
+ ToolsClass2.prototype.clipboard = function(str) {
3389
+ if (!(window && window.document)) {
3390
+ return new Error("仅支持浏览器");
3274
3391
  }
3275
- return result;
3392
+ var copy = requireClipboardCopy();
3393
+ return copy(str);
3276
3394
  };
3277
- this.isDefined = function(val) {
3278
- return val !== void 0 && val !== null;
3395
+ ToolsClass2.prototype.firstUpperCase = function(str) {
3396
+ return str.charAt(0).toUpperCase() + str.toString().slice(1);
3279
3397
  };
3280
- this.__loaded__ = {};
3281
- this.__setDefault__ = function(e) {
3282
- e && e.preventDefault();
3398
+ ToolsClass2.prototype.slice = function(target, length) {
3399
+ if (target === void 0) {
3400
+ target = "";
3401
+ }
3402
+ if (length === void 0) {
3403
+ length = 0;
3404
+ }
3405
+ return target.slice(0, length);
3283
3406
  };
3284
- }
3285
- ToolsClass2.prototype.deepCopy = function(data) {
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);
3407
+ ToolsClass2.prototype.guid = function() {
3408
+ function S4() {
3409
+ return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3410
+ }
3411
+ return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
3307
3412
  };
3308
- return delay;
3309
- };
3310
- ToolsClass2.prototype.throttle = function(func, wait) {
3311
- var delay = function() {
3312
- var now = Date.now();
3313
- if (now - previous > wait) {
3314
- func.apply(delay, arguments);
3315
- previous = now;
3413
+ ToolsClass2.prototype.getBytesOfText = function(str) {
3414
+ if (str === void 0) {
3415
+ str = "";
3316
3416
  }
3417
+ return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
3317
3418
  };
3318
- return delay;
3319
- };
3320
- ToolsClass2.prototype.getUrlName = function(url) {
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();
3333
- }
3334
- var script = document.createElement("script");
3335
- script.type = "text/javascript";
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();
3359
- }
3360
- var link = document.createElement("link");
3361
- link.type = "text/css";
3362
- link.rel = "stylesheet";
3363
- link.href = url;
3364
- link.id = id;
3365
- link.onload = function() {
3366
- _this.__loaded__[id] = true;
3367
- resolve();
3368
- };
3369
- link.onerror = function(e) {
3370
- reject(e);
3371
- };
3372
- document.head.appendChild(link);
3373
- });
3374
- };
3375
- ToolsClass2.prototype.clipboard = function(str) {
3376
- if (!(window && window.document)) {
3377
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3378
- }
3379
- var copy = requireClipboardCopy();
3380
- return copy(str);
3381
- };
3382
- ToolsClass2.prototype.firstUpperCase = function(str) {
3383
- return str.charAt(0).toUpperCase() + str.toString().slice(1);
3384
- };
3385
- ToolsClass2.prototype.slice = function(target, length) {
3386
- if (target === void 0) {
3387
- target = "";
3388
- }
3389
- if (length === void 0) {
3390
- length = 0;
3391
- }
3392
- return target.slice(0, length);
3393
- };
3394
- ToolsClass2.prototype.guid = function() {
3395
- function S4() {
3396
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3397
- }
3398
- return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
3399
- };
3400
- ToolsClass2.prototype.getBytesOfText = function(str) {
3401
- if (str === void 0) {
3402
- str = "";
3403
- }
3404
- return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
3405
- };
3406
- ToolsClass2.prototype.uniqueArr = function(arr) {
3407
- return Array.from(new Set(arr));
3408
- };
3409
- ToolsClass2.prototype.swapArray = function(array, index1, index2) {
3410
- var _a;
3411
- _a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
3412
- return array;
3413
- };
3414
- ToolsClass2.prototype.filterEmoji = function(str) {
3415
- return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
3416
- };
3417
- ToolsClass2.prototype.containsEmoji = function(str) {
3418
- var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
3419
- return reg.test(str);
3420
- };
3421
- ToolsClass2.prototype.containsHanZi = function(str) {
3422
- var reg = /[\u4e00-\u9fa5]/mg;
3423
- return reg.test(str);
3424
- };
3425
- ToolsClass2.prototype.isEmpty = function(val) {
3426
- if (val == null)
3427
- return true;
3428
- if (typeof val === "boolean")
3419
+ ToolsClass2.prototype.uniqueArr = function(arr) {
3420
+ return Array.from(new Set(arr));
3421
+ };
3422
+ ToolsClass2.prototype.swapArray = function(array, index1, index2) {
3423
+ var _a;
3424
+ _a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
3425
+ return array;
3426
+ };
3427
+ ToolsClass2.prototype.filterEmoji = function(str) {
3428
+ return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
3429
+ };
3430
+ ToolsClass2.prototype.containsEmoji = function(str) {
3431
+ var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
3432
+ return reg.test(str);
3433
+ };
3434
+ ToolsClass2.prototype.containsHanZi = function(str) {
3435
+ var reg = /[\u4e00-\u9fa5]/mg;
3436
+ return reg.test(str);
3437
+ };
3438
+ ToolsClass2.prototype.isEmpty = function(val) {
3439
+ if (val == null)
3440
+ return true;
3441
+ if (typeof val === "boolean")
3442
+ return false;
3443
+ if (typeof val === "number")
3444
+ return !val;
3445
+ if (val instanceof Error)
3446
+ return val.message === "";
3447
+ switch (Object.prototype.toString.call(val)) {
3448
+ case "[object String]":
3449
+ case "[object Array]":
3450
+ return !val.length;
3451
+ case "[object File]":
3452
+ case "[object Map]":
3453
+ case "[object Set]": {
3454
+ return !val.size;
3455
+ }
3456
+ case "[object Object]": {
3457
+ return !Object.keys(val).length;
3458
+ }
3459
+ }
3429
3460
  return false;
3430
- 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;
3442
- }
3443
- case "[object Object]": {
3444
- return !Object.keys(val).length;
3461
+ };
3462
+ ToolsClass2.prototype.sensitiveField = function(field, before, after) {
3463
+ if (before === void 0) {
3464
+ before = 3;
3445
3465
  }
3446
- }
3447
- return false;
3448
- };
3449
- ToolsClass2.prototype.sensitiveField = function(field, before, after) {
3450
- if (before === void 0) {
3451
- before = 3;
3452
- }
3453
- if (after === void 0) {
3454
- after = 4;
3455
- }
3456
- if (!field) {
3457
- return "";
3458
- }
3459
- field = String(field);
3460
- var sensitiveLen = field.length - before - after;
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$4 = "";
3474
- const _hoisted_1$6 = /* @__PURE__ */ createTextVNode("\u63D2\u5165\u6587\u7AE0/\u89C6\u9891");
3475
- const _hoisted_2$5 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
3476
- const _hoisted_3$5 = { class: "insert-article" };
3477
- const _hoisted_4$4 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u6587\u7AE0\u4E2D\u9009\u62E9");
3478
- const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
3479
- const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
3480
- const _hoisted_7$1 = { class: "insert-article_input" };
3481
- const _hoisted_8$1 = {
3466
+ if (after === void 0) {
3467
+ after = 4;
3468
+ }
3469
+ if (!field) {
3470
+ return "";
3471
+ }
3472
+ field = String(field);
3473
+ var sensitiveLen = field.length - before - after;
3474
+ if (sensitiveLen < 0) {
3475
+ sensitiveLen = 0;
3476
+ }
3477
+ var regItem = "[一-龥a-zA-Z0-9]";
3478
+ var regExp = "(".concat(regItem, "{").concat(before, "})").concat(regItem, "*(").concat(regItem, "{").concat(after, "})");
3479
+ var reg = new RegExp(regExp);
3480
+ return field.replace(reg, "$1".concat("*".repeat(sensitiveLen), "$2"));
3481
+ };
3482
+ return ToolsClass2;
3483
+ }()
3484
+ );
3485
+ tools$2.exports = new ToolsClass();
3486
+ var toolsExports = tools$2.exports;
3487
+ const tools$1 = /* @__PURE__ */ getDefaultExportFromCjs(toolsExports);
3488
+ const _hoisted_1$6 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
3489
+ const _hoisted_2$3 = { class: "insert-article" };
3490
+ const _hoisted_3$3 = { class: "insert-article_input" };
3491
+ const _hoisted_4$2 = {
3482
3492
  key: 0,
3483
3493
  class: "nodata"
3484
3494
  };
3485
- const _hoisted_9$1 = ["infinite-scroll-disabled"];
3486
- const _hoisted_10$1 = {
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 _hoisted_11$1 = { class: "video-pic" };
3491
- const _hoisted_12$1 = ["src"];
3492
- const _hoisted_13$1 = ["src"];
3493
- const _hoisted_14$1 = { class: "video-text" };
3494
- const _hoisted_15$1 = { class: "dotdotdot2" };
3495
- const _hoisted_16$1 = {
3500
+ const _hoisted_7$1 = { class: "video-pic" };
3501
+ const _hoisted_8$1 = ["src"];
3502
+ const _hoisted_9$1 = ["src"];
3503
+ const _hoisted_10$1 = { class: "video-text" };
3504
+ const _hoisted_11$1 = { class: "dotdotdot2" };
3505
+ const _hoisted_12$1 = {
3496
3506
  key: 1,
3497
3507
  style: { "display": "inline-flex", "flex-direction": "column" }
3498
3508
  };
3499
3509
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3500
- name: "index",
3510
+ __name: "index",
3501
3511
  props: {
3502
3512
  visible: { type: Boolean, default: false },
3503
- getList: null
3513
+ getList: {}
3504
3514
  },
3505
3515
  emits: ["change", "submit", "update:visible"],
3506
- setup(__props, { emit: emits }) {
3507
- const props = __props;
3508
- const { debounce } = tools;
3516
+ setup(__props, { emit: __emit }) {
3517
+ const { debounce } = tools$1;
3509
3518
  const vInfiniteScroll = ElInfiniteScroll;
3510
3519
  const Radio_Type = {
3511
3520
  MY_ARITICLE: "1",
@@ -3523,7 +3532,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3523
3532
  emits("update:visible", val);
3524
3533
  }
3525
3534
  });
3535
+ const props = __props;
3526
3536
  const { visible, getList } = toRefs(props);
3537
+ const emits = __emit;
3527
3538
  const data = reactive({
3528
3539
  params: {
3529
3540
  autherid: "",
@@ -3554,7 +3565,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3554
3565
  };
3555
3566
  const confirm = () => {
3556
3567
  if (!data.article) {
3557
- ElMessage.error(`\u8BF7\u9009\u62E9${isVideo ? "\u89C6\u9891" : "\u6587\u7AE0"}`);
3568
+ ElMessage.error(`请选择${isVideo ? "视频" : "文章"}`);
3558
3569
  return;
3559
3570
  }
3560
3571
  data.article.isVideo = isVideo;
@@ -3578,6 +3589,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3578
3589
  autherid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
3579
3590
  limit: 20,
3580
3591
  allType: data.params.radio,
3592
+ // 只有4 是查视频 其他是文章
3581
3593
  title: data.params.title,
3582
3594
  page: ++data.page
3583
3595
  });
@@ -3597,21 +3609,21 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3597
3609
  }, {
3598
3610
  title: withCtx(() => [
3599
3611
  createElementVNode("span", null, [
3600
- _hoisted_1$6,
3601
- createElementVNode("strong", _hoisted_2$5, "\u5E73\u53F0\u4EC5\u652F\u6301\u63D2\u5165" + toDisplayString(`${unref(isVideo) ? "2\u5E74" : "18\u4E2A\u6708"}`) + "\u5185\u7684\u63A8\u8350\u5185\u5BB9", 1)
3612
+ _cache[8] || (_cache[8] = createTextVNode("插入文章/视频")),
3613
+ createElementVNode("strong", _hoisted_1$6, "平台仅支持插入" + toDisplayString(`${isVideo.value ? "2" : "18个月"}`) + "内的推荐内容", 1)
3602
3614
  ])
3603
3615
  ]),
3604
3616
  default: withCtx(() => [
3605
- createElementVNode("div", _hoisted_3$5, [
3617
+ createElementVNode("div", _hoisted_2$3, [
3606
3618
  createElementVNode("div", null, [
3607
3619
  createVNode(unref(ElRadio), {
3608
3620
  modelValue: data.params.radio,
3609
3621
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.params.radio = $event),
3610
3622
  label: Radio_Type.MY_ARITICLE
3611
3623
  }, {
3612
- default: withCtx(() => [
3613
- _hoisted_4$4
3614
- ]),
3624
+ default: withCtx(() => _cache[9] || (_cache[9] = [
3625
+ createTextVNode("从我的文章中选择")
3626
+ ])),
3615
3627
  _: 1
3616
3628
  }, 8, ["modelValue", "label"]),
3617
3629
  createVNode(unref(ElRadio), {
@@ -3619,9 +3631,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3619
3631
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.params.radio = $event),
3620
3632
  label: Radio_Type.MY_VIDEO
3621
3633
  }, {
3622
- default: withCtx(() => [
3623
- _hoisted_5$3
3624
- ]),
3634
+ default: withCtx(() => _cache[10] || (_cache[10] = [
3635
+ createTextVNode("从我的视频中选择")
3636
+ ])),
3625
3637
  _: 1
3626
3638
  }, 8, ["modelValue", "label"]),
3627
3639
  createVNode(unref(ElRadio), {
@@ -3629,17 +3641,17 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3629
3641
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.params.radio = $event),
3630
3642
  label: Radio_Type.ALL_ARITICLE
3631
3643
  }, {
3632
- default: withCtx(() => [
3633
- _hoisted_6$1
3634
- ]),
3644
+ default: withCtx(() => _cache[11] || (_cache[11] = [
3645
+ createTextVNode("从所有文章中选择")
3646
+ ])),
3635
3647
  _: 1
3636
3648
  }, 8, ["modelValue", "label"])
3637
3649
  ]),
3638
- createElementVNode("div", _hoisted_7$1, [
3650
+ createElementVNode("div", _hoisted_3$3, [
3639
3651
  createVNode(unref(ElInput), {
3640
3652
  modelValue: data.params.title,
3641
3653
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.params.title = $event),
3642
- placeholder: unref(isVideo) ? "\u8F93\u5165\u89C6\u9891\u63CF\u8FF0\u67E5\u627E\u5E73\u53F0\u53D1\u5E03\u8FC7\u7684\u89C6\u9891" : "\u8F93\u5165\u6807\u9898\u540D\u67E5\u627E\u5E73\u53F0\u53D1\u8FC7\u7684\u6587\u7AE0",
3654
+ placeholder: isVideo.value ? "输入视频描述查找平台发布过的视频" : "输入标题名查找平台发过的文章",
3643
3655
  onKeyup: _cache[5] || (_cache[5] = withKeys(($event) => unref(getArticleList)(true), ["enter", "native"])),
3644
3656
  onInput: _cache[6] || (_cache[6] = ($event) => unref(getArticleList)(true))
3645
3657
  }, {
@@ -3653,11 +3665,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3653
3665
  _: 1
3654
3666
  }, 8, ["modelValue", "placeholder"])
3655
3667
  ]),
3656
- data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
3668
+ data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_4$2, toDisplayString(`没有符合条件的${isVideo.value ? "视频" : "文章"}哦,你可以试试搜索其他${isVideo.value ? "视频" : "文章"}~`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
3657
3669
  key: 1,
3658
3670
  "infinite-scroll-immediate": false,
3659
3671
  class: "insert-article_list",
3660
- "infinite-scroll-disabled": unref(disable)
3672
+ "infinite-scroll-disabled": disable.value
3661
3673
  }, [
3662
3674
  (openBlock(true), createElementBlock(Fragment, null, renderList(data.data, (item, index) => {
3663
3675
  return openBlock(), createElementBlock("div", {
@@ -3673,24 +3685,24 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3673
3685
  default: withCtx(() => {
3674
3686
  var _a;
3675
3687
  return [
3676
- unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
3677
- createElementVNode("div", _hoisted_11$1, [
3688
+ isVideo.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
3689
+ createElementVNode("div", _hoisted_7$1, [
3678
3690
  createElementVNode("img", {
3679
3691
  class: "video-pic",
3680
3692
  src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
3681
- }, null, 8, _hoisted_12$1),
3693
+ }, null, 8, _hoisted_8$1),
3682
3694
  createElementVNode("img", {
3683
3695
  class: "play",
3684
3696
  src: getImageUrl("play.png")
3685
- }, null, 8, _hoisted_13$1)
3697
+ }, null, 8, _hoisted_9$1)
3686
3698
  ]),
3687
- createElementVNode("div", _hoisted_14$1, [
3688
- createElementVNode("span", _hoisted_15$1, toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
3689
- createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
3699
+ createElementVNode("div", _hoisted_10$1, [
3700
+ createElementVNode("span", _hoisted_11$1, toDisplayString(item.content || "[无标题]"), 1),
3701
+ createElementVNode("span", null, toDisplayString(unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
3690
3702
  ])
3691
- ])) : (openBlock(), createElementBlock("div", _hoisted_16$1, [
3692
- createElementVNode("span", null, toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
3693
- createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
3703
+ ])) : (openBlock(), createElementBlock("div", _hoisted_12$1, [
3704
+ createElementVNode("span", null, toDisplayString(item.title || "[无标题]"), 1),
3705
+ createElementVNode("span", null, toDisplayString(unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
3694
3706
  ]))
3695
3707
  ];
3696
3708
  }),
@@ -3698,7 +3710,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3698
3710
  }, 1032, ["modelValue", "label", "onChange"])
3699
3711
  ]);
3700
3712
  }), 128))
3701
- ], 8, _hoisted_9$1)), [
3713
+ ], 8, _hoisted_5$2)), [
3702
3714
  [unref(vInfiniteScroll), unref(getArticleList)]
3703
3715
  ])
3704
3716
  ])
@@ -3708,6 +3720,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
3708
3720
  };
3709
3721
  }
3710
3722
  });
3723
+ const index_vue_vue_type_style_index_0_lang$4 = "";
3711
3724
  let getRandomValues;
3712
3725
  const rnds8 = new Uint8Array(16);
3713
3726
  function rng() {
@@ -3724,7 +3737,7 @@ for (let i = 0; i < 256; ++i) {
3724
3737
  byteToHex.push((i + 256).toString(16).slice(1));
3725
3738
  }
3726
3739
  function unsafeStringify(arr, offset = 0) {
3727
- return (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]]).toLowerCase();
3740
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
3728
3741
  }
3729
3742
  const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3730
3743
  const native = {
@@ -3747,15 +3760,14 @@ function v4(options, buf, offset) {
3747
3760
  }
3748
3761
  return unsafeStringify(rnds);
3749
3762
  }
3750
- const index_vue_vue_type_style_index_0_lang$3 = "";
3751
3763
  const _hoisted_1$5 = { class: "img-upload-content" };
3752
- const _hoisted_2$4 = { class: "title-box" };
3753
- const _hoisted_3$4 = ["onClick"];
3754
- const _hoisted_4$3 = {
3764
+ const _hoisted_2$2 = { class: "title-box" };
3765
+ const _hoisted_3$2 = ["onClick"];
3766
+ const _hoisted_4$1 = {
3755
3767
  key: 0,
3756
3768
  class: "line"
3757
3769
  };
3758
- const _hoisted_5$2 = {
3770
+ const _hoisted_5$1 = {
3759
3771
  key: 0,
3760
3772
  class: "prompt-restriction"
3761
3773
  };
@@ -3779,45 +3791,39 @@ const _hoisted_13 = {
3779
3791
  key: 0,
3780
3792
  class: "upload-wrap"
3781
3793
  };
3782
- const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
3783
- const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
3784
- const _hoisted_16 = {
3794
+ const _hoisted_14 = {
3785
3795
  key: 1,
3786
3796
  class: "img-list"
3787
3797
  };
3788
- const _hoisted_17 = ["src"];
3789
- const _hoisted_18 = { class: "upload-btn" };
3790
- const _hoisted_19 = {
3798
+ const _hoisted_15 = ["src"];
3799
+ const _hoisted_16 = { class: "upload-btn" };
3800
+ const _hoisted_17 = {
3791
3801
  key: 2,
3792
3802
  class: "map-depot"
3793
3803
  };
3794
- const _hoisted_20 = { class: "screen" };
3795
- const _hoisted_21 = /* @__PURE__ */ createTextVNode("\u641C\u7D22");
3796
- const _hoisted_22 = { key: 0 };
3797
- const _hoisted_23 = { class: "tab-box" };
3798
- const _hoisted_24 = ["onClick"];
3799
- const _hoisted_25 = {
3804
+ const _hoisted_18 = { class: "screen" };
3805
+ const _hoisted_19 = { key: 0 };
3806
+ const _hoisted_20 = { class: "tab-box" };
3807
+ const _hoisted_21 = ["onClick"];
3808
+ const _hoisted_22 = {
3800
3809
  key: 0,
3801
3810
  class: "line"
3802
3811
  };
3803
- const _hoisted_26 = { class: "image-list depot-image" };
3804
- const _hoisted_27 = ["onClick"];
3805
- const _hoisted_28 = ["src"];
3806
- const _hoisted_29 = {
3812
+ const _hoisted_23 = { class: "image-list depot-image" };
3813
+ const _hoisted_24 = ["onClick"];
3814
+ const _hoisted_25 = ["src"];
3815
+ const _hoisted_26 = {
3807
3816
  key: 0,
3808
3817
  class: "shade"
3809
3818
  };
3810
- const _hoisted_30 = { class: "num" };
3811
- const _hoisted_31 = {
3819
+ const _hoisted_27 = { class: "num" };
3820
+ const _hoisted_28 = {
3812
3821
  key: 1,
3813
3822
  class: "protocol-box"
3814
3823
  };
3815
- const _hoisted_32 = /* @__PURE__ */ createElementVNode("div", null, " \u56FE\u5E93\u4E2D\u7684\u56FE\u7247\u4EC5\u9650\u4E0B\u8F7D\u6469\u6258\u8303\u4EE5\u7F16\u8F91\u53D1\u5E03\u6587\u7AE0\u4F7F\u7528,\u4E0D\u5F97\u7528\u4E8E\u5176\u4ED6\u4EFB\u4F55\u5E73\u53F0\u53CA\u7528\u9014 ", -1);
3816
- const _hoisted_33 = /* @__PURE__ */ createTextVNode(" \u8BF7\u9605\u8BFB");
3817
- const _hoisted_34 = ["href"];
3818
- const _hoisted_35 = /* @__PURE__ */ createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ");
3824
+ const _hoisted_29 = ["href"];
3819
3825
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3820
- name: "index",
3826
+ __name: "index",
3821
3827
  props: {
3822
3828
  visible: { type: Boolean, default: false },
3823
3829
  imgList: { default: [] },
@@ -3826,7 +3832,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3826
3832
  imgNum: { default: 20 }
3827
3833
  },
3828
3834
  emits: ["update:imgList", "update:visible", "submit"],
3829
- setup(__props, { emit: emits }) {
3835
+ setup(__props, { emit: __emit }) {
3836
+ const emits = __emit;
3830
3837
  const props = __props;
3831
3838
  const drag = ref(false);
3832
3839
  const imgListTemp = computed({
@@ -3850,7 +3857,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3850
3857
  const tempImgs = [...props.imgList];
3851
3858
  Array.from(imgFile).forEach((file) => {
3852
3859
  if (file.size > 20 * 1024 * 1024) {
3853
- ElMessage.error("\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120M");
3860
+ ElMessage.error("单张图片最大支持20M");
3854
3861
  return;
3855
3862
  }
3856
3863
  const id = v4();
@@ -3880,14 +3887,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3880
3887
  const list = [
3881
3888
  {
3882
3889
  id: 2,
3883
- value: "\u4E0A\u4F20\u56FE\u7247"
3890
+ value: "上传图片"
3884
3891
  }
3885
3892
  ];
3886
3893
  activeTitle.value = 2;
3887
3894
  if (props.imgNum < 20) {
3888
3895
  list.unshift({
3889
3896
  id: 1,
3890
- value: "\u6B63\u6587\u56FE\u7247"
3897
+ value: "正文图片"
3891
3898
  });
3892
3899
  activeTitle.value = 1;
3893
3900
  getContentImgList();
@@ -3895,7 +3902,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3895
3902
  if (props.chartGallery) {
3896
3903
  list.push({
3897
3904
  id: 3,
3898
- value: isEmotofine ? "\u7535\u6469\u8303\u56FE\u5E93" : "\u6469\u6258\u8303\u56FE\u5E93"
3905
+ value: isEmotofine ? "电摩范图库" : "摩托范图库"
3899
3906
  });
3900
3907
  }
3901
3908
  titleList.value = list;
@@ -4040,13 +4047,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4040
4047
  const tabList = ref([]);
4041
4048
  const search = () => {
4042
4049
  if (!selectData.brandId) {
4043
- return ElMessage.error("\u8BF7\u9009\u62E9\u54C1\u724C");
4050
+ return ElMessage.error("请选择品牌");
4044
4051
  }
4045
4052
  if (!selectData.goodId) {
4046
- return ElMessage.error("\u8BF7\u9009\u62E9\u8F66\u578B");
4053
+ return ElMessage.error("请选择车型");
4047
4054
  }
4048
4055
  if (!selectData.carId) {
4049
- return ElMessage.error("\u8BF7\u9009\u62E9\u6B3E\u578B");
4056
+ return ElMessage.error("请选择款型");
4050
4057
  }
4051
4058
  tabList.value = [];
4052
4059
  emits("update:imgList", []);
@@ -4103,7 +4110,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4103
4110
  }, {
4104
4111
  default: withCtx(() => [
4105
4112
  createElementVNode("div", _hoisted_1$5, [
4106
- createElementVNode("div", _hoisted_2$4, [
4113
+ createElementVNode("div", _hoisted_2$2, [
4107
4114
  (openBlock(true), createElementBlock(Fragment, null, renderList(titleList.value, (item, index) => {
4108
4115
  return openBlock(), createElementBlock("div", {
4109
4116
  key: index,
@@ -4111,15 +4118,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4111
4118
  onClick: ($event) => changeTab(item)
4112
4119
  }, [
4113
4120
  createTextVNode(toDisplayString(item.value) + " ", 1),
4114
- item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$3)) : createCommentVNode("", true)
4115
- ], 10, _hoisted_3$4);
4121
+ item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$1)) : createCommentVNode("", true)
4122
+ ], 10, _hoisted_3$2);
4116
4123
  }), 128)),
4117
- [1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$2, " \u6700\u591A\u53EF\u9009" + toDisplayString(props.imgNum) + "\u5F20\u56FE\u7247\uFF0C\u5DF2\u9009" + toDisplayString(props.imgList.length) + "\u5F20 ", 1)) : createCommentVNode("", true),
4118
- activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "\u5F20\u4E0A\u4F20\u6210\u529F \u62D6\u52A8\u53EF\u8C03\u6574\u987A\u5E8F ", 1)) : createCommentVNode("", true)
4124
+ [1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, " 最多可选" + toDisplayString(props.imgNum) + "张图片,已选" + toDisplayString(props.imgList.length) + " ", 1)) : createCommentVNode("", true),
4125
+ activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "张上传成功 拖动可调整顺序 ", 1)) : createCommentVNode("", true)
4119
4126
  ]),
4120
4127
  activeTitle.value === 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
4121
4128
  createElementVNode("div", _hoisted_8, [
4122
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(contentImgList), (item, index) => {
4129
+ (openBlock(true), createElementBlock(Fragment, null, renderList(contentImgList.value, (item, index) => {
4123
4130
  return openBlock(), createElementBlock("div", {
4124
4131
  key: index,
4125
4132
  class: "image-item",
@@ -4152,13 +4159,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4152
4159
  ]),
4153
4160
  _: 1
4154
4161
  }),
4155
- _hoisted_14
4162
+ _cache[7] || (_cache[7] = createElementVNode("span", null, "本地上传", -1))
4156
4163
  ]),
4157
- _hoisted_15
4158
- ])) : (openBlock(), createElementBlock("div", _hoisted_16, [
4164
+ _cache[8] || (_cache[8] = createElementVNode("span", { class: "remark" }, "支持jpg、jpeg、png等多种格式,单张图片最大支持20MB", -1))
4165
+ ])) : (openBlock(), createElementBlock("div", _hoisted_14, [
4159
4166
  createVNode(unref(draggable), {
4160
- modelValue: unref(imgListTemp),
4161
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(imgListTemp) ? imgListTemp.value = $event : null),
4167
+ modelValue: imgListTemp.value,
4168
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imgListTemp.value = $event),
4162
4169
  handle: ".img-item",
4163
4170
  class: "img-wrap",
4164
4171
  group: "people",
@@ -4176,7 +4183,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4176
4183
  style: { "object-fit": "contain" },
4177
4184
  width: "120",
4178
4185
  height: "120"
4179
- }, null, 8, _hoisted_17),
4186
+ }, null, 8, _hoisted_15),
4180
4187
  createVNode(unref(CircleCloseFilled), {
4181
4188
  class: "icon pointer",
4182
4189
  onClick: ($event) => deleteImg(element)
@@ -4199,7 +4206,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4199
4206
  _: 1
4200
4207
  }, 8, ["modelValue"])
4201
4208
  ])),
4202
- createElementVNode("div", _hoisted_18, [
4209
+ createElementVNode("div", _hoisted_16, [
4203
4210
  createElementVNode("input", {
4204
4211
  type: "file",
4205
4212
  name: "file",
@@ -4210,13 +4217,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4210
4217
  }, null, 32)
4211
4218
  ])
4212
4219
  ], 2)) : createCommentVNode("", true),
4213
- activeTitle.value === 3 ? (openBlock(), createElementBlock("div", _hoisted_19, [
4214
- createElementVNode("div", _hoisted_20, [
4220
+ activeTitle.value === 3 ? (openBlock(), createElementBlock("div", _hoisted_17, [
4221
+ createElementVNode("div", _hoisted_18, [
4215
4222
  createElementVNode("div", null, [
4216
4223
  createVNode(unref(ElSelect), {
4217
4224
  modelValue: selectData.brandId,
4218
4225
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
4219
- placeholder: "\u8BF7\u9009\u62E9\u54C1\u724C",
4226
+ placeholder: "请选择品牌",
4220
4227
  size: "large",
4221
4228
  class: "select_1",
4222
4229
  filterable: "",
@@ -4237,7 +4244,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4237
4244
  createVNode(unref(ElSelect), {
4238
4245
  modelValue: selectData.goodId,
4239
4246
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
4240
- placeholder: "\u8BF7\u9009\u62E9\u8F66\u578B",
4247
+ placeholder: "请选择车型",
4241
4248
  size: "large",
4242
4249
  class: "select_1",
4243
4250
  filterable: "",
@@ -4258,7 +4265,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4258
4265
  createVNode(unref(ElSelect), {
4259
4266
  modelValue: selectData.carId,
4260
4267
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
4261
- placeholder: "\u8BF7\u9009\u62E9\u6B3E\u578B",
4268
+ placeholder: "请选择款型",
4262
4269
  size: "large",
4263
4270
  class: "select_2",
4264
4271
  filterable: "",
@@ -4282,14 +4289,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4282
4289
  style: { "width": "80px" },
4283
4290
  onClick: search
4284
4291
  }, {
4285
- default: withCtx(() => [
4286
- _hoisted_21
4287
- ]),
4292
+ default: withCtx(() => _cache[9] || (_cache[9] = [
4293
+ createTextVNode("搜索")
4294
+ ])),
4288
4295
  _: 1
4289
4296
  })
4290
4297
  ]),
4291
- tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div", _hoisted_22, [
4292
- createElementVNode("div", _hoisted_23, [
4298
+ tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div", _hoisted_19, [
4299
+ createElementVNode("div", _hoisted_20, [
4293
4300
  (openBlock(true), createElementBlock(Fragment, null, renderList(tabList.value, (item, index) => {
4294
4301
  return openBlock(), createElementBlock("div", {
4295
4302
  key: index,
@@ -4297,12 +4304,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4297
4304
  onClick: ($event) => activeTab.value = item.type
4298
4305
  }, [
4299
4306
  createTextVNode(toDisplayString(item.name) + " ", 1),
4300
- item.type === activeTab.value ? (openBlock(), createElementBlock("div", _hoisted_25)) : createCommentVNode("", true)
4301
- ], 10, _hoisted_24);
4307
+ item.type === activeTab.value ? (openBlock(), createElementBlock("div", _hoisted_22)) : createCommentVNode("", true)
4308
+ ], 10, _hoisted_21);
4302
4309
  }), 128))
4303
4310
  ]),
4304
- createElementVNode("div", _hoisted_26, [
4305
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(imageList), (item, index) => {
4311
+ createElementVNode("div", _hoisted_23, [
4312
+ (openBlock(true), createElementBlock(Fragment, null, renderList(imageList.value, (item, index) => {
4306
4313
  return openBlock(), createElementBlock("div", {
4307
4314
  key: index,
4308
4315
  class: "image-item",
@@ -4312,25 +4319,25 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4312
4319
  src: item.imgOrgUrl,
4313
4320
  alt: "",
4314
4321
  class: "image"
4315
- }, null, 8, _hoisted_28),
4316
- item.num ? (openBlock(), createElementBlock("div", _hoisted_29, [
4317
- createElementVNode("div", _hoisted_30, toDisplayString(item.num), 1)
4322
+ }, null, 8, _hoisted_25),
4323
+ item.num ? (openBlock(), createElementBlock("div", _hoisted_26, [
4324
+ createElementVNode("div", _hoisted_27, toDisplayString(item.num), 1)
4318
4325
  ])) : createCommentVNode("", true)
4319
- ], 8, _hoisted_27);
4326
+ ], 8, _hoisted_24);
4320
4327
  }), 128))
4321
4328
  ])
4322
- ])) : (openBlock(), createElementBlock("div", _hoisted_31, [
4329
+ ])) : (openBlock(), createElementBlock("div", _hoisted_28, [
4323
4330
  createElementVNode("div", null, [
4324
- _hoisted_32,
4331
+ _cache[12] || (_cache[12] = createElementVNode("div", null, " 图库中的图片仅限下载摩托范以编辑发布文章使用,不得用于其他任何平台及用途 ", -1)),
4325
4332
  createElementVNode("div", null, [
4326
- _hoisted_33,
4333
+ _cache[10] || (_cache[10] = createTextVNode(" 请阅读")),
4327
4334
  createElementVNode("a", {
4328
4335
  href: `https://${unref(hostName)}/about?type=imageLicenseAgreement`,
4329
4336
  target: "_blank",
4330
4337
  rel: "noopener noreferrer",
4331
4338
  class: "link"
4332
- }, "\u300A\u6469\u6258\u8303\u56FE\u7247\u8BB8\u53EF\u4F7F\u7528\u534F\u8BAE\u300B", 8, _hoisted_34),
4333
- _hoisted_35
4339
+ }, "《摩托范图片许可使用协议》", 8, _hoisted_29),
4340
+ _cache[11] || (_cache[11] = createTextVNode(",您的行为视为您已同意该协议。 "))
4334
4341
  ])
4335
4342
  ])
4336
4343
  ]))
@@ -4342,25 +4349,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4342
4349
  };
4343
4350
  }
4344
4351
  });
4345
- const index_vue_vue_type_style_index_0_lang$2 = "";
4346
- const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", null, "\u63D2\u5165\u89C6\u9891", -1);
4347
- const _hoisted_2$3 = { class: "insert-video" };
4348
- const _hoisted_3$3 = /* @__PURE__ */ createTextVNode("\u9009\u62E9\u89C6\u9891");
4349
- const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u4E3A\u4E86\u83B7\u5F97\u66F4\u9AD8\u7684\u63A8\u8350\u91CF\u548C\u70B9\u51FB\u91CF\uFF0C\u5EFA\u8BAE\u4E0A\u4F20720p\uFF081280*720\uFF09\u6216\u66F4\u9AD8\u5206\u8FA8\u7387\u7684\u89C6\u9891\uFF0C\u89C6\u9891\u683C\u5F0F\u4E3A.mp4\u6216.mov\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC71G", -1);
4352
+ const index_vue_vue_type_style_index_0_lang$3 = "";
4353
+ const _hoisted_1$4 = { class: "insert-video" };
4350
4354
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4351
- name: "index",
4355
+ __name: "index",
4352
4356
  props: {
4353
4357
  visible: { type: Boolean, default: false },
4354
- fileSelected: null
4358
+ fileSelected: {}
4355
4359
  },
4356
4360
  emits: ["update:visible"],
4357
- setup(__props, { emit: emits }) {
4358
- const props = __props;
4361
+ setup(__props, { emit: __emit }) {
4362
+ const emits = __emit;
4359
4363
  provide("vm", {
4360
4364
  setStatus(val) {
4361
4365
  emits("update:visible", val);
4362
4366
  }
4363
4367
  });
4368
+ const props = __props;
4364
4369
  const { visible, fileSelected } = toRefs(props);
4365
4370
  const emitEvent = () => {
4366
4371
  var event = new MouseEvent("click");
@@ -4374,23 +4379,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4374
4379
  width: "600px",
4375
4380
  height: "100px"
4376
4381
  }, {
4377
- title: withCtx(() => [
4378
- _hoisted_1$4
4379
- ]),
4382
+ title: withCtx(() => _cache[1] || (_cache[1] = [
4383
+ createElementVNode("span", null, "插入视频", -1)
4384
+ ])),
4380
4385
  default: withCtx(() => [
4381
- createElementVNode("div", _hoisted_2$3, [
4386
+ createElementVNode("div", _hoisted_1$4, [
4382
4387
  createVNode(unref(ElButton), {
4383
4388
  style: { "width": "120px" },
4384
4389
  round: "",
4385
4390
  type: "primary",
4386
4391
  onClick: emitEvent
4387
4392
  }, {
4388
- default: withCtx(() => [
4389
- _hoisted_3$3
4390
- ]),
4393
+ default: withCtx(() => _cache[2] || (_cache[2] = [
4394
+ createTextVNode("选择视频")
4395
+ ])),
4391
4396
  _: 1
4392
4397
  }),
4393
- _hoisted_4$2,
4398
+ _cache[3] || (_cache[3] = createElementVNode("span", { class: "remark" }, "为了获得更高的推荐量和点击量,建议上传720p(1280*720)或更高分辨率的视频,视频格式为.mp4或.mov,大小不超过1G", -1)),
4394
4399
  createElementVNode("input", {
4395
4400
  type: "file",
4396
4401
  accept: "video/*",
@@ -4405,14 +4410,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4405
4410
  };
4406
4411
  }
4407
4412
  });
4413
+ const index_vue_vue_type_style_index_0_lang$2 = "";
4408
4414
  const index_vue_vue_type_style_index_0_lang$1 = "";
4409
4415
  const _sfc_main$3 = {
4410
4416
  name: "TopicManager",
4411
4417
  props: {
4418
+ // 编辑器DOM引用
4412
4419
  editorDom: {
4413
4420
  type: Object,
4414
4421
  default: null
4415
4422
  },
4423
+ // 话题API请求方法
4416
4424
  request: {
4417
4425
  type: Object,
4418
4426
  default: null
@@ -4420,10 +4428,13 @@ const _sfc_main$3 = {
4420
4428
  },
4421
4429
  data() {
4422
4430
  return {
4431
+ // 话题弹框相关数据
4423
4432
  topicPopover: {
4424
4433
  visible: false,
4425
4434
  type: "hot",
4435
+ // 'hot' 热门话题, 'search' 搜索话题
4426
4436
  activeTab: "hot",
4437
+ // 'hot' 热门话题, 'recent' 最近使用
4427
4438
  position: { top: 0, left: 0 },
4428
4439
  searchKeyword: "",
4429
4440
  hotTopics: [],
@@ -4434,22 +4445,28 @@ const _sfc_main$3 = {
4434
4445
  hasMore: true,
4435
4446
  searchPage: 1,
4436
4447
  searchHasMore: true,
4448
+ // 用于增量更新的计数器
4437
4449
  newHotTopicsCount: 0,
4438
4450
  newSearchTopicsCount: 0,
4451
+ // 保存原始的selection和range信息
4439
4452
  originalRange: null,
4440
4453
  originalSelection: null,
4454
+ // 保存触发位置信息
4441
4455
  triggerInfo: {
4442
4456
  paragraph: null,
4443
4457
  hashIndex: -1,
4444
4458
  cursorPosition: 0
4445
4459
  },
4460
+ // 全局弹框DOM引用
4446
4461
  globalContainer: null,
4447
4462
  globalMask: null
4448
4463
  },
4464
+ // 中文输入法状态
4449
4465
  isComposing: false
4450
4466
  };
4451
4467
  },
4452
4468
  methods: {
4469
+ // 初始化话题管理器
4453
4470
  init() {
4454
4471
  if (!this.editorDom) {
4455
4472
  console.warn("TopicManager: editorDom is required");
@@ -4457,6 +4474,7 @@ const _sfc_main$3 = {
4457
4474
  }
4458
4475
  setTimeout(() => this.bindEditorEvents(), 0);
4459
4476
  },
4477
+ // 绑定编辑器事件
4460
4478
  bindEditorEvents() {
4461
4479
  if (!this.editorDom)
4462
4480
  return;
@@ -4465,6 +4483,7 @@ const _sfc_main$3 = {
4465
4483
  this.editorDom.addEventListener("compositionend", this.handleCompositionEnd.bind(this));
4466
4484
  this.editorDom.addEventListener("input", this.handleInput.bind(this));
4467
4485
  },
4486
+ // 解绑编辑器事件
4468
4487
  unbindEditorEvents() {
4469
4488
  if (!this.editorDom)
4470
4489
  return;
@@ -4473,15 +4492,18 @@ const _sfc_main$3 = {
4473
4492
  this.editorDom.removeEventListener("compositionend", this.handleCompositionEnd.bind(this));
4474
4493
  this.editorDom.removeEventListener("input", this.handleInput.bind(this));
4475
4494
  },
4495
+ // 中文输入法开始事件
4476
4496
  handleCompositionStart() {
4477
4497
  this.isComposing = true;
4478
4498
  },
4499
+ // 中文输入法结束事件(中文)
4479
4500
  handleCompositionEnd() {
4480
4501
  this.isComposing = false;
4481
4502
  setTimeout(() => {
4482
4503
  this.handleInputChange();
4483
4504
  }, 10);
4484
4505
  },
4506
+ // input事件处理(英文)
4485
4507
  handleInput() {
4486
4508
  if (!this.isComposing) {
4487
4509
  setTimeout(() => {
@@ -4489,6 +4511,7 @@ const _sfc_main$3 = {
4489
4511
  }, 10);
4490
4512
  }
4491
4513
  },
4514
+ // 处理输入变化
4492
4515
  handleInputChange() {
4493
4516
  var _a;
4494
4517
  const selection = window.getSelection();
@@ -4516,6 +4539,7 @@ const _sfc_main$3 = {
4516
4539
  return;
4517
4540
  this.checkAndTriggerSearch(paragraph);
4518
4541
  },
4542
+ // 话题输入处理
4519
4543
  handleTopicInput(event) {
4520
4544
  var _a;
4521
4545
  const activeElement = document.activeElement;
@@ -4556,7 +4580,9 @@ const _sfc_main$3 = {
4556
4580
  const triggerInfo = {
4557
4581
  paragraph,
4558
4582
  hashIndex: cursorPosition,
4583
+ // #号的位置
4559
4584
  cursorPosition: cursorPosition + 1
4585
+ // #号后的位置
4560
4586
  };
4561
4587
  this.showTopicPopover("hot", position, "", triggerInfo);
4562
4588
  }, 10);
@@ -4652,6 +4678,7 @@ const _sfc_main$3 = {
4652
4678
  tempElement.remove();
4653
4679
  const position = {
4654
4680
  top: rect.bottom,
4681
+ // 弹框显示在光标下方
4655
4682
  left: rect.left
4656
4683
  };
4657
4684
  const viewportWidth = window.innerWidth;
@@ -4669,7 +4696,7 @@ const _sfc_main$3 = {
4669
4696
  }
4670
4697
  return position;
4671
4698
  } catch (error) {
4672
- console.warn("\u83B7\u53D6\u5149\u6807\u4F4D\u7F6E\u5931\u8D25\uFF0C\u4F7F\u7528fallback\u65B9\u6CD5:", error);
4699
+ console.warn("获取光标位置失败,使用fallback方法:", error);
4673
4700
  const rect = range.getBoundingClientRect();
4674
4701
  return {
4675
4702
  top: rect.bottom,
@@ -4677,9 +4704,10 @@ const _sfc_main$3 = {
4677
4704
  };
4678
4705
  }
4679
4706
  },
4707
+ // 话题弹框相关方法
4680
4708
  showTopicPopover(type, position, searchKeyword = "", triggerInfo = null) {
4681
4709
  if (!this.request || !this.request.getTopic) {
4682
- console.warn("\u8BDD\u9898\u529F\u80FD\u9700\u8981\u63D0\u4F9B request.getTopic \u65B9\u6CD5");
4710
+ console.warn("话题功能需要提供 request.getTopic 方法");
4683
4711
  return;
4684
4712
  }
4685
4713
  const selection = window.getSelection();
@@ -4752,11 +4780,11 @@ const _sfc_main$3 = {
4752
4780
  }
4753
4781
  }
4754
4782
  } else {
4755
- console.warn("\u52A0\u8F7D\u70ED\u95E8\u8BDD\u9898\u5931\u8D25:", response);
4783
+ console.warn("加载热门话题失败:", response);
4756
4784
  this.topicPopover.hasMore = false;
4757
4785
  }
4758
4786
  } catch (error) {
4759
- console.error("\u52A0\u8F7D\u70ED\u95E8\u8BDD\u9898\u5931\u8D25:", error);
4787
+ console.error("加载热门话题失败:", error);
4760
4788
  this.topicPopover.hasMore = false;
4761
4789
  } finally {
4762
4790
  this.topicPopover.loading = false;
@@ -4790,17 +4818,18 @@ const _sfc_main$3 = {
4790
4818
  this.topicPopover.searchHasMore = topics.length >= 50;
4791
4819
  }
4792
4820
  } else {
4793
- console.warn("\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", response);
4821
+ console.warn("搜索话题失败:", response);
4794
4822
  this.topicPopover.searchHasMore = false;
4795
4823
  }
4796
4824
  } catch (error) {
4797
- console.error("\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", error);
4825
+ console.error("搜索话题失败:", error);
4798
4826
  this.topicPopover.searchHasMore = false;
4799
4827
  } finally {
4800
4828
  this.topicPopover.loading = false;
4801
4829
  this.updateGlobalTopicPopover();
4802
4830
  }
4803
4831
  },
4832
+ // 加载更多搜索话题
4804
4833
  async loadSearchTopics() {
4805
4834
  if (this.topicPopover.loading || !this.topicPopover.searchHasMore)
4806
4835
  return;
@@ -4828,11 +4857,11 @@ const _sfc_main$3 = {
4828
4857
  }
4829
4858
  }
4830
4859
  } else {
4831
- console.warn("\u52A0\u8F7D\u66F4\u591A\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", response);
4860
+ console.warn("加载更多搜索话题失败:", response);
4832
4861
  this.topicPopover.searchHasMore = false;
4833
4862
  }
4834
4863
  } catch (error) {
4835
- console.error("\u52A0\u8F7D\u66F4\u591A\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", error);
4864
+ console.error("加载更多搜索话题失败:", error);
4836
4865
  this.topicPopover.searchHasMore = false;
4837
4866
  } finally {
4838
4867
  this.topicPopover.loading = false;
@@ -4844,7 +4873,7 @@ const _sfc_main$3 = {
4844
4873
  const localTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
4845
4874
  this.topicPopover.recentTopics = localTopics;
4846
4875
  } catch (error) {
4847
- console.error("\u52A0\u8F7D\u6700\u8FD1\u4F7F\u7528\u8BDD\u9898\u5931\u8D25:", error);
4876
+ console.error("加载最近使用话题失败:", error);
4848
4877
  this.topicPopover.recentTopics = [];
4849
4878
  }
4850
4879
  },
@@ -4864,9 +4893,10 @@ const _sfc_main$3 = {
4864
4893
  }
4865
4894
  localStorage.setItem("localTopic", JSON.stringify(recentTopics));
4866
4895
  } catch (error) {
4867
- console.error("\u4FDD\u5B58\u6700\u8FD1\u4F7F\u7528\u8BDD\u9898\u5931\u8D25:", error);
4896
+ console.error("保存最近使用话题失败:", error);
4868
4897
  }
4869
4898
  },
4899
+ // 创建全局话题弹框
4870
4900
  createGlobalTopicPopover() {
4871
4901
  this.removeGlobalTopicPopover();
4872
4902
  const mask = document.createElement("div");
@@ -4890,6 +4920,7 @@ const _sfc_main$3 = {
4890
4920
  this.topicPopover.globalContainer = container;
4891
4921
  this.bindTopicPopoverEvents();
4892
4922
  },
4923
+ // 移除全局话题弹框
4893
4924
  removeGlobalTopicPopover() {
4894
4925
  if (this.topicPopover.globalMask) {
4895
4926
  document.body.removeChild(this.topicPopover.globalMask);
@@ -4900,12 +4931,14 @@ const _sfc_main$3 = {
4900
4931
  this.topicPopover.globalContainer = null;
4901
4932
  }
4902
4933
  },
4934
+ // 更新全局话题弹框内容
4903
4935
  updateGlobalTopicPopover() {
4904
4936
  if (!this.topicPopover.globalContainer)
4905
4937
  return;
4906
4938
  this.topicPopover.globalContainer.innerHTML = this.createTopicPopoverContent();
4907
4939
  this.bindTopicPopoverEvents();
4908
4940
  },
4941
+ // 增量添加热门话题到DOM,避免重绘
4909
4942
  appendHotTopicsToDOM() {
4910
4943
  if (!this.topicPopover.globalContainer || this.topicPopover.newHotTopicsCount === 0)
4911
4944
  return;
@@ -4919,6 +4952,7 @@ const _sfc_main$3 = {
4919
4952
  const topicElement = document.createElement("div");
4920
4953
  topicElement.className = "topic-item";
4921
4954
  topicElement.setAttribute("data-topic-id", topic.id);
4955
+ topicElement.setAttribute("data-topic-type", topic.type);
4922
4956
  topicElement.textContent = `#${topic.title}`;
4923
4957
  topicElement.addEventListener("click", () => {
4924
4958
  this.insertTopicToEditor(topic);
@@ -4928,6 +4962,7 @@ const _sfc_main$3 = {
4928
4962
  this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.hasMore);
4929
4963
  this.topicPopover.newHotTopicsCount = 0;
4930
4964
  },
4965
+ // 增量添加搜索话题到DOM,避免重绘
4931
4966
  appendSearchTopicsToDOM() {
4932
4967
  if (!this.topicPopover.globalContainer || this.topicPopover.newSearchTopicsCount === 0)
4933
4968
  return;
@@ -4941,6 +4976,7 @@ const _sfc_main$3 = {
4941
4976
  const topicElement = document.createElement("div");
4942
4977
  topicElement.className = "topic-item";
4943
4978
  topicElement.setAttribute("data-topic-id", topic.id);
4979
+ topicElement.setAttribute("data-topic-type", topic.type);
4944
4980
  topicElement.textContent = `#${topic.exactlyMatchTitle || topic.title}`;
4945
4981
  topicElement.addEventListener("click", () => {
4946
4982
  this.insertTopicToEditor(topic);
@@ -4950,6 +4986,7 @@ const _sfc_main$3 = {
4950
4986
  this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.searchHasMore);
4951
4987
  this.topicPopover.newSearchTopicsCount = 0;
4952
4988
  },
4989
+ // 更新加载状态显示
4953
4990
  updateLoadingState(topicList, loading, hasMore) {
4954
4991
  const existingLoading = topicList.querySelector(".topic-loading");
4955
4992
  const existingEmpty = topicList.querySelector(".topic-empty");
@@ -4960,15 +4997,16 @@ const _sfc_main$3 = {
4960
4997
  if (loading) {
4961
4998
  const loadingElement = document.createElement("div");
4962
4999
  loadingElement.className = "topic-loading";
4963
- loadingElement.textContent = "\u52A0\u8F7D\u66F4\u591A...";
5000
+ loadingElement.textContent = "加载更多...";
4964
5001
  topicList.appendChild(loadingElement);
4965
5002
  } else if (!hasMore) {
4966
5003
  const emptyElement = document.createElement("div");
4967
5004
  emptyElement.className = "topic-empty";
4968
- emptyElement.textContent = "\u6CA1\u6709\u66F4\u591A\u4E86";
5005
+ emptyElement.textContent = "没有更多了";
4969
5006
  topicList.appendChild(emptyElement);
4970
5007
  }
4971
5008
  },
5009
+ // 创建话题弹框内容
4972
5010
  createTopicPopoverContent() {
4973
5011
  if (this.topicPopover.type === "hot") {
4974
5012
  return this.getHotTopicPopoverHTML();
@@ -4977,6 +5015,7 @@ const _sfc_main$3 = {
4977
5015
  }
4978
5016
  return "";
4979
5017
  },
5018
+ // 获取热门话题弹框HTML
4980
5019
  getHotTopicPopoverHTML() {
4981
5020
  const activeTab = this.topicPopover.activeTab;
4982
5021
  const hotTopics = this.topicPopover.hotTopics;
@@ -4986,25 +5025,25 @@ const _sfc_main$3 = {
4986
5025
  let topicListHTML = "";
4987
5026
  if (activeTab === "hot") {
4988
5027
  if (loading && hotTopics.length === 0) {
4989
- topicListHTML = '<div class="topic-loading">\u52A0\u8F7D\u4E2D...</div>';
5028
+ topicListHTML = '<div class="topic-loading">加载中...</div>';
4990
5029
  } else if (hotTopics.length === 0) {
4991
- topicListHTML = '<div class="topic-empty">\u6682\u65E0\u70ED\u95E8\u8BDD\u9898</div>';
5030
+ topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
4992
5031
  } else {
4993
5032
  topicListHTML = hotTopics.map(
4994
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
5033
+ (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
4995
5034
  ).join("");
4996
5035
  if (loading) {
4997
- topicListHTML += '<div class="topic-loading">\u52A0\u8F7D\u66F4\u591A...</div>';
5036
+ topicListHTML += '<div class="topic-loading">加载更多...</div>';
4998
5037
  } else if (!hasMore) {
4999
- topicListHTML += '<div class="topic-empty">\u6CA1\u6709\u66F4\u591A\u4E86</div>';
5038
+ topicListHTML += '<div class="topic-empty">没有更多了</div>';
5000
5039
  }
5001
5040
  }
5002
5041
  } else {
5003
5042
  if (recentTopics.length === 0) {
5004
- topicListHTML = '<div class="topic-empty">\u6682\u65E0\u6700\u8FD1\u4F7F\u7528\u8BB0\u5F55</div>';
5043
+ topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
5005
5044
  } else {
5006
5045
  topicListHTML = recentTopics.map(
5007
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
5046
+ (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5008
5047
  ).join("");
5009
5048
  }
5010
5049
  }
@@ -5012,10 +5051,10 @@ const _sfc_main$3 = {
5012
5051
  <div class="topic-popover-content">
5013
5052
  <div class="topic-tabs">
5014
5053
  <div class="topic-tab ${activeTab === "hot" ? "active" : ""}" data-tab="hot">
5015
- \u70ED\u95E8\u8BDD\u9898
5054
+ 热门话题
5016
5055
  </div>
5017
5056
  <div class="topic-tab ${activeTab === "recent" ? "active" : ""}" data-tab="recent">
5018
- \u6700\u8FD1\u4F7F\u7528
5057
+ 最近使用
5019
5058
  </div>
5020
5059
  </div>
5021
5060
  <div class="topic-list-container">
@@ -5026,6 +5065,7 @@ const _sfc_main$3 = {
5026
5065
  </div>
5027
5066
  `;
5028
5067
  },
5068
+ // 获取搜索话题弹框HTML
5029
5069
  getSearchTopicPopoverHTML() {
5030
5070
  const searchKeyword = this.topicPopover.searchKeyword;
5031
5071
  const searchTopics = this.topicPopover.searchTopics;
@@ -5033,17 +5073,17 @@ const _sfc_main$3 = {
5033
5073
  const searchHasMore = this.topicPopover.searchHasMore;
5034
5074
  let topicListHTML = "";
5035
5075
  if (loading && searchTopics.length === 0) {
5036
- topicListHTML = '<div class="topic-loading">\u641C\u7D22\u4E2D...</div>';
5076
+ topicListHTML = '<div class="topic-loading">搜索中...</div>';
5037
5077
  } else if (searchTopics.length === 0) {
5038
- topicListHTML = '<div class="topic-empty">\u6CA1\u6709\u5339\u914D\u5230\u8BDD\u9898\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165</div>';
5078
+ topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
5039
5079
  } else {
5040
5080
  topicListHTML = searchTopics.map(
5041
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
5081
+ (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5042
5082
  ).join("");
5043
5083
  if (loading) {
5044
- topicListHTML += '<div class="topic-loading">\u52A0\u8F7D\u66F4\u591A...</div>';
5084
+ topicListHTML += '<div class="topic-loading">加载更多...</div>';
5045
5085
  } else if (!searchHasMore) {
5046
- topicListHTML += '<div class="topic-empty">\u6CA1\u6709\u66F4\u591A\u4E86</div>';
5086
+ topicListHTML += '<div class="topic-empty">没有更多了</div>';
5047
5087
  }
5048
5088
  }
5049
5089
  return `
@@ -5059,6 +5099,7 @@ const _sfc_main$3 = {
5059
5099
  </div>
5060
5100
  `;
5061
5101
  },
5102
+ // 绑定话题弹框事件
5062
5103
  bindTopicPopoverEvents() {
5063
5104
  if (!this.topicPopover.globalContainer)
5064
5105
  return;
@@ -5090,6 +5131,7 @@ const _sfc_main$3 = {
5090
5131
  });
5091
5132
  }
5092
5133
  },
5134
+ // 根据ID查找话题
5093
5135
  findTopicById(topicId) {
5094
5136
  let topic = this.topicPopover.hotTopics.find((t) => t.id === topicId);
5095
5137
  if (topic)
@@ -5206,15 +5248,17 @@ const _sfc_main$3 = {
5206
5248
  const topicElement = document.createElement("mdd-topic");
5207
5249
  topicElement.setAttribute("data-topic", JSON.stringify({
5208
5250
  topicId: topic.id,
5209
- topicType: 0,
5251
+ topicType: topic.type || 0,
5210
5252
  startIndex: 0,
5253
+ // 会在updateTopicPosition中更新
5211
5254
  endIndex: 0
5255
+ // 会在updateTopicPosition中更新
5212
5256
  }));
5213
5257
  topicElement.textContent = topicText;
5214
5258
  topicElement.setAttribute("contenteditable", "false");
5215
5259
  range.deleteContents();
5216
5260
  range.insertNode(topicElement);
5217
- const spaceNode = document.createTextNode("\xA0");
5261
+ const spaceNode = document.createTextNode(" ");
5218
5262
  range.setStartAfter(topicElement);
5219
5263
  range.insertNode(spaceNode);
5220
5264
  const newRange = document.createRange();
@@ -5238,6 +5282,7 @@ const _sfc_main$3 = {
5238
5282
  }, 0);
5239
5283
  this.$emit("update-topic-position");
5240
5284
  },
5285
+ // 销毁话题管理器
5241
5286
  destroy() {
5242
5287
  this.unbindEditorEvents();
5243
5288
  this.hideTopicPopover();
@@ -5306,14 +5351,12 @@ const _sfc_main$2 = {
5306
5351
  setStatus(val) {
5307
5352
  this.$emit("update:visible", val);
5308
5353
  }
5354
+ // submit() {
5355
+ // this.$emit('submit')
5356
+ // }
5309
5357
  }
5310
5358
  };
5311
- const _hoisted_1$2 = /* @__PURE__ */ createElementVNode("div", null, [
5312
- /* @__PURE__ */ createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
5313
- /* @__PURE__ */ createElementVNode("span", { class: "collect-article_lable" }, "\u5982\u9700\u83B7\u5F97\u6B63\u5F0F\u4F7F\u7528\u6743\uFF0C\u8BF7\u81EA\u884C\u8054\u7CFB\u7248\u6743\u6240\u6709\u8005")
5314
- ], -1);
5315
- const _hoisted_2$2 = { class: "collect-article_content" };
5316
- const _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "tip" }, "\u8BF7\u628A\u9700\u8981\u91C7\u96C6\u7684\u6587\u7AE0\u94FE\u63A5\u7C98\u8D34\u5728\u4E0B\u65B9\u7684\u8F93\u5165\u6846\uFF1A", -1);
5359
+ const _hoisted_1$2 = { class: "collect-article_content" };
5317
5360
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5318
5361
  const _component_el_input = resolveComponent("el-input");
5319
5362
  const _component_BasicDialog = resolveComponent("BasicDialog");
@@ -5322,16 +5365,19 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5322
5365
  width: "600px",
5323
5366
  height: "50px"
5324
5367
  }, {
5325
- title: withCtx(() => [
5326
- _hoisted_1$2
5327
- ]),
5368
+ title: withCtx(() => _cache[1] || (_cache[1] = [
5369
+ createElementVNode("div", null, [
5370
+ createElementVNode("span", null, "采集文章"),
5371
+ createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
5372
+ ], -1)
5373
+ ])),
5328
5374
  default: withCtx(() => [
5329
- createElementVNode("div", _hoisted_2$2, [
5330
- _hoisted_3$2,
5375
+ createElementVNode("div", _hoisted_1$2, [
5376
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
5331
5377
  createVNode(_component_el_input, {
5332
5378
  modelValue: $options.input,
5333
5379
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
5334
- placeholder: "\u4EC5\u652F\u6301\u5FAE\u4FE1\u94FE\u63A5"
5380
+ placeholder: "仅支持微信链接"
5335
5381
  }, null, 8, ["modelValue"])
5336
5382
  ])
5337
5383
  ]),
@@ -5339,7 +5385,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5339
5385
  }, 8, ["visible"]);
5340
5386
  }
5341
5387
  const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
5342
- const index_vue_vue_type_style_index_0_scoped_true_lang = "";
5388
+ const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
5343
5389
  const _sfc_main$1 = {
5344
5390
  components: {
5345
5391
  ElIconError: CircleCloseFilled
@@ -5370,8 +5416,8 @@ const _hoisted_1$1 = {
5370
5416
  };
5371
5417
  const _hoisted_2$1 = ["src"];
5372
5418
  const _hoisted_3$1 = { class: "article-item_right" };
5373
- const _hoisted_4$1 = { class: "name" };
5374
- const _hoisted_5$1 = { class: "score" };
5419
+ const _hoisted_4 = { class: "name" };
5420
+ const _hoisted_5 = { class: "score" };
5375
5421
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
5376
5422
  const _component_el_icon_error = resolveComponent("el-icon-error");
5377
5423
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
@@ -5381,11 +5427,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
5381
5427
  alt: ""
5382
5428
  }, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
5383
5429
  createElementVNode("div", _hoisted_3$1, [
5384
- createElementVNode("div", _hoisted_4$1, toDisplayString($props.article.title), 1),
5385
- createElementVNode("div", _hoisted_5$1, [
5430
+ createElementVNode("div", _hoisted_4, toDisplayString($props.article.title), 1),
5431
+ createElementVNode("div", _hoisted_5, [
5386
5432
  createElementVNode("span", null, toDisplayString($props.article.author), 1),
5387
- createElementVNode("span", null, toDisplayString($props.article.viewNum) + "\u6D4F\u89C8", 1),
5388
- createElementVNode("span", null, toDisplayString($props.article.replycnt) + "\u8BC4\u8BBA", 1)
5433
+ createElementVNode("span", null, toDisplayString($props.article.viewNum) + "浏览", 1),
5434
+ createElementVNode("span", null, toDisplayString($props.article.replycnt) + "评论", 1)
5389
5435
  ])
5390
5436
  ]),
5391
5437
  createVNode(_component_el_icon_error, {
@@ -5397,10 +5443,10 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
5397
5443
  class: normalizeClass([{
5398
5444
  "article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
5399
5445
  }, "article-bg"])
5400
- }, " \u5E73\u53F0\u4EC5\u652F\u6301\u5C55\u793A18\u4E2A\u6708\u7684\u63A8\u8350\u5185\u5BB9 ", 2)) : createCommentVNode("", true)
5446
+ }, " 平台仅支持展示18个月的推荐内容 ", 2)) : createCommentVNode("", true)
5401
5447
  ]);
5402
5448
  }
5403
- const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-45d58d86"]]);
5449
+ const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
5404
5450
  const mountArticleDom = (props, del) => {
5405
5451
  const className = "article-wrap";
5406
5452
  const article = props.article;
@@ -5460,6 +5506,7 @@ const _sfc_main = {
5460
5506
  hasArticleCard: false,
5461
5507
  cursorStyle: "auto",
5462
5508
  titleCount: 0,
5509
+ // 标题数量
5463
5510
  viewLinkDialog: false,
5464
5511
  linkForm: {
5465
5512
  linkAddress: "",
@@ -5467,39 +5514,54 @@ const _sfc_main = {
5467
5514
  },
5468
5515
  setAlignFlag: true,
5469
5516
  article: {},
5517
+ // 插入的文章
5470
5518
  imgList: [],
5471
5519
  imgNum: 20,
5472
5520
  videoList: [],
5473
5521
  visibleVideo: false,
5474
5522
  visibleCollectArticle: false,
5475
5523
  visibleArticle: false,
5524
+ // 插入文章
5476
5525
  visibleImg: false,
5526
+ // 插入图片
5477
5527
  imgType: "normal",
5528
+ //
5478
5529
  typeEnum: {
5479
- \u6587\u5B57: "1",
5480
- \u56FE\u7247: "2",
5481
- \u56FE\u6587: "3",
5482
- \u6BB5\u843D\u6807\u9898: "4",
5483
- \u5173\u8054: "5",
5484
- \u5355\u89C6\u9891: "6",
5485
- \u89C6\u9891\u6587\u5B57: "7",
5530
+ 文字: "1",
5531
+ 图片: "2",
5532
+ 图文: "3",
5533
+ 段落标题: "4",
5534
+ 关联: "5",
5535
+ // 关联车辆、轨迹、活动、商家、话题
5536
+ 单视频: "6",
5537
+ 视频文字: "7",
5486
5538
  URL: "8",
5487
- \u6587\u7AE0\u5361\u7247: "11"
5539
+ 文章卡片: "11"
5488
5540
  },
5489
5541
  fontInfo: {
5490
5542
  size: ""
5491
5543
  },
5492
5544
  user: {},
5545
+ // 用户
5493
5546
  editor: {},
5547
+ // 编辑器实例对象
5494
5548
  editorDom: {},
5549
+ // 编辑器Dom
5495
5550
  uploadStore: {},
5551
+ // 待上传的图片池
5496
5552
  linkContent: "",
5553
+ // 插入链接的地址
5497
5554
  loadingText: "",
5555
+ // loaing的提示文字
5498
5556
  progressPercent: "",
5557
+ // 上传进度
5499
5558
  currentIndex: 0,
5500
5559
  loading: false,
5560
+ // 是否提交中
5501
5561
  viewStatus: false,
5562
+ // todo: 改名
5502
5563
  linkStatus: false,
5564
+ // todo: 改名
5503
5565
  styleStatus: {
5504
5566
  bold: false,
5505
5567
  italic: false,
@@ -5523,6 +5585,7 @@ const _sfc_main = {
5523
5585
  targetMove: "",
5524
5586
  moverClasses: ["halo-img-content", "halo-video-content"],
5525
5587
  selectDom: null
5588
+ //选中的dom
5526
5589
  };
5527
5590
  },
5528
5591
  computed: {
@@ -5539,12 +5602,12 @@ const _sfc_main = {
5539
5602
  watch: {
5540
5603
  progressPercent(val) {
5541
5604
  const inner = document.querySelector(".video-progress .inner");
5542
- console.log(val, "\u89C6\u9891\u4E0A\u4F20\u8FDB\u5EA6");
5605
+ console.log(val, "视频上传进度");
5543
5606
  if (inner) {
5544
5607
  inner.style.width = val + "%";
5545
5608
  if (val === 100) {
5546
5609
  document.querySelector(".video-progress").innerHTML = `
5547
- <div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">\u6B63\u5728\u83B7\u53D6\u89C6\u9891\u5C01\u9762</div>
5610
+ <div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
5548
5611
  `;
5549
5612
  }
5550
5613
  }
@@ -5573,7 +5636,7 @@ const _sfc_main = {
5573
5636
  me2.editorDom = document.getElementById("editor-content");
5574
5637
  me2.editorDom.addEventListener("blur", this.canSetAlign);
5575
5638
  if (!window.Squire) {
5576
- import("./squire-raw.3e73a64b.js").then(function() {
5639
+ import("./squire-raw-1aaeff0b.js").then(function() {
5577
5640
  me2.initSquire();
5578
5641
  });
5579
5642
  } else {
@@ -5633,10 +5696,10 @@ const _sfc_main = {
5633
5696
  this.visibleVideo = false;
5634
5697
  const fileName = (files[0] && files[0].name || "").toLowerCase();
5635
5698
  if (files[0].size > 1 * 1024 * 1024 * 1024) {
5636
- return me2.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
5699
+ return me2.setToast("视频大小不能超过1GB");
5637
5700
  }
5638
5701
  if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
5639
- return me2.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
5702
+ return me2.setToast("视频格式不是mp4或mov");
5640
5703
  }
5641
5704
  const me2 = this;
5642
5705
  if (me2.loading)
@@ -5656,7 +5719,9 @@ const _sfc_main = {
5656
5719
  id: result.videoId,
5657
5720
  desc: "",
5658
5721
  vodSize: result.vodSize || "",
5722
+ // 视频大小
5659
5723
  vodType: result.vodType || ""
5724
+ // 图片尺寸
5660
5725
  };
5661
5726
  me2.$emit("updateAddVideo", true);
5662
5727
  me2.editor["insertVideo"](result.videoUrl, video);
@@ -5710,11 +5775,11 @@ const _sfc_main = {
5710
5775
  },
5711
5776
  insertLink() {
5712
5777
  if (!this.linkForm.linkAddress)
5713
- return ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740");
5778
+ return ElMessage.error("请输入链接地址");
5714
5779
  if (!this.linkForm.linkWriting)
5715
- return ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u6587\u6848");
5780
+ return ElMessage.error("请输入链接文案");
5716
5781
  if (!this.validUrl(this.linkForm.linkAddress)) {
5717
- return this.setToast("URL\u65E0\u6548");
5782
+ return this.setToast("URL无效");
5718
5783
  }
5719
5784
  this.editor.insertLink(
5720
5785
  this.linkForm.linkAddress,
@@ -5743,6 +5808,7 @@ const _sfc_main = {
5743
5808
  });
5744
5809
  });
5745
5810
  },
5811
+ // TopicManager事件处理
5746
5812
  onTopicInserted(topic) {
5747
5813
  this.updateData(true);
5748
5814
  },
@@ -6200,7 +6266,7 @@ const _sfc_main = {
6200
6266
  }
6201
6267
  this.updateData(true);
6202
6268
  } else {
6203
- this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
6269
+ this.setToast(rst.origin.name + "上传失败,请重试");
6204
6270
  }
6205
6271
  },
6206
6272
  insertVideoBtns(editor, node) {
@@ -6215,7 +6281,7 @@ const _sfc_main = {
6215
6281
  me2.currentVideo = node;
6216
6282
  e.stopPropagation();
6217
6283
  };
6218
- replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
6284
+ replaceBtn.innerText = "更换封面";
6219
6285
  return replaceBtn;
6220
6286
  },
6221
6287
  insertImgOperateBtns(editor, data) {
@@ -6241,7 +6307,7 @@ const _sfc_main = {
6241
6307
  maxlength: "50",
6242
6308
  rows: "2",
6243
6309
  cols: "50",
6244
- placeholder: "\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0(\u6700\u591A50\u5B57)",
6310
+ placeholder: "请输入图片描述(最多50字)",
6245
6311
  contenteditable: "false"
6246
6312
  });
6247
6313
  descInput.disabled = me2.disabled;
@@ -6250,7 +6316,7 @@ const _sfc_main = {
6250
6316
  const img = parent.querySelector(".halo-picture-area");
6251
6317
  img.dataset.desc = e.target.value;
6252
6318
  if (e.target.value.length > 49) {
6253
- return me2.setToast("\u9650\u523650\u4E2A\u5B57\u7B26");
6319
+ return me2.setToast("限制50个字符");
6254
6320
  }
6255
6321
  };
6256
6322
  descInput.value = data.content || "";
@@ -6300,7 +6366,7 @@ const _sfc_main = {
6300
6366
  me2.removeParentByClass(e.target, "halo-img-content");
6301
6367
  me2.updateData(true);
6302
6368
  };
6303
- replaceBtn.innerHTML = "\u66FF\u6362";
6369
+ replaceBtn.innerHTML = "替换";
6304
6370
  return [replaceBtn, delBtn, descInputWrap];
6305
6371
  },
6306
6372
  removeSeamlessLaster(e) {
@@ -6324,6 +6390,7 @@ const _sfc_main = {
6324
6390
  }
6325
6391
  }
6326
6392
  },
6393
+ // 初始化编辑器数据,数据是 html 格式(displayData)
6327
6394
  initData(data = "", essayPicRelVOList) {
6328
6395
  this.parseHtml(data, essayPicRelVOList).then((res) => {
6329
6396
  this.editorDom.innerHTML = "";
@@ -6331,10 +6398,13 @@ const _sfc_main = {
6331
6398
  this.updateData();
6332
6399
  });
6333
6400
  },
6401
+ // TODO jsonToHtml、htmlToJson 实现这 2 个方法里面的逻辑,数据结构参考方法里面的注释,出参入参都为字符串,注意:mdd-topic 里面的属性数据 和 json 中的topicPosition数据是一一对应的,startIndex、endIndex为mdd-topic的起止位置 从 content 里面进行分割处理
6402
+ // json、html 数据格式互转,暂时只支持文字、短话题
6334
6403
  jsonToHtml(json) {
6335
6404
  },
6336
6405
  htmlToJson(html) {
6337
6406
  },
6407
+ // 设置富文本组件
6338
6408
  initSquire() {
6339
6409
  const me2 = this;
6340
6410
  const editorDom = me2.editorDom;
@@ -6784,6 +6854,7 @@ const _sfc_main = {
6784
6854
  window.Squire.empty(block)
6785
6855
  ]);
6786
6856
  output.appendChild(
6857
+ // 段落才能添加标题
6787
6858
  Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
6788
6859
  );
6789
6860
  }
@@ -6806,18 +6877,18 @@ const _sfc_main = {
6806
6877
  });
6807
6878
  loading.innerHTML = `
6808
6879
  <img class="img-loading-icon" src="/img/upload-image-loading.png"/>
6809
- <span class="img-loading-tip">\u4E0A\u4F20\u4E2D...</span>
6880
+ <span class="img-loading-tip">上传中...</span>
6810
6881
  `;
6811
6882
  var fail = this.createElement("div", {
6812
6883
  class: "img-fail hide",
6813
6884
  contenteditable: "false"
6814
6885
  });
6815
- fail.innerHTML = "\u4E0A\u4F20\u5931\u8D25<br>\u8BF7\u4E0B\u8F7D\u56FE\u7247\u81F3\u672C\u5730\u540E\u91CD\u65B0\u4E0A\u4F20";
6886
+ fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
6816
6887
  var again = this.createElement("button", {
6817
6888
  class: "img-again hide",
6818
6889
  contenteditable: "false"
6819
6890
  });
6820
- again.innerHTML = "\u91CD\u65B0\u4E0A\u4F20";
6891
+ again.innerHTML = "重新上传";
6821
6892
  const isGif = src && src.indexOf(".gif") > -1;
6822
6893
  if (isGif) {
6823
6894
  src = src.replace(".gif", ".gif!nowater");
@@ -6872,7 +6943,7 @@ const _sfc_main = {
6872
6943
  });
6873
6944
  div.innerHTML = `
6874
6945
  <div class="video-progress">
6875
- <div class="label">\u4E0A\u4F20\u4E2D...</div>
6946
+ <div class="label">上传中...</div>
6876
6947
  <div class="box">
6877
6948
  <div class="inner" style="width:20%"></div>
6878
6949
  </div>
@@ -6895,6 +6966,7 @@ const _sfc_main = {
6895
6966
  data: JSON.stringify(data),
6896
6967
  "data-content": data.content || "",
6897
6968
  poster: data.img || ""
6969
+ // 'contenteditable': 'true',
6898
6970
  });
6899
6971
  var delBtn = me2.genIconDom({
6900
6972
  class: "pointer video-delete icon",
@@ -6952,6 +7024,7 @@ const _sfc_main = {
6952
7024
  }
6953
7025
  };
6954
7026
  },
7027
+ // 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
6955
7028
  setListener(dom) {
6956
7029
  const me2 = this;
6957
7030
  const doms = dom ? [dom] : Array.from(this.editorDom.children);
@@ -6962,7 +7035,7 @@ const _sfc_main = {
6962
7035
  p.onclick = function(e) {
6963
7036
  var _a;
6964
7037
  if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
6965
- me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
7038
+ me2.setToast("不支持播放");
6966
7039
  }
6967
7040
  if (e.target.className.includes("desc-input")) {
6968
7041
  return;
@@ -7026,6 +7099,7 @@ const _sfc_main = {
7026
7099
  };
7027
7100
  return del;
7028
7101
  },
7102
+ // 转换数据,返回给业务
7029
7103
  getEditorData() {
7030
7104
  const me2 = this;
7031
7105
  const children = Array.from(me2.editorDom.children);
@@ -7083,9 +7157,11 @@ const _sfc_main = {
7083
7157
  videoIds
7084
7158
  };
7085
7159
  },
7160
+ // 是否是摩托范的图片
7086
7161
  isHaloImage(url = "") {
7087
7162
  return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1;
7088
7163
  },
7164
+ // 获取待上传图片列表
7089
7165
  updateUploads() {
7090
7166
  const me2 = this;
7091
7167
  setTimeout(() => {
@@ -7132,8 +7208,8 @@ const _sfc_main = {
7132
7208
  const currentImg = me2.uploadStore[key];
7133
7209
  const imageUrl = key.split("|")[1] || "";
7134
7210
  if (!currentImg) {
7135
- console.log("\u56FE\u7247\u4E0D\u5B58\u5728", key);
7136
- return Promise.reject("\u56FE\u7247\u4E0D\u5B58\u5728");
7211
+ console.log("图片不存在", key);
7212
+ return Promise.reject("图片不存在");
7137
7213
  }
7138
7214
  const parent = currentImg.parentNode || "";
7139
7215
  const uploadFailHandler = (currentImg2) => {
@@ -7177,6 +7253,7 @@ const _sfc_main = {
7177
7253
  parent && uploadFailHandler(currentImg);
7178
7254
  });
7179
7255
  },
7256
+ // 更新上传的图片
7180
7257
  updateImage(img, currentImg = {}) {
7181
7258
  const data = JSON.parse(currentImg.getAttribute("data") || "{}");
7182
7259
  data.img = img;
@@ -7199,9 +7276,11 @@ const _sfc_main = {
7199
7276
  parent.appendChild(arr[2]);
7200
7277
  }
7201
7278
  },
7279
+ // 获取ctrl + v 后内容
7202
7280
  getSticker(type, handler) {
7203
7281
  this.setSticker(type.fragment.children);
7204
7282
  },
7283
+ // 粘贴表格内容,tr换行形成段落
7205
7284
  setStickerTableContent(data) {
7206
7285
  const me2 = this;
7207
7286
  const rows = data.querySelectorAll("tr") || [];
@@ -7230,6 +7309,7 @@ const _sfc_main = {
7230
7309
  });
7231
7310
  this.updateData(true);
7232
7311
  },
7312
+ // 粘贴
7233
7313
  setSticker(data) {
7234
7314
  const me2 = this;
7235
7315
  data = Array.from(data);
@@ -7268,6 +7348,7 @@ const _sfc_main = {
7268
7348
  const me2 = this;
7269
7349
  me2.updateData();
7270
7350
  },
7351
+ // 监测 添加、撤回、恢复、删除
7271
7352
  setBack(e, type) {
7272
7353
  const me2 = this;
7273
7354
  me2.refreshImg();
@@ -7300,6 +7381,7 @@ const _sfc_main = {
7300
7381
  }
7301
7382
  });
7302
7383
  },
7384
+ // 设置scoll
7303
7385
  sticky() {
7304
7386
  const me2 = this;
7305
7387
  me2.$nextTick(function() {
@@ -7319,6 +7401,8 @@ const _sfc_main = {
7319
7401
  document.addEventListener("scroll", onScroll);
7320
7402
  });
7321
7403
  },
7404
+ // ==========toolbox==========
7405
+ // 撤回、恢复、段落标题
7322
7406
  setContent(e, obj) {
7323
7407
  const me2 = this;
7324
7408
  const id = e.target.id || e.target.dataset.editorId;
@@ -7360,10 +7444,11 @@ const _sfc_main = {
7360
7444
  this.fontInfo = this.editor.getFontInfo();
7361
7445
  this.updateData(true);
7362
7446
  },
7447
+ // 增加link
7363
7448
  addLink(type) {
7364
7449
  const me2 = this;
7365
- me2.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
7366
- me2.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
7450
+ me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
7451
+ me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
7367
7452
  me2.viewStatus = true;
7368
7453
  me2.linkStatus = true;
7369
7454
  },
@@ -7371,29 +7456,31 @@ const _sfc_main = {
7371
7456
  const objExp = /^(((ht|f)tp(s?)):\/\/)?(www.|[a-zA-Z].)[a-zA-Z0-9-.]+.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|cn|im)(:[0-9]+)*(\/($|[a-zA-Z0-9.,;?'&%$#=~_-]+))*$/;
7372
7457
  return objExp.test(url);
7373
7458
  },
7459
+ // 确认增加link
7374
7460
  confirmLink() {
7375
7461
  const me2 = this;
7376
7462
  if (!me2.linkContent) {
7377
- return ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740\uFF01");
7463
+ return ElMessage.error("请输入链接地址!");
7378
7464
  }
7379
- if (me2.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
7465
+ if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
7380
7466
  this.visibleCollectArticle = false;
7381
7467
  return me2.importLinkData();
7382
7468
  }
7383
7469
  if (!this.validUrl(me2.linkContent)) {
7384
- return me2.setToast("URL\u65E0\u6548");
7470
+ return me2.setToast("URL无效");
7385
7471
  }
7386
7472
  if (!me2.isHaloImage(me2.linkContent)) {
7387
- return me2.setToast("\u8BF7\u8F93\u5165\u6469\u6258\u8303\u5185\u90E8\u7F51\u5740");
7473
+ return me2.setToast("请输入摩托范内部网址");
7388
7474
  }
7389
7475
  me2.editor["insertLink"](me2.linkContent);
7390
7476
  me2.linkContent = "";
7391
7477
  me2.closeDialog();
7392
7478
  },
7479
+ // 增加link导入数据
7393
7480
  importLinkData() {
7394
7481
  const me2 = this;
7395
7482
  if (me2.loading) {
7396
- return ElMessage("\u6B63\u5728\u83B7\u53D6\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E...");
7483
+ return ElMessage("正在获取信息,请稍后...");
7397
7484
  }
7398
7485
  me2.loading = true;
7399
7486
  const params = {
@@ -7415,39 +7502,44 @@ const _sfc_main = {
7415
7502
  me2.linkContent = "";
7416
7503
  return;
7417
7504
  } else {
7418
- me2.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
7505
+ me2.setToast("导入失败,请重试");
7419
7506
  }
7420
7507
  }).catch((err) => {
7421
7508
  console.log(err.message);
7422
- me2.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
7509
+ me2.setToast("导入异常,请重试");
7423
7510
  }).finally((_) => {
7424
7511
  me2.loading = false;
7425
7512
  });
7426
7513
  },
7514
+ // 打开 图片、视频、一键导入 弹框
7427
7515
  openDialog(name) {
7428
7516
  const me2 = this;
7429
- me2.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
7430
- me2.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
7431
- me2.viewTip = name === "img" ? "" : "\u4E3A\u4E86\u83B7\u5F97\u66F4\u9AD8\u7684\u63A8\u8350\u548C\u70B9\u51FB\u91CF\uFF0C\u5EFA\u8BAE\u4E0A\u4F20720p(1280*720)\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC7500MB(\u89C6\u9891\u4E0A\u4F20\u9700\u8981\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85)";
7517
+ me2.viewName = name === "img" ? "添加图片" : "添加视频";
7518
+ me2.viewButton = name === "img" ? "选择图片" : "选择视频";
7519
+ me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
7432
7520
  me2.viewStatus = true;
7433
7521
  },
7522
+ // 关闭弹框
7434
7523
  closeDialog() {
7435
7524
  this.viewStatus = false;
7436
7525
  this.linkStatus = false;
7437
7526
  this.linkContent = "";
7438
7527
  },
7528
+ // ==========toolbox end==========
7529
+ // 弹框提示
7439
7530
  setToast(content) {
7440
7531
  ElMessage.error(content);
7441
7532
  },
7442
7533
  setMessageBoxNoCancel(content) {
7443
7534
  ElMessageBox.confirm(content, "", {
7444
- confirmButtonText: "\u786E\u5B9A",
7445
- cancelButtonText: "\u53D6\u6D88",
7535
+ confirmButtonText: "确定",
7536
+ cancelButtonText: "取消",
7446
7537
  type: "warning"
7447
7538
  }).then(() => {
7448
7539
  }).catch(() => {
7449
7540
  });
7450
7541
  },
7542
+ // 检查是否会创建嵌套的halo-paragraph
7451
7543
  wouldCreateNestedParagraph(range) {
7452
7544
  let container = range.startContainer;
7453
7545
  while (container && container !== this.editorDom) {
@@ -7458,6 +7550,7 @@ const _sfc_main = {
7458
7550
  }
7459
7551
  return false;
7460
7552
  },
7553
+ // 检查光标是否在两个连续的mdd-topic之间
7461
7554
  isBetweenTwoTopics(range) {
7462
7555
  const container = range.startContainer;
7463
7556
  const offset = range.startOffset;
@@ -7473,6 +7566,7 @@ const _sfc_main = {
7473
7566
  }
7474
7567
  return false;
7475
7568
  },
7569
+ // 处理两个话题之间的回车或话题前面的回车
7476
7570
  handleEnterBetweenTopics(range) {
7477
7571
  var _a;
7478
7572
  const me2 = this;
@@ -7510,6 +7604,7 @@ const _sfc_main = {
7510
7604
  selection.addRange(newRange);
7511
7605
  me2.updateData(true);
7512
7606
  },
7607
+ // 更精确地提取光标后的内容(专门用于话题分割)
7513
7608
  extractContentAfterCursorPrecise(range, paragraph) {
7514
7609
  const fragment = document.createDocumentFragment();
7515
7610
  const container = range.startContainer;
@@ -7535,6 +7630,7 @@ const _sfc_main = {
7535
7630
  }
7536
7631
  return fragment;
7537
7632
  },
7633
+ // 处理包含话题的段落中的回车键
7538
7634
  handleEnterKeyInParagraphWithTopic(range) {
7539
7635
  var _a;
7540
7636
  const me2 = this;
@@ -7609,6 +7705,7 @@ const _sfc_main = {
7609
7705
  selection.addRange(newRange);
7610
7706
  me2.updateData(true);
7611
7707
  },
7708
+ // 检查光标是否在第一个话题前面
7612
7709
  isCursorBeforeFirstTopic(range, paragraph) {
7613
7710
  const container = range.startContainer;
7614
7711
  const offset = range.startOffset;
@@ -7670,6 +7767,7 @@ const _sfc_main = {
7670
7767
  }
7671
7768
  return false;
7672
7769
  },
7770
+ // 获取不包含mdd-topic内部文本的段落文本
7673
7771
  getParagraphTextExcludingTopics(paragraph, range) {
7674
7772
  let textContent = "";
7675
7773
  let cursorPosition = 0;
@@ -7700,10 +7798,12 @@ const _sfc_main = {
7700
7798
  }
7701
7799
  return { textContent, cursorPosition };
7702
7800
  },
7801
+ // 检查光标是否在段落开头
7703
7802
  isCursorAtStartOfParagraph(range, paragraph) {
7704
7803
  const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
7705
7804
  return cursorPosition === 0;
7706
7805
  },
7806
+ // 检查光标是否在段落末尾
7707
7807
  isCursorAtEndOfParagraph(range, paragraph) {
7708
7808
  const walker = document.createTreeWalker(
7709
7809
  paragraph,
@@ -7730,6 +7830,7 @@ const _sfc_main = {
7730
7830
  const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
7731
7831
  return cursorPosition >= totalLength;
7732
7832
  },
7833
+ // 获取当前段落
7733
7834
  getCurrentParagraph(range) {
7734
7835
  let container = range.startContainer;
7735
7836
  while (container && container !== this.editorDom) {
@@ -7740,12 +7841,13 @@ const _sfc_main = {
7740
7841
  }
7741
7842
  return null;
7742
7843
  },
7844
+ // 提取光标后的内容
7743
7845
  extractContentAfterCursor(range, paragraph) {
7744
7846
  const fragment = document.createDocumentFragment();
7745
7847
  const container = range.startContainer;
7746
7848
  const offset = range.startOffset;
7747
7849
  let topicSpaceNode = null;
7748
- if (container.nodeType === Node.TEXT_NODE && container.textContent === "\xA0" && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
7850
+ if (container.nodeType === Node.TEXT_NODE && container.textContent === " " && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
7749
7851
  topicSpaceNode = container;
7750
7852
  }
7751
7853
  const extractRange = document.createRange();
@@ -7800,7 +7902,8 @@ const _sfc_main = {
7800
7902
  try {
7801
7903
  extractRange.setStartBefore(startNode);
7802
7904
  let lastNode = paragraph.lastChild;
7803
- while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && lastNode !== startNode) {
7905
+ while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && // 只跳过完全空的文本节点
7906
+ lastNode !== startNode) {
7804
7907
  lastNode = lastNode.previousSibling;
7805
7908
  }
7806
7909
  if (lastNode) {
@@ -7820,6 +7923,7 @@ const _sfc_main = {
7820
7923
  }
7821
7924
  return fragment;
7822
7925
  },
7926
+ // 统一的光标设置方法 - 设置光标到元素后面
7823
7927
  setCursorAfterElement(element) {
7824
7928
  const newRange = document.createRange();
7825
7929
  newRange.setStartAfter(element);
@@ -7828,6 +7932,7 @@ const _sfc_main = {
7828
7932
  selection.removeAllRanges();
7829
7933
  selection.addRange(newRange);
7830
7934
  },
7935
+ // 统一的光标设置方法 - 设置光标到元素前面
7831
7936
  setCursorBeforeElement(element) {
7832
7937
  const newRange = document.createRange();
7833
7938
  newRange.setStartBefore(element);
@@ -7847,8 +7952,6 @@ const _hoisted_3 = {
7847
7952
  slot: "footer",
7848
7953
  class: "dialog-footer"
7849
7954
  };
7850
- const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u53D6 \u6D88");
7851
- const _hoisted_5 = /* @__PURE__ */ createTextVNode("\u786E \u5B9A");
7852
7955
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7853
7956
  const _component_el_input = resolveComponent("el-input");
7854
7957
  const _component_el_form_item = resolveComponent("el-form-item");
@@ -7864,7 +7967,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7864
7967
  withDirectives(createElementVNode("div", {
7865
7968
  style: normalizeStyle({ textAlign: $options.align }),
7866
7969
  class: "placeholder"
7867
- }, toDisplayString($props.placeholder || "\u8BF7\u8F93\u5165\u6B63\u6587"), 5), [
7970
+ }, toDisplayString($props.placeholder || "请输入正文"), 5), [
7868
7971
  [vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
7869
7972
  ]),
7870
7973
  $data.overLine ? (openBlock(), createElementBlock("div", {
@@ -7889,26 +7992,26 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7889
7992
  createVNode(_component_el_form, { model: $data.linkForm }, {
7890
7993
  default: withCtx(() => [
7891
7994
  createVNode(_component_el_form_item, {
7892
- label: "\u6DFB\u52A0\u94FE\u63A5",
7995
+ label: "添加链接",
7893
7996
  class: "link-title"
7894
7997
  }, {
7895
7998
  default: withCtx(() => [
7896
7999
  createVNode(_component_el_input, {
7897
8000
  modelValue: $data.linkForm.linkAddress,
7898
8001
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
7899
- placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"
8002
+ placeholder: "请输入链接地址"
7900
8003
  }, null, 8, ["modelValue"])
7901
8004
  ]),
7902
8005
  _: 1
7903
8006
  }),
7904
- createVNode(_component_el_form_item, { label: "\u94FE\u63A5\u6587\u6848" }, {
8007
+ createVNode(_component_el_form_item, { label: "链接文案" }, {
7905
8008
  default: withCtx(() => [
7906
8009
  createVNode(_component_el_input, {
7907
8010
  modelValue: $data.linkForm.linkWriting,
7908
8011
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
7909
8012
  type: "textarea",
7910
8013
  autosize: "",
7911
- placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u6587\u6848"
8014
+ placeholder: "请输入链接文案"
7912
8015
  }, null, 8, ["modelValue"])
7913
8016
  ]),
7914
8017
  _: 1
@@ -7921,18 +8024,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7921
8024
  createVNode(_component_el_button, {
7922
8025
  onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
7923
8026
  }, {
7924
- default: withCtx(() => [
7925
- _hoisted_4
7926
- ]),
8027
+ default: withCtx(() => _cache[14] || (_cache[14] = [
8028
+ createTextVNode("取 消")
8029
+ ])),
7927
8030
  _: 1
7928
8031
  }),
7929
8032
  createVNode(_component_el_button, {
7930
8033
  type: "primary",
7931
8034
  onClick: $options.insertLink
7932
8035
  }, {
7933
- default: withCtx(() => [
7934
- _hoisted_5
7935
- ]),
8036
+ default: withCtx(() => _cache[15] || (_cache[15] = [
8037
+ createTextVNode("确 定")
8038
+ ])),
7936
8039
  _: 1
7937
8040
  }, 8, ["onClick"])
7938
8041
  ])
@@ -7949,7 +8052,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7949
8052
  }, null, 8, ["article", "visible", "getList", "onDelete", "onChange"]),
7950
8053
  createVNode(_component_ImgUpload, {
7951
8054
  "img-list": $data.imgList,
7952
- "onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
8055
+ "onUpdate:imgList": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
7953
8056
  visible: $data.visibleImg,
7954
8057
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
7955
8058
  chartGallery: $props.chartGallery,
@@ -7964,7 +8067,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7964
8067
  }, null, 8, ["visible", "file-selected"]),
7965
8068
  createVNode(_component_CollectArticle, {
7966
8069
  "link-content": $data.linkContent,
7967
- "onUpdate:link-content": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
8070
+ "onUpdate:linkContent": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
7968
8071
  visible: $data.visibleCollectArticle,
7969
8072
  "onUpdate:visible": _cache[10] || (_cache[10] = ($event) => $data.visibleCollectArticle = $event),
7970
8073
  onSubmit: $options.confirmLink