@haluo/biz 2.0.13 → 2.0.14-beta.2

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.
@@ -302,6 +302,15 @@
302
302
  e.component(O.name, O);
303
303
  };
304
304
  console.log("name", O.name);
305
+ const Se = [
306
+ O
307
+ ], Fe = function(e) {
308
+ Se.map((t) => e.component(t.name, t));
309
+ }, De = {
310
+ install: Fe,
311
+ colorPicker: O
312
+ };
313
+ const style = "";
305
314
  const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
306
315
  const ToolBar_vue_vue_type_style_index_1_lang = "";
307
316
  const _export_sfc = (sfc, props) => {
@@ -315,7 +324,8 @@
315
324
  components: {
316
325
  ElTooltip: elementPlus.ElTooltip,
317
326
  ElDivider: elementPlus.ElDivider,
318
- ElPopover: elementPlus.ElPopover
327
+ ElPopover: elementPlus.ElPopover,
328
+ colorPicker: De.colorPicker
319
329
  },
320
330
  props: ["editor", "isOss", "hiddenTools"],
321
331
  data() {
@@ -519,49 +529,49 @@
519
529
  const _hoisted_3$7 = ["src"];
520
530
  const _hoisted_4$6 = ["src"];
521
531
  const _hoisted_5$5 = ["src"];
522
- const _hoisted_6$2 = { class: "box" };
532
+ const _hoisted_6$3 = { class: "box" };
523
533
  const _hoisted_7$2 = ["src"];
524
- const _hoisted_8$1 = {
534
+ const _hoisted_8$2 = {
525
535
  key: 0,
526
536
  class: "box-mask"
527
537
  };
528
- const _hoisted_9$1 = { class: "tools-title" };
529
- const _hoisted_10$1 = ["src"];
530
- const _hoisted_11$1 = { class: "tools-font" };
531
- const _hoisted_12$1 = ["onClick"];
532
- const _hoisted_13$1 = { style: { "font-size": "10px" } };
533
- const _hoisted_14$1 = { class: "box" };
534
- const _hoisted_15$1 = ["src"];
535
- const _hoisted_16$1 = {
538
+ const _hoisted_9$2 = { class: "tools-title" };
539
+ const _hoisted_10$2 = ["src"];
540
+ const _hoisted_11$2 = { class: "tools-font" };
541
+ 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 = {
536
546
  key: 0,
537
547
  class: "box-mask"
538
548
  };
539
- const _hoisted_17 = { class: "box" };
540
- const _hoisted_18 = ["src"];
541
- const _hoisted_19 = {
549
+ const _hoisted_17$1 = { class: "box" };
550
+ const _hoisted_18$1 = ["src"];
551
+ const _hoisted_19$1 = {
542
552
  key: 0,
543
553
  class: "box-mask"
544
554
  };
545
- const _hoisted_20 = { class: "tools-title" };
546
- const _hoisted_21 = ["src"];
547
- const _hoisted_22 = ["src"];
548
- const _hoisted_23 = { class: "tools-title_content" };
549
- const _hoisted_24 = { class: "box" };
550
- const _hoisted_25 = ["src"];
551
- const _hoisted_26 = {
555
+ const _hoisted_20$1 = { class: "tools-title" };
556
+ const _hoisted_21$1 = ["src"];
557
+ const _hoisted_22$1 = ["src"];
558
+ const _hoisted_23$1 = { class: "tools-title_content" };
559
+ const _hoisted_24$1 = { class: "box" };
560
+ const _hoisted_25$1 = ["src"];
561
+ const _hoisted_26$1 = {
552
562
  key: 0,
553
563
  class: "box-mask"
554
564
  };
555
- const _hoisted_27 = { class: "box" };
556
- const _hoisted_28 = ["src"];
557
- const _hoisted_29 = {
565
+ const _hoisted_27$1 = { class: "box" };
566
+ const _hoisted_28$1 = ["src"];
567
+ const _hoisted_29$1 = {
558
568
  key: 0,
559
569
  class: "box-mask"
560
570
  };
561
- const _hoisted_30 = { class: "box" };
562
- const _hoisted_31 = ["src"];
563
- const _hoisted_32 = ["src"];
564
- const _hoisted_33 = ["src"];
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"];
565
575
  const _hoisted_34 = ["src"];
566
576
  const _hoisted_35 = { class: "tools-title" };
567
577
  const _hoisted_36 = ["src"];
@@ -651,7 +661,7 @@
651
661
  placement: "top"
652
662
  }, {
653
663
  default: vue.withCtx(() => [
654
- vue.createElementVNode("div", _hoisted_6$2, [
664
+ vue.createElementVNode("div", _hoisted_6$3, [
655
665
  vue.createElementVNode("img", {
656
666
  src: $options.getImageUrl("tools_refresh@3x.png"),
657
667
  width: "40",
@@ -659,7 +669,7 @@
659
669
  alt: "",
660
670
  onClick: _cache[3] || (_cache[3] = (...args) => $options.copyFormat && $options.copyFormat(...args))
661
671
  }, null, 8, _hoisted_7$2),
662
- $props.editor.cursorStyle !== "auto" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$1)) : vue.createCommentVNode("", true)
672
+ $props.editor.cursorStyle !== "auto" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2)) : vue.createCommentVNode("", true)
663
673
  ])
664
674
  ]),
665
675
  _: 1
@@ -674,7 +684,7 @@
674
684
  width: "152"
675
685
  }, {
676
686
  reference: vue.withCtx(() => [
677
- vue.createElementVNode("div", _hoisted_9$1, [
687
+ vue.createElementVNode("div", _hoisted_9$2, [
678
688
  vue.createVNode(_component_el_tooltip, {
679
689
  class: "item",
680
690
  effect: "dark",
@@ -693,7 +703,7 @@
693
703
  width: "16",
694
704
  height: "40",
695
705
  alt: ""
696
- }, null, 8, _hoisted_10$1)
706
+ }, null, 8, _hoisted_10$2)
697
707
  ], 2)
698
708
  ]),
699
709
  _: 1
@@ -701,7 +711,7 @@
701
711
  ])
702
712
  ]),
703
713
  default: vue.withCtx(() => [
704
- vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", _hoisted_11$1, [
714
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", _hoisted_11$2, [
705
715
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($data.fontsizes, (item, index) => {
706
716
  return vue.openBlock(), vue.createElementBlock("li", {
707
717
  class: vue.normalizeClass([$data.activeFontsize + "px" === item.value ? "active" : ""]),
@@ -712,8 +722,8 @@
712
722
  vue.createElementVNode("span", {
713
723
  style: vue.normalizeStyle({ fontSize: item.value })
714
724
  }, vue.toDisplayString(item.name), 5),
715
- vue.createElementVNode("span", _hoisted_13$1, vue.toDisplayString(item.desc), 1)
716
- ], 10, _hoisted_12$1);
725
+ vue.createElementVNode("span", _hoisted_13$2, vue.toDisplayString(item.desc), 1)
726
+ ], 10, _hoisted_12$2);
717
727
  }), 128))
718
728
  ])), [
719
729
  [_directive_click_outside, $options.handlePopover]
@@ -732,7 +742,7 @@
732
742
  placement: "top"
733
743
  }, {
734
744
  default: vue.withCtx(() => [
735
- vue.createElementVNode("div", _hoisted_14$1, [
745
+ vue.createElementVNode("div", _hoisted_14$2, [
736
746
  vue.createElementVNode("img", {
737
747
  src: $options.getImageUrl("tools_title@3x.png"),
738
748
  "data-editor-id": "makeHeader",
@@ -740,8 +750,8 @@
740
750
  height: "40",
741
751
  alt: "",
742
752
  onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
743
- }, null, 8, _hoisted_15$1),
744
- $data.statusInfo && $data.statusInfo.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1)) : vue.createCommentVNode("", true)
753
+ }, null, 8, _hoisted_15$2),
754
+ $data.statusInfo && $data.statusInfo.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$2)) : vue.createCommentVNode("", true)
745
755
  ])
