@haluo/biz 2.0.13 → 2.0.14-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/haluo-biz.js +792 -189
- package/dist/haluo-biz.umd.cjs +802 -199
- package/dist/style.css +244 -26
- package/package.json +1 -1
package/dist/haluo-biz.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElTooltip, ElDivider, ElPopover, ElDialog, ElButton, ElRadio, ElInput, ElInfiniteScroll, ElMessage, ElIcon, ElFormItem, ElForm, ElMessageBox } from "element-plus";
|
|
1
|
+
import { ElTooltip, ElDivider, ElPopover, ElDialog, ElButton, ElRadio, ElInput, ElInfiniteScroll, ElMessage, ElIcon, ElSelect, ElOption, ElFormItem, ElForm, ElMessageBox } from "element-plus";
|
|
2
2
|
import { defineComponent, ref, computed, openBlock, createElementBlock, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, Fragment, renderList, withDirectives, isRef, vModelText, pushScopeId, popScopeId, watch, getCurrentScope, onScopeDispose, resolveComponent, resolveDirective, createVNode, withCtx, toDisplayString, createBlock, inject, renderSlot, createTextVNode, provide, toRefs, reactive, onMounted, withKeys, h, render, vShow } from "vue";
|
|
3
3
|
import { Picture, CircleCloseFilled, Plus } from "@element-plus/icons-vue";
|
|
4
4
|
import util from "@haluo/util";
|
|
@@ -300,6 +300,15 @@ O.install = function(e, t) {
|
|
|
300
300
|
e.component(O.name, O);
|
|
301
301
|
};
|
|
302
302
|
console.log("name", O.name);
|
|
303
|
+
const Se = [
|
|
304
|
+
O
|
|
305
|
+
], Fe = function(e) {
|
|
306
|
+
Se.map((t) => e.component(t.name, t));
|
|
307
|
+
}, De = {
|
|
308
|
+
install: Fe,
|
|
309
|
+
colorPicker: O
|
|
310
|
+
};
|
|
311
|
+
const style = "";
|
|
303
312
|
const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
304
313
|
const ToolBar_vue_vue_type_style_index_1_lang = "";
|
|
305
314
|
const _export_sfc = (sfc, props) => {
|
|
@@ -313,7 +322,8 @@ const _sfc_main$7 = {
|
|
|
313
322
|
components: {
|
|
314
323
|
ElTooltip,
|
|
315
324
|
ElDivider,
|
|
316
|
-
ElPopover
|
|
325
|
+
ElPopover,
|
|
326
|
+
colorPicker: De.colorPicker
|
|
317
327
|
},
|
|
318
328
|
props: ["editor", "isOss", "hiddenTools"],
|
|
319
329
|
data() {
|
|
@@ -517,49 +527,49 @@ const _hoisted_2$7 = { class: "tools-content" };
|
|
|
517
527
|
const _hoisted_3$7 = ["src"];
|
|
518
528
|
const _hoisted_4$6 = ["src"];
|
|
519
529
|
const _hoisted_5$5 = ["src"];
|
|
520
|
-
const _hoisted_6$
|
|
530
|
+
const _hoisted_6$3 = { class: "box" };
|
|
521
531
|
const _hoisted_7$2 = ["src"];
|
|
522
|
-
const _hoisted_8$
|
|
532
|
+
const _hoisted_8$2 = {
|
|
523
533
|
key: 0,
|
|
524
534
|
class: "box-mask"
|
|
525
535
|
};
|
|
526
|
-
const _hoisted_9$
|
|
527
|
-
const _hoisted_10$
|
|
528
|
-
const _hoisted_11$
|
|
529
|
-
const _hoisted_12$
|
|
530
|
-
const _hoisted_13$
|
|
531
|
-
const _hoisted_14$
|
|
532
|
-
const _hoisted_15$
|
|
533
|
-
const _hoisted_16$
|
|
536
|
+
const _hoisted_9$2 = { class: "tools-title" };
|
|
537
|
+
const _hoisted_10$2 = ["src"];
|
|
538
|
+
const _hoisted_11$2 = { class: "tools-font" };
|
|
539
|
+
const _hoisted_12$2 = ["onClick"];
|
|
540
|
+
const _hoisted_13$2 = { style: { "font-size": "10px" } };
|
|
541
|
+
const _hoisted_14$2 = { class: "box" };
|
|
542
|
+
const _hoisted_15$2 = ["src"];
|
|
543
|
+
const _hoisted_16$2 = {
|
|
534
544
|
key: 0,
|
|
535
545
|
class: "box-mask"
|
|
536
546
|
};
|
|
537
|
-
const _hoisted_17 = { class: "box" };
|
|
538
|
-
const _hoisted_18 = ["src"];
|
|
539
|
-
const _hoisted_19 = {
|
|
547
|
+
const _hoisted_17$1 = { class: "box" };
|
|
548
|
+
const _hoisted_18$1 = ["src"];
|
|
549
|
+
const _hoisted_19$1 = {
|
|
540
550
|
key: 0,
|
|
541
551
|
class: "box-mask"
|
|
542
552
|
};
|
|
543
|
-
const _hoisted_20 = { class: "tools-title" };
|
|
544
|
-
const _hoisted_21 = ["src"];
|
|
545
|
-
const _hoisted_22 = ["src"];
|
|
546
|
-
const _hoisted_23 = { class: "tools-title_content" };
|
|
547
|
-
const _hoisted_24 = { class: "box" };
|
|
548
|
-
const _hoisted_25 = ["src"];
|
|
549
|
-
const _hoisted_26 = {
|
|
553
|
+
const _hoisted_20$1 = { class: "tools-title" };
|
|
554
|
+
const _hoisted_21$1 = ["src"];
|
|
555
|
+
const _hoisted_22$1 = ["src"];
|
|
556
|
+
const _hoisted_23$1 = { class: "tools-title_content" };
|
|
557
|
+
const _hoisted_24$1 = { class: "box" };
|
|
558
|
+
const _hoisted_25$1 = ["src"];
|
|
559
|
+
const _hoisted_26$1 = {
|
|
550
560
|
key: 0,
|
|
551
561
|
class: "box-mask"
|
|
552
562
|
};
|
|
553
|
-
const _hoisted_27 = { class: "box" };
|
|
554
|
-
const _hoisted_28 = ["src"];
|
|
555
|
-
const _hoisted_29 = {
|
|
563
|
+
const _hoisted_27$1 = { class: "box" };
|
|
564
|
+
const _hoisted_28$1 = ["src"];
|
|
565
|
+
const _hoisted_29$1 = {
|
|
556
566
|
key: 0,
|
|
557
567
|
class: "box-mask"
|
|
558
568
|
};
|
|
559
|
-
const _hoisted_30 = { class: "box" };
|
|
560
|
-
const _hoisted_31 = ["src"];
|
|
561
|
-
const _hoisted_32 = ["src"];
|
|
562
|
-
const _hoisted_33 = ["src"];
|
|
569
|
+
const _hoisted_30$1 = { class: "box" };
|
|
570
|
+
const _hoisted_31$1 = ["src"];
|
|
571
|
+
const _hoisted_32$1 = ["src"];
|
|
572
|
+
const _hoisted_33$1 = ["src"];
|
|
563
573
|
const _hoisted_34 = ["src"];
|
|
564
574
|
const _hoisted_35 = { class: "tools-title" };
|
|
565
575
|
const _hoisted_36 = ["src"];
|
|
@@ -649,7 +659,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
649
659
|
placement: "top"
|
|
650
660
|
}, {
|
|
651
661
|
default: withCtx(() => [
|
|
652
|
-
createElementVNode("div", _hoisted_6$
|
|
662
|
+
createElementVNode("div", _hoisted_6$3, [
|
|
653
663
|
createElementVNode("img", {
|
|
654
664
|
src: $options.getImageUrl("tools_refresh@3x.png"),
|
|
655
665
|
width: "40",
|
|
@@ -657,7 +667,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
657
667
|
alt: "",
|
|
658
668
|
onClick: _cache[3] || (_cache[3] = (...args) => $options.copyFormat && $options.copyFormat(...args))
|
|
659
669
|
}, null, 8, _hoisted_7$2),
|
|
660
|
-
$props.editor.cursorStyle !== "auto" ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
670
|
+
$props.editor.cursorStyle !== "auto" ? (openBlock(), createElementBlock("div", _hoisted_8$2)) : createCommentVNode("", true)
|
|
661
671
|
])
|
|
662
672
|
]),
|
|
663
673
|
_: 1
|
|
@@ -672,7 +682,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
672
682
|
width: "152"
|
|
673
683
|
}, {
|
|
674
684
|
reference: withCtx(() => [
|
|
675
|
-
createElementVNode("div", _hoisted_9$
|
|
685
|
+
createElementVNode("div", _hoisted_9$2, [
|
|
676
686
|
createVNode(_component_el_tooltip, {
|
|
677
687
|
class: "item",
|
|
678
688
|
effect: "dark",
|
|
@@ -691,7 +701,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
691
701
|
width: "16",
|
|
692
702
|
height: "40",
|
|
693
703
|
alt: ""
|
|
694
|
-
}, null, 8, _hoisted_10$
|
|
704
|
+
}, null, 8, _hoisted_10$2)
|
|
695
705
|
], 2)
|
|
696
706
|
]),
|
|
697
707
|
_: 1
|
|
@@ -699,7 +709,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
699
709
|
])
|
|
700
710
|
]),
|
|
701
711
|
default: withCtx(() => [
|
|
702
|
-
withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$
|
|
712
|
+
withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$2, [
|
|
703
713
|
(openBlock(true), createElementBlock(Fragment, null, renderList($data.fontsizes, (item, index) => {
|
|
704
714
|
return openBlock(), createElementBlock("li", {
|
|
705
715
|
class: normalizeClass([$data.activeFontsize + "px" === item.value ? "active" : ""]),
|
|
@@ -710,8 +720,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
710
720
|
createElementVNode("span", {
|
|
711
721
|
style: normalizeStyle({ fontSize: item.value })
|
|
712
722
|
}, toDisplayString(item.name), 5),
|
|
713
|
-
createElementVNode("span", _hoisted_13$
|
|
714
|
-
], 10, _hoisted_12$
|
|
723
|
+
createElementVNode("span", _hoisted_13$2, toDisplayString(item.desc), 1)
|
|
724
|
+
], 10, _hoisted_12$2);
|
|
715
725
|
}), 128))
|
|
716
726
|
])), [
|
|
717
727
|
[_directive_click_outside, $options.handlePopover]
|
|
@@ -730,7 +740,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
730
740
|
placement: "top"
|
|
731
741
|
}, {
|
|
732
742
|
default: withCtx(() => [
|
|
733
|
-
createElementVNode("div", _hoisted_14$
|
|
743
|
+
createElementVNode("div", _hoisted_14$2, [
|
|
734
744
|
createElementVNode("img", {
|
|
735
745
|
src: $options.getImageUrl("tools_title@3x.png"),
|
|
736
746
|
"data-editor-id": "makeHeader",
|
|
@@ -738,8 +748,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
738
748
|
height: "40",
|
|
739
749
|
alt: "",
|
|
740
750
|
onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
|
|
741
|
-
}, null, 8, _hoisted_15$
|
|
742
|
-
$data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$
|
|
751
|
+
}, null, 8, _hoisted_15$2),
|
|
752
|
+
$data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$2)) : createCommentVNode("", true)
|
|
743
753
|
])
|
|
744
754
|
]),
|
|
745
755
|
_: 1
|
|
@@ -751,15 +761,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
751
761
|
placement: "top"
|
|
752
762
|
}, {
|
|
753
763
|
default: withCtx(() => [
|
|
754
|
-
createElementVNode("div", _hoisted_17, [
|
|
764
|
+
createElementVNode("div", _hoisted_17$1, [
|
|
755
765
|
createElementVNode("img", {
|
|
756
766
|
src: $options.getImageUrl("tools_bold@3x.png"),
|
|
757
767
|
width: "40",
|
|
758
768
|
height: "40",
|
|
759
769
|
alt: "",
|
|
760
770
|
onClick: _cache[6] || (_cache[6] = ($event) => $options.setStyle($data.statusInfo.bold ? "removeBold" : "bold", "bold", !$data.statusInfo.bold))
|
|
761
|
-
}, null, 8, _hoisted_18),
|
|
762
|
-
$data.statusInfo && $data.statusInfo.bold ? (openBlock(), createElementBlock("div", _hoisted_19)) : createCommentVNode("", true)
|
|
771
|
+
}, null, 8, _hoisted_18$1),
|
|
772
|
+
$data.statusInfo && $data.statusInfo.bold ? (openBlock(), createElementBlock("div", _hoisted_19$1)) : createCommentVNode("", true)
|
|
763
773
|
])
|
|
764
774
|
]),
|
|
765
775
|
_: 1
|
|
@@ -771,7 +781,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
771
781
|
width: "152"
|
|
772
782
|
}, {
|
|
773
783
|
reference: withCtx(() => [
|
|
774
|
-
createElementVNode("div", _hoisted_20, [
|
|
784
|
+
createElementVNode("div", _hoisted_20$1, [
|
|
775
785
|
createVNode(_component_el_tooltip, {
|
|
776
786
|
class: "item",
|
|
777
787
|
effect: "dark",
|
|
@@ -789,13 +799,13 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
789
799
|
width: "24",
|
|
790
800
|
height: "40",
|
|
791
801
|
alt: ""
|
|
792
|
-
}, null, 8, _hoisted_21),
|
|
802
|
+
}, null, 8, _hoisted_21$1),
|
|
793
803
|
createElementVNode("img", {
|
|
794
804
|
src: $options.getImageUrl("tools_arrow@3x.png"),
|
|
795
805
|
width: "16",
|
|
796
806
|
height: "40",
|
|
797
807
|
alt: ""
|
|
798
|
-
}, null, 8, _hoisted_22)
|
|
808
|
+
}, null, 8, _hoisted_22$1)
|
|
799
809
|
], 2)
|
|
800
810
|
]),
|
|
801
811
|
_: 1
|
|
@@ -803,7 +813,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
803
813
|
])
|
|
804
814
|
]),
|
|
805
815
|
default: withCtx(() => [
|
|
806
|
-
withDirectives((openBlock(), createElementBlock("ul", _hoisted_23, [
|
|
816
|
+
withDirectives((openBlock(), createElementBlock("ul", _hoisted_23$1, [
|
|
807
817
|
createElementVNode("li", {
|
|
808
818
|
"data-editor-id": "makeHeader",
|
|
809
819
|
onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
|
|
@@ -830,15 +840,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
830
840
|
placement: "top"
|
|
831
841
|
}, {
|
|
832
842
|
default: withCtx(() => [
|
|
833
|
-
createElementVNode("div", _hoisted_24, [
|
|
843
|
+
createElementVNode("div", _hoisted_24$1, [
|
|
834
844
|
createElementVNode("img", {
|
|
835
845
|
src: $options.getImageUrl("tools_xie@3x.png"),
|
|
836
846
|
width: "40",
|
|
837
847
|
height: "40",
|
|
838
848
|
alt: "",
|
|
839
849
|
onClick: _cache[10] || (_cache[10] = ($event) => $options.setStyle($data.statusInfo.italic ? "removeItalic" : "italic", "italic", !$data.statusInfo.italic))
|
|
840
|
-
}, null, 8, _hoisted_25),
|
|
841
|
-
$data.statusInfo && $data.statusInfo.italic ? (openBlock(), createElementBlock("div", _hoisted_26)) : createCommentVNode("", true)
|
|
850
|
+
}, null, 8, _hoisted_25$1),
|
|
851
|
+
$data.statusInfo && $data.statusInfo.italic ? (openBlock(), createElementBlock("div", _hoisted_26$1)) : createCommentVNode("", true)
|
|
842
852
|
])
|
|
843
853
|
]),
|
|
844
854
|
_: 1
|
|
@@ -850,15 +860,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
850
860
|
placement: "top"
|
|
851
861
|
}, {
|
|
852
862
|
default: withCtx(() => [
|
|
853
|
-
createElementVNode("div", _hoisted_27, [
|
|
863
|
+
createElementVNode("div", _hoisted_27$1, [
|
|
854
864
|
createElementVNode("img", {
|
|
855
865
|
src: $options.getImageUrl("tools_line@3x.png"),
|
|
856
866
|
width: "40",
|
|
857
867
|
height: "40",
|
|
858
868
|
alt: "",
|
|
859
869
|
onClick: _cache[11] || (_cache[11] = ($event) => $options.setStyle($data.statusInfo.underline ? "removeUnderline" : "underline", "underline", !$data.statusInfo.underline))
|
|
860
|
-
}, null, 8, _hoisted_28),
|
|
861
|
-
$data.statusInfo && $data.statusInfo.underline ? (openBlock(), createElementBlock("div", _hoisted_29)) : createCommentVNode("", true)
|
|
870
|
+
}, null, 8, _hoisted_28$1),
|
|
871
|
+
$data.statusInfo && $data.statusInfo.underline ? (openBlock(), createElementBlock("div", _hoisted_29$1)) : createCommentVNode("", true)
|
|
862
872
|
])
|
|
863
873
|
]),
|
|
864
874
|
_: 1
|
|
@@ -871,14 +881,14 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
871
881
|
placement: "top"
|
|
872
882
|
}, {
|
|
873
883
|
default: withCtx(() => [
|
|
874
|
-
createElementVNode("div", _hoisted_30, [
|
|
884
|
+
createElementVNode("div", _hoisted_30$1, [
|
|
875
885
|
createElementVNode("img", {
|
|
876
886
|
src: $options.getImageUrl("icon_web_link@2x.png"),
|
|
877
887
|
width: "40",
|
|
878
888
|
height: "40",
|
|
879
889
|
alt: "",
|
|
880
890
|
onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
|
|
881
|
-
}, null, 8, _hoisted_31)
|
|
891
|
+
}, null, 8, _hoisted_31$1)
|
|
882
892
|
])
|
|
883
893
|
]),
|
|
884
894
|
_: 1
|
|
@@ -896,7 +906,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
896
906
|
height: "40",
|
|
897
907
|
alt: "",
|
|
898
908
|
onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
|
|
899
|
-
}, null, 8, _hoisted_32)
|
|
909
|
+
}, null, 8, _hoisted_32$1)
|
|
900
910
|
]),
|
|
901
911
|
_: 1
|
|
902
912
|
}),
|
|
@@ -916,7 +926,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
916
926
|
width: "24",
|
|
917
927
|
height: "40",
|
|
918
928
|
alt: ""
|
|
919
|
-
}, null, 8, _hoisted_33),
|
|
929
|
+
}, null, 8, _hoisted_33$1),
|
|
920
930
|
createElementVNode("img", {
|
|
921
931
|
src: $options.getImageUrl("tools_arrow@3x.png"),
|
|
922
932
|
width: "16",
|
|
@@ -1095,23 +1105,25 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1095
1105
|
])
|
|
1096
1106
|
])) : createCommentVNode("", true);
|
|
1097
1107
|
}
|
|
1098
|
-
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
1108
|
+
const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-719229ac"]]);
|
|
1099
1109
|
const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
|
|
1100
1110
|
const index_vue_vue_type_style_index_0_lang$4 = "";
|
|
1101
|
-
const _hoisted_1$6 = {
|
|
1102
|
-
const _hoisted_2$6 =
|
|
1103
|
-
const _hoisted_3$6 = {
|
|
1111
|
+
const _hoisted_1$6 = { key: 0 };
|
|
1112
|
+
const _hoisted_2$6 = { class: "basic-dialog_title" };
|
|
1113
|
+
const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
|
|
1114
|
+
const _hoisted_4$5 = {
|
|
1104
1115
|
key: 0,
|
|
1105
1116
|
class: "dialog-footer"
|
|
1106
1117
|
};
|
|
1107
|
-
const
|
|
1108
|
-
const
|
|
1118
|
+
const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
1119
|
+
const _hoisted_6$2 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
|
|
1109
1120
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1110
1121
|
name: "index",
|
|
1111
1122
|
props: {
|
|
1112
1123
|
visible: { type: Boolean, default: false },
|
|
1113
1124
|
showBtn: { type: Boolean, default: true },
|
|
1114
|
-
width: { default: "840px" }
|
|
1125
|
+
width: { default: "840px" },
|
|
1126
|
+
showTitle: { type: Boolean, default: true }
|
|
1115
1127
|
},
|
|
1116
1128
|
emits: ["submit", "cancel"],
|
|
1117
1129
|
setup(__props, { emit: emits }) {
|
|
@@ -1142,26 +1154,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1142
1154
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
|
|
1143
1155
|
"before-close": handleClose,
|
|
1144
1156
|
width: __props.width,
|
|
1145
|
-
class: "basic-dialog"
|
|
1157
|
+
class: normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
|
|
1146
1158
|
}, {
|
|
1147
1159
|
header: withCtx(() => [
|
|
1148
|
-
|
|
1149
|
-
createElementVNode("div",
|
|
1150
|
-
|
|
1160
|
+
__props.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
1161
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
1162
|
+
_hoisted_3$6,
|
|
1151
1163
|
renderSlot(_ctx.$slots, "title")
|
|
1152
1164
|
])
|
|
1153
|
-
])
|
|
1165
|
+
])) : createCommentVNode("", true)
|
|
1154
1166
|
]),
|
|
1155
1167
|
footer: withCtx(() => [
|
|
1156
|
-
__props.showBtn ? (openBlock(), createElementBlock("span",
|
|
1168
|
+
__props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
|
|
1157
1169
|
createVNode(unref(ElButton), {
|
|
1158
|
-
style: { "width": "120px", "border-color": "#
|
|
1170
|
+
style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
|
|
1159
1171
|
plain: "",
|
|
1160
1172
|
round: "",
|
|
1161
1173
|
onClick: handleClose
|
|
1162
1174
|
}, {
|
|
1163
1175
|
default: withCtx(() => [
|
|
1164
|
-
|
|
1176
|
+
_hoisted_5$4
|
|
1165
1177
|
]),
|
|
1166
1178
|
_: 1
|
|
1167
1179
|
}),
|
|
@@ -1172,7 +1184,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1172
1184
|
onClick: confirm
|
|
1173
1185
|
}, {
|
|
1174
1186
|
default: withCtx(() => [
|
|
1175
|
-
|
|
1187
|
+
_hoisted_6$2
|
|
1176
1188
|
]),
|
|
1177
1189
|
_: 1
|
|
1178
1190
|
})
|
|
@@ -1182,7 +1194,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1182
1194
|
renderSlot(_ctx.$slots, "default")
|
|
1183
1195
|
]),
|
|
1184
1196
|
_: 3
|
|
1185
|
-
}, 8, ["modelValue", "width"]);
|
|
1197
|
+
}, 8, ["modelValue", "width", "class"]);
|
|
1186
1198
|
};
|
|
1187
1199
|
}
|
|
1188
1200
|
});
|
|
@@ -1332,21 +1344,21 @@ const _hoisted_4$4 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u6587\u
|
|
|
1332
1344
|
const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
|
|
1333
1345
|
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
|
|
1334
1346
|
const _hoisted_7$1 = { class: "insert-article_input" };
|
|
1335
|
-
const _hoisted_8 = {
|
|
1347
|
+
const _hoisted_8$1 = {
|
|
1336
1348
|
key: 0,
|
|
1337
1349
|
class: "nodata"
|
|
1338
1350
|
};
|
|
1339
|
-
const _hoisted_9 = ["infinite-scroll-disabled"];
|
|
1340
|
-
const _hoisted_10 = {
|
|
1351
|
+
const _hoisted_9$1 = ["infinite-scroll-disabled"];
|
|
1352
|
+
const _hoisted_10$1 = {
|
|
1341
1353
|
key: 0,
|
|
1342
1354
|
class: "video-item"
|
|
1343
1355
|
};
|
|
1344
|
-
const _hoisted_11 = { class: "video-pic" };
|
|
1345
|
-
const _hoisted_12 = ["src"];
|
|
1346
|
-
const _hoisted_13 = ["src"];
|
|
1347
|
-
const _hoisted_14 = { class: "video-text" };
|
|
1348
|
-
const _hoisted_15 = { class: "dotdotdot2" };
|
|
1349
|
-
const _hoisted_16 = {
|
|
1356
|
+
const _hoisted_11$1 = { class: "video-pic" };
|
|
1357
|
+
const _hoisted_12$1 = ["src"];
|
|
1358
|
+
const _hoisted_13$1 = ["src"];
|
|
1359
|
+
const _hoisted_14$1 = { class: "video-text" };
|
|
1360
|
+
const _hoisted_15$1 = { class: "dotdotdot2" };
|
|
1361
|
+
const _hoisted_16$1 = {
|
|
1350
1362
|
key: 1,
|
|
1351
1363
|
style: { "display": "inline-flex", "flex-direction": "column" }
|
|
1352
1364
|
};
|
|
@@ -1503,7 +1515,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1503
1515
|
_: 1
|
|
1504
1516
|
}, 8, ["modelValue", "placeholder"])
|
|
1505
1517
|
]),
|
|
1506
|
-
data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
|
|
1518
|
+
data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
|
|
1507
1519
|
key: 1,
|
|
1508
1520
|
"infinite-scroll-immediate": false,
|
|
1509
1521
|
class: "insert-article_list",
|
|
@@ -1523,22 +1535,22 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1523
1535
|
default: withCtx(() => {
|
|
1524
1536
|
var _a;
|
|
1525
1537
|
return [
|
|
1526
|
-
unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
1527
|
-
createElementVNode("div", _hoisted_11, [
|
|
1538
|
+
unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
1539
|
+
createElementVNode("div", _hoisted_11$1, [
|
|
1528
1540
|
createElementVNode("img", {
|
|
1529
1541
|
class: "video-pic",
|
|
1530
1542
|
src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
|
|
1531
|
-
}, null, 8, _hoisted_12),
|
|
1543
|
+
}, null, 8, _hoisted_12$1),
|
|
1532
1544
|
createElementVNode("img", {
|
|
1533
1545
|
class: "play",
|
|
1534
1546
|
src: getImageUrl("play.png")
|
|
1535
|
-
}, null, 8, _hoisted_13)
|
|
1547
|
+
}, null, 8, _hoisted_13$1)
|
|
1536
1548
|
]),
|
|
1537
|
-
createElementVNode("div", _hoisted_14, [
|
|
1538
|
-
createElementVNode("span", _hoisted_15, toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
|
|
1549
|
+
createElementVNode("div", _hoisted_14$1, [
|
|
1550
|
+
createElementVNode("span", _hoisted_15$1, toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
|
|
1539
1551
|
createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
|
|
1540
1552
|
])
|
|
1541
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_16, [
|
|
1553
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_16$1, [
|
|
1542
1554
|
createElementVNode("span", null, toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
|
|
1543
1555
|
createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
|
|
1544
1556
|
]))
|
|
@@ -1548,7 +1560,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1548
1560
|
}, 1032, ["modelValue", "label", "onChange"])
|
|
1549
1561
|
]);
|
|
1550
1562
|
}), 128))
|
|
1551
|
-
], 8, _hoisted_9)), [
|
|
1563
|
+
], 8, _hoisted_9$1)), [
|
|
1552
1564
|
[unref(vInfiniteScroll), getArticleList]
|
|
1553
1565
|
])
|
|
1554
1566
|
])
|
|
@@ -1598,24 +1610,94 @@ function v4(options, buf, offset) {
|
|
|
1598
1610
|
return unsafeStringify(rnds);
|
|
1599
1611
|
}
|
|
1600
1612
|
const index_vue_vue_type_style_index_0_lang$2 = "";
|
|
1601
|
-
const _hoisted_1$4 =
|
|
1602
|
-
const _hoisted_2$4 = {
|
|
1613
|
+
const _hoisted_1$4 = { class: "img-upload-content" };
|
|
1614
|
+
const _hoisted_2$4 = { class: "title-box" };
|
|
1615
|
+
const _hoisted_3$4 = ["onClick"];
|
|
1616
|
+
const _hoisted_4$3 = {
|
|
1603
1617
|
key: 0,
|
|
1604
|
-
class: "
|
|
1618
|
+
class: "line"
|
|
1605
1619
|
};
|
|
1606
|
-
const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
|
|
1607
|
-
const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
|
|
1608
1620
|
const _hoisted_5$2 = {
|
|
1621
|
+
key: 0,
|
|
1622
|
+
class: "prompt-restriction"
|
|
1623
|
+
};
|
|
1624
|
+
const _hoisted_6 = {
|
|
1625
|
+
key: 1,
|
|
1626
|
+
class: "prompt-restriction"
|
|
1627
|
+
};
|
|
1628
|
+
const _hoisted_7 = {
|
|
1629
|
+
key: 0,
|
|
1630
|
+
class: "text-picture"
|
|
1631
|
+
};
|
|
1632
|
+
const _hoisted_8 = { class: "image-list content-image" };
|
|
1633
|
+
const _hoisted_9 = ["onClick"];
|
|
1634
|
+
const _hoisted_10 = ["src"];
|
|
1635
|
+
const _hoisted_11 = {
|
|
1636
|
+
key: 0,
|
|
1637
|
+
class: "shade"
|
|
1638
|
+
};
|
|
1639
|
+
const _hoisted_12 = { class: "num" };
|
|
1640
|
+
const _hoisted_13 = {
|
|
1641
|
+
key: 0,
|
|
1642
|
+
class: "upload-wrap"
|
|
1643
|
+
};
|
|
1644
|
+
const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
|
|
1645
|
+
const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
|
|
1646
|
+
const _hoisted_16 = {
|
|
1609
1647
|
key: 1,
|
|
1610
1648
|
class: "img-list"
|
|
1611
1649
|
};
|
|
1612
|
-
const
|
|
1613
|
-
const
|
|
1650
|
+
const _hoisted_17 = ["src"];
|
|
1651
|
+
const _hoisted_18 = { class: "upload-btn" };
|
|
1652
|
+
const _hoisted_19 = {
|
|
1653
|
+
key: 2,
|
|
1654
|
+
class: "map-depot"
|
|
1655
|
+
};
|
|
1656
|
+
const _hoisted_20 = { class: "screen" };
|
|
1657
|
+
const _hoisted_21 = /* @__PURE__ */ createTextVNode("\u641C\u7D22");
|
|
1658
|
+
const _hoisted_22 = { key: 0 };
|
|
1659
|
+
const _hoisted_23 = { class: "tab-box" };
|
|
1660
|
+
const _hoisted_24 = ["onClick"];
|
|
1661
|
+
const _hoisted_25 = {
|
|
1662
|
+
key: 0,
|
|
1663
|
+
class: "line"
|
|
1664
|
+
};
|
|
1665
|
+
const _hoisted_26 = { class: "image-list depot-image" };
|
|
1666
|
+
const _hoisted_27 = ["onClick"];
|
|
1667
|
+
const _hoisted_28 = ["src"];
|
|
1668
|
+
const _hoisted_29 = {
|
|
1669
|
+
key: 0,
|
|
1670
|
+
class: "shade"
|
|
1671
|
+
};
|
|
1672
|
+
const _hoisted_30 = { class: "num" };
|
|
1673
|
+
const _hoisted_31 = {
|
|
1674
|
+
key: 1,
|
|
1675
|
+
class: "protocol-box"
|
|
1676
|
+
};
|
|
1677
|
+
const _hoisted_32 = /* @__PURE__ */ createElementVNode("div", null, [
|
|
1678
|
+
/* @__PURE__ */ createElementVNode("div", null, " \u56FE\u5E93\u4E2D\u7684\u56FE\u7247\u4EC5\u9650\u4E0B\u8F7D\u6469\u6258\u8303\u4EE5\u7F16\u8F91\u53D1\u5E03\u6587\u7AE0\u4F7F\u7528,\u4E0D\u5F97\u7528\u4E8E\u5176\u4ED6\u4EFB\u4F55\u5E73\u53F0\u53CA\u7528\u9014 "),
|
|
1679
|
+
/* @__PURE__ */ createElementVNode("div", null, [
|
|
1680
|
+
/* @__PURE__ */ createTextVNode(" \u8BF7\u9605\u8BFB"),
|
|
1681
|
+
/* @__PURE__ */ createElementVNode("a", {
|
|
1682
|
+
href: "https://mp.58moto.com/about?type=imageLicenseAgreement",
|
|
1683
|
+
target: "_blank",
|
|
1684
|
+
rel: "noopener noreferrer",
|
|
1685
|
+
class: "link"
|
|
1686
|
+
}, "\u300A\u6469\u6258\u8303\u56FE\u7247\u8BB8\u53EF\u4F7F\u7528\u534F\u8BAE\u300B"),
|
|
1687
|
+
/* @__PURE__ */ createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ")
|
|
1688
|
+
])
|
|
1689
|
+
], -1);
|
|
1690
|
+
const _hoisted_33 = [
|
|
1691
|
+
_hoisted_32
|
|
1692
|
+
];
|
|
1614
1693
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1615
1694
|
name: "index",
|
|
1616
1695
|
props: {
|
|
1617
1696
|
visible: { type: Boolean, default: false },
|
|
1618
|
-
imgList: { default: [] }
|
|
1697
|
+
imgList: { default: [] },
|
|
1698
|
+
chartGallery: { type: Boolean, default: false },
|
|
1699
|
+
request: { default: {} },
|
|
1700
|
+
imgNum: { default: 20 }
|
|
1619
1701
|
},
|
|
1620
1702
|
emits: ["update:imgList", "update:visible", "submit"],
|
|
1621
1703
|
setup(__props, { emit: emits }) {
|
|
@@ -1661,86 +1743,442 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1661
1743
|
var ele = document.getElementsByClassName("imageFile");
|
|
1662
1744
|
ele[0].dispatchEvent(event);
|
|
1663
1745
|
};
|
|
1746
|
+
const activeTitle = ref(2);
|
|
1747
|
+
const titleList = ref([]);
|
|
1748
|
+
watch(
|
|
1749
|
+
() => props.visible,
|
|
1750
|
+
(newValue) => {
|
|
1751
|
+
if (newValue) {
|
|
1752
|
+
const list = [
|
|
1753
|
+
{
|
|
1754
|
+
id: 2,
|
|
1755
|
+
value: "\u4E0A\u4F20\u56FE\u7247"
|
|
1756
|
+
}
|
|
1757
|
+
];
|
|
1758
|
+
activeTitle.value = 2;
|
|
1759
|
+
if (props.imgNum < 20) {
|
|
1760
|
+
list.unshift({
|
|
1761
|
+
id: 1,
|
|
1762
|
+
value: "\u6B63\u6587\u56FE\u7247"
|
|
1763
|
+
});
|
|
1764
|
+
activeTitle.value = 1;
|
|
1765
|
+
getContentImgList();
|
|
1766
|
+
}
|
|
1767
|
+
if (props.chartGallery) {
|
|
1768
|
+
list.push({
|
|
1769
|
+
id: 3,
|
|
1770
|
+
value: "\u6469\u6258\u8303\u56FE\u5E93"
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
titleList.value = list;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
);
|
|
1777
|
+
const changeTab = (item) => {
|
|
1778
|
+
if (activeTitle.value !== item.id) {
|
|
1779
|
+
activeTitle.value = item.id;
|
|
1780
|
+
emits("update:imgList", []);
|
|
1781
|
+
if (item.id === 1) {
|
|
1782
|
+
if (!contentImgList.value.length) {
|
|
1783
|
+
getContentImgList();
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
if (item.id === 3) {
|
|
1787
|
+
if (!brandList.value.length) {
|
|
1788
|
+
getBrandList();
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
const contentImgListInit = ref([]);
|
|
1794
|
+
const getContentImgList = () => {
|
|
1795
|
+
contentImgListInit.value = [];
|
|
1796
|
+
const node = document.getElementById("editor-content");
|
|
1797
|
+
if (node) {
|
|
1798
|
+
const imgList = node.querySelectorAll(".halo-picture-area");
|
|
1799
|
+
if (imgList && imgList.length) {
|
|
1800
|
+
const list = [];
|
|
1801
|
+
imgList.forEach((img) => {
|
|
1802
|
+
if (!list.includes(img.src)) {
|
|
1803
|
+
list.push(img.src);
|
|
1804
|
+
}
|
|
1805
|
+
});
|
|
1806
|
+
list.forEach((src, i) => {
|
|
1807
|
+
contentImgListInit.value.push({
|
|
1808
|
+
imgOrgUrl: src,
|
|
1809
|
+
imgId: `content_${i}`
|
|
1810
|
+
});
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1815
|
+
const contentImgList = computed(() => {
|
|
1816
|
+
const list = [];
|
|
1817
|
+
contentImgListInit.value.forEach((v) => {
|
|
1818
|
+
const value = props.imgList.find((_) => _.id === v.imgId);
|
|
1819
|
+
list.push({
|
|
1820
|
+
imgOrgUrl: v.imgOrgUrl,
|
|
1821
|
+
imgId: v.imgId,
|
|
1822
|
+
num: value && value.num || 0
|
|
1823
|
+
});
|
|
1824
|
+
});
|
|
1825
|
+
return list;
|
|
1826
|
+
});
|
|
1827
|
+
const selectData = reactive({
|
|
1828
|
+
brandId: "",
|
|
1829
|
+
goodId: "",
|
|
1830
|
+
carId: ""
|
|
1831
|
+
});
|
|
1832
|
+
const {
|
|
1833
|
+
getCarTypeList,
|
|
1834
|
+
getAllBrandList,
|
|
1835
|
+
getGoodsImgsTypeData,
|
|
1836
|
+
getCarGoodsList
|
|
1837
|
+
} = props.request;
|
|
1838
|
+
const brandList = ref([]);
|
|
1839
|
+
const getBrandList = () => {
|
|
1840
|
+
brandList.value = [];
|
|
1841
|
+
getAllBrandList({
|
|
1842
|
+
brandEnergyType: 3,
|
|
1843
|
+
brandVersion: 1598596364
|
|
1844
|
+
}).then((res) => {
|
|
1845
|
+
if (res.data.code === 0) {
|
|
1846
|
+
brandList.value = res.data.data || [];
|
|
1847
|
+
}
|
|
1848
|
+
});
|
|
1849
|
+
};
|
|
1850
|
+
const goodList = ref([]);
|
|
1851
|
+
const getGoodList = () => {
|
|
1852
|
+
goodList.value = [];
|
|
1853
|
+
getCarTypeList(selectData.brandId, {
|
|
1854
|
+
platform: 11,
|
|
1855
|
+
provinceName: "",
|
|
1856
|
+
cityName: "",
|
|
1857
|
+
onSale: 1,
|
|
1858
|
+
page: 1,
|
|
1859
|
+
rows: 200,
|
|
1860
|
+
brandEnergyType: 3,
|
|
1861
|
+
goodMinPrice: "",
|
|
1862
|
+
goodMaxPrice: "",
|
|
1863
|
+
goodType: "",
|
|
1864
|
+
goodMinVolume: "",
|
|
1865
|
+
goodMaxVolume: "",
|
|
1866
|
+
sortType: 0
|
|
1867
|
+
}).then((res) => {
|
|
1868
|
+
if (res.data.code === 0) {
|
|
1869
|
+
goodList.value = res.data.data || [];
|
|
1870
|
+
}
|
|
1871
|
+
});
|
|
1872
|
+
};
|
|
1873
|
+
const carList = ref([]);
|
|
1874
|
+
const getCarList = () => {
|
|
1875
|
+
carList.value = [];
|
|
1876
|
+
getCarGoodsList({
|
|
1877
|
+
goodId: selectData.goodId,
|
|
1878
|
+
color: "",
|
|
1879
|
+
isFromAskPrice: 0
|
|
1880
|
+
}).then((res) => {
|
|
1881
|
+
if (res.data.code === 0) {
|
|
1882
|
+
const list = res.data.data || [];
|
|
1883
|
+
list.forEach((v) => {
|
|
1884
|
+
if (v.carInfoList && v.carInfoList.length) {
|
|
1885
|
+
v.carInfoList.forEach((car) => {
|
|
1886
|
+
carList.value.push(car);
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
});
|
|
1892
|
+
};
|
|
1893
|
+
const changeBrandId = () => {
|
|
1894
|
+
selectData.goodId = "";
|
|
1895
|
+
selectData.carId = "";
|
|
1896
|
+
getGoodList();
|
|
1897
|
+
};
|
|
1898
|
+
const changeGoodId = () => {
|
|
1899
|
+
selectData.carId = "";
|
|
1900
|
+
getCarList();
|
|
1901
|
+
};
|
|
1902
|
+
const activeTab = ref("1");
|
|
1903
|
+
const tabList = ref([]);
|
|
1904
|
+
const search = () => {
|
|
1905
|
+
if (!selectData.brandId) {
|
|
1906
|
+
return ElMessage.error("\u8BF7\u9009\u62E9\u54C1\u724C");
|
|
1907
|
+
}
|
|
1908
|
+
if (!selectData.goodId) {
|
|
1909
|
+
return ElMessage.error("\u8BF7\u9009\u62E9\u8F66\u578B");
|
|
1910
|
+
}
|
|
1911
|
+
if (!selectData.carId) {
|
|
1912
|
+
return ElMessage.error("\u8BF7\u9009\u62E9\u6B3E\u578B");
|
|
1913
|
+
}
|
|
1914
|
+
tabList.value = [];
|
|
1915
|
+
emits("update:imgList", []);
|
|
1916
|
+
getGoodsImgsTypeData({
|
|
1917
|
+
goodId: selectData.goodId,
|
|
1918
|
+
carId: selectData.carId
|
|
1919
|
+
}).then((res) => {
|
|
1920
|
+
if (res.data.code === 0) {
|
|
1921
|
+
tabList.value = res.data.data || [];
|
|
1922
|
+
if (tabList.value.length) {
|
|
1923
|
+
activeTab.value = tabList.value[0].type || "1";
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
};
|
|
1928
|
+
const imageList = computed(() => {
|
|
1929
|
+
const list = [];
|
|
1930
|
+
const item = tabList.value.find((v) => v.type === activeTab.value);
|
|
1931
|
+
if (item && item.imgList && item.imgList.length) {
|
|
1932
|
+
item.imgList.forEach((v) => {
|
|
1933
|
+
const value = props.imgList.find((_) => _.id === v.imgId);
|
|
1934
|
+
list.push({
|
|
1935
|
+
imgOrgUrl: v.imgOrgUrl,
|
|
1936
|
+
imgId: v.imgId,
|
|
1937
|
+
num: value && value.num || 0
|
|
1938
|
+
});
|
|
1939
|
+
});
|
|
1940
|
+
}
|
|
1941
|
+
return list;
|
|
1942
|
+
});
|
|
1943
|
+
const selectImage = (item, type) => {
|
|
1944
|
+
const list = [...props.imgList];
|
|
1945
|
+
const index = list.findIndex((v) => v.id === item.imgId);
|
|
1946
|
+
if (index >= 0) {
|
|
1947
|
+
list.splice(index, 1);
|
|
1948
|
+
} else {
|
|
1949
|
+
if (list.length >= props.imgNum)
|
|
1950
|
+
return;
|
|
1951
|
+
list.push({
|
|
1952
|
+
id: item.imgId,
|
|
1953
|
+
src: item.imgOrgUrl,
|
|
1954
|
+
type
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
list.forEach((v, i) => {
|
|
1958
|
+
v.num = i + 1;
|
|
1959
|
+
});
|
|
1960
|
+
emits("update:imgList", list);
|
|
1961
|
+
};
|
|
1664
1962
|
return (_ctx, _cache) => {
|
|
1665
1963
|
return openBlock(), createBlock(_sfc_main$6, {
|
|
1666
|
-
visible: props.visible
|
|
1964
|
+
visible: props.visible,
|
|
1965
|
+
showTitle: false
|
|
1667
1966
|
}, {
|
|
1668
|
-
title: withCtx(() => [
|
|
1669
|
-
_hoisted_1$4
|
|
1670
|
-
]),
|
|
1671
1967
|
default: withCtx(() => [
|
|
1672
|
-
createElementVNode("div",
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1968
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
1969
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
1970
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(titleList.value, (item, index) => {
|
|
1971
|
+
return openBlock(), createElementBlock("div", {
|
|
1972
|
+
key: index,
|
|
1973
|
+
class: normalizeClass(["title", { active: item.id === activeTitle.value }]),
|
|
1974
|
+
onClick: ($event) => changeTab(item)
|
|
1975
|
+
}, [
|
|
1976
|
+
createTextVNode(toDisplayString(item.value) + " ", 1),
|
|
1977
|
+
item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$3)) : createCommentVNode("", true)
|
|
1978
|
+
], 10, _hoisted_3$4);
|
|
1979
|
+
}), 128)),
|
|
1980
|
+
[1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$2, " \u6700\u591A\u53EF\u9009" + toDisplayString(props.imgNum) + "\u5F20\u56FE\u7247\uFF0C\u5DF2\u9009" + toDisplayString(props.imgList.length) + "\u5F20 ", 1)) : createCommentVNode("", true),
|
|
1981
|
+
activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "\u5F20\u4E0A\u4F20\u6210\u529F \u62D6\u52A8\u53EF\u8C03\u6574\u987A\u5E8F ", 1)) : createCommentVNode("", true)
|
|
1982
|
+
]),
|
|
1983
|
+
activeTitle.value === 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
1984
|
+
createElementVNode("div", _hoisted_8, [
|
|
1985
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(contentImgList), (item, index) => {
|
|
1986
|
+
return openBlock(), createElementBlock("div", {
|
|
1987
|
+
key: index,
|
|
1988
|
+
class: "image-item",
|
|
1989
|
+
onClick: ($event) => selectImage(item, 1)
|
|
1990
|
+
}, [
|
|
1991
|
+
createElementVNode("img", {
|
|
1992
|
+
src: item.imgOrgUrl,
|
|
1993
|
+
alt: "",
|
|
1994
|
+
class: "image"
|
|
1995
|
+
}, null, 8, _hoisted_10),
|
|
1996
|
+
item.num ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
1997
|
+
createElementVNode("div", _hoisted_12, toDisplayString(item.num), 1)
|
|
1998
|
+
])) : createCommentVNode("", true)
|
|
1999
|
+
], 8, _hoisted_9);
|
|
2000
|
+
}), 128))
|
|
2001
|
+
])
|
|
2002
|
+
])) : createCommentVNode("", true),
|
|
2003
|
+
activeTitle.value === 2 ? (openBlock(), createElementBlock("div", {
|
|
2004
|
+
key: 1,
|
|
2005
|
+
class: normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
|
|
2006
|
+
}, [
|
|
2007
|
+
!props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
2008
|
+
createElementVNode("div", {
|
|
2009
|
+
class: "upload-wrap_box",
|
|
2010
|
+
onClick: emitEvent
|
|
2011
|
+
}, [
|
|
2012
|
+
createVNode(unref(ElIcon), { class: "icon pointer" }, {
|
|
2013
|
+
default: withCtx(() => [
|
|
2014
|
+
createVNode(unref(Picture))
|
|
2015
|
+
]),
|
|
2016
|
+
_: 1
|
|
2017
|
+
}),
|
|
2018
|
+
_hoisted_14
|
|
2019
|
+
]),
|
|
2020
|
+
_hoisted_15
|
|
2021
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_16, [
|
|
2022
|
+
createVNode(unref(draggable), {
|
|
2023
|
+
modelValue: unref(imgListTemp),
|
|
2024
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(imgListTemp) ? imgListTemp.value = $event : null),
|
|
2025
|
+
handle: ".img-item",
|
|
2026
|
+
class: "img-wrap",
|
|
2027
|
+
group: "people",
|
|
2028
|
+
onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
|
|
2029
|
+
"item-key": "id",
|
|
2030
|
+
onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
|
|
2031
|
+
}, {
|
|
2032
|
+
item: withCtx(({ element }) => [
|
|
2033
|
+
(openBlock(), createElementBlock("div", {
|
|
2034
|
+
key: element.id,
|
|
2035
|
+
class: "img-item"
|
|
2036
|
+
}, [
|
|
2037
|
+
createElementVNode("img", {
|
|
2038
|
+
src: element.src,
|
|
2039
|
+
style: { "object-fit": "contain" },
|
|
2040
|
+
width: "120",
|
|
2041
|
+
height: "120"
|
|
2042
|
+
}, null, 8, _hoisted_17),
|
|
2043
|
+
createVNode(unref(CircleCloseFilled), {
|
|
2044
|
+
class: "icon pointer",
|
|
2045
|
+
onClick: ($event) => deleteImg(element)
|
|
2046
|
+
}, null, 8, ["onClick"])
|
|
2047
|
+
]))
|
|
2048
|
+
]),
|
|
2049
|
+
footer: withCtx(() => [
|
|
2050
|
+
createElementVNode("div", {
|
|
2051
|
+
class: "upload-icon pointer",
|
|
2052
|
+
onClick: emitEvent
|
|
2053
|
+
}, [
|
|
2054
|
+
createVNode(unref(ElIcon), { class: "icon pointer" }, {
|
|
2055
|
+
default: withCtx(() => [
|
|
2056
|
+
createVNode(unref(Plus))
|
|
2057
|
+
]),
|
|
2058
|
+
_: 1
|
|
2059
|
+
})
|
|
2060
|
+
])
|
|
2061
|
+
]),
|
|
2062
|
+
_: 1
|
|
2063
|
+
}, 8, ["modelValue"])
|
|
2064
|
+
])),
|
|
2065
|
+
createElementVNode("div", _hoisted_18, [
|
|
2066
|
+
createElementVNode("input", {
|
|
2067
|
+
type: "file",
|
|
2068
|
+
name: "file",
|
|
2069
|
+
multiple: "",
|
|
2070
|
+
class: "imageFile",
|
|
2071
|
+
accept: "image/*",
|
|
2072
|
+
onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
|
|
2073
|
+
}, null, 32)
|
|
2074
|
+
])
|
|
2075
|
+
], 2)) : createCommentVNode("", true),
|
|
2076
|
+
activeTitle.value === 3 ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
2077
|
+
createElementVNode("div", _hoisted_20, [
|
|
2078
|
+
createElementVNode("div", null, [
|
|
2079
|
+
createVNode(unref(ElSelect), {
|
|
2080
|
+
modelValue: selectData.brandId,
|
|
2081
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
|
|
2082
|
+
placeholder: "\u8BF7\u9009\u62E9\u54C1\u724C",
|
|
2083
|
+
size: "large",
|
|
2084
|
+
class: "select_1",
|
|
2085
|
+
onChange: changeBrandId
|
|
2086
|
+
}, {
|
|
2087
|
+
default: withCtx(() => [
|
|
2088
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(brandList.value, (item, index) => {
|
|
2089
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
2090
|
+
key: index,
|
|
2091
|
+
label: item.brandName,
|
|
2092
|
+
value: item.brandId
|
|
2093
|
+
}, null, 8, ["label", "value"]);
|
|
2094
|
+
}), 128))
|
|
2095
|
+
]),
|
|
2096
|
+
_: 1
|
|
2097
|
+
}, 8, ["modelValue"]),
|
|
2098
|
+
createVNode(unref(ElSelect), {
|
|
2099
|
+
modelValue: selectData.goodId,
|
|
2100
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
|
|
2101
|
+
placeholder: "\u8BF7\u9009\u62E9\u8F66\u578B",
|
|
2102
|
+
size: "large",
|
|
2103
|
+
class: "select_1",
|
|
2104
|
+
onChange: changeGoodId
|
|
2105
|
+
}, {
|
|
2106
|
+
default: withCtx(() => [
|
|
2107
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(goodList.value, (item, index) => {
|
|
2108
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
2109
|
+
key: index,
|
|
2110
|
+
label: item.goodName,
|
|
2111
|
+
value: item.goodId
|
|
2112
|
+
}, null, 8, ["label", "value"]);
|
|
2113
|
+
}), 128))
|
|
2114
|
+
]),
|
|
2115
|
+
_: 1
|
|
2116
|
+
}, 8, ["modelValue"]),
|
|
2117
|
+
createVNode(unref(ElSelect), {
|
|
2118
|
+
modelValue: selectData.carId,
|
|
2119
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
|
|
2120
|
+
placeholder: "\u8BF7\u9009\u62E9\u6B3E\u578B",
|
|
2121
|
+
size: "large",
|
|
2122
|
+
class: "select_2"
|
|
2123
|
+
}, {
|
|
2124
|
+
default: withCtx(() => [
|
|
2125
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(carList.value, (item, index) => {
|
|
2126
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
2127
|
+
key: index,
|
|
2128
|
+
label: item.goodsCarName,
|
|
2129
|
+
value: item.carId
|
|
2130
|
+
}, null, 8, ["label", "value"]);
|
|
2131
|
+
}), 128))
|
|
2132
|
+
]),
|
|
2133
|
+
_: 1
|
|
2134
|
+
}, 8, ["modelValue"])
|
|
2135
|
+
]),
|
|
2136
|
+
createVNode(unref(ElButton), {
|
|
2137
|
+
type: "primary",
|
|
2138
|
+
size: "large",
|
|
2139
|
+
style: { "width": "80px" },
|
|
2140
|
+
onClick: search
|
|
2141
|
+
}, {
|
|
1681
2142
|
default: withCtx(() => [
|
|
1682
|
-
|
|
2143
|
+
_hoisted_21
|
|
1683
2144
|
]),
|
|
1684
2145
|
_: 1
|
|
1685
|
-
})
|
|
1686
|
-
_hoisted_3$4
|
|
2146
|
+
})
|
|
1687
2147
|
]),
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
item: withCtx(({ element }) => [
|
|
1701
|
-
(openBlock(), createElementBlock("div", {
|
|
1702
|
-
key: element.id,
|
|
1703
|
-
class: "img-item"
|
|
1704
|
-
}, [
|
|
1705
|
-
createElementVNode("img", {
|
|
1706
|
-
src: element.src,
|
|
1707
|
-
style: { "object-fit": "cover" },
|
|
1708
|
-
width: "120",
|
|
1709
|
-
height: "120"
|
|
1710
|
-
}, null, 8, _hoisted_6),
|
|
1711
|
-
createVNode(unref(CircleCloseFilled), {
|
|
1712
|
-
class: "icon pointer",
|
|
1713
|
-
onClick: ($event) => deleteImg(element)
|
|
1714
|
-
}, null, 8, ["onClick"])
|
|
1715
|
-
]))
|
|
1716
|
-
]),
|
|
1717
|
-
footer: withCtx(() => [
|
|
1718
|
-
createElementVNode("div", {
|
|
1719
|
-
class: "upload-icon pointer",
|
|
1720
|
-
onClick: emitEvent
|
|
1721
|
-
}, [
|
|
1722
|
-
createVNode(unref(ElIcon), { class: "icon pointer" }, {
|
|
1723
|
-
default: withCtx(() => [
|
|
1724
|
-
createVNode(unref(Plus))
|
|
1725
|
-
]),
|
|
1726
|
-
_: 1
|
|
1727
|
-
})
|
|
1728
|
-
])
|
|
2148
|
+
tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div", _hoisted_22, [
|
|
2149
|
+
createElementVNode("div", _hoisted_23, [
|
|
2150
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(tabList.value, (item, index) => {
|
|
2151
|
+
return openBlock(), createElementBlock("div", {
|
|
2152
|
+
key: index,
|
|
2153
|
+
class: normalizeClass(["tab", { active: item.type === activeTab.value }]),
|
|
2154
|
+
onClick: ($event) => activeTab.value = item.type
|
|
2155
|
+
}, [
|
|
2156
|
+
createTextVNode(toDisplayString(item.name) + " ", 1),
|
|
2157
|
+
item.type === activeTab.value ? (openBlock(), createElementBlock("div", _hoisted_25)) : createCommentVNode("", true)
|
|
2158
|
+
], 10, _hoisted_24);
|
|
2159
|
+
}), 128))
|
|
1729
2160
|
]),
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
2161
|
+
createElementVNode("div", _hoisted_26, [
|
|
2162
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(imageList), (item, index) => {
|
|
2163
|
+
return openBlock(), createElementBlock("div", {
|
|
2164
|
+
key: index,
|
|
2165
|
+
class: "image-item",
|
|
2166
|
+
onClick: ($event) => selectImage(item, 3)
|
|
2167
|
+
}, [
|
|
2168
|
+
createElementVNode("img", {
|
|
2169
|
+
src: item.imgOrgUrl,
|
|
2170
|
+
alt: "",
|
|
2171
|
+
class: "image"
|
|
2172
|
+
}, null, 8, _hoisted_28),
|
|
2173
|
+
item.num ? (openBlock(), createElementBlock("div", _hoisted_29, [
|
|
2174
|
+
createElementVNode("div", _hoisted_30, toDisplayString(item.num), 1)
|
|
2175
|
+
])) : createCommentVNode("", true)
|
|
2176
|
+
], 8, _hoisted_27);
|
|
2177
|
+
}), 128))
|
|
2178
|
+
])
|
|
2179
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_31, _hoisted_33))
|
|
2180
|
+
])) : createCommentVNode("", true)
|
|
2181
|
+
])
|
|
1744
2182
|
]),
|
|
1745
2183
|
_: 1
|
|
1746
2184
|
}, 8, ["visible"]);
|
|
@@ -2004,7 +2442,9 @@ const _sfc_main = {
|
|
|
2004
2442
|
"getEassyDetail",
|
|
2005
2443
|
"getArticleList",
|
|
2006
2444
|
"importEssay",
|
|
2007
|
-
"uploadImageByOther"
|
|
2445
|
+
"uploadImageByOther",
|
|
2446
|
+
"chartGallery",
|
|
2447
|
+
"request"
|
|
2008
2448
|
],
|
|
2009
2449
|
data() {
|
|
2010
2450
|
return {
|
|
@@ -2019,6 +2459,7 @@ const _sfc_main = {
|
|
|
2019
2459
|
setAlignFlag: true,
|
|
2020
2460
|
article: {},
|
|
2021
2461
|
imgList: [],
|
|
2462
|
+
imgNum: 20,
|
|
2022
2463
|
videoList: [],
|
|
2023
2464
|
visibleVideo: false,
|
|
2024
2465
|
visibleCollectArticle: false,
|
|
@@ -2066,7 +2507,9 @@ const _sfc_main = {
|
|
|
2066
2507
|
},
|
|
2067
2508
|
countList: [],
|
|
2068
2509
|
replaceSeamless: 0,
|
|
2069
|
-
seamlessCount: 0
|
|
2510
|
+
seamlessCount: 0,
|
|
2511
|
+
overLine: "",
|
|
2512
|
+
currentVideo: null
|
|
2070
2513
|
};
|
|
2071
2514
|
},
|
|
2072
2515
|
computed: {
|
|
@@ -2216,6 +2659,12 @@ const _sfc_main = {
|
|
|
2216
2659
|
this.imgUploadHandler(type, src);
|
|
2217
2660
|
});
|
|
2218
2661
|
},
|
|
2662
|
+
replacePoster(e) {
|
|
2663
|
+
this.$emit("insertImgs", e.target.files, "replace-poster", (type, src) => {
|
|
2664
|
+
this.visibleImg = false;
|
|
2665
|
+
this.imgUploadHandler(type, src);
|
|
2666
|
+
});
|
|
2667
|
+
},
|
|
2219
2668
|
againImg(e) {
|
|
2220
2669
|
this.$emit("insertImgs", e.target.files, "uploadAgainImages", (type, src) => {
|
|
2221
2670
|
this.visibleImg = false;
|
|
@@ -2347,6 +2796,8 @@ const _sfc_main = {
|
|
|
2347
2796
|
this.parseGood(node);
|
|
2348
2797
|
} else if (node.classList.contains("halo-img-content")) {
|
|
2349
2798
|
const img = node.querySelector("img");
|
|
2799
|
+
img.setAttribute("tabindex", -1);
|
|
2800
|
+
img.setAttribute("draggable", false);
|
|
2350
2801
|
const desc = img.dataset.desc;
|
|
2351
2802
|
img.style.margin = "0";
|
|
2352
2803
|
const seamlessFlag = ((_a = JSON.parse(img.getAttribute("data"))) == null ? void 0 : _a.seamlessFlag) || "0";
|
|
@@ -2405,7 +2856,9 @@ const _sfc_main = {
|
|
|
2405
2856
|
node.onclick = function() {
|
|
2406
2857
|
me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
|
|
2407
2858
|
};
|
|
2859
|
+
const replaceBtn = me2.insertVideoBtns(me2.editor, video);
|
|
2408
2860
|
node.appendChild(delBtn);
|
|
2861
|
+
node.appendChild(replaceBtn);
|
|
2409
2862
|
},
|
|
2410
2863
|
async parseArticle(node) {
|
|
2411
2864
|
const data = JSON.parse(node.dataset.article);
|
|
@@ -2506,20 +2959,95 @@ const _sfc_main = {
|
|
|
2506
2959
|
uploadArticle() {
|
|
2507
2960
|
this.visibleArticle = true;
|
|
2508
2961
|
},
|
|
2509
|
-
uploadImg(type) {
|
|
2962
|
+
uploadImg(type, num) {
|
|
2510
2963
|
this.visibleImg = true;
|
|
2511
2964
|
this.imgType = type;
|
|
2512
2965
|
this.imgList = [];
|
|
2966
|
+
this.imgNum = num || 20;
|
|
2513
2967
|
},
|
|
2514
|
-
submitImg() {
|
|
2515
|
-
const files = this.imgList.map((item) => item.file);
|
|
2968
|
+
async submitImg() {
|
|
2516
2969
|
this.count = 0;
|
|
2517
2970
|
this.countList = [];
|
|
2518
2971
|
this.seamlessCount = 0;
|
|
2519
|
-
|
|
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
|
+
}
|
|
2520
3004
|
this.visibleImg = false;
|
|
2521
|
-
|
|
2522
|
-
|
|
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
|
+
}
|
|
2523
3051
|
},
|
|
2524
3052
|
imgUploadHandler(type, imgSrc) {
|
|
2525
3053
|
const me2 = this;
|
|
@@ -2537,6 +3065,20 @@ const _sfc_main = {
|
|
|
2537
3065
|
seamlessFlag: me2.replaceSeamless,
|
|
2538
3066
|
type: "2"
|
|
2539
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
|
+
}
|
|
2540
3082
|
} else {
|
|
2541
3083
|
this.seamlessCount++;
|
|
2542
3084
|
const isLast = this.seamlessCount === this.imgList.length;
|
|
@@ -2555,6 +3097,21 @@ const _sfc_main = {
|
|
|
2555
3097
|
this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
|
|
2556
3098
|
}
|
|
2557
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
|
+
},
|
|
2558
3115
|
insertImgOperateBtns(editor, data) {
|
|
2559
3116
|
const me2 = this;
|
|
2560
3117
|
var replaceBtn = editor.createElement("div", {
|
|
@@ -2667,7 +3224,7 @@ const _sfc_main = {
|
|
|
2667
3224
|
},
|
|
2668
3225
|
initSquire() {
|
|
2669
3226
|
const me2 = this;
|
|
2670
|
-
me2.editorDom;
|
|
3227
|
+
const editorDom = me2.editorDom;
|
|
2671
3228
|
me2.editor = new window.Squire(me2.editorDom, {
|
|
2672
3229
|
blockTag: "p",
|
|
2673
3230
|
blockAttributes: {
|
|
@@ -2786,7 +3343,9 @@ const _sfc_main = {
|
|
|
2786
3343
|
"data": JSON.stringify(data),
|
|
2787
3344
|
"style": isSeameless ? "margin: 0" : "margin-top: 0",
|
|
2788
3345
|
"data-content": data.content || "",
|
|
2789
|
-
"contenteditable": "false"
|
|
3346
|
+
"contenteditable": "false",
|
|
3347
|
+
"draggable": "false",
|
|
3348
|
+
"tabindex": "-1"
|
|
2790
3349
|
});
|
|
2791
3350
|
const btns = me2.insertImgOperateBtns(this, data);
|
|
2792
3351
|
var childList = [];
|
|
@@ -2797,7 +3356,8 @@ const _sfc_main = {
|
|
|
2797
3356
|
!isHaloImage && childList.push(again);
|
|
2798
3357
|
var p = this.createElement("div", {
|
|
2799
3358
|
"class": "halo-img-content",
|
|
2800
|
-
"contenteditable": "false"
|
|
3359
|
+
"contenteditable": "false",
|
|
3360
|
+
"draggable": "false"
|
|
2801
3361
|
}, [...childList]);
|
|
2802
3362
|
this.insertElement(p, range);
|
|
2803
3363
|
if (isSeameless) {
|
|
@@ -2847,14 +3407,41 @@ const _sfc_main = {
|
|
|
2847
3407
|
}
|
|
2848
3408
|
});
|
|
2849
3409
|
console.log(delBtn);
|
|
3410
|
+
const posterBtn = me2.insertVideoBtns(this, video);
|
|
2850
3411
|
var p = this.createElement("DIV", {
|
|
2851
3412
|
"class": "halo-video-content",
|
|
2852
|
-
"contenteditable": "
|
|
2853
|
-
"data-video": JSON.stringify(data)
|
|
2854
|
-
|
|
3413
|
+
"contenteditable": "false",
|
|
3414
|
+
"data-video": JSON.stringify(data),
|
|
3415
|
+
"draggable": "true"
|
|
3416
|
+
}, [video, delBtn, posterBtn]);
|
|
2855
3417
|
p.onclick = function() {
|
|
2856
3418
|
me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
|
|
2857
3419
|
};
|
|
3420
|
+
let targetMove = "";
|
|
3421
|
+
p.ondragstart = function(e) {
|
|
3422
|
+
if (!(e.target.className.indexOf("halo-video-content") < 0)) {
|
|
3423
|
+
e.dataTransfer.setData("text/html", e.target);
|
|
3424
|
+
e.dataTransfer.effectAllowed = "move";
|
|
3425
|
+
e.dataTransfer.dropEffect = "move";
|
|
3426
|
+
targetMove = e.target;
|
|
3427
|
+
}
|
|
3428
|
+
};
|
|
3429
|
+
editorDom.ondragover = function(e) {
|
|
3430
|
+
if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
|
|
3431
|
+
e.preventDefault();
|
|
3432
|
+
}
|
|
3433
|
+
};
|
|
3434
|
+
editorDom.ondrop = function(e) {
|
|
3435
|
+
if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
|
|
3436
|
+
if (e.target === editorDom) {
|
|
3437
|
+
e.target.appendChild(targetMove);
|
|
3438
|
+
} else {
|
|
3439
|
+
e.target.after(targetMove);
|
|
3440
|
+
}
|
|
3441
|
+
targetMove = "";
|
|
3442
|
+
e.preventDefault();
|
|
3443
|
+
}
|
|
3444
|
+
};
|
|
2858
3445
|
this.insertElement(p);
|
|
2859
3446
|
setTimeout(() => {
|
|
2860
3447
|
document.documentElement.scrollTop = scrollTop;
|
|
@@ -3078,11 +3665,16 @@ const _sfc_main = {
|
|
|
3078
3665
|
getSticker(type, handler) {
|
|
3079
3666
|
this.setSticker(type.fragment.children);
|
|
3080
3667
|
},
|
|
3081
|
-
setSticker(data) {
|
|
3668
|
+
setSticker(data, isImport) {
|
|
3082
3669
|
const me2 = this;
|
|
3083
3670
|
data = Array.from(data);
|
|
3084
3671
|
data.map(function(value, index) {
|
|
3085
|
-
|
|
3672
|
+
let htmlArr = [];
|
|
3673
|
+
if (isImport) {
|
|
3674
|
+
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)");
|
|
3675
|
+
} else {
|
|
3676
|
+
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
|
+
}
|
|
3086
3678
|
htmlArr.map(function(nValue) {
|
|
3087
3679
|
if (!nValue || nValue === " ") {
|
|
3088
3680
|
return;
|
|
@@ -3114,9 +3706,10 @@ const _sfc_main = {
|
|
|
3114
3706
|
},
|
|
3115
3707
|
refreshImg() {
|
|
3116
3708
|
Array.from(document.querySelectorAll(".halo-img-content")).map((_ = {}) => {
|
|
3709
|
+
var _a;
|
|
3117
3710
|
var target = _.querySelector(".halo-picture-area");
|
|
3118
3711
|
var tag = null;
|
|
3119
|
-
if (target.classList.contains("upload-fail")) {
|
|
3712
|
+
if ((_a = target == null ? void 0 : target.classList) == null ? void 0 : _a.contains("upload-fail")) {
|
|
3120
3713
|
tag = _.querySelector(".img-again");
|
|
3121
3714
|
} else {
|
|
3122
3715
|
tag = _.querySelector(".desc-input");
|
|
@@ -3246,7 +3839,7 @@ const _sfc_main = {
|
|
|
3246
3839
|
data.data.content = data.data.content.replace(/<a href="(.*?)"(.*?)>/g, "").replace(/<\/a>/g, "").replace(/<iframe([^<>]*)>([^<>]*)<\/iframe>/g, "").replace(/<video([^<>]*)>([^<>]*)<\/video>/g, "");
|
|
3247
3840
|
const importContent = document.createElement("div");
|
|
3248
3841
|
importContent.innerHTML = data.data.content;
|
|
3249
|
-
me2.setSticker(importContent.children);
|
|
3842
|
+
me2.setSticker(importContent.children, true);
|
|
3250
3843
|
me2.closeDialog();
|
|
3251
3844
|
me2.linkContent = "";
|
|
3252
3845
|
return;
|
|
@@ -3394,8 +3987,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3394
3987
|
"onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
|
|
3395
3988
|
visible: $data.visibleImg,
|
|
3396
3989
|
"onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
|
|
3990
|
+
chartGallery: $props.chartGallery,
|
|
3991
|
+
request: $props.request,
|
|
3992
|
+
imgNum: $data.imgNum,
|
|
3397
3993
|
onSubmit: $options.submitImg
|
|
3398
|
-
}, null, 8, ["img-list", "visible", "onSubmit"]),
|
|
3994
|
+
}, null, 8, ["img-list", "visible", "chartGallery", "request", "imgNum", "onSubmit"]),
|
|
3399
3995
|
createVNode(_component_VideoUpload, {
|
|
3400
3996
|
visible: $data.visibleVideo,
|
|
3401
3997
|
"onUpdate:visible": _cache[8] || (_cache[8] = ($event) => $data.visibleVideo = $event),
|
|
@@ -3422,6 +4018,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3422
4018
|
class: "replace-input hide",
|
|
3423
4019
|
accept: "image/*",
|
|
3424
4020
|
onChange: _cache[12] || (_cache[12] = (...args) => $options.replaceImg && $options.replaceImg(...args))
|
|
4021
|
+
}, null, 32),
|
|
4022
|
+
createElementVNode("input", {
|
|
4023
|
+
type: "file",
|
|
4024
|
+
name: "file",
|
|
4025
|
+
class: "replace-poster hide",
|
|
4026
|
+
accept: "image/*",
|
|
4027
|
+
onChange: _cache[13] || (_cache[13] = (...args) => $options.replacePoster && $options.replacePoster(...args))
|
|
3425
4028
|
}, null, 32)
|
|
3426
4029
|
]);
|
|
3427
4030
|
}
|