@haluo/biz 2.0.51 → 2.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,6 @@
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);
8
5
  const __vite_glob_0_1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLBAMAAADKYGfZAAAAG1BMVEUAAAAAAABHcExSUlLz8/P////IyMifn5/k5OQx49C2AAAACXRSTlMzZgB/7//CpN1ci7LLAAABHUlEQVR4AY3TgUbAUBjF8e0NmiiAY28QIYCkXqB9GUBIT7AHCHvvss3l73Y4g3vx87ft3m8Yp+C5GZSxecyYMuZzZMqYz5EpYz5Hpoz5HJkS1uceP67N7TeYyF7r59xs9XmxlgNbj/W+6hmMua86c9vfCsbcXdV6xpYHsj53xF4msj7XYmB97oqB9bmlxcC6XIuBdbkWI2Nur3qfyFouqc0K3g05/6XI+f+GnD8F5NyZMmdvCHP2vjFX7vYyt7tZYO7p7f/JYs7NKXMZk2fMZUyeMZcxecZcxuQZcxmTZ8xlTJ4xlzF5xlzG5BlzGZNnzGVMnjGXMXnGXMbkGXMZk2fMZUyeMZcxecZcxuQZcxmTZ8xlTJ4xlzFlbB5+AVncQI3j46OFAAAAAElFTkSuQmCC";
9
6
  const __vite_glob_0_2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkU2MThGQUEzOUM3QTExRThBMkI0RDI5RUQ4MzE1NUMwIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkU2MThGQUE0OUM3QTExRThBMkI0RDI5RUQ4MzE1NUMwIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RTYxOEZBQTE5QzdBMTFFOEEyQjREMjlFRDgzMTU1QzAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RTYxOEZBQTI5QzdBMTFFOEEyQjREMjlFRDgzMTU1QzAiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6cZvOcAAABiklEQVR42uyXu0rEQBRAs3GxtlHEIqDFioWIkA+wUBCsFKwUGxdRrHSx8Ed8gIWlIKyICKIigu0uYmFjIbIfIFqJyhrPwC3CEIvNZEKEGThMHpAcJvcxKUVR5BV5+F7BhxN0gk7QCTpBSyMMw37oLqQgYgNMt1A3lfQtyd3AMMyYSvoW5dTcMpX0LcrNw5SpZCntdouXxU974U6Te5V7FbiCAM5hrtFofOW9gj3wJnILsAhdcu8JLuR4GiY6eXDZUKxPVu8RNuAZdmFWVnMd9mEF2lBl9S7zElQxdy2fchOacCRy6tpBgtxhLkkSS4gR+IQXTW4SVk3lUgkmZKuKuT1N7htGZU4t13EW/yG3o8n9wAOMq8xF7tQkyMuGde4dPrTPOgbLcC94uQgytkVOFd61WJ1bgkHYisXckGR2rruZmhTaQApvRa63NbkqnGXVoTqNQdWq6tK6WtLKallka2atLkEysCWXuhdrktbkTDcLSvIYTmzJGQm6nyYn6ASdoBN0gv9D8FeAAQD7bZlccR+RLgAAAABJRU5ErkJggg==";
10
7
  const __vite_glob_0_3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAA8CAYAAAAOhRhuAAAAAXNSR0IArs4c6QAAALZJREFUaEPtlLENwCAMBGEilmAOhmNMmkTp0h1BLqzoIlGdYqzzm7rWukqir9oQTENDFFcNaYgMEDdDGiIDxM2QhsgAcTMUYmjOSXWOeGutPOf9bY2s9350If00xijP+dwQFY7kW4YiL6RaNqQhMkB8K0Pp1j7dw0iaI/nWyCIvpFo29E9D6bYs3TtEc4/kbhnZ1NA/DaVb+3QPI809krtlZFNDGiIDxM2QhsgAcTOkITJAPF2GbhF2A9gQfAOGAAAAAElFTkSuQmCC";
@@ -113,7 +110,6 @@
113
110
  }
114
111
  const D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, R = "__vueuse_ssr_handlers__";
115
112
  D[R] = D[R] || {};
116
- D[R];
117
113
  var q;
118
114
  (function(e) {
119
115
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
@@ -155,7 +151,7 @@
155
151
  ke({
156
152
  linear: me
157
153
  }, he);
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 = {
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 = {
159
155
  name: "colorPicker"
160
156
  }, Ne = /* @__PURE__ */ vue.defineComponent({
161
157
  ...Ve,
@@ -220,13 +216,13 @@
220
216
  l.stopPropagation();
221
217
  })
222
218
  }, [
223
- vue.createCommentVNode(" \u989C\u8272\u663E\u793A\u5C0F\u65B9\u5757 "),
219
+ vue.createCommentVNode(" 颜色显示小方块 "),
224
220
  vue.createElementVNode("div", {
225
221
  class: vue.normalizeClass(["colorBtn", { disabled: e.disabled }]),
226
222
  style: vue.normalizeStyle(`background-color: ${vue.unref(a)}`),
227
223
  onClick: p
228
224
  }, null, 6),
229
- vue.createCommentVNode(" \u989C\u8272\u8272\u76D8 "),
225
+ vue.createCommentVNode(" 颜色色盘 "),
230
226
  vue.createElementVNode("div", {
231
227
  class: vue.normalizeClass(["box", { open: s.value }])
232
228
  }, [
@@ -240,7 +236,7 @@
240
236
  onClick: Y,
241
237
  onMouseover: r[0] || (r[0] = (l) => d(e.defaultColor)),
242
238
  onMouseout: r[1] || (r[1] = (l) => d(""))
243
- }, "\u9ED8\u8BA4\u989C\u8272", 32)
239
+ }, "默认颜色", 32)
244
240
  ]),
245
241
  vue.createElementVNode("div", Oe, [
246
242
  Ie,
@@ -276,8 +272,8 @@
276
272
  onClick: (f) => E(l)
277
273
  }, null, 44, Be)), 64))
278
274
  ]),
279
- vue.createElementVNode("h3", { onClick: X }, "\u66F4\u591A\u989C\u8272..."),
280
- vue.createCommentVNode(" \u7528\u4EE5\u6FC0\u6D3BHTML5\u989C\u8272\u9762\u677F "),
275
+ vue.createElementVNode("h3", { onClick: X }, "更多颜色..."),
276
+ vue.createCommentVNode(" 用以激活HTML5颜色面板 "),
281
277
  vue.withDirectives(vue.createElementVNode("input", {
282
278
  type: "color",
283
279
  ref_key: "html5ColorEl",
@@ -311,7 +307,7 @@
311
307
  colorPicker: O
312
308
  };
313
309
  const style = "";
314
- const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
310
+ const ToolBar_vue_vue_type_style_index_0_scoped_50235bb8_lang = "";
315
311
  const ToolBar_vue_vue_type_style_index_1_lang = "";
316
312
  const _export_sfc = (sfc, props) => {
317
313
  const target = sfc.__vccOpts || sfc;
@@ -341,15 +337,15 @@
341
337
  activeImgType: false,
342
338
  activeAlign: "",
343
339
  alignMethods: [
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" }
340
+ { value: "left", name: "左对齐" },
341
+ { value: "right", name: "右对齐" },
342
+ { value: "center", name: "居中对齐" },
343
+ { value: "justify", name: "两端对齐" }
348
344
  ],
349
345
  activeFontsize: "17",
350
346
  fontsizes: [
351
- { value: "17px", name: "17", desc: "\u9ED8\u8BA4\u6B63\u6587\u5B57\u53F7" },
352
- { value: "18px", name: "18", desc: "\u9ED8\u8BA4\u6807\u9898\u5B57\u53F7" },
347
+ { value: "17px", name: "17", desc: "默认正文字号" },
348
+ { value: "18px", name: "18", desc: "默认标题字号" },
353
349
  { value: "19px", name: "19" },
354
350
  { value: "20px", name: "20" },
355
351
  { value: "24px", name: "24" },
@@ -430,7 +426,7 @@
430
426
  this.editor.clearFormat();
431
427
  },
432
428
  setColor(val) {
433
- console.log("\u6587\u5B57\u989C\u8272");
429
+ console.log("文字颜色");
434
430
  this.updatePosition(() => {
435
431
  this.editor.setColor(val);
436
432
  });
@@ -489,6 +485,7 @@
489
485
  this.popoverVisibleList = false;
490
486
  this.popoverVisibleImg = false;
491
487
  },
488
+ // todo 富文本设置样式位置会回到顶部
492
489
  updatePosition(fn) {
493
490
  const scrollTop = document.documentElement.scrollTop;
494
491
  fn && fn();
@@ -525,11 +522,11 @@
525
522
  key: 0,
526
523
  class: "tools"
527
524
  };
528
- const _hoisted_2$7 = { class: "tools-content" };
529
- const _hoisted_3$7 = ["src"];
530
- const _hoisted_4$6 = ["src"];
531
- const _hoisted_5$5 = ["src"];
532
- const _hoisted_6$3 = { class: "box" };
525
+ const _hoisted_2$5 = { class: "tools-content" };
526
+ const _hoisted_3$5 = ["src"];
527
+ const _hoisted_4$3 = ["src"];
528
+ const _hoisted_5$3 = ["src"];
529
+ const _hoisted_6$2 = { class: "box" };
533
530
  const _hoisted_7$2 = ["src"];
534
531
  const _hoisted_8$2 = {
535
532
  key: 0,
@@ -539,10 +536,10 @@
539
536
  const _hoisted_10$2 = ["src"];
540
537
  const _hoisted_11$2 = { class: "tools-font" };
541
538
  const _hoisted_12$2 = ["onClick"];
542
- const _hoisted_13$2 = { style: { "font-size": "10px" } };
543
- const _hoisted_14$2 = { class: "box" };
544
- const _hoisted_15$2 = ["src"];
545
- const _hoisted_16$2 = {
539
+ const _hoisted_13$1 = { style: { "font-size": "10px" } };
540
+ const _hoisted_14$1 = { class: "box" };
541
+ const _hoisted_15$1 = ["src"];
542
+ const _hoisted_16$1 = {
546
543
  key: 0,
547
544
  class: "box-mask"
548
545
  };
@@ -568,12 +565,12 @@
568
565
  key: 0,
569
566
  class: "box-mask"
570
567
  };
571
- const _hoisted_30$1 = { class: "box" };
572
- const _hoisted_31$1 = ["src"];
573
- const _hoisted_32$1 = ["src"];
574
- const _hoisted_33$1 = ["src"];
575
- const _hoisted_34$1 = ["src"];
576
- const _hoisted_35$1 = { class: "tools-title" };
568
+ const _hoisted_30 = { class: "box" };
569
+ const _hoisted_31 = ["src"];
570
+ const _hoisted_32 = ["src"];
571
+ const _hoisted_33 = ["src"];
572
+ const _hoisted_34 = ["src"];
573
+ const _hoisted_35 = { class: "tools-title" };
577
574
  const _hoisted_36 = ["src"];
578
575
  const _hoisted_37 = ["src"];
579
576
  const _hoisted_38 = { class: "tools-title_content" };
@@ -594,11 +591,11 @@
594
591
  const _component_colorPicker = vue.resolveComponent("colorPicker");
595
592
  const _directive_click_outside = vue.resolveDirective("click-outside");
596
593
  return $props.editor.fontInfo ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
597
- vue.createElementVNode("div", _hoisted_2$7, [
594
+ vue.createElementVNode("div", _hoisted_2$5, [
598
595
  vue.createVNode(_component_el_tooltip, {
599
596
  class: "item",
600
597
  effect: "dark",
601
- content: "\u64A4\u56DE",
598
+ content: "撤回",
602
599
  placement: "top"
603
600
  }, {
604
601
  default: vue.withCtx(() => [
@@ -610,14 +607,14 @@
610
607
  height: "40",
611
608
  alt: "",
612
609
  onClick: _cache[0] || (_cache[0] = ($event) => $options.back($event))
613
- }, null, 12, _hoisted_3$7)
610
+ }, null, 12, _hoisted_3$5)
614
611
  ]),
615
612
  _: 1
616
613
  }),
617
614
  vue.createVNode(_component_el_tooltip, {
618
615
  class: "item",
619
616
  effect: "dark",
620
- content: "\u53CD\u64A4\u56DE",
617
+ content: "反撤回",
621
618
  placement: "top"
622
619
  }, {
623
620
  default: vue.withCtx(() => [
@@ -629,7 +626,7 @@
629
626
  height: "40",
630
627
  alt: "",
631
628
  onClick: _cache[1] || (_cache[1] = ($event) => $options.forward($event))
632
- }, null, 12, _hoisted_4$6)
629
+ }, null, 12, _hoisted_4$3)
633
630
  ]),
634
631
  _: 1
635
632
  }),
@@ -640,7 +637,7 @@
640
637
  vue.createVNode(_component_el_tooltip, {
641
638
  class: "item",
642
639
  effect: "dark",
643
- content: "\u6E05\u9664\u683C\u5F0F",
640
+ content: "清除格式",
644
641
  placement: "top"
645
642
  }, {
646
643
  default: vue.withCtx(() => [
@@ -650,18 +647,18 @@
650
647
  height: "40",
651
648
  alt: "",
652
649
  onClick: _cache[2] || (_cache[2] = (...args) => $options.clearFormat && $options.clearFormat(...args))
653
- }, null, 8, _hoisted_5$5)
650
+ }, null, 8, _hoisted_5$3)
654
651
  ]),
655
652
  _: 1
656
653
  }),
657
654
  vue.createVNode(_component_el_tooltip, {
658
655
  class: "item",
659
656
  effect: "dark",
660
- content: "\u683C\u5F0F\u5237",
657
+ content: "格式刷",
661
658
  placement: "top"
662
659
  }, {
663
660
  default: vue.withCtx(() => [
664
- vue.createElementVNode("div", _hoisted_6$3, [
661
+ vue.createElementVNode("div", _hoisted_6$2, [
665
662
  vue.createElementVNode("img", {
666
663
  src: $options.getImageUrl("tools_refresh@3x.png"),
667
664
  width: "40",
@@ -688,7 +685,7 @@
688
685
  vue.createVNode(_component_el_tooltip, {
689
686
  class: "item",
690
687
  effect: "dark",
691
- content: "\u5B57\u53F7",
688
+ content: "字号",
692
689
  placement: "top"
693
690
  }, {
694
691
  default: vue.withCtx(() => [
@@ -722,7 +719,7 @@
722
719
  vue.createElementVNode("span", {
723
720
  style: vue.normalizeStyle({ fontSize: item.value })
724
721
  }, vue.toDisplayString(item.name), 5),
725
- vue.createElementVNode("span", _hoisted_13$2, vue.toDisplayString(item.desc), 1)
722
+ vue.createElementVNode("span", _hoisted_13$1, vue.toDisplayString(item.desc), 1)
726
723
  ], 10, _hoisted_12$2);
727
724
  }), 128))
728
725
  ])), [
@@ -738,11 +735,11 @@
738
735
  vue.createVNode(_component_el_tooltip, {
739
736
  class: "item",
740
737
  effect: "dark",
741
- content: "\u6807\u9898",
738
+ content: "标题",
742
739
  placement: "top"
743
740
  }, {
744
741
  default: vue.withCtx(() => [
745
- vue.createElementVNode("div", _hoisted_14$2, [
742
+ vue.createElementVNode("div", _hoisted_14$1, [
746
743
  vue.createElementVNode("img", {
747
744
  src: $options.getImageUrl("tools_title@3x.png"),
748
745
  "data-editor-id": "makeHeader",
@@ -750,8 +747,8 @@
750
747
  height: "40",
751
748
  alt: "",
752
749
  onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
753
- }, null, 8, _hoisted_15$2),
754
- $data.statusInfo && $data.statusInfo.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$2)) : vue.createCommentVNode("", true)
750
+ }, null, 8, _hoisted_15$1),
751
+ $data.statusInfo && $data.statusInfo.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1)) : vue.createCommentVNode("", true)
755
752
  ])
756
753
  ]),
757
754
  _: 1
@@ -759,7 +756,7 @@
759
756
  vue.createVNode(_component_el_tooltip, {
760
757
  class: "item",
761
758
  effect: "dark",
762
- content: "\u52A0\u7C97",
759
+ content: "加粗",
763
760
  placement: "top"
764
761
  }, {
765
762
  default: vue.withCtx(() => [
@@ -787,7 +784,7 @@
787
784
  vue.createVNode(_component_el_tooltip, {
788
785
  class: "item",
789
786
  effect: "dark",
790
- content: "\u5217\u8868",
787
+ content: "列表",
791
788
  placement: "top"
792
789
  }, {
793
790
  default: vue.withCtx(() => [
@@ -821,13 +818,13 @@
821
818
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
822
819
  $options.setStyle("makeUnorderedList");
823
820
  }))
824
- }, "\u65E0\u5E8F\u5217\u8868"),
821
+ }, "无序列表"),
825
822
  vue.createElementVNode("li", {
826
823
  "data-editor-id": "makeHeader",
827
824
  onClick: _cache[9] || (_cache[9] = ($event) => $options.updatePosition(() => {
828
825
  $options.setStyle("makeOrderedList");
829
826
  }))
830
- }, "\u6709\u5E8F\u5217\u8868")
827
+ }, "有序列表")
831
828
  ])), [
832
829
  [_directive_click_outside, $options.handlePopover]
833
830
  ])