746
756
  ]),
747
757
  _: 1
@@ -753,15 +763,15 @@
753
763
  placement: "top"
754
764
  }, {
755
765
  default: vue.withCtx(() => [
756
- vue.createElementVNode("div", _hoisted_17, [
766
+ vue.createElementVNode("div", _hoisted_17$1, [
757
767
  vue.createElementVNode("img", {
758
768
  src: $options.getImageUrl("tools_bold@3x.png"),
759
769
  width: "40",
760
770
  height: "40",
761
771
  alt: "",
762
772
  onClick: _cache[6] || (_cache[6] = ($event) => $options.setStyle($data.statusInfo.bold ? "removeBold" : "bold", "bold", !$data.statusInfo.bold))
763
- }, null, 8, _hoisted_18),
764
- $data.statusInfo && $data.statusInfo.bold ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19)) : vue.createCommentVNode("", true)
773
+ }, null, 8, _hoisted_18$1),
774
+ $data.statusInfo && $data.statusInfo.bold ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19$1)) : vue.createCommentVNode("", true)
765
775
  ])
766
776
  ]),
767
777
  _: 1
@@ -773,7 +783,7 @@
773
783
  width: "152"
774
784
  }, {
775
785
  reference: vue.withCtx(() => [
776
- vue.createElementVNode("div", _hoisted_20, [
786
+ vue.createElementVNode("div", _hoisted_20$1, [
777
787
  vue.createVNode(_component_el_tooltip, {
778
788
  class: "item",
779
789
  effect: "dark",
@@ -791,13 +801,13 @@
791
801
  width: "24",
792
802
  height: "40",
793
803
  alt: ""
794
- }, null, 8, _hoisted_21),
804
+ }, null, 8, _hoisted_21$1),
795
805
  vue.createElementVNode("img", {
796
806
  src: $options.getImageUrl("tools_arrow@3x.png"),
797
807
  width: "16",
798
808
  height: "40",
799
809
  alt: ""
800
- }, null, 8, _hoisted_22)
810
+ }, null, 8, _hoisted_22$1)
801
811
  ], 2)
802
812
  ]),
803
813
  _: 1
@@ -805,7 +815,7 @@
805
815
  ])
806
816
  ]),
807
817
  default: vue.withCtx(() => [
808
- vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", _hoisted_23, [
818
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("ul", _hoisted_23$1, [
809
819
  vue.createElementVNode("li", {
810
820
  "data-editor-id": "makeHeader",
811
821
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
@@ -832,15 +842,15 @@
832
842
  placement: "top"
833
843
  }, {
834
844
  default: vue.withCtx(() => [
835
- vue.createElementVNode("div", _hoisted_24, [
845
+ vue.createElementVNode("div", _hoisted_24$1, [
836
846
  vue.createElementVNode("img", {
837
847
  src: $options.getImageUrl("tools_xie@3x.png"),
838
848
  width: "40",
839
849
  height: "40",
840
850
  alt: "",
841
851
  onClick: _cache[10] || (_cache[10] = ($event) => $options.setStyle($data.statusInfo.italic ? "removeItalic" : "italic", "italic", !$data.statusInfo.italic))
842
- }, null, 8, _hoisted_25),
843
- $data.statusInfo && $data.statusInfo.italic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26)) : vue.createCommentVNode("", true)
852
+ }, null, 8, _hoisted_25$1),
853
+ $data.statusInfo && $data.statusInfo.italic ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26$1)) : vue.createCommentVNode("", true)
844
854
  ])
845
855
  ]),
846
856
  _: 1
@@ -852,15 +862,15 @@
852
862
  placement: "top"
853
863
  }, {
854
864
  default: vue.withCtx(() => [
855
- vue.createElementVNode("div", _hoisted_27, [
865
+ vue.createElementVNode("div", _hoisted_27$1, [
856
866
  vue.createElementVNode("img", {
857
867
  src: $options.getImageUrl("tools_line@3x.png"),
858
868
  width: "40",
859
869
  height: "40",
860
870
  alt: "",
861
871
  onClick: _cache[11] || (_cache[11] = ($event) => $options.setStyle($data.statusInfo.underline ? "removeUnderline" : "underline", "underline", !$data.statusInfo.underline))
862
- }, null, 8, _hoisted_28),
863
- $data.statusInfo && $data.statusInfo.underline ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29)) : vue.createCommentVNode("", true)
872
+ }, null, 8, _hoisted_28$1),
873
+ $data.statusInfo && $data.statusInfo.underline ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29$1)) : vue.createCommentVNode("", true)
864
874
  ])
865
875
  ]),
866
876
  _: 1
@@ -873,14 +883,14 @@
873
883
  placement: "top"
874
884
  }, {
875
885
  default: vue.withCtx(() => [
876
- vue.createElementVNode("div", _hoisted_30, [
886
+ vue.createElementVNode("div", _hoisted_30$1, [
877
887
  vue.createElementVNode("img", {
878
888
  src: $options.getImageUrl("icon_web_link@2x.png"),
879
889
  width: "40",
880
890
  height: "40",
881
891
  alt: "",
882
892
  onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
883
- }, null, 8, _hoisted_31)
893
+ }, null, 8, _hoisted_31$1)
884
894
  ])
885
895
  ]),
886
896
  _: 1
@@ -898,7 +908,7 @@
898
908
  height: "40",
899
909
  alt: "",
900
910
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
901
- }, null, 8, _hoisted_32)
911
+ }, null, 8, _hoisted_32$1)
902
912
  ]),
903
913
  _: 1
904
914
  }),
@@ -918,7 +928,7 @@
918
928
  width: "24",
919
929
  height: "40",
920
930
  alt: ""
921
- }, null, 8, _hoisted_33),
931
+ }, null, 8, _hoisted_33$1),
922
932
  vue.createElementVNode("img", {
923
933
  src: $options.getImageUrl("tools_arrow@3x.png"),
924
934
  width: "16",
@@ -1097,23 +1107,25 @@
1097
1107
  ])
1098
1108
  ])) : vue.createCommentVNode("", true);
1099
1109
  }
1100
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-dd9e6bac"]]);
1110
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-719229ac"]]);
1101
1111
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
1102
1112
  const index_vue_vue_type_style_index_0_lang$4 = "";
1103
- const _hoisted_1$6 = { class: "basic-dialog_title" };
1104
- const _hoisted_2$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1105
- const _hoisted_3$6 = {
1113
+ const _hoisted_1$6 = { key: 0 };
1114
+ const _hoisted_2$6 = { class: "basic-dialog_title" };
1115
+ const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1116
+ const _hoisted_4$5 = {
1106
1117
  key: 0,
1107
1118
  class: "dialog-footer"
1108
1119
  };
1109
- const _hoisted_4$5 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
1110
- const _hoisted_5$4 = /* @__PURE__ */ vue.createTextVNode("\u786E\u8BA4");
1120
+ const _hoisted_5$4 = /* @__PURE__ */ vue.createTextVNode("\u53D6\u6D88");
1121
+ const _hoisted_6$2 = /* @__PURE__ */ vue.createTextVNode("\u786E\u8BA4");
1111
1122
  const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
1112
1123
  name: "index",
1113
1124
  props: {
1114
1125
  visible: { type: Boolean, default: false },
1115
1126
  showBtn: { type: Boolean, default: true },
1116
- width: { default: "840px" }
1127
+ width: { default: "840px" },
1128
+ showTitle: { type: Boolean, default: true }
1117
1129
  },
1118
1130
  emits: ["submit", "cancel"],
1119
1131
  setup(__props, { emit: emits }) {
@@ -1144,26 +1156,26 @@
1144
1156
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(dialogVisible) ? dialogVisible.value = $event : null),
1145
1157
  "before-close": handleClose,
1146
1158
  width: __props.width,
1147
- class: "basic-dialog"
1159
+ class: vue.normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
1148
1160
  }, {
1149
1161
  header: vue.withCtx(() => [
1150
- vue.createElementVNode("div", null, [
1151
- vue.createElementVNode("div", _hoisted_1$6, [
1152
- _hoisted_2$6,
1162
+ __props.showTitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
1163
+ vue.createElementVNode("div", _hoisted_2$6, [
1164
+ _hoisted_3$6,
1153
1165
  vue.renderSlot(_ctx.$slots, "title")
1154
1166
  ])
1155
- ])
1167
+ ])) : vue.createCommentVNode("", true)
1156
1168
  ]),
