@haluo/biz 2.0.13-beta.1 → 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.
package/dist/haluo-biz.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ElTooltip, ElDivider, ElPopover, ElDialog, ElButton, ElRadio, ElInput, ElInfiniteScroll, ElMessage, ElIcon, ElFormItem, ElForm, ElMessageBox } from "element-plus";
2
- import { resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, normalizeStyle, createCommentVNode, normalizeClass, toDisplayString, withDirectives, Fragment, renderList, createBlock, defineComponent, inject, computed, unref, isRef, renderSlot, createTextVNode, provide, toRefs, reactive, watch, onMounted, withKeys, ref, h, render, vShow } from "vue";
1
+ import { ElTooltip, ElDivider, ElPopover, ElDialog, ElButton, ElRadio, ElInput, ElInfiniteScroll, ElMessage, ElIcon, ElSelect, ElOption, ElFormItem, ElForm, ElMessageBox } from "element-plus";
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";
5
5
  import draggable from "vuedraggable";
@@ -38,6 +38,277 @@ const ToolsEnum = {
38
38
  INSERT_ARTICLE: "insertArticle",
39
39
  COLLECT_ARTICLE: "collectArticle"
40
40
  };
41
+ var j;
42
+ const $ = typeof window < "u", fe = (e) => typeof e == "string", pe = () => {
43
+ };
44
+ $ && ((j = window == null ? void 0 : window.navigator) == null ? void 0 : j.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
45
+ function ve(e) {
46
+ return typeof e == "function" ? e() : unref(e);
47
+ }
48
+ function me(e) {
49
+ return e;
50
+ }
51
+ function Ce(e) {
52
+ return getCurrentScope() ? (onScopeDispose(e), true) : false;
53
+ }
54
+ function A(e) {
55
+ var t;
56
+ const o = ve(e);
57
+ return (t = o == null ? void 0 : o.$el) != null ? t : o;
58
+ }
59
+ const K = $ ? window : void 0;
60
+ function Q(...e) {
61
+ let t, o, s, p;
62
+ if (fe(e[0]) || Array.isArray(e[0]) ? ([o, s, p] = e, t = K) : [t, o, s, p] = e, !t)
63
+ return pe;
64
+ Array.isArray(o) || (o = [o]), Array.isArray(s) || (s = [s]);
65
+ const _ = [], I = () => {
66
+ _.forEach((v) => v()), _.length = 0;
67
+ }, C = (v, g, m) => (v.addEventListener(g, m, p), () => v.removeEventListener(g, m, p)), d = watch(() => A(t), (v) => {
68
+ I(), v && _.push(...o.flatMap((g) => s.map((m) => C(v, g, m))));
69
+ }, { immediate: true, flush: "post" }), y = () => {
70
+ d(), I();
71
+ };
72
+ return Ce(y), y;
73
+ }
74
+ function _e(e, t, o = {}) {
75
+ const { window: s = K, ignore: p, capture: _ = true, detectIframe: I = false } = o;
76
+ if (!s)
77
+ return;
78
+ let C = true, d;
79
+ const y = (u) => {
80
+ s.clearTimeout(d);
81
+ const a = A(e);
82
+ if (!(!a || a === u.target || u.composedPath().includes(a))) {
83
+ if (!C) {
84
+ C = true;
85
+ return;
86
+ }
87
+ t(u);
88
+ }
89
+ }, v = (u) => p && p.some((a) => {
90
+ const b = A(a);
91
+ return b && (u.target === b || u.composedPath().includes(b));
92
+ }), g = [
93
+ Q(s, "click", y, { passive: true, capture: _ }),
94
+ Q(s, "pointerdown", (u) => {
95
+ const a = A(e);
96
+ a && (C = !u.composedPath().includes(a) && !v(u));
97
+ }, { passive: true }),
98
+ Q(s, "pointerup", (u) => {
99
+ if (u.button === 0) {
100
+ const a = u.composedPath();
101
+ u.composedPath = () => a, d = s.setTimeout(() => y(u), 50);
102
+ }
103
+ }, { passive: true }),
104
+ I && Q(s, "blur", (u) => {
105
+ var a;
106
+ const b = A(e);
107
+ ((a = s.document.activeElement) == null ? void 0 : a.tagName) === "IFRAME" && !(b != null && b.contains(s.document.activeElement)) && t(u);
108
+ })
109
+ ].filter(Boolean);
110
+ return () => g.forEach((u) => u());
111
+ }
112
+ const D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, R = "__vueuse_ssr_handlers__";
113
+ D[R] = D[R] || {};
114
+ D[R];
115
+ var q;
116
+ (function(e) {
117
+ e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
118
+ })(q || (q = {}));
119
+ var ge = Object.defineProperty, z = Object.getOwnPropertySymbols, be = Object.prototype.hasOwnProperty, ye = Object.prototype.propertyIsEnumerable, G = (e, t, o) => t in e ? ge(e, t, { enumerable: true, configurable: true, writable: true, value: o }) : e[t] = o, ke = (e, t) => {
120
+ for (var o in t || (t = {}))
121
+ be.call(t, o) && G(e, o, t[o]);
122
+ if (z)
123
+ for (var o of z(t))
124
+ ye.call(t, o) && G(e, o, t[o]);
125
+ return e;
126
+ };
127
+ const he = {
128
+ easeInSine: [0.12, 0, 0.39, 0],
129
+ easeOutSine: [0.61, 1, 0.88, 1],
130
+ easeInOutSine: [0.37, 0, 0.63, 1],
131
+ easeInQuad: [0.11, 0, 0.5, 0],
132
+ easeOutQuad: [0.5, 1, 0.89, 1],
133
+ easeInOutQuad: [0.45, 0, 0.55, 1],
134
+ easeInCubic: [0.32, 0, 0.67, 0],
135
+ easeOutCubic: [0.33, 1, 0.68, 1],
136
+ easeInOutCubic: [0.65, 0, 0.35, 1],
137
+ easeInQuart: [0.5, 0, 0.75, 0],
138
+ easeOutQuart: [0.25, 1, 0.5, 1],
139
+ easeInOutQuart: [0.76, 0, 0.24, 1],
140
+ easeInQuint: [0.64, 0, 0.78, 0],
141
+ easeOutQuint: [0.22, 1, 0.36, 1],
142
+ easeInOutQuint: [0.83, 0, 0.17, 1],
143
+ easeInExpo: [0.7, 0, 0.84, 0],
144
+ easeOutExpo: [0.16, 1, 0.3, 1],
145
+ easeInOutExpo: [0.87, 0, 0.13, 1],
146
+ easeInCirc: [0.55, 0, 1, 0.45],
147
+ easeOutCirc: [0, 0.55, 0.45, 1],
148
+ easeInOutCirc: [0.85, 0, 0.15, 1],
149
+ easeInBack: [0.36, 0, 0.66, -0.56],
150
+ easeOutBack: [0.34, 1.56, 0.64, 1],
151
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
152
+ };
153
+ ke({
154
+ linear: me
155
+ }, he);
156
+ const J = (e) => (pushScopeId("data-v-b46fc003"), e = e(), popScopeId(), e), we = { class: "hd" }, Oe = { class: "bd" }, Ie = /* @__PURE__ */ J(() => /* @__PURE__ */ createElementVNode("h3", null, "\u4E3B\u9898\u989C\u8272", -1)), Ee = { class: "tColor" }, Pe = ["onMouseover", "onClick"], Me = { class: "bColor" }, Ae = ["onMouseover", "onClick"], $e = /* @__PURE__ */ J(() => /* @__PURE__ */ createElementVNode("h3", null, "\u6807\u51C6\u989C\u8272", -1)), Te = { class: "tColor" }, Be = ["onMouseover", "onClick"], Ve = {
157
+ name: "colorPicker"
158
+ }, Ne = /* @__PURE__ */ defineComponent({
159
+ ...Ve,
160
+ props: {
161
+ modelValue: { type: String, required: true },
162
+ defaultColor: { type: String, required: false, default: "#000000" },
163
+ disabled: { type: Boolean, required: false }
164
+ },
165
+ emits: ["update:modelValue", "change"],
166
+ setup(e, { emit: t }) {
167
+ const o = e, s = ref(false), p = () => {
168
+ s.value = !o.disabled;
169
+ }, _ = ref(null);
170
+ _e(_, () => {
171
+ s.value = false;
172
+ });
173
+ const C = ref(""), d = (n) => {
174
+ C.value = n;
175
+ }, y = ["#000000", "#ffffff", "#eeece1", "#1e497b", "#4e81bb", "#e2534d", "#9aba60", "#8165a0", "#47acc5", "#f9974c"], v = [
176
+ ["#7f7f7f", "#f2f2f2"],
177
+ ["#0d0d0d", "#808080"],
178
+ ["#1c1a10", "#ddd8c3"],
179
+ ["#0e243d", "#c6d9f0"],
180
+ ["#233f5e", "#dae5f0"],
181
+ ["#632623", "#f2dbdb"],
182
+ ["#4d602c", "#eaf1de"],
183
+ ["#3f3150", "#e6e0ec"],
184
+ ["#1e5867", "#d9eef3"],
185
+ ["#99490f", "#fee9da"]
186
+ ], g = ["#c21401", "#ff1e02", "#ffc12a", "#ffff3a", "#90cf5b", "#00af57", "#00afee", "#0071be", "#00215f", "#72349d"], m = o.modelValue, u = computed(() => C.value ? C : a), a = computed(() => o.modelValue ? o.modelValue : o.defaultColor), b = computed(() => {
187
+ let n = [];
188
+ for (let r of v)
189
+ n.push(oe(r[1], r[0], 5));
190
+ return n;
191
+ }), x = ref(null), X = () => {
192
+ var n;
193
+ (n = x.value) == null || n.click();
194
+ }, E = (n) => {
195
+ t("update:modelValue", n), t("change", n), s.value = false;
196
+ }, Y = () => {
197
+ E(o.defaultColor);
198
+ }, Z = (n) => n.length === 4 ? n = "#" + n[1] + n[1] + n[2] + n[2] + n[3] + n[3] : n, ee = (n, r, l) => {
199
+ const c = (n << 16 | r << 8 | l).toString(16);
200
+ return "#" + new Array(Math.abs(c.length - 7)).join("0") + c;
201
+ }, H = (n) => {
202
+ n = Z(n);
203
+ let r = [];
204
+ for (let l = 1; l < 7; l += 2)
205
+ r.push(parseInt("0x" + n.slice(l, l + 2)));
206
+ return r;
207
+ }, oe = (n, r, l) => {
208
+ let c = H(n), f = H(r), S = (f[0] - c[0]) / l, T = (f[1] - c[1]) / l, te = (f[2] - c[2]) / l, U = [];
209
+ for (let P = 0; P < l; P++)
210
+ U.push(ee(S * P + c[0], T * P + c[1], te * P + c[2]));
211
+ return U;
212
+ };
213
+ return (n, r) => (openBlock(), createElementBlock("div", {
214
+ class: "m-colorPicker",
215
+ ref_key: "colorPicker",
216
+ ref: _,
217
+ onClick: r[7] || (r[7] = (l) => {
218
+ l.stopPropagation();
219
+ })
220
+ }, [
221
+ createCommentVNode(" \u989C\u8272\u663E\u793A\u5C0F\u65B9\u5757 "),
222
+ createElementVNode("div", {
223
+ class: normalizeClass(["colorBtn", { disabled: e.disabled }]),
224
+ style: normalizeStyle(`background-color: ${unref(a)}`),
225
+ onClick: p
226
+ }, null, 6),
227
+ createCommentVNode(" \u989C\u8272\u8272\u76D8 "),
228
+ createElementVNode("div", {
229
+ class: normalizeClass(["box", { open: s.value }])
230
+ }, [
231
+ createElementVNode("div", we, [
232
+ createElementVNode("div", {
233
+ class: "colorView",
234
+ style: normalizeStyle({ "background-color": unref(u).value })
235
+ }, null, 4),
236
+ createElementVNode("div", {
237
+ class: "defaultColor",
238
+ onClick: Y,
239
+ onMouseover: r[0] || (r[0] = (l) => d(e.defaultColor)),
240
+ onMouseout: r[1] || (r[1] = (l) => d(""))
241
+ }, "\u9ED8\u8BA4\u989C\u8272", 32)
242
+ ]),
243
+ createElementVNode("div", Oe, [
244
+ Ie,
245
+ createElementVNode("ul", Ee, [
246
+ (openBlock(), createElementBlock(Fragment, null, renderList(y, (l, c) => createElementVNode("li", {
247
+ key: c,
248
+ style: normalizeStyle({ backgroundColor: l }),
249
+ onMouseover: (f) => d(l),
250
+ onMouseout: r[2] || (r[2] = (f) => d("")),
251
+ onClick: (f) => E(l)
252
+ }, null, 44, Pe)), 64))
253
+ ]),
254
+ createElementVNode("ul", Me, [
255
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(b), (l, c) => (openBlock(), createElementBlock("li", { key: c }, [
256
+ createElementVNode("ul", null, [
257
+ (openBlock(true), createElementBlock(Fragment, null, renderList(l, (f, S) => (openBlock(), createElementBlock("li", {
258
+ key: S,
259
+ style: normalizeStyle({ backgroundColor: f }),
260
+ onMouseover: (T) => d(f),
261
+ onMouseout: r[3] || (r[3] = (T) => d("")),
262
+ onClick: (T) => E(f)
263
+ }, null, 44, Ae))), 128))
264
+ ])
265
+ ]))), 128))
266
+ ]),
267
+ $e,
268
+ createElementVNode("ul", Te, [
269
+ (openBlock(), createElementBlock(Fragment, null, renderList(g, (l, c) => createElementVNode("li", {
270
+ key: c,
271
+ style: normalizeStyle({ backgroundColor: l }),
272
+ onMouseover: (f) => d(l),
273
+ onMouseout: r[4] || (r[4] = (f) => d("")),
274
+ onClick: (f) => E(l)
275
+ }, null, 44, Be)), 64))
276
+ ]),
277
+ createElementVNode("h3", { onClick: X }, "\u66F4\u591A\u989C\u8272..."),
278
+ createCommentVNode(" \u7528\u4EE5\u6FC0\u6D3BHTML5\u989C\u8272\u9762\u677F "),
279
+ withDirectives(createElementVNode("input", {
280
+ type: "color",
281
+ ref_key: "html5ColorEl",
282
+ ref: x,
283
+ "onUpdate:modelValue": r[5] || (r[5] = (l) => isRef(m) ? m.value = l : null),
284
+ onChange: r[6] || (r[6] = (l) => E(unref(m)))
285
+ }, null, 544), [
286
+ [vModelText, unref(m)]
287
+ ])
288
+ ])
289
+ ], 2)
290
+ ], 512));
291
+ }
292
+ });
293
+ const Qe = (e, t) => {
294
+ const o = e.__vccOpts || e;
295
+ for (const [s, p] of t)
296
+ o[s] = p;
297
+ return o;
298
+ }, O = /* @__PURE__ */ Qe(Ne, [["__scopeId", "data-v-b46fc003"], ["__file", "/Users/zhuleyi/WORK/github/vue-color-picker/packages/color-picker/src/index.vue"]]);
299
+ O.install = function(e, t) {
300
+ e.component(O.name, O);
301
+ };
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 = "";
41
312
  const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
