@haluo/biz 2.0.39 → 2.0.40

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.
@@ -2,6 +2,9 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("element-plus"), require("vue"), require("@element-plus/icons-vue"), require("@haluo/util"), require("vuedraggable")) : typeof define === "function" && define.amd ? define(["exports", "element-plus", "vue", "@element-plus/icons-vue", "@haluo/util", "vuedraggable"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["haluo-biz"] = {}, global2["element-plus"], global2.Vue, global2["@element-plus/icons-vue"], global2.hUtil, global2.vuedraggable));
3
3
  })(this, function(exports2, elementPlus, vue, iconsVue, util, draggable) {
4
4
  "use strict";
5
+ const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
6
+ const util__default = /* @__PURE__ */ _interopDefaultLegacy(util);
7
+ const draggable__default = /* @__PURE__ */ _interopDefaultLegacy(draggable);
5
8
  const __vite_glob_0_1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLBAMAAADKYGfZAAAAG1BMVEUAAAAAAABHcExSUlLz8/P////IyMifn5/k5OQx49C2AAAACXRSTlMzZgB/7//CpN1ci7LLAAABHUlEQVR4AY3TgUbAUBjF8e0NmiiAY28QIYCkXqB9GUBIT7AHCHvvss3l73Y4g3vx87ft3m8Yp+C5GZSxecyYMuZzZMqYz5EpYz5Hpoz5HJkS1uceP67N7TeYyF7r59xs9XmxlgNbj/W+6hmMua86c9vfCsbcXdV6xpYHsj53xF4msj7XYmB97oqB9bmlxcC6XIuBdbkWI2Nur3qfyFouqc0K3g05/6XI+f+GnD8F5NyZMmdvCHP2vjFX7vYyt7tZYO7p7f/JYs7NKXMZk2fMZUyeMZcxecZcxuQZcxmTZ8xlTJ4xlzF5xlzG5BlzGZNnzGVMnjGXMXnGXMbkGXMZk2fMZUyeMZcxecZcxuQZcxmTZ8xlTJ4xlzFlbB5+AVncQI3j46OFAAAAAElFTkSuQmCC";
6
9
  const __vite_glob_0_2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkU2MThGQUEzOUM3QTExRThBMkI0RDI5RUQ4MzE1NUMwIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkU2MThGQUE0OUM3QTExRThBMkI0RDI5RUQ4MzE1NUMwIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RTYxOEZBQTE5QzdBMTFFOEEyQjREMjlFRDgzMTU1QzAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RTYxOEZBQTI5QzdBMTFFOEEyQjREMjlFRDgzMTU1QzAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6cZvOcAAABiklEQVR42uyXu0rEQBRAs3GxtlHEIqDFioWIkA+wUBCsFKwUGxdRrHSx8Ed8gIWlIKyICKIigu0uYmFjIbIfIFqJyhrPwC3CEIvNZEKEGThMHpAcJvcxKUVR5BV5+F7BhxN0gk7QCTpBSyMMw37oLqQgYgNMt1A3lfQtyd3AMMyYSvoW5dTcMpX0LcrNw5SpZCntdouXxU974U6Te5V7FbiCAM5hrtFofOW9gj3wJnILsAhdcu8JLuR4GiY6eXDZUKxPVu8RNuAZdmFWVnMd9mEF2lBl9S7zElQxdy2fchOacCRy6tpBgtxhLkkSS4gR+IQXTW4SVk3lUgkmZKuKuT1N7htGZU4t13EW/yG3o8n9wAOMq8xF7tQkyMuGde4dPrTPOgbLcC94uQgytkVOFd61WJ1bgkHYisXckGR2rruZmhTaQApvRa63NbkqnGXVoTqNQdWq6tK6WtLKallka2atLkEysCWXuhdrktbkTDcLSvIYTmzJGQm6nyYn6ASdoBN0gv9D8FeAAQD7bZlccR+RLgAAAABJRU5ErkJggg==";
7
10
  const __vite_glob_0_3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAA8CAYAAAAOhRhuAAAAAXNSR0IArs4c6QAAALZJREFUaEPtlLENwCAMBGEilmAOhmNMmkTp0h1BLqzoIlGdYqzzm7rWukqir9oQTENDFFcNaYgMEDdDGiIDxM2QhsgAcTMUYmjOSXWOeGutPOf9bY2s9350If00xijP+dwQFY7kW4YiL6RaNqQhMkB8K0Pp1j7dw0iaI/nWyCIvpFo29E9D6bYs3TtEc4/kbhnZ1NA/DaVb+3QPI809krtlZFNDGiIDxM2QhsgAcTOkITJAPF2GbhF2A9gQfAOGAAAAAElFTkSuQmCC";
@@ -110,6 +113,7 @@
110
113
  }
111
114
  const D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, R = "__vueuse_ssr_handlers__";
112
115
  D[R] = D[R] || {};
116
+ D[R];
113
117
  var q;
114
118
  (function(e) {
115
119
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
@@ -151,7 +155,7 @@
151
155
  ke({
152
156
  linear: me
153
157
  }, he);
154
- const J = (e) => (vue.pushScopeId("data-v-b46fc003"), e = e(), vue.popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "主题颜色", -1)), Ee = { class: "tColor" }, Pe = ["onMouseover", "onClick"], Me = { class: "bColor" }, Ae = ["onMouseover", "onClick"], $e = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "标准颜色", -1)), Te = { class: "tColor" }, Be = ["onMouseover", "onClick"], Ve = {
158
+ const J = (e) => (vue.pushScopeId("data-v-b46fc003"), e = e(), vue.popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "\u4E3B\u9898\u989C\u8272", -1)), Ee = { class: "tColor" }, Pe = ["onMouseover", "onClick"], Me = { class: "bColor" }, Ae = ["onMouseover", "onClick"], $e = /* @__PURE__ */ J(() => /* @__PURE__ */ vue.createElementVNode("h3", null, "\u6807\u51C6\u989C\u8272", -1)), Te = { class: "tColor" }, Be = ["onMouseover", "onClick"], Ve = {
155
159
  name: "colorPicker"
156
160
  }, Ne = /* @__PURE__ */ vue.defineComponent({
157
161
  ...Ve,
@@ -216,13 +220,13 @@
216
220
  l.stopPropagation();
217
221
  })
218
222
  }, [
219
- vue.createCommentVNode(" 颜色显示小方块 "),
223
+ vue.createCommentVNode(" \u989C\u8272\u663E\u793A\u5C0F\u65B9\u5757 "),
220
224
  vue.createElementVNode("div", {
221
225
  class: vue.normalizeClass(["colorBtn", { disabled: e.disabled }]),
222
226
  style: vue.normalizeStyle(`background-color: ${vue.unref(a)}`),
223
227
  onClick: p
224
228
  }, null, 6),
225
- vue.createCommentVNode(" 颜色色盘 "),
229
+ vue.createCommentVNode(" \u989C\u8272\u8272\u76D8 "),
226
230
  vue.createElementVNode("div", {
227
231
  class: vue.normalizeClass(["box", { open: s.value }])
228
232
  }, [
@@ -236,7 +240,7 @@
236
240
  onClick: Y,
237
241
  onMouseover: r[0] || (r[0] = (l) => d(e.defaultColor)),
238
242
  onMouseout: r[1] || (r[1] = (l) => d(""))
239
- }, "默认颜色", 32)
243
+ }, "\u9ED8\u8BA4\u989C\u8272", 32)
240
244
  ]),
241
245
  vue.createElementVNode("div", Oe, [
242
246
  Ie,
@@ -272,8 +276,8 @@
272
276
  onClick: (f) => E(l)
273
277
  }, null, 44, Be)), 64))
274
278
  ]),
275
- vue.createElementVNode("h3", { onClick: X }, "更多颜色..."),
276
- vue.createCommentVNode(" 用以激活HTML5颜色面板 "),
279
+ vue.createElementVNode("h3", { onClick: X }, "\u66F4\u591A\u989C\u8272..."),
280
+ vue.createCommentVNode(" \u7528\u4EE5\u6FC0\u6D3BHTML5\u989C\u8272\u9762\u677F "),
277
281
  vue.withDirectives(vue.createElementVNode("input", {
278
282
  type: "color",
279
283
  ref_key: "html5ColorEl",
@@ -307,7 +311,7 @@
307
311
  colorPicker: O
308
312
  };
309
313
  const style = "";
310
- const ToolBar_vue_vue_type_style_index_0_scoped_50235bb8_lang = "";
314
+ const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
311
315
  const ToolBar_vue_vue_type_style_index_1_lang = "";
312
316
  const _export_sfc = (sfc, props) => {
313
317
  const target = sfc.__vccOpts || sfc;
@@ -316,7 +320,7 @@
316
320
  }
317
321
  return target;
318
322
  };
319
- const _sfc_main$8 = {
323
+ const _sfc_main$7 = {
320
324
  components: {
321
325
  ElTooltip: elementPlus.ElTooltip,
322
326
  ElDivider: elementPlus.ElDivider,
@@ -337,15 +341,15 @@
337
341
  activeImgType: false,
338
342
  activeAlign: "",
339
343
  alignMethods: [
340
- { value: "left", name: "左对齐" },
341
- { value: "right", name: "右对齐" },
342
- { value: "center", name: "居中对齐" },
343
- { value: "justify", name: "两端对齐" }
344
+ { value: "left", name: "\u5DE6\u5BF9\u9F50" },
345
+ { value: "right", name: "\u53F3\u5BF9\u9F50" },
346
+ { value: "center", name: "\u5C45\u4E2D\u5BF9\u9F50" },
347
+ { value: "justify", name: "\u4E24\u7AEF\u5BF9\u9F50" }
344
348
  ],
345
349
  activeFontsize: "17",
346
350
  fontsizes: [
347
- { value: "17px", name: "17", desc: "默认正文字号" },
348
- { value: "18px", name: "18", desc: "默认标题字号" },
351
+ { value: "17px", name: "17", desc: "\u9ED8\u8BA4\u6B63\u6587\u5B57\u53F7" },
352
+ { value: "18px", name: "18", desc: "\u9ED8\u8BA4\u6807\u9898\u5B57\u53F7" },
349
353
  { value: "19px", name: "19" },
350
354
  { value: "20px", name: "20" },
351
355
  { value: "24px", name: "24" },
@@ -426,7 +430,7 @@
426
430
  this.editor.clearFormat();
427
431
  },
428
432
  setColor(val) {
429
- console.log("文字颜色");
433
+ console.log("\u6587\u5B57\u989C\u8272");
430
434
  this.updatePosition(() => {
431
435
  this.editor.setColor(val);
432
436
  });
@@ -485,7 +489,6 @@
485
489
  this.popoverVisibleList = false;
486
490
  this.popoverVisibleImg = false;
487
491
  },
488
- // todo 富文本设置样式位置会回到顶部
489
492
  updatePosition(fn) {
490
493
  const scrollTop = document.documentElement.scrollTop;
491
494
  fn && fn();
@@ -518,13 +521,13 @@
518
521
  }
519
522
  }
520
523
  };
521
- const _hoisted_1$8 = {
524
+ const _hoisted_1$7 = {
522
525
  key: 0,
523
526
  class: "tools"
524
527
  };
525
- const _hoisted_2$5 = { class: "tools-content" };
526
- const _hoisted_3$5 = ["src"];
527
- const _hoisted_4$3 = ["src"];
528
+ const _hoisted_2$7 = { class: "tools-content" };
529
+ const _hoisted_3$7 = ["src"];
530
+ const _hoisted_4$4 = ["src"];
528
531
  const _hoisted_5$3 = ["src"];
529
532
  const _hoisted_6$2 = { class: "box" };
530
533
  const _hoisted_7$2 = ["src"];
@@ -565,9 +568,9 @@
565
568
  key: 0,
566
569
  class: "box-mask"
567
570
  };
568
- const _hoisted_30 = { class: "box" };
569
- const _hoisted_31 = ["src"];
570
- const _hoisted_32 = ["src"];
571
+ const _hoisted_30$1 = { class: "box" };
572
+ const _hoisted_31$1 = ["src"];
573
+ const _hoisted_32$1 = ["src"];
571
574
  const _hoisted_33 = ["src"];
572
575
  const _hoisted_34 = ["src"];
573
576
  const _hoisted_35 = { class: "tools-title" };
@@ -584,18 +587,18 @@
584
587
  const _hoisted_43 = ["src"];
585
588
  const _hoisted_44 = ["src"];
586
589
  const _hoisted_45 = ["src"];
587
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
590
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
588
591
  const _component_el_tooltip = vue.resolveComponent("el-tooltip");
589
592
  const _component_el_divider = vue.resolveComponent("el-divider");
590
593
  const _component_el_popover = vue.resolveComponent("el-popover");
591
594
  const _component_colorPicker = vue.resolveComponent("colorPicker");
592
595
  const _directive_click_outside = vue.resolveDirective("click-outside");
593
- return $props.editor.fontInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
594
- vue.createElementVNode("div", _hoisted_2$5, [
596
+ return $props.editor.fontInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
597
+ vue.createElementVNode("div", _hoisted_2$7, [
595
598
  vue.createVNode(_component_el_tooltip, {
596
599
  class: "item",
597
600
  effect: "dark",
598
- content: "撤回",
601
+ content: "\u64A4\u56DE",
599
602
  placement: "top"
600
603
  }, {
601
604
  default: vue.withCtx(() => [
@@ -607,14 +610,14 @@
607
610
  height: "40",
608
611
  alt: "",
609
612
  onClick: _cache[0] || (_cache[0] = ($event) => $options.back($event))
610
- }, null, 12, _hoisted_3$5)
613
+ }, null, 12, _hoisted_3$7)
611
614
  ]),
612
615
  _: 1
613
616
  }),
614
617
  vue.createVNode(_component_el_tooltip, {
615
618
  class: "item",
616
619
  effect: "dark",
617
- content: "反撤回",
620
+ content: "\u53CD\u64A4\u56DE",
618
621
  placement: "top"
619
622
  }, {
620
623
  default: vue.withCtx(() => [
@@ -626,7 +629,7 @@
626
629
  height: "40",
627
630
  alt: "",
628
631
  onClick: _cache[1] || (_cache[1] = ($event) => $options.forward($event))
629
- }, null, 12, _hoisted_4$3)
632
+ }, null, 12, _hoisted_4$4)
630
633
  ]),
631
634
  _: 1
632
635
  }),