1157
1169
  footer: vue.withCtx(() => [
1158
- __props.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$6, [
1170
+ __props.showBtn ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$5, [
1159
1171
  vue.createVNode(vue.unref(elementPlus.ElButton), {
1160
- style: { "width": "120px", "border-color": "#CCCCCC", "color": "#333333" },
1172
+ style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
1161
1173
  plain: "",
1162
1174
  round: "",
1163
1175
  onClick: handleClose
1164
1176
  }, {
1165
1177
  default: vue.withCtx(() => [
1166
- _hoisted_4$5
1178
+ _hoisted_5$4
1167
1179
  ]),
1168
1180
  _: 1
1169
1181
  }),
@@ -1174,7 +1186,7 @@
1174
1186
  onClick: confirm
1175
1187
  }, {
1176
1188
  default: vue.withCtx(() => [
1177
- _hoisted_5$4
1189
+ _hoisted_6$2
1178
1190
  ]),
1179
1191
  _: 1
1180
1192
  })
@@ -1184,7 +1196,7 @@
1184
1196
  vue.renderSlot(_ctx.$slots, "default")
1185
1197
  ]),
1186
1198
  _: 3
1187
- }, 8, ["modelValue", "width"]);
1199
+ }, 8, ["modelValue", "width", "class"]);
1188
1200
  };
1189
1201
  }
1190
1202
  });
@@ -1334,21 +1346,21 @@
1334
1346
  const _hoisted_5$3 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
1335
1347
  const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
1336
1348
  const _hoisted_7$1 = { class: "insert-article_input" };
1337
- const _hoisted_8 = {
1349
+ const _hoisted_8$1 = {
1338
1350
  key: 0,
1339
1351
  class: "nodata"
1340
1352
  };
1341
- const _hoisted_9 = ["infinite-scroll-disabled"];
1342
- const _hoisted_10 = {
1353
+ const _hoisted_9$1 = ["infinite-scroll-disabled"];
1354
+ const _hoisted_10$1 = {
1343
1355
  key: 0,
1344
1356
  class: "video-item"
1345
1357
  };
1346
- const _hoisted_11 = { class: "video-pic" };
1347
- const _hoisted_12 = ["src"];
1348
- const _hoisted_13 = ["src"];
1349
- const _hoisted_14 = { class: "video-text" };
1350
- const _hoisted_15 = { class: "dotdotdot2" };
1351
- const _hoisted_16 = {
1358
+ const _hoisted_11$1 = { class: "video-pic" };
1359
+ const _hoisted_12$1 = ["src"];
1360
+ const _hoisted_13$1 = ["src"];
1361
+ const _hoisted_14$1 = { class: "video-text" };
1362
+ const _hoisted_15$1 = { class: "dotdotdot2" };
1363
+ const _hoisted_16$1 = {
1352
1364
  key: 1,
1353
1365
  style: { "display": "inline-flex", "flex-direction": "column" }
1354
1366
  };
@@ -1505,7 +1517,7 @@
1505
1517
  _: 1
1506
1518
  }, 8, ["modelValue", "placeholder"])
1507
1519
  ]),
1508
- data.data.length === 0 && !data.busy ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, 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", {
1520
+ 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", {
1509
1521
  key: 1,
1510
1522
  "infinite-scroll-immediate": false,
1511
1523
  class: "insert-article_list",
@@ -1525,22 +1537,22 @@
1525
1537
  default: vue.withCtx(() => {
1526
1538
  var _a;
1527
1539
  return [
1528
- vue.unref(isVideo) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10, [
1529
- vue.createElementVNode("div", _hoisted_11, [
1540
+ vue.unref(isVideo) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$1, [
1541
+ vue.createElementVNode("div", _hoisted_11$1, [
1530
1542
  vue.createElementVNode("img", {
1531
1543
  class: "video-pic",
1532
1544
  src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
1533
- }, null, 8, _hoisted_12),
1545
+ }, null, 8, _hoisted_12$1),
1534
1546
  vue.createElementVNode("img", {
1535
1547
  class: "play",
1536
1548
  src: getImageUrl("play.png")
1537
- }, null, 8, _hoisted_13)
1549
+ }, null, 8, _hoisted_13$1)
1538
1550
  ]),
1539
- vue.createElementVNode("div", _hoisted_14, [
1540
- vue.createElementVNode("span", _hoisted_15, vue.toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
1551
+ vue.createElementVNode("div", _hoisted_14$1, [
1552
+ vue.createElementVNode("span", _hoisted_15$1, vue.toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
1541
1553
  vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
1542
1554
  ])
1543
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
1555
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, [
1544
1556
  vue.createElementVNode("span", null, vue.toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
1545
1557
  vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
1546
1558
  ]))
@@ -1550,7 +1562,7 @@
1550
1562
  }, 1032, ["modelValue", "label", "onChange"])
1551
1563
  ]);
1552
1564
  }), 128))
1553
- ], 8, _hoisted_9)), [
1565
+ ], 8, _hoisted_9$1)), [
1554
1566
  [vue.unref(vInfiniteScroll), getArticleList]
1555
1567
  ])
1556
1568
  ])
@@ -1600,24 +1612,94 @@
1600
1612
  return unsafeStringify(rnds);
1601
1613
  }
1602
1614
  const index_vue_vue_type_style_index_0_lang$2 = "";