@@ -838,7 +835,7 @@
838
835
  vue.createVNode(_component_el_tooltip, {
839
836
  class: "item",
840
837
  effect: "dark",
841
- content: "\u503E\u659C",
838
+ content: "倾斜",
842
839
  placement: "top"
843
840
  }, {
844
841
  default: vue.withCtx(() => [
@@ -858,7 +855,7 @@
858
855
  vue.createVNode(_component_el_tooltip, {
859
856
  class: "item",
860
857
  effect: "dark",
861
- content: "\u4E0B\u5212\u7EBF",
858
+ content: "下划线",
862
859
  placement: "top"
863
860
  }, {
864
861
  default: vue.withCtx(() => [
@@ -879,18 +876,18 @@
879
876
  key: 0,
880
877
  class: "item",
881
878
  effect: "dark",
882
- content: "\u94FE\u63A5",
879
+ content: "链接",
883
880
  placement: "top"
884
881
  }, {
885
882
  default: vue.withCtx(() => [
886
- vue.createElementVNode("div", _hoisted_30$1, [
883
+ vue.createElementVNode("div", _hoisted_30, [
887
884
  vue.createElementVNode("img", {
888
885
  src: $options.getImageUrl("icon_web_link@2x.png"),
889
886
  width: "40",
890
887
  height: "40",
891
888
  alt: "",
892
889
  onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
893
- }, null, 8, _hoisted_31$1)
890
+ }, null, 8, _hoisted_31)
894
891
  ])
895
892
  ]),
896
893
  _: 1
@@ -898,7 +895,7 @@
898
895
  vue.createVNode(_component_el_tooltip, {
899
896
  class: "item",
900
897
  effect: "dark",
901
- content: "\u9996\u884C\u7F29\u8FDB",
898
+ content: "首行缩进",
902
899
  placement: "top"
903
900
  }, {
904
901
  default: vue.withCtx(() => [
@@ -908,14 +905,14 @@
908
905
  height: "40",
909
906
  alt: "",
910
907
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
911
- }, null, 8, _hoisted_32$1)
908
+ }, null, 8, _hoisted_32)
912
909
  ]),
913
910
  _: 1
914
911
  }),
915
912
  vue.createVNode(_component_el_tooltip, {
916
913
  class: "item",
917
914
  effect: "dark",
918
- content: "\u6587\u5B57\u989C\u8272",
915
+ content: "文字颜色",
919
916
  placement: "top"
920
917
  }, {
921
918
  default: vue.withCtx(() => [
@@ -928,13 +925,13 @@
928
925
  width: "24",
929
926
  height: "40",
930
927
  alt: ""
931
- }, null, 8, _hoisted_33$1),
928
+ }, null, 8, _hoisted_33),
932
929
  vue.createElementVNode("img", {
933
930
  src: $options.getImageUrl("tools_arrow@3x.png"),
934
931
  width: "16",
935
932
  height: "40",
936
933
  alt: ""
937
- }, null, 8, _hoisted_34$1),
934
+ }, null, 8, _hoisted_34),
938
935
  vue.createVNode(_component_colorPicker, {
939
936
  ref: "colorPicker",
940
937
  modelValue: $data.color,
@@ -955,11 +952,11 @@
955
952
  width: "152"
956
953
  }, {
957
954
  reference: vue.withCtx(() => [
958
- vue.createElementVNode("div", _hoisted_35$1, [
955
+ vue.createElementVNode("div", _hoisted_35, [
959
956
  vue.createVNode(_component_el_tooltip, {
960
957
  class: "item",
961
958
  effect: "dark",
962
- content: "\u5BF9\u9F50\u65B9\u5F0F",
959
+ content: "对齐方式",
963
960
  placement: "top"
964
961
  }, {
965
962
  default: vue.withCtx(() => [
@@ -1017,7 +1014,7 @@
1017
1014
  vue.createVNode(_component_el_tooltip, {
1018
1015
  class: "item",
1019
1016
  effect: "dark",
1020
- content: "\u63D2\u5165\u56FE\u7247",
1017
+ content: "插入图片",
1021
1018
  placement: "top"
1022
1019
  }, {
1023
1020
  default: vue.withCtx(() => [
@@ -1039,11 +1036,11 @@
1039
1036
  vue.createElementVNode("li", {
1040
1037
  class: vue.normalizeClass([$data.activeImgType === "normal" ? "active" : ""]),
1041
1038
  onClick: _cache[18] || (_cache[18] = ($event) => $options.insertImg("normal"))
1042
- }, vue.toDisplayString("\u4E0A\u4F20\u56FE\u7247"), 2),
1039
+ }, vue.toDisplayString("上传图片"), 2),
1043
1040
  vue.createElementVNode("li", {
1044
1041
  class: vue.normalizeClass([$data.activeImgType === "seamless" ? "active" : ""]),
1045
1042
  onClick: _cache[19] || (_cache[19] = ($event) => $options.insertImg("seamless"))
1046
- }, vue.toDisplayString("\u4E0A\u4F20\u65E0\u7F1D\u62FC\u63A5\u56FE\u7247"), 2)
1043
+ }, vue.toDisplayString("上传无缝拼接图片"), 2)
1047
1044
  ])), [
1048
1045
  [_directive_click_outside, $options.handlePopover]
1049
1046
  ])
@@ -1054,7 +1051,7 @@
1054
1051
  key: 2,
1055
1052
  class: "item",
1056
1053
  effect: "dark",
1057
- content: "\u63D2\u5165\u89C6\u9891",
1054
+ content: "插入视频",
1058
1055
  placement: "top"
1059
1056
  }, {
1060
1057
  default: vue.withCtx(() => [
@@ -1072,7 +1069,7 @@
1072
1069
  key: 3,
1073
1070
  class: "item",
1074
1071
  effect: "dark",
1075
- content: "\u63D2\u5165\u6587\u7AE0/\u89C6\u9891",
1072
+ content: "插入文章/视频",
1076
1073
  placement: "top"
1077
1074
  }, {
1078
1075
  default: vue.withCtx(() => [
@@ -1090,7 +1087,7 @@
1090
1087
  key: 4,
1091
1088
  class: "item",
1092
1089
  effect: "dark",
1093
- content: "\u91C7\u96C6\u6587\u7AE0",
1090
+ content: "采集文章",
1094
1091
  placement: "top"
1095
1092
  }, {
1096
1093
  default: vue.withCtx(() => [
@@ -1107,20 +1104,16 @@
1107
1104
  ])
1108
1105
  ])) : vue.createCommentVNode("", true);
1109
1106
  }
1110
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-24d161f2"]]);
1107
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$4], ["__scopeId", "data-v-50235bb8"]]);
1111
1108
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
1112
- const index_vue_vue_type_style_index_0_lang$5 = "";
1113
1109
  const _hoisted_1$7 = { 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$5 = {
1110
+ const _hoisted_2$4 = { class: "basic-dialog_title" };
1111
+ const _hoisted_3$4 = {
1117
1112
  key: 0,
1118
1113
  class: "dialog-footer"
1119
1114
  };
1120
- const _hoisted_5$4 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
1121
- const _hoisted_6$2 = /* @__PURE__ */ vue.createTextVNode("\u786E\u8BA4");
1122
1115
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
1123
- name: "index",
1116
+ __name: "index",
1124
1117
  props: {
1125
1118
  visible: { type: Boolean, default: false },
1126
1119
  showBtn: { type: Boolean, default: true },
@@ -1128,9 +1121,10 @@
1128
1121
  showTitle: { type: Boolean, default: true }
1129
1122
  },
1130
1123
  emits: ["submit", "cancel"],
1131
- setup(__props, { emit: emits }) {
1124
+ setup(__props, { emit: __emit }) {
1132
1125
  const props = __props;
1133
1126
  const parent = vue.inject("vm");
1127
+ const emits = __emit;
1134
1128
  const handleClose = () => {
1135
1129
  var _a;
1136
1130
  (_a = parent.setStatus) == null ? void 0 : _a.call(parent, false);
@@ -1152,31 +1146,31 @@
1152
1146
  });
1153
1147
  return (_ctx, _cache) => {
1154
1148
  return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), {
1155
- modelValue: vue.unref(dialogVisible),
1156
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(dialogVisible) ? dialogVisible.value = $event : null),
1149
+ modelValue: dialogVisible.value,
1150
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event),
1157
1151
  "before-close": handleClose,
1158
1152
  width: __props.width,
1159
1153
  class: vue.normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
1160
1154
  }, {
1161
1155
  header: vue.withCtx(() => [
1162
1156
  __props.showTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$7, [
1163
- vue.createElementVNode("div", _hoisted_2$6, [
1164
- _hoisted_3$6,
1157
+ vue.createElementVNode("div", _hoisted_2$4, [
1158
+ _cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "basic-dialog_divider" }, null, -1)),
1165
1159
  vue.renderSlot(_ctx.$slots, "title")
1166
1160
  ])
1167
1161
  ])) : vue.createCommentVNode("", true)
1168
1162
  ]),
1169
1163
  footer: vue.withCtx(() => [
1170
- __props.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$5, [
1164
+ __props.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, [
1171
1165
  vue.createVNode(vue.unref(elementPlus.ElButton), {
1172
1166
  style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
1173
1167
  plain: "",
1174
1168
  round: "",
1175
1169
  onClick: handleClose
1176
1170
  }, {
1177
- default: vue.withCtx(() => [
1178
- _hoisted_5$4
1179
- ]),
1171
+ default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
1172
+ vue.createTextVNode("取消", -1)
1173
+ ])]),
1180
1174
  _: 1
1181
1175
  }),
1182
1176
  vue.createVNode(vue.unref(elementPlus.ElButton), {
@@ -1185,9 +1179,9 @@
1185
1179
  type: "primary",
1186
1180
  onClick: confirm
1187
1181
  }, {
1188
- default: vue.withCtx(() => [
1189
- _hoisted_6$2
1190
- ]),
1182
+ default: vue.withCtx(() => [..._cache[3] || (_cache[3] = [
1183
+ vue.createTextVNode("确认", -1)
1184
+ ])]),
1191
1185
  _: 1
1192
1186
  })
1193
1187
  ])) : vue.createCommentVNode("", true)
@@ -1200,16 +1194,18 @@
1200
1194
  };
1201
1195
  }
1202
1196
  });
1197
+ const index_vue_vue_type_style_index_0_lang$5 = "";
1203
1198
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1204
1199
  function getDefaultExportFromCjs(x) {
1205
1200
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1206
1201
  }
1207
- var date$1 = { exports: {} };
1208
- Object.defineProperty(date$1.exports, "__esModule", { value: true });
1202
+ var date$2 = { exports: {} };
1203
+ var date = date$2.exports;
1204
+ Object.defineProperty(date, "__esModule", { value: true });
1209
1205
  function replacementDate(data, fmt) {
1210
1206
  for (var k in data) {
1211
1207
  if (new RegExp("(" + k + ")").test(fmt)) {
1212
- fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? data[k] : ("00" + data[k]).substr(("" + data[k]).length));
1208
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? data[k] : "00".concat(data[k]).substr(("" + data[k]).length));
1213
1209
  }
1214
1210
  }
1215
1211
  return fmt;
@@ -1220,126 +1216,130 @@
1220
1216
  }
1221
1217
  return fmt;
1222
1218
  }
1223
- var DateClass = function() {
1224
- function DateClass2() {
1225
- }
1226
- DateClass2.prototype.format = function(date2, fmt) {
1227
- if (fmt === void 0) {
1228
- fmt = "YYYY-MM-DD HH:mm:ss";
1229
- }
1230
- if (!date2)
1231
- return "";
1232
- var timeData = typeof date2 === "string" ? new Date(date2.replace(/-/g, "/")) : date2;
1233
- timeData = typeof date2 === "number" ? new Date(date2) : timeData;
1234
- var o = {
1235
- "M+": timeData.getMonth() + 1,
1236
- "D+": timeData.getDate(),
1237
- "h+": timeData.getHours() % 12 === 0 ? 12 : timeData.getHours() % 12,
1238
- "H+": timeData.getHours(),
1239
- "m+": timeData.getMinutes(),
1240
- "s+": timeData.getSeconds(),
1241
- "q+": Math.floor((timeData.getMonth() + 3) / 3),
1242
- "S": timeData.getMilliseconds()
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);
1243
1256
  };
1244
- var week = {
1245
- "0": "\u65E5",
1246
- "1": "\u4E00",
1247
- "2": "\u4E8C",
1248
- "3": "\u4E09",
1249
- "4": "\u56DB",
1250
- "5": "\u4E94",
1251
- "6": "\u516D"
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];
1252
1261
  };
1253
- fmt = replacementYear(timeData, fmt);
1254
- if (/(E+)/.test(fmt)) {
1255
- fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "\u661F\u671F" : "\u5468" : "") + week[timeData.getDay() + " "]);
1256
- }
1257
- return replacementDate(o, fmt);
1258
- };
1259
- DateClass2.prototype.addDaysToDate = function(date2, days) {
1260
- var d = typeof date2 === "object" ? date2 : new Date(date2);
1261
- d.setDate(d.getDate() + days);
1262
- return d.toISOString().split("T")[0];
1263
- };
1264
- DateClass2.prototype.remainTime = function(endTime, startTime) {
1265
- if (startTime === void 0) {
1266
- startTime = new Date();
1267
- }
1268
- var ts = Number(endTime) - Number(startTime);
1269
- var dd = Math.floor(ts / 1e3 / 60 / 60 / 24);
1270
- var hh = Math.floor(ts / 1e3 / 60 / 60 % 24);
1271
- var mm = Math.floor(ts / 1e3 / 60 % 60);
1272
- var ss = Math.floor(ts / 1e3 % 60);
1273
- if (ts <= 0)
1274
- return false;
1275
- return {
1276
- dd: dd < 10 ? "0" + dd : dd,
1277
- hh: hh < 10 ? "0" + hh : hh,
1278
- mm: mm < 10 ? "0" + mm : mm,
1279
- ss: ss < 10 ? "0" + ss : ss
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
+ };
1280
1279
  };
1281
- };
1282
- DateClass2.prototype.formatPassTime = function(startTime) {
1283
- var currentTime = new Date();
1284
- var time = currentTime - startTime;
1285
- var year = Math.floor(time / (1e3 * 60 * 60 * 24) / 30 / 12);
1286
- if (year)
1287
- return year + "\u5E74\u524D";
1288
- var month = Math.floor(time / (1e3 * 60 * 60 * 24) / 30);
1289
- if (month)
1290
- return month + "\u4E2A\u6708\u524D";
1291
- var day = Math.floor(time / (1e3 * 60 * 60 * 24));
1292
- if (day)
1293
- return day + "\u5929\u524D";
1294
- var hour = Math.floor(time / (1e3 * 60 * 60));
1295
- if (hour)
1296
- return hour + "\u5C0F\u65F6\u524D";
1297
- var min = Math.floor(time / (1e3 * 60));
1298
- if (min)
1299
- return min + "\u5206\u949F\u524D";
1300
- else
1301
- return "\u521A\u521A";
1302
- };
1303
- DateClass2.prototype.formatPassTimeForList = function(time) {
1304
- return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY\u5E74MM\u6708DD\u65E5", true);
1305
- };
1306
- DateClass2.prototype.formatPassTimeForDetail = function(time, fmt, noYear) {
1307
- if (fmt === void 0) {
1308
- fmt = "YYYY-MM-DD";
1309
- }
1310
- var date2 = typeof time === "number" ? new Date(time) : new Date((time || "").replace(/-/g, "/"));
1311
- var diff = (new Date().getTime() - date2.getTime()) / 1e3;
1312
- var dayDiff = Math.floor(diff / 86400);
1313
- var isValidDate = Object.prototype.toString.call(date2) === "[object Date]" && !isNaN(date2.getTime());
1314
- if (!isValidDate)
1315
- return "";
1316
- var formatDate = function() {
1317
- var today = new Date(date2);
1318
- var o = {
1319
- "Y+": today.getFullYear(),
1320
- "M+": ("0" + (today.getMonth() + 1)).slice(-2),
1321
- "D+": ("0" + today.getDate()).slice(-2)
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 "刚刚";
1300
+ };
1301
+ DateClass2.prototype.formatPassTimeForList = function(time) {
1302
+ return DateClass2.prototype.formatPassTimeForDetail(time, "YYYY年MM月DD日", true);
1303
+ };
1304
+ DateClass2.prototype.formatPassTimeForDetail = function(time, fmt, noYear) {
1305
+ if (fmt === void 0) {
1306
+ fmt = "YYYY-MM-DD";
1307
+ }
1308
+ var date2 = typeof time === "number" ? new Date(time) : new Date((time || "").replace(/-/g, "/"));
1309
+ var diff = ((/* @__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);
1322
1328
  };
1323
- fmt = replacementYear(date2, fmt);
1324
- var year = today.getFullYear();
1325
- if (!(new Date().getFullYear() > year) && noYear) {
1326
- var backData = replacementDate(o, fmt);
1327
- return backData.split("\u5E74")[1];
1329
+ if (dayDiff === -1) {
1330
+ return "刚刚";
1331
+ } else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
1332
+ return formatDate();
1328
1333
  }
1329
- return replacementDate(o, fmt);
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 + "天前";
1330
1335
  };
1331
- if (dayDiff === -1) {
1332
- return "\u521A\u521A";
1333
- } else if (isNaN(dayDiff) || dayDiff < 0 || dayDiff >= 15) {
1334
- return formatDate();
1335
- }
1336
- 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";
1337
- };
1338
- return DateClass2;
1339
- }();
1340
- date$1.exports = new DateClass();
1341
- const date = /* @__PURE__ */ getDefaultExportFromCjs(date$1.exports);
1342
- var tools$1 = { exports: {} };
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: {} };
1343
1343
  var _listCacheClear;
1344
1344
  var hasRequired_listCacheClear;
1345
1345
  function require_listCacheClear() {
@@ -2246,6 +2246,7 @@
2246
2246
  stubFalse_1 = stubFalse;
2247
2247
  return stubFalse_1;
2248
2248
  }
2249
+ isBuffer.exports;
2249
2250
  var hasRequiredIsBuffer;
2250
2251
  function requireIsBuffer() {
2251
2252
  if (hasRequiredIsBuffer)
@@ -2325,6 +2326,7 @@
2325
2326
  return _baseUnary;
2326
2327
  }
2327
2328
  var _nodeUtil = { exports: {} };
2329
+ _nodeUtil.exports;
2328
2330
  var hasRequired_nodeUtil;
2329
2331
  function require_nodeUtil() {
2330
2332
  if (hasRequired_nodeUtil)
@@ -2374,7 +2376,11 @@
2374
2376
  function arrayLikeKeys(value, inherited) {
2375
2377
  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;
2376
2378
  for (var key in value) {
2377
- if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
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)))) {
2378
2384
  result.push(key);
2379
2385
  }
2380
2386
  }
@@ -2554,6 +2560,7 @@
2554
2560
  return _baseAssignIn;
2555
2561
  }
2556
2562
  var _cloneBuffer = { exports: {} };
2563
+ _cloneBuffer.exports;
2557
2564
  var hasRequired_cloneBuffer;
2558
2565
  function require_cloneBuffer() {
2559
2566
  if (hasRequired_cloneBuffer)
@@ -3218,296 +3225,295 @@
3218
3225
  }
3219
3226
  return clipboardCopy_1;
3220
3227
  }