@@ -637,7 +640,7 @@
637
640
  vue.createVNode(_component_el_tooltip, {
638
641
  class: "item",
639
642
  effect: "dark",
640
- content: "清除格式",
643
+ content: "\u6E05\u9664\u683C\u5F0F",
641
644
  placement: "top"
642
645
  }, {
643
646
  default: vue.withCtx(() => [
@@ -654,7 +657,7 @@
654
657
  vue.createVNode(_component_el_tooltip, {
655
658
  class: "item",
656
659
  effect: "dark",
657
- content: "格式刷",
660
+ content: "\u683C\u5F0F\u5237",
658
661
  placement: "top"
659
662
  }, {
660
663
  default: vue.withCtx(() => [
@@ -685,7 +688,7 @@
685
688
  vue.createVNode(_component_el_tooltip, {
686
689
  class: "item",
687
690
  effect: "dark",
688
- content: "字号",
691
+ content: "\u5B57\u53F7",
689
692
  placement: "top"
690
693
  }, {
691
694
  default: vue.withCtx(() => [
@@ -735,7 +738,7 @@
735
738
  vue.createVNode(_component_el_tooltip, {
736
739
  class: "item",
737
740
  effect: "dark",
738
- content: "标题",
741
+ content: "\u6807\u9898",
739
742
  placement: "top"
740
743
  }, {
741
744
  default: vue.withCtx(() => [
@@ -756,7 +759,7 @@
756
759
  vue.createVNode(_component_el_tooltip, {
757
760
  class: "item",
758
761
  effect: "dark",
759
- content: "加粗",
762
+ content: "\u52A0\u7C97",
760
763
  placement: "top"
761
764
  }, {
762
765
  default: vue.withCtx(() => [
@@ -784,7 +787,7 @@
784
787
  vue.createVNode(_component_el_tooltip, {
785
788
  class: "item",
786
789
  effect: "dark",
787
- content: "列表",
790
+ content: "\u5217\u8868",
788
791
  placement: "top"
789
792
  }, {
790
793
  default: vue.withCtx(() => [
@@ -818,13 +821,13 @@
818
821
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
819
822
  $options.setStyle("makeUnorderedList");
820
823
  }))
821
- }, "无序列表"),
824
+ }, "\u65E0\u5E8F\u5217\u8868"),
822
825
  vue.createElementVNode("li", {
823
826
  "data-editor-id": "makeHeader",
824
827
  onClick: _cache[9] || (_cache[9] = ($event) => $options.updatePosition(() => {
825
828
  $options.setStyle("makeOrderedList");
826
829
  }))
827
- }, "有序列表")
830
+ }, "\u6709\u5E8F\u5217\u8868")
828
831
  ])), [
829
832
  [_directive_click_outside, $options.handlePopover]
830
833
  ])
@@ -835,7 +838,7 @@
835
838
  vue.createVNode(_component_el_tooltip, {
836
839
  class: "item",
837
840
  effect: "dark",
838
- content: "倾斜",
841
+ content: "\u503E\u659C",
839
842
  placement: "top"
840
843
  }, {
841
844
  default: vue.withCtx(() => [
@@ -855,7 +858,7 @@
855
858
  vue.createVNode(_component_el_tooltip, {
856
859
  class: "item",
857
860
  effect: "dark",
858
- content: "下划线",
861
+ content: "\u4E0B\u5212\u7EBF",
859
862
  placement: "top"
860
863
  }, {
861
864
  default: vue.withCtx(() => [
@@ -876,18 +879,18 @@
876
879
  key: 0,
877
880
  class: "item",
878
881
  effect: "dark",
879
- content: "链接",
882
+ content: "\u94FE\u63A5",
880
883
  placement: "top"
881
884
  }, {
882
885
  default: vue.withCtx(() => [
883
- vue.createElementVNode("div", _hoisted_30, [
886
+ vue.createElementVNode("div", _hoisted_30$1, [
884
887
  vue.createElementVNode("img", {
885
888
  src: $options.getImageUrl("icon_web_link@2x.png"),
886
889
  width: "40",
887
890
  height: "40",
888
891
  alt: "",
889
892
  onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
890
- }, null, 8, _hoisted_31)
893
+ }, null, 8, _hoisted_31$1)
891
894
  ])
892
895
  ]),
893
896
  _: 1
@@ -895,7 +898,7 @@
895
898
  vue.createVNode(_component_el_tooltip, {
896
899
  class: "item",
897
900
  effect: "dark",
898
- content: "首行缩进",
901
+ content: "\u9996\u884C\u7F29\u8FDB",
899
902
  placement: "top"
900
903
  }, {
901
904
  default: vue.withCtx(() => [
@@ -905,14 +908,14 @@
905
908
  height: "40",
906
909
  alt: "",
907
910
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
908
- }, null, 8, _hoisted_32)
911
+ }, null, 8, _hoisted_32$1)
909
912
  ]),
910
913
  _: 1
911
914
  }),
912
915
  vue.createVNode(_component_el_tooltip, {
913
916
  class: "item",
914
917
  effect: "dark",
915
- content: "文字颜色",
918
+ content: "\u6587\u5B57\u989C\u8272",
916
919
  placement: "top"
917
920
  }, {
918
921
  default: vue.withCtx(() => [
@@ -956,7 +959,7 @@
956
959
  vue.createVNode(_component_el_tooltip, {
957
960
  class: "item",
958
961
  effect: "dark",
959
- content: "对齐方式",
962
+ content: "\u5BF9\u9F50\u65B9\u5F0F",
960
963
  placement: "top"
961
964
  }, {
962
965
  default: vue.withCtx(() => [
@@ -1014,7 +1017,7 @@
1014
1017
  vue.createVNode(_component_el_tooltip, {
1015
1018
  class: "item",
1016
1019
  effect: "dark",
1017
- content: "插入图片",
1020
+ content: "\u63D2\u5165\u56FE\u7247",
1018
1021
  placement: "top"
1019
1022
  }, {
1020
1023
  default: vue.withCtx(() => [
@@ -1036,11 +1039,11 @@
1036
1039
  vue.createElementVNode("li", {
1037
1040
  class: vue.normalizeClass([$data.activeImgType === "normal" ? "active" : ""]),
1038
1041
  onClick: _cache[18] || (_cache[18] = ($event) => $options.insertImg("normal"))
1039
- }, vue.toDisplayString("上传图片"), 2),
1042
+ }, vue.toDisplayString("\u4E0A\u4F20\u56FE\u7247"), 2),
1040
1043
  vue.createElementVNode("li", {
1041
1044
  class: vue.normalizeClass([$data.activeImgType === "seamless" ? "active" : ""]),
1042
1045
  onClick: _cache[19] || (_cache[19] = ($event) => $options.insertImg("seamless"))
1043
- }, vue.toDisplayString("上传无缝拼接图片"), 2)
1046
+ }, vue.toDisplayString("\u4E0A\u4F20\u65E0\u7F1D\u62FC\u63A5\u56FE\u7247"), 2)
1044
1047
  ])), [
1045
1048
  [_directive_click_outside, $options.handlePopover]
1046
1049
  ])
@@ -1051,7 +1054,7 @@
1051
1054
  key: 2,
1052
1055
  class: "item",
1053
1056
  effect: "dark",
1054
- content: "插入视频",
1057
+ content: "\u63D2\u5165\u89C6\u9891",
1055
1058
  placement: "top"
1056
1059
  }, {
1057
1060
  default: vue.withCtx(() => [
@@ -1069,7 +1072,7 @@
1069
1072
  key: 3,
1070
1073
  class: "item",
1071
1074
  effect: "dark",
1072
- content: "插入文章/视频",
1075
+ content: "\u63D2\u5165\u6587\u7AE0/\u89C6\u9891",
1073
1076
  placement: "top"
1074
1077
  }, {
1075
1078
  default: vue.withCtx(() => [
@@ -1087,7 +1090,7 @@
1087
1090
  key: 4,
1088
1091
  class: "item",
1089
1092
  effect: "dark",
1090
- content: "采集文章",
1093
+ content: "\u91C7\u96C6\u6587\u7AE0",
1091
1094
  placement: "top"
1092
1095
  }, {
1093
1096
  default: vue.withCtx(() => [
@@ -1104,15 +1107,17 @@
1104
1107
  ])
1105
1108
  ])) : vue.createCommentVNode("", true);
1106
1109
  }
1107
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-50235bb8"]]);
1110
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-52e48332"]]);
1108
1111
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
1109
- const _hoisted_1$7 = { key: 0 };
1110
- const _hoisted_2$4 = { class: "basic-dialog_title" };
1111
- const _hoisted_3$4 = {
1112
+ const index_vue_vue_type_style_index_0_lang$4 = "";
1113
+ const _hoisted_1$6 = { key: 0 };
1114
+ const _hoisted_2$6 = { class: "basic-dialog_title" };
1115
+ const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1116
+ const _hoisted_4$3 = {
1112
1117
  key: 0,
1113
1118
  class: "dialog-footer"
1114
1119
  };
1115
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
1120
+ const _sfc_main$6 = vue.defineComponent({
1116
1121
  __name: "index",
1117
1122
  props: {
1118
1123
  visible: { type: Boolean, default: false },
@@ -1153,24 +1158,24 @@
1153
1158
  class: vue.normalizeClass(["basic-dialog", { "hide-title": !_ctx.showTitle }])
1154
1159
  }, {
1155
1160
  header: vue.withCtx(() => [
1156
- _ctx.showTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
1157
- vue.createElementVNode("div", _hoisted_2$4, [
1158
- _cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "basic-dialog_divider" }, null, -1)),
1161
+ _ctx.showTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
1162
+ vue.createElementVNode("div", _hoisted_2$6, [
1163
+ _hoisted_3$6,
1159
1164
  vue.renderSlot(_ctx.$slots, "title")
1160
1165
  ])
1161
1166
  ])) : vue.createCommentVNode("", true)
1162
1167
  ]),
1163
1168
  footer: vue.withCtx(() => [
1164
- _ctx.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, [
1169
+ _ctx.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$3, [
1165
1170
  vue.createVNode(vue.unref(elementPlus.ElButton), {
1166
1171
  style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
1167
1172
  plain: "",
1168
1173
  round: "",
1169
1174
  onClick: handleClose
1170
1175
  }, {
1171
- default: vue.withCtx(() => _cache[2] || (_cache[2] = [
1172
- vue.createTextVNode("取消")
1173
- ])),
1176
+ default: vue.withCtx(() => [
1177
+ vue.createTextVNode("\u53D6\u6D88")
1178
+ ]),
1174
1179
  _: 1
1175
1180
  }),
1176
1181
  vue.createVNode(vue.unref(elementPlus.ElButton), {
@@ -1179,9 +1184,9 @@
1179
1184
  type: "primary",
1180
1185
  onClick: confirm
1181
1186
  }, {
1182
- default: vue.withCtx(() => _cache[3] || (_cache[3] = [
1183
- vue.createTextVNode("确认")
1184
- ])),
1187
+ default: vue.withCtx(() => [
1188
+ vue.createTextVNode("\u786E\u8BA4")
1189
+ ]),
1185
1190
  _: 1
1186
1191
  })
1187
1192
  ])) : vue.createCommentVNode("", true)
@@ -1194,14 +1199,12 @@
1194
1199
  };
1195
1200
  }
1196
1201
  });
1197
- const index_vue_vue_type_style_index_0_lang$5 = "";
1198
1202
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1199
1203
  function getDefaultExportFromCjs(x) {
1200
1204
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1201
1205
  }
1202
- var date$2 = { exports: {} };
1203
- var date = date$2.exports;
1204
- Object.defineProperty(date, "__esModule", { value: true });
1206
+ var date$1 = { exports: {} };
1207
+ Object.defineProperty(date$1.exports, "__esModule", { value: true });
1205
1208
  function replacementDate(data, fmt) {
1206
1209
  for (var k in data) {
1207
1210
  if (new RegExp("(" + k + ")").test(fmt)) {
@@ -1216,130 +1219,126 @@
1216
1219
  }
1217
1220
  return fmt;
1218
1221
  }
1219
- var DateClass = (
1220
- /** @class */
1221
- function() {
1222
- function DateClass2() {
1223
- }
1224
- DateClass2.prototype.format = function(date2, fmt) {
1225
- if (fmt === void 0) {
1226
- fmt = "YYYY-MM-DD HH:mm:ss";
1227
- }
1228
- if (!date2)
1229
- return "";
1230
- var timeData = typeof date2 === "string" ? new Date(date2.replace(/-/g, "/")) : date2;
1231
- timeData = typeof date2 === "number" ? new Date(date2) : timeData;
1232
- var o = {
1233
- "M+": timeData.getMonth() + 1,
1234
- "D+": timeData.getDate(),
1235
- "h+": timeData.getHours() % 12 === 0 ? 12 : timeData.getHours() % 12,
1236
- "H+": timeData.getHours(),
1237
- "m+": timeData.getMinutes(),
1238
- "s+": timeData.getSeconds(),
1239
- "q+": Math.floor((timeData.getMonth() + 3) / 3),
1240
- "S": timeData.getMilliseconds()
1241
- };
1242
- var week = {
1243
- "0": "日",
1244
- "1": "一",
1245
- "2": "二",
1246
- "3": "三",
1247
- "4": "四",
1248
- "5": "五",
1249
- "6": "六"
1250
- };
1251
- fmt = replacementYear(timeData, fmt);
1252
- if (/(E+)/.test(fmt)) {
1253
- fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "星期" : "周" : "") + week["".concat(timeData.getDay(), " ")]);
1254
- }
1255
- return replacementDate(o, fmt);
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 = /* @__PURE__ */ new Date();
1265
- }
1266
- var ts = Number(endTime) - Number(startTime);
1267
- var dd = Math.floor(ts / 1e3 / 60 / 60 / 24);
1268
- var hh = Math.floor(ts / 1e3 / 60 / 60 % 24);
1269
- var mm = Math.floor(ts / 1e3 / 60 % 60);
1270
- var ss = Math.floor(ts / 1e3 % 60);
1271
- if (ts <= 0)
1272
- return false;
1273
- return {
1274
- dd: dd < 10 ? "0".concat(dd) : dd,
1275
- hh: hh < 10 ? "0".concat(hh) : hh,
1276
- mm: mm < 10 ? "0".concat(mm) : mm,
1277
- ss: ss < 10 ? "0".concat(ss) : ss
1278
- };
1222
+ var DateClass = function() {
1223
+ function DateClass2() {
1224
+ }
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()
1279
1242
  };
1280
- DateClass2.prototype.formatPassTime = function(startTime) {
1281
- var currentTime = /* @__PURE__ */ new Date();
1282
- var time = currentTime - startTime;
1283
- var year = Math.floor(time / (1e3 * 60 * 60 * 24) / 30 / 12);
1284
- if (year)
1285
- return "".concat(year, "年前");
1286
- var month = Math.floor(time / (1e3 * 60 * 60 * 24) / 30);
1287
- if (month)
1288
- return "".concat(month, "个月前");
1289
- var day = Math.floor(time / (1e3 * 60 * 60 * 24));
1290
- if (day)
1291
- return "".concat(day, "天前");
1292
- var hour = Math.floor(time / (1e3 * 60 * 60));
1293
- if (hour)
1294
- return "".concat(hour, "小时前");
1295
- var min = Math.floor(time / (1e3 * 60));
1296
- if (min)
1297
- return "".concat(min, "分钟前");
1298
- else
1299
- return "刚刚";
1243
+ var week = {
1244
+ "0": "\u65E5",
1245
+ "1": "\u4E00",
1246
+ "2": "\u4E8C",
1247
+ "3": "\u4E09",
1248
+ "4": "\u56DB",
1249
+ "5": "\u4E94",
1250
+ "6": "\u516D"
1300
1251
  };
1301
- DateClass2.prototype.formatPassTimeForList = function(time) {
1302
- return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY年MM月DD日", true);
1252
+ fmt = replacementYear(timeData, fmt);
1253
+ if (/(E+)/.test(fmt)) {
1254
+ fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "\u661F\u671F" : "\u5468" : "") + week["".concat(timeData.getDay(), " ")]);
1255
+ }
1256
+ return replacementDate(o, fmt);
1257
+ };
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];
1262
+ };
1263
+ DateClass2.prototype.remainTime = function(endTime, startTime) {
1264
+ if (startTime === void 0) {
1265
+ startTime = 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
1303
1279
  };
1304
- DateClass2.prototype.formatPassTimeForDetail = function(time, fmt, noYear) {
1305
- if (fmt === void 0) {
1306
- fmt = "YYYY-MM-DD";
1307
- }
1308
- var date2 = typeof time === "number" ? new Date(time) : new Date((time || "").replace(/-/g, "/"));
1309
- var diff = ((/* @__PURE__ */ new Date()).getTime() - date2.getTime()) / 1e3;
1310
- var dayDiff = Math.floor(diff / 86400);
1311
- var isValidDate = Object.prototype.toString.call(date2) === "[object Date]" && !isNaN(date2.getTime());
1312
- if (!isValidDate)
1313
- return "";
1314
- var formatDate = function() {
1315
- var today = new Date(date2);
1316
- var o = {
1317
- "Y+": today.getFullYear(),
1318
- "M+": ("0" + (today.getMonth() + 1)).slice(-2),
1319
- "D+": ("0" + today.getDate()).slice(-2)
1320
- };
1321
- fmt = replacementYear(date2, fmt);
1322
- var year = today.getFullYear();
1323
- if (!((/* @__PURE__ */ new Date()).getFullYear() > year) && noYear) {
1324
- var backData = replacementDate(o, fmt);
1325
- return backData.split("年")[1];
1326
- }
1327
- return replacementDate(o, fmt);
1280
+ };
1281
+ DateClass2.prototype.formatPassTime = function(startTime) {
1282
+ var currentTime = 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, "\u5E74\u524D");
1287
+ var month = Math.floor(time / (1e3 * 60 * 60 * 24) / 30);
1288
+ if (month)
1289
+ return "".concat(month, "\u4E2A\u6708\u524D");
1290
+ var day = Math.floor(time / (1e3 * 60 * 60 * 24));
1291
+ if (day)
1292
+ return "".concat(day, "\u5929\u524D");
1293
+ var hour = Math.floor(time / (1e3 * 60 * 60));
1294
+ if (hour)
1295
+ return "".concat(hour, "\u5C0F\u65F6\u524D");
1296
+ var min = Math.floor(time / (1e3 * 60));
1297
+ if (min)
1298
+ return "".concat(min, "\u5206\u949F\u524D");
1299
+ else
1300
+ return "\u521A\u521A";
1301
+ };
1302
+ DateClass2.prototype.formatPassTimeForList = function(time) {
1303
+ return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY\u5E74MM\u6708DD\u65E5", 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 = (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)
1328
1321
  };
1329
- if (dayDiff === -1) {
1330
- return "刚刚";
1331
- } else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
1332
- return formatDate();
1322
+ fmt = replacementYear(date2, fmt);
1323
+ var year = today.getFullYear();
1324
+ if (!(new Date().getFullYear() > year) && noYear) {
1325
+ var backData = replacementDate(o, fmt);
1326
+ return backData.split("\u5E74")[1];
1333
1327
  }
1334
- return dayDiff === 0 && (diff < 60 && "刚刚" || diff < 120 && "1分钟前" || diff < 3600 && Math.floor(diff / 60) + "分钟前" || diff < 7200 && "1小时前" || diff < 86400 && Math.floor(diff / 3600) + "小时前") || dayDiff < 16 && dayDiff + "天前";
1328
+ return replacementDate(o, fmt);
1335
1329
  };
1336
- return DateClass2;
1337
- }()
1338
- );
1339
- date$2.exports = new DateClass();
1340
- var dateExports = date$2.exports;
1341
- const date$1 = /* @__PURE__ */ getDefaultExportFromCjs(dateExports);
1342
- var tools$2 = { exports: {} };
1330
+ if (dayDiff === -1) {
1331
+ return "\u521A\u521A";
1332
+ } else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
1333
+ return formatDate();
1334
+ }
1335
+ 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";
1336
+ };
1337
+ return DateClass2;
1338
+ }();
1339
+ date$1.exports = new DateClass();
1340
+ const date = /* @__PURE__ */ getDefaultExportFromCjs(date$1.exports);
1341
+ var tools$1 = { exports: {} };
1343
1342
  var _listCacheClear;
1344
1343
  var hasRequired_listCacheClear;
1345
1344
  function require_listCacheClear() {
@@ -2246,7 +2245,6 @@
2246
2245
  stubFalse_1 = stubFalse;
2247
2246
  return stubFalse_1;
2248
2247
  }
2249
- isBuffer.exports;
2250
2248
  var hasRequiredIsBuffer;
2251
2249
  function requireIsBuffer() {
2252
2250
  if (hasRequiredIsBuffer)
@@ -2326,7 +2324,6 @@
2326
2324
  return _baseUnary;
2327
2325
  }
2328
2326
  var _nodeUtil = { exports: {} };
2329
- _nodeUtil.exports;
2330
2327
  var hasRequired_nodeUtil;
2331
2328
  function require_nodeUtil() {
2332
2329
  if (hasRequired_nodeUtil)
@@ -2376,11 +2373,7 @@
2376
2373
  function arrayLikeKeys(value, inherited) {
2377
2374
  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;
2378
2375
  for (var key in value) {
2379
- if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
2380
- (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
2381
- isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
2382
- isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
2383
- isIndex(key, length)))) {
2376
+ if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
2384
2377
  result.push(key);
2385
2378
  }
2386
2379
  }
@@ -2560,7 +2553,6 @@
2560
2553
  return _baseAssignIn;
2561
2554
  }
2562
2555
  var _cloneBuffer = { exports: {} };
2563
- _cloneBuffer.exports;
2564
2556
  var hasRequired_cloneBuffer;
2565
2557
  function require_cloneBuffer() {
2566
2558
  if (hasRequired_cloneBuffer)
@@ -3174,13 +3166,13 @@
3174
3166
  return cloneDeep_1;
3175
3167
  }
3176
3168
  /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
3177
- var clipboardCopy_1;
3178
- var hasRequiredClipboardCopy;
3179
- function requireClipboardCopy() {
3180
- if (hasRequiredClipboardCopy)
3181
- return clipboardCopy_1;
3182
- hasRequiredClipboardCopy = 1;
3183
- clipboardCopy_1 = clipboardCopy;
3169
+ var _clipboardCopy_4_0_1_clipboardCopy;
3170
+ var hasRequired_clipboardCopy_4_0_1_clipboardCopy;
3171
+ function require_clipboardCopy_4_0_1_clipboardCopy() {
3172
+ if (hasRequired_clipboardCopy_4_0_1_clipboardCopy)
3173
+ return _clipboardCopy_4_0_1_clipboardCopy;
3174
+ hasRequired_clipboardCopy_4_0_1_clipboardCopy = 1;
3175
+ _clipboardCopy_4_0_1_clipboardCopy = clipboardCopy;
3184
3176
  function makeError() {
3185
3177
  return new DOMException("The request is not allowed", "NotAllowedError");
3186
3178
  }
@@ -3223,270 +3215,266 @@
3223
3215
  }
3224
3216
  }
3225
3217
  }
3226
- return clipboardCopy_1;
3218
+ return _clipboardCopy_4_0_1_clipboardCopy;
3227
3219
  }
3228
- var tools = tools$2.exports;
3229
- Object.defineProperty(tools, "__esModule", { value: true });
3220
+ Object.defineProperty(tools$1.exports, "__esModule", { value: true });
3230
3221
  var previous = 0;
3231
3222
  var timeout = null;
3232
- var ToolsClass = (
3233
- /** @class */
3234
- function() {
3235
- function ToolsClass2() {
3236
- var _this = this;
3237
- this.stopScroll = function(className) {
3238
- if (!(window && window.document)) {
3239
- return new Error("仅支持浏览器");
3240
- }
3241
- var html = document.documentElement;
3242
- html.style.overflow = "hidden";
3243
- html.style.height = "100%";
3244
- var body = document.body;
3245
- body.style.overflow = "hidden";
3246
- body.style.height = "100%";
3247
- if (className) {
3248
- var dom = document.querySelector(".".concat(className));
3249
- dom && dom.addEventListener("touchmove", _this.__setDefault__);
3250
- }
3251
- };
3252
- this.startScroll = function(className) {
3253
- if (!(window && window.document)) {
3254
- return new Error("仅支持浏览器");
3255
- }
3256
- var html = document.documentElement;
3257
- html.style.overflow = "visible";
3258
- html.style.height = "auto";
3259
- var body = document.body;
3260
- body.style.overflow = "visible";
3261
- body.style.height = "auto";
3262
- if (className) {
3263
- var dom = document.querySelector(".".concat(className));
3264
- dom && dom.removeEventListener("touchmove", _this.__setDefault__);
3265
- }
3266
- };
3267
- this.objectToArray = function(obj) {
3268
- var arr = [];
3269
- if (typeof obj === "object") {
3270
- for (var key in obj) {
3271
- if (obj.hasOwnProperty(key)) {
3272
- arr.push([key, obj[key]].join("="));
3273
- }
3274
- }
3275
- }
3276
- return arr;
3277
- };
3278
- this.convertKeyValueEnum = function(obj) {
3279
- var result = {};
3280
- if (typeof obj === "object") {
3281
- for (var key in obj) {
3282
- if (obj.hasOwnProperty(key)) {
3283
- result[obj[key]] = key;
3284
- }
3285
- }
3286
- }
3287
- return result;
3288
- };
3289
- this.isDefined = function(val) {
3290
- return val !== void 0 && val !== null;
3291
- };
3292
- this.__loaded__ = {};
3293
- this.__setDefault__ = function(e) {
3294
- e && e.preventDefault();
3295
- };
3296
- }
3297
- ToolsClass2.prototype.deepCopy = function(data) {
3298
- return JSON.parse(JSON.stringify(data));
3299
- };
3300
- ToolsClass2.prototype.deepCopy2 = function(obj) {
3301
- var _obj = Array.isArray(obj) ? [] : {};
3302
- for (var i in obj) {
3303
- _obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
3304
- }
3305
- return _obj;
3306
- };
3307
- ToolsClass2.prototype.deepCopy3 = function(obj) {
3308
- var deepcopy = requireCloneDeep();
3309
- return deepcopy(obj);
3310
- };
3311
- ToolsClass2.prototype.debounce = function(func, wait) {
3312
- var delay = function() {
3313
- var args = arguments;
3314
- if (timeout)
3315
- clearTimeout(timeout);
3316
- timeout = setTimeout(function() {
3317
- func.apply(delay, args);
3318
- }, wait);
3319
- };
3320
- return delay;
3321
- };
3322
- ToolsClass2.prototype.throttle = function(func, wait) {
3323
- var delay = function() {
3324
- var now = Date.now();
3325
- if (now - previous > wait) {
3326
- func.apply(delay, arguments);
3327
- previous = now;
3328
- }
3329
- };
3330
- return delay;
3331
- };
3332
- ToolsClass2.prototype.getUrlName = function(url) {
3333
- return url && url.split("?")[0].split("/").reverse()[0];
3334
- };
3335
- ToolsClass2.prototype.loadJs = function(url) {
3336
- var _this = this;
3337
- if (!(window && window.document)) {
3338
- return new Error("仅支持浏览器");
3339
- }
3340
- var name = this.getUrlName(url);
3341
- var id = "js_" + name;
3342
- return new Promise(function(resolve, reject) {
3343
- if (_this.__loaded__[id]) {
3344
- return resolve();
3345
- }
3346
- var script = document.createElement("script");
3347
- script.type = "text/javascript";
3348
- script.async = true;
3349
- script.src = url;
3350
- script.id = id;
3351
- script.onload = function() {
3352
- _this.__loaded__[id] = true;
3353
- resolve();
3354
- };
3355
- script.onerror = function(e) {
3356
- reject(e);
3357
- };
3358
- document.body.appendChild(script);
3359
- });
3360
- };
3361
- ToolsClass2.prototype.loadCss = function(url) {
3362
- var _this = this;
3223
+ var ToolsClass = function() {
3224
+ function ToolsClass2() {
3225
+ var _this = this;
3226
+ this.stopScroll = function(className) {
3363
3227
  if (!(window && window.document)) {
3364
- return new Error("仅支持浏览器");
3365
- }
3366
- var name = this.getUrlName(url);
3367
- var id = "css_" + name;
3368
- return new Promise(function(resolve, reject) {
3369
- if (_this.__loaded__[id]) {
3370
- return resolve();
3371
- }
3372
- var link = document.createElement("link");
3373
- link.type = "text/css";
3374
- link.rel = "stylesheet";
3375
- link.href = url;
3376
- link.id = id;
3377
- link.onload = function() {
3378
- _this.__loaded__[id] = true;
3379
- resolve();
3380
- };
3381
- link.onerror = function(e) {
3382
- reject(e);
3383
- };
3384
- document.head.appendChild(link);
3385
- });
3386
- };
3387
- ToolsClass2.prototype.clipboard = function(str) {
3388
- if (!(window && window.document)) {
3389
- return new Error("仅支持浏览器");
3228
+ return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3229
+ }
3230
+ var html = document.documentElement;
3231
+ html.style.overflow = "hidden";
3232
+ html.style.height = "100%";
3233
+ var body = document.body;
3234
+ body.style.overflow = "hidden";
3235
+ body.style.height = "100%";
3236
+ if (className) {
3237
+ var dom = document.querySelector(".".concat(className));
3238
+ dom && dom.addEventListener("touchmove", _this.__setDefault__);
3390
3239
  }
3391
- var copy = requireClipboardCopy();
3392
- return copy(str);
3393
- };
3394
- ToolsClass2.prototype.firstUpperCase = function(str) {
3395
- return str.charAt(0).toUpperCase() + str.toString().slice(1);
3396
3240
  };
3397
- ToolsClass2.prototype.slice = function(target, length) {
3398
- if (target === void 0) {
3399
- target = "";
3400
- }
3401
- if (length === void 0) {
3402
- length = 0;
3241
+ this.startScroll = function(className) {
3242
+ if (!(window && window.document)) {
3243
+ return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3244
+ }
3245
+ var html = document.documentElement;
3246
+ html.style.overflow = "visible";
3247
+ html.style.height = "auto";
3248
+ var body = document.body;
3249
+ body.style.overflow = "visible";
3250
+ body.style.height = "auto";
3251
+ if (className) {
3252
+ var dom = document.querySelector(".".concat(className));
3253
+ dom && dom.removeEventListener("touchmove", _this.__setDefault__);
3403
3254
  }
3404
- return target.slice(0, length);
3405
3255
  };
3406
- ToolsClass2.prototype.guid = function() {
3407
- function S4() {
3408
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3256
+ this.objectToArray = function(obj) {
3257
+ var arr = [];
3258
+ if (typeof obj === "object") {
3259
+ for (var key in obj) {
3260
+ if (obj.hasOwnProperty(key)) {
3261
+ arr.push([key, obj[key]].join("="));
3262
+ }
3263
+ }
3409
3264
  }
3410
- return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
3265
+ return arr;
3411
3266
  };
3412
- ToolsClass2.prototype.getBytesOfText = function(str) {
3413
- if (str === void 0) {
3414
- str = "";
3267
+ this.convertKeyValueEnum = function(obj) {
3268
+ var result = {};
3269
+ if (typeof obj === "object") {
3270
+ for (var key in obj) {
3271
+ if (obj.hasOwnProperty(key)) {
3272
+ result[obj[key]] = key;
3273
+ }
3274
+ }
3415
3275
  }
3416
- return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
3417
- };
3418
- ToolsClass2.prototype.uniqueArr = function(arr) {
3419
- return Array.from(new Set(arr));
3420
- };
3421
- ToolsClass2.prototype.swapArray = function(array, index1, index2) {
3422
- var _a;
3423
- _a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
3424
- return array;
3276
+ return result;
3425
3277
  };
3426
- ToolsClass2.prototype.filterEmoji = function(str) {
3427
- return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
3278
+ this.isDefined = function(val) {
3279
+ return val !== void 0 && val !== null;
3428
3280
  };
3429
- ToolsClass2.prototype.containsEmoji = function(str) {
3430
- var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
3431
- return reg.test(str);
3281
+ this.__loaded__ = {};
3282
+ this.__setDefault__ = function(e) {
3283
+ e && e.preventDefault();
3432
3284
  };
3433
- ToolsClass2.prototype.containsHanZi = function(str) {
3434
- var reg = /[\u4e00-\u9fa5]/mg;
3435
- return reg.test(str);
3285
+ }
3286
+ ToolsClass2.prototype.deepCopy = function(data) {
3287
+ return JSON.parse(JSON.stringify(data));
3288
+ };
3289
+ ToolsClass2.prototype.deepCopy2 = function(obj) {
3290
+ var _obj = Array.isArray(obj) ? [] : {};
3291
+ for (var i in obj) {
3292
+ _obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
3293
+ }
3294
+ return _obj;
3295
+ };
3296
+ ToolsClass2.prototype.deepCopy3 = function(obj) {
3297
+ var deepcopy = requireCloneDeep();
3298
+ return deepcopy(obj);
3299
+ };
3300
+ ToolsClass2.prototype.debounce = function(func, wait) {
3301
+ var delay = function() {
3302
+ var args = arguments;
3303
+ if (timeout)
3304
+ clearTimeout(timeout);
3305
+ timeout = setTimeout(function() {
3306
+ func.apply(delay, args);
3307
+ }, wait);
3436
3308
  };
3437
- ToolsClass2.prototype.isEmpty = function(val) {
3438
- if (val == null)
3439
- return true;
3440
- if (typeof val === "boolean")
3441
- return false;
3442
- if (typeof val === "number")
3443
- return !val;
3444
- if (val instanceof Error)
3445
- return val.message === "";
3446
- switch (Object.prototype.toString.call(val)) {
3447
- case "[object String]":
3448
- case "[object Array]":
3449
- return !val.length;
3450
- case "[object File]":
3451
- case "[object Map]":
3452
- case "[object Set]": {
3453
- return !val.size;
3454
- }
3455
- case "[object Object]": {
3456
- return !Object.keys(val).length;
3457
- }
3309
+ return delay;
3310
+ };
3311
+ ToolsClass2.prototype.throttle = function(func, wait) {
3312
+ var delay = function() {
3313
+ var now = Date.now();
3314
+ if (now - previous > wait) {
3315
+ func.apply(delay, arguments);
3316
+ previous = now;
3458
3317
  }
3459
- return false;
3460
3318
  };
3461
- ToolsClass2.prototype.sensitiveField = function(field, before, after) {
3462
- if (before === void 0) {
3463
- before = 3;
3464
- }
3465
- if (after === void 0) {
3466
- after = 4;
3467
- }
3468
- if (!field) {
3469
- return "";
3470
- }
3471
- field = String(field);
3472
- var sensitiveLen = field.length - before - after;
3473
- if (sensitiveLen < 0) {
3474
- sensitiveLen = 0;
3319
+ return delay;
3320
+ };
3321
+ ToolsClass2.prototype.getUrlName = function(url) {
3322
+ return url && url.split("?")[0].split("/").reverse()[0];
3323
+ };
3324
+ ToolsClass2.prototype.loadJs = function(url) {
3325
+ var _this = this;
3326
+ if (!(window && window.document)) {
3327
+ return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3328
+ }
3329
+ var name = this.getUrlName(url);
3330
+ var id = "js_" + name;
3331
+ return new Promise(function(resolve, reject) {
3332
+ if (_this.__loaded__[id]) {
3333
+ return resolve();
3334
+ }
3335
+ var script = document.createElement("script");
3336
+ script.type = "text/javascript";
3337
+ script.async = true;
3338
+ script.src = url;
3339
+ script.id = id;
3340
+ script.onload = function() {
3341
+ _this.__loaded__[id] = true;
3342
+ resolve();
3343
+ };
3344
+ script.onerror = function(e) {
3345
+ reject(e);
3346
+ };
3347
+ document.body.appendChild(script);
3348
+ });
3349
+ };
3350
+ ToolsClass2.prototype.loadCss = function(url) {
3351
+ var _this = this;
3352
+ if (!(window && window.document)) {
3353
+ return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3354
+ }
3355
+ var name = this.getUrlName(url);
3356
+ var id = "css_" + name;
3357
+ return new Promise(function(resolve, reject) {
3358
+ if (_this.__loaded__[id]) {
3359
+ return resolve();
3360
+ }
3361
+ var link = document.createElement("link");
3362
+ link.type = "text/css";
3363
+ link.rel = "stylesheet";
3364
+ link.href = url;
3365
+ link.id = id;
3366
+ link.onload = function() {
3367
+ _this.__loaded__[id] = true;
3368
+ resolve();
3369
+ };
3370
+ link.onerror = function(e) {
3371
+ reject(e);
3372
+ };
3373
+ document.head.appendChild(link);
3374
+ });
3375
+ };
3376
+ ToolsClass2.prototype.clipboard = function(str) {
3377
+ if (!(window && window.document)) {
3378
+ return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3379
+ }
3380
+ var copy = require_clipboardCopy_4_0_1_clipboardCopy();
3381
+ return copy(str);
3382
+ };
3383
+ ToolsClass2.prototype.firstUpperCase = function(str) {
3384
+ return str.charAt(0).toUpperCase() + str.toString().slice(1);
3385
+ };
3386
+ ToolsClass2.prototype.slice = function(target, length) {
3387
+ if (target === void 0) {
3388
+ target = "";
3389
+ }
3390
+ if (length === void 0) {
3391
+ length = 0;
3392
+ }
3393
+ return target.slice(0, length);
3394
+ };
3395
+ ToolsClass2.prototype.guid = function() {
3396
+ function S4() {
3397
+ return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3398
+ }
3399
+ return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
3400
+ };
3401
+ ToolsClass2.prototype.getBytesOfText = function(str) {
3402
+ if (str === void 0) {
3403
+ str = "";
3404
+ }
3405
+ return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
3406
+ };
3407
+ ToolsClass2.prototype.uniqueArr = function(arr) {
3408
+ return Array.from(new Set(arr));
3409
+ };
3410
+ ToolsClass2.prototype.swapArray = function(array, index1, index2) {
3411
+ var _a;
3412
+ _a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
3413
+ return array;
3414
+ };
3415
+ ToolsClass2.prototype.filterEmoji = function(str) {
3416
+ return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
3417
+ };
3418
+ ToolsClass2.prototype.containsEmoji = function(str) {
3419
+ var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
3420
+ return reg.test(str);
3421
+ };
3422
+ ToolsClass2.prototype.containsHanZi = function(str) {
3423
+ var reg = /[\u4e00-\u9fa5]/mg;
3424
+ return reg.test(str);
3425
+ };
3426
+ ToolsClass2.prototype.isEmpty = function(val) {
3427
+ if (val == null)
3428
+ return true;
3429
+ if (typeof val === "boolean")
3430
+ return false;
3431
+ if (typeof val === "number")
3432
+ return !val;
3433
+ if (val instanceof Error)
3434
+ return val.message === "";
3435
+ switch (Object.prototype.toString.call(val)) {
3436
+ case "[object String]":
3437
+ case "[object Array]":
3438
+ return !val.length;
3439
+ case "[object File]":
3440
+ case "[object Map]":
3441
+ case "[object Set]": {
3442
+ return !val.size;
3443
+ }
3444
+ case "[object Object]": {
3445
+ return !Object.keys(val).length;
3475
3446
  }
3476
- var regItem = "[一-龥a-zA-Z0-9]";
3477
- var regExp = "(".concat(regItem, "{").concat(before, "})").concat(regItem, "*(").concat(regItem, "{").concat(after, "})");
3478
- var reg = new RegExp(regExp);
3479
- return field.replace(reg, "$1".concat("*".repeat(sensitiveLen), "$2"));
3480
- };
3481
- return ToolsClass2;
3482
- }()
3483
- );
3484
- tools$2.exports = new ToolsClass();
3485
- var toolsExports = tools$2.exports;
3486
- const tools$1 = /* @__PURE__ */ getDefaultExportFromCjs(toolsExports);
3487
- const _hoisted_1$6 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
3488
- const _hoisted_2$3 = { class: "insert-article" };
3489
- const _hoisted_3$3 = { class: "insert-article_input" };
3447
+ }
3448
+ return false;
3449
+ };
3450
+ ToolsClass2.prototype.sensitiveField = function(field, before, after) {
3451
+ if (before === void 0) {
3452
+ before = 3;
3453
+ }
3454
+ if (after === void 0) {
3455
+ after = 4;
3456
+ }
3457
+ if (!field) {
3458
+ return "";
3459
+ }
3460
+ field = String(field);
3461
+ var sensitiveLen = field.length - before - after;
3462
+ if (sensitiveLen < 0) {
3463
+ sensitiveLen = 0;
3464
+ }
3465
+ var regItem = "[\u4E00-\u9FA5a-zA-Z0-9]";
3466
+ var regExp = "(".concat(regItem, "{").concat(before, "})").concat(regItem, "*(").concat(regItem, "{").concat(after, "})");
3467
+ var reg = new RegExp(regExp);
3468
+ return field.replace(reg, "$1".concat("*".repeat(sensitiveLen), "$2"));
3469
+ };
3470
+ return ToolsClass2;
3471
+ }();
3472
+ tools$1.exports = new ToolsClass();
3473
+ const tools = /* @__PURE__ */ getDefaultExportFromCjs(tools$1.exports);
3474
+ const index_vue_vue_type_style_index_0_lang$3 = "";
3475
+ const _hoisted_1$5 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
3476
+ const _hoisted_2$5 = { class: "insert-article" };
3477
+ const _hoisted_3$5 = { class: "insert-article_input" };
3490
3478
  const _hoisted_4$2 = {
3491
3479
  key: 0,
3492
3480
  class: "nodata"
@@ -3505,7 +3493,7 @@
3505
3493
  key: 1,
3506
3494
  style: { "display": "inline-flex", "flex-direction": "column" }
3507
3495
  };
3508
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
3496
+ const _sfc_main$5 = vue.defineComponent({
3509
3497
  __name: "index",
3510
3498
  props: {
3511
3499
  visible: { type: Boolean, default: false },
@@ -3513,7 +3501,7 @@
3513
3501
  },
3514
3502
  emits: ["change", "submit", "update:visible"],
3515
3503
  setup(__props, { emit: __emit }) {
3516
- const { debounce } = tools$1;
3504
+ const { debounce } = tools;
3517
3505
  const vInfiniteScroll = elementPlus.ElInfiniteScroll;
3518
3506
  const Radio_Type = {
3519
3507
  MY_ARITICLE: "1",
@@ -3564,7 +3552,7 @@
3564
3552
  };
3565
3553
  const confirm = () => {
3566
3554
  if (!data.article) {
3567
- elementPlus.ElMessage.error(`请选择${isVideo ? "视频" : "文章"}`);
3555
+ elementPlus.ElMessage.error(`\u8BF7\u9009\u62E9${isVideo ? "\u89C6\u9891" : "\u6587\u7AE0"}`);
3568
3556
  return;
3569
3557
  }
3570
3558
  data.article.isVideo = isVideo;
@@ -3581,14 +3569,11 @@
3581
3569
  data.busy = true;
3582
3570
  const userInfo = JSON.parse(localStorage.getItem("user")) || JSON.parse(localStorage.getItem("userInfo"));
3583
3571
  const userId = userInfo.uid || userInfo.userid;
3584
- if (!getList.value)
3585
- return;
3586
3572
  const res = await getList.value({
3587
3573
  uid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
3588
3574
  autherid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
3589
3575
  limit: 20,
3590
3576
  allType: data.params.radio,
3591
- // 只有4 是查视频 其他是文章
3592
3577
  title: data.params.title,
3593
3578
  page: ++data.page
3594
3579
  });
@@ -3602,27 +3587,27 @@
3602
3587
  data.busy = false;
3603
3588
  }, 1e3);
3604
3589
  return (_ctx, _cache) => {
3605
- return vue.openBlock(), vue.createBlock(_sfc_main$7, {
3590
+ return vue.openBlock(), vue.createBlock(_sfc_main$6, {
3606
3591
  visible: vue.unref(visible),
3607
3592
  onSubmit: confirm
3608
3593
  }, {
3609
3594
  title: vue.withCtx(() => [
3610
3595
  vue.createElementVNode("span", null, [
3611
- _cache[8] || (_cache[8] = vue.createTextVNode("插入文章/视频")),
3612
- vue.createElementVNode("strong", _hoisted_1$6, "平台仅支持插入" + vue.toDisplayString(`${isVideo.value ? "2" : "18个月"}`) + "内的推荐内容", 1)
3596
+ vue.createTextVNode("\u63D2\u5165\u6587\u7AE0/\u89C6\u9891"),
3597
+ vue.createElementVNode("strong", _hoisted_1$5, "\u5E73\u53F0\u4EC5\u652F\u6301\u63D2\u5165" + vue.toDisplayString(`${isVideo.value ? "2\u5E74" : "18\u4E2A\u6708"}`) + "\u5185\u7684\u63A8\u8350\u5185\u5BB9", 1)
3613
3598
  ])
3614
3599
  ]),
3615
3600
  default: vue.withCtx(() => [
3616
- vue.createElementVNode("div", _hoisted_2$3, [
3601
+ vue.createElementVNode("div", _hoisted_2$5, [
3617
3602
  vue.createElementVNode("div", null, [
3618
3603
  vue.createVNode(vue.unref(elementPlus.ElRadio), {
3619
3604
  modelValue: data.params.radio,
3620
3605
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.params.radio = $event),
3621
3606
  label: Radio_Type.MY_ARITICLE
3622
3607
  }, {
3623
- default: vue.withCtx(() => _cache[9] || (_cache[9] = [
3624
- vue.createTextVNode("从我的文章中选择")
3625
- ])),
3608
+ default: vue.withCtx(() => [
3609
+ vue.createTextVNode("\u4ECE\u6211\u7684\u6587\u7AE0\u4E2D\u9009\u62E9")
3610
+ ]),
3626
3611
  _: 1
3627
3612
  }, 8, ["modelValue", "label"]),
3628
3613
  vue.createVNode(vue.unref(elementPlus.ElRadio), {
@@ -3630,9 +3615,9 @@
3630
3615
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.params.radio = $event),
3631
3616
  label: Radio_Type.MY_VIDEO
3632
3617
  }, {
3633
- default: vue.withCtx(() => _cache[10] || (_cache[10] = [
3634
- vue.createTextVNode("从我的视频中选择")
3635
- ])),
3618
+ default: vue.withCtx(() => [
3619
+ vue.createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9")
3620
+ ]),
3636
3621
  _: 1
3637
3622
  }, 8, ["modelValue", "label"]),
3638
3623
  vue.createVNode(vue.unref(elementPlus.ElRadio), {
@@ -3640,17 +3625,17 @@
3640
3625
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.params.radio = $event),
3641
3626
  label: Radio_Type.ALL_ARITICLE
3642
3627
  }, {
3643
- default: vue.withCtx(() => _cache[11] || (_cache[11] = [
3644
- vue.createTextVNode("从所有文章中选择")
3645
- ])),
3628
+ default: vue.withCtx(() => [
3629
+ vue.createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9")
3630
+ ]),
3646
3631
  _: 1
3647
3632
  }, 8, ["modelValue", "label"])
3648
3633
  ]),
3649
- vue.createElementVNode("div", _hoisted_3$3, [
3634
+ vue.createElementVNode("div", _hoisted_3$5, [
3650
3635
  vue.createVNode(vue.unref(elementPlus.ElInput), {
3651
3636
  modelValue: data.params.title,
3652
3637
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.params.title = $event),
3653
- placeholder: isVideo.value ? "输入视频描述查找平台发布过的视频" : "输入标题名查找平台发过的文章",
3638
+ placeholder: isVideo.value ? "\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
3639
  onKeyup: _cache[5] || (_cache[5] = vue.withKeys(($event) => vue.unref(getArticleList)(true), ["enter", "native"])),
3655
3640
  onInput: _cache[6] || (_cache[6] = ($event) => vue.unref(getArticleList)(true))
3656
3641
  }, {
@@ -3664,7 +3649,7 @@
3664
3649
  _: 1
3665
3650
  }, 8, ["modelValue", "placeholder"])
3666
3651
  ]),
3667
- data.data.length === 0 && !data.busy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, vue.toDisplayString(`没有符合条件的${isVideo.value ? "视频" : "文章"}哦,你可以试试搜索其他${isVideo.value ? "视频" : "文章"}~`), 1)) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
3652
+ data.data.length === 0 && !data.busy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, vue.toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${isVideo.value ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${isVideo.value ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
3668
3653
  key: 1,
3669
3654
  "infinite-scroll-immediate": false,
3670
3655
  class: "insert-article_list",
@@ -3696,12 +3681,12 @@
3696
3681
  }, null, 8, _hoisted_9$1)
3697
3682
  ]),
3698
3683
  vue.createElementVNode("div", _hoisted_10$1, [
3699
- vue.createElementVNode("span", _hoisted_11$1, vue.toDisplayString(item.content || "[无标题]"), 1),
3700
- vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
3684
+ vue.createElementVNode("span", _hoisted_11$1, vue.toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
3685
+ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
3701
3686
  ])
3702
3687
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$1, [
3703
- vue.createElementVNode("span", null, vue.toDisplayString(item.title || "[无标题]"), 1),
3704
- vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date$1).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
3688
+ vue.createElementVNode("span", null, vue.toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
3689
+ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
3705
3690
  ]))
3706
3691
  ];
3707
3692
  }),
@@ -3719,7 +3704,6 @@
3719
3704
  };
3720
3705
  }
3721
3706
  });
3722
- const index_vue_vue_type_style_index_0_lang$4 = "";
3723
3707
  let getRandomValues;
3724
3708
  const rnds8 = new Uint8Array(16);
3725
3709
  function rng() {
@@ -3759,9 +3743,10 @@
3759
3743
  }
3760
3744
  return unsafeStringify(rnds);
3761
3745
  }
3762
- const _hoisted_1$5 = { class: "img-upload-content" };
3763
- const _hoisted_2$2 = { class: "title-box" };
3764
- const _hoisted_3$2 = ["onClick"];
3746
+ const index_vue_vue_type_style_index_0_lang$2 = "";
3747
+ const _hoisted_1$4 = { class: "img-upload-content" };
3748
+ const _hoisted_2$4 = { class: "title-box" };
3749
+ const _hoisted_3$4 = ["onClick"];
3765
3750
  const _hoisted_4$1 = {
3766
3751
  key: 0,
3767
3752
  class: "line"
@@ -3790,38 +3775,41 @@
3790
3775
  key: 0,
3791
3776
  class: "upload-wrap"
3792
3777
  };
3793
- const _hoisted_14 = {
3778
+ const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
3779
+ const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
3780
+ const _hoisted_16 = {
3794
3781
  key: 1,
3795
3782
  class: "img-list"
3796
3783
  };
3797
- const _hoisted_15 = ["src"];
3798
- const _hoisted_16 = { class: "upload-btn" };
3799
- const _hoisted_17 = {
3784
+ const _hoisted_17 = ["src"];
3785
+ const _hoisted_18 = { class: "upload-btn" };
3786
+ const _hoisted_19 = {
3800
3787
  key: 2,
3801
3788
  class: "map-depot"
3802
3789
  };
3803
- const _hoisted_18 = { class: "screen" };
3804
- const _hoisted_19 = { key: 0 };
3805
- const _hoisted_20 = { class: "tab-box" };
3806
- const _hoisted_21 = ["onClick"];
3807
- const _hoisted_22 = {
3790
+ const _hoisted_20 = { class: "screen" };
3791
+ const _hoisted_21 = { key: 0 };
3792
+ const _hoisted_22 = { class: "tab-box" };
3793
+ const _hoisted_23 = ["onClick"];
3794
+ const _hoisted_24 = {
3808
3795
  key: 0,
3809
3796
  class: "line"
3810
3797
  };
3811
- const _hoisted_23 = { class: "image-list depot-image" };
3812
- const _hoisted_24 = ["onClick"];
3813
- const _hoisted_25 = ["src"];
3814
- const _hoisted_26 = {
3798
+ const _hoisted_25 = { class: "image-list depot-image" };
3799
+ const _hoisted_26 = ["onClick"];
3800
+ const _hoisted_27 = ["src"];
3801
+ const _hoisted_28 = {
3815
3802
  key: 0,
3816
3803
  class: "shade"
3817
3804
  };
3818
- const _hoisted_27 = { class: "num" };
3819
- const _hoisted_28 = {
3805
+ const _hoisted_29 = { class: "num" };
3806
+ const _hoisted_30 = {
3820
3807
  key: 1,
3821
3808
  class: "protocol-box"
3822
3809
  };
3823
- const _hoisted_29 = ["href"];
3824
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3810
+ const _hoisted_31 = /* @__PURE__ */ vue.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);
3811
+ const _hoisted_32 = ["href"];
3812
+ const _sfc_main$4 = vue.defineComponent({
3825
3813
  __name: "index",
3826
3814
  props: {
3827
3815
  visible: { type: Boolean, default: false },
@@ -3856,7 +3844,7 @@
3856
3844
  const tempImgs = [...props.imgList];
3857
3845
  Array.from(imgFile).forEach((file) => {
3858
3846
  if (file.size > 20 * 1024 * 1024) {
3859
- elementPlus.ElMessage.error("单张图片最大支持20M");
3847
+ elementPlus.ElMessage.error("\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120M");
3860
3848
  return;
3861
3849
  }
3862
3850
  const id = v4();
@@ -3886,14 +3874,14 @@
3886
3874
  const list = [
3887
3875
  {
3888
3876
  id: 2,
3889
- value: "上传图片"
3877
+ value: "\u4E0A\u4F20\u56FE\u7247"
3890
3878
  }
3891
3879
  ];
3892
3880
  activeTitle.value = 2;
3893
3881
  if (props.imgNum < 20) {
3894
3882
  list.unshift({
3895
3883
  id: 1,
3896
- value: "正文图片"
3884
+ value: "\u6B63\u6587\u56FE\u7247"
3897
3885
  });
3898
3886
  activeTitle.value = 1;
3899
3887
  getContentImgList();
@@ -3901,7 +3889,7 @@
3901
3889
  if (props.chartGallery) {
3902
3890
  list.push({
3903
3891
  id: 3,
3904
- value: isEmotofine ? "电摩范图库" : "摩托范图库"
3892
+ value: isEmotofine ? "\u7535\u6469\u8303\u56FE\u5E93" : "\u6469\u6258\u8303\u56FE\u5E93"
3905
3893
  });
3906
3894
  }
3907
3895
  titleList.value = list;
@@ -4046,13 +4034,13 @@
4046
4034
  const tabList = vue.ref([]);
4047
4035
  const search = () => {
4048
4036
  if (!selectData.brandId) {
4049
- return elementPlus.ElMessage.error("请选择品牌");
4037
+ return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u54C1\u724C");
4050
4038
  }
4051
4039
  if (!selectData.goodId) {
4052
- return elementPlus.ElMessage.error("请选择车型");
4040
+ return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u8F66\u578B");
4053
4041
  }
4054
4042
  if (!selectData.carId) {
4055
- return elementPlus.ElMessage.error("请选择款型");
4043
+ return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u6B3E\u578B");
4056
4044
  }
4057
4045
  tabList.value = [];
4058
4046
  emits("update:imgList", []);
@@ -4103,13 +4091,13 @@
4103
4091
  emits("update:imgList", list);
4104
4092
  };
4105
4093
  return (_ctx, _cache) => {
4106
- return vue.openBlock(), vue.createBlock(_sfc_main$7, {
4094
+ return vue.openBlock(), vue.createBlock(_sfc_main$6, {
4107
4095
  visible: props.visible,
4108
4096
  showTitle: false
4109
4097
  }, {
4110
4098
  default: vue.withCtx(() => [
4111
- vue.createElementVNode("div", _hoisted_1$5, [
4112
- vue.createElementVNode("div", _hoisted_2$2, [
4099
+ vue.createElementVNode("div", _hoisted_1$4, [
4100
+ vue.createElementVNode("div", _hoisted_2$4, [
4113
4101
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(titleList.value, (item, index) => {
4114
4102
  return vue.openBlock(), vue.createElementBlock("div", {
4115
4103
  key: index,
@@ -4118,10 +4106,10 @@
4118
4106
  }, [
4119
4107
  vue.createTextVNode(vue.toDisplayString(item.value) + " ", 1),
4120
4108
  item.id === activeTitle.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1)) : vue.createCommentVNode("", true)
4121
- ], 10, _hoisted_3$2);
4109
+ ], 10, _hoisted_3$4);
4122
4110
  }), 128)),
4123
- [1, 3].includes(activeTitle.value) && props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, " 最多可选" + vue.toDisplayString(props.imgNum) + "张图片,已选" + vue.toDisplayString(props.imgList.length) + " ", 1)) : vue.createCommentVNode("", true),
4124
- activeTitle.value === 2 && props.imgList.length > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, vue.toDisplayString(props.imgList.length) + "张上传成功 拖动可调整顺序 ", 1)) : vue.createCommentVNode("", true)
4111
+ [1, 3].includes(activeTitle.value) && props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, " \u6700\u591A\u53EF\u9009" + vue.toDisplayString(props.imgNum) + "\u5F20\u56FE\u7247\uFF0C\u5DF2\u9009" + vue.toDisplayString(props.imgList.length) + "\u5F20 ", 1)) : vue.createCommentVNode("", true),
4112
+ activeTitle.value === 2 && props.imgList.length > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, vue.toDisplayString(props.imgList.length) + "\u5F20\u4E0A\u4F20\u6210\u529F \u62D6\u52A8\u53EF\u8C03\u6574\u987A\u5E8F ", 1)) : vue.createCommentVNode("", true)
4125
4113
  ]),
4126
4114
  activeTitle.value === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
4127
4115
  vue.createElementVNode("div", _hoisted_8, [
@@ -4158,11 +4146,11 @@
4158
4146
  ]),
4159
4147
  _: 1
4160
4148
  }),
4161
- _cache[7] || (_cache[7] = vue.createElementVNode("span", null, "本地上传", -1))
4149
+ _hoisted_14
4162
4150
  ]),
4163
- _cache[8] || (_cache[8] = vue.createElementVNode("span", { class: "remark" }, "支持jpg、jpeg、png等多种格式,单张图片最大支持20MB", -1))
4164
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
4165
- vue.createVNode(vue.unref(draggable), {
4151
+ _hoisted_15
4152
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
4153
+ vue.createVNode(vue.unref(draggable__default.default), {
4166
4154
  modelValue: imgListTemp.value,
4167
4155
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imgListTemp.value = $event),
4168
4156
  handle: ".img-item",
@@ -4182,7 +4170,7 @@
4182
4170
  style: { "object-fit": "contain" },
4183
4171
  width: "120",
4184
4172
  height: "120"
4185
- }, null, 8, _hoisted_15),
4173
+ }, null, 8, _hoisted_17),
4186
4174
  vue.createVNode(vue.unref(iconsVue.CircleCloseFilled), {
4187
4175
  class: "icon pointer",
4188
4176
  onClick: ($event) => deleteImg(element)
@@ -4205,7 +4193,7 @@
4205
4193
  _: 1
4206
4194
  }, 8, ["modelValue"])
4207
4195
  ])),
4208
- vue.createElementVNode("div", _hoisted_16, [
4196
+ vue.createElementVNode("div", _hoisted_18, [
4209
4197
  vue.createElementVNode("input", {
4210
4198
  type: "file",
4211
4199
  name: "file",
@@ -4216,13 +4204,13 @@
4216
4204
  }, null, 32)
4217
4205
  ])
4218
4206
  ], 2)) : vue.createCommentVNode("", true),
4219
- activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
4220
- vue.createElementVNode("div", _hoisted_18, [
4207
+ activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
4208
+ vue.createElementVNode("div", _hoisted_20, [
4221
4209
  vue.createElementVNode("div", null, [
4222
4210
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
4223
4211
  modelValue: selectData.brandId,
4224
4212
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
4225
- placeholder: "请选择品牌",
4213
+ placeholder: "\u8BF7\u9009\u62E9\u54C1\u724C",
4226
4214
  size: "large",
4227
4215
  class: "select_1",
4228
4216
  filterable: "",
@@ -4243,7 +4231,7 @@
4243
4231
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
4244
4232
  modelValue: selectData.goodId,
4245
4233
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
4246
- placeholder: "请选择车型",
4234
+ placeholder: "\u8BF7\u9009\u62E9\u8F66\u578B",
4247
4235
  size: "large",
4248
4236
  class: "select_1",
4249
4237
  filterable: "",
@@ -4264,7 +4252,7 @@
4264
4252
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
4265
4253
  modelValue: selectData.carId,
4266
4254
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
4267
- placeholder: "请选择款型",
4255
+ placeholder: "\u8BF7\u9009\u62E9\u6B3E\u578B",
4268
4256
  size: "large",
4269
4257
  class: "select_2",
4270
4258
  filterable: "",
@@ -4288,14 +4276,14 @@
4288
4276
  style: { "width": "80px" },
4289
4277
  onClick: search
4290
4278
  }, {
4291
- default: vue.withCtx(() => _cache[9] || (_cache[9] = [
4292
- vue.createTextVNode("搜索")
4293
- ])),
4279
+ default: vue.withCtx(() => [
4280
+ vue.createTextVNode("\u641C\u7D22")
4281
+ ]),
4294
4282
  _: 1
4295
4283
  })
4296
4284
  ]),
4297
- tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
4298
- vue.createElementVNode("div", _hoisted_20, [
4285
+ tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
4286
+ vue.createElementVNode("div", _hoisted_22, [
4299
4287
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabList.value, (item, index) => {
4300
4288
  return vue.openBlock(), vue.createElementBlock("div", {
4301
4289
  key: index,
@@ -4303,11 +4291,11 @@
4303
4291
  onClick: ($event) => activeTab.value = item.type
4304
4292
  }, [
4305
4293
  vue.createTextVNode(vue.toDisplayString(item.name) + " ", 1),
4306
- item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22)) : vue.createCommentVNode("", true)
4307
- ], 10, _hoisted_21);
4294
+ item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24)) : vue.createCommentVNode("", true)
4295
+ ], 10, _hoisted_23);
4308
4296
  }), 128))
4309
4297
  ]),
4310
- vue.createElementVNode("div", _hoisted_23, [
4298
+ vue.createElementVNode("div", _hoisted_25, [
4311
4299
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(imageList.value, (item, index) => {
4312
4300
  return vue.openBlock(), vue.createElementBlock("div", {
4313
4301
  key: index,
@@ -4318,25 +4306,25 @@
4318
4306
  src: item.imgOrgUrl,
4319
4307
  alt: "",
4320
4308
  class: "image"
4321
- }, null, 8, _hoisted_25),
4322
- item.num ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, [
4323
- vue.createElementVNode("div", _hoisted_27, vue.toDisplayString(item.num), 1)
4309
+ }, null, 8, _hoisted_27),
4310
+ item.num ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
4311
+ vue.createElementVNode("div", _hoisted_29, vue.toDisplayString(item.num), 1)
4324
4312
  ])) : vue.createCommentVNode("", true)
4325
- ], 8, _hoisted_24);
4313
+ ], 8, _hoisted_26);
4326
4314
  }), 128))
4327
4315
  ])
4328
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
4316
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_30, [
4329
4317
  vue.createElementVNode("div", null, [
4330
- _cache[12] || (_cache[12] = vue.createElementVNode("div", null, " 图库中的图片仅限下载摩托范以编辑发布文章使用,不得用于其他任何平台及用途 ", -1)),
4318
+ _hoisted_31,
4331
4319
  vue.createElementVNode("div", null, [
4332
- _cache[10] || (_cache[10] = vue.createTextVNode(" 请阅读")),
4320
+ vue.createTextVNode(" \u8BF7\u9605\u8BFB"),
4333
4321
  vue.createElementVNode("a", {
4334
4322
  href: `https://${vue.unref(hostName)}/about?type=imageLicenseAgreement`,
4335
4323
  target: "_blank",
4336
4324
  rel: "noopener noreferrer",
4337
4325
  class: "link"
4338
- }, "《摩托范图片许可使用协议》", 8, _hoisted_29),
4339
- _cache[11] || (_cache[11] = vue.createTextVNode(",您的行为视为您已同意该协议。 "))
4326
+ }, "\u300A\u6469\u6258\u8303\u56FE\u7247\u8BB8\u53EF\u4F7F\u7528\u534F\u8BAE\u300B", 8, _hoisted_32),
4327
+ vue.createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ")
4340
4328
  ])
4341
4329
  ])
4342
4330
  ]))