1603
- const _hoisted_1$4 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u63D2\u5165\u56FE\u7247", -1);
1604
- const _hoisted_2$4 = {
1615
+ const _hoisted_1$4 = { class: "img-upload-content" };
1616
+ const _hoisted_2$4 = { class: "title-box" };
1617
+ const _hoisted_3$4 = ["onClick"];
1618
+ const _hoisted_4$3 = {
1605
1619
  key: 0,
1606
- class: "upload-wrap"
1620
+ class: "line"
1607
1621
  };
1608
- const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
1609
- const _hoisted_4$3 = /* @__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);
1610
1622
  const _hoisted_5$2 = {
1623
+ key: 0,
1624
+ class: "prompt-restriction"
1625
+ };
1626
+ const _hoisted_6 = {
1627
+ key: 1,
1628
+ class: "prompt-restriction"
1629
+ };
1630
+ const _hoisted_7 = {
1631
+ key: 0,
1632
+ class: "text-picture"
1633
+ };
1634
+ const _hoisted_8 = { class: "image-list content-image" };
1635
+ const _hoisted_9 = ["onClick"];
1636
+ const _hoisted_10 = ["src"];
1637
+ const _hoisted_11 = {
1638
+ key: 0,
1639
+ class: "shade"
1640
+ };
1641
+ const _hoisted_12 = { class: "num" };
1642
+ const _hoisted_13 = {
1643
+ key: 0,
1644
+ class: "upload-wrap"
1645
+ };
1646
+ const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
1647
+ 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);
1648
+ const _hoisted_16 = {
1611
1649
  key: 1,
1612
1650
  class: "img-list"
1613
1651
  };
1614
- const _hoisted_6 = ["src"];
1615
- const _hoisted_7 = { class: "upload-btn" };
1652
+ const _hoisted_17 = ["src"];
1653
+ const _hoisted_18 = { class: "upload-btn" };
1654
+ const _hoisted_19 = {
1655
+ key: 2,
1656
+ class: "map-depot"
1657
+ };
1658
+ const _hoisted_20 = { class: "screen" };
1659
+ const _hoisted_21 = /* @__PURE__ */ vue.createTextVNode("\u641C\u7D22");
1660
+ const _hoisted_22 = { key: 0 };
1661
+ const _hoisted_23 = { class: "tab-box" };
1662
+ const _hoisted_24 = ["onClick"];
1663
+ const _hoisted_25 = {
1664
+ key: 0,
1665
+ class: "line"
1666
+ };
1667
+ const _hoisted_26 = { class: "image-list depot-image" };
1668
+ const _hoisted_27 = ["onClick"];
1669
+ const _hoisted_28 = ["src"];
1670
+ const _hoisted_29 = {
1671
+ key: 0,
1672
+ class: "shade"
1673
+ };
1674
+ const _hoisted_30 = { class: "num" };
1675
+ const _hoisted_31 = {
1676
+ key: 1,
1677
+ class: "protocol-box"
1678
+ };
1679
+ const _hoisted_32 = /* @__PURE__ */ vue.createElementVNode("div", null, [
1680
+ /* @__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 "),
1681
+ /* @__PURE__ */ vue.createElementVNode("div", null, [
1682
+ /* @__PURE__ */ vue.createTextVNode(" \u8BF7\u9605\u8BFB"),
1683
+ /* @__PURE__ */ vue.createElementVNode("a", {
1684
+ href: "https://mp.58moto.com/about?type=imageLicenseAgreement",
1685
+ target: "_blank",
1686
+ rel: "noopener noreferrer",
1687
+ class: "link"
1688
+ }, "\u300A\u6469\u6258\u8303\u56FE\u7247\u8BB8\u53EF\u4F7F\u7528\u534F\u8BAE\u300B"),
1689
+ /* @__PURE__ */ vue.createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ")
1690
+ ])
1691
+ ], -1);
1692
+ const _hoisted_33 = [
1693
+ _hoisted_32
1694
+ ];
1616
1695
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
1617
1696
  name: "index",
1618
1697
  props: {
1619
1698
  visible: { type: Boolean, default: false },
1620
- imgList: { default: [] }
1699
+ imgList: { default: [] },
1700
+ chartGallery: { type: Boolean, default: false },
1701
+ request: { default: {} },
1702
+ imgNum: { default: 20 }
1621
1703
  },
1622
1704
  emits: ["update:imgList", "update:visible", "submit"],
1623
1705
  setup(__props, { emit: emits }) {
@@ -1663,86 +1745,442 @@
1663
1745
  var ele = document.getElementsByClassName("imageFile");
1664
1746
  ele[0].dispatchEvent(event);
1665
1747
  };
1748
+ const activeTitle = vue.ref(2);
1749
+ const titleList = vue.ref([]);
1750
+ vue.watch(
1751
+ () => props.visible,
1752
+ (newValue) => {
1753
+ if (newValue) {
1754
+ const list = [
1755
+ {
1756
+ id: 2,
1757
+ value: "\u4E0A\u4F20\u56FE\u7247"
1758
+ }
1759
+ ];
1760
+ activeTitle.value = 2;
1761
+ if (props.imgNum < 20) {
1762
+ list.unshift({
1763
+ id: 1,
1764
+ value: "\u6B63\u6587\u56FE\u7247"
1765
+ });
1766
+ activeTitle.value = 1;
1767
+ getContentImgList();
1768
+ }
1769
+ if (props.chartGallery) {
1770
+ list.push({
1771
+ id: 3,
1772
+ value: "\u6469\u6258\u8303\u56FE\u5E93"
1773
+ });
1774
+ }
1775
+ titleList.value = list;
1776
+ }
1777
+ }
1778
+ );
1779
+ const changeTab = (item) => {
1780
+ if (activeTitle.value !== item.id) {
1781
+ activeTitle.value = item.id;
1782
+ emits("update:imgList", []);
1783
+ if (item.id === 1) {
1784
+ if (!contentImgList.value.length) {
1785
+ getContentImgList();
1786
+ }
1787
+ }
1788
+ if (item.id === 3) {
1789
+ if (!brandList.value.length) {
1790
+ getBrandList();
1791
+ }
1792
+ }
1793
+ }
1794
+ };
1795
+ const contentImgListInit = vue.ref([]);
1796
+ const getContentImgList = () => {
1797
+ contentImgListInit.value = [];
1798
+ const node = document.getElementById("editor-content");
1799
+ if (node) {
1800
+ const imgList = node.querySelectorAll(".halo-picture-area");
1801
+ if (imgList && imgList.length) {
1802
+ const list = [];
1803
+ imgList.forEach((img) => {
1804
+ if (!list.includes(img.src)) {
1805
+ list.push(img.src);
1806
+ }
1807
+ });
1808
+ list.forEach((src, i) => {
1809
+ contentImgListInit.value.push({
1810
+ imgOrgUrl: src,
1811
+ imgId: `content_${i}`
1812
+ });
1813
+ });
1814
+ }
1815
+ }
1816
+ };
1817
+ const contentImgList = vue.computed(() => {
1818
+ const list = [];
1819
+ contentImgListInit.value.forEach((v) => {
1820
+ const value = props.imgList.find((_) => _.id === v.imgId);
1821
+ list.push({
1822
+ imgOrgUrl: v.imgOrgUrl,
1823
+ imgId: v.imgId,
1824
+ num: value && value.num || 0
1825
+ });
1826
+ });
1827
+ return list;
1828
+ });
1829
+ const selectData = vue.reactive({
1830
+ brandId: "",
1831
+ goodId: "",
1832
+ carId: ""
1833
+ });
1834
+ const {
1835
+ getCarTypeList,
1836
+ getAllBrandList,
1837
+ getGoodsImgsTypeData,
1838
+ getCarGoodsList
1839
+ } = props.request;
1840
+ const brandList = vue.ref([]);
1841
+ const getBrandList = () => {
1842
+ brandList.value = [];
1843
+ getAllBrandList({
1844
+ brandEnergyType: 3,
1845
+ brandVersion: 1598596364
1846
+ }).then((res) => {
1847
+ if (res.data.code === 0) {
1848
+ brandList.value = res.data.data || [];
1849
+ }
1850
+ });
1851
+ };
1852
+ const goodList = vue.ref([]);
1853
+ const getGoodList = () => {
1854
+ goodList.value = [];
1855
+ getCarTypeList(selectData.brandId, {
1856
+ platform: 11,
1857
+ provinceName: "",
1858
+ cityName: "",
1859
+ onSale: 1,
1860
+ page: 1,
1861
+ rows: 200,
1862
+ brandEnergyType: 3,
1863
+ goodMinPrice: "",
1864
+ goodMaxPrice: "",
1865
+ goodType: "",
1866
+ goodMinVolume: "",
1867
+ goodMaxVolume: "",
1868
+ sortType: 0
1869
+ }).then((res) => {
1870
+ if (res.data.code === 0) {
1871
+ goodList.value = res.data.data || [];
1872
+ }
1873
+ });
1874
+ };
1875
+ const carList = vue.ref([]);
1876
+ const getCarList = () => {
1877
+ carList.value = [];
1878
+ getCarGoodsList({
1879
+ goodId: selectData.goodId,
1880
+ color: "",
1881
+ isFromAskPrice: 0
1882
+ }).then((res) => {
1883
+ if (res.data.code === 0) {
1884
+ const list = res.data.data || [];
1885
+ list.forEach((v) => {
1886
+ if (v.carInfoList && v.carInfoList.length) {
1887
+ v.carInfoList.forEach((car) => {
1888
+ carList.value.push(car);
1889
+ });
1890
+ }
1891
+ });
1892
+ }
1893
+ });
1894
+ };
1895
+ const changeBrandId = () => {
1896
+ selectData.goodId = "";
1897
+ selectData.carId = "";
1898
+ getGoodList();
1899
+ };
1900
+ const changeGoodId = () => {
1901
+ selectData.carId = "";
1902
+ getCarList();
1903
+ };
1904
+ const activeTab = vue.ref("1");
1905
+ const tabList = vue.ref([]);
1906
+ const search = () => {
1907
+ if (!selectData.brandId) {
1908
+ return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u54C1\u724C");
1909
+ }
1910
+ if (!selectData.goodId) {
1911
+ return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u8F66\u578B");
1912
+ }
1913
+ if (!selectData.carId) {
1914
+ return elementPlus.ElMessage.error("\u8BF7\u9009\u62E9\u6B3E\u578B");
1915
+ }
1916
+ tabList.value = [];
1917
+ emits("update:imgList", []);
1918
+ getGoodsImgsTypeData({
1919
+ goodId: selectData.goodId,
1920
+ carId: selectData.carId
1921
+ }).then((res) => {
1922
+ if (res.data.code === 0) {
1923
+ tabList.value = res.data.data || [];
1924
+ if (tabList.value.length) {
1925
+ activeTab.value = tabList.value[0].type || "1";
1926
+ }
1927
+ }
1928
+ });
1929
+ };
1930
+ const imageList = vue.computed(() => {
1931
+ const list = [];
1932
+ const item = tabList.value.find((v) => v.type === activeTab.value);
1933
+ if (item && item.imgList && item.imgList.length) {
1934
+ item.imgList.forEach((v) => {
1935
+ const value = props.imgList.find((_) => _.id === v.imgId);
1936
+ list.push({
1937
+ imgOrgUrl: v.imgOrgUrl,
1938
+ imgId: v.imgId,
1939
+ num: value && value.num || 0
1940
+ });
1941
+ });
1942
+ }
1943
+ return list;
1944
+ });
1945
+ const selectImage = (item, type) => {
1946
+ const list = [...props.imgList];
1947
+ const index = list.findIndex((v) => v.id === item.imgId);
1948
+ if (index >= 0) {
1949
+ list.splice(index, 1);
1950
+ } else {
1951
+ if (list.length >= props.imgNum)
1952
+ return;
1953
+ list.push({
1954
+ id: item.imgId,
1955
+ src: item.imgOrgUrl,
1956
+ type
1957
+ });
1958
+ }
1959
+ list.forEach((v, i) => {
1960
+ v.num = i + 1;
1961
+ });
1962
+ emits("update:imgList", list);
1963
+ };
1666
1964
  return (_ctx, _cache) => {
1667
1965
  return vue.openBlock(), vue.createBlock(_sfc_main$6, {
1668
- visible: props.visible
1966
+ visible: props.visible,
1967
+ showTitle: false
1669
1968
  }, {
1670
- title: vue.withCtx(() => [
1671
- _hoisted_1$4
1672
- ]),
1673
1969
  default: vue.withCtx(() => [
1674
- vue.createElementVNode("div", {
1675
- class: vue.normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
1676
- }, [
1677
- !props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$4, [
1678
- vue.createElementVNode("div", {
1679
- class: "upload-wrap_box",
1680
- onClick: emitEvent
1681
- }, [
1682
- vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "icon pointer" }, {
1970
+ vue.createElementVNode("div", _hoisted_1$4, [
1971
+ vue.createElementVNode("div", _hoisted_2$4, [
1972
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(titleList.value, (item, index) => {
1973
+ return vue.openBlock(), vue.createElementBlock("div", {
1974
+ key: index,
1975
+ class: vue.normalizeClass(["title", { active: item.id === activeTitle.value }]),
1976
+ onClick: ($event) => changeTab(item)
1977
+ }, [
1978
+ vue.createTextVNode(vue.toDisplayString(item.value) + " ", 1),
1979
+ item.id === activeTitle.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3)) : vue.createCommentVNode("", true)
1980
+ ], 10, _hoisted_3$4);
1981
+ }), 128)),
1982
+ [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),
1983
+ 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)
1984
+ ]),
1985
+ activeTitle.value === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
1986
+ vue.createElementVNode("div", _hoisted_8, [
1987
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(contentImgList), (item, index) => {
1988
+ return vue.openBlock(), vue.createElementBlock("div", {
1989
+ key: index,
1990
+ class: "image-item",
1991
+ onClick: ($event) => selectImage(item, 1)
1992
+ }, [
1993
+ vue.createElementVNode("img", {
1994
+ src: item.imgOrgUrl,
1995
+ alt: "",
1996
+ class: "image"
1997
+ }, null, 8, _hoisted_10),
1998
+ item.num ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
1999
+ vue.createElementVNode("div", _hoisted_12, vue.toDisplayString(item.num), 1)
2000
+ ])) : vue.createCommentVNode("", true)
2001
+ ], 8, _hoisted_9);
2002
+ }), 128))
2003
+ ])
2004
+ ])) : vue.createCommentVNode("", true),
2005
+ activeTitle.value === 2 ? (vue.openBlock(), vue.createElementBlock("div", {
2006
+ key: 1,
2007
+ class: vue.normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
2008
+ }, [
2009
+ !props.imgList.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
2010
+ vue.createElementVNode("div", {
2011
+ class: "upload-wrap_box",
2012
+ onClick: emitEvent
2013
+ }, [
2014
+ vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "icon pointer" }, {
2015
+ default: vue.withCtx(() => [
2016
+ vue.createVNode(vue.unref(iconsVue.Picture))
2017
+ ]),
2018
+ _: 1
2019
+ }),
2020
+ _hoisted_14
2021
+ ]),
2022
+ _hoisted_15
2023
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
2024
+ vue.createVNode(vue.unref(draggable__default.default), {
2025
+ modelValue: vue.unref(imgListTemp),
2026
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(imgListTemp) ? imgListTemp.value = $event : null),
2027
+ handle: ".img-item",
2028
+ class: "img-wrap",
2029
+ group: "people",
2030
+ onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
2031
+ "item-key": "id",
2032
+ onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
2033
+ }, {
2034
+ item: vue.withCtx(({ element }) => [
2035
+ (vue.openBlock(), vue.createElementBlock("div", {
2036
+ key: element.id,
2037
+ class: "img-item"
2038
+ }, [
2039
+ vue.createElementVNode("img", {
2040
+ src: element.src,
2041
+ style: { "object-fit": "contain" },
2042
+ width: "120",
2043
+ height: "120"
2044
+ }, null, 8, _hoisted_17),
2045
+ vue.createVNode(vue.unref(iconsVue.CircleCloseFilled), {
2046
+ class: "icon pointer",
2047
+ onClick: ($event) => deleteImg(element)
2048
+ }, null, 8, ["onClick"])
2049
+ ]))
2050
+ ]),
2051
+ footer: vue.withCtx(() => [
2052
+ vue.createElementVNode("div", {
2053
+ class: "upload-icon pointer",
2054
+ onClick: emitEvent
2055
+ }, [
2056
+ vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "icon pointer" }, {
2057
+ default: vue.withCtx(() => [
2058
+ vue.createVNode(vue.unref(iconsVue.Plus))
2059
+ ]),
2060
+ _: 1
2061
+ })
2062
+ ])
2063
+ ]),
2064
+ _: 1
2065
+ }, 8, ["modelValue"])
2066
+ ])),
2067
+ vue.createElementVNode("div", _hoisted_18, [
2068
+ vue.createElementVNode("input", {
2069
+ type: "file",
2070
+ name: "file",
2071
+ multiple: "",
2072
+ class: "imageFile",
2073
+ accept: "image/*",
2074
+ onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
2075
+ }, null, 32)
2076
+ ])
2077
+ ], 2)) : vue.createCommentVNode("", true),
2078
+ activeTitle.value === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
2079
+ vue.createElementVNode("div", _hoisted_20, [
2080
+ vue.createElementVNode("div", null, [
2081
+ vue.createVNode(vue.unref(elementPlus.ElSelect), {
2082
+ modelValue: selectData.brandId,
2083
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
2084
+ placeholder: "\u8BF7\u9009\u62E9\u54C1\u724C",
2085
+ size: "large",
2086
+ class: "select_1",
2087
+ onChange: changeBrandId
2088
+ }, {
2089
+ default: vue.withCtx(() => [
2090
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(brandList.value, (item, index) => {
2091
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
2092
+ key: index,
2093
+ label: item.brandName,
2094
+ value: item.brandId
2095
+ }, null, 8, ["label", "value"]);
2096
+ }), 128))
2097
+ ]),
2098
+ _: 1
2099
+ }, 8, ["modelValue"]),
2100
+ vue.createVNode(vue.unref(elementPlus.ElSelect), {
2101
+ modelValue: selectData.goodId,
2102
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
2103
+ placeholder: "\u8BF7\u9009\u62E9\u8F66\u578B",
2104
+ size: "large",
2105
+ class: "select_1",
2106
+ onChange: changeGoodId
2107
+ }, {
2108
+ default: vue.withCtx(() => [
2109
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(goodList.value, (item, index) => {
2110
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
2111
+ key: index,
2112
+ label: item.goodName,
2113
+ value: item.goodId
2114
+ }, null, 8, ["label", "value"]);
2115
+ }), 128))
2116
+ ]),
2117
+ _: 1
2118
+ }, 8, ["modelValue"]),
2119
+ vue.createVNode(vue.unref(elementPlus.ElSelect), {
2120
+ modelValue: selectData.carId,
2121
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
2122
+ placeholder: "\u8BF7\u9009\u62E9\u6B3E\u578B",
2123
+ size: "large",
2124
+ class: "select_2"
2125
+ }, {
2126
+ default: vue.withCtx(() => [
2127
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(carList.value, (item, index) => {
2128
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
2129
+ key: index,
2130
+ label: item.goodsCarName,
2131
+ value: item.carId
2132
+ }, null, 8, ["label", "value"]);
2133
+ }), 128))
2134
+ ]),
2135
+ _: 1
2136
+ }, 8, ["modelValue"])
2137
+ ]),
2138
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
2139
+ type: "primary",
2140
+ size: "large",
2141
+ style: { "width": "80px" },
2142
+ onClick: search
2143
+ }, {
1683
2144
  default: vue.withCtx(() => [
1684
- vue.createVNode(vue.unref(iconsVue.Picture))
2145
+ _hoisted_21
1685
2146
  ]),
1686
2147
  _: 1
1687
- }),
1688
- _hoisted_3$4
2148
+ })
1689
2149
  ]),