42
313
  const ToolBar_vue_vue_type_style_index_1_lang = "";
43
314
  const _export_sfc = (sfc, props) => {
@@ -51,7 +322,8 @@ const _sfc_main$7 = {
51
322
  components: {
52
323
  ElTooltip,
53
324
  ElDivider,
54
- ElPopover
325
+ ElPopover,
326
+ colorPicker: De.colorPicker
55
327
  },
56
328
  props: ["editor", "isOss", "hiddenTools"],
57
329
  data() {
@@ -255,49 +527,49 @@ const _hoisted_2$7 = { class: "tools-content" };
255
527
  const _hoisted_3$7 = ["src"];
256
528
  const _hoisted_4$6 = ["src"];
257
529
  const _hoisted_5$5 = ["src"];
258
- const _hoisted_6$2 = { class: "box" };
530
+ const _hoisted_6$3 = { class: "box" };
259
531
  const _hoisted_7$2 = ["src"];
260
- const _hoisted_8$1 = {
532
+ const _hoisted_8$2 = {
261
533
  key: 0,
262
534
  class: "box-mask"
263
535
  };
264
- const _hoisted_9$1 = { class: "tools-title" };
265
- const _hoisted_10$1 = ["src"];
266
- const _hoisted_11$1 = { class: "tools-font" };
267
- const _hoisted_12$1 = ["onClick"];
268
- const _hoisted_13$1 = { style: { "font-size": "10px" } };
269
- const _hoisted_14$1 = { class: "box" };
270
- const _hoisted_15$1 = ["src"];
271
- const _hoisted_16$1 = {
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 = {
272
544
  key: 0,
273
545
  class: "box-mask"
274
546
  };
275
- const _hoisted_17 = { class: "box" };
276
- const _hoisted_18 = ["src"];
277
- const _hoisted_19 = {
547
+ const _hoisted_17$1 = { class: "box" };
548
+ const _hoisted_18$1 = ["src"];
549
+ const _hoisted_19$1 = {
278
550
  key: 0,
279
551
  class: "box-mask"
280
552
  };
281
- const _hoisted_20 = { class: "tools-title" };
282
- const _hoisted_21 = ["src"];
283
- const _hoisted_22 = ["src"];
284
- const _hoisted_23 = { class: "tools-title_content" };
285
- const _hoisted_24 = { class: "box" };
286
- const _hoisted_25 = ["src"];
287
- 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 = {
288
560
  key: 0,
289
561
  class: "box-mask"
290
562
  };
291
- const _hoisted_27 = { class: "box" };
292
- const _hoisted_28 = ["src"];
293
- const _hoisted_29 = {
563
+ const _hoisted_27$1 = { class: "box" };
564
+ const _hoisted_28$1 = ["src"];
565
+ const _hoisted_29$1 = {
294
566
  key: 0,
295
567
  class: "box-mask"
296
568
  };
297
- const _hoisted_30 = { class: "box" };
298
- const _hoisted_31 = ["src"];
299
- const _hoisted_32 = ["src"];
300
- 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"];
301
573
  const _hoisted_34 = ["src"];
302
574
  const _hoisted_35 = { class: "tools-title" };
303
575
  const _hoisted_36 = ["src"];
@@ -387,7 +659,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
387
659
  placement: "top"
388
660
  }, {
389
661
  default: withCtx(() => [
390
- createElementVNode("div", _hoisted_6$2, [
662
+ createElementVNode("div", _hoisted_6$3, [
391
663
  createElementVNode("img", {
392
664
  src: $options.getImageUrl("tools_refresh@3x.png"),
393
665
  width: "40",
@@ -395,7 +667,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
395
667
  alt: "",
396
668
  onClick: _cache[3] || (_cache[3] = (...args) => $options.copyFormat && $options.copyFormat(...args))
397
669
  }, null, 8, _hoisted_7$2),
398
- $props.editor.cursorStyle !== "auto" ? (openBlock(), createElementBlock("div", _hoisted_8$1)) : createCommentVNode("", true)
670
+ $props.editor.cursorStyle !== "auto" ? (openBlock(), createElementBlock("div", _hoisted_8$2)) : createCommentVNode("", true)
399
671
  ])
400
672
  ]),
401
673
  _: 1
@@ -410,7 +682,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
410
682
  width: "152"
411
683
  }, {
412
684
  reference: withCtx(() => [
413
- createElementVNode("div", _hoisted_9$1, [
685
+ createElementVNode("div", _hoisted_9$2, [
414
686
  createVNode(_component_el_tooltip, {
415
687
  class: "item",
416
688
  effect: "dark",
@@ -429,7 +701,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
429
701
  width: "16",
430
702
  height: "40",
431
703
  alt: ""
432
- }, null, 8, _hoisted_10$1)
704
+ }, null, 8, _hoisted_10$2)
433
705
  ], 2)
434
706
  ]),
435
707
  _: 1
@@ -437,7 +709,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
437
709
  ])
438
710
  ]),
439
711
  default: withCtx(() => [
440
- withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$1, [
712
+ withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$2, [
441
713
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.fontsizes, (item, index) => {
442
714
  return openBlock(), createElementBlock("li", {
443
715
  class: normalizeClass([$data.activeFontsize + "px" === item.value ? "active" : ""]),
@@ -448,8 +720,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
448
720
  createElementVNode("span", {
449
721
  style: normalizeStyle({ fontSize: item.value })
450
722
  }, toDisplayString(item.name), 5),
451
- createElementVNode("span", _hoisted_13$1, toDisplayString(item.desc), 1)
452
- ], 10, _hoisted_12$1);
723
+ createElementVNode("span", _hoisted_13$2, toDisplayString(item.desc), 1)
724
+ ], 10, _hoisted_12$2);
453
725
  }), 128))
454
726
  ])), [
455
727
  [_directive_click_outside, $options.handlePopover]
@@ -468,7 +740,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
468
740
  placement: "top"
469
741
  }, {
470
742
  default: withCtx(() => [
471
- createElementVNode("div", _hoisted_14$1, [
743
+ createElementVNode("div", _hoisted_14$2, [
472
744
  createElementVNode("img", {
473
745
  src: $options.getImageUrl("tools_title@3x.png"),
474
746
  "data-editor-id": "makeHeader",
@@ -476,8 +748,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
476
748
  height: "40",
477
749
  alt: "",
478
750
  onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
479
- }, null, 8, _hoisted_15$1),
480
- $data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$1)) : createCommentVNode("", true)
751
+ }, null, 8, _hoisted_15$2),
752
+ $data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$2)) : createCommentVNode("", true)
481
753
  ])