@@ -4348,9 +4336,11 @@
4348
4336
  };
4349
4337
  }
4350
4338
  });
4351
- const index_vue_vue_type_style_index_0_lang$3 = "";
4352
- const _hoisted_1$4 = { class: "insert-video" };
4353
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4339
+ const index_vue_vue_type_style_index_0_lang$1 = "";
4340
+ const _hoisted_1$3 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u63D2\u5165\u89C6\u9891", -1);
4341
+ const _hoisted_2$3 = { class: "insert-video" };
4342
+ const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode("span", { class: "remark" }, "\u4E3A\u4E86\u83B7\u5F97\u66F4\u9AD8\u7684\u63A8\u8350\u91CF\u548C\u70B9\u51FB\u91CF\uFF0C\u5EFA\u8BAE\u4E0A\u4F20720p\uFF081280*720\uFF09\u6216\u66F4\u9AD8\u5206\u8FA8\u7387\u7684\u89C6\u9891\uFF0C\u89C6\u9891\u683C\u5F0F\u4E3A.mp4\u6216.mov\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC71G", -1);
4343
+ const _sfc_main$3 = vue.defineComponent({
4354
4344
  __name: "index",
4355
4345
  props: {
4356
4346
  visible: { type: Boolean, default: false },
@@ -4372,29 +4362,29 @@
4372
4362
  ele[0].dispatchEvent(event);
4373
4363
  };
4374
4364
  return (_ctx, _cache) => {
4375
- return vue.openBlock(), vue.createBlock(_sfc_main$7, {
4365
+ return vue.openBlock(), vue.createBlock(_sfc_main$6, {
4376
4366
  "show-btn": false,
4377
4367
  visible: vue.unref(visible),
4378
4368
  width: "600px",
4379
4369
  height: "100px"
4380
4370
  }, {
4381
- title: vue.withCtx(() => _cache[1] || (_cache[1] = [
4382
- vue.createElementVNode("span", null, "插入视频", -1)
4383
- ])),
4371
+ title: vue.withCtx(() => [
4372
+ _hoisted_1$3
4373
+ ]),
4384
4374
  default: vue.withCtx(() => [
4385
- vue.createElementVNode("div", _hoisted_1$4, [
4375
+ vue.createElementVNode("div", _hoisted_2$3, [
4386
4376
  vue.createVNode(vue.unref(elementPlus.ElButton), {
4387
4377
  style: { "width": "120px" },
4388
4378
  round: "",
4389
4379
  type: "primary",
4390
4380
  onClick: emitEvent
4391
4381
  }, {
4392
- default: vue.withCtx(() => _cache[2] || (_cache[2] = [
4393
- vue.createTextVNode("选择视频")
4394
- ])),
4382
+ default: vue.withCtx(() => [
4383
+ vue.createTextVNode("\u9009\u62E9\u89C6\u9891")
4384
+ ]),
4395
4385
  _: 1
4396
4386
  }),
4397
- _cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "remark" }, "为了获得更高的推荐量和点击量,建议上传720p(1280*720)或更高分辨率的视频,视频格式为.mp4或.mov,大小不超过1G", -1)),
4387
+ _hoisted_3$3,
4398
4388
  vue.createElementVNode("input", {
4399
4389
  type: "file",
4400
4390
  accept: "video/*",
@@ -4409,808 +4399,110 @@
4409
4399
  };
4410
4400
  }
4411
4401
  });
4412
- const index_vue_vue_type_style_index_0_lang$2 = "";
4413
- const index_vue_vue_type_style_index_0_lang$1 = "";
4414
- const _sfc_main$3 = {
4415
- name: "TopicManager",
4402
+ const index_vue_vue_type_style_index_0_lang = "";
4403
+ const _sfc_main$2 = {
4404
+ provide() {
4405
+ return {
4406
+ vm: this
4407
+ };
4408
+ },
4409
+ components: {
4410
+ ElInput: elementPlus.ElInput,
4411
+ BasicDialog: _sfc_main$6,
4412
+ draggable: draggable__default.default
4413
+ },
4416
4414
  props: {
4417
- // 编辑器DOM引用
4418
- editorDom: {
4419
- type: Object,
4420
- default: null
4415
+ visible: {
4416
+ type: Boolean,
4417
+ default: false
4421
4418
  },
4422
- // 话题API请求方法
4423
- request: {
4424
- type: Object,
4425
- default: null
4419
+ linkContent: {
4420
+ type: String,
4421
+ default: ""
4422
+ },
4423
+ fileSelected: {
4424
+ type: Function,
4425
+ default: () => {
4426
+ }
4426
4427
  }
4427
4428
  },
4428
4429
  data() {
4429
- return {
4430
- // 话题弹框相关数据
4431
- topicPopover: {
4432
- visible: false,
4433
- type: "hot",
4434
- // 'hot' 热门话题, 'search' 搜索话题
4435
- activeTab: "hot",
4436
- // 'hot' 热门话题, 'recent' 最近使用
4437
- position: { top: 0, left: 0 },
4438
- searchKeyword: "",
4439
- hotTopics: [],
4440
- searchTopics: [],
4441
- recentTopics: [],
4442
- loading: false,
4443
- page: 1,
4444
- hasMore: true,
4445
- searchPage: 1,
4446
- searchHasMore: true,
4447
- // 保存原始的selection和range信息
4448
- originalRange: null,
4449
- originalSelection: null,
4450
- // 保存触发位置信息
4451
- triggerInfo: {
4452
- paragraph: null,
4453
- hashIndex: -1,
4454
- cursorPosition: 0
4455
- },
4456
- // 全局弹框DOM引用
4457
- globalContainer: null,
4458
- globalMask: null
4430
+ return {};
4431
+ },
4432
+ computed: {
4433
+ input: {
4434
+ get() {
4435
+ return this.linkContent;
4436
+ },
4437
+ set(val) {
4438
+ this.$emit("update:linkContent", val);
4459
4439
  }
4460
- };
4440
+ }
4441
+ },
4442
+ mounted() {
4461
4443
  },
4462
4444
  methods: {
4463
- // 初始化话题管理器
4464
- init() {
4465
- if (!this.editorDom) {
4466
- console.warn("TopicManager: editorDom is required");
4467
- return;
4468
- }
4469
- setTimeout(() => this.bindEditorEvents(), 0);
4470
- },
4471
- // 绑定编辑器事件
4472
- bindEditorEvents() {
4473
- if (!this.editorDom)
4474
- return;
4475
- this.editorDom.addEventListener("keydown", this.handleTopicInput.bind(this));
4476
- },
4477
- // 解绑编辑器事件
4478
- unbindEditorEvents() {
4479
- if (!this.editorDom)
4480
- return;
4481
- this.editorDom.removeEventListener("keydown", this.handleTopicInput.bind(this));
4445
+ emitEvent() {
4446
+ var event = new MouseEvent("click");
4447
+ var ele = document.getElementsByClassName("video-input");
4448
+ ele[0].dispatchEvent(event);
4482
4449
  },
4483
- // 话题输入处理
4484
- handleTopicInput(event) {
4485
- var _a;
4486
- const activeElement = document.activeElement;
4487
- if (activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA")) {
4488
- return;
4489
- }
4490
- const selection = window.getSelection();
4491
- if (selection.rangeCount === 0)
4492
- return;
4493
- const range = selection.getRangeAt(0);
4494
- const container = range.startContainer;
4495
- if (!this.editorDom.contains(container))
4496
- return;
4497
- let currentNode = container;
4498
- while (currentNode && currentNode !== this.editorDom) {
4499
- if (currentNode.nodeType === Node.ELEMENT_NODE && currentNode.tagName === "MDD-TOPIC") {
4500
- return;
4501
- }
4502
- currentNode = currentNode.parentNode;
4503
- }
4504
- let paragraph = container;
4505
- while (paragraph && paragraph.nodeType !== Node.ELEMENT_NODE) {
4506
- paragraph = paragraph.parentNode;
4507
- }
4508
- while (paragraph && !((_a = paragraph.classList) == null ? void 0 : _a.contains("halo-paragraph"))) {
4509
- paragraph = paragraph.parentNode;
4510
- }
4511
- if (!paragraph)
4512
- return;
4513
- const { textContent: paragraphText, cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
4514
- if (event.key === "#") {
4515
- const afterCursor = paragraphText.substring(cursorPosition);
4516
- if (afterCursor.length > 0 && (afterCursor[0] === "@" || afterCursor[0] === " ")) {
4517
- return;
4450
+ setStatus(val) {
4451
+ this.$emit("update:visible", val);
4452
+ }
4453
+ }
4454
+ };
4455
+ const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode("div", null, [
4456
+ /* @__PURE__ */ vue.createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
4457
+ /* @__PURE__ */ vue.createElementVNode("span", { class: "collect-article_lable" }, "\u5982\u9700\u83B7\u5F97\u6B63\u5F0F\u4F7F\u7528\u6743\uFF0C\u8BF7\u81EA\u884C\u8054\u7CFB\u7248\u6743\u6240\u6709\u8005")
4458
+ ], -1);
4459
+ const _hoisted_2$2 = { class: "collect-article_content" };
4460
+ const _hoisted_3$2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "tip" }, "\u8BF7\u628A\u9700\u8981\u91C7\u96C6\u7684\u6587\u7AE0\u94FE\u63A5\u7C98\u8D34\u5728\u4E0B\u65B9\u7684\u8F93\u5165\u6846\uFF1A", -1);
4461
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
4462
+ const _component_el_input = vue.resolveComponent("el-input");
4463
+ const _component_BasicDialog = vue.resolveComponent("BasicDialog");
4464
+ return vue.openBlock(), vue.createBlock(_component_BasicDialog, {
4465
+ visible: $props.visible,
4466
+ width: "600px",
4467
+ height: "50px"
4468
+ }, {
4469
+ title: vue.withCtx(() => [
4470
+ _hoisted_1$2
4471
+ ]),
4472
+ default: vue.withCtx(() => [
4473
+ vue.createElementVNode("div", _hoisted_2$2, [
4474
+ _hoisted_3$2,
4475
+ vue.createVNode(_component_el_input, {
4476
+ modelValue: $options.input,
4477
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
4478
+ placeholder: "\u4EC5\u652F\u6301\u5FAE\u4FE1\u94FE\u63A5"
4479
+ }, null, 8, ["modelValue"])
4480
+ ])
4481
+ ]),
4482
+ _: 1
4483
+ }, 8, ["visible"]);
4484
+ }
4485
+ const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
4486
+ const index_vue_vue_type_style_index_0_scoped_true_lang = "";
4487
+ const _sfc_main$1 = {
4488
+ components: {
4489
+ ElIconError: iconsVue.CircleCloseFilled
4490
+ },
4491
+ props: {
4492
+ article: {
4493
+ type: Object,
4494
+ default: () => ({})
4495
+ }
4496
+ },
4497
+ methods: {
4498
+ close(e) {
4499
+ let child = e.target;
4500
+ while (child) {
4501
+ if (child.dataset.article) {
4502
+ child.parentNode.removeChild(child);
4503
+ break;
4518
4504
  }
4519
- setTimeout(() => {
4520
- const position = this.getCaretPosition();
4521
- const triggerInfo = {
4522
- paragraph,
4523
- hashIndex: cursorPosition,
4524
- // #号的位置
4525
- cursorPosition: cursorPosition + 1
4526
- // #号后的位置
4527
- };
4528
- this.showTopicPopover("hot", position, "", triggerInfo);
4529
- }, 10);
4530
- } else if (this.shouldTriggerSearch(event.key)) {
4531
- setTimeout(() => {
4532
- this.checkAndTriggerSearch(paragraph);
4533
- }, 10);
4534
- }
4535
- },
4536
- shouldTriggerSearch(key) {
4537
- return key.length === 1 || key === "Backspace" || key === "Delete";
4538
- },
4539
- checkAndTriggerSearch(paragraph) {
4540
- const selection = window.getSelection();
4541
- if (selection.rangeCount === 0)
4542
- return;
4543
- const range = selection.getRangeAt(0);
4544
- let currentNode = range.startContainer;
4545
- while (currentNode && currentNode !== paragraph) {
4546
- if (currentNode.nodeType === Node.ELEMENT_NODE && currentNode.tagName === "MDD-TOPIC") {
4547
- this.hideTopicPopover();
4548
- return;
4549
- }
4550
- currentNode = currentNode.parentNode;
4551
- }
4552
- const { textContent: paragraphText, cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
4553
- const beforeCursor = paragraphText.substring(0, cursorPosition);
4554
- const hashIndex = beforeCursor.lastIndexOf("#");
4555
- if (hashIndex !== -1) {
4556
- const afterHash = beforeCursor.substring(hashIndex + 1);
4557
- if (afterHash.indexOf(" ") === -1 && afterHash.indexOf("@") === -1) {
4558
- if (afterHash.length <= 15) {
4559
- const position = this.getCaretPosition();
4560
- const triggerInfo = {
4561
- paragraph,
4562
- hashIndex,
4563
- cursorPosition
4564
- };
4565
- if (afterHash.length === 0) {
4566
- this.showTopicPopover("hot", position, "", triggerInfo);
4567
- } else {
4568
- this.showTopicPopover("search", position, afterHash, triggerInfo);
4569
- }
4570
- } else if (afterHash.length > 15) {
4571
- this.hideTopicPopover();
4572
- }
4573
- } else {
4574
- this.hideTopicPopover();
4575
- }
4576
- } else {
4577
- this.hideTopicPopover();
4578
- }
4579
- },
4580
- getParagraphTextExcludingTopics(paragraph, range) {
4581
- let textContent = "";
4582
- let cursorPosition = 0;
4583
- let foundCursor = false;
4584
- const walker = document.createTreeWalker(
4585
- paragraph,
4586
- NodeFilter.SHOW_ALL,
4587
- {
4588
- acceptNode: function(node2) {
4589
- if (node2.nodeType === Node.ELEMENT_NODE && node2.tagName === "MDD-TOPIC") {
4590
- return NodeFilter.FILTER_REJECT;
4591
- }
4592
- return NodeFilter.FILTER_ACCEPT;
4593
- }
4594
- },
4595
- false
4596
- );
4597
- let node;
4598
- while (node = walker.nextNode()) {
4599
- if (node.nodeType === Node.TEXT_NODE) {
4600
- const nodeText = node.textContent;
4601
- if (!foundCursor && node === range.startContainer) {
4602
- cursorPosition = textContent.length + range.startOffset;
4603
- foundCursor = true;
4604
- }
4605
- textContent += nodeText;
4606
- }
4607
- }
4608
- return { textContent, cursorPosition };
4609
- },
4610
- getCaretPosition() {
4611
- const selection = window.getSelection();
4612
- if (selection.rangeCount === 0)
4613
- return { top: 0, left: 0 };
4614
- const range = selection.getRangeAt(0);
4615
- const rect = range.getBoundingClientRect();
4616
- return {
4617
- top: rect.bottom + window.scrollY,
4618
- left: rect.left + window.scrollX
4619
- };
4620
- },
4621
- // 话题弹框相关方法
4622
- showTopicPopover(type, position, searchKeyword = "", triggerInfo = null) {
4623
- if (!this.request || !this.request.getTopic) {
4624
- console.warn("话题功能需要提供 request.getTopic 方法");
4625
- return;
4626
- }
4627
- const selection = window.getSelection();
4628
- if (selection.rangeCount > 0) {
4629
- this.topicPopover.originalRange = selection.getRangeAt(0).cloneRange();
4630
- this.topicPopover.originalSelection = selection;
4631
- }
4632
- if (triggerInfo) {
4633
- this.topicPopover.triggerInfo = triggerInfo;
4634
- }
4635
- this.topicPopover.visible = true;
4636
- this.topicPopover.type = type;
4637
- this.topicPopover.position = position;
4638
- this.topicPopover.searchKeyword = searchKeyword;
4639
- if (type === "hot") {
4640
- this.topicPopover.activeTab = "hot";
4641
- this.loadHotTopics();
4642
- this.loadRecentTopics();
4643
- } else if (type === "search") {
4644
- this.searchTopics(searchKeyword);
4645
- }
4646
- this.createGlobalTopicPopover();
4647
- },
4648
- hideTopicPopover() {
4649
- this.topicPopover.visible = false;
4650
- this.topicPopover.hotTopics = [];
4651
- this.topicPopover.searchTopics = [];
4652
- this.topicPopover.page = 1;
4653
- this.topicPopover.searchPage = 1;
4654
- this.topicPopover.hasMore = true;
4655
- this.topicPopover.searchHasMore = true;
4656
- this.topicPopover.originalRange = null;
4657
- this.topicPopover.originalSelection = null;
4658
- this.topicPopover.triggerInfo = {
4659
- paragraph: null,
4660
- hashIndex: -1,
4661
- cursorPosition: 0
4662
- };
4663
- this.removeGlobalTopicPopover();
4664
- },
4665
- switchTopicTab(tab) {
4666
- this.topicPopover.activeTab = tab;
4667
- this.updateGlobalTopicPopover();
4668
- },
4669
- async loadHotTopics() {
4670
- if (this.topicPopover.loading || !this.topicPopover.hasMore)
4671
- return;
4672
- this.topicPopover.loading = true;
4673
- try {
4674
- const response = await this.request.getTopic({
4675
- action: "201023",
4676
- page: this.topicPopover.page,
4677
- limit: 50,
4678
- hoopId: 0,
4679
- type: 0,
4680
- orderBy: "view"
4681
- });
4682
- if (response && response.data && response.data.code === 0) {
4683
- const topics = response.data.data || [];
4684
- if (topics.length === 0) {
4685
- this.topicPopover.hasMore = false;
4686
- } else {
4687
- const existingIds = new Set(this.topicPopover.hotTopics.map((t) => t.id));
4688
- const newTopics = topics.filter((t) => !existingIds.has(t.id));
4689
- this.topicPopover.hotTopics = [...this.topicPopover.hotTopics, ...newTopics];
4690
- this.topicPopover.page++;
4691
- if (newTopics.length === 0) {
4692
- this.topicPopover.hasMore = false;
4693
- }
4694
- }
4695
- } else {
4696
- console.warn("加载热门话题失败:", response);
4697
- this.topicPopover.hasMore = false;
4698
- }
4699
- } catch (error) {
4700
- console.error("加载热门话题失败:", error);
4701
- this.topicPopover.hasMore = false;
4702
- } finally {
4703
- this.topicPopover.loading = false;
4704
- this.updateGlobalTopicPopover();
4705
- }
4706
- },
4707
- async searchTopics(keyword) {
4708
- this.topicPopover.searchKeyword = keyword;
4709
- this.topicPopover.searchTopics = [];
4710
- this.topicPopover.searchPage = 1;
4711
- this.topicPopover.searchHasMore = true;
4712
- if (this.topicPopover.loading) {
4713
- this.topicPopover.loading = false;
4714
- }
4715
- this.topicPopover.loading = true;
4716
- try {
4717
- const response = await this.request.getTopic({
4718
- action: "201023",
4719
- title: keyword,
4720
- highlightTitle: "title",
4721
- page: this.topicPopover.searchPage,
4722
- limit: 50
4723
- });
4724
- if (response && response.data && response.data.code === 0) {
4725
- const topics = response.data.data || [];
4726
- this.topicPopover.searchTopics = topics;
4727
- this.topicPopover.searchPage++;
4728
- if (topics.length === 0) {
4729
- this.topicPopover.searchHasMore = false;
4730
- } else {
4731
- this.topicPopover.searchHasMore = topics.length >= 50;
4732
- }
4733
- } else {
4734
- console.warn("搜索话题失败:", response);
4735
- this.topicPopover.searchHasMore = false;
4736
- }
4737
- } catch (error) {
4738
- console.error("搜索话题失败:", error);
4739
- this.topicPopover.searchHasMore = false;
4740
- } finally {
4741
- this.topicPopover.loading = false;
4742
- this.updateGlobalTopicPopover();
4743
- }
4744
- },
4745
- loadRecentTopics() {
4746
- try {
4747
- const localTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
4748
- this.topicPopover.recentTopics = localTopics;
4749
- } catch (error) {
4750
- console.error("加载最近使用话题失败:", error);
4751
- this.topicPopover.recentTopics = [];
4752
- }
4753
- },
4754
- selectTopic(topic) {
4755
- this.saveToRecentTopics(topic);
4756
- this.insertTopicToEditor(topic);
4757
- this.hideTopicPopover();
4758
- this.$emit("topic-inserted", topic);
4759
- },
4760
- saveToRecentTopics(topic) {
4761
- try {
4762
- let recentTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
4763
- recentTopics = recentTopics.filter((item) => item.id !== topic.id);
4764
- recentTopics.unshift(topic);
4765
- if (recentTopics.length > 20) {
4766
- recentTopics = recentTopics.slice(0, 20);
4767
- }
4768
- localStorage.setItem("localTopic", JSON.stringify(recentTopics));
4769
- } catch (error) {
4770
- console.error("保存最近使用话题失败:", error);
4771
- }
4772
- },
4773
- // 创建全局话题弹框
4774
- createGlobalTopicPopover() {
4775
- this.removeGlobalTopicPopover();
4776
- const mask = document.createElement("div");
4777
- mask.className = "topic-popover-mask";
4778
- mask.addEventListener("click", () => {
4779
- this.hideTopicPopover();
4780
- });
4781
- const container = document.createElement("div");
4782
- container.className = "topic-popover";
4783
- container.style.position = "fixed";
4784
- container.style.top = this.topicPopover.position.top + "px";
4785
- container.style.left = this.topicPopover.position.left + "px";
4786
- container.style.zIndex = "9999";
4787
- container.addEventListener("click", (e) => {
4788
- e.stopPropagation();
4789
- });
4790
- container.innerHTML = this.createTopicPopoverContent();
4791
- document.body.appendChild(mask);
4792
- document.body.appendChild(container);
4793
- this.topicPopover.globalMask = mask;
4794
- this.topicPopover.globalContainer = container;
4795
- this.bindTopicPopoverEvents();
4796
- },
4797
- // 移除全局话题弹框
4798
- removeGlobalTopicPopover() {
4799
- if (this.topicPopover.globalMask) {
4800
- document.body.removeChild(this.topicPopover.globalMask);
4801
- this.topicPopover.globalMask = null;
4802
- }
4803
- if (this.topicPopover.globalContainer) {
4804
- document.body.removeChild(this.topicPopover.globalContainer);
4805
- this.topicPopover.globalContainer = null;
4806
- }
4807
- },
4808
- // 更新全局话题弹框内容
4809
- updateGlobalTopicPopover() {
4810
- if (!this.topicPopover.globalContainer)
4811
- return;
4812
- this.topicPopover.globalContainer.innerHTML = this.createTopicPopoverContent();
4813
- this.bindTopicPopoverEvents();
4814
- },
4815
- // 创建话题弹框内容
4816
- createTopicPopoverContent() {
4817
- if (this.topicPopover.type === "hot") {
4818
- return this.getHotTopicPopoverHTML();
4819
- } else if (this.topicPopover.type === "search") {
4820
- return this.getSearchTopicPopoverHTML();
4821
- }
4822
- return "";
4823
- },
4824
- // 获取热门话题弹框HTML
4825
- getHotTopicPopoverHTML() {
4826
- const activeTab = this.topicPopover.activeTab;
4827
- const hotTopics = this.topicPopover.hotTopics;
4828
- const recentTopics = this.topicPopover.recentTopics;
4829
- const loading = this.topicPopover.loading;
4830
- const hasMore = this.topicPopover.hasMore;
4831
- let topicListHTML = "";
4832
- if (activeTab === "hot") {
4833
- if (loading && hotTopics.length === 0) {
4834
- topicListHTML = '<div class="topic-loading">加载中...</div>';
4835
- } else if (hotTopics.length === 0) {
4836
- topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
4837
- } else {
4838
- topicListHTML = hotTopics.map(
4839
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
4840
- ).join("");
4841
- if (loading) {
4842
- topicListHTML += '<div class="topic-loading">加载更多...</div>';
4843
- } else if (!hasMore) {
4844
- topicListHTML += '<div class="topic-empty">没有更多了</div>';
4845
- }
4846
- }
4847
- } else {
4848
- if (recentTopics.length === 0) {
4849
- topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
4850
- } else {
4851
- topicListHTML = recentTopics.map(
4852
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
4853
- ).join("");
4854
- }
4855
- }
4856
- return `
4857
- <div class="topic-popover-content">
4858
- <div class="topic-tabs">
4859
- <div class="topic-tab ${activeTab === "hot" ? "active" : ""}" data-tab="hot">
4860
- 热门话题
4861
- </div>
4862
- <div class="topic-tab ${activeTab === "recent" ? "active" : ""}" data-tab="recent">
4863
- 最近使用
4864
- </div>
4865
- </div>
4866
- <div class="topic-list-container">
4867
- <div class="topic-list">
4868
- ${topicListHTML}
4869
- </div>
4870
- </div>
4871
- </div>
4872
- `;
4873
- },
4874
- // 获取搜索话题弹框HTML
4875
- getSearchTopicPopoverHTML() {
4876
- const searchKeyword = this.topicPopover.searchKeyword;
4877
- const searchTopics = this.topicPopover.searchTopics;
4878
- const loading = this.topicPopover.loading;
4879
- const searchHasMore = this.topicPopover.searchHasMore;
4880
- let topicListHTML = "";
4881
- if (loading && searchTopics.length === 0) {
4882
- topicListHTML = '<div class="topic-loading">搜索中...</div>';
4883
- } else if (searchTopics.length === 0) {
4884
- topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
4885
- } else {
4886
- topicListHTML = searchTopics.map(
4887
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}">#${topic.exactlyMatchTitle}</div>`
4888
- ).join("");
4889
- if (loading) {
4890
- topicListHTML += '<div class="topic-loading">加载更多...</div>';
4891
- } else if (!searchHasMore) {
4892
- topicListHTML += '<div class="topic-empty">没有更多了</div>';
4893
- }
4894
- }
4895
- return `
4896
- <div class="topic-popover-content">
4897
- <div class="topic-search-header">
4898
- <span class="topic-search-title">#${searchKeyword}</span>
4899
- </div>
4900
- <div class="topic-list-container">
4901
- <div class="topic-list">
4902
- ${topicListHTML}
4903
- </div>
4904
- </div>
4905
- </div>
4906
- `;
4907
- },
4908
- // 绑定话题弹框事件
4909
- bindTopicPopoverEvents() {
4910
- if (!this.topicPopover.globalContainer)
4911
- return;
4912
- const tabs = this.topicPopover.globalContainer.querySelectorAll(".topic-tab");
4913
- tabs.forEach((tab) => {
4914
- tab.addEventListener("click", (e) => {
4915
- const tabType = e.target.getAttribute("data-tab");
4916
- this.switchTopicTab(tabType);
4917
- });
4918
- });
4919
- const topicItems = this.topicPopover.globalContainer.querySelectorAll(".topic-item");
4920
- topicItems.forEach((item) => {
4921
- item.addEventListener("click", (e) => {
4922
- const topicId = parseInt(e.target.getAttribute("data-topic-id"));
4923
- const topic = this.findTopicById(topicId);
4924
- if (topic) {
4925
- this.selectTopic(topic);
4926
- }
4927
- });
4928
- });
4929
- const listContainer = this.topicPopover.globalContainer.querySelector(".topic-list-container");
4930
- if (listContainer) {
4931
- listContainer.addEventListener("scroll", (e) => {
4932
- if (this.topicPopover.type === "hot") {
4933
- this.handleTopicScroll(e);
4934
- } else if (this.topicPopover.type === "search") {
4935
- this.handleSearchTopicScroll(e);
4936
- }
4937
- });
4938
- }
4939
- },
4940
- // 根据ID查找话题
4941
- findTopicById(topicId) {
4942
- let topic = this.topicPopover.hotTopics.find((t) => t.id === topicId);
4943
- if (topic)
4944
- return topic;
4945
- topic = this.topicPopover.searchTopics.find((t) => t.id === topicId);
4946
- if (topic)
4947
- return topic;
4948
- topic = this.topicPopover.recentTopics.find((t) => t.id === topicId);
4949
- if (topic)
4950
- return topic;
4951
- return null;
4952
- },
4953
- handleTopicScroll(event) {
4954
- if (this.topicPopover.activeTab !== "hot")
4955
- return;
4956
- const container = event.target;
4957
- const scrollTop = container.scrollTop;
4958
- const scrollHeight = container.scrollHeight;
4959
- const clientHeight = container.clientHeight;
4960
- if (scrollTop + clientHeight >= scrollHeight - 10) {
4961
- this.loadHotTopics();
4962
- }
4963
- },
4964
- handleSearchTopicScroll(event) {
4965
- const container = event.target;
4966
- const scrollTop = container.scrollTop;
4967
- const scrollHeight = container.scrollHeight;
4968
- const clientHeight = container.clientHeight;
4969
- if (scrollTop + clientHeight >= scrollHeight - 10) {
4970
- this.searchTopics(this.topicPopover.searchKeyword);
4971
- }
4972
- },
4973
- insertTopicToEditor(topic) {
4974
- const originalRange = this.topicPopover.originalRange;
4975
- const triggerInfo = this.topicPopover.triggerInfo;
4976
- const popoverType = this.topicPopover.type;
4977
- this.hideTopicPopover();
4978
- let range = originalRange;
4979
- if (!range) {
4980
- const selection2 = window.getSelection();
4981
- if (selection2.rangeCount === 0)
4982
- return;
4983
- range = selection2.getRangeAt(0);
4984
- }
4985
- const topicText = `#${topic.exactlyMatchTitle}`;
4986
- if (popoverType === "search" && triggerInfo && triggerInfo.paragraph) {
4987
- const paragraph = triggerInfo.paragraph;
4988
- const hashIndex = triggerInfo.hashIndex;
4989
- const deleteRange = document.createRange();
4990
- const walker = document.createTreeWalker(
4991
- paragraph,
4992
- NodeFilter.SHOW_TEXT,
4993
- {
4994
- acceptNode: function(node2) {
4995
- let parent = node2.parentNode;
4996
- while (parent && parent !== paragraph) {
4997
- if (parent.tagName === "MDD-TOPIC") {
4998
- return NodeFilter.FILTER_REJECT;
4999
- }
5000
- parent = parent.parentNode;
5001
- }
5002
- return NodeFilter.FILTER_ACCEPT;
5003
- }
5004
- },
5005
- false
5006
- );
5007
- let position = 0;
5008
- let startNode = null;
5009
- let startOffset = 0;
5010
- let endNode = null;
5011
- let endOffset = 0;
5012
- let node;
5013
- while (node = walker.nextNode()) {
5014
- if (position + node.textContent.length > hashIndex) {
5015
- startNode = node;
5016
- startOffset = hashIndex - position;
5017
- break;
5018
- }
5019
- position += node.textContent.length;
5020
- }
5021
- const currentCursorPosition = triggerInfo.cursorPosition;
5022
- position = 0;
5023
- walker.currentNode = paragraph;
5024
- while (node = walker.nextNode()) {
5025
- if (position + node.textContent.length >= currentCursorPosition) {
5026
- endNode = node;
5027
- endOffset = currentCursorPosition - position;
5028
- break;
5029
- }
5030
- position += node.textContent.length;
5031
- }
5032
- if (startNode && endNode) {
5033
- deleteRange.setStart(startNode, startOffset);
5034
- deleteRange.setEnd(endNode, endOffset);
5035
- deleteRange.deleteContents();
5036
- range = document.createRange();
5037
- range.setStart(startNode, startOffset);
5038
- range.collapse(true);
5039
- }
5040
- } else if (popoverType === "hot") {
5041
- const container = range.startContainer;
5042
- if (container.nodeType === Node.TEXT_NODE && container.textContent) {
5043
- const offset = range.startOffset;
5044
- if (offset > 0 && container.textContent[offset - 1] === "#") {
5045
- const deleteRange = document.createRange();
5046
- deleteRange.setStart(container, offset - 1);
5047
- deleteRange.setEnd(container, offset);
5048
- deleteRange.deleteContents();
5049
- range.setStart(container, offset - 1);
5050
- range.collapse(true);
5051
- }
5052
- }
5053
- }
5054
- const topicElement = document.createElement("mdd-topic");
5055
- topicElement.setAttribute("data-topic", JSON.stringify({
5056
- topicId: topic.id,
5057
- topicType: 0,
5058
- startIndex: 0,
5059
- // 会在updateTopicPosition中更新
5060
- endIndex: 0
5061
- // 会在updateTopicPosition中更新
5062
- }));
5063
- topicElement.textContent = topicText;
5064
- topicElement.setAttribute("contenteditable", "false");
5065
- range.deleteContents();
5066
- range.insertNode(topicElement);
5067
- const spaceNode = document.createTextNode(" ");
5068
- range.setStartAfter(topicElement);
5069
- range.insertNode(spaceNode);
5070
- const newRange = document.createRange();
5071
- newRange.setStartAfter(spaceNode);
5072
- newRange.collapse(true);
5073
- const selection = window.getSelection();
5074
- selection.removeAllRanges();
5075
- selection.addRange(newRange);
5076
- setTimeout(() => {
5077
- const currentSelection = window.getSelection();
5078
- if (currentSelection.rangeCount > 0) {
5079
- const currentRange = currentSelection.getRangeAt(0);
5080
- if (currentRange.startContainer !== spaceNode.nextSibling) {
5081
- const correctRange = document.createRange();
5082
- correctRange.setStartAfter(spaceNode);
5083
- correctRange.collapse(true);
5084
- currentSelection.removeAllRanges();
5085
- currentSelection.addRange(correctRange);
5086
- }
5087
- }
5088
- }, 0);
5089
- this.$emit("update-topic-position");
5090
- },
5091
- // 销毁话题管理器
5092
- destroy() {
5093
- this.unbindEditorEvents();
5094
- this.hideTopicPopover();
5095
- }
5096
- },
5097
- mounted() {
5098
- this.init();
5099
- },
5100
- beforeUnmount() {
5101
- this.destroy();
5102
- }
5103
- };
5104
- const _hoisted_1$3 = { class: "topic-manager" };
5105
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5106
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3);
5107
- }
5108
- const TopicManager = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
5109
- const index_vue_vue_type_style_index_0_lang = "";
5110
- const _sfc_main$2 = {
5111
- provide() {
5112
- return {
5113
- vm: this
5114
- };
5115
- },
5116
- components: {
5117
- ElInput: elementPlus.ElInput,
5118
- BasicDialog: _sfc_main$7,
5119
- draggable
5120
- },
5121
- props: {
5122
- visible: {
5123
- type: Boolean,
5124
- default: false
5125
- },
5126
- linkContent: {
5127
- type: String,
5128
- default: ""
5129
- },
5130
- fileSelected: {
5131
- type: Function,
5132
- default: () => {
5133
- }
5134
- }
5135
- },
5136
- data() {
5137
- return {};
5138
- },
5139
- computed: {
5140
- input: {
5141
- get() {
5142
- return this.linkContent;
5143
- },
5144
- set(val) {
5145
- this.$emit("update:linkContent", val);
5146
- }
5147
- }
5148
- },
5149
- mounted() {
5150
- },
5151
- methods: {
5152
- emitEvent() {
5153
- var event = new MouseEvent("click");
5154
- var ele = document.getElementsByClassName("video-input");
5155
- ele[0].dispatchEvent(event);
5156
- },
5157
- setStatus(val) {
5158
- this.$emit("update:visible", val);
5159
- }
5160
- // submit() {
5161
- // this.$emit('submit')
5162
- // }
5163
- }
5164
- };
5165
- const _hoisted_1$2 = { class: "collect-article_content" };
5166
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5167
- const _component_el_input = vue.resolveComponent("el-input");
5168
- const _component_BasicDialog = vue.resolveComponent("BasicDialog");
5169
- return vue.openBlock(), vue.createBlock(_component_BasicDialog, {
5170
- visible: $props.visible,
5171
- width: "600px",
5172
- height: "50px"
5173
- }, {
5174
- title: vue.withCtx(() => _cache[1] || (_cache[1] = [
5175
- vue.createElementVNode("div", null, [
5176
- vue.createElementVNode("span", null, "采集文章"),
5177
- vue.createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
5178
- ], -1)
5179
- ])),
5180
- default: vue.withCtx(() => [
5181
- vue.createElementVNode("div", _hoisted_1$2, [
5182
- _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
5183
- vue.createVNode(_component_el_input, {
5184
- modelValue: $options.input,
5185
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
5186
- placeholder: "仅支持微信链接"
5187
- }, null, 8, ["modelValue"])
5188
- ])
5189
- ]),
5190
- _: 1
5191
- }, 8, ["visible"]);
5192
- }
5193
- const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
5194
- const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
5195
- const _sfc_main$1 = {
5196
- components: {
5197
- ElIconError: iconsVue.CircleCloseFilled
5198
- },
5199
- props: {
5200
- article: {
5201
- type: Object,
5202
- default: () => ({})
5203
- }
5204
- },
5205
- methods: {
5206
- close(e) {
5207
- let child = e.target;
5208
- while (child) {
5209
- if (child.dataset.article) {
5210
- child.parentNode.removeChild(child);
5211
- break;
5212
- }
5213
- child = child.parentNode;
4505
+ child = child.parentNode;
5214
4506
  }
5215
4507
  this.$emit("delete");
5216
4508
  }
@@ -5236,8 +4528,8 @@
5236
4528
  vue.createElementVNode("div", _hoisted_4, vue.toDisplayString($props.article.title), 1),
5237
4529
  vue.createElementVNode("div", _hoisted_5, [
5238
4530
  vue.createElementVNode("span", null, vue.toDisplayString($props.article.author), 1),
5239
- vue.createElementVNode("span", null, vue.toDisplayString($props.article.viewNum) + "浏览", 1),
5240
- vue.createElementVNode("span", null, vue.toDisplayString($props.article.replycnt) + "评论", 1)
4531
+ vue.createElementVNode("span", null, vue.toDisplayString($props.article.viewNum) + "\u6D4F\u89C8", 1),
4532
+ vue.createElementVNode("span", null, vue.toDisplayString($props.article.replycnt) + "\u8BC4\u8BBA", 1)
5241
4533
  ])
5242
4534
  ]),
5243
4535
  vue.createVNode(_component_el_icon_error, {
@@ -5249,10 +4541,10 @@
5249
4541
  class: vue.normalizeClass([{
5250
4542
  "article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
5251
4543
  }, "article-bg"])
5252
- }, " 平台仅支持展示18个月的推荐内容 ", 2)) : vue.createCommentVNode("", true)
4544
+ }, " \u5E73\u53F0\u4EC5\u652F\u6301\u5C55\u793A18\u4E2A\u6708\u7684\u63A8\u8350\u5185\u5BB9 ", 2)) : vue.createCommentVNode("", true)
5253
4545
  ]);
5254
4546
  }
5255
- const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
4547
+ const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-1c406a11"]]);
5256
4548
  const mountArticleDom = (props, del) => {
5257
4549
  const className = "article-wrap";
5258
4550
  const article = props.article;
@@ -5286,15 +4578,14 @@
5286
4578
  name: "Edit",
5287
4579
  components: {
5288
4580
  ElInput: elementPlus.ElInput,
5289
- InsertArticle: _sfc_main$6,
5290
- ImgUpload: _sfc_main$5,
5291
- VideoUpload: _sfc_main$4,
4581
+ InsertArticle: _sfc_main$5,
4582
+ ImgUpload: _sfc_main$4,
4583
+ VideoUpload: _sfc_main$3,
5292
4584
  CollectArticle,
5293
4585
  ElFormItem: elementPlus.ElFormItem,
5294
4586
  ElForm: elementPlus.ElForm,
5295
4587
  ElDialog: elementPlus.ElDialog,
5296
- ElButton: elementPlus.ElButton,
5297
- TopicManager
4588
+ ElButton: elementPlus.ElButton
5298
4589
  },
5299
4590
  props: [
5300
4591
  "disabled",
@@ -5304,15 +4595,13 @@
5304
4595
  "importEssay",
5305
4596
  "uploadImageByOther",
5306
4597
  "chartGallery",
5307
- "request",
5308
- "placeholder"
4598
+ "request"
5309
4599
  ],
5310
4600
  data() {
5311
4601
  return {
5312
4602
  hasArticleCard: false,
5313
4603
  cursorStyle: "auto",
5314
4604
  titleCount: 0,
5315
- // 标题数量
5316
4605
  viewLinkDialog: false,
5317
4606
  linkForm: {
5318
4607
  linkAddress: "",
@@ -5320,54 +4609,39 @@
5320
4609
  },
5321
4610
  setAlignFlag: true,
5322
4611
  article: {},
5323
- // 插入的文章
5324
4612
  imgList: [],
5325
4613
  imgNum: 20,
5326
4614
  videoList: [],
5327
4615
  visibleVideo: false,
5328
4616
  visibleCollectArticle: false,
5329
4617
  visibleArticle: false,
5330
- // 插入文章
5331
4618
  visibleImg: false,
5332
- // 插入图片
5333
4619
  imgType: "normal",
5334
- //
5335
4620
  typeEnum: {
5336
- 文字: "1",
5337
- 图片: "2",
5338
- 图文: "3",
5339
- 段落标题: "4",
5340
- 关联: "5",
5341
- // 关联车辆、轨迹、活动、商家、话题
5342
- 单视频: "6",
5343
- 视频文字: "7",
4621
+ \u6587\u5B57: "1",
4622
+ \u56FE\u7247: "2",
4623
+ \u56FE\u6587: "3",
4624
+ \u6BB5\u843D\u6807\u9898: "4",
4625
+ \u5173\u8054: "5",
4626
+ \u5355\u89C6\u9891: "6",
4627
+ \u89C6\u9891\u6587\u5B57: "7",
5344
4628
  URL: "8",
5345
- 文章卡片: "11"
4629
+ \u6587\u7AE0\u5361\u7247: "11"
5346
4630
  },
5347
4631
  fontInfo: {
5348
4632
  size: ""
5349
4633
  },
5350
4634
  user: {},
5351
- // 用户
5352
4635
  editor: {},
5353
- // 编辑器实例对象
5354
4636
  editorDom: {},
5355
- // 编辑器Dom
5356
4637
  uploadStore: {},
5357
- // 待上传的图片池
5358
4638
  linkContent: "",
5359
- // 插入链接的地址
5360
4639
  loadingText: "",
5361
- // loaing的提示文字
5362
4640
  progressPercent: "",
5363
- // 上传进度
5364
4641
  currentIndex: 0,
5365
4642
  loading: false,
5366
- // 是否提交中
5367
4643
  viewStatus: false,
5368
- // todo: 改名
5369
4644
  linkStatus: false,
5370
- // todo: 改名
5371
4645
  styleStatus: {
5372
4646
  bold: false,
5373
4647
  italic: false,
@@ -5391,7 +4665,6 @@
5391
4665
  targetMove: "",
5392
4666
  moverClasses: ["halo-img-content", "halo-video-content"],
5393
4667
  selectDom: null
5394
- //选中的dom
5395
4668
  };
5396
4669
  },
5397
4670
  computed: {
@@ -5408,12 +4681,12 @@
5408
4681
  watch: {
5409
4682
  progressPercent(val) {
5410
4683
  const inner = document.querySelector(".video-progress .inner");
5411
- console.log(val, "视频上传进度");
4684
+ console.log(val, "\u89C6\u9891\u4E0A\u4F20\u8FDB\u5EA6");
5412
4685
  if (inner) {
5413
4686
  inner.style.width = val + "%";
5414
4687
  if (val === 100) {
5415
4688
  document.querySelector(".video-progress").innerHTML = `
5416
- <div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
4689
+ <div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">\u6B63\u5728\u83B7\u53D6\u89C6\u9891\u5C01\u9762</div>
5417
4690
  `;
5418
4691
  }
5419
4692
  }
@@ -5432,7 +4705,7 @@
5432
4705
  me2.user = JSON.parse(
5433
4706
  window.localStorage.getItem("user") || window.localStorage.getItem("userInfo") || "{}"
5434
4707
  );
5435
- me2.guid = me2.user.uid + "|" + util.tools.guid();
4708
+ me2.guid = me2.user.uid + "|" + util__default.default.tools.guid();
5436
4709
  },
5437
4710
  beforeDestroy() {
5438
4711
  this.editorDom && this.editorDom.removeEventListener("blur", this.canSetAlign);
@@ -5465,6 +4738,7 @@
5465
4738
  },
5466
4739
  setCursor() {
5467
4740
  this.cursorStyle = this.cursorStyle === cursorImg ? "auto" : cursorImg;
4741
+ console.log(this.styleStatus, 999);
5468
4742
  this.curStyle = { ...this.styleStatus };
5469
4743
  this.editorDom.addEventListener("mouseup", this.handleCopyFormatUp);
5470
4744
  },
@@ -5502,10 +4776,10 @@
5502
4776
  this.visibleVideo = false;
5503
4777
  const fileName = (files[0] && files[0].name || "").toLowerCase();
5504
4778
  if (files[0].size > 1 * 1024 * 1024 * 1024) {
5505
- return me2.setToast("视频大小不能超过1GB");
4779
+ return me2.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
5506
4780
  }
5507
4781
  if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
5508
- return me2.setToast("视频格式不是mp4或mov");
4782
+ return me2.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
5509
4783
  }
5510
4784
  const me2 = this;
5511
4785
  if (me2.loading)
@@ -5525,9 +4799,7 @@
5525
4799
  id: result.videoId,
5526
4800
  desc: "",
5527
4801
  vodSize: result.vodSize || "",
5528
- // 视频大小
5529
4802
  vodType: result.vodType || ""
5530
- // 图片尺寸
5531
4803
  };
5532
4804
  me2.$emit("updateAddVideo", true);
5533
4805
  me2.editor["insertVideo"](result.videoUrl, video);
@@ -5581,11 +4853,11 @@
5581
4853
  },
5582
4854
  insertLink() {
5583
4855
  if (!this.linkForm.linkAddress)
5584
- return elementPlus.ElMessage.error("请输入链接地址");
4856
+ return elementPlus.ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740");
5585
4857
  if (!this.linkForm.linkWriting)
5586
- return elementPlus.ElMessage.error("请输入链接文案");
4858
+ return elementPlus.ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u6587\u6848");
5587
4859
  if (!this.validUrl(this.linkForm.linkAddress)) {
5588
- return this.setToast("URL无效");
4860
+ return this.setToast("URL\u65E0\u6548");
5589
4861
  }
5590
4862
  this.editor.insertLink(
5591
4863
  this.linkForm.linkAddress,
@@ -5614,10 +4886,6 @@
5614
4886
  });
5615
4887
  });
5616
4888
  },
5617
- // TopicManager事件处理
5618
- onTopicInserted(topic) {
5619
- this.updateData(true);
5620
- },
5621
4889
  getHtml(type) {
5622
4890
  this.updateTopicPosition();
5623
4891
  const html = this.editor.getHTML();
@@ -5719,8 +4987,6 @@
5719
4987
  const frag = document.createDocumentFragment();
5720
4988
  frag.appendChild(this.editor.empty(div));
5721
4989
  const nodes = [...frag.childNodes];
5722
- const mddTopics = frag.querySelectorAll("mdd-topic");
5723
- mddTopics.forEach((topic) => topic.setAttribute("contenteditable", "false"));
5724
4990
  for (let i = 0; i < nodes.length; i++) {
5725
4991
  const node = nodes[i];
5726
4992
  if (node.nodeType === 1) {
@@ -5814,8 +5080,6 @@
5814
5080
  },
5815
5081
  async parseArticle(node) {
5816
5082
  const data = JSON.parse(node.dataset.article);
5817
- if (!this.getEassyDetail)
5818
- return;
5819
5083
  await this.getEassyDetail(data.id, (info) => {
5820
5084
  const el = mountArticleDom(
5821
5085
  {
@@ -6072,7 +5336,7 @@
6072
5336
  }
6073
5337
  this.updateData(true);
6074
5338
  } else {
6075
- this.setToast(rst.origin.name + "上传失败,请重试");
5339
+ this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
6076
5340
  }
6077
5341
  },
6078
5342
  insertVideoBtns(editor, node) {
@@ -6087,7 +5351,7 @@
6087
5351
  me2.currentVideo = node;
6088
5352
  e.stopPropagation();
6089
5353
  };
6090
- replaceBtn.innerText = "更换封面";
5354
+ replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
6091
5355
  return replaceBtn;
6092
5356
  },
6093
5357
  insertImgOperateBtns(editor, data) {
@@ -6108,12 +5372,13 @@
6108
5372
  }
6109
5373
  });
6110
5374
  var descInputWrap;
5375
+ console.log(data.seamlessFlag, "count<<<<<<");
6111
5376
  var descInput = editor.createElement("textarea", {
6112
5377
  class: "desc-input",
6113
5378
  maxlength: "50",
6114
5379
  rows: "2",
6115
5380
  cols: "50",
6116
- placeholder: "请输入图片描述(最多50字)",
5381
+ placeholder: "\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0(\u6700\u591A50\u5B57)",
6117
5382
  contenteditable: "false"
6118
5383
  });
6119
5384
  descInput.disabled = me2.disabled;
@@ -6122,7 +5387,7 @@
6122
5387
  const img = parent.querySelector(".halo-picture-area");
6123
5388
  img.dataset.desc = e.target.value;
6124
5389
  if (e.target.value.length > 49) {
6125
- return me2.setToast("限制50个字符");
5390
+ return me2.setToast("\u9650\u523650\u4E2A\u5B57\u7B26");
6126
5391
  }
6127
5392
  };
6128
5393
  descInput.value = data.content || "";
@@ -6172,7 +5437,7 @@
6172
5437
  me2.removeParentByClass(e.target, "halo-img-content");
6173
5438
  me2.updateData(true);
6174
5439
  };
6175
- replaceBtn.innerHTML = "替换";
5440
+ replaceBtn.innerHTML = "\u66FF\u6362";
6176
5441
  return [replaceBtn, delBtn, descInputWrap];
6177
5442
  },