1690
- _hoisted_4$3
1691
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
1692
- vue.createVNode(vue.unref(draggable__default.default), {
1693
- modelValue: vue.unref(imgListTemp),
1694
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(imgListTemp) ? imgListTemp.value = $event : null),
1695
- handle: ".img-item",
1696
- class: "img-wrap",
1697
- group: "people",
1698
- onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
1699
- "item-key": "id",
1700
- onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
1701
- }, {
1702
- item: vue.withCtx(({ element }) => [
1703
- (vue.openBlock(), vue.createElementBlock("div", {
1704
- key: element.id,
1705
- class: "img-item"
1706
- }, [
1707
- vue.createElementVNode("img", {
1708
- src: element.src,
1709
- style: { "object-fit": "cover" },
1710
- width: "120",
1711
- height: "120"
1712
- }, null, 8, _hoisted_6),
1713
- vue.createVNode(vue.unref(iconsVue.CircleCloseFilled), {
1714
- class: "icon pointer",
1715
- onClick: ($event) => deleteImg(element)
1716
- }, null, 8, ["onClick"])
1717
- ]))
1718
- ]),
1719
- footer: vue.withCtx(() => [
1720
- vue.createElementVNode("div", {
1721
- class: "upload-icon pointer",
1722
- onClick: emitEvent
1723
- }, [
1724
- vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "icon pointer" }, {
1725
- default: vue.withCtx(() => [
1726
- vue.createVNode(vue.unref(iconsVue.Plus))
1727
- ]),
1728
- _: 1
1729
- })
1730
- ])
2150
+ tabList.value && tabList.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
2151
+ vue.createElementVNode("div", _hoisted_23, [
2152
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tabList.value, (item, index) => {
2153
+ return vue.openBlock(), vue.createElementBlock("div", {
2154
+ key: index,
2155
+ class: vue.normalizeClass(["tab", { active: item.type === activeTab.value }]),
2156
+ onClick: ($event) => activeTab.value = item.type
2157
+ }, [
2158
+ vue.createTextVNode(vue.toDisplayString(item.name) + " ", 1),
2159
+ item.type === activeTab.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25)) : vue.createCommentVNode("", true)
2160
+ ], 10, _hoisted_24);
2161
+ }), 128))
1731
2162
  ]),