482
754
  ]),
483
755
  _: 1
@@ -489,15 +761,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
489
761
  placement: "top"
490
762
  }, {
491
763
  default: withCtx(() => [
492
- createElementVNode("div", _hoisted_17, [
764
+ createElementVNode("div", _hoisted_17$1, [
493
765
  createElementVNode("img", {
494
766
  src: $options.getImageUrl("tools_bold@3x.png"),
495
767
  width: "40",
496
768
  height: "40",
497
769
  alt: "",
498
770
  onClick: _cache[6] || (_cache[6] = ($event) => $options.setStyle($data.statusInfo.bold ? "removeBold" : "bold", "bold", !$data.statusInfo.bold))
499
- }, null, 8, _hoisted_18),
500
- $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)
501
773
  ])
502
774
  ]),
503
775
  _: 1
@@ -509,7 +781,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
509
781
  width: "152"
510
782
  }, {
511
783
  reference: withCtx(() => [
512
- createElementVNode("div", _hoisted_20, [
784
+ createElementVNode("div", _hoisted_20$1, [
513
785
  createVNode(_component_el_tooltip, {
514
786
  class: "item",
515
787
  effect: "dark",
@@ -527,13 +799,13 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
527
799
  width: "24",
528
800
  height: "40",
529
801
  alt: ""
530
- }, null, 8, _hoisted_21),
802
+ }, null, 8, _hoisted_21$1),
531
803
  createElementVNode("img", {
532
804
  src: $options.getImageUrl("tools_arrow@3x.png"),
533
805
  width: "16",
534
806
  height: "40",
535
807
  alt: ""
536
- }, null, 8, _hoisted_22)
808
+ }, null, 8, _hoisted_22$1)
537
809
  ], 2)
538
810
  ]),
539
811
  _: 1
@@ -541,7 +813,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
541
813
  ])
542
814
  ]),
543
815
  default: withCtx(() => [
544
- withDirectives((openBlock(), createElementBlock("ul", _hoisted_23, [
816
+ withDirectives((openBlock(), createElementBlock("ul", _hoisted_23$1, [
545
817
  createElementVNode("li", {
546
818
  "data-editor-id": "makeHeader",
547
819
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
@@ -568,15 +840,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
568
840
  placement: "top"
569
841
  }, {
570
842
  default: withCtx(() => [
571
- createElementVNode("div", _hoisted_24, [
843
+ createElementVNode("div", _hoisted_24$1, [
572
844
  createElementVNode("img", {
573
845
  src: $options.getImageUrl("tools_xie@3x.png"),
574
846
  width: "40",
575
847
  height: "40",
576
848
  alt: "",
577
849
  onClick: _cache[10] || (_cache[10] = ($event) => $options.setStyle($data.statusInfo.italic ? "removeItalic" : "italic", "italic", !$data.statusInfo.italic))
578
- }, null, 8, _hoisted_25),
579
- $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)
580
852
  ])
581
853
  ]),
582
854
  _: 1
@@ -588,15 +860,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
588
860
  placement: "top"
589
861
  }, {
590
862
  default: withCtx(() => [
591
- createElementVNode("div", _hoisted_27, [
863
+ createElementVNode("div", _hoisted_27$1, [
592
864
  createElementVNode("img", {
593
865
  src: $options.getImageUrl("tools_line@3x.png"),
594
866
  width: "40",
595
867
  height: "40",
596
868
  alt: "",
597
869
  onClick: _cache[11] || (_cache[11] = ($event) => $options.setStyle($data.statusInfo.underline ? "removeUnderline" : "underline", "underline", !$data.statusInfo.underline))
598
- }, null, 8, _hoisted_28),
599
- $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)
600
872
  ])
601
873
  ]),
602
874
  _: 1
@@ -609,14 +881,14 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
609
881
  placement: "top"
610
882
  }, {
611
883
  default: withCtx(() => [
612
- createElementVNode("div", _hoisted_30, [
884
+ createElementVNode("div", _hoisted_30$1, [
613
885
  createElementVNode("img", {
614
886
  src: $options.getImageUrl("icon_web_link@2x.png"),
615
887
  width: "40",
616
888
  height: "40",
617
889
  alt: "",
618
890
  onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
619
- }, null, 8, _hoisted_31)
891
+ }, null, 8, _hoisted_31$1)
620
892
  ])
621
893
  ]),
622
894
  _: 1
@@ -634,7 +906,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
634
906
  height: "40",
635
907
  alt: "",
636
908
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
637
- }, null, 8, _hoisted_32)
909
+ }, null, 8, _hoisted_32$1)
638
910
  ]),
639
911
  _: 1
640
912
  }),
@@ -654,7 +926,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
654
926
  width: "24",
655
927
  height: "40",
656
928
  alt: ""
657
- }, null, 8, _hoisted_33),
929
+ }, null, 8, _hoisted_33$1),
658
930
  createElementVNode("img", {
659
931
  src: $options.getImageUrl("tools_arrow@3x.png"),
660
932
  width: "16",
@@ -833,23 +1105,25 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
833
1105
  ])
834
1106
  ])) : createCommentVNode("", true);
835
1107
  }
836
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-0fe1bef8"]]);
1108
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-719229ac"]]);
837
1109
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
838
1110
  const index_vue_vue_type_style_index_0_lang$4 = "";
839
- const _hoisted_1$6 = { class: "basic-dialog_title" };
840
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
841
- 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 = {
842
1115
  key: 0,
843
1116
  class: "dialog-footer"
844
1117
  };
845
- const _hoisted_4$5 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
846
- const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
1118
+ const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
1119
+ const _hoisted_6$2 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
847
1120
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
848
1121
  name: "index",
849
1122
  props: {
850
1123
  visible: { type: Boolean, default: false },
851
1124
  showBtn: { type: Boolean, default: true },
852
- width: { default: "840px" }
1125
+ width: { default: "840px" },
1126
+ showTitle: { type: Boolean, default: true }
853
1127
  },
854
1128
  emits: ["submit", "cancel"],