6178
5443
  removeSeamlessLaster(e) {
@@ -6196,7 +5461,6 @@
6196
5461
  }
6197
5462
  }
6198
5463
  },
6199
- // 初始化编辑器数据,数据是 html 格式(displayData)
6200
5464
  initData(data = "", essayPicRelVOList) {
6201
5465
  this.parseHtml(data, essayPicRelVOList).then((res) => {
6202
5466
  this.editorDom.innerHTML = "";
@@ -6204,13 +5468,6 @@
6204
5468
  this.updateData();
6205
5469
  });
6206
5470
  },
6207
- // TODO jsonToHtml、htmlToJson 实现这 2 个方法里面的逻辑,数据结构参考方法里面的注释,出参入参都为字符串,注意:mdd-topic 里面的属性数据 和 json 中的topicPosition数据是一一对应的,startIndex、endIndex为mdd-topic的起止位置 从 content 里面进行分割处理
6208
- // json、html 数据格式互转,暂时只支持文字、短话题
6209
- jsonToHtml(json) {
6210
- },
6211
- htmlToJson(html) {
6212
- },
6213
- // 设置富文本组件
6214
5471
  initSquire() {
6215
5472
  const me2 = this;
6216
5473
  const editorDom = me2.editorDom;
@@ -6298,8 +5555,7 @@
6298
5555
  event.preventDefault();
6299
5556
  });