1732
- _: 1
1733
- }, 8, ["modelValue"])
1734
- ])),
1735
- vue.createElementVNode("div", _hoisted_7, [
1736
- vue.createElementVNode("input", {
1737
- type: "file",
1738
- name: "file",
1739
- multiple: "",
1740
- class: "imageFile",
1741
- accept: "image/*",
1742
- onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
1743
- }, null, 32)
1744
- ])
1745
- ], 2)
2163
+ vue.createElementVNode("div", _hoisted_26, [
2164
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(imageList), (item, index) => {
2165
+ return vue.openBlock(), vue.createElementBlock("div", {
2166
+ key: index,
2167
+ class: "image-item",
2168
+ onClick: ($event) => selectImage(item, 3)
2169
+ }, [
2170
+ vue.createElementVNode("img", {
2171
+ src: item.imgOrgUrl,
2172
+ alt: "",
2173
+ class: "image"
2174
+ }, null, 8, _hoisted_28),
2175
+ item.num ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [
2176
+ vue.createElementVNode("div", _hoisted_30, vue.toDisplayString(item.num), 1)
2177
+ ])) : vue.createCommentVNode("", true)
2178
+ ], 8, _hoisted_27);
2179
+ }), 128))
2180
+ ])
2181
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_31, _hoisted_33))
2182
+ ])) : vue.createCommentVNode("", true)
2183
+ ])
1746
2184
  ]),
1747
2185
  _: 1
1748
2186
  }, 8, ["visible"]);
@@ -2006,7 +2444,9 @@
2006
2444
  "getEassyDetail",
2007
2445
  "getArticleList",
2008
2446
  "importEssay",
2009
- "uploadImageByOther"
2447
+ "uploadImageByOther",
2448
+ "chartGallery",
2449
+ "request"
2010
2450
  ],
2011
2451
  data() {
2012
2452
  return {
@@ -2021,6 +2461,7 @@
2021
2461
  setAlignFlag: true,
2022
2462
  article: {},
2023
2463
  imgList: [],
2464
+ imgNum: 20,
2024
2465
  videoList: [],
2025
2466
  visibleVideo: false,
2026
2467
  visibleCollectArticle: false,
@@ -2068,7 +2509,9 @@
2068
2509
  },
2069
2510
  countList: [],
2070
2511
  replaceSeamless: 0,
2071
- seamlessCount: 0
2512
+ seamlessCount: 0,
2513
+ overLine: "",
2514
+ currentVideo: null
2072
2515
  };
2073
2516
  },
2074
2517
  computed: {
@@ -2218,6 +2661,12 @@
2218
2661
  this.imgUploadHandler(type, src);
2219
2662
  });
2220
2663
  },