3221
- Object.defineProperty(tools$1.exports, "__esModule", { value: true });
3228
+ var tools = tools$2.exports;
3229
+ Object.defineProperty(tools, "__esModule", { value: true });
3222
3230
  var previous = 0;
3223
3231
  var timeout = null;
3224
- var ToolsClass = function() {
3225
- function ToolsClass2() {
3226
- var _this = this;
3227
- this.stopScroll = function(className) {
3228
- if (!(window && window.document)) {
3229
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3230
- }
3231
- var html = document.documentElement;
3232
- html.style.overflow = "hidden";
3233
- html.style.height = "100%";
3234
- var body = document.body;
3235
- body.style.overflow = "hidden";
3236
- body.style.height = "100%";
3237
- if (className) {
3238
- var dom = document.querySelector("." + className);
3239
- dom && dom.addEventListener("touchmove", _this.__setDefault__);
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];
3240
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];
3241
3334
  };
3242
- this.startScroll = function(className) {
3335
+ ToolsClass2.prototype.loadJs = function(url) {
3336
+ var _this = this;
3243
3337
  if (!(window && window.document)) {
3244
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3245
- }
3246
- var html = document.documentElement;
3247
- html.style.overflow = "visible";
3248
- html.style.height = "auto";
3249
- var body = document.body;
3250
- body.style.overflow = "visible";
3251
- body.style.height = "auto";
3252
- if (className) {
3253
- var dom = document.querySelector("." + className);
3254
- dom && dom.removeEventListener("touchmove", _this.__setDefault__);
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;
3363
+ 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("仅支持浏览器");
3255
3390
  }
3391
+ var copy = requireClipboardCopy();
3392
+ return copy(str);
3256
3393
  };
3257
- this.objectToArray = function(obj) {
3258
- var arr = [];
3259
- if (typeof obj === "object") {
3260
- for (var key in obj) {
3261
- if (obj.hasOwnProperty(key)) {
3262
- arr.push([key, obj[key]].join("="));
3263
- }
3264
- }
3394
+ ToolsClass2.prototype.firstUpperCase = function(str) {
3395
+ return str.charAt(0).toUpperCase() + str.toString().slice(1);
3396
+ };
3397
+ ToolsClass2.prototype.slice = function(target, length) {
3398
+ if (target === void 0) {
3399
+ target = "";
3265
3400
  }
3266
- return arr;
3401
+ if (length === void 0) {
3402
+ length = 0;
3403
+ }
3404
+ return target.slice(0, length);
3267
3405
  };
3268
- this.convertKeyValueEnum = function(obj) {
3269
- var result = {};
3270
- if (typeof obj === "object") {
3271
- for (var key in obj) {
3272
- if (obj.hasOwnProperty(key)) {
3273
- result[obj[key]] = key;
3274
- }
3275
- }
3406
+ ToolsClass2.prototype.guid = function() {
3407
+ function S4() {
3408
+ return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3276
3409
  }
3277
- return result;
3410
+ return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
3278
3411
  };
3279
- this.isDefined = function(val) {
3280
- return val !== void 0 && val !== null;
3412
+ ToolsClass2.prototype.getBytesOfText = function(str) {
3413
+ if (str === void 0) {
3414
+ str = "";
3415
+ }
3416
+ return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
3281
3417
  };
3282
- this.__loaded__ = {};
3283
- this.__setDefault__ = function(e) {
3284
- e && e.preventDefault();
3418
+ ToolsClass2.prototype.uniqueArr = function(arr) {
3419
+ return Array.from(new Set(arr));
3285
3420
  };
3286
- }
3287
- ToolsClass2.prototype.deepCopy = function(data) {
3288
- return JSON.parse(JSON.stringify(data));
3289
- };
3290
- ToolsClass2.prototype.deepCopy2 = function(obj) {
3291
- var _obj = Array.isArray(obj) ? [] : {};
3292
- for (var i in obj) {
3293
- _obj[i] = typeof obj[i] === "object" ? this.deepCopy2(obj[i]) : obj[i];
3294
- }
3295
- return _obj;
3296
- };
3297
- ToolsClass2.prototype.deepCopy3 = function(obj) {
3298
- var deepcopy = requireCloneDeep();
3299
- return deepcopy(obj);
3300
- };
3301
- ToolsClass2.prototype.debounce = function(func, wait) {
3302
- var delay = function() {
3303
- var args = arguments;
3304
- if (timeout)
3305
- clearTimeout(timeout);
3306
- timeout = setTimeout(function() {
3307
- func.apply(delay, args);
3308
- }, wait);
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;
3309
3425
  };
3310
- return delay;
3311
- };
3312
- ToolsClass2.prototype.throttle = function(func, wait) {
3313
- var delay = function() {
3314
- var now = Date.now();
3315
- if (now - previous > wait) {
3316
- func.apply(delay, arguments);
3317
- previous = now;
3318
- }
3426
+ ToolsClass2.prototype.filterEmoji = function(str) {
3427
+ return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
3319
3428
  };
3320
- return delay;
3321
- };
3322
- ToolsClass2.prototype.getUrlName = function(url) {
3323
- return url && url.split("?")[0].split("/").reverse()[0];
3324
- };
3325
- ToolsClass2.prototype.loadJs = function(url) {
3326
- var _this = this;
3327
- if (!(window && window.document)) {
3328
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3329
- }
3330
- var name = this.getUrlName(url);
3331
- var id = "js_" + name;
3332
- return new Promise(function(resolve, reject) {
3333
- if (_this.__loaded__[id]) {
3334
- return resolve();
3335
- }
3336
- var script = document.createElement("script");
3337
- script.type = "text/javascript";
3338
- script.async = true;
3339
- script.src = url;
3340
- script.id = id;
3341
- script.onload = function() {
3342
- _this.__loaded__[id] = true;
3343
- resolve();
3344
- };
3345
- script.onerror = function(e) {
3346
- reject(e);
3347
- };
3348
- document.body.appendChild(script);
3349
- });
3350
- };
3351
- ToolsClass2.prototype.loadCss = function(url) {
3352
- var _this = this;
3353
- if (!(window && window.document)) {
3354
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3355
- }
3356
- var name = this.getUrlName(url);
3357
- var id = "css_" + name;
3358
- return new Promise(function(resolve, reject) {
3359
- if (_this.__loaded__[id]) {
3360
- return resolve();
3361
- }
3362
- var link = document.createElement("link");
3363
- link.type = "text/css";
3364
- link.rel = "stylesheet";
3365
- link.href = url;
3366
- link.id = id;
3367
- link.onload = function() {
3368
- _this.__loaded__[id] = true;
3369
- resolve();
3370
- };
3371
- link.onerror = function(e) {
3372
- reject(e);
3373
- };
3374
- document.head.appendChild(link);
3375
- });
3376
- };
3377
- ToolsClass2.prototype.clipboard = function(str) {
3378
- if (!(window && window.document)) {
3379
- return new Error("\u4EC5\u652F\u6301\u6D4F\u89C8\u5668");
3380
- }
3381
- var copy = requireClipboardCopy();
3382
- return copy(str);
3383
- };
3384
- ToolsClass2.prototype.firstUpperCase = function(str) {
3385
- return str.charAt(0).toUpperCase() + str.toString().slice(1);
3386
- };
3387
- ToolsClass2.prototype.slice = function(target, length) {
3388
- if (target === void 0) {
3389
- target = "";
3390
- }
3391
- if (length === void 0) {
3392
- length = 0;
3393
- }
3394
- return target.slice(0, length);
3395
- };
3396
- ToolsClass2.prototype.guid = function() {
3397
- function S4() {
3398
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
3399
- }
3400
- return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4();
3401
- };
3402
- ToolsClass2.prototype.getBytesOfText = function(str) {
3403
- if (str === void 0) {
3404
- str = "";
3405
- }
3406
- return str.replace(/[^\u0000-\u00ff]/g, "aa").length;
3407
- };
3408
- ToolsClass2.prototype.uniqueArr = function(arr) {
3409
- return Array.from(new Set(arr));
3410
- };
3411
- ToolsClass2.prototype.swapArray = function(array, index1, index2) {
3412
- var _a;
3413
- _a = [array[index2], array[index1]], array[index1] = _a[0], array[index2] = _a[1];
3414
- return array;
3415
- };
3416
- ToolsClass2.prototype.filterEmoji = function(str) {
3417
- return str.replace(/\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg, "");
3418
- };
3419
- ToolsClass2.prototype.containsEmoji = function(str) {
3420
- var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
3421
- return reg.test(str);
3422
- };
3423
- ToolsClass2.prototype.containsHanZi = function(str) {
3424
- var reg = /[\u4e00-\u9fa5]/mg;
3425
- return reg.test(str);
3426
- };
3427
- ToolsClass2.prototype.isEmpty = function(val) {
3428
- if (val == null)
3429
- return true;
3430
- if (typeof val === "boolean")
3429
+ ToolsClass2.prototype.containsEmoji = function(str) {
3430
+ var reg = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/mg;
3431
+ return reg.test(str);
3432
+ };
3433
+ ToolsClass2.prototype.containsHanZi = function(str) {
3434
+ var reg = /[\u4e00-\u9fa5]/mg;
3435
+ return reg.test(str);
3436
+ };
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
+ }
3458
+ }
3431
3459
  return false;
3432
- if (typeof val === "number")
3433
- return !val;
3434
- if (val instanceof Error)
3435
- return val.message === "";
3436
- switch (Object.prototype.toString.call(val)) {
3437
- case "[object String]":
3438
- case "[object Array]":
3439
- return !val.length;
3440
- case "[object File]":
3441
- case "[object Map]":
3442
- case "[object Set]": {
3443
- return !val.size;
3444
- }
3445
- case "[object Object]": {
3446
- return !Object.keys(val).length;
3460
+ };
3461
+ ToolsClass2.prototype.sensitiveField = function(field, before, after) {
3462
+ if (before === void 0) {
3463
+ before = 3;
3447
3464
  }
3448
- }
3449
- return false;
3450
- };
3451
- ToolsClass2.prototype.sensitiveField = function(field, before, after) {
3452
- if (before === void 0) {
3453
- before = 3;
3454
- }
3455
- if (after === void 0) {
3456
- after = 4;
3457
- }
3458
- if (!field) {
3459
- return "";
3460
- }
3461
- field = String(field);
3462
- var sensitiveLen = field.length - before - after;
3463
- if (sensitiveLen < 0) {
3464
- sensitiveLen = 0;
3465
- }
3466
- var regItem = "[\u4E00-\u9FA5a-zA-Z0-9]";
3467
- var regExp = "(" + regItem + "{" + before + "})" + regItem + "*(" + regItem + "{" + after + "})";
3468
- var reg = new RegExp(regExp);
3469
- return field.replace(reg, "$1" + "*".repeat(sensitiveLen) + "$2");
3470
- };
3471
- return ToolsClass2;
3472
- }();
3473
- tools$1.exports = new ToolsClass();
3474
- const tools = /* @__PURE__ */ getDefaultExportFromCjs(tools$1.exports);
3475
- const index_vue_vue_type_style_index_0_lang$4 = "";
3476
- const _hoisted_1$6 = /* @__PURE__ */ vue.createTextVNode("\u63D2\u5165\u6587\u7AE0/\u89C6\u9891");
3477
- const _hoisted_2$5 = { style: { "margin-left": "20px", "color": "#FF5A25" } };
3478
- const _hoisted_3$5 = { class: "insert-article" };
3479
- const _hoisted_4$4 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6211\u7684\u6587\u7AE0\u4E2D\u9009\u62E9");
3480
- const _hoisted_5$3 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
3481
- const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
3482
- const _hoisted_7$1 = { class: "insert-article_input" };
3483
- const _hoisted_8$1 = {
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;
3475
+ }
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" };
3490
+ const _hoisted_4$2 = {
3484
3491
  key: 0,
3485
3492
  class: "nodata"
3486
3493
  };
3487
- const _hoisted_9$1 = ["infinite-scroll-disabled"];
3488
- const _hoisted_10$1 = {
3494
+ const _hoisted_5$2 = ["infinite-scroll-disabled"];
3495
+ const _hoisted_6$1 = {
3489
3496
  key: 0,
3490
3497
  class: "video-item"
3491
3498
  };
3492
- const _hoisted_11$1 = { class: "video-pic" };
3493
- const _hoisted_12$1 = ["src"];
3494
- const _hoisted_13$1 = ["src"];
3495
- const _hoisted_14$1 = { class: "video-text" };
3496
- const _hoisted_15$1 = { class: "dotdotdot2" };
3497
- const _hoisted_16$1 = {
3499
+ const _hoisted_7$1 = { class: "video-pic" };
3500
+ const _hoisted_8$1 = ["src"];
3501
+ const _hoisted_9$1 = ["src"];
3502
+ const _hoisted_10$1 = { class: "video-text" };
3503
+ const _hoisted_11$1 = { class: "dotdotdot2" };
3504
+ const _hoisted_12$1 = {
3498
3505
  key: 1,
3499
3506
  style: { "display": "inline-flex", "flex-direction": "column" }
3500
3507
  };
3501
3508
  const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
3502
- name: "index",
3509
+ __name: "index",
3503
3510
  props: {
3504
3511
  visible: { type: Boolean, default: false },
3505
- getList: null
3512
+ getList: {}
3506
3513
  },
3507
3514
  emits: ["change", "submit", "update:visible"],
3508
- setup(__props, { emit: emits }) {
3509
- const props = __props;
3510
- const { debounce } = tools;
3515
+ setup(__props, { emit: __emit }) {
3516
+ const { debounce } = tools$1;
3511
3517
  const vInfiniteScroll = elementPlus.ElInfiniteScroll;
3512
3518
  const Radio_Type = {
3513
3519
  MY_ARITICLE: "1",
@@ -3525,7 +3531,9 @@
3525
3531
  emits("update:visible", val);
3526
3532
  }
3527
3533
  });
3534
+ const props = __props;
3528
3535
  const { visible, getList } = vue.toRefs(props);
3536
+ const emits = __emit;
3529
3537
  const data = vue.reactive({
3530
3538
  params: {
3531
3539
  autherid: "",
@@ -3556,7 +3564,7 @@
3556
3564
  };
3557
3565
  const confirm = () => {
3558
3566
  if (!data.article) {
3559
- elementPlus.ElMessage.error(`\u8BF7\u9009\u62E9${isVideo ? "\u89C6\u9891" : "\u6587\u7AE0"}`);
3567
+ elementPlus.ElMessage.error(`请选择${isVideo ? "视频" : "文章"}`);
3560
3568
  return;
3561
3569
  }
3562
3570
  data.article.isVideo = isVideo;
@@ -3580,6 +3588,7 @@
3580
3588
  autherid: data.params.radio !== Radio_Type.ALL_ARITICLE ? userId : "",
3581
3589
  limit: 20,
3582
3590
  allType: data.params.radio,
3591
+ // 只有4 是查视频 其他是文章
3583
3592
  title: data.params.title,
3584
3593
  page: ++data.page
3585
3594
  });
@@ -3599,21 +3608,21 @@
3599
3608
  }, {
3600
3609
  title: vue.withCtx(() => [
3601
3610
  vue.createElementVNode("span", null, [
3602
- _hoisted_1$6,
3603
- vue.createElementVNode("strong", _hoisted_2$5, "\u5E73\u53F0\u4EC5\u652F\u6301\u63D2\u5165" + vue.toDisplayString(`${vue.unref(isVideo) ? "2\u5E74" : "18\u4E2A\u6708"}`) + "\u5185\u7684\u63A8\u8350\u5185\u5BB9", 1)
3611
+ _cache[8] || (_cache[8] = vue.createTextVNode("插入文章/视频", -1)),
3612
+ vue.createElementVNode("strong", _hoisted_1$6, "平台仅支持插入" + vue.toDisplayString(`${isVideo.value ? "2" : "18个月"}`) + "内的推荐内容", 1)
3604
3613
  ])
3605
3614
  ]),
3606
3615
  default: vue.withCtx(() => [
3607
- vue.createElementVNode("div", _hoisted_3$5, [
3616
+ vue.createElementVNode("div", _hoisted_2$3, [
3608
3617
  vue.createElementVNode("div", null, [
3609
3618
  vue.createVNode(vue.unref(elementPlus.ElRadio), {
3610
3619
  modelValue: data.params.radio,
3611
3620
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => data.params.radio = $event),
3612
3621
  label: Radio_Type.MY_ARITICLE
3613
3622
  }, {
3614
- default: vue.withCtx(() => [
3615
- _hoisted_4$4
3616
- ]),
3623
+ default: vue.withCtx(() => [..._cache[9] || (_cache[9] = [
3624
+ vue.createTextVNode("从我的文章中选择", -1)
3625
+ ])]),
3617
3626
  _: 1
3618
3627
  }, 8, ["modelValue", "label"]),
3619
3628
  vue.createVNode(vue.unref(elementPlus.ElRadio), {
@@ -3621,9 +3630,9 @@
3621
3630
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data.params.radio = $event),
3622
3631
  label: Radio_Type.MY_VIDEO
3623
3632
  }, {
3624
- default: vue.withCtx(() => [
3625
- _hoisted_5$3
3626
- ]),
3633
+ default: vue.withCtx(() => [..._cache[10] || (_cache[10] = [
3634
+ vue.createTextVNode("从我的视频中选择", -1)
3635
+ ])]),
3627
3636
  _: 1
3628
3637
  }, 8, ["modelValue", "label"]),
3629
3638
  vue.createVNode(vue.unref(elementPlus.ElRadio), {
@@ -3631,17 +3640,17 @@
3631
3640
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => data.params.radio = $event),
3632
3641
  label: Radio_Type.ALL_ARITICLE
3633
3642
  }, {
3634
- default: vue.withCtx(() => [
3635
- _hoisted_6$1
3636
- ]),
3643
+ default: vue.withCtx(() => [..._cache[11] || (_cache[11] = [
3644
+ vue.createTextVNode("从所有文章中选择", -1)
3645
+ ])]),
3637
3646
  _: 1
3638
3647
  }, 8, ["modelValue", "label"])
3639
3648
  ]),
3640
- vue.createElementVNode("div", _hoisted_7$1, [
3649
+ vue.createElementVNode("div", _hoisted_3$3, [
3641
3650
  vue.createVNode(vue.unref(elementPlus.ElInput), {
3642
3651
  modelValue: data.params.title,
3643
3652
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => data.params.title = $event),
3644
- placeholder: vue.unref(isVideo) ? "\u8F93\u5165\u89C6\u9891\u63CF\u8FF0\u67E5\u627E\u5E73\u53F0\u53D1\u5E03\u8FC7\u7684\u89C6\u9891" : "\u8F93\u5165\u6807\u9898\u540D\u67E5\u627E\u5E73\u53F0\u53D1\u8FC7\u7684\u6587\u7AE0",
3653
+ placeholder: isVideo.value ? "输入视频描述查找平台发布过的视频" : "输入标题名查找平台发过的文章",
3645
3654
  onKeyup: _cache[5] || (_cache[5] = vue.withKeys(($event) => vue.unref(getArticleList)(true), ["enter", "native"])),
3646
3655
  onInput: _cache[6] || (_cache[6] = ($event) => vue.unref(getArticleList)(true))
3647
3656
  }, {
@@ -3655,11 +3664,11 @@
3655
3664
  _: 1
3656
3665
  }, 8, ["modelValue", "placeholder"])
3657
3666
  ]),
3658
- data.data.length === 0 && !data.busy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1, vue.toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${vue.unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${vue.unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
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", {
3659
3668
  key: 1,
3660
3669
  "infinite-scroll-immediate": false,
3661
3670
  class: "insert-article_list",
3662
- "infinite-scroll-disabled": vue.unref(disable)
3671
+ "infinite-scroll-disabled": disable.value
3663
3672
  }, [
3664
3673
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(data.data, (item, index) => {
3665
3674
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -3675,24 +3684,24 @@
3675
3684
  default: vue.withCtx(() => {
3676
3685
  var _a;
3677
3686
  return [
3678
- vue.unref(isVideo) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$1, [
3679
- vue.createElementVNode("div", _hoisted_11$1, [
3687
+ isVideo.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
3688
+ vue.createElementVNode("div", _hoisted_7$1, [
3680
3689
  vue.createElementVNode("img", {
3681
3690
  class: "video-pic",
3682
3691
  src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
3683
- }, null, 8, _hoisted_12$1),
3692
+ }, null, 8, _hoisted_8$1),
3684
3693
  vue.createElementVNode("img", {
3685
3694
  class: "play",
3686
3695
  src: getImageUrl("play.png")
3687
- }, null, 8, _hoisted_13$1)
3696
+ }, null, 8, _hoisted_9$1)
3688
3697
  ]),
3689
- vue.createElementVNode("div", _hoisted_14$1, [
3690
- vue.createElementVNode("span", _hoisted_15$1, vue.toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
3691
- vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
3698
+ 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)
3692
3701
  ])
3693
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, [
3694
- vue.createElementVNode("span", null, vue.toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
3695
- vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
3702
+ ])) : (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)
3696
3705
  ]))
3697
3706
  ];
3698
3707
  }),
@@ -3700,7 +3709,7 @@
3700
3709
  }, 1032, ["modelValue", "label", "onChange"])
3701
3710
  ]);
3702
3711
  }), 128))
3703
- ], 8, _hoisted_9$1)), [
3712
+ ], 8, _hoisted_5$2)), [
3704
3713
  [vue.unref(vInfiniteScroll), vue.unref(getArticleList)]
3705
3714
  ])