855
1129
  setup(__props, { emit: emits }) {
@@ -880,26 +1154,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
880
1154
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
881
1155
  "before-close": handleClose,
882
1156
  width: __props.width,
883
- class: "basic-dialog"
1157
+ class: normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
884
1158
  }, {
885
1159
  header: withCtx(() => [
886
- createElementVNode("div", null, [
887
- createElementVNode("div", _hoisted_1$6, [
888
- _hoisted_2$6,
1160
+ __props.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
1161
+ createElementVNode("div", _hoisted_2$6, [
1162
+ _hoisted_3$6,
889
1163
  renderSlot(_ctx.$slots, "title")
890
1164
  ])
891
- ])
1165
+ ])) : createCommentVNode("", true)
892
1166
  ]),
893
1167
  footer: withCtx(() => [
894
- __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_3$6, [
1168
+ __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
895
1169
  createVNode(unref(ElButton), {
896
- style: { "width": "120px", "border-color": "#CCCCCC", "color": "#333333" },
1170
+ style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
897
1171
  plain: "",
898
1172
  round: "",
899
1173
  onClick: handleClose
900
1174
  }, {
901
1175
  default: withCtx(() => [
902
- _hoisted_4$5
1176
+ _hoisted_5$4
903
1177
  ]),
904
1178
  _: 1
905
1179
  }),
@@ -910,7 +1184,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
910
1184
  onClick: confirm
911
1185
  }, {
912
1186
  default: withCtx(() => [
913
- _hoisted_5$4
1187
+ _hoisted_6$2
914
1188
  ]),
915
1189
  _: 1
916
1190
  })
@@ -920,7 +1194,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
920
1194
  renderSlot(_ctx.$slots, "default")
921
1195
  ]),
922
1196
  _: 3
923
- }, 8, ["modelValue", "width"]);
1197
+ }, 8, ["modelValue", "width", "class"]);
924
1198
  };
925
1199
  }
926
1200
  });
@@ -1070,21 +1344,21 @@ const _hoisted_4$4 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u6587\u
1070
1344
  const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
1071
1345
  const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
1072
1346
  const _hoisted_7$1 = { class: "insert-article_input" };
1073
- const _hoisted_8 = {
1347
+ const _hoisted_8$1 = {
1074
1348
  key: 0,
1075
1349
  class: "nodata"
1076
1350
  };
1077
- const _hoisted_9 = ["infinite-scroll-disabled"];
1078
- const _hoisted_10 = {
1351
+ const _hoisted_9$1 = ["infinite-scroll-disabled"];
1352
+ const _hoisted_10$1 = {
1079
1353
  key: 0,
1080
1354
  class: "video-item"
1081
1355
  };
1082
- const _hoisted_11 = { class: "video-pic" };
1083
- const _hoisted_12 = ["src"];
1084
- const _hoisted_13 = ["src"];
1085
- const _hoisted_14 = { class: "video-text" };
1086
- const _hoisted_15 = { class: "dotdotdot2" };
1087
- 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 = {
1088
1362
  key: 1,
1089
1363
  style: { "display": "inline-flex", "flex-direction": "column" }
1090
1364
  };
@@ -1241,7 +1515,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1241
1515
  _: 1
1242
1516
  }, 8, ["modelValue", "placeholder"])
1243
1517
  ]),
1244
- 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", {
1245
1519
  key: 1,
1246
1520
  "infinite-scroll-immediate": false,
1247
1521
  class: "insert-article_list",
@@ -1261,22 +1535,22 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1261
1535
  default: withCtx(() => {
1262
1536
  var _a;
1263
1537
  return [
1264
- unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10, [
1265
- createElementVNode("div", _hoisted_11, [
1538
+ unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
1539
+ createElementVNode("div", _hoisted_11$1, [
1266
1540
  createElementVNode("img", {
1267
1541
  class: "video-pic",
1268
1542
  src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
1269
- }, null, 8, _hoisted_12),
1543
+ }, null, 8, _hoisted_12$1),
1270
1544
  createElementVNode("img", {
1271
1545
  class: "play",
1272
1546
  src: getImageUrl("play.png")
1273
- }, null, 8, _hoisted_13)
1547
+ }, null, 8, _hoisted_13$1)
1274
1548
  ]),
1275
- createElementVNode("div", _hoisted_14, [
1276
- 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),
1277
1551
  createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
1278
1552
  ])
1279
- ])) : (openBlock(), createElementBlock("div", _hoisted_16, [
1553
+ ])) : (openBlock(), createElementBlock("div", _hoisted_16$1, [
1280
1554
  createElementVNode("span", null, toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
1281
1555
  createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
1282
1556
  ]))
@@ -1286,7 +1560,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1286
1560
  }, 1032, ["modelValue", "label", "onChange"])
1287
1561
  ]);
1288
1562
  }), 128))
1289
- ], 8, _hoisted_9)), [
1563
+ ], 8, _hoisted_9$1)), [
1290
1564
  [unref(vInfiniteScroll), getArticleList]
1291
1565
  ])
1292
1566
  ])
@@ -1336,24 +1610,94 @@ function v4(options, buf, offset) {
1336
1610
  return unsafeStringify(rnds);
1337
1611
  }
1338
1612
  const index_vue_vue_type_style_index_0_lang$2 = "";
1339
- const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", null, "\u63D2\u5165\u56FE\u7247", -1);
1340
- 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 = {
1341
1617
  key: 0,
1342
- class: "upload-wrap"
1618
+ class: "line"
1343
1619
  };
1344
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
1345
- 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);
1346
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 = {
1347
1647
  key: 1,
1348
1648
  class: "img-list"
1349
1649
  };
1350
- const _hoisted_6 = ["src"];
1351
- const _hoisted_7 = { class: "upload-btn" };
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
+ ];
1352
1693
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1353
1694
  name: "index",
1354
1695
  props: {
1355
1696
  visible: { type: Boolean, default: false },
1356
- imgList: { default: [] }
1697
+ imgList: { default: [] },
1698
+ chartGallery: { type: Boolean, default: false },
1699
+ request: { default: {} },
1700
+ imgNum: { default: 20 }
1357
1701
  },
1358
1702
  emits: ["update:imgList", "update:visible", "submit"],
1359
1703
  setup(__props, { emit: emits }) {
@@ -1399,86 +1743,442 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1399
1743
  var ele = document.getElementsByClassName("imageFile");
1400
1744
  ele[0].dispatchEvent(event);
1401
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
+ };
1402
1962
  return (_ctx, _cache) => {
1403
1963
  return openBlock(), createBlock(_sfc_main$6, {
1404
- visible: props.visible
1964
+ visible: props.visible,
1965
+ showTitle: false
1405
1966
  }, {
1406
- title: withCtx(() => [
1407
- _hoisted_1$4
1408
- ]),
1409
1967
  default: withCtx(() => [
1410
- createElementVNode("div", {
1411
- class: normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
1412
- }, [
1413
- !props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
1414
- createElementVNode("div", {
1415
- class: "upload-wrap_box",
1416
- onClick: emitEvent
1417
- }, [
1418
- createVNode(unref(ElIcon), { class: "icon pointer" }, {
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
+ }, {
1419
2142
  default: withCtx(() => [
1420
- createVNode(unref(Picture))
2143
+ _hoisted_21
1421
2144
  ]),
1422
2145
  _: 1
1423
- }),
1424
- _hoisted_3$4
2146
+ })
1425
2147
  ]),
1426
- _hoisted_4$3
1427
- ])) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
1428
- createVNode(unref(draggable), {
1429
- modelValue: unref(imgListTemp),
1430
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(imgListTemp) ? imgListTemp.value = $event : null),
1431
- handle: ".img-item",
1432
- class: "img-wrap",
1433
- group: "people",
1434
- onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
1435
- "item-key": "id",
1436
- onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
1437
- }, {
1438
- item: withCtx(({ element }) => [
1439
- (openBlock(), createElementBlock("div", {
1440
- key: element.id,
1441
- class: "img-item"
1442
- }, [
1443
- createElementVNode("img", {
1444
- src: element.src,
1445
- style: { "object-fit": "cover" },
1446
- width: "120",
1447
- height: "120"
1448
- }, null, 8, _hoisted_6),
1449
- createVNode(unref(CircleCloseFilled), {
1450
- class: "icon pointer",
1451
- onClick: ($event) => deleteImg(element)
1452
- }, null, 8, ["onClick"])
1453
- ]))
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))
1454
2160
  ]),
1455
- footer: withCtx(() => [
1456
- createElementVNode("div", {
1457
- class: "upload-icon pointer",
1458
- onClick: emitEvent
1459
- }, [
1460
- createVNode(unref(ElIcon), { class: "icon pointer" }, {
1461
- default: withCtx(() => [
1462
- createVNode(unref(Plus))
1463
- ]),
1464
- _: 1
1465
- })
1466
- ])
1467
- ]),
1468
- _: 1
1469
- }, 8, ["modelValue"])
1470
- ])),
1471
- createElementVNode("div", _hoisted_7, [
1472
- createElementVNode("input", {
1473
- type: "file",
1474
- name: "file",
1475
- multiple: "",
1476
- class: "imageFile",
1477
- accept: "image/*",
1478
- onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
1479
- }, null, 32)
1480
- ])
1481
- ], 2)
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
+ ])
1482
2182
  ]),
1483
2183
  _: 1
1484
2184
  }, 8, ["visible"]);
@@ -1742,7 +2442,9 @@ const _sfc_main = {
1742
2442
  "getEassyDetail",
1743
2443
  "getArticleList",
1744
2444
  "importEssay",
1745
- "uploadImageByOther"
2445
+ "uploadImageByOther",
2446
+ "chartGallery",
2447
+ "request"
1746
2448
  ],