2664
+ replacePoster(e) {
2665
+ this.$emit("insertImgs", e.target.files, "replace-poster", (type, src) => {
2666
+ this.visibleImg = false;
2667
+ this.imgUploadHandler(type, src);
2668
+ });
2669
+ },
2221
2670
  againImg(e) {
2222
2671
  this.$emit("insertImgs", e.target.files, "uploadAgainImages", (type, src) => {
2223
2672
  this.visibleImg = false;
@@ -2407,7 +2856,9 @@
2407
2856
  node.onclick = function() {
2408
2857
  me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2409
2858
  };
2859
+ const replaceBtn = me2.insertVideoBtns(this, video);
2410
2860
  node.appendChild(delBtn);
2861
+ node.appendChild(replaceBtn);
2411
2862
  },
2412
2863
  async parseArticle(node) {
2413
2864
  const data = JSON.parse(node.dataset.article);
@@ -2508,20 +2959,95 @@
2508
2959
  uploadArticle() {
2509
2960
  this.visibleArticle = true;
2510
2961
  },
2511
- uploadImg(type) {
2962
+ uploadImg(type, num) {
2512
2963
  this.visibleImg = true;
2513
2964
  this.imgType = type;
2514
2965
  this.imgList = [];
2966
+ this.imgNum = num || 20;
2515
2967
  },
2516
- submitImg() {
2517
- const files = this.imgList.map((item) => item.file);
2968
+ async submitImg() {
2518
2969
  this.count = 0;
2519
2970
  this.countList = [];
2520
2971
  this.seamlessCount = 0;
2521
- this.$emit("insertImgs", files, "img", (type, src) => {
2972
+ if (this.imgList.length) {
2973
+ const idList = [];
2974
+ const list_1 = [];
2975
+ const list_2 = [];
2976
+ const list_3 = [];
2977
+ this.imgList.forEach((v) => {
2978
+ idList.push(v.id);
2979
+ if (v.type === 1) {
2980
+ list_1.push(v);
2981
+ } else if (v.type === 3) {
2982
+ list_3.push(v);
2983
+ } else {
2984
+ list_2.push(v);
2985
+ }
2986
+ });
2987
+ const list_2_new = await this.reviseFilesImg(list_2);
2988
+ const list_3_new = await this.reviseSrcImg(list_3);
2989
+ const list_all = [...list_1, ...list_2_new, ...list_3_new];
2990
+ const imgList_new = [];
2991
+ idList.forEach((id) => {
2992
+ const item = list_all.find((value) => value.id === id);
2993
+ if (item && item.src) {
2994
+ imgList_new.push(item);
2995
+ }
2996
+ });
2997
+ if (this.imgType === "coverImg") {
2998
+ this.$emit("insertImgs", imgList_new, this.imgType);
2999
+ } else {
3000
+ imgList_new.forEach((img) => {
3001
+ this.imgUploadHandler("img", img.src);
3002
+ });
3003
+ }
2522
3004
  this.visibleImg = false;
2523
- this.imgUploadHandler(type, src);
2524
- });
3005
+ } else {
3006
+ this.visibleImg = false;
3007
+ }
3008
+ },
3009
+ async reviseFilesImg(list) {
3010
+ if (list.length) {
3011
+ const p_l = [];
3012
+ list.forEach((v) => {
3013
+ const p = new Promise((resolve, reject) => {
3014
+ try {
3015
+ this.$emit("insertImgs", [v.file], "img", (type, src) => {
3016
+ resolve({ ...v, src });
3017
+ });
3018
+ } catch (error) {
3019
+ reject(error);
3020
+ }
3021
+ });
3022
+ p_l.push(p);
3023
+ });
3024
+ const res = await Promise.all(p_l);
3025
+ return res;
3026
+ } else {
3027
+ return [];
3028
+ }
3029
+ },
3030
+ async reviseSrcImg(list) {
3031
+ const copyToEssayImg = this.request.copyToEssayImg;
3032
+ if (copyToEssayImg && list.length) {
3033
+ const arr = [];
3034
+ list.forEach((v) => {
3035
+ arr.push(v.src);
3036
+ });
3037
+ const res = await copyToEssayImg({ imgUrls: arr.join(",") });
3038
+ if (res.data.code === 0) {
3039
+ const data = res.data.data || "";
3040
+ const list_new = data ? data.split(",") : [];
3041
+ list.forEach((v, i) => {
3042
+ v.src = list_new[i] || "";
3043
+ });
3044
+ return list;
3045
+ } else {
3046
+ return [];
3047
+ }
3048
+ } else {
3049
+ return [];
3050
+ }
2525
3051
  },
2526
3052
  imgUploadHandler(type, imgSrc) {
2527
3053
  const me2 = this;
@@ -2539,6 +3065,20 @@
2539
3065
  seamlessFlag: me2.replaceSeamless,
2540
3066
  type: "2"
2541
3067
  }, this.range);
3068
+ } else if (type === "replace-poster") {
3069
+ if (this.currentVideo) {
3070
+ this.currentVideo.poster = imgSrc;
3071
+ try {
3072
+ const videoData = JSON.parse(this.currentVideo.getAttribute("data") || "{}");
3073
+ this.currentVideo.setAttribute("data", JSON.stringify({ ...videoData, img: imgSrc }));
3074
+ const contentNode = this.currentVideo.parentNode;
3075
+ const contentData = JSON.parse(contentNode.dataset.video || "{}");
3076
+ contentNode.dataset.video = JSON.stringify({ ...contentData, img: imgSrc });
3077
+ } catch (error) {
3078
+ console.log(error);
3079
+ }
3080
+ this.currentVideo = null;
3081
+ }
2542
3082
  } else {
2543
3083
  this.seamlessCount++;
2544
3084
  const isLast = this.seamlessCount === this.imgList.length;
@@ -2557,6 +3097,21 @@
2557
3097
  this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
2558
3098
  }
2559
3099
  },
3100
+ insertVideoBtns(editor, node) {
3101
+ const me2 = this;
3102
+ var replaceBtn = editor.createElement("div", {
3103
+ "class": "video-cover-replace pointer",
3104
+ "contenteditable": "false"
3105
+ });
3106
+ replaceBtn.onclick = function(e) {
3107
+ const posterBtn = document.querySelector(".replace-poster");
3108
+ posterBtn.click();
3109
+ me2.currentVideo = node;
3110
+ e.stopPropagation();
3111
+ };
3112
+ replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
3113
+ return replaceBtn;
3114
+ },
2560
3115
  insertImgOperateBtns(editor, data) {
2561
3116
  const me2 = this;
2562
3117
  var replaceBtn = editor.createElement("div", {
@@ -2669,7 +3224,7 @@
2669
3224
  },
2670
3225
  initSquire() {
2671
3226
  const me2 = this;
2672
- me2.editorDom;
3227
+ const editorDom = me2.editorDom;
2673
3228
  me2.editor = new window.Squire(me2.editorDom, {
2674
3229
  blockTag: "p",
2675
3230
  blockAttributes: {
@@ -2788,7 +3343,8 @@
2788
3343
  "data": JSON.stringify(data),
2789
3344
  "style": isSeameless ? "margin: 0" : "margin-top: 0",
2790
3345
  "data-content": data.content || "",
2791
- "contenteditable": "false"
3346
+ "contenteditable": "false",
3347
+ "draggable": "false"
2792
3348
  });
2793
3349
  const btns = me2.insertImgOperateBtns(this, data);
2794
3350
  var childList = [];
@@ -2799,8 +3355,15 @@
2799
3355
  !isHaloImage && childList.push(again);
2800
3356
  var p = this.createElement("div", {
2801
3357
  "class": "halo-img-content",
2802
- "contenteditable": "false"
3358
+ "contenteditable": "false",
3359
+ "draggable": "false"
2803
3360
  }, [...childList]);
3361
+ p.onfocus = function() {
3362
+ img.style["outline"] = "1px solid #1a74ff";
3363
+ };
3364
+ p.onblur = function() {
3365
+ img.style["outline"] = "none";
3366
+ };
2804
3367
  this.insertElement(p, range);
2805
3368
  if (isSeameless) {
2806
3369
  me2.removeDefault(p, "nextElementSibling");
@@ -2849,14 +3412,41 @@
2849
3412
  }
2850
3413
  });
2851
3414
  console.log(delBtn);
3415
+ const posterBtn = me2.insertVideoBtns(this, video);
2852
3416
  var p = this.createElement("DIV", {
2853
3417
  "class": "halo-video-content",
2854
- "contenteditable": "true",
2855
- "data-video": JSON.stringify(data)
2856
- }, [video, delBtn]);
3418
+ "contenteditable": "false",
3419
+ "data-video": JSON.stringify(data),
3420
+ "draggable": "true"
3421
+ }, [video, delBtn, posterBtn]);
2857
3422
  p.onclick = function() {
2858
3423
  me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2859
3424
  };
3425
+ let targetMove = "";
3426
+ p.ondragstart = function(e) {
3427
+ if (!(e.target.className.indexOf("halo-video-content") < 0)) {
3428
+ e.dataTransfer.setData("text/html", e.target);
3429
+ e.dataTransfer.effectAllowed = "move";
3430
+ e.dataTransfer.dropEffect = "move";
3431
+ targetMove = e.target;
3432
+ }
3433
+ };
3434
+ editorDom.ondragover = function(e) {
3435
+ if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
3436
+ e.preventDefault();
3437
+ }
3438
+ };
3439
+ editorDom.ondrop = function(e) {
3440
+ if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
3441
+ if (e.target === editorDom) {
3442
+ e.target.appendChild(targetMove);
3443
+ } else {
3444
+ e.target.after(targetMove);
3445
+ }
3446
+ targetMove = "";
3447
+ e.preventDefault();
3448
+ }
3449
+ };
2860
3450
  this.insertElement(p);