3706
3715
  ])
@@ -3710,6 +3719,7 @@
3710
3719
  };
3711
3720
  }
3712
3721
  });
3722
+ const index_vue_vue_type_style_index_0_lang$4 = "";
3713
3723
  let getRandomValues;
3714
3724
  const rnds8 = new Uint8Array(16);
3715
3725
  function rng() {
@@ -3726,7 +3736,7 @@
3726
3736
  byteToHex.push((i + 256).toString(16).slice(1));
3727
3737
  }
3728
3738
  function unsafeStringify(arr, offset = 0) {
3729
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
3739
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
3730
3740
  }
3731
3741
  const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
3732
3742
  const native = {
@@ -3749,15 +3759,14 @@
3749
3759
  }
3750
3760
  return unsafeStringify(rnds);
3751
3761
  }
3752
- const index_vue_vue_type_style_index_0_lang$3 = "";
3753
3762
  const _hoisted_1$5 = { class: "img-upload-content" };
3754
- const _hoisted_2$4 = { class: "title-box" };
3755
- const _hoisted_3$4 = ["onClick"];
3756
- const _hoisted_4$3 = {
3763
+ const _hoisted_2$2 = { class: "title-box" };
3764
+ const _hoisted_3$2 = ["onClick"];
3765
+ const _hoisted_4$1 = {
3757
3766
  key: 0,
3758
3767
  class: "line"
3759
3768
  };
3760
- const _hoisted_5$2 = {
3769
+ const _hoisted_5$1 = {
3761
3770
  key: 0,
3762
3771
  class: "prompt-restriction"
3763
3772
  };
@@ -3781,45 +3790,39 @@
3781
3790
  key: 0,
3782
3791
  class: "upload-wrap"
3783
3792
  };
3784
- const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
3785
- 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);
3786
- const _hoisted_16 = {
3793
+ const _hoisted_14 = {
3787
3794
  key: 1,
3788
3795
  class: "img-list"
3789
3796
  };
3790
- const _hoisted_17 = ["src"];
3791
- const _hoisted_18 = { class: "upload-btn" };
3792
- const _hoisted_19 = {
3797
+ const _hoisted_15 = ["src"];
3798
+ const _hoisted_16 = { class: "upload-btn" };
3799
+ const _hoisted_17 = {
3793
3800
  key: 2,
3794
3801
  class: "map-depot"
3795
3802
  };
3796
- const _hoisted_20 = { class: "screen" };
3797
- const _hoisted_21 = /* @__PURE__ */ vue.createTextVNode("\u641C\u7D22");
3798
- const _hoisted_22 = { key: 0 };
3799
- const _hoisted_23 = { class: "tab-box" };
3800
- const _hoisted_24 = ["onClick"];
3801
- const _hoisted_25 = {
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 = {
3802
3808
  key: 0,
3803
3809
  class: "line"
3804
3810
  };
3805
- const _hoisted_26 = { class: "image-list depot-image" };
3806
- const _hoisted_27 = ["onClick"];
3807
- const _hoisted_28 = ["src"];
3808
- const _hoisted_29 = {
3811
+ const _hoisted_23 = { class: "image-list depot-image" };
3812
+ const _hoisted_24 = ["onClick"];
3813
+ const _hoisted_25 = ["src"];
3814
+ const _hoisted_26 = {
3809
3815
  key: 0,
3810
3816
  class: "shade"
3811
3817
  };
3812
- const _hoisted_30 = { class: "num" };
3813
- const _hoisted_31 = {
3818
+ const _hoisted_27 = { class: "num" };
3819
+ const _hoisted_28 = {
3814
3820
  key: 1,
3815
3821
  class: "protocol-box"
3816
3822
  };
3817
- const _hoisted_32 = /* @__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);
3818
- const _hoisted_33 = /* @__PURE__ */ vue.createTextVNode(" \u8BF7\u9605\u8BFB");
3819
- const _hoisted_34 = ["href"];
3820
- const _hoisted_35 = /* @__PURE__ */ vue.createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ");
3823
+ const _hoisted_29 = ["href"];
3821
3824
  const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
3822
- name: "index",
3825
+ __name: "index",
3823
3826
  props: {
3824
3827
  visible: { type: Boolean, default: false },
3825
3828
  imgList: { default: [] },
@@ -3828,7 +3831,8 @@
3828
3831
  imgNum: { default: 20 }
3829
3832
  },
3830
3833
  emits: ["update:imgList", "update:visible", "submit"],
3831
- setup(__props, { emit: emits }) {
3834
+ setup(__props, { emit: __emit }) {
3835
+ const emits = __emit;
3832
3836
  const props = __props;
3833
3837
  const drag = vue.ref(false);
3834
3838
  const imgListTemp = vue.computed({
@@ -3852,7 +3856,7 @@
3852
3856
  const tempImgs = [...props.imgList];
3853
3857
  Array.from(imgFile).forEach((file) => {
3854
3858
  if (file.size > 20 * 1024 * 1024) {
3855
- elementPlus.ElMessage.error("\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120M");
3859
+ elementPlus.ElMessage.error("单张图片最大支持20M");
3856
3860
  return;
3857
3861
  }
3858
3862
  const id = v4();
@@ -3882,14 +3886,14 @@
3882
3886
  const list = [
3883
3887
  {
3884
3888
  id: 2,
3885
- value: "\u4E0A\u4F20\u56FE\u7247"
3889
+ value: "上传图片"
3886
3890
  }
3887
3891
  ];
3888
3892
  activeTitle.value = 2;
3889
3893
  if (props.imgNum < 20) {
3890
3894
  list.unshift({
3891
3895
  id: 1,
3892
- value: "\u6B63\u6587\u56FE\u7247"
3896
+ value: "正文图片"
3893
3897
  });
3894
3898
  activeTitle.value = 1;
3895
3899
  getContentImgList();
@@ -3897,7 +3901,7 @@
3897
3901
  if (props.chartGallery) {
3898
3902
  list.push({
3899
3903
  id: 3,
3900
- value: isEmotofine ? "\u7535\u6469\u8303\u56FE\u5E93" : "\u6469\u6258\u8303\u56FE\u5E93"
3904
+ value: isEmotofine ? "电摩范图库" : "摩托范图库"
3901
3905
  });
3902
3906
  }
3903
3907
  titleList.value = list;
@@ -4042,13 +4046,13 @@
4042
4046
  const tabList = vue.ref([]);
4043
4047
  const search = () => {
4044
4048
  if (!selectData.brandId) {
4045
- return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u54C1\u724C");
4049
+ return elementPlus.ElMessage.error("请选择品牌");
4046
4050
  }
4047
4051
  if (!selectData.goodId) {
4048
- return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u8F66\u578B");
4052
+ return elementPlus.ElMessage.error("请选择车型");
4049
4053
  }
4050
4054
  if (!selectData.carId) {
4051
- return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u6B3E\u578B");
4055
+ return elementPlus.ElMessage.error("请选择款型");
4052
4056
  }
4053
4057
  tabList.value = [];
4054
4058
  emits("update:imgList", []);
@@ -4105,7 +4109,7 @@
4105
4109
  }, {
4106
4110
  default: vue.withCtx(() => [
4107
4111
  vue.createElementVNode("div", _hoisted_1$5, [
4108
- vue.createElementVNode("div", _hoisted_2$4, [
4112
+ vue.createElementVNode("div", _hoisted_2$2, [
4109
4113
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(titleList.value, (item, index) => {
4110
4114
  return vue.openBlock(), vue.createElementBlock("div", {
4111
4115
  key: index,
@@ -4113,15 +4117,15 @@
4113
4117
  onClick: ($event) => changeTab(item)
4114
4118
  }, [
4115
4119
  vue.createTextVNode(vue.toDisplayString(item.value) + " ", 1),
4116
- item.id === activeTitle.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3)) : vue.createCommentVNode("", true)
4117
- ], 10, _hoisted_3$4);
4120
+ item.id === activeTitle.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1)) : vue.createCommentVNode("", true)
4121
+ ], 10, _hoisted_3$2);
4118
4122
  }), 128)),
4119
- [1, 3].includes(activeTitle.value) && props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, " \u6700\u591A\u53EF\u9009" + vue.toDisplayString(props.imgNum) + "\u5F20\u56FE\u7247\uFF0C\u5DF2\u9009" + vue.toDisplayString(props.imgList.length) + "\u5F20 ", 1)) : vue.createCommentVNode("", true),
4120
- 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)
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)
4121
4125
  ]),
4122
4126
  activeTitle.value === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
4123
4127
  vue.createElementVNode("div", _hoisted_8, [
4124
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(contentImgList), (item, index) => {
4128
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(contentImgList.value, (item, index) => {
4125
4129
  return vue.openBlock(), vue.createElementBlock("div", {
4126
4130
  key: index,
4127
4131
  class: "image-item",
@@ -4154,13 +4158,13 @@
4154
4158
  ]),
4155
4159
  _: 1
4156
4160
  }),
4157
- _hoisted_14
4161
+ _cache[7] || (_cache[7] = vue.createElementVNode("span", null, "本地上传", -1))
4158
4162
  ]),
4159
- _hoisted_15
4160
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
4161
- vue.createVNode(vue.unref(draggable__default.default), {
4162
- modelValue: vue.unref(imgListTemp),
4163
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(imgListTemp) ? imgListTemp.value = $event : null),
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), {
4166
+ modelValue: imgListTemp.value,
4167
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => imgListTemp.value = $event),
4164
4168
  handle: ".img-item",
4165
4169
  class: "img-wrap",
4166
4170
  group: "people",
@@ -4178,7 +4182,7 @@
4178
4182
  style: { "object-fit": "contain" },
4179
4183
  width: "120",
4180
4184
  height: "120"
4181
- }, null, 8, _hoisted_17),
4185
+ }, null, 8, _hoisted_15),
4182
4186
  vue.createVNode(vue.unref(iconsVue.CircleCloseFilled), {
4183
4187
  class: "icon pointer",
4184
4188
  onClick: ($event) => deleteImg(element)
@@ -4201,7 +4205,7 @@
4201
4205
  _: 1
4202
4206
  }, 8, ["modelValue"])
4203
4207
  ])),
4204
- vue.createElementVNode("div", _hoisted_18, [
4208
+ vue.createElementVNode("div", _hoisted_16, [
4205
4209
  vue.createElementVNode("input", {
4206
4210
  type: "file",
4207
4211
  name: "file",
@@ -4212,13 +4216,13 @@
4212
4216
  }, null, 32)
4213
4217
  ])
4214
4218
  ], 2)) : vue.createCommentVNode("", true),
4215
- activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
4216
- vue.createElementVNode("div", _hoisted_20, [
4219
+ activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
4220
+ vue.createElementVNode("div", _hoisted_18, [
4217
4221
  vue.createElementVNode("div", null, [
4218
4222
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
4219
4223
  modelValue: selectData.brandId,
4220
4224
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
4221
- placeholder: "\u8BF7\u9009\u62E9\u54C1\u724C",
4225
+ placeholder: "请选择品牌",
4222
4226
  size: "large",
4223
4227
  class: "select_1",
4224
4228
  filterable: "",
@@ -4239,7 +4243,7 @@
4239
4243
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
4240
4244
  modelValue: selectData.goodId,
4241
4245
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
4242
- placeholder: "\u8BF7\u9009\u62E9\u8F66\u578B",
4246
+ placeholder: "请选择车型",
4243
4247
  size: "large",
4244
4248
  class: "select_1",
4245
4249
  filterable: "",
@@ -4260,7 +4264,7 @@
4260
4264
  vue.createVNode(vue.unref(elementPlus.ElSelect), {
4261
4265
  modelValue: selectData.carId,
4262
4266
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
4263
- placeholder: "\u8BF7\u9009\u62E9\u6B3E\u578B",
4267
+ placeholder: "请选择款型",
4264
4268
  size: "large",
4265
4269
  class: "select_2",
4266
4270
  filterable: "",
@@ -4284,14 +4288,14 @@
4284
4288
  style: { "width": "80px" },
4285
4289
  onClick: search
4286
4290
  }, {
4287
- default: vue.withCtx(() => [
4288
- _hoisted_21
4289
- ]),
4291
+ default: vue.withCtx(() => [..._cache[9] || (_cache[9] = [
4292
+ vue.createTextVNode("搜索", -1)
4293
+ ])]),
4290
4294
  _: 1
4291
4295
  })
4292
4296
  ]),
4293
- tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
4294
- vue.createElementVNode("div", _hoisted_23, [
4297
+ tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
4298
+ vue.createElementVNode("div", _hoisted_20, [
4295
4299
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabList.value, (item, index) => {
4296
4300
  return vue.openBlock(), vue.createElementBlock("div", {
4297
4301
  key: index,
@@ -4299,12 +4303,12 @@
4299
4303
  onClick: ($event) => activeTab.value = item.type
4300
4304
  }, [
4301
4305
  vue.createTextVNode(vue.toDisplayString(item.name) + " ", 1),
4302
- item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25)) : vue.createCommentVNode("", true)
4303
- ], 10, _hoisted_24);
4306
+ item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22)) : vue.createCommentVNode("", true)
4307
+ ], 10, _hoisted_21);
4304
4308
  }), 128))
4305
4309
  ]),
4306
- vue.createElementVNode("div", _hoisted_26, [
4307
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(imageList), (item, index) => {
4310
+ vue.createElementVNode("div", _hoisted_23, [
4311
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(imageList.value, (item, index) => {
4308
4312
  return vue.openBlock(), vue.createElementBlock("div", {
4309
4313
  key: index,
4310
4314
  class: "image-item",
@@ -4314,25 +4318,25 @@
4314
4318
  src: item.imgOrgUrl,
4315
4319
  alt: "",
4316
4320
  class: "image"
4317
- }, null, 8, _hoisted_28),
4318
- item.num ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [
4319
- vue.createElementVNode("div", _hoisted_30, vue.toDisplayString(item.num), 1)
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)
4320
4324
  ])) : vue.createCommentVNode("", true)
4321
- ], 8, _hoisted_27);
4325
+ ], 8, _hoisted_24);
4322
4326
  }), 128))