6300
5557
  me2.editor.addEventListener("keydown", function(event) {
6301
- var _a, _b, _c;
6302
- if (["Backspace", "Delete"].includes(event.key)) {
5558
+ if (event.keyCode === 8 || event.keyCode === 46) {
6303
5559
  try {
6304
5560
  const selection2 = getSelection();
6305
5561
  if (me2.selectDom && me2.moverClasses.includes(me2.selectDom.className)) {
@@ -6333,242 +5589,42 @@
6333
5589
  } catch (error) {
6334
5590
  console.log(error);
6335
5591
  }
6336
- const selection = window.getSelection();
6337
- if (selection.rangeCount > 0) {
6338
- const range = selection.getRangeAt(0);
6339
- const startContainer = range.startContainer;
6340
- if (startContainer.nodeType === Node.ELEMENT_NODE && startContainer.tagName === "MDD-TOPIC") {
6341
- startContainer.remove();
6342
- event.preventDefault();
6343
- return;
6344
- } else if (startContainer.nodeType === Node.TEXT_NODE) {
6345
- const parent = startContainer.parentNode;
6346
- if (parent.tagName === "MDD-TOPIC") {
6347
- parent.remove();
6348
- event.preventDefault();
6349
- return;
6350
- }
6351
- }
6352
- let currentParagraph = startContainer;
6353
- while (currentParagraph && currentParagraph.nodeType !== Node.ELEMENT_NODE) {
6354
- currentParagraph = currentParagraph.parentNode;
6355
- }
6356
- while (currentParagraph && !((_a = currentParagraph.classList) == null ? void 0 : _a.contains("halo-paragraph"))) {
6357
- currentParagraph = currentParagraph.parentNode;
6358
- }
6359
- if (currentParagraph && event.key === "Backspace") {
6360
- const container = range.startContainer;
6361
- const offset = range.startOffset;
6362
- let isAtParagraphStart = false;
6363
- let cursorBeforeContent = null;
6364
- if (container === currentParagraph && offset === 0) {
6365
- isAtParagraphStart = true;
6366
- cursorBeforeContent = currentParagraph.firstChild;
6367
- } else if (container.nodeType === Node.TEXT_NODE && offset === 0) {
6368
- let isFirstContent = true;
6369
- let currentNode = currentParagraph.firstChild;
6370
- while (currentNode && currentNode !== container) {
6371
- if (currentNode.nodeType === Node.TEXT_NODE && currentNode.textContent.trim() !== "") {
6372
- isFirstContent = false;
6373
- break;
6374
- } else if (currentNode.nodeType === Node.ELEMENT_NODE) {
6375
- isFirstContent = false;
6376
- break;
6377
- }
6378
- currentNode = currentNode.nextSibling;
6379
- }
6380
- if (isFirstContent) {
6381
- isAtParagraphStart = true;
6382
- cursorBeforeContent = container;
6383
- }
6384
- } else if (container === currentParagraph && offset > 0) {
6385
- let hasContentBefore = false;
6386
- for (let i = 0; i < offset; i++) {
6387
- const node = currentParagraph.childNodes[i];
6388
- if (node.nodeType === Node.TEXT_NODE && node.textContent.trim() !== "") {
6389
- hasContentBefore = true;
6390
- break;
6391
- } else if (node.nodeType === Node.ELEMENT_NODE) {
6392
- hasContentBefore = true;
6393
- break;
6394
- }
6395
- }
6396
- if (!hasContentBefore && offset < currentParagraph.childNodes.length) {
6397
- isAtParagraphStart = true;
6398
- cursorBeforeContent = currentParagraph.childNodes[offset];
6399
- }
6400
- }
6401
- if (isAtParagraphStart) {
6402
- const prevParagraph = currentParagraph.previousElementSibling;
6403
- if (prevParagraph && prevParagraph.classList.contains("halo-paragraph")) {
6404
- const prevContent = prevParagraph.innerHTML.trim();
6405
- if (prevContent === "<br>" || prevContent === "") {
6406
- prevParagraph.remove();
6407
- event.preventDefault();
6408
- me2.updateData(true);
6409
- return;
6410
- } else {
6411
- const mergePoint = prevParagraph.childNodes.length;
6412
- if (prevParagraph.lastChild && prevParagraph.lastChild.tagName === "BR") {
6413
- prevParagraph.removeChild(prevParagraph.lastChild);
6414
- }
6415
- const nodesToMove = Array.from(currentParagraph.childNodes);
6416
- nodesToMove.forEach((node) => {
6417
- prevParagraph.appendChild(node);
6418
- });
6419
- currentParagraph.remove();
6420
- const newRange = document.createRange();
6421
- if (cursorBeforeContent && prevParagraph.contains(cursorBeforeContent)) {
6422
- newRange.setStartBefore(cursorBeforeContent);
6423
- } else {
6424
- if (mergePoint < prevParagraph.childNodes.length) {
6425
- newRange.setStartBefore(prevParagraph.childNodes[mergePoint]);
6426
- } else {
6427
- newRange.setStart(prevParagraph, prevParagraph.childNodes.length);
6428
- }
6429
- }
6430
- newRange.collapse(true);
6431
- const selection2 = window.getSelection();
6432
- selection2.removeAllRanges();
6433
- selection2.addRange(newRange);
6434
- event.preventDefault();
6435
- me2.updateData(true);
6436
- return;
6437
- }
6438
- }
6439
- }
6440
- }
6441
- }
6442
5592
  }
6443
- if (event.key === "Enter") {
6444
- const selection = window.getSelection();
6445
- if (selection.rangeCount > 0) {
6446
- const range = selection.getRangeAt(0);
6447
- const startContainer = range.startContainer;
6448
- let currentParagraph = startContainer;
6449
- while (currentParagraph && currentParagraph.nodeType !== Node.ELEMENT_NODE) {
6450
- currentParagraph = currentParagraph.parentNode;
6451
- }
6452
- while (currentParagraph && !((_b = currentParagraph.classList) == null ? void 0 : _b.contains("halo-paragraph"))) {
6453
- currentParagraph = currentParagraph.parentNode;
6454
- }
6455
- if (!(currentParagraph == null ? void 0 : currentParagraph.querySelector("mdd-topic"))) {
6456
- return;
5593
+ const selection = window.getSelection();
5594
+ if (selection.rangeCount > 0) {
5595
+ const range = selection.getRangeAt(0);
5596
+ const startContainer = range.startContainer;
5597
+ let isInMddTopic = false;
5598
+ if (startContainer.nodeType === Node.ELEMENT_NODE && startContainer.tagName === "MDD-TOPIC") {
5599
+ isInMddTopic = true;
5600
+ } else if (startContainer.nodeType === Node.TEXT_NODE) {
5601
+ const parent = startContainer.parentNode;
5602
+ if (parent.tagName === "MDD-TOPIC") {
5603
+ isInMddTopic = true;
6457
5604
  }
6458
- if (me2.isBetweenTwoTopics(range)) {
5605
+ }
5606
+ if (isInMddTopic) {
5607
+ if (event.key === "Enter") {
6459
5608
  event.preventDefault();
6460
- me2.handleEnterBetweenTopics(range);
6461
5609
  return;
6462
5610
  }
6463
- if (me2.wouldCreateNestedParagraph(range)) {
5611
+ const isPrintableKey = event.key.length === 1;
5612
+ if (isPrintableKey) {
6464
5613
  event.preventDefault();
6465
- me2.handleEnterKeyInParagraphWithTopic(range);
6466
5614
  return;
6467
5615
  }
6468
- if (currentParagraph && currentParagraph.querySelector("mdd-topic")) {
5616
+ }
5617
+ if ((event.key === "Backspace" || event.key === "Delete") && isInMddTopic) {
5618
+ if (startContainer.nodeType === Node.ELEMENT_NODE && startContainer.tagName === "MDD-TOPIC") {
5619
+ startContainer.remove();
6469
5620
  event.preventDefault();
6470
- me2.handleEnterKeyInParagraphWithTopic(range);
6471
5621
  return;
6472
- }
6473
- }
6474
- }
6475
- if ((event.metaKey || event.ctrlKey) && event.key === "ArrowLeft") {
6476
- const selection = window.getSelection();
6477
- if (selection.rangeCount > 0) {
6478
- const range = selection.getRangeAt(0);
6479
- const container = range.startContainer;
6480
- let currentParagraph = container;
6481
- while (currentParagraph && currentParagraph.nodeType !== Node.ELEMENT_NODE) {
6482
- currentParagraph = currentParagraph.parentNode;
6483
- }
6484
- while (currentParagraph && !((_c = currentParagraph.classList) == null ? void 0 : _c.contains("halo-paragraph"))) {
6485
- currentParagraph = currentParagraph.parentNode;
6486
- }
6487
- if (currentParagraph) {
6488
- const firstTopic = currentParagraph.querySelector("mdd-topic");
6489
- if (firstTopic) {
6490
- let hasTextBeforeTopic = false;
6491
- let currentNode = currentParagraph.firstChild;
6492
- while (currentNode && currentNode !== firstTopic) {
6493
- if (currentNode.nodeType === Node.TEXT_NODE && currentNode.textContent.trim() !== "") {
6494
- hasTextBeforeTopic = true;
6495
- break;
6496
- }
6497
- currentNode = currentNode.nextSibling;
6498
- }
6499
- if (hasTextBeforeTopic) {
6500
- if (container === currentParagraph && range.startOffset === 0) {
6501
- return;
6502
- }
6503
- let shouldMoveToStart = false;
6504
- const offset2 = range.startOffset;
6505
- if (container.nodeType === Node.TEXT_NODE && container.parentNode === firstTopic) {
6506
- shouldMoveToStart = true;
6507
- } else if (container === firstTopic) {
6508
- shouldMoveToStart = true;
6509
- } else if (container.nodeType === Node.TEXT_NODE) {
6510
- let prevSibling = container.previousSibling;
6511
- while (prevSibling) {
6512
- if (prevSibling === firstTopic) {
6513
- shouldMoveToStart = true;
6514
- break;
6515
- }
6516
- prevSibling = prevSibling.previousSibling;
6517
- }
6518
- } else if (container === currentParagraph) {
6519
- const topicRange = document.createRange();
6520
- topicRange.selectNode(firstTopic);
6521
- const cursorRange = document.createRange();
6522
- cursorRange.setStart(container, offset2);
6523
- cursorRange.collapse(true);
6524
- if (cursorRange.compareBoundaryPoints(Range.START_TO_END, topicRange) > 0) {
6525
- shouldMoveToStart = true;
6526
- }
6527
- }
6528
- if (shouldMoveToStart) {
6529
- event.preventDefault();
6530
- event.stopPropagation();
6531
- const newRange = document.createRange();
6532
- newRange.setStart(currentParagraph, 0);
6533
- newRange.collapse(true);
6534
- const selection2 = window.getSelection();
6535
- selection2.removeAllRanges();
6536
- selection2.addRange(newRange);
6537
- return false;
6538
- }
6539
- return;
6540
- }
6541
- let shouldMoveToTopicStart = false;
6542
- const offset = range.startOffset;
6543
- if (container.nodeType === Node.TEXT_NODE && container.parentNode === firstTopic) {
6544
- shouldMoveToTopicStart = true;
6545
- } else if (container === firstTopic) {
6546
- shouldMoveToTopicStart = true;
6547
- } else if (container.nodeType === Node.TEXT_NODE) {
6548
- let prevSibling = container.previousSibling;
6549
- while (prevSibling) {
6550
- if (prevSibling === firstTopic) {
6551
- shouldMoveToTopicStart = true;
6552
- break;
6553
- }
6554
- prevSibling = prevSibling.previousSibling;
6555
- }
6556
- } else if (container === currentParagraph) {
6557
- const topicRange = document.createRange();
6558
- topicRange.selectNode(firstTopic);
6559
- const cursorRange = document.createRange();
6560
- cursorRange.setStart(container, offset);
6561
- cursorRange.collapse(true);
6562
- if (cursorRange.compareBoundaryPoints(Range.START_TO_END, topicRange) > 0) {
6563
- shouldMoveToTopicStart = true;
6564
- }
6565
- }
6566
- if (shouldMoveToTopicStart) {
6567
- event.preventDefault();
6568
- event.stopPropagation();
6569
- me2.setCursorBeforeElement(firstTopic);
6570
- return false;
6571
- }
5622
+ } else if (startContainer.nodeType === Node.TEXT_NODE) {
5623
+ const parent = startContainer.parentNode;
5624
+ if (parent.tagName === "MDD-TOPIC") {
5625
+ parent.remove();
5626
+ event.preventDefault();
5627
+ return;
6572
5628
  }
6573
5629
  }
6574
5630
  }
@@ -6633,6 +5689,7 @@
6633
5689
  this.insertElement(p);
6634
5690
  };
6635
5691
  window.Squire.prototype.makeHeader = function(content, config = { makeHeader: {} }) {
5692
+ console.log(content);
6636
5693
  if (content) {
6637
5694
  const h2 = this.createElement("h2", {
6638
5695
  class: "halo-paragraph-title"
@@ -6658,7 +5715,6 @@
6658
5715
  window.Squire.empty(block)
6659
5716
  ]);
6660
5717
  output.appendChild(
6661
- // 段落才能添加标题
6662
5718
  Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
6663
5719
  );
6664
5720
  }
@@ -6666,6 +5722,7 @@
6666
5722
  });
6667
5723
  const selection = window.getSelection();
6668
5724
  const range = document.createRange();
5725
+ console.log(container);
6669
5726
  range.setStart(container, 1);
6670
5727
  range.collapse(true);
6671
5728
  selection.removeAllRanges();
@@ -6681,18 +5738,18 @@
6681
5738
  });
6682
5739
  loading.innerHTML = `
6683
5740
  <img class="img-loading-icon" src="/img/upload-image-loading.png"/>
6684
- <span class="img-loading-tip">上传中...</span>
5741
+ <span class="img-loading-tip">\u4E0A\u4F20\u4E2D...</span>
6685
5742
  `;
6686
5743
  var fail = this.createElement("div", {
6687
5744
  class: "img-fail hide",
6688
5745
  contenteditable: "false"
6689
5746
  });
6690
- fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
5747
+ fail.innerHTML = "\u4E0A\u4F20\u5931\u8D25<br>\u8BF7\u4E0B\u8F7D\u56FE\u7247\u81F3\u672C\u5730\u540E\u91CD\u65B0\u4E0A\u4F20";
6691
5748
  var again = this.createElement("button", {
6692
5749
  class: "img-again hide",
6693
5750
  contenteditable: "false"
6694
5751
  });
6695
- again.innerHTML = "重新上传";
5752
+ again.innerHTML = "\u91CD\u65B0\u4E0A\u4F20";
6696
5753
  const isGif = src && src.indexOf(".gif") > -1;
6697
5754
  if (isGif) {
6698
5755
  src = src.replace(".gif", ".gif!nowater");
@@ -6747,7 +5804,7 @@
6747
5804
  });
6748
5805
  div.innerHTML = `
6749
5806
  <div class="video-progress">
6750
- <div class="label">上传中...</div>
5807
+ <div class="label">\u4E0A\u4F20\u4E2D...</div>
6751
5808
  <div class="box">
6752
5809
  <div class="inner" style="width:20%"></div>
6753
5810
  </div>
@@ -6770,7 +5827,6 @@
6770
5827
  data: JSON.stringify(data),
6771
5828
  "data-content": data.content || "",
6772
5829
  poster: data.img || ""
6773
- // 'contenteditable': 'true',
6774
5830
  });
6775
5831
  var delBtn = me2.genIconDom({
6776
5832
  class: "pointer video-delete icon",
@@ -6780,6 +5836,7 @@
6780
5836
  e.stopPropagation();
6781
5837
  }
6782
5838
  });
5839
+ console.log(delBtn);
6783
5840
  const posterBtn = me2.insertVideoBtns(this, video);
6784
5841
  var p = this.createElement(
6785
5842
  "DIV",
@@ -6828,7 +5885,6 @@
6828
5885
  }
6829
5886
  };
6830
5887
  },
6831
- // 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
6832
5888
  setListener(dom) {
6833
5889
  const me2 = this;
6834
5890
  const doms = dom ? [dom] : Array.from(this.editorDom.children);
@@ -6839,7 +5895,7 @@
6839
5895
  p.onclick = function(e) {
6840
5896
  var _a;
6841
5897
  if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
6842
- me2.setToast("不支持播放");
5898
+ me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
6843
5899
  }
6844
5900
  if (e.target.className.includes("desc-input")) {
6845
5901
  return;
@@ -6903,7 +5959,6 @@
6903
5959
  };
6904
5960
  return del;
6905
5961
  },
6906
- // 转换数据,返回给业务
6907
5962
  getEditorData() {
6908
5963
  const me2 = this;
6909
5964
  const children = Array.from(me2.editorDom.children);
@@ -6961,11 +6016,9 @@
6961
6016
  videoIds
6962
6017
  };
6963
6018
  },
6964
- // 是否是摩托范的图片
6965
6019
  isHaloImage(url = "") {
6966
- return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1;
6020
+ return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1;
6967
6021
  },
6968
- // 获取待上传图片列表
6969
6022
  updateUploads() {
6970
6023
  const me2 = this;
6971
6024
  setTimeout(() => {
@@ -7012,8 +6065,8 @@
7012
6065
  const currentImg = me2.uploadStore[key];
7013
6066
  const imageUrl = key.split("|")[1] || "";
7014
6067
  if (!currentImg) {
7015
- console.log("图片不存在", key);
7016
- return Promise.reject("图片不存在");
6068
+ console.log("\u56FE\u7247\u4E0D\u5B58\u5728", key);
6069
+ return Promise.reject("\u56FE\u7247\u4E0D\u5B58\u5728");
7017
6070
  }
7018
6071
  const parent = currentImg.parentNode || "";
7019
6072
  const uploadFailHandler = (currentImg2) => {
@@ -7057,7 +6110,6 @@
7057
6110
  parent && uploadFailHandler(currentImg);
7058
6111
  });
7059
6112
  },
7060
- // 更新上传的图片
7061
6113
  updateImage(img, currentImg = {}) {
7062
6114
  const data = JSON.parse(currentImg.getAttribute("data") || "{}");
7063
6115
  data.img = img;
@@ -7080,7 +6132,6 @@
7080
6132
  parent.appendChild(arr[2]);
7081
6133
  }
7082
6134
  },
7083
- // 获取ctrl + v 后内容
7084
6135
  getSticker(type, handler) {
7085
6136
  this.setSticker(type.fragment.children);
7086
6137
  },
@@ -7098,7 +6149,6 @@
7098
6149
  });
7099
6150
  this.updateData(true);
7100
6151
  },
7101
- // 粘贴
7102
6152
  setSticker(data) {
7103
6153
  const me2 = this;
7104
6154
  data = Array.from(data);
@@ -7137,7 +6187,6 @@
7137
6187
  const me2 = this;
7138
6188
  me2.updateData();
7139
6189
  },
7140
- // 监测 添加、撤回、恢复、删除
7141
6190
  setBack(e, type) {
7142
6191
  const me2 = this;
7143
6192
  me2.refreshImg();
@@ -7170,7 +6219,6 @@
7170
6219
  }
7171
6220
  });
7172
6221
  },
7173
- // 设置scoll
7174
6222
  sticky() {
7175
6223
  const me2 = this;
7176
6224
  me2.$nextTick(function() {
@@ -7190,8 +6238,6 @@
7190
6238
  document.addEventListener("scroll", onScroll);
7191
6239
  });
7192
6240
  },
7193
- // ==========toolbox==========
7194
- // 撤回、恢复、段落标题
7195
6241
  setContent(e, obj) {
7196
6242
  const me2 = this;
7197
6243
  const id = e.target.id || e.target.dataset.editorId;
@@ -7233,11 +6279,10 @@
7233
6279
  this.fontInfo = this.editor.getFontInfo();
7234
6280
  this.updateData(true);
7235
6281
  },
7236
- // 增加link
7237
6282
  addLink(type) {
7238
6283
  const me2 = this;
7239
- me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
7240
- me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
6284
+ me2.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
6285
+ me2.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
7241
6286
  me2.viewStatus = true;
7242
6287
  me2.linkStatus = true;
7243
6288
  },
@@ -7245,31 +6290,29 @@
7245
6290
  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.,;?'&%$#=~_-]+))*$/;
7246
6291
  return objExp.test(url);
7247
6292
  },
7248
- // 确认增加link
7249
6293
  confirmLink() {
7250
6294
  const me2 = this;
7251
6295
  if (!me2.linkContent) {
7252
- return elementPlus.ElMessage.error("请输入链接地址!");
6296
+ return elementPlus.ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740\uFF01");
7253
6297
  }
7254
- if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
6298
+ if (me2.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
7255
6299
  this.visibleCollectArticle = false;
7256
6300
  return me2.importLinkData();
7257
6301
  }
7258
6302
  if (!this.validUrl(me2.linkContent)) {
7259
- return me2.setToast("URL无效");
6303
+ return me2.setToast("URL\u65E0\u6548");
7260
6304
  }
7261
6305
  if (!me2.isHaloImage(me2.linkContent)) {
7262
- return me2.setToast("请输入摩托范内部网址");
6306
+ return me2.setToast("\u8BF7\u8F93\u5165\u6469\u6258\u8303\u5185\u90E8\u7F51\u5740");
7263
6307
  }
7264
6308
  me2.editor["insertLink"](me2.linkContent);
7265
6309
  me2.linkContent = "";
7266
6310
  me2.closeDialog();
7267
6311
  },
7268
- // 增加link导入数据
7269
6312
  importLinkData() {
7270
6313
  const me2 = this;
7271
6314
  if (me2.loading) {
7272
- return elementPlus.ElMessage("正在获取信息,请稍后...");
6315
+ return elementPlus.ElMessage("\u6B63\u5728\u83B7\u53D6\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E...");
7273
6316
  }
7274
6317
  me2.loading = true;
7275
6318
  const params = {
@@ -7291,444 +6334,38 @@
7291
6334
  me2.linkContent = "";
7292
6335
  return;
7293
6336
  } else {
7294
- me2.setToast("导入失败,请重试");
6337
+ me2.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
7295
6338
  }
7296
6339
  }).catch((err) => {
7297
6340
  console.log(err.message);
7298
- me2.setToast("导入异常,请重试");
6341
+ me2.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
7299
6342
  }).finally((_) => {
7300
6343
  me2.loading = false;
7301
6344
  });
7302
6345
  },
7303
- // 打开 图片、视频、一键导入 弹框
7304
6346
  openDialog(name) {
7305
6347
  const me2 = this;
7306
- me2.viewName = name === "img" ? "添加图片" : "添加视频";
7307
- me2.viewButton = name === "img" ? "选择图片" : "选择视频";
7308
- me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
6348
+ me2.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
6349
+ me2.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
6350
+ 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)";
7309
6351
  me2.viewStatus = true;
7310
6352
  },
7311
- // 关闭弹框
7312
6353
  closeDialog() {
7313
6354
  this.viewStatus = false;
7314
6355
  this.linkStatus = false;
7315
6356
  this.linkContent = "";
7316
6357
  },
7317
- // ==========toolbox end==========
7318
- // 弹框提示
7319
6358
  setToast(content) {
7320
6359
  elementPlus.ElMessage.error(content);
7321
6360
  },
7322
6361
  setMessageBoxNoCancel(content) {
7323
6362
  elementPlus.ElMessageBox.confirm(content, "", {
7324
- confirmButtonText: "确定",
7325
- cancelButtonText: "取消",
6363
+ confirmButtonText: "\u786E\u5B9A",
6364
+ cancelButtonText: "\u53D6\u6D88",
7326
6365
  type: "warning"
7327
6366
  }).then(() => {
7328
6367
  }).catch(() => {
7329
6368
  });
7330
- },
7331
- // 检查是否会创建嵌套的halo-paragraph
7332
- wouldCreateNestedParagraph(range) {
7333
- let container = range.startContainer;
7334
- while (container && container !== this.editorDom) {
7335
- if (container.nodeType === Node.ELEMENT_NODE && container.classList && container.classList.contains("halo-paragraph")) {
7336
- return true;
7337
- }
7338
- container = container.parentNode;
7339
- }
7340
- return false;
7341
- },
7342
- // 检查光标是否在两个连续的mdd-topic之间
7343
- isBetweenTwoTopics(range) {
7344
- const container = range.startContainer;
7345
- const offset = range.startOffset;
7346
- if (container.nodeType === Node.ELEMENT_NODE) {
7347
- const prevElement = container.childNodes[offset - 1];
7348
- const nextElement = container.childNodes[offset];
7349
- return prevElement && prevElement.tagName === "MDD-TOPIC" && (nextElement && nextElement.tagName === "MDD-TOPIC");
7350
- }
7351
- if (container.nodeType === Node.TEXT_NODE && container.textContent.trim() === "") {
7352
- const prevSibling = container.previousSibling;
7353
- const nextSibling = container.nextSibling;
7354
- return prevSibling && prevSibling.tagName === "MDD-TOPIC" && (nextSibling && nextSibling.tagName === "MDD-TOPIC");
7355
- }
7356
- return false;
7357
- },
7358
- // 处理两个话题之间的回车或话题前面的回车
7359
- handleEnterBetweenTopics(range) {
7360
- var _a;
7361
- const me2 = this;
7362
- let currentParagraph = range.startContainer;
7363
- while (currentParagraph && currentParagraph.nodeType !== Node.ELEMENT_NODE) {
7364
- currentParagraph = currentParagraph.parentNode;
7365
- }
7366
- while (currentParagraph && !((_a = currentParagraph.classList) == null ? void 0 : _a.contains("halo-paragraph"))) {
7367
- currentParagraph = currentParagraph.parentNode;
7368
- }
7369
- if (!currentParagraph)
7370
- return;
7371
- const newParagraph = document.createElement("p");
7372
- newParagraph.className = "halo-paragraph";
7373
- const afterContent = me2.extractContentAfterCursorPrecise(range, currentParagraph);
7374
- if (afterContent && afterContent.childNodes.length > 0) {
7375
- while (afterContent.firstChild) {
7376
- newParagraph.appendChild(afterContent.firstChild);
7377
- }
7378
- } else {
7379
- newParagraph.innerHTML = "<br>";
7380
- }
7381
- currentParagraph.parentNode.insertBefore(newParagraph, currentParagraph.nextSibling);
7382
- const newRange = document.createRange();
7383
- if (newParagraph.firstChild && newParagraph.firstChild.nodeType === Node.TEXT_NODE) {
7384
- newRange.setStart(newParagraph.firstChild, 0);
7385
- } else if (newParagraph.firstChild && newParagraph.firstChild.nodeType === Node.ELEMENT_NODE) {
7386
- newRange.setStart(newParagraph, 0);
7387
- } else {
7388
- newRange.setStart(newParagraph, 0);
7389
- }
7390
- newRange.collapse(true);
7391
- const selection = window.getSelection();
7392
- selection.removeAllRanges();
7393
- selection.addRange(newRange);
7394
- me2.updateData(true);
7395
- },
7396
- // 更精确地提取光标后的内容(专门用于话题分割)
7397
- extractContentAfterCursorPrecise(range, paragraph) {
7398
- const fragment = document.createDocumentFragment();
7399
- const container = range.startContainer;
7400
- const offset = range.startOffset;
7401
- if (container.nodeType === Node.ELEMENT_NODE) {
7402
- const childNodes = Array.from(container.childNodes);
7403
- for (let i = offset; i < childNodes.length; i++) {
7404
- fragment.appendChild(childNodes[i]);
7405
- }
7406
- } else if (container.nodeType === Node.TEXT_NODE) {
7407
- if (offset < container.textContent.length) {
7408
- const afterText = container.textContent.slice(offset);
7409
- container.textContent = container.textContent.slice(0, offset);
7410
- const textNode = document.createTextNode(afterText);
7411
- fragment.appendChild(textNode);
7412
- }
7413
- let nextSibling = container.nextSibling;
7414
- while (nextSibling) {
7415
- const nodeToMove = nextSibling;
7416
- nextSibling = nextSibling.nextSibling;
7417
- fragment.appendChild(nodeToMove);
7418
- }
7419
- }
7420
- return fragment;
7421
- },
7422
- // 处理包含话题的段落中的回车键
7423
- handleEnterKeyInParagraphWithTopic(range) {
7424
- var _a;
7425
- const me2 = this;
7426
- let currentParagraph = range.startContainer;
7427
- while (currentParagraph && currentParagraph.nodeType !== Node.ELEMENT_NODE) {
7428
- currentParagraph = currentParagraph.parentNode;
7429
- }
7430
- while (currentParagraph && !((_a = currentParagraph.classList) == null ? void 0 : _a.contains("halo-paragraph"))) {
7431
- currentParagraph = currentParagraph.parentNode;
7432
- }
7433
- if (!currentParagraph)
7434
- return;
7435
- const newParagraph = document.createElement("p");
7436
- newParagraph.className = "halo-paragraph";
7437
- const isAtTopicStart = me2.isCursorBeforeFirstTopic(range, currentParagraph);
7438
- const isAtEnd = me2.isCursorAtEndOfParagraph(range, currentParagraph);
7439
- if (isAtTopicStart) {
7440
- const afterContent = me2.extractContentAfterCursor(range, currentParagraph);
7441
- if (afterContent && afterContent.childNodes.length > 0) {
7442
- while (afterContent.firstChild) {
7443
- newParagraph.appendChild(afterContent.firstChild);
7444
- }
7445
- } else {
7446
- newParagraph.innerHTML = "<br>";
7447
- }
7448
- if (currentParagraph.innerHTML.trim() === "" || currentParagraph.childNodes.length === 0) {
7449
- currentParagraph.innerHTML = "<br>";
7450
- }
7451
- currentParagraph.parentNode.insertBefore(newParagraph, currentParagraph.nextSibling);
7452
- } else if (isAtEnd) {
7453
- newParagraph.innerHTML = "<br>";
7454
- currentParagraph.parentNode.insertBefore(newParagraph, currentParagraph.nextSibling);
7455
- } else {
7456
- const afterContent = me2.extractContentAfterCursor(range, currentParagraph);
7457
- if (afterContent && afterContent.childNodes.length > 0) {
7458
- let hasValidContent = false;
7459
- for (let i = 0; i < afterContent.childNodes.length; i++) {
7460
- const node = afterContent.childNodes[i];
7461
- if (node.nodeType === Node.TEXT_NODE) {
7462
- if (node.textContent.trim() !== "") {
7463
- hasValidContent = true;
7464
- break;
7465
- }
7466
- } else {
7467
- hasValidContent = true;
7468
- break;
7469
- }
7470
- }
7471
- if (hasValidContent) {
7472
- while (afterContent.firstChild) {
7473
- newParagraph.appendChild(afterContent.firstChild);
7474
- }
7475
- } else {
7476
- newParagraph.innerHTML = "<br>";
7477
- }
7478
- } else {
7479
- newParagraph.innerHTML = "<br>";
7480
- }
7481
- currentParagraph.parentNode.insertBefore(newParagraph, currentParagraph.nextSibling);
7482
- }
7483
- const newRange = document.createRange();
7484
- if (newParagraph.firstChild && newParagraph.firstChild.nodeType === Node.TEXT_NODE) {
7485
- newRange.setStart(newParagraph.firstChild, 0);
7486
- } else if (newParagraph.firstChild) {
7487
- newRange.setStart(newParagraph, 0);
7488
- } else {
7489
- newRange.setStart(newParagraph, 0);
7490
- }
7491
- newRange.collapse(true);
7492
- const selection = window.getSelection();
7493
- selection.removeAllRanges();
7494
- selection.addRange(newRange);
7495
- me2.updateData(true);
7496
- },
7497
- // 检查光标是否在第一个话题前面
7498
- isCursorBeforeFirstTopic(range, paragraph) {
7499
- const container = range.startContainer;
7500
- const offset = range.startOffset;
7501
- const firstTopic = paragraph.querySelector("mdd-topic");
7502
- if (!firstTopic) {
7503
- return false;
7504
- }
7505
- if (container === paragraph && offset === 0) {
7506
- return true;
7507
- }
7508
- if (container === paragraph && offset > 0 && offset <= paragraph.childNodes.length) {
7509
- if (offset < paragraph.childNodes.length) {
7510
- const nodeAtOffset = paragraph.childNodes[offset];
7511
- if (nodeAtOffset === firstTopic) {
7512
- return true;
7513
- }
7514
- }
7515
- let nextNonEmptyNode = null;
7516
- for (let i = offset; i < paragraph.childNodes.length; i++) {
7517
- const node = paragraph.childNodes[i];
7518
- if (node.nodeType === Node.ELEMENT_NODE && node.tagName === "MDD-TOPIC") {
7519
- nextNonEmptyNode = node;
7520
- break;
7521
- } else if (node.nodeType === Node.TEXT_NODE && node.textContent.trim() !== "") {
7522
- break;
7523
- }
7524
- }
7525
- if (nextNonEmptyNode === firstTopic) {
7526
- return true;
7527
- }
7528
- }
7529
- try {
7530
- const topicRange = document.createRange();
7531
- topicRange.setStartBefore(firstTopic);
7532
- const comparison = topicRange.comparePoint(container, offset);
7533
- if (comparison < 0) {
7534
- return true;
7535
- }
7536
- } catch (e) {
7537
- if (container.nodeType === Node.TEXT_NODE) {
7538
- const tempRange = document.createRange();
7539
- tempRange.setStart(container, offset);
7540
- tempRange.collapse(true);
7541
- const topicRange = document.createRange();
7542
- topicRange.setStartBefore(firstTopic);
7543
- if (tempRange.compareBoundaryPoints(Range.START_TO_START, topicRange) < 0) {
7544
- return true;
7545
- }
7546
- }
7547
- if (container === paragraph) {
7548
- const testRange = document.createRange();
7549
- testRange.setStart(paragraph, 0);
7550
- testRange.setEnd(paragraph, offset);
7551
- const containsTopic = testRange.intersectsNode(firstTopic);
7552
- if (!containsTopic) {
7553
- return true;
7554
- }
7555
- }
7556
- }
7557
- return false;
7558
- },
7559
- // 获取不包含mdd-topic内部文本的段落文本
7560
- getParagraphTextExcludingTopics(paragraph, range) {
7561
- let textContent = "";
7562
- let cursorPosition = 0;
7563
- let foundCursor = false;
7564
- const walker = document.createTreeWalker(
7565
- paragraph,
7566
- NodeFilter.SHOW_ALL,
7567
- {
7568
- acceptNode: function(node2) {
7569
- if (node2.nodeType === Node.ELEMENT_NODE && node2.tagName === "MDD-TOPIC") {
7570
- return NodeFilter.FILTER_REJECT;
7571
- }
7572
- return NodeFilter.FILTER_ACCEPT;
7573
- }
7574
- },
7575
- false
7576
- );
7577
- let node;
7578
- while (node = walker.nextNode()) {
7579
- if (node.nodeType === Node.TEXT_NODE) {
7580
- const nodeText = node.textContent;
7581
- if (!foundCursor && node === range.startContainer) {
7582
- cursorPosition = textContent.length + range.startOffset;
7583
- foundCursor = true;
7584
- }
7585
- textContent += nodeText;
7586
- }
7587
- }
7588
- return { textContent, cursorPosition };
7589
- },
7590
- // 检查光标是否在段落开头
7591
- isCursorAtStartOfParagraph(range, paragraph) {
7592
- const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
7593
- return cursorPosition === 0;
7594
- },
7595
- // 检查光标是否在段落末尾
7596
- isCursorAtEndOfParagraph(range, paragraph) {
7597
- const walker = document.createTreeWalker(
7598
- paragraph,
7599
- NodeFilter.SHOW_TEXT,
7600
- {
7601
- acceptNode: function(node2) {
7602
- let parent = node2.parentNode;
7603
- while (parent && parent !== paragraph) {
7604
- if (parent.tagName === "MDD-TOPIC") {
7605
- return NodeFilter.FILTER_REJECT;
7606
- }
7607
- parent = parent.parentNode;
7608
- }
7609
- return NodeFilter.FILTER_ACCEPT;
7610
- }
7611
- },
7612
- false
7613
- );
7614
- let totalLength = 0;
7615
- let node;
7616
- while (node = walker.nextNode()) {
7617
- totalLength += node.textContent.length;
7618
- }
7619
- const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
7620
- return cursorPosition >= totalLength;
7621
- },
7622
- // 获取当前段落
7623
- getCurrentParagraph(range) {
7624
- let container = range.startContainer;
7625
- while (container && container !== this.editorDom) {
7626
- if (container.nodeType === Node.ELEMENT_NODE && container.classList && container.classList.contains("halo-paragraph")) {
7627
- return container;
7628
- }
7629
- container = container.parentNode;
7630
- }
7631
- return null;
7632
- },
7633
- // 提取光标后的内容
7634
- extractContentAfterCursor(range, paragraph) {
7635
- const fragment = document.createDocumentFragment();
7636
- const container = range.startContainer;
7637
- const offset = range.startOffset;
7638
- let topicSpaceNode = null;
7639
- if (container.nodeType === Node.TEXT_NODE && container.textContent === " " && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
7640
- topicSpaceNode = container;
7641
- }
7642
- const extractRange = document.createRange();
7643
- let startNode = null;
7644
- let hasContentToExtract = false;
7645
- if (topicSpaceNode) {
7646
- if (topicSpaceNode.nextSibling) {
7647
- startNode = topicSpaceNode.nextSibling;
7648
- hasContentToExtract = true;
7649
- }
7650
- } else if (container.nodeType === Node.TEXT_NODE) {
7651
- if (container.textContent === "" && offset === 0) {
7652
- if (container.nextSibling) {
7653
- startNode = container.nextSibling;
7654
- hasContentToExtract = true;
7655
- }
7656
- } else if (offset < container.textContent.length) {
7657
- const afterText = container.textContent.slice(offset);
7658
- container.textContent = container.textContent.slice(0, offset);
7659
- if (afterText.trim()) {
7660
- const newTextNode = document.createTextNode(afterText);
7661
- container.parentNode.insertBefore(newTextNode, container.nextSibling);
7662
- startNode = newTextNode;
7663
- hasContentToExtract = true;
7664
- } else if (container.nextSibling) {
7665
- startNode = container.nextSibling;
7666
- hasContentToExtract = true;
7667
- }
7668
- } else {
7669
- if (container.nextSibling) {
7670
- startNode = container.nextSibling;
7671
- hasContentToExtract = true;
7672
- }
7673
- }
7674
- } else if (container.nodeType === Node.ELEMENT_NODE) {
7675
- if (offset < container.childNodes.length) {
7676
- startNode = container.childNodes[offset];
7677
- hasContentToExtract = true;
7678
- } else if (offset === 0 && container === paragraph) {
7679
- if (paragraph.firstChild) {
7680
- startNode = paragraph.firstChild;
7681
- hasContentToExtract = true;
7682
- }
7683
- }
7684
- }
7685
- if (!hasContentToExtract || !startNode) {
7686
- return fragment;
7687
- }
7688
- if (!paragraph.contains(startNode)) {
7689
- return fragment;
7690
- }
7691
- try {
7692
- extractRange.setStartBefore(startNode);
7693
- let lastNode = paragraph.lastChild;
7694
- while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && // 只跳过完全空的文本节点
7695
- lastNode !== startNode) {
7696
- lastNode = lastNode.previousSibling;
7697
- }
7698
- if (lastNode) {
7699
- extractRange.setEndAfter(lastNode);
7700
- } else {
7701
- extractRange.setEnd(paragraph, paragraph.childNodes.length);
7702
- }
7703
- const extractedContent = extractRange.extractContents();
7704
- fragment.appendChild(extractedContent);
7705
- } catch (e) {
7706
- let currentNode = startNode;
7707
- while (currentNode && currentNode.parentNode === paragraph) {
7708
- const nextNode = currentNode.nextSibling;
7709
- fragment.appendChild(currentNode);
7710
- currentNode = nextNode;
7711
- }
7712
- }
7713
- return fragment;
7714
- },
7715
- // 统一的光标设置方法 - 设置光标到元素后面
7716
- setCursorAfterElement(element) {
7717
- const newRange = document.createRange();
7718
- newRange.setStartAfter(element);
7719
- newRange.collapse(true);
7720
- const selection = window.getSelection();
7721
- selection.removeAllRanges();
7722
- selection.addRange(newRange);
7723
- },
7724
- // 统一的光标设置方法 - 设置光标到元素前面
7725
- setCursorBeforeElement(element) {
7726
- const newRange = document.createRange();
7727
- newRange.setStartBefore(element);
7728
- newRange.collapse(true);
7729
- const selection = window.getSelection();
7730
- selection.removeAllRanges();
7731
- selection.addRange(newRange);
7732
6369
  }
7733
6370
  },
7734
6371
  beforeRouteLeave(to, from, next) {
@@ -7751,12 +6388,11 @@
7751
6388
  const _component_ImgUpload = vue.resolveComponent("ImgUpload");
7752
6389
  const _component_VideoUpload = vue.resolveComponent("VideoUpload");
7753
6390
  const _component_CollectArticle = vue.resolveComponent("CollectArticle");
7754
- const _component_TopicManager = vue.resolveComponent("TopicManager");
7755
6391
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
7756
6392
  vue.withDirectives(vue.createElementVNode("div", {
7757
6393
  style: vue.normalizeStyle({ textAlign: $options.align }),
7758
6394
  class: "placeholder"
7759
- }, vue.toDisplayString($props.placeholder || "请输入正文"), 5), [
6395
+ }, " \u8BF7\u8F93\u5165\u6B63\u6587 ", 4), [
7760
6396
  [vue.vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
7761
6397
  ]),
7762
6398
  $data.overLine ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -7781,26 +6417,26 @@
7781
6417
  vue.createVNode(_component_el_form, { model: $data.linkForm }, {
7782
6418
  default: vue.withCtx(() => [
7783
6419
  vue.createVNode(_component_el_form_item, {
7784
- label: "添加链接",
6420
+ label: "\u6DFB\u52A0\u94FE\u63A5",
7785
6421
  class: "link-title"
7786
6422
  }, {
7787
6423
  default: vue.withCtx(() => [
7788
6424
  vue.createVNode(_component_el_input, {
7789
6425
  modelValue: $data.linkForm.linkAddress,
7790
6426
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
7791
- placeholder: "请输入链接地址"
6427
+ placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"
7792
6428
  }, null, 8, ["modelValue"])
7793
6429
  ]),
7794
6430
  _: 1
7795
6431
  }),
7796
- vue.createVNode(_component_el_form_item, { label: "链接文案" }, {
6432
+ vue.createVNode(_component_el_form_item, { label: "\u94FE\u63A5\u6587\u6848" }, {
7797
6433
  default: vue.withCtx(() => [
7798
6434
  vue.createVNode(_component_el_input, {
7799
6435
  modelValue: $data.linkForm.linkWriting,
7800
6436
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
7801
6437
  type: "textarea",
7802
6438
  autosize: "",
7803
- placeholder: "请输入链接文案"
6439
+ placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u6587\u6848"
7804
6440
  }, null, 8, ["modelValue"])
7805
6441
  ]),
7806
6442
  _: 1
@@ -7813,18 +6449,18 @@
7813
6449
  vue.createVNode(_component_el_button, {
7814
6450
  onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
7815
6451
  }, {
7816
- default: vue.withCtx(() => _cache[14] || (_cache[14] = [
7817
- vue.createTextVNode(" ")
7818
- ])),
6452
+ default: vue.withCtx(() => [
6453
+ vue.createTextVNode("\u53D6 \u6D88")
6454
+ ]),
7819
6455
  _: 1
7820
6456
  }),
7821
6457
  vue.createVNode(_component_el_button, {
7822
6458
  type: "primary",
7823
6459
  onClick: $options.insertLink
7824
6460
  }, {
7825
- default: vue.withCtx(() => _cache[15] || (_cache[15] = [
7826
- vue.createTextVNode(" ")
7827
- ])),
6461
+ default: vue.withCtx(() => [
6462
+ vue.createTextVNode("\u786E \u5B9A")
6463
+ ]),
7828
6464
  _: 1
7829
6465
  }, 8, ["onClick"])
7830
6466
  ])
@@ -7882,14 +6518,7 @@
7882
6518
  class: "replace-poster hide",
7883
6519
  accept: "image/*",
7884
6520
  onChange: _cache[13] || (_cache[13] = (...args) => $options.replacePoster && $options.replacePoster(...args))
7885
- }, null, 32),
7886
- vue.createVNode(_component_TopicManager, {
7887
- ref: "topicManager",
7888
- "editor-dom": $data.editorDom,
7889
- request: $props.request,
7890
- onTopicInserted: $options.onTopicInserted,
7891
- onUpdateTopicPosition: $options.updateTopicPosition
7892
- }, null, 8, ["editor-dom", "request", "onTopicInserted", "onUpdateTopicPosition"])
6521
+ }, null, 32)
7893
6522
  ]);
7894
6523
  }
7895
6524
  const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -7909,7 +6538,7 @@
7909
6538
  var COLOUR_CLASS = "colour";
7910
6539
  var FONT_FAMILY_CLASS = "font";
7911
6540
  var FONT_SIZE_CLASS = "size";
7912
- var ZWS = "";
6541
+ var ZWS = "\u200B";
7913
6542
  var win = doc.defaultView;
7914
6543
  var ua = navigator.userAgent;
7915
6544
  var isAndroid = /Android/.test(ua);
@@ -7939,17 +6568,11 @@
7939
6568
  };
7940
6569
  }
7941
6570
  var typeToBitArray = {
7942
- // ELEMENT_NODE
7943
6571
  1: 1,
7944
- // ATTRIBUTE_NODE
7945
6572
  2: 2,
7946
- // TEXT_NODE
7947
6573
  3: 4,
7948
- // COMMENT_NODE
7949
6574
  8: 128,
7950
- // DOCUMENT_NODE
7951
6575
  9: 256,
7952
- // DOCUMENT_FRAGMENT_NODE
7953
6576
  11: 1024
7954
6577
  };
7955
6578
  function TreeWalker(root, nodeType, filter) {
@@ -8283,7 +6906,7 @@
8283
6906
  node.appendChild(fixer);
8284
6907
  } catch (error) {
8285
6908
  self2.didError({
8286
- name: "Squire: fixCursor – " + error,
6909
+ name: "Squire: fixCursor \u2013\xA0" + error,
8287
6910
  message: "Parent: " + node.nodeName + "/" + node.innerHTML + " appendChild: " + fixer.nodeName
8288
6911
  });
8289
6912
  }
@@ -8300,6 +6923,17 @@
8300
6923
  child = children[i];
8301
6924
  isBR = child.nodeName === "BR";
8302
6925
  if (!isBR && isInline(child)) {
6926
+ if (child.classList && child.classList.contains("halo-picture-area")) {
6927
+ return;
6928
+ }
6929
+ if (!wrapper) {
6930
+ wrapper = createElement(
6931
+ doc2,
6932
+ config.blockTag,
6933
+ config.blockAttributes
6934
+ );
6935
+ }
6936
+ wrapper.appendChild(child);
8303
6937
  i -= 1;
8304
6938
  l -= 1;
8305
6939
  } else if (isBR || wrapper) {
@@ -8618,8 +7252,7 @@
8618
7252
  block = getStartBlockOfRange(range, root);
8619
7253
  firstBlockInFrag = getNextBlock(frag, frag);
8620
7254
  replaceBlock = !!block && isEmptyBlock(block);
8621
- if (block && firstBlockInFrag && !replaceBlock && // Don't merge table cells or PRE elements into block
8622
- !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
7255
+ if (block && firstBlockInFrag && !replaceBlock && !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
8623
7256
  moveRangeBoundariesUpTree(range, block, block, root);
8624
7257
  range.collapse(true);
8625
7258
  container = range.endContainer;
@@ -8635,10 +7268,7 @@
8635
7268
  container = nodeAfterSplit.parentNode;
8636
7269
  offset = indexOf.call(container.childNodes, nodeAfterSplit);
8637
7270
  }
8638
- if (
8639
- /* isBlock( container ) && */
8640
- offset !== getLength(container)
8641
- ) {
7271
+ if (offset !== getLength(container)) {
8642
7272
  blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
8643
7273
  while (node = container.childNodes[offset]) {
8644
7274
  blockContentsAfterSplit.appendChild(node);
@@ -9687,11 +8317,9 @@
9687
8317
  if (hasImage) {
9688
8318
  this.fireEvent("dragover", {
9689
8319
  dataTransfer: clipboardData,
9690
- /* jshint loopfunc: true */
9691
8320
  preventDefault: function() {
9692
8321
  fireDrop = true;
9693
8322
  }
9694
- /* jshint loopfunc: false */
9695
8323
  });
9696
8324
  if (fireDrop) {
9697
8325
  this.fireEvent("drop", {
@@ -9898,9 +8526,7 @@
9898
8526
  leafNodeNames,
9899
8527
  undo: {
9900
8528
  documentSizeThreshold: -1,
9901
- // -1 means no threshold
9902
8529
  undoLimit: -1
9903
- // -1 means no limit
9904
8530
  },
9905
8531
  isInsertedHTMLSanitized: true,
9906
8532
  isSetHTMLSanitized: true,
@@ -11542,5 +10168,5 @@
11542
10168
  exports2.Editor = Editor;
11543
10169
  exports2.ToolBar = ToolBar;
11544
10170
  exports2.ToolsEnum = ToolsEnum;
11545
- Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
10171
+ Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
11546
10172
  });