2861
3451
  setTimeout(() => {
2862
3452
  document.documentElement.scrollTop = scrollTop;
@@ -3080,11 +3670,16 @@
3080
3670
  getSticker(type, handler) {
3081
3671
  this.setSticker(type.fragment.children);
3082
3672
  },
3083
- setSticker(data) {
3673
+ setSticker(data, isImport) {
3084
3674
  const me2 = this;
3085
3675
  data = Array.from(data);
3086
3676
  data.map(function(value, index) {
3087
- const htmlArr = (value.innerHTML || value.outerHTML).replace(/<img(.*?)src="(.*?)"(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<img(.*?)src='(.*?)'(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<a href="(.*?)"(.*?)>(.*?)<\/a>/g, "(delimiter)$3(delimiter)").replace(/<p (.*?)>(.*?)<\/p>/g, "(delimiter)$2(delimiter)").replace(/<\/?.+?>/g, "").split("(delimiter)");
3677
+ let htmlArr = [];
3678
+ if (isImport) {
3679
+ htmlArr = value.outerHTML.replace(/<img(.*?)src="(.*?)"(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<img(.*?)src='(.*?)'(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<a href="(.*?)"(.*?)>(.*?)<\/a>/g, "(delimiter)$3(delimiter)").replace(/<p (.*?)>(.*?)<\/p>/g, '(delimiter)<p class="halo-paragraph" $1>$2</p>(delimiter)').split("(delimiter)");
3680
+ } else {
3681
+ htmlArr = (value.innerHTML || value.outerHTML).replace(/<img(.*?)src="(.*?)"(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<img(.*?)src='(.*?)'(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<a href="(.*?)"(.*?)>(.*?)<\/a>/g, "(delimiter)$3(delimiter)").replace(/<p (.*?)>(.*?)<\/p>/g, "(delimiter)$2(delimiter)").replace(/<\/?.+?>/g, "").split("(delimiter)");
3682
+ }
3088
3683
  htmlArr.map(function(nValue) {
3089
3684
  if (!nValue || nValue === "&nbsp;") {
3090
3685
  return;
@@ -3248,7 +3843,7 @@
3248
3843
  data.data.content = data.data.content.replace(/<a href="(.*?)"(.*?)>/g, "").replace(/<\/a>/g, "").replace(/<iframe([^<>]*)>([^<>]*)<\/iframe>/g, "").replace(/<video([^<>]*)>([^<>]*)<\/video>/g, "");
3249
3844
  const importContent = document.createElement("div");
3250
3845
  importContent.innerHTML = data.data.content;
3251
- me2.setSticker(importContent.children);
3846
+ me2.setSticker(importContent.children, true);
3252
3847
  me2.closeDialog();
3253
3848
  me2.linkContent = "";
3254
3849
  return;
@@ -3396,8 +3991,11 @@
3396
3991
  "onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
3397
3992
  visible: $data.visibleImg,
3398
3993
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
3994
+ chartGallery: $props.chartGallery,
3995
+ request: $props.request,
3996
+ imgNum: $data.imgNum,
3399
3997
  onSubmit: $options.submitImg
3400
- }, null, 8, ["img-list", "visible", "onSubmit"]),
3998
+ }, null, 8, ["img-list", "visible", "chartGallery", "request", "imgNum", "onSubmit"]),
3401
3999
  vue.createVNode(_component_VideoUpload, {
3402
4000
  visible: $data.visibleVideo,
3403
4001
  "onUpdate:visible": _cache[8] || (_cache[8] = ($event) => $data.visibleVideo = $event),
@@ -3424,6 +4022,13 @@
3424
4022
  class: "replace-input hide",
3425
4023
  accept: "image/*",
3426
4024
  onChange: _cache[12] || (_cache[12] = (...args) => $options.replaceImg && $options.replaceImg(...args))
4025
+ }, null, 32),
4026
+ vue.createElementVNode("input", {
4027
+ type: "file",
4028
+ name: "file",
4029
+ class: "replace-poster hide",
4030
+ accept: "image/*",
4031
+ onChange: _cache[13] || (_cache[13] = (...args) => $options.replacePoster && $options.replacePoster(...args))
3427
4032
  }, null, 32)
3428
4033
  ]);
3429
4034
  }
@@ -4860,12 +5465,12 @@
4860
5465
  };
4861
5466
  };
4862
5467
  var replaceStyles = function(node, parent) {
4863
- var style = node.style;
5468
+ var style2 = node.style;
4864
5469
  var doc2 = node.ownerDocument;
4865
5470
  var attr, converter, css, newTreeBottom, newTreeTop, el;
4866
5471
  for (attr in styleToSemantic) {
4867
5472
  converter = styleToSemantic[attr];
4868
- css = style[attr];
5473
+ css = style2[attr];
4869
5474
  if (css && converter.regexp.test(css)) {
4870
5475
  el = converter.replace(doc2, css);
4871
5476
  if (!newTreeTop) {
@@ -6027,7 +6632,7 @@
6027
6632
  size: undefined$1
6028
6633
  };
6029
6634
  var seenAttributes = 0;
6030
- var element, style, attr;
6635
+ var element, style2, attr;
6031
6636
  if (!range && !(range = this.getSelection())) {
6032
6637
  return fontInfo;
6033
6638
  }
@@ -6037,20 +6642,20 @@
6037
6642
  element = element.parentNode;
6038
6643
  }
6039
6644
  while (seenAttributes < 4 && element) {
6040
- if (style = element.style) {
6041
- if (!fontInfo.color && (attr = style.color)) {
6645
+ if (style2 = element.style) {
6646
+ if (!fontInfo.color && (attr = style2.color)) {
6042
6647
  fontInfo.color = attr;
6043
6648
  seenAttributes += 1;
6044
6649
  }
6045
- if (!fontInfo.backgroundColor && (attr = style.backgroundColor)) {
6650
+ if (!fontInfo.backgroundColor && (attr = style2.backgroundColor)) {
6046
6651
  fontInfo.backgroundColor = attr;
6047
6652
  seenAttributes += 1;
6048
6653
  }
6049
- if (!fontInfo.family && (attr = style.fontFamily)) {
6654
+ if (!fontInfo.family && (attr = style2.fontFamily)) {
6050
6655
  fontInfo.family = attr;
6051
6656
  seenAttributes += 1;
6052
6657
  }
6053
- if (!fontInfo.size && (attr = style.fontSize)) {
6658
+ if (!fontInfo.size && (attr = style2.fontSize)) {
6054
6659
  fontInfo.size = attr;
6055
6660
  seenAttributes += 1;
6056
6661
  }
@@ -6805,11 +7410,11 @@
6805
7410
  };
6806
7411
  proto.addStyles = function(styles) {
6807
7412
  if (styles) {
6808
- var head = this._doc.documentElement.firstChild, style = this.createElement("STYLE", {
7413
+ var head = this._doc.documentElement.firstChild, style2 = this.createElement("STYLE", {
6809
7414
  type: "text/css"
6810
7415
  });
6811
- style.appendChild(this._doc.createTextNode(styles));
6812
- head.appendChild(style);
7416
+ style2.appendChild(this._doc.createTextNode(styles));
7417
+ head.appendChild(style2);
6813
7418
  }
6814
7419
  return this;
6815
7420
  };