4323
4327
  ])
4324
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_31, [
4328
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
4325
4329
  vue.createElementVNode("div", null, [
4326
- _hoisted_32,
4330
+ _cache[12] || (_cache[12] = vue.createElementVNode("div", null, " 图库中的图片仅限下载摩托范以编辑发布文章使用,不得用于其他任何平台及用途 ", -1)),
4327
4331
  vue.createElementVNode("div", null, [
4328
- _hoisted_33,
4332
+ _cache[10] || (_cache[10] = vue.createTextVNode(" 请阅读", -1)),
4329
4333
  vue.createElementVNode("a", {
4330
4334
  href: `https://${vue.unref(hostName)}/about?type=imageLicenseAgreement`,
4331
4335
  target: "_blank",
4332
4336
  rel: "noopener noreferrer",
4333
4337
  class: "link"
4334
- }, "\u300A\u6469\u6258\u8303\u56FE\u7247\u8BB8\u53EF\u4F7F\u7528\u534F\u8BAE\u300B", 8, _hoisted_34),
4335
- _hoisted_35
4338
+ }, "《摩托范图片许可使用协议》", 8, _hoisted_29),
4339
+ _cache[11] || (_cache[11] = vue.createTextVNode(",您的行为视为您已同意该协议。 ", -1))
4336
4340
  ])
4337
4341
  ])
4338
4342
  ]))
@@ -4344,25 +4348,23 @@
4344
4348
  };
4345
4349
  }
4346
4350
  });