1747
2449
  data() {
1748
2450
  return {
@@ -1757,6 +2459,7 @@ const _sfc_main = {
1757
2459
  setAlignFlag: true,
1758
2460
  article: {},
1759
2461
  imgList: [],
2462
+ imgNum: 20,
1760
2463
  videoList: [],
1761
2464
  visibleVideo: false,
1762
2465
  visibleCollectArticle: false,
@@ -1843,23 +2546,23 @@ const _sfc_main = {
1843
2546
  }
1844
2547
  },
1845
2548
  created() {
1846
- const me = this;
1847
- me.user = JSON.parse(window.localStorage.getItem("user") || window.localStorage.getItem("userInfo") || "{}");
1848
- me.guid = me.user.uid + "|" + util.tools.guid();
2549
+ const me2 = this;
2550
+ me2.user = JSON.parse(window.localStorage.getItem("user") || window.localStorage.getItem("userInfo") || "{}");
2551
+ me2.guid = me2.user.uid + "|" + util.tools.guid();
1849
2552
  },
1850
2553
  beforeDestroy() {
1851
2554
  this.editorDom && this.editorDom.removeEventListener("blur", this.canSetAlign);
1852
2555
  },
1853
2556
  mounted() {
1854
- const me = this;
1855
- me.editorDom = document.getElementById("editor-content");
1856
- me.editorDom.addEventListener("blur", this.canSetAlign);
2557
+ const me2 = this;
2558
+ me2.editorDom = document.getElementById("editor-content");
2559
+ me2.editorDom.addEventListener("blur", this.canSetAlign);
1857
2560
  if (!window.Squire) {
1858
2561
  import("./squire-raw.7e84068d.js").then(function() {
1859
- me.initSquire();
2562
+ me2.initSquire();
1860
2563
  });
1861
2564
  } else {
1862
- me.initSquire();
2565
+ me2.initSquire();
1863
2566
  }
1864
2567
  },
1865
2568
  methods: {
@@ -1918,36 +2621,36 @@ const _sfc_main = {
1918
2621
  this.visibleVideo = false;
1919
2622
  const fileName = (files[0] && files[0].name || "").toLowerCase();
1920
2623
  if (files[0].size > 1 * 1024 * 1024 * 1024) {
1921
- return me.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
2624
+ return me2.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
1922
2625
  }
1923
2626
  if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
1924
- return me.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
2627
+ return me2.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
1925
2628
  }
1926
- const me = this;
1927
- if (me.loading)
2629
+ const me2 = this;
2630
+ if (me2.loading)
1928
2631
  return;
1929
- me.closeDialog();
1930
- me.loading = true;
2632
+ me2.closeDialog();
2633
+ me2.loading = true;
1931
2634
  this.editor["insertVideoProgress"]();
1932
2635
  this.$emit("insertVideo", this, files, (result) => {
1933
2636
  const video = {
1934
2637
  duration: result.duration || "",
1935
2638
  link: result.videoUrl || "",
1936
- img: me.coverUrl || result.coverUrl || result.customCover || "",
2639
+ img: me2.coverUrl || result.coverUrl || result.customCover || "",
1937
2640
  id: result.videoId,
1938
2641
  desc: "",
1939
2642
  vodSize: result.vodSize || "",
1940
2643
  vodType: result.vodType || ""
1941
2644
  };
1942
- me.$emit("updateAddVideo", true);
1943
- me.editor["insertVideo"](result.videoUrl, video);
1944
- me.updateData(true);
2645
+ me2.$emit("updateAddVideo", true);
2646
+ me2.editor["insertVideo"](result.videoUrl, video);
2647
+ me2.updateData(true);
1945
2648
  }, (_) => {
1946
- me.setMessageBoxNoCancel(_);
2649
+ me2.setMessageBoxNoCancel(_);
1947
2650
  }, () => {
1948
- me.loading = false;
1949
- me.loadingText = "";
1950
- me.removeProgress();
2651
+ me2.loading = false;
2652
+ me2.loadingText = "";
2653
+ me2.removeProgress();
1951
2654
  });
1952
2655
  },
1953
2656
  replaceImg(e) {
@@ -2126,7 +2829,7 @@ const _sfc_main = {
2126
2829
  node.appendChild(del);
2127
2830
  },
2128
2831
  parseVideo(node, essayPicRelVOList) {
2129
- const me = this;
2832
+ const me2 = this;
2130
2833
  const videoData = JSON.parse(node.dataset.video);
2131
2834
  const video = node.querySelector(".halo-video-area");
2132
2835
  const videoId = video.src;
@@ -2144,14 +2847,14 @@ const _sfc_main = {
2144
2847
  "class": "pointer video-delete icon",
2145
2848
  "contenteditable": "false",
2146
2849
  onClick(e) {
2147
- me.removeParentByClass(e.target, "halo-video-content");
2850
+ me2.removeParentByClass(e.target, "halo-video-content");
2148
2851
  e.stopPropagation();
2149
2852
  }
2150
2853
  });
2151
2854
  node.onclick = function() {
2152
- me.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2855
+ me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2153
2856
  };
2154
- const replaceBtn = me.insertVideoBtns(this, video);
2857
+ const replaceBtn = me2.insertVideoBtns(this, video);
2155
2858
  node.appendChild(delBtn);
2156
2859
  node.appendChild(replaceBtn);
2157
2860
  },
@@ -2254,23 +2957,98 @@ const _sfc_main = {
2254
2957
  uploadArticle() {
2255
2958
  this.visibleArticle = true;
2256
2959
  },
2257
- uploadImg(type) {
2960
+ uploadImg(type, num) {
2258
2961
  this.visibleImg = true;
2259
2962
  this.imgType = type;
2260
2963
  this.imgList = [];
2964
+ this.imgNum = num || 20;
2261
2965
  },
2262
- submitImg() {
2263
- const files = this.imgList.map((item) => item.file);
2966
+ async submitImg() {
2264
2967
  this.count = 0;
2265
2968
  this.countList = [];
2266
2969
  this.seamlessCount = 0;
2267
- this.$emit("insertImgs", files, "img", (type, src) => {
2970
+ if (this.imgList.length) {
2971
+ const idList = [];
2972
+ const list_1 = [];
2973
+ const list_2 = [];
2974
+ const list_3 = [];
2975
+ this.imgList.forEach((v) => {
2976
+ idList.push(v.id);
2977
+ if (v.type === 1) {
2978
+ list_1.push(v);
2979
+ } else if (v.type === 3) {
2980
+ list_3.push(v);
2981
+ } else {
2982
+ list_2.push(v);
2983
+ }
2984
+ });
2985
+ const list_2_new = await this.reviseFilesImg(list_2);
2986
+ const list_3_new = await this.reviseSrcImg(list_3);
2987
+ const list_all = [...list_1, ...list_2_new, ...list_3_new];
2988
+ const imgList_new = [];
2989
+ idList.forEach((id) => {
2990
+ const item = list_all.find((value) => value.id === id);
2991
+ if (item && item.src) {
2992
+ imgList_new.push(item);
2993
+ }
2994
+ });
2995
+ if (this.imgType === "coverImg") {
2996
+ this.$emit("insertImgs", imgList_new, this.imgType);
2997
+ } else {
2998
+ imgList_new.forEach((img) => {
2999
+ this.imgUploadHandler("img", img.src);
3000
+ });
3001
+ }
2268
3002
  this.visibleImg = false;
2269
- this.imgUploadHandler(type, src);
2270
- });
3003
+ } else {
3004
+ this.visibleImg = false;
3005
+ }
3006
+ },
3007
+ async reviseFilesImg(list) {
3008
+ if (list.length) {
3009
+ const p_l = [];
3010
+ list.forEach((v) => {
3011
+ const p = new Promise((resolve, reject) => {
3012
+ try {
3013
+ this.$emit("insertImgs", [v.file], "img", (type, src) => {
3014
+ resolve({ ...v, src });
3015
+ });
3016
+ } catch (error) {
3017
+ reject(error);
3018
+ }
3019
+ });
3020
+ p_l.push(p);
3021
+ });
3022
+ const res = await Promise.all(p_l);
3023
+ return res;
3024
+ } else {
3025
+ return [];
3026
+ }
3027
+ },
3028
+ async reviseSrcImg(list) {
3029
+ const copyToEssayImg = this.request.copyToEssayImg;
3030
+ if (copyToEssayImg && list.length) {
3031
+ const arr = [];
3032
+ list.forEach((v) => {
3033
+ arr.push(v.src);
3034
+ });
3035
+ const res = await copyToEssayImg({ imgUrls: arr.join(",") });
3036
+ if (res.data.code === 0) {
3037
+ const data = res.data.data || "";
3038
+ const list_new = data ? data.split(",") : [];
3039
+ list.forEach((v, i) => {
3040
+ v.src = list_new[i] || "";
3041
+ });
3042
+ return list;
3043
+ } else {
3044
+ return [];
3045
+ }
3046
+ } else {
3047
+ return [];
3048
+ }
2271
3049
  },
2272
3050
  imgUploadHandler(type, imgSrc) {
2273
- const me = this;
3051
+ const me2 = this;
2274
3052
  if (type && imgSrc) {
2275
3053
  if (type === "uploadAgainImages") {
2276
3054
  this.updateImage(imgSrc, this.currentImg);
@@ -2282,7 +3060,7 @@ const _sfc_main = {
2282
3060
  src: imgSrc,
2283
3061
  img: imgSrc,
2284
3062
  selected: false,
2285
- seamlessFlag: me.replaceSeamless,
3063
+ seamlessFlag: me2.replaceSeamless,
2286
3064
  type: "2"
2287
3065
  }, this.range);
2288
3066
  } else if (type === "replace-poster") {
@@ -2318,7 +3096,7 @@ const _sfc_main = {
2318
3096
  }
2319
3097
  },
2320
3098
  insertVideoBtns(editor, node) {
2321
- const me = this;
3099
+ const me2 = this;
2322
3100
  var replaceBtn = editor.createElement("div", {
2323
3101
  "class": "video-cover-replace pointer",
2324
3102
  "contenteditable": "false"
@@ -2326,14 +3104,14 @@ const _sfc_main = {
2326
3104
  replaceBtn.onclick = function(e) {
2327
3105
  const posterBtn = document.querySelector(".replace-poster");
2328
3106
  posterBtn.click();
2329
- me.currentVideo = node;
3107
+ me2.currentVideo = node;
2330
3108
  e.stopPropagation();
2331
3109
  };
2332
3110
  replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
2333
3111
  return replaceBtn;
2334
3112
  },
2335
3113
  insertImgOperateBtns(editor, data) {
2336
- const me = this;
3114
+ const me2 = this;
2337
3115
  var replaceBtn = editor.createElement("div", {
2338
3116
  "class": "img-replace pointer",
2339
3117
  "contenteditable": "false"
@@ -2342,11 +3120,11 @@ const _sfc_main = {
2342
3120
  "class": "img-delete pointer icon",
2343
3121
  "contenteditable": "false",
2344
3122
  onClick(e) {
2345
- if (me.disabled)
3123
+ if (me2.disabled)
2346
3124
  return;
2347
- me.removeSeamlessLaster(e);
2348
- me.removeParentByClass(e.target, "halo-img-content");
2349
- me.updateData(true);
3125
+ me2.removeSeamlessLaster(e);
3126
+ me2.removeParentByClass(e.target, "halo-img-content");
3127
+ me2.updateData(true);
2350
3128
  }
2351
3129
  });
2352
3130
  var descInputWrap;
@@ -2359,13 +3137,13 @@ const _sfc_main = {
2359
3137
  placeholder: "\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0(\u6700\u591A50\u5B57)",
2360
3138
  "contenteditable": "false"
2361
3139
  });
2362
- descInput.disabled = me.disabled;
3140
+ descInput.disabled = me2.disabled;
2363
3141
  descInput.oninput = function(e) {
2364
- const parent = me.findParentByClass(e.target, "halo-img-content");
3142
+ const parent = me2.findParentByClass(e.target, "halo-img-content");
2365
3143
  const img = parent.querySelector(".halo-picture-area");
2366
3144
  img.dataset.desc = e.target.value;
2367
3145
  if (e.target.value.length > 49) {
2368
- return me.setToast("\u9650\u523650\u4E2A\u5B57\u7B26");
3146
+ return me2.setToast("\u9650\u523650\u4E2A\u5B57\u7B26");
2369
3147
  }
2370
3148
  };
2371
3149
  descInput.value = data.content || "";
@@ -2375,22 +3153,22 @@ const _sfc_main = {
2375
3153
  "style": `${data.seamlessFlag === "1" && "display: none"}`
2376
3154
  }, [descInput]);
2377
3155
  replaceBtn.onclick = function(e) {
2378
- if (me.disabled)
3156
+ if (me2.disabled)
2379
3157
  return;
2380
- const current = me.findParentByClass(e.target, "halo-img-content");
3158
+ const current = me2.findParentByClass(e.target, "halo-img-content");
2381
3159
  const range = document.createRange();
2382
3160
  range.setEnd(current.previousElementSibling, 1);
2383
3161
  range.collapse(false);
2384
- me.range = range;
2385
- me.replaceSeamless = data.seamlessFlag || "0";
3162
+ me2.range = range;
3163
+ me2.replaceSeamless = data.seamlessFlag || "0";
2386
3164
  const replaceInput = document.querySelector(".replace-input");
2387
- me.removePreviousImg = () => me.removeParentByClass(e.target, "halo-img-content");
3165
+ me2.removePreviousImg = () => me2.removeParentByClass(e.target, "halo-img-content");
2388
3166
  replaceInput.click();
2389
3167
  };
2390
3168
  delBtn.onclick = function(e) {
2391
- if (me.disabled)
3169
+ if (me2.disabled)
2392
3170
  return;
2393
- const cur = me.findParentByClass(e.target, "halo-img-content");
3171
+ const cur = me2.findParentByClass(e.target, "halo-img-content");
2394
3172
  const currentImg = cur.getElementsByClassName("halo-picture-area")[0];
2395
3173
  const currentData = JSON.parse(currentImg.getAttribute("data"));
2396
3174
  if (currentData.seamlessFlag === "0") {
@@ -2408,15 +3186,15 @@ const _sfc_main = {
2408
3186
  console.log(e2);
2409
3187
  }
2410
3188
  }
2411
- me.removeParentByClass(e.target, "halo-img-content");
2412
- me.updateData(true);
3189
+ me2.removeParentByClass(e.target, "halo-img-content");
3190
+ me2.updateData(true);
2413
3191
  };
2414
3192
  replaceBtn.innerHTML = "\u66FF\u6362";
2415
3193
  return [replaceBtn, delBtn, descInputWrap];
2416
3194
  },
2417
3195
  removeSeamlessLaster(e) {
2418
- const me = this;
2419
- const cur = me.findParentByClass(e.target, "halo-img-content");
3196
+ const me2 = this;
3197
+ const cur = me2.findParentByClass(e.target, "halo-img-content");
2420
3198
  const currentImg = cur.getElementsByClassName("halo-picture-area")[0];
2421
3199
  const currentData = JSON.parse(currentImg.getAttribute("data"));
2422
3200
  if (currentData.seamlessFlag === "0") {
@@ -2443,9 +3221,9 @@ const _sfc_main = {
2443
3221
  });
2444
3222
  },
2445
3223
  initSquire() {
2446
- const me = this;
2447
- const editorDom = me.editorDom;
2448
- me.editor = new window.Squire(me.editorDom, {
3224
+ const me2 = this;
3225
+ const editorDom = me2.editorDom;
3226
+ me2.editor = new window.Squire(me2.editorDom, {
2449
3227
  blockTag: "p",
2450
3228
  blockAttributes: {
2451
3229
  "class": "halo-paragraph"
@@ -2460,7 +3238,7 @@ const _sfc_main = {
2460
3238
  this.styleStatus.size = parseInt(this.fontInfo.size) === 100 ? 17 : this.fontInfo.size;
2461
3239
  this.styleStatus.color = this.fontInfo.color;
2462
3240
  });
2463
- me.editor.addEventListener("willPaste", function(type, handler) {
3241
+ me2.editor.addEventListener("willPaste", function(type, handler) {
2464
3242
  function validateDom() {
2465
3243
  const fragment = type && type.fragment || {};
2466
3244
  let tmpNode = document.createElement("div");
@@ -2471,7 +3249,7 @@ const _sfc_main = {
2471
3249
  }
2472
3250
  validateDom();
2473
3251
  if (type.defaultPrevented) {
2474
- me.getSticker(type, handler);
3252
+ me2.getSticker(type, handler);
2475
3253
  }
2476
3254
  });
2477
3255
  window.Squire.prototype.makeParagraph = function(content, position, textAlign) {
@@ -2531,7 +3309,7 @@ const _sfc_main = {
2531
3309
  selection.addRange(range);
2532
3310
  };
2533
3311
  window.Squire.prototype.insertImages = function(src, data = {}, range) {
2534
- var isHaloImage = me.isHaloImage(src);
3312
+ var isHaloImage = me2.isHaloImage(src);
2535
3313
  var scrollTop = document.documentElement.scrollTop;
2536
3314
  const isSeameless = data.seamlessFlag === "1";
2537
3315
  var loading = this.createElement("div", {
@@ -2566,7 +3344,7 @@ const _sfc_main = {
2566
3344
  "contenteditable": "false",
2567
3345
  "draggable": "false"
2568
3346
  });
2569
- const btns = me.insertImgOperateBtns(this, data);
3347
+ const btns = me2.insertImgOperateBtns(this, data);
2570
3348
  var childList = [];
2571
3349
  childList.push(img);
2572
3350
  childList.push(...btns);
@@ -2586,8 +3364,8 @@ const _sfc_main = {
2586
3364
  };
2587
3365
  this.insertElement(p, range);
2588
3366
  if (isSeameless) {
2589
- me.removeDefault(p, "nextElementSibling");
2590
- me.removeDefault(p, "previousElementSibling");
3367
+ me2.removeDefault(p, "nextElementSibling");
3368
+ me2.removeDefault(p, "previousElementSibling");
2591
3369
  }
2592
3370
  setTimeout(() => {
2593
3371
  document.documentElement.scrollTop = scrollTop;
@@ -2623,16 +3401,16 @@ const _sfc_main = {
2623
3401
  "data-content": data.content || "",
2624
3402
  "poster": data.img || ""
2625
3403
  });
2626
- var delBtn = me.genIconDom({
3404
+ var delBtn = me2.genIconDom({
2627
3405
  "class": "pointer video-delete icon",
2628
3406
  "contenteditable": "false",
2629
3407
  onClick(e) {
2630
- me.removeParentByClass(e.target, "halo-video-content");
3408
+ me2.removeParentByClass(e.target, "halo-video-content");
2631
3409
  e.stopPropagation();
2632
3410
  }
2633
3411
  });
2634
3412
  console.log(delBtn);
2635
- const posterBtn = me.insertVideoBtns(this, video);
3413
+ const posterBtn = me2.insertVideoBtns(this, video);
2636
3414
  var p = this.createElement("DIV", {
2637
3415
  "class": "halo-video-content",
2638
3416
  "contenteditable": "false",
@@ -2640,7 +3418,7 @@ const _sfc_main = {
2640
3418
  "draggable": "true"
2641
3419
  }, [video, delBtn, posterBtn]);
2642
3420
  p.onclick = function() {
2643
- me.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
3421
+ me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2644
3422
  };
2645
3423
  let targetMove = "";
2646
3424
  p.ondragstart = function(e) {
@@ -2676,7 +3454,7 @@ const _sfc_main = {
2676
3454
  var scrollTop = document.documentElement.scrollTop;
2677
3455
  var img = `<img class="link-img" src='/static/img/icon_link@3x.png'></img>`;
2678
3456
  var a = `<a class="halo-link-mes" data-url="${link}" target="_blank">${text}</a>`;
2679
- const del = me.generateDelLinkIcon();
3457
+ const del = me2.generateDelLinkIcon();
2680
3458
  var p = this.createElement("DIV", {
2681
3459
  "class": "halo-link",
2682
3460
  "contenteditable": "false"
@@ -2688,10 +3466,10 @@ const _sfc_main = {
2688
3466
  document.documentElement.scrollTop = scrollTop;
2689
3467
  }, 50);
2690
3468
  };
2691
- me.sticky();
3469
+ me2.sticky();
2692
3470
  },
2693
3471
  removeDefault(next, key) {
2694
- const me = this;
3472
+ const me2 = this;
2695
3473
  const cur = next[key];
2696
3474
  if (!cur || cur.innerText !== "\n")
2697
3475
  return;
@@ -2699,30 +3477,30 @@ const _sfc_main = {
2699
3477
  const isLasterBlock = next.classList.contains("halo-paragraph") || false;
2700
3478
  if (blockDefault && isLasterBlock) {
2701
3479
  cur.remove();
2702
- me.removeDefault(cur, key);
3480
+ me2.removeDefault(cur, key);
2703
3481
  } else {
2704
3482
  if (blockDefault) {
2705
3483
  cur.style.display = "none";
2706
- me.removeDefault(cur, key);
3484
+ me2.removeDefault(cur, key);
2707
3485
  }
2708
3486
  }
2709
3487
  },
2710
3488
  generateDelLinkIcon() {
2711
- const me = this;
3489
+ const me2 = this;
2712
3490
  const del = this.editor.createElement("img", {
2713
3491
  "class": "img-delete",
2714
3492
  "contenteditable": "false",
2715
3493
  "src": car_ciose
2716
3494
  });
2717
3495
  del.onclick = function(e) {
2718
- const parent = me.findParentByClass(e.target, "halo-link");
3496
+ const parent = me2.findParentByClass(e.target, "halo-link");
2719
3497
  parent.remove();
2720
3498
  };
2721
3499
  return del;
2722
3500
  },
2723
3501
  getEditorData() {
2724
- const me = this;
2725
- const children = Array.from(me.editorDom.children);
3502
+ const me2 = this;
3503
+ const children = Array.from(me2.editorDom.children);
2726
3504
  let isNotParagraph = true;
2727
3505
  let count = 0;
2728
3506
  let imgCount = 0;
@@ -2738,7 +3516,7 @@ const _sfc_main = {
2738
3516
  } else if (value.className.includes("article-wrap")) {
2739
3517
  const article = JSON.parse(value.dataset.article);
2740
3518
  cardEassyFlagStatus = !!article.cardEassyFlag;
2741
- me.hasArticleCard = true;
3519
+ me2.hasArticleCard = true;
2742
3520
  } else if (value.className.includes("halo-paragraph") || value.tagName === "OL" || value.tagName === "UL") {
2743
3521
  const text = value.innerText && value.innerText.trim();
2744
3522
  if (text.length < 1) {
@@ -2781,43 +3559,43 @@ const _sfc_main = {
2781
3559
  return url.indexOf("jddmoto.com") > -1 || url.indexOf("58moto.com") > -1;
2782
3560
  },
2783
3561
  updateUploads() {
2784
- const me = this;
3562
+ const me2 = this;
2785
3563
  setTimeout(() => {
2786
3564
  const uploads = document.querySelectorAll(".no-upload") || [];
2787
- me.uploadStore = {};
2788
- me.currentIndex = 0;
3565
+ me2.uploadStore = {};
3566
+ me2.currentIndex = 0;
2789
3567
  Array.from(uploads).map((_, index) => {
2790
3568
  const id = _.getAttribute("id");
2791
3569
  const key = index + "|" + id;
2792
- me.uploadStore[key] = _;
3570
+ me2.uploadStore[key] = _;
2793
3571
  });
2794
- me.uploadImageHandler();
3572
+ me2.uploadImageHandler();
2795
3573
  }, 500);
2796
3574
  },
2797
3575
  uploadImageHandler(key = "") {
2798
- const me = this;
2799
- const list = Object.keys(me.uploadStore);
2800
- if (!list.length || me.currentIndex > list.length)
3576
+ const me2 = this;
3577
+ const list = Object.keys(me2.uploadStore);
3578
+ if (!list.length || me2.currentIndex > list.length)
2801
3579
  return;
2802
3580
  const one = 1;
2803
3581
  const two = 2;
2804
3582
  const three = 3;
2805
3583
  const moreImage = list.length > three;
2806
- if (me.currentIndex) {
3584
+ if (me2.currentIndex) {
2807
3585
  if (moreImage) {
2808
- me.uploadImage(key).then((_) => me.uploadImageHandler(list[me.currentIndex++]));
3586
+ me2.uploadImage(key).then((_) => me2.uploadImageHandler(list[me2.currentIndex++]));
2809
3587
  }
2810
3588
  } else {
2811
- me.uploadImage(list[0]).then((_) => me.uploadImageHandler(list[me.currentIndex++]));
2812
- list.length > one && me.uploadImage(list[one]).then((_) => me.uploadImageHandler(list[me.currentIndex++]));
2813
- list.length > two && me.uploadImage(list[two]).then((_) => moreImage && me.uploadImageHandler(list[me.currentIndex++]));
2814
- me.currentIndex = three;
3589
+ me2.uploadImage(list[0]).then((_) => me2.uploadImageHandler(list[me2.currentIndex++]));
3590
+ list.length > one && me2.uploadImage(list[one]).then((_) => me2.uploadImageHandler(list[me2.currentIndex++]));
3591
+ list.length > two && me2.uploadImage(list[two]).then((_) => moreImage && me2.uploadImageHandler(list[me2.currentIndex++]));
3592
+ me2.currentIndex = three;
2815
3593
  }
2816
3594
  },
2817
3595
  uploadImage(key = "") {
2818
- const me = this;
2819
- const itemId = me.guid || "";
2820
- const currentImg = me.uploadStore[key];
3596
+ const me2 = this;
3597
+ const itemId = me2.guid || "";
3598
+ const currentImg = me2.uploadStore[key];
2821
3599
  const imageUrl = key.split("|")[1] || "";
2822
3600
  if (!currentImg) {
2823
3601
  console.log("\u56FE\u7247\u4E0D\u5B58\u5728", key);
@@ -2838,7 +3616,7 @@ const _sfc_main = {
2838
3616
  if (imgAgain) {
2839
3617
  imgAgain.className = "img-again";
2840
3618
  imgAgain.onclick = function(e) {
2841
- me.currentImg = currentImg2;
3619
+ me2.currentImg = currentImg2;
2842
3620
  const upload = document.querySelector(".upload-again-input");
2843
3621
  upload && upload.click();
2844
3622
  };
@@ -2851,13 +3629,13 @@ const _sfc_main = {
2851
3629
  }).then((_) => {
2852
3630
  if (_.data.code === 0 && _.data.data) {
2853
3631
  const img = _.data.data.thirdPartyImageUrl;
2854
- me.updateImage(img, currentImg);
3632
+ me2.updateImage(img, currentImg);
2855
3633
  } else {
2856
3634
  parent && uploadFailHandler(currentImg);
2857
3635
  }
2858
- if (Object.keys(me.uploadStore).length === Number(key.split("|")[0] || "") + 1) {
3636
+ if (Object.keys(me2.uploadStore).length === Number(key.split("|")[0] || "") + 1) {
2859
3637
  setTimeout(() => {
2860
- me.updateData(true);
3638
+ me2.updateData(true);
2861
3639
  }, 100);
2862
3640
  }
2863
3641
  }).catch((e) => {
@@ -2890,39 +3668,44 @@ const _sfc_main = {
2890
3668
  getSticker(type, handler) {
2891
3669
  this.setSticker(type.fragment.children);
2892
3670
  },
2893
- setSticker(data) {
2894
- const me = this;
3671
+ setSticker(data, isImport) {
3672
+ const me2 = this;
2895
3673
  data = Array.from(data);
2896
3674
  data.map(function(value, index) {
2897
- 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)");
3675
+ let htmlArr = [];
3676
+ if (isImport) {
3677
+ 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)");
3678
+ } else {
3679
+ 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)");
3680
+ }
2898
3681
  htmlArr.map(function(nValue) {
2899
3682
  if (!nValue || nValue === "&nbsp;") {
2900
3683
  return;
2901
3684
  }
2902
3685
  if (nValue.indexOf("[img") > -1) {
2903
3686
  const src = nValue.replace(/\[img src=(.*?)\]/g, "$1").replace(/amp;/g, "");
2904
- me.editor.insertImages(src, {
3687
+ me2.editor.insertImages(src, {
2905
3688
  src,
2906
3689
  img: src,
2907
3690
  selected: false,
2908
3691
  type: "2"
2909
3692
  });
2910
3693
  } else {
2911
- me.editor.makeParagraph(nValue);
3694
+ me2.editor.makeParagraph(nValue);
2912
3695
  }
2913
3696
  });
2914
3697
  });
2915
- me.updateUploads();
3698
+ me2.updateUploads();
2916
3699
  this.updateData(true);
2917
3700
  },
2918
3701
  mouseLeave() {
2919
- const me = this;
2920
- me.updateData();
3702
+ const me2 = this;
3703
+ me2.updateData();
2921
3704
  },
2922
3705
  setBack(e, type) {
2923
- const me = this;
2924
- me.refreshImg();
2925
- me.updateData(true);
3706
+ const me2 = this;
3707
+ me2.refreshImg();
3708
+ me2.updateData(true);
2926
3709
  },
2927
3710
  refreshImg() {
2928
3711
  Array.from(document.querySelectorAll(".halo-img-content")).map((_ = {}) => {
@@ -2949,8 +3732,8 @@ const _sfc_main = {
2949
3732
  });
2950
3733
  },
2951
3734
  sticky() {
2952
- const me = this;
2953
- me.$nextTick(function() {
3735
+ const me2 = this;
3736
+ me2.$nextTick(function() {
2954
3737
  const sticky = document.querySelector(".tool-box");
2955
3738
  if (!sticky) {
2956
3739
  return;
@@ -2968,12 +3751,12 @@ const _sfc_main = {
2968
3751
  });
2969
3752
  },
2970
3753
  setContent(e, obj) {
2971
- const me = this;
3754
+ const me2 = this;
2972
3755
  const id = e.target.id || e.target.dataset.editorId;
2973
3756
  const value = "";
2974
- if (id && me.editor && me.editor[id]) {
2975
- me.editor[id](value, obj);
2976
- me.updateData(true);
3757
+ if (id && me2.editor && me2.editor[id]) {
3758
+ me2.editor[id](value, obj);
3759
+ me2.updateData(true);
2977
3760
  }
2978
3761
  },
2979
3762
  canSetAlign() {
@@ -3009,47 +3792,47 @@ const _sfc_main = {
3009
3792
  this.updateData(true);
3010
3793
  },
3011
3794
  addLink(type) {
3012
- const me = this;
3013
- me.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
3014
- me.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
3015
- me.viewStatus = true;
3016
- me.linkStatus = true;
3795
+ const me2 = this;
3796
+ me2.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
3797
+ me2.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
3798
+ me2.viewStatus = true;
3799
+ me2.linkStatus = true;
3017
3800
  },
3018
3801
  validUrl(url) {
3019
3802
  const objExp = /^(((ht|f)tp(s?)):\/\/)?(www.|[a-zA-Z].)[a-zA-Z0-9-.]+.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|cn|im)(:[0-9]+)*(\/($|[a-zA-Z0-9.,;?'&%$#=~_-]+))*$/;
3020
3803
  return objExp.test(url);
3021
3804
  },
3022
3805
  confirmLink() {
3023
- const me = this;
3024
- if (!me.linkContent) {
3806
+ const me2 = this;
3807
+ if (!me2.linkContent) {
3025
3808
  return ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740\uFF01");
3026
3809
  }
3027
- if (me.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
3810
+ if (me2.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
3028
3811
  this.visibleCollectArticle = false;
3029
- return me.importLinkData();
3812
+ return me2.importLinkData();
3030
3813
  }
3031
- if (!this.validUrl(me.linkContent)) {
3032
- return me.setToast("URL\u65E0\u6548");
3814
+ if (!this.validUrl(me2.linkContent)) {
3815
+ return me2.setToast("URL\u65E0\u6548");
3033
3816
  }
3034
- if (me.linkContent.indexOf("jddmoto.com") === -1 && me.linkContent.indexOf("58moto.com") === -1) {
3035
- return me.setToast("\u8BF7\u8F93\u5165\u54C8\u7F57\u6469\u6258\u5185\u90E8\u7F51\u5740");
3817
+ if (me2.linkContent.indexOf("jddmoto.com") === -1 && me2.linkContent.indexOf("58moto.com") === -1) {
3818
+ return me2.setToast("\u8BF7\u8F93\u5165\u54C8\u7F57\u6469\u6258\u5185\u90E8\u7F51\u5740");
3036
3819
  }
3037
- me.editor["insertLink"](me.linkContent);
3038
- me.linkContent = "";
3039
- me.closeDialog();
3820
+ me2.editor["insertLink"](me2.linkContent);
3821
+ me2.linkContent = "";
3822
+ me2.closeDialog();
3040
3823
  },
3041
3824
  importLinkData() {
3042
- const me = this;
3043
- if (me.loading) {
3825
+ const me2 = this;
3826
+ if (me2.loading) {
3044
3827
  return ElMessage("\u6B63\u5728\u83B7\u53D6\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E...");
3045
3828
  }
3046
- me.loading = true;
3829
+ me2.loading = true;
3047
3830
  const params = {
3048
- action: me.isOss ? "30008OSS" : 30008,
3049
- url: me.linkContent
3831
+ action: me2.isOss ? "30008OSS" : 30008,
3832
+ url: me2.linkContent
3050
3833
  };
3051
- if (!me.isOss) {
3052
- params.autherid = me.user.uid;
3834
+ if (!me2.isOss) {
3835
+ params.autherid = me2.user.uid;
3053
3836
  }
3054
3837
  this.importEssay(params).then((response) => {
3055
3838
  console.log(response);
@@ -3058,26 +3841,26 @@ const _sfc_main = {
3058
3841
  data.data.content = data.data.content.replace(/<a href="(.*?)"(.*?)>/g, "").replace(/<\/a>/g, "").replace(/<iframe([^<>]*)>([^<>]*)<\/iframe>/g, "").replace(/<video([^<>]*)>([^<>]*)<\/video>/g, "");
3059
3842
  const importContent = document.createElement("div");
3060
3843
  importContent.innerHTML = data.data.content;
3061
- me.setSticker(importContent.children);
3062
- me.closeDialog();
3063
- me.linkContent = "";
3844
+ me2.setSticker(importContent.children, true);
3845
+ me2.closeDialog();
3846
+ me2.linkContent = "";
3064
3847
  return;
3065
3848
  } else {
3066
- me.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
3849
+ me2.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
3067
3850
  }
3068
3851
  }).catch((err) => {
3069
3852
  console.log(err.message);
3070
- me.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
3853
+ me2.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
3071
3854
  }).finally((_) => {
3072
- me.loading = false;
3855
+ me2.loading = false;
3073
3856
  });
3074
3857
  },
3075
3858
  openDialog(name) {
3076
- const me = this;
3077
- me.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
3078
- me.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
3079
- me.viewTip = name === "img" ? "" : "\u4E3A\u4E86\u83B7\u5F97\u66F4\u9AD8\u7684\u63A8\u8350\u548C\u70B9\u51FB\u91CF\uFF0C\u5EFA\u8BAE\u4E0A\u4F20720p(1280*720)\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC7500MB(\u89C6\u9891\u4E0A\u4F20\u9700\u8981\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85)";
3080
- me.viewStatus = true;
3859
+ const me2 = this;
3860
+ me2.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
3861
+ me2.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
3862
+ me2.viewTip = name === "img" ? "" : "\u4E3A\u4E86\u83B7\u5F97\u66F4\u9AD8\u7684\u63A8\u8350\u548C\u70B9\u51FB\u91CF\uFF0C\u5EFA\u8BAE\u4E0A\u4F20720p(1280*720)\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC7500MB(\u89C6\u9891\u4E0A\u4F20\u9700\u8981\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85)";
3863
+ me2.viewStatus = true;
3081
3864
  },
3082
3865
  closeDialog() {
3083
3866
  this.viewStatus = false;
@@ -3206,8 +3989,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3206
3989
  "onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
3207
3990
  visible: $data.visibleImg,
3208
3991
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
3992
+ chartGallery: $props.chartGallery,
3993
+ request: $props.request,
3994
+ imgNum: $data.imgNum,
3209
3995
  onSubmit: $options.submitImg
3210
- }, null, 8, ["img-list", "visible", "onSubmit"]),
3996
+ }, null, 8, ["img-list", "visible", "chartGallery", "request", "imgNum", "onSubmit"]),
3211
3997
  createVNode(_component_VideoUpload, {
3212
3998
  visible: $data.visibleVideo,
3213
3999
  "onUpdate:visible": _cache[8] || (_cache[8] = ($event) => $data.visibleVideo = $event),