4347
- const index_vue_vue_type_style_index_0_lang$2 = "";
4348
- const _hoisted_1$4 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u63D2\u5165\u89C6\u9891", -1);
4349
- const _hoisted_2$3 = { class: "insert-video" };
4350
- const _hoisted_3$3 = /* @__PURE__ */ vue.createTextVNode("\u9009\u62E9\u89C6\u9891");
4351
- const _hoisted_4$2 = /* @__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);
4351
+ const index_vue_vue_type_style_index_0_lang$3 = "";
4352
+ const _hoisted_1$4 = { class: "insert-video" };
4352
4353
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
4353
- name: "index",
4354
+ __name: "index",
4354
4355
  props: {
4355
4356
  visible: { type: Boolean, default: false },
4356
- fileSelected: null
4357
+ fileSelected: {}
4357
4358
  },
4358
4359
  emits: ["update:visible"],
4359
- setup(__props, { emit: emits }) {
4360
- const props = __props;
4360
+ setup(__props, { emit: __emit }) {
4361
+ const emits = __emit;
4361
4362
  vue.provide("vm", {
4362
4363
  setStatus(val) {
4363
4364
  emits("update:visible", val);
4364
4365
  }
4365
4366
  });
4367
+ const props = __props;
4366
4368
  const { visible, fileSelected } = vue.toRefs(props);
4367
4369
  const emitEvent = () => {
4368
4370
  var event = new MouseEvent("click");
@@ -4376,23 +4378,23 @@
4376
4378
  width: "600px",
4377
4379
  height: "100px"
4378
4380
  }, {
4379
- title: vue.withCtx(() => [
4380
- _hoisted_1$4
4381
- ]),
4381
+ title: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
4382
+ vue.createElementVNode("span", null, "插入视频", -1)
4383
+ ])]),
4382
4384
  default: vue.withCtx(() => [
4383
- vue.createElementVNode("div", _hoisted_2$3, [
4385
+ vue.createElementVNode("div", _hoisted_1$4, [
4384
4386
  vue.createVNode(vue.unref(elementPlus.ElButton), {
4385
4387
  style: { "width": "120px" },
4386
4388
  round: "",
4387
4389
  type: "primary",
4388
4390
  onClick: emitEvent
4389
4391
  }, {
4390
- default: vue.withCtx(() => [
4391
- _hoisted_3$3
4392
- ]),
4392
+ default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
4393
+ vue.createTextVNode("选择视频", -1)
4394
+ ])]),
4393
4395
  _: 1
4394
4396
  }),
4395
- _hoisted_4$2,
4397
+ _cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "remark" }, "为了获得更高的推荐量和点击量,建议上传720p(1280*720)或更高分辨率的视频,视频格式为.mp4或.mov,大小不超过1G", -1)),
4396
4398
  vue.createElementVNode("input", {
4397
4399
  type: "file",
4398
4400
  accept: "video/*",
@@ -4407,14 +4409,17 @@
4407
4409
  };
4408
4410
  }
4409
4411
  });
4412
+ const index_vue_vue_type_style_index_0_lang$2 = "";
4410
4413
  const index_vue_vue_type_style_index_0_lang$1 = "";
4411
4414
  const _sfc_main$3 = {
4412
4415
  name: "TopicManager",
4413
4416
  props: {
4417
+ // 编辑器DOM引用
4414
4418
  editorDom: {
4415
4419
  type: Object,
4416
4420
  default: null
4417
4421
  },
4422
+ // 话题API请求方法
4418
4423
  request: {
4419
4424
  type: Object,
4420
4425
  default: null
@@ -4422,10 +4427,13 @@
4422
4427
  },
4423
4428
  data() {
4424
4429
  return {
4430
+ // 话题弹框相关数据
4425
4431
  topicPopover: {
4426
4432
  visible: false,
4427
4433
  type: "hot",
4434
+ // 'hot' 热门话题, 'search' 搜索话题
4428
4435
  activeTab: "hot",
4436
+ // 'hot' 热门话题, 'recent' 最近使用
4429
4437
  position: { top: 0, left: 0 },
4430
4438
  searchKeyword: "",
4431
4439
  hotTopics: [],
@@ -4436,22 +4444,30 @@
4436
4444
  hasMore: true,
4437
4445
  searchPage: 1,
4438
4446
  searchHasMore: true,
4447
+ // 用于增量更新的计数器
4439
4448
  newHotTopicsCount: 0,
4440
4449
  newSearchTopicsCount: 0,
4450
+ // 保存原始的selection和range信息
4441
4451
  originalRange: null,
4442
4452
  originalSelection: null,
4453
+ // 保存触发位置信息
4443
4454
  triggerInfo: {
4444
4455
  paragraph: null,
4445
4456
  hashIndex: -1,
4446
4457
  cursorPosition: 0
4447
4458
  },
4459
+ // 全局弹框DOM引用
4448
4460
  globalContainer: null,
4449
4461
  globalMask: null
4450
4462
  },
4451
- isComposing: false
4463
+ // 中文输入法状态
4464
+ isComposing: false,
4465
+ // 保存的光标位置(外部调用insertHotTopic时使用)
4466
+ savedRange: null
4452
4467
  };
4453
4468
  },
4454
4469
  methods: {
4470
+ // 初始化话题管理器
4455
4471
  init() {
4456
4472
  if (!this.editorDom) {
4457
4473
  console.warn("TopicManager: editorDom is required");
@@ -4459,6 +4475,7 @@
4459
4475
  }
4460
4476
  setTimeout(() => this.bindEditorEvents(), 0);
4461
4477
  },
4478
+ // 绑定编辑器事件
4462
4479
  bindEditorEvents() {
4463
4480
  if (!this.editorDom)
4464
4481
  return;
@@ -4466,7 +4483,9 @@
4466
4483
  this.editorDom.addEventListener("compositionstart", this.handleCompositionStart.bind(this));
4467
4484
  this.editorDom.addEventListener("compositionend", this.handleCompositionEnd.bind(this));
4468
4485
  this.editorDom.addEventListener("input", this.handleInput.bind(this));
4486
+ document.addEventListener("mousedown", this.handleExternalMouseDown.bind(this));
4469
4487
  },
4488
+ // 解绑编辑器事件
4470
4489
  unbindEditorEvents() {
4471
4490
  if (!this.editorDom)
4472
4491
  return;
@@ -4474,16 +4493,34 @@
4474
4493
  this.editorDom.removeEventListener("compositionstart", this.handleCompositionStart.bind(this));
4475
4494
  this.editorDom.removeEventListener("compositionend", this.handleCompositionEnd.bind(this));
4476
4495
  this.editorDom.removeEventListener("input", this.handleInput.bind(this));
4496
+ document.removeEventListener("mousedown", this.handleExternalMouseDown.bind(this));
4497
+ },
4498
+ // 处理外部鼠标按下事件,保存编辑器光标位置
4499
+ handleExternalMouseDown(event) {
4500
+ console.log(929);
4501
+ const hotTopicBtn = event.target.closest(".add-hot-topic");
4502
+ if (hotTopicBtn) {
4503
+ const selection = window.getSelection();
4504
+ if (selection.rangeCount > 0) {
4505
+ const range = selection.getRangeAt(0);
4506
+ if (this.editorDom.contains(range.startContainer)) {
4507
+ this.savedRange = range.cloneRange();
4508
+ }
4509
+ }
4510
+ }
4477
4511
  },
4512
+ // 中文输入法开始事件
4478
4513
  handleCompositionStart() {
4479
4514
  this.isComposing = true;
4480
4515
  },
4516
+ // 中文输入法结束事件(中文)
4481
4517
  handleCompositionEnd() {
4482
4518
  this.isComposing = false;
4483
4519
  setTimeout(() => {
4484
4520
  this.handleInputChange();
4485
4521
  }, 10);
4486
4522
  },
4523
+ // input事件处理(英文)
4487
4524
  handleInput() {
4488
4525
  if (!this.isComposing) {
4489
4526
  setTimeout(() => {
@@ -4491,6 +4528,7 @@
4491
4528
  }, 10);
4492
4529
  }
4493
4530
  },
4531
+ // 处理输入变化
4494
4532
  handleInputChange() {
4495
4533
  var _a;
4496
4534
  const selection = window.getSelection();
@@ -4518,6 +4556,7 @@
4518
4556
  return;
4519
4557
  this.checkAndTriggerSearch(paragraph);
4520
4558
  },
4559
+ // 话题输入处理
4521
4560
  handleTopicInput(event) {
4522
4561
  var _a;
4523
4562
  const activeElement = document.activeElement;
@@ -4558,7 +4597,9 @@
4558
4597
  const triggerInfo = {
4559
4598
  paragraph,
4560
4599
  hashIndex: cursorPosition,
4600
+ // #号的位置
4561
4601
  cursorPosition: cursorPosition + 1
4602
+ // #号后的位置
4562
4603
  };
4563
4604
  this.showTopicPopover("hot", position, "", triggerInfo);
4564
4605
  }, 10);
@@ -4654,6 +4695,7 @@
4654
4695
  tempElement.remove();
4655
4696
  const position = {
4656
4697
  top: rect.bottom,
4698
+ // 弹框显示在光标下方
4657
4699
  left: rect.left
4658
4700
  };
4659
4701
  const viewportWidth = window.innerWidth;
@@ -4671,7 +4713,7 @@
4671
4713
  }
4672
4714
  return position;
4673
4715
  } catch (error) {
4674
- console.warn("\u83B7\u53D6\u5149\u6807\u4F4D\u7F6E\u5931\u8D25\uFF0C\u4F7F\u7528fallback\u65B9\u6CD5:", error);
4716
+ console.warn("获取光标位置失败,使用fallback方法:", error);
4675
4717
  const rect = range.getBoundingClientRect();
4676
4718
  return {
4677
4719
  top: rect.bottom,
@@ -4679,9 +4721,10 @@
4679
4721
  };
4680
4722
  }
4681
4723
  },
4724
+ // 话题弹框相关方法
4682
4725
  showTopicPopover(type, position, searchKeyword = "", triggerInfo = null) {
4683
4726
  if (!this.request || !this.request.getTopic) {
4684
- console.warn("\u8BDD\u9898\u529F\u80FD\u9700\u8981\u63D0\u4F9B request.getTopic \u65B9\u6CD5");
4727
+ console.warn("话题功能需要提供 request.getTopic 方法");
4685
4728
  return;
4686
4729
  }
4687
4730
  const selection = window.getSelection();
@@ -4754,11 +4797,11 @@
4754
4797
  }
4755
4798
  }
4756
4799
  } else {
4757
- console.warn("\u52A0\u8F7D\u70ED\u95E8\u8BDD\u9898\u5931\u8D25:", response);
4800
+ console.warn("加载热门话题失败:", response);
4758
4801
  this.topicPopover.hasMore = false;
4759
4802
  }
4760
4803
  } catch (error) {
4761
- console.error("\u52A0\u8F7D\u70ED\u95E8\u8BDD\u9898\u5931\u8D25:", error);
4804
+ console.error("加载热门话题失败:", error);
4762
4805
  this.topicPopover.hasMore = false;
4763
4806
  } finally {
4764
4807
  this.topicPopover.loading = false;
@@ -4792,17 +4835,18 @@
4792
4835
  this.topicPopover.searchHasMore = topics.length >= 50;
4793
4836
  }
4794
4837
  } else {
4795
- console.warn("\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", response);
4838
+ console.warn("搜索话题失败:", response);
4796
4839
  this.topicPopover.searchHasMore = false;
4797
4840
  }
4798
4841
  } catch (error) {
4799
- console.error("\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", error);
4842
+ console.error("搜索话题失败:", error);
4800
4843
  this.topicPopover.searchHasMore = false;
4801
4844
  } finally {
4802
4845
  this.topicPopover.loading = false;
4803
4846
  this.updateGlobalTopicPopover();
4804
4847
  }
4805
4848
  },
4849
+ // 加载更多搜索话题
4806
4850
  async loadSearchTopics() {
4807
4851
  if (this.topicPopover.loading || !this.topicPopover.searchHasMore)
4808
4852
  return;
@@ -4830,11 +4874,11 @@
4830
4874
  }
4831
4875
  }
4832
4876
  } else {
4833
- console.warn("\u52A0\u8F7D\u66F4\u591A\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", response);
4877
+ console.warn("加载更多搜索话题失败:", response);
4834
4878
  this.topicPopover.searchHasMore = false;
4835
4879
  }
4836
4880
  } catch (error) {
4837
- console.error("\u52A0\u8F7D\u66F4\u591A\u641C\u7D22\u8BDD\u9898\u5931\u8D25:", error);
4881
+ console.error("加载更多搜索话题失败:", error);
4838
4882
  this.topicPopover.searchHasMore = false;
4839
4883
  } finally {
4840
4884
  this.topicPopover.loading = false;
@@ -4846,7 +4890,7 @@
4846
4890
  const localTopics = JSON.parse(localStorage.getItem("localTopic") || "[]");
4847
4891
  this.topicPopover.recentTopics = localTopics;
4848
4892
  } catch (error) {
4849
- console.error("\u52A0\u8F7D\u6700\u8FD1\u4F7F\u7528\u8BDD\u9898\u5931\u8D25:", error);
4893
+ console.error("加载最近使用话题失败:", error);
4850
4894
  this.topicPopover.recentTopics = [];
4851
4895
  }
4852
4896
  },
@@ -4866,9 +4910,10 @@
4866
4910
  }
4867
4911
  localStorage.setItem("localTopic", JSON.stringify(recentTopics));
4868
4912
  } catch (error) {
4869
- console.error("\u4FDD\u5B58\u6700\u8FD1\u4F7F\u7528\u8BDD\u9898\u5931\u8D25:", error);
4913
+ console.error("保存最近使用话题失败:", error);
4870
4914
  }
4871
4915
  },
4916
+ // 创建全局话题弹框
4872
4917
  createGlobalTopicPopover() {
4873
4918
  this.removeGlobalTopicPopover();
4874
4919
  const mask = document.createElement("div");
@@ -4892,6 +4937,7 @@
4892
4937
  this.topicPopover.globalContainer = container;
4893
4938
  this.bindTopicPopoverEvents();
4894
4939
  },
4940
+ // 移除全局话题弹框
4895
4941
  removeGlobalTopicPopover() {
4896
4942
  if (this.topicPopover.globalMask) {
4897
4943
  document.body.removeChild(this.topicPopover.globalMask);
@@ -4902,12 +4948,14 @@
4902
4948
  this.topicPopover.globalContainer = null;
4903
4949
  }
4904
4950
  },
4951
+ // 更新全局话题弹框内容
4905
4952
  updateGlobalTopicPopover() {
4906
4953
  if (!this.topicPopover.globalContainer)
4907
4954
  return;
4908
4955
  this.topicPopover.globalContainer.innerHTML = this.createTopicPopoverContent();
4909
4956
  this.bindTopicPopoverEvents();
4910
4957
  },
4958
+ // 增量添加热门话题到DOM,避免重绘
4911
4959
  appendHotTopicsToDOM() {
4912
4960
  if (!this.topicPopover.globalContainer || this.topicPopover.newHotTopicsCount === 0)
4913
4961
  return;
@@ -4922,7 +4970,8 @@
4922
4970
  topicElement.className = "topic-item";
4923
4971
  topicElement.setAttribute("data-topic-id", topic.id);
4924
4972
  topicElement.setAttribute("data-topic-type", topic.type);
4925
- topicElement.textContent = `#${topic.title}`;
4973
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
4974
+ topicElement.innerHTML = `<span>#${topic.title}</span>${viewHtml}</span>`;
4926
4975
  topicElement.addEventListener("click", () => {
4927
4976
  this.insertTopicToEditor(topic);
4928
4977
  });
@@ -4931,6 +4980,7 @@
4931
4980
  this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.hasMore);
4932
4981
  this.topicPopover.newHotTopicsCount = 0;
4933
4982
  },
4983
+ // 增量添加搜索话题到DOM,避免重绘
4934
4984
  appendSearchTopicsToDOM() {
4935
4985
  if (!this.topicPopover.globalContainer || this.topicPopover.newSearchTopicsCount === 0)
4936
4986
  return;
@@ -4954,6 +5004,7 @@
4954
5004
  this.updateLoadingState(topicList, this.topicPopover.loading, this.topicPopover.searchHasMore);
4955
5005
  this.topicPopover.newSearchTopicsCount = 0;
4956
5006
  },
5007
+ // 更新加载状态显示
4957
5008
  updateLoadingState(topicList, loading, hasMore) {
4958
5009
  const existingLoading = topicList.querySelector(".topic-loading");
4959
5010
  const existingEmpty = topicList.querySelector(".topic-empty");
@@ -4964,15 +5015,16 @@
4964
5015
  if (loading) {
4965
5016
  const loadingElement = document.createElement("div");
4966
5017
  loadingElement.className = "topic-loading";
4967
- loadingElement.textContent = "\u52A0\u8F7D\u66F4\u591A...";
5018
+ loadingElement.textContent = "加载更多...";
4968
5019
  topicList.appendChild(loadingElement);
4969
5020
  } else if (!hasMore) {
4970
5021
  const emptyElement = document.createElement("div");
4971
5022
  emptyElement.className = "topic-empty";
4972
- emptyElement.textContent = "\u6CA1\u6709\u66F4\u591A\u4E86";
5023
+ emptyElement.textContent = "没有更多了";
4973
5024
  topicList.appendChild(emptyElement);
4974
5025
  }
4975
5026
  },
5027
+ // 创建话题弹框内容
4976
5028
  createTopicPopoverContent() {
4977
5029
  if (this.topicPopover.type === "hot") {
4978
5030
  return this.getHotTopicPopoverHTML();
@@ -4981,6 +5033,7 @@
4981
5033
  }
4982
5034
  return "";
4983
5035
  },
5036
+ // 获取热门话题弹框HTML
4984
5037
  getHotTopicPopoverHTML() {
4985
5038
  const activeTab = this.topicPopover.activeTab;
4986
5039
  const hotTopics = this.topicPopover.hotTopics;
@@ -4990,25 +5043,26 @@
4990
5043
  let topicListHTML = "";
4991
5044
  if (activeTab === "hot") {
4992
5045
  if (loading && hotTopics.length === 0) {
4993
- topicListHTML = '<div class="topic-loading">\u52A0\u8F7D\u4E2D...</div>';
5046
+ topicListHTML = '<div class="topic-loading">加载中...</div>';
4994
5047
  } else if (hotTopics.length === 0) {
4995
- topicListHTML = '<div class="topic-empty">\u6682\u65E0\u70ED\u95E8\u8BDD\u9898</div>';
5048
+ topicListHTML = '<div class="topic-empty">暂无热门话题</div>';
4996
5049
  } else {
4997
- topicListHTML = hotTopics.map(
4998
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
4999
- ).join("");
5050
+ topicListHTML = hotTopics.map((topic) => {
5051
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
5052
+ return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
5053
+ }).join("");
5000
5054
  if (loading) {
5001
- topicListHTML += '<div class="topic-loading">\u52A0\u8F7D\u66F4\u591A...</div>';
5055
+ topicListHTML += '<div class="topic-loading">加载更多...</div>';
5002
5056
  } else if (!hasMore) {
5003
- topicListHTML += '<div class="topic-empty">\u6CA1\u6709\u66F4\u591A\u4E86</div>';
5057
+ topicListHTML += '<div class="topic-empty">没有更多了</div>';
5004
5058
  }
5005
5059
  }
5006
5060
  } else {
5007
5061
  if (recentTopics.length === 0) {
5008
- topicListHTML = '<div class="topic-empty">\u6682\u65E0\u6700\u8FD1\u4F7F\u7528\u8BB0\u5F55</div>';
5062
+ topicListHTML = '<div class="topic-empty">暂无最近使用记录</div>';
5009
5063
  } else {
5010
5064
  topicListHTML = recentTopics.map(
5011
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5065
+ (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span></div>`
5012
5066
  ).join("");
5013
5067
  }
5014
5068
  }
@@ -5016,10 +5070,10 @@
5016
5070
  <div class="topic-popover-content">
5017
5071
  <div class="topic-tabs">
5018
5072
  <div class="topic-tab ${activeTab === "hot" ? "active" : ""}" data-tab="hot">
5019
- \u70ED\u95E8\u8BDD\u9898
5073
+ 热门话题
5020
5074
  </div>
5021
5075
  <div class="topic-tab ${activeTab === "recent" ? "active" : ""}" data-tab="recent">
5022
- \u6700\u8FD1\u4F7F\u7528
5076
+ 最近使用
5023
5077
  </div>
5024
5078
  </div>
5025
5079
  <div class="topic-list-container">
@@ -5030,6 +5084,7 @@
5030
5084
  </div>
5031
5085
  `;
5032
5086
  },
5087
+ // 获取搜索话题弹框HTML
5033
5088
  getSearchTopicPopoverHTML() {
5034
5089
  const searchKeyword = this.topicPopover.searchKeyword;
5035
5090
  const searchTopics = this.topicPopover.searchTopics;
@@ -5037,17 +5092,20 @@
5037
5092
  const searchHasMore = this.topicPopover.searchHasMore;
5038
5093
  let topicListHTML = "";
5039
5094
  if (loading && searchTopics.length === 0) {
5040
- topicListHTML = '<div class="topic-loading">\u641C\u7D22\u4E2D...</div>';
5095
+ topicListHTML = '<div class="topic-loading">搜索中...</div>';
5041
5096
  } else if (searchTopics.length === 0) {
5042
- topicListHTML = '<div class="topic-empty">\u6CA1\u6709\u5339\u914D\u5230\u8BDD\u9898\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165</div>';
5097
+ topicListHTML = '<div class="topic-empty">没有匹配到话题,请重新输入</div>';
5043
5098
  } else {
5044
5099
  topicListHTML = searchTopics.map(
5045
- (topic) => `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}">#${topic.exactlyMatchTitle}</div>`
5100
+ (topic) => {
5101
+ const viewHtml = topic.view ? `<span>${topic.view}浏览</span>` : "";
5102
+ return `<div class="topic-item" data-topic-id="${topic.id}" data-topic-type="${topic.type}"><span>#${topic.exactlyMatchTitle}</span>${viewHtml}</div>`;
5103
+ }
5046
5104
  ).join("");
5047
5105
  if (loading) {
5048
- topicListHTML += '<div class="topic-loading">\u52A0\u8F7D\u66F4\u591A...</div>';
5106
+ topicListHTML += '<div class="topic-loading">加载更多...</div>';
5049
5107
  } else if (!searchHasMore) {
5050
- topicListHTML += '<div class="topic-empty">\u6CA1\u6709\u66F4\u591A\u4E86</div>';
5108
+ topicListHTML += '<div class="topic-empty">没有更多了</div>';
5051
5109
  }
5052
5110
  }
5053
5111
  return `
@@ -5063,6 +5121,7 @@
5063
5121
  </div>
5064
5122
  `;
5065
5123
  },
5124
+ // 绑定话题弹框事件
5066
5125
  bindTopicPopoverEvents() {
5067
5126
  if (!this.topicPopover.globalContainer)
5068
5127
  return;
@@ -5094,6 +5153,7 @@
5094
5153
  });
5095
5154
  }
5096
5155
  },
5156
+ // 根据ID查找话题
5097
5157
  findTopicById(topicId) {
5098
5158
  let topic = this.topicPopover.hotTopics.find((t) => t.id === topicId);
5099
5159
  if (topic)
@@ -5212,13 +5272,15 @@
5212
5272
  topicId: topic.id,
5213
5273
  topicType: topic.type || 0,
5214
5274
  startIndex: 0,
5275
+ // 会在updateTopicPosition中更新
5215
5276
  endIndex: 0
5277
+ // 会在updateTopicPosition中更新
5216
5278
  }));
5217
5279
  topicElement.textContent = topicText;
5218
5280
  topicElement.setAttribute("contenteditable", "false");
5219
5281
  range.deleteContents();
5220
5282
  range.insertNode(topicElement);
5221
- const spaceNode = document.createTextNode("\xA0");
5283
+ const spaceNode = document.createTextNode(" ");
5222
5284
  range.setStartAfter(topicElement);
5223
5285
  range.insertNode(spaceNode);
5224
5286
  const newRange = document.createRange();
@@ -5242,6 +5304,83 @@
5242
5304
  }, 0);
5243
5305
  this.$emit("update-topic-position");
5244
5306
  },
5307
+ moveCursor(spaceNode) {
5308
+ setTimeout(() => {
5309
+ const currentSelection = window.getSelection();
5310
+ if (currentSelection.rangeCount > 0) {
5311
+ const currentRange = currentSelection.getRangeAt(0);
5312
+ if (currentRange.startContainer !== spaceNode.nextSibling) {
5313
+ const correctRange = document.createRange();
5314
+ correctRange.setStartAfter(spaceNode);
5315
+ correctRange.collapse(true);
5316
+ currentSelection.removeAllRanges();
5317
+ currentSelection.addRange(correctRange);
5318
+ }
5319
+ }
5320
+ }, 0);
5321
+ },
5322
+ // 供外部项目调用:插入热门话题
5323
+ // 组件内部会自动监听外部点击并保存光标位置
5324
+ // topic: { id, type, title, exactlyMatchTitle }
5325
+ insertHotTopic(topic) {
5326
+ if (!this.editorDom) {
5327
+ console.warn("TopicManager: editorDom is required");
5328
+ return;
5329
+ }
5330
+ if (!topic || !topic.id) {
5331
+ console.warn("TopicManager: topic is required");
5332
+ return;
5333
+ }
5334
+ const topicText = topic.exactlyMatchTitle ? `#${topic.exactlyMatchTitle}` : `#${topic.title || topic.name || ""}`;
5335
+ const editorContent = this.editorDom.querySelector(".editor-content") || this.editorDom.querySelector(".editor") || this.editorDom;
5336
+ let range = this.savedRange;
5337
+ const selection = window.getSelection();
5338
+ this.savedRange = null;
5339
+ const topicElement = document.createElement("mdd-topic");
5340
+ topicElement.setAttribute("data-topic", JSON.stringify({
5341
+ topicId: topic.id,
5342
+ topicType: topic.type || 0,
5343
+ startIndex: 0,
5344
+ endIndex: 0
5345
+ }));
5346
+ topicElement.textContent = topicText;
5347
+ topicElement.setAttribute("contenteditable", "false");
5348
+ if (range) {
5349
+ range.deleteContents();
5350
+ range.insertNode(topicElement);
5351
+ const spaceNode = document.createTextNode(" ");
5352
+ range.setStartAfter(topicElement);
5353
+ range.insertNode(spaceNode);
5354
+ const newRange = document.createRange();
5355
+ newRange.setStartAfter(spaceNode);
5356
+ newRange.collapse(true);
5357
+ selection.removeAllRanges();
5358
+ selection.addRange(newRange);
5359
+ this.moveCursor(spaceNode);
5360
+ } else {
5361
+ let lastParagraph = editorContent.lastElementChild;
5362
+ if (!lastParagraph || lastParagraph.nodeName !== "P" && !lastParagraph.classList.contains("halo-paragraph") && !lastParagraph.classList.contains("halo-paragraph-title")) {
5363
+ lastParagraph = document.createElement("p");
5364
+ lastParagraph.className = "halo-paragraph";
5365
+ editorContent.appendChild(lastParagraph);
5366
+ }
5367
+ if (lastParagraph) {
5368
+ lastParagraph.appendChild(topicElement);
5369
+ const spaceNode = document.createTextNode(" ");
5370
+ lastParagraph.appendChild(spaceNode);
5371
+ const newRange = document.createRange();
5372
+ newRange.setStartAfter(spaceNode);
5373
+ newRange.collapse(true);
5374
+ selection.removeAllRanges();
5375
+ selection.addRange(newRange);
5376
+ this.moveCursor(spaceNode);
5377
+ } else {
5378
+ editorContent.appendChild(topicElement);
5379
+ }
5380
+ }
5381
+ this.$emit("update-topic-position");
5382
+ },
5383
+ // 销毁话题管理器
5245
5384
  destroy() {
5246
5385
  this.unbindEditorEvents();
5247
5386
  this.hideTopicPopover();
@@ -5269,7 +5408,7 @@
5269
5408
  components: {
5270
5409
  ElInput: elementPlus.ElInput,
5271
5410
  BasicDialog: _sfc_main$7,
5272
- draggable: draggable__default.default
5411
+ draggable
5273
5412
  },
5274
5413
  props: {
5275
5414
  visible: {
@@ -5310,14 +5449,12 @@
5310
5449
  setStatus(val) {
5311
5450
  this.$emit("update:visible", val);
5312
5451
  }
5452
+ // submit() {
5453
+ // this.$emit('submit')
5454
+ // }
5313
5455
  }
5314
5456
  };
5315
- const _hoisted_1$2 = /* @__PURE__ */ vue.createElementVNode("div", null, [
5316
- /* @__PURE__ */ vue.createElementVNode("span", null, "\u91C7\u96C6\u6587\u7AE0"),
5317
- /* @__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")
5318
- ], -1);
5319
- const _hoisted_2$2 = { class: "collect-article_content" };
5320
- 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);
5457
+ const _hoisted_1$2 = { class: "collect-article_content" };
5321
5458
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5322
5459
  const _component_el_input = vue.resolveComponent("el-input");
5323
5460
  const _component_BasicDialog = vue.resolveComponent("BasicDialog");
@@ -5326,16 +5463,19 @@
5326
5463
  width: "600px",
5327
5464
  height: "50px"
5328
5465
  }, {
5329
- title: vue.withCtx(() => [
5330
- _hoisted_1$2
5331
- ]),
5466
+ title: vue.withCtx(() => [..._cache[1] || (_cache[1] = [
5467
+ vue.createElementVNode("div", null, [
5468
+ vue.createElementVNode("span", null, "采集文章"),
5469
+ vue.createElementVNode("span", { class: "collect-article_lable" }, "如需获得正式使用权,请自行联系版权所有者")
5470
+ ], -1)
5471
+ ])]),
5332
5472
  default: vue.withCtx(() => [
5333
- vue.createElementVNode("div", _hoisted_2$2, [
5334
- _hoisted_3$2,
5473
+ vue.createElementVNode("div", _hoisted_1$2, [
5474
+ _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "tip" }, "请把需要采集的文章链接粘贴在下方的输入框:", -1)),
5335
5475
  vue.createVNode(_component_el_input, {
5336
5476
  modelValue: $options.input,
5337
5477
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.input = $event),
5338
- placeholder: "\u4EC5\u652F\u6301\u5FAE\u4FE1\u94FE\u63A5"
5478
+ placeholder: "仅支持微信链接"
5339
5479
  }, null, 8, ["modelValue"])
5340
5480
  ])
5341
5481
  ]),
@@ -5343,7 +5483,7 @@
5343
5483
  }, 8, ["visible"]);
5344
5484
  }
5345
5485
  const CollectArticle = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
5346
- const index_vue_vue_type_style_index_0_scoped_true_lang = "";
5486
+ const index_vue_vue_type_style_index_0_scoped_4ebe06df_lang = "";
5347
5487
  const _sfc_main$1 = {
5348
5488
  components: {
5349
5489
  ElIconError: iconsVue.CircleCloseFilled
@@ -5374,8 +5514,8 @@
5374
5514
  };
5375
5515
  const _hoisted_2$1 = ["src"];
5376
5516
  const _hoisted_3$1 = { class: "article-item_right" };
5377
- const _hoisted_4$1 = { class: "name" };
5378
- const _hoisted_5$1 = { class: "score" };
5517
+ const _hoisted_4 = { class: "name" };
5518
+ const _hoisted_5 = { class: "score" };
5379
5519
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
5380
5520
  const _component_el_icon_error = vue.resolveComponent("el-icon-error");
5381
5521
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
@@ -5385,11 +5525,11 @@
5385
5525
  alt: ""
5386
5526
  }, null, 8, _hoisted_2$1)) : vue.createCommentVNode("", true),
5387
5527
  vue.createElementVNode("div", _hoisted_3$1, [
5388
- vue.createElementVNode("div", _hoisted_4$1, vue.toDisplayString($props.article.title), 1),
5389
- vue.createElementVNode("div", _hoisted_5$1, [
5528
+ vue.createElementVNode("div", _hoisted_4, vue.toDisplayString($props.article.title), 1),
5529
+ vue.createElementVNode("div", _hoisted_5, [
5390
5530
  vue.createElementVNode("span", null, vue.toDisplayString($props.article.author), 1),
5391
- vue.createElementVNode("span", null, vue.toDisplayString($props.article.viewNum) + "\u6D4F\u89C8", 1),
5392
- vue.createElementVNode("span", null, vue.toDisplayString($props.article.replycnt) + "\u8BC4\u8BBA", 1)
5531
+ vue.createElementVNode("span", null, vue.toDisplayString($props.article.viewNum) + "浏览", 1),
5532
+ vue.createElementVNode("span", null, vue.toDisplayString($props.article.replycnt) + "评论", 1)
5393
5533
  ])
5394
5534
  ]),
5395
5535
  vue.createVNode(_component_el_icon_error, {
@@ -5401,10 +5541,10 @@
5401
5541
  class: vue.normalizeClass([{
5402
5542
  "article-bg-height": $props.article.img || $props.article.mediaInfo && $props.article.mediaInfo.length
5403
5543
  }, "article-bg"])
5404
- }, " \u5E73\u53F0\u4EC5\u652F\u6301\u5C55\u793A18\u4E2A\u6708\u7684\u63A8\u8350\u5185\u5BB9 ", 2)) : vue.createCommentVNode("", true)
5544
+ }, " 平台仅支持展示18个月的推荐内容 ", 2)) : vue.createCommentVNode("", true)
5405
5545
  ]);
5406
5546
  }
5407
- const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-45d58d86"]]);
5547
+ const Item = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-4ebe06df"]]);
5408
5548
  const mountArticleDom = (props, del) => {
5409
5549
  const className = "article-wrap";
5410
5550
  const article = props.article;
@@ -5464,6 +5604,7 @@
5464
5604
  hasArticleCard: false,
5465
5605
  cursorStyle: "auto",
5466
5606
  titleCount: 0,
5607
+ // 标题数量
5467
5608
  viewLinkDialog: false,
5468
5609
  linkForm: {
5469
5610
  linkAddress: "",
@@ -5471,40 +5612,56 @@
5471
5612
  },
5472
5613
  setAlignFlag: true,
5473
5614
  article: {},
5615
+ // 插入的文章
5474
5616
  imgList: [],
5475
5617
  imgNum: 20,
5476
5618
  videoList: [],
5477
5619
  visibleVideo: false,
5478
5620
  visibleCollectArticle: false,
5479
5621
  visibleArticle: false,
5622
+ // 插入文章
5480
5623
  visibleImg: false,
5624
+ // 插入图片
5481
5625
  imgType: "normal",
5626
+ //
5482
5627
  typeEnum: {
5483
- \u6587\u5B57: "1",
5484
- \u56FE\u7247: "2",
5485
- \u56FE\u6587: "3",
5486
- \u6BB5\u843D\u6807\u9898: "4",
5487
- \u5173\u8054: "5",
5488
- \u5355\u89C6\u9891: "6",
5489
- \u89C6\u9891\u6587\u5B57: "7",
5628
+ 文字: "1",
5629
+ 图片: "2",
5630
+ 图文: "3",
5631
+ 段落标题: "4",
5632
+ 关联: "5",
5633
+ // 关联车辆、轨迹、活动、商家、话题
5634
+ 单视频: "6",
5635
+ 视频文字: "7",
5490
5636
  URL: "8",
5491
- \u6587\u7AE0\u5361\u7247: "11"
5637
+ 文章卡片: "11"
5492
5638
  },
5493
5639
  fontInfo: {
5494
5640
  size: ""
5495
5641
  },
5496
5642
  user: {},
5643
+ // 用户
5497
5644
  editor: {},
5645
+ // 编辑器实例对象
5498
5646
  editorDom: {},
5647
+ // 编辑器Dom
5499
5648
  uploadStore: {},
5649
+ // 待上传的图片池
5500
5650
  failedUploads: [],
5651
+ // 失败图片列表,用于外部项目定位
5501
5652
  linkContent: "",
5653
+ // 插入链接的地址
5502
5654
  loadingText: "",
5655
+ // loaing的提示文字
5503
5656
  progressPercent: "",
5657
+ // 上传进度
5504
5658
  currentIndex: 0,
5505
5659
  loading: false,
5660
+ // 是否提交中
5506
5661
  viewStatus: false,
5662
+ // todo: 改名
5507
5663
  linkStatus: false,
5664
+ // todo: 改名
5508
5665
  styleStatus: {
5509
5666
  bold: false,
5510
5667
  italic: false,
@@ -5528,6 +5685,7 @@
5528
5685
  targetMove: "",
5529
5686
  moverClasses: ["halo-img-content", "halo-video-content"],
5530
5687
  selectDom: null
5688
+ //选中的dom
5531
5689
  };
5532
5690
  },
5533
5691
  computed: {
@@ -5544,12 +5702,12 @@
5544
5702
  watch: {
5545
5703
  progressPercent(val) {
5546
5704
  const inner = document.querySelector(".video-progress .inner");
5547
- console.log(val, "\u89C6\u9891\u4E0A\u4F20\u8FDB\u5EA6");
5705
+ console.log(val, "视频上传进度");
5548
5706
  if (inner) {
5549
5707
  inner.style.width = val + "%";
5550
5708
  if (val === 100) {
5551
5709
  document.querySelector(".video-progress").innerHTML = `
5552
- <div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">\u6B63\u5728\u83B7\u53D6\u89C6\u9891\u5C01\u9762</div>
5710
+ <div class="no-calc" style="text-align:center;color:#999999;font-size:18px;">正在获取视频封面</div>
5553
5711
  `;
5554
5712
  }
5555
5713
  }
@@ -5568,7 +5726,7 @@
5568
5726
  me2.user = JSON.parse(
5569
5727
  window.localStorage.getItem("user") || window.localStorage.getItem("userInfo") || "{}"
5570
5728
  );
5571
- me2.guid = me2.user.uid + "|" + util__default.default.tools.guid();
5729
+ me2.guid = me2.user.uid + "|" + util.tools.guid();
5572
5730
  },
5573
5731
  beforeDestroy() {
5574
5732
  this.editorDom && this.editorDom.removeEventListener("blur", this.canSetAlign);
@@ -5638,10 +5796,10 @@
5638
5796
  this.visibleVideo = false;
5639
5797
  const fileName = (files[0] && files[0].name || "").toLowerCase();
5640
5798
  if (files[0].size > 1 * 1024 * 1024 * 1024) {
5641
- return me2.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
5799
+ return me2.setToast("视频大小不能超过1GB");
5642
5800
  }
5643
5801
  if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
5644
- return me2.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
5802
+ return me2.setToast("视频格式不是mp4或mov");
5645
5803
  }
5646
5804
  const me2 = this;
5647
5805
  if (me2.loading)
@@ -5661,7 +5819,9 @@
5661
5819
  id: result.videoId,
5662
5820
  desc: "",
5663
5821
  vodSize: result.vodSize || "",
5822
+ // 视频大小
5664
5823
  vodType: result.vodType || ""
5824
+ // 图片尺寸
5665
5825
  };
5666
5826
  me2.$emit("updateAddVideo", true);
5667
5827
  me2.editor["insertVideo"](result.videoUrl, video);
@@ -5715,11 +5875,11 @@
5715
5875
  },
5716
5876
  insertLink() {
5717
5877
  if (!this.linkForm.linkAddress)
5718
- return elementPlus.ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740");
5878
+ return elementPlus.ElMessage.error("请输入链接地址");
5719
5879
  if (!this.linkForm.linkWriting)
5720
- return elementPlus.ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u6587\u6848");
5880
+ return elementPlus.ElMessage.error("请输入链接文案");
5721
5881
  if (!this.validUrl(this.linkForm.linkAddress)) {
5722
- return this.setToast("URL\u65E0\u6548");
5882
+ return this.setToast("URL无效");
5723
5883
  }
5724
5884
  this.editor.insertLink(
5725
5885
  this.linkForm.linkAddress,
@@ -5748,9 +5908,19 @@
5748
5908
  });
5749
5909
  });
5750
5910
  },
5911
+ // TopicManager事件处理
5751
5912
  onTopicInserted(topic) {
5752
5913
  this.updateData(true);
5753
5914
  },
5915
+ // 供外部项目调用:插入热门话题
5916
+ // 如果编辑器有光标则插入光标位置,否则插入文档末尾
5917
+ // topic: { id, type, title, exactlyMatchTitle }
5918
+ insertHotTopic(topic) {
5919
+ if (this.$refs.topicManager) {
5920
+ this.$refs.topicManager.insertHotTopic(topic);
5921
+ this.updateData(true);
5922
+ }
5923
+ },
5754
5924
  getHtml(type) {
5755
5925
  this.updateTopicPosition();
5756
5926
  const html = this.editor.getHTML();
@@ -6218,7 +6388,7 @@
6218
6388
  me2.currentVideo = node;
6219
6389
  e.stopPropagation();
6220
6390
  };
6221
- replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
6391
+ replaceBtn.innerText = "更换封面";
6222
6392
  return replaceBtn;
6223
6393
  },
6224
6394
  insertImgOperateBtns(editor, data) {
@@ -6243,7 +6413,7 @@
6243
6413
  class: "desc-input",
6244
6414
  maxlength: "100",
6245
6415
  cols: "50",
6246
- placeholder: "\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0(\u6700\u591A100\u5B57)",
6416
+ placeholder: "请输入图片描述(最多100字)",
6247
6417
  contenteditable: "false"
6248
6418
  });
6249
6419
  descInput.disabled = me2.disabled;
@@ -6255,7 +6425,7 @@
6255
6425
  const img = parent.querySelector(".halo-picture-area");
6256
6426
  img.dataset.desc = e.target.value;
6257
6427
  if (e.target.value.length > 99) {
6258
- return me2.setToast("\u9650\u5236100\u4E2A\u5B57\u7B26");
6428
+ return me2.setToast("限制100个字符");
6259
6429
  }
6260
6430
  };
6261
6431
  descInput.value = data.content || "";
@@ -6305,7 +6475,7 @@
6305
6475
  me2.removeParentByClass(e.target, "halo-img-content");
6306
6476
  me2.updateData(true);
6307
6477
  };
6308
- replaceBtn.innerHTML = "\u66FF\u6362";
6478
+ replaceBtn.innerHTML = "替换";
6309
6479
  return [replaceBtn, delBtn, descInputWrap];
6310
6480
  },
6311
6481
  removeSeamlessLaster(e) {
@@ -6329,6 +6499,7 @@
6329
6499
  }
6330
6500
  }
6331
6501
  },
6502
+ // 初始化编辑器数据,数据是 html 格式(displayData)
6332
6503
  initData(data = "", essayPicRelVOList) {
6333
6504
  this.parseHtml(data, essayPicRelVOList).then((res) => {
6334
6505
  this.editorDom.innerHTML = "";
@@ -6336,10 +6507,13 @@
6336
6507
  this.updateData();
6337
6508
  });
6338
6509
  },
6510
+ // TODO jsonToHtml、htmlToJson 实现这 2 个方法里面的逻辑,数据结构参考方法里面的注释,出参入参都为字符串,注意:mdd-topic 里面的属性数据 和 json 中的topicPosition数据是一一对应的,startIndex、endIndex为mdd-topic的起止位置 从 content 里面进行分割处理
6511
+ // json、html 数据格式互转,暂时只支持文字、短话题
6339
6512
  jsonToHtml(json) {
6340
6513
  },
6341
6514
  htmlToJson(html) {
6342
6515
  },
6516
+ // 设置富文本组件
6343
6517
  initSquire() {
6344
6518
  const me2 = this;
6345
6519
  const editorDom = me2.editorDom;
@@ -6789,6 +6963,7 @@
6789
6963
  window.Squire.empty(block)
6790
6964
  ]);
6791
6965
  output.appendChild(
6966
+ // 段落才能添加标题
6792
6967
  Array.from(block.classList).indexOf("halo-img-content") > -1 ? block : container
6793
6968
  );
6794
6969
  }
@@ -6811,18 +6986,18 @@
6811
6986
  });
6812
6987
  loading.innerHTML = `
6813
6988
  <img class="img-loading-icon" src="/img/upload-image-loading.png"/>
6814
- <span class="img-loading-tip">\u4E0A\u4F20\u4E2D...</span>
6989
+ <span class="img-loading-tip">上传中...</span>
6815
6990
  `;
6816
6991
  var fail = this.createElement("div", {
6817
6992
  class: "img-fail hide",
6818
6993
  contenteditable: "false"
6819
6994
  });
6820
- fail.innerHTML = "\u4E0A\u4F20\u5931\u8D25<br>\u8BF7\u4E0B\u8F7D\u56FE\u7247\u81F3\u672C\u5730\u540E\u91CD\u65B0\u4E0A\u4F20";
6995
+ fail.innerHTML = "上传失败<br>请下载图片至本地后重新上传";
6821
6996
  var again = this.createElement("button", {
6822
6997
  class: "img-again hide",
6823
6998
  contenteditable: "false"
6824
6999
  });
6825
- again.innerHTML = "\u91CD\u65B0\u4E0A\u4F20";
7000
+ again.innerHTML = "重新上传";
6826
7001
  const isGif = src && src.indexOf(".gif") > -1;
6827
7002
  const isGifNowater = src && src.indexOf(".gif!nowater") > -1;
6828
7003
  if (isGif && !isGifNowater) {
@@ -6878,7 +7053,7 @@
6878
7053
  });
6879
7054
  div.innerHTML = `
6880
7055
  <div class="video-progress">
6881
- <div class="label">\u4E0A\u4F20\u4E2D...</div>
7056
+ <div class="label">上传中...</div>
6882
7057
  <div class="box">
6883
7058
  <div class="inner" style="width:20%"></div>
6884
7059
  </div>
@@ -6901,6 +7076,7 @@
6901
7076
  data: JSON.stringify(data),
6902
7077
  "data-content": data.content || "",
6903
7078
  poster: data.img || ""
7079
+ // 'contenteditable': 'true',
6904
7080
  });
6905
7081
  var delBtn = me2.genIconDom({
6906
7082
  class: "pointer video-delete icon",
@@ -6958,6 +7134,7 @@
6958
7134
  }
6959
7135
  };
6960
7136
  },
7137
+ // 撤销重做 会把 所有的监听全都移除,所以需要重新绑定
6961
7138
  setListener(dom) {
6962
7139
  const me2 = this;
6963
7140
  const doms = dom ? [dom] : Array.from(this.editorDom.children);
@@ -6968,7 +7145,7 @@
6968
7145
  p.onclick = function(e) {
6969
7146
  var _a;
6970
7147
  if (area.nodeName === "VIDEO" && ((_a = me2.selectDom) == null ? void 0 : _a.className) === "halo-video-content") {
6971
- me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
7148
+ me2.setToast("不支持播放");
6972
7149
  }
6973
7150
  if (e.target.className.includes("desc-input")) {
6974
7151
  return;
@@ -7032,6 +7209,7 @@
7032
7209
  };
7033
7210
  return del;
7034
7211
  },
7212
+ // 转换数据,返回给业务
7035
7213
  getEditorData() {
7036
7214
  const me2 = this;
7037
7215
  const children = Array.from(me2.editorDom.children);
@@ -7089,9 +7267,11 @@
7089
7267
  videoIds
7090
7268
  };
7091
7269
  },
7270
+ // 是否是摩托范的图片
7092
7271
  isHaloImage(url = "") {
7093
7272
  return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1 || url.indexOf("evtolfine") > -1 || url.indexOf("biaofine") > -1 || url.indexOf("robotbaodian") > -1;
7094
7273
  },
7274
+ // 获取待上传图片列表
7095
7275
  updateUploads() {
7096
7276
  const me2 = this;
7097
7277
  setTimeout(() => {
@@ -7139,8 +7319,8 @@
7139
7319
  const currentImg = me2.uploadStore[key];
7140
7320
  const imageUrl = key.split("|")[1] || "";
7141
7321
  if (!currentImg) {
7142
- console.log("\u56FE\u7247\u4E0D\u5B58\u5728", key);
7143
- return Promise.reject("\u56FE\u7247\u4E0D\u5B58\u5728");
7322
+ console.log("图片不存在", key);
7323
+ return Promise.reject("图片不存在");
7144
7324
  }
7145
7325
  const parent = currentImg.parentNode || "";
7146
7326
  const uploadFailHandler = (currentImg2) => {
@@ -7190,6 +7370,7 @@
7190
7370
  parent && uploadFailHandler(currentImg);
7191
7371
  });
7192
7372
  },
7373
+ // 更新上传的图片
7193
7374
  updateImage(img, currentImg = {}) {
7194
7375
  const data = JSON.parse(currentImg.getAttribute("data") || "{}");
7195
7376
  data.img = img;
@@ -7214,6 +7395,7 @@
7214
7395
  const imgId = currentImg.getAttribute("id") || "";
7215
7396
  this.failedUploads = this.failedUploads.filter((item) => item.id !== imgId);
7216
7397
  },
7398
+ // 滚动到第一个失败图片的位置,供外部项目调用
7217
7399
  scrollToFirstFailedImage() {
7218
7400
  this.failedUploads = this.failedUploads.filter((item) => {
7219
7401
  return item.element && document.body.contains(item.element);
@@ -7238,9 +7420,11 @@
7238
7420
  }
7239
7421
  return false;
7240
7422
  },
7423
+ // 获取ctrl + v 后内容
7241
7424
  getSticker(type, handler) {
7242
7425
  this.setSticker(type.fragment.children);
7243
7426
  },
7427
+ // 粘贴表格内容,tr换行形成段落
7244
7428
  setStickerTableContent(data) {
7245
7429
  const me2 = this;
7246
7430
  const rows = data.querySelectorAll("tr") || [];
@@ -7269,6 +7453,7 @@
7269
7453
  });
7270
7454
  this.updateData(true);
7271
7455
  },
7456
+ // 粘贴
7272
7457
  setSticker(data) {
7273
7458
  const me2 = this;
7274
7459
  data = Array.from(data);
@@ -7307,6 +7492,7 @@
7307
7492
  const me2 = this;
7308
7493
  me2.updateData();
7309
7494
  },
7495
+ // 监测 添加、撤回、恢复、删除
7310
7496
  setBack(e, type) {
7311
7497
  const me2 = this;
7312
7498
  me2.refreshImg();
@@ -7339,6 +7525,7 @@
7339
7525
  }
7340
7526
  });
7341
7527
  },
7528
+ // 设置scoll
7342
7529
  sticky() {
7343
7530
  const me2 = this;
7344
7531
  me2.$nextTick(function() {
@@ -7358,6 +7545,8 @@
7358
7545
  document.addEventListener("scroll", onScroll);
7359
7546
  });
7360
7547
  },
7548
+ // ==========toolbox==========
7549
+ // 撤回、恢复、段落标题
7361
7550
  setContent(e, obj) {
7362
7551
  const me2 = this;
7363
7552
  const id = e.target.id || e.target.dataset.editorId;
@@ -7399,10 +7588,11 @@
7399
7588
  this.fontInfo = this.editor.getFontInfo();
7400
7589
  this.updateData(true);
7401
7590
  },
7591
+ // 增加link
7402
7592
  addLink(type) {
7403
7593
  const me2 = this;
7404
- me2.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
7405
- me2.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
7594
+ me2.linkTitleName = type === "link" ? "添加链接" : "添加导入链接地址";
7595
+ me2.linkPlaceholder = type === "link" ? "请输入链接地址" : "仅支持输入微信链接";
7406
7596
  me2.viewStatus = true;
7407
7597
  me2.linkStatus = true;
7408
7598
  },
@@ -7410,29 +7600,31 @@
7410
7600
  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.,;?'&%$#=~_-]+))*$/;
7411
7601
  return objExp.test(url);
7412
7602
  },
7603
+ // 确认增加link
7413
7604
  confirmLink() {
7414
7605
  const me2 = this;
7415
7606
  if (!me2.linkContent) {
7416
- return elementPlus.ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740\uFF01");
7607
+ return elementPlus.ElMessage.error("请输入链接地址!");
7417
7608
  }
7418
- if (me2.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
7609
+ if (me2.linkTitleName === "添加导入链接地址" || this.visibleCollectArticle) {
7419
7610
  this.visibleCollectArticle = false;
7420
7611
  return me2.importLinkData();
7421
7612
  }
7422
7613
  if (!this.validUrl(me2.linkContent)) {
7423
- return me2.setToast("URL\u65E0\u6548");
7614
+ return me2.setToast("URL无效");
7424
7615
  }
7425
7616
  if (!me2.isHaloImage(me2.linkContent)) {
7426
- return me2.setToast("\u8BF7\u8F93\u5165\u6469\u6258\u8303\u5185\u90E8\u7F51\u5740");
7617
+ return me2.setToast("请输入摩托范内部网址");
7427
7618
  }
7428
7619
  me2.editor["insertLink"](me2.linkContent);
7429
7620
  me2.linkContent = "";
7430
7621
  me2.closeDialog();
7431
7622
  },
7623
+ // 增加link导入数据
7432
7624
  importLinkData() {
7433
7625
  const me2 = this;
7434
7626
  if (me2.loading) {
7435
- return elementPlus.ElMessage("\u6B63\u5728\u83B7\u53D6\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E...");
7627
+ return elementPlus.ElMessage("正在获取信息,请稍后...");
7436
7628
  }
7437
7629
  me2.loading = true;
7438
7630
  const params = {
@@ -7454,39 +7646,44 @@
7454
7646
  me2.linkContent = "";
7455
7647
  return;
7456
7648
  } else {
7457
- me2.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
7649
+ me2.setToast("导入失败,请重试");
7458
7650
  }
7459
7651
  }).catch((err) => {
7460
7652
  console.log(err.message);
7461
- me2.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
7653
+ me2.setToast("导入异常,请重试");
7462
7654
  }).finally((_) => {
7463
7655
  me2.loading = false;
7464
7656
  });
7465
7657
  },
7658
+ // 打开 图片、视频、一键导入 弹框
7466
7659
  openDialog(name) {
7467
7660
  const me2 = this;
7468
- me2.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
7469
- me2.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
7470
- 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)";
7661
+ me2.viewName = name === "img" ? "添加图片" : "添加视频";
7662
+ me2.viewButton = name === "img" ? "选择图片" : "选择视频";
7663
+ me2.viewTip = name === "img" ? "" : "为了获得更高的推荐和点击量,建议上传720p(1280*720),大小不超过500MB(视频上传需要时间,请耐心等待)";
7471
7664
  me2.viewStatus = true;
7472
7665
  },
7666
+ // 关闭弹框
7473
7667
  closeDialog() {
7474
7668
  this.viewStatus = false;
7475
7669
  this.linkStatus = false;
7476
7670
  this.linkContent = "";
7477
7671
  },
7672
+ // ==========toolbox end==========
7673
+ // 弹框提示
7478
7674
  setToast(content) {
7479
7675
  elementPlus.ElMessage.error(content);
7480
7676
  },
7481
7677
  setMessageBoxNoCancel(content) {
7482
7678
  elementPlus.ElMessageBox.confirm(content, "", {
7483
- confirmButtonText: "\u786E\u5B9A",
7484
- cancelButtonText: "\u53D6\u6D88",
7679
+ confirmButtonText: "确定",
7680
+ cancelButtonText: "取消",
7485
7681
  type: "warning"
7486
7682
  }).then(() => {
7487
7683
  }).catch(() => {
7488
7684
  });
7489
7685
  },
7686
+ // 检查是否会创建嵌套的halo-paragraph
7490
7687
  wouldCreateNestedParagraph(range) {
7491
7688
  let container = range.startContainer;
7492
7689
  while (container && container !== this.editorDom) {
@@ -7497,6 +7694,7 @@
7497
7694
  }
7498
7695
  return false;
7499
7696
  },
7697
+ // 检查光标是否在两个连续的mdd-topic之间
7500
7698
  isBetweenTwoTopics(range) {
7501
7699
  const container = range.startContainer;
7502
7700
  const offset = range.startOffset;
@@ -7512,6 +7710,7 @@
7512
7710
  }
7513
7711
  return false;
7514
7712
  },
7713
+ // 处理两个话题之间的回车或话题前面的回车
7515
7714
  handleEnterBetweenTopics(range) {
7516
7715
  var _a;
7517
7716
  const me2 = this;
@@ -7549,6 +7748,7 @@
7549
7748
  selection.addRange(newRange);
7550
7749
  me2.updateData(true);
7551
7750
  },
7751
+ // 更精确地提取光标后的内容(专门用于话题分割)
7552
7752
  extractContentAfterCursorPrecise(range, paragraph) {
7553
7753
  const fragment = document.createDocumentFragment();
7554
7754
  const container = range.startContainer;
@@ -7574,6 +7774,7 @@
7574
7774
  }
7575
7775
  return fragment;
7576
7776
  },
7777
+ // 处理包含话题的段落中的回车键
7577
7778
  handleEnterKeyInParagraphWithTopic(range) {
7578
7779
  var _a;
7579
7780
  const me2 = this;
@@ -7648,6 +7849,7 @@
7648
7849
  selection.addRange(newRange);
7649
7850
  me2.updateData(true);
7650
7851
  },
7852
+ // 检查光标是否在第一个话题前面
7651
7853
  isCursorBeforeFirstTopic(range, paragraph) {
7652
7854
  const container = range.startContainer;
7653
7855
  const offset = range.startOffset;
@@ -7709,6 +7911,7 @@
7709
7911
  }
7710
7912
  return false;
7711
7913
  },
7914
+ // 获取不包含mdd-topic内部文本的段落文本
7712
7915
  getParagraphTextExcludingTopics(paragraph, range) {
7713
7916
  let textContent = "";
7714
7917
  let cursorPosition = 0;
@@ -7739,10 +7942,12 @@
7739
7942
  }
7740
7943
  return { textContent, cursorPosition };
7741
7944
  },
7945
+ // 检查光标是否在段落开头
7742
7946
  isCursorAtStartOfParagraph(range, paragraph) {
7743
7947
  const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
7744
7948
  return cursorPosition === 0;
7745
7949
  },
7950
+ // 检查光标是否在段落末尾
7746
7951
  isCursorAtEndOfParagraph(range, paragraph) {
7747
7952
  const walker = document.createTreeWalker(
7748
7953
  paragraph,
@@ -7769,6 +7974,7 @@
7769
7974
  const { cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
7770
7975
  return cursorPosition >= totalLength;
7771
7976
  },
7977
+ // 获取当前段落
7772
7978
  getCurrentParagraph(range) {
7773
7979
  let container = range.startContainer;
7774
7980
  while (container && container !== this.editorDom) {
@@ -7779,12 +7985,13 @@
7779
7985
  }
7780
7986
  return null;
7781
7987
  },
7988
+ // 提取光标后的内容
7782
7989
  extractContentAfterCursor(range, paragraph) {
7783
7990
  const fragment = document.createDocumentFragment();
7784
7991
  const container = range.startContainer;
7785
7992
  const offset = range.startOffset;
7786
7993
  let topicSpaceNode = null;
7787
- if (container.nodeType === Node.TEXT_NODE && container.textContent === "\xA0" && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
7994
+ if (container.nodeType === Node.TEXT_NODE && container.textContent === " " && container.previousSibling && container.previousSibling.tagName === "MDD-TOPIC") {
7788
7995
  topicSpaceNode = container;
7789
7996
  }
7790
7997
  const extractRange = document.createRange();
@@ -7839,7 +8046,8 @@
7839
8046
  try {
7840
8047
  extractRange.setStartBefore(startNode);
7841
8048
  let lastNode = paragraph.lastChild;
7842
- while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && lastNode !== startNode) {
8049
+ while (lastNode && lastNode.nodeType === Node.TEXT_NODE && lastNode.textContent === "" && // 只跳过完全空的文本节点
8050
+ lastNode !== startNode) {
7843
8051
  lastNode = lastNode.previousSibling;
7844
8052
  }
7845
8053
  if (lastNode) {
@@ -7859,6 +8067,7 @@
7859
8067
  }
7860
8068
  return fragment;
7861
8069
  },
8070
+ // 统一的光标设置方法 - 设置光标到元素后面
7862
8071
  setCursorAfterElement(element) {
7863
8072
  const newRange = document.createRange();
7864
8073
  newRange.setStartAfter(element);
@@ -7867,6 +8076,7 @@
7867
8076
  selection.removeAllRanges();
7868
8077
  selection.addRange(newRange);
7869
8078
  },
8079
+ // 统一的光标设置方法 - 设置光标到元素前面
7870
8080
  setCursorBeforeElement(element) {
7871
8081
  const newRange = document.createRange();
7872
8082
  newRange.setStartBefore(element);
@@ -7886,8 +8096,6 @@
7886
8096
  slot: "footer",
7887
8097
  class: "dialog-footer"
7888
8098
  };
7889
- const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode("\u53D6 \u6D88");
7890
- const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode("\u786E \u5B9A");
7891
8099
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7892
8100
  const _component_el_input = vue.resolveComponent("el-input");
7893
8101
  const _component_el_form_item = vue.resolveComponent("el-form-item");
@@ -7903,7 +8111,7 @@
7903
8111
  vue.withDirectives(vue.createElementVNode("div", {
7904
8112
  style: vue.normalizeStyle({ textAlign: $options.align }),
7905
8113
  class: "placeholder"
7906
- }, vue.toDisplayString($props.placeholder || "\u8BF7\u8F93\u5165\u6B63\u6587"), 5), [
8114
+ }, vue.toDisplayString($props.placeholder || "请输入正文"), 5), [
7907
8115
  [vue.vShow, !$options.isInputing && !$data.titleCount && !$data.hasArticleCard]
7908
8116
  ]),
7909
8117
  $data.overLine ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -7928,26 +8136,26 @@
7928
8136
  vue.createVNode(_component_el_form, { model: $data.linkForm }, {
7929
8137
  default: vue.withCtx(() => [
7930
8138
  vue.createVNode(_component_el_form_item, {
7931
- label: "\u6DFB\u52A0\u94FE\u63A5",
8139
+ label: "添加链接",
7932
8140
  class: "link-title"
7933
8141
  }, {
7934
8142
  default: vue.withCtx(() => [
7935
8143
  vue.createVNode(_component_el_input, {
7936
8144
  modelValue: $data.linkForm.linkAddress,
7937
8145
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.linkForm.linkAddress = $event),
7938
- placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"
8146
+ placeholder: "请输入链接地址"
7939
8147
  }, null, 8, ["modelValue"])
7940
8148
  ]),
7941
8149
  _: 1
7942
8150
  }),
7943
- vue.createVNode(_component_el_form_item, { label: "\u94FE\u63A5\u6587\u6848" }, {
8151
+ vue.createVNode(_component_el_form_item, { label: "链接文案" }, {
7944
8152
  default: vue.withCtx(() => [
7945
8153
  vue.createVNode(_component_el_input, {
7946
8154
  modelValue: $data.linkForm.linkWriting,
7947
8155
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.linkForm.linkWriting = $event),
7948
8156
  type: "textarea",
7949
8157
  autosize: "",
7950
- placeholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u6587\u6848"
8158
+ placeholder: "请输入链接文案"
7951
8159
  }, null, 8, ["modelValue"])
7952
8160
  ]),
7953
8161
  _: 1
@@ -7960,18 +8168,18 @@
7960
8168
  vue.createVNode(_component_el_button, {
7961
8169
  onClick: _cache[3] || (_cache[3] = ($event) => $data.viewLinkDialog = false)
7962
8170
  }, {
7963
- default: vue.withCtx(() => [
7964
- _hoisted_4
7965
- ]),
8171
+ default: vue.withCtx(() => [..._cache[14] || (_cache[14] = [
8172
+ vue.createTextVNode("取 消", -1)
8173
+ ])]),
7966
8174
  _: 1
7967
8175
  }),
7968
8176
  vue.createVNode(_component_el_button, {
7969
8177
  type: "primary",
7970
8178
  onClick: $options.insertLink
7971
8179
  }, {
7972
- default: vue.withCtx(() => [
7973
- _hoisted_5
7974
- ]),
8180
+ default: vue.withCtx(() => [..._cache[15] || (_cache[15] = [
8181
+ vue.createTextVNode("确 定", -1)
8182
+ ])]),
7975
8183
  _: 1
7976
8184
  }, 8, ["onClick"])
7977
8185
  ])
@@ -7988,7 +8196,7 @@
7988
8196
  }, null, 8, ["article", "visible", "getList", "onDelete", "onChange"]),
7989
8197
  vue.createVNode(_component_ImgUpload, {
7990
8198
  "img-list": $data.imgList,
7991
- "onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
8199
+ "onUpdate:imgList": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
7992
8200
  visible: $data.visibleImg,
7993
8201
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
7994
8202
  chartGallery: $props.chartGallery,
@@ -8003,7 +8211,7 @@
8003
8211
  }, null, 8, ["visible", "file-selected"]),
8004
8212
  vue.createVNode(_component_CollectArticle, {
8005
8213
  "link-content": $data.linkContent,
8006
- "onUpdate:link-content": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
8214
+ "onUpdate:linkContent": _cache[9] || (_cache[9] = ($event) => $data.linkContent = $event),
8007
8215
  visible: $data.visibleCollectArticle,
8008
8216
  "onUpdate:visible": _cache[10] || (_cache[10] = ($event) => $data.visibleCollectArticle = $event),
8009
8217
  onSubmit: $options.confirmLink
@@ -8056,7 +8264,7 @@
8056
8264
  var COLOUR_CLASS = "colour";
8057
8265
  var FONT_FAMILY_CLASS = "font";
8058
8266
  var FONT_SIZE_CLASS = "size";
8059
- var ZWS = "\u200B";
8267
+ var ZWS = "";
8060
8268
  var win = doc.defaultView;
8061
8269
  var ua = navigator.userAgent;
8062
8270
  var isAndroid = /Android/.test(ua);
@@ -8086,11 +8294,17 @@
8086
8294
  };
8087
8295
  }
8088
8296
  var typeToBitArray = {
8297
+ // ELEMENT_NODE
8089
8298
  1: 1,
8299
+ // ATTRIBUTE_NODE
8090
8300
  2: 2,
8301
+ // TEXT_NODE
8091
8302
  3: 4,
8303
+ // COMMENT_NODE
8092
8304
  8: 128,
8305
+ // DOCUMENT_NODE
8093
8306
  9: 256,
8307
+ // DOCUMENT_FRAGMENT_NODE
8094
8308
  11: 1024
8095
8309
  };
8096
8310
  function TreeWalker(root, nodeType, filter) {
@@ -8424,7 +8638,7 @@
8424
8638
  node.appendChild(fixer);
8425
8639
  } catch (error) {
8426
8640
  self2.didError({
8427
- name: "Squire: fixCursor \u2013\xA0" + error,
8641
+ name: "Squire: fixCursor – " + error,
8428
8642
  message: "Parent: " + node.nodeName + "/" + node.innerHTML + " appendChild: " + fixer.nodeName
8429
8643
  });
8430
8644
  }
@@ -8759,7 +8973,8 @@
8759
8973
  block = getStartBlockOfRange(range, root);
8760
8974
  firstBlockInFrag = getNextBlock(frag, frag);
8761
8975
  replaceBlock = !!block && isEmptyBlock(block);
8762
- if (block && firstBlockInFrag && !replaceBlock && !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
8976
+ if (block && firstBlockInFrag && !replaceBlock && // Don't merge table cells or PRE elements into block
8977
+ !getNearest(firstBlockInFrag, frag, "PRE") && !getNearest(firstBlockInFrag, frag, "TABLE")) {
8763
8978
  moveRangeBoundariesUpTree(range, block, block, root);
8764
8979
  range.collapse(true);
8765
8980
  container = range.endContainer;
@@ -8775,7 +8990,10 @@
8775
8990
  container = nodeAfterSplit.parentNode;
8776
8991
  offset = indexOf.call(container.childNodes, nodeAfterSplit);
8777
8992
  }
8778
- if (offset !== getLength(container)) {
8993
+ if (
8994
+ /* isBlock( container ) && */
8995
+ offset !== getLength(container)
8996
+ ) {
8779
8997
  blockContentsAfterSplit = root.ownerDocument.createDocumentFragment();
8780
8998
  while (node = container.childNodes[offset]) {
8781
8999
  blockContentsAfterSplit.appendChild(node);
@@ -9824,9 +10042,11 @@
9824
10042
  if (hasImage) {
9825
10043
  this.fireEvent("dragover", {
9826
10044
  dataTransfer: clipboardData,
10045
+ /* jshint loopfunc: true */
9827
10046
  preventDefault: function() {
9828
10047
  fireDrop = true;
9829
10048
  }
10049
+ /* jshint loopfunc: false */
9830
10050
  });
9831
10051
  if (fireDrop) {
9832
10052
  this.fireEvent("drop", {
@@ -10033,7 +10253,9 @@
10033
10253
  leafNodeNames,
10034
10254
  undo: {
10035
10255
  documentSizeThreshold: -1,
10256
+ // -1 means no threshold
10036
10257
  undoLimit: -1
10258
+ // -1 means no limit
10037
10259
  },
10038
10260
  isInsertedHTMLSanitized: true,
10039
10261
  isSetHTMLSanitized: true,
@@ -11675,5 +11897,5 @@
11675
11897
  exports2.Editor = Editor;
11676
11898
  exports2.ToolBar = ToolBar;
11677
11899
  exports2.ToolsEnum = ToolsEnum;
11678
- Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
11900
+ Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
11679
11901
  });