@haluo/biz 2.0.13-beta → 2.0.13

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
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";
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,268 @@ 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);
41
303
  const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
42
304
  const ToolBar_vue_vue_type_style_index_1_lang = "";
43
305
  const _export_sfc = (sfc, props) => {
@@ -833,7 +1095,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
833
1095
  ])
834
1096
  ])) : createCommentVNode("", true);
835
1097
  }
836
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-0fe1bef8"]]);
1098
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-dd9e6bac"]]);
837
1099
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
838
1100
  const index_vue_vue_type_style_index_0_lang$4 = "";
839
1101
  const _hoisted_1$6 = { class: "basic-dialog_title" };
@@ -1804,9 +2066,7 @@ const _sfc_main = {
1804
2066
  },
1805
2067
  countList: [],
1806
2068
  replaceSeamless: 0,
1807
- seamlessCount: 0,
1808
- overLine: "",
1809
- currentVideo: null
2069
+ seamlessCount: 0
1810
2070
  };
1811
2071
  },
1812
2072
  computed: {
@@ -1843,23 +2103,23 @@ const _sfc_main = {
1843
2103
  }
1844
2104
  },
1845
2105
  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();
2106
+ const me2 = this;
2107
+ me2.user = JSON.parse(window.localStorage.getItem("user") || window.localStorage.getItem("userInfo") || "{}");
2108
+ me2.guid = me2.user.uid + "|" + util.tools.guid();
1849
2109
  },
1850
2110
  beforeDestroy() {
1851
2111
  this.editorDom && this.editorDom.removeEventListener("blur", this.canSetAlign);
1852
2112
  },
1853
2113
  mounted() {
1854
- const me = this;
1855
- me.editorDom = document.getElementById("editor-content");
1856
- me.editorDom.addEventListener("blur", this.canSetAlign);
2114
+ const me2 = this;
2115
+ me2.editorDom = document.getElementById("editor-content");
2116
+ me2.editorDom.addEventListener("blur", this.canSetAlign);
1857
2117
  if (!window.Squire) {
1858
2118
  import("./squire-raw.7e84068d.js").then(function() {
1859
- me.initSquire();
2119
+ me2.initSquire();
1860
2120
  });
1861
2121
  } else {
1862
- me.initSquire();
2122
+ me2.initSquire();
1863
2123
  }
1864
2124
  },
1865
2125
  methods: {
@@ -1918,36 +2178,36 @@ const _sfc_main = {
1918
2178
  this.visibleVideo = false;
1919
2179
  const fileName = (files[0] && files[0].name || "").toLowerCase();
1920
2180
  if (files[0].size > 1 * 1024 * 1024 * 1024) {
1921
- return me.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
2181
+ return me2.setToast("\u89C6\u9891\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71GB");
1922
2182
  }
1923
2183
  if (fileName.indexOf(".mp4") === -1 && fileName.indexOf(".mov") === -1) {
1924
- return me.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
2184
+ return me2.setToast("\u89C6\u9891\u683C\u5F0F\u4E0D\u662Fmp4\u6216mov");
1925
2185
  }
1926
- const me = this;
1927
- if (me.loading)
2186
+ const me2 = this;
2187
+ if (me2.loading)
1928
2188
  return;
1929
- me.closeDialog();
1930
- me.loading = true;
2189
+ me2.closeDialog();
2190
+ me2.loading = true;
1931
2191
  this.editor["insertVideoProgress"]();
1932
2192
  this.$emit("insertVideo", this, files, (result) => {
1933
2193
  const video = {
1934
2194
  duration: result.duration || "",
1935
2195
  link: result.videoUrl || "",
1936
- img: me.coverUrl || result.coverUrl || result.customCover || "",
2196
+ img: me2.coverUrl || result.coverUrl || result.customCover || "",
1937
2197
  id: result.videoId,
1938
2198
  desc: "",
1939
2199
  vodSize: result.vodSize || "",
1940
2200
  vodType: result.vodType || ""
1941
2201
  };
1942
- me.$emit("updateAddVideo", true);
1943
- me.editor["insertVideo"](result.videoUrl, video);
1944
- me.updateData(true);
2202
+ me2.$emit("updateAddVideo", true);
2203
+ me2.editor["insertVideo"](result.videoUrl, video);
2204
+ me2.updateData(true);
1945
2205
  }, (_) => {
1946
- me.setMessageBoxNoCancel(_);
2206
+ me2.setMessageBoxNoCancel(_);
1947
2207
  }, () => {
1948
- me.loading = false;
1949
- me.loadingText = "";
1950
- me.removeProgress();
2208
+ me2.loading = false;
2209
+ me2.loadingText = "";
2210
+ me2.removeProgress();
1951
2211
  });
1952
2212
  },
1953
2213
  replaceImg(e) {
@@ -1956,12 +2216,6 @@ const _sfc_main = {
1956
2216
  this.imgUploadHandler(type, src);
1957
2217
  });
1958
2218
  },
1959
- replacePoster(e) {
1960
- this.$emit("insertImgs", e.target.files, "replace-poster", (type, src) => {
1961
- this.visibleImg = false;
1962
- this.imgUploadHandler(type, src);
1963
- });
1964
- },
1965
2219
  againImg(e) {
1966
2220
  this.$emit("insertImgs", e.target.files, "uploadAgainImages", (type, src) => {
1967
2221
  this.visibleImg = false;
@@ -2126,7 +2380,7 @@ const _sfc_main = {
2126
2380
  node.appendChild(del);
2127
2381
  },
2128
2382
  parseVideo(node, essayPicRelVOList) {
2129
- const me = this;
2383
+ const me2 = this;
2130
2384
  const videoData = JSON.parse(node.dataset.video);
2131
2385
  const video = node.querySelector(".halo-video-area");
2132
2386
  const videoId = video.src;
@@ -2144,16 +2398,14 @@ const _sfc_main = {
2144
2398
  "class": "pointer video-delete icon",
2145
2399
  "contenteditable": "false",
2146
2400
  onClick(e) {
2147
- me.removeParentByClass(e.target, "halo-video-content");
2401
+ me2.removeParentByClass(e.target, "halo-video-content");
2148
2402
  e.stopPropagation();
2149
2403
  }
2150
2404
  });
2151
2405
  node.onclick = function() {
2152
- me.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2406
+ me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2153
2407
  };
2154
- const replaceBtn = me.insertVideoBtns(this, video);
2155
2408
  node.appendChild(delBtn);
2156
- node.appendChild(replaceBtn);
2157
2409
  },
2158
2410
  async parseArticle(node) {
2159
2411
  const data = JSON.parse(node.dataset.article);
@@ -2270,7 +2522,7 @@ const _sfc_main = {
2270
2522
  });
2271
2523
  },
2272
2524
  imgUploadHandler(type, imgSrc) {
2273
- const me = this;
2525
+ const me2 = this;
2274
2526
  if (type && imgSrc) {
2275
2527
  if (type === "uploadAgainImages") {
2276
2528
  this.updateImage(imgSrc, this.currentImg);
@@ -2282,14 +2534,9 @@ const _sfc_main = {
2282
2534
  src: imgSrc,
2283
2535
  img: imgSrc,
2284
2536
  selected: false,
2285
- seamlessFlag: me.replaceSeamless,
2537
+ seamlessFlag: me2.replaceSeamless,
2286
2538
  type: "2"
2287
2539
  }, this.range);
2288
- } else if (type === "replace-poster") {
2289
- if (this.currentVideo) {
2290
- this.currentVideo.poster = imgSrc;
2291
- this.currentVideo = null;
2292
- }
2293
2540
  } else {
2294
2541
  this.seamlessCount++;
2295
2542
  const isLast = this.seamlessCount === this.imgList.length;
@@ -2308,23 +2555,8 @@ const _sfc_main = {
2308
2555
  this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
2309
2556
  }
2310
2557
  },
2311
- insertVideoBtns(editor, node) {
2312
- const me = this;
2313
- var replaceBtn = editor.createElement("div", {
2314
- "class": "video-cover-replace pointer",
2315
- "contenteditable": "false"
2316
- });
2317
- replaceBtn.onclick = function(e) {
2318
- const posterBtn = document.querySelector(".replace-poster");
2319
- posterBtn.click();
2320
- me.currentVideo = node;
2321
- e.stopPropagation();
2322
- };
2323
- replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
2324
- return replaceBtn;
2325
- },
2326
2558
  insertImgOperateBtns(editor, data) {
2327
- const me = this;
2559
+ const me2 = this;
2328
2560
  var replaceBtn = editor.createElement("div", {
2329
2561
  "class": "img-replace pointer",
2330
2562
  "contenteditable": "false"
@@ -2333,11 +2565,11 @@ const _sfc_main = {
2333
2565
  "class": "img-delete pointer icon",
2334
2566
  "contenteditable": "false",
2335
2567
  onClick(e) {
2336
- if (me.disabled)
2568
+ if (me2.disabled)
2337
2569
  return;
2338
- me.removeSeamlessLaster(e);
2339
- me.removeParentByClass(e.target, "halo-img-content");
2340
- me.updateData(true);
2570
+ me2.removeSeamlessLaster(e);
2571
+ me2.removeParentByClass(e.target, "halo-img-content");
2572
+ me2.updateData(true);
2341
2573
  }
2342
2574
  });
2343
2575
  var descInputWrap;
@@ -2350,13 +2582,13 @@ const _sfc_main = {
2350
2582
  placeholder: "\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0(\u6700\u591A50\u5B57)",
2351
2583
  "contenteditable": "false"
2352
2584
  });
2353
- descInput.disabled = me.disabled;
2585
+ descInput.disabled = me2.disabled;
2354
2586
  descInput.oninput = function(e) {
2355
- const parent = me.findParentByClass(e.target, "halo-img-content");
2587
+ const parent = me2.findParentByClass(e.target, "halo-img-content");
2356
2588
  const img = parent.querySelector(".halo-picture-area");
2357
2589
  img.dataset.desc = e.target.value;
2358
2590
  if (e.target.value.length > 49) {
2359
- return me.setToast("\u9650\u523650\u4E2A\u5B57\u7B26");
2591
+ return me2.setToast("\u9650\u523650\u4E2A\u5B57\u7B26");
2360
2592
  }
2361
2593
  };
2362
2594
  descInput.value = data.content || "";
@@ -2366,22 +2598,22 @@ const _sfc_main = {
2366
2598
  "style": `${data.seamlessFlag === "1" && "display: none"}`
2367
2599
  }, [descInput]);
2368
2600
  replaceBtn.onclick = function(e) {
2369
- if (me.disabled)
2601
+ if (me2.disabled)
2370
2602
  return;
2371
- const current = me.findParentByClass(e.target, "halo-img-content");
2603
+ const current = me2.findParentByClass(e.target, "halo-img-content");
2372
2604
  const range = document.createRange();
2373
2605
  range.setEnd(current.previousElementSibling, 1);
2374
2606
  range.collapse(false);
2375
- me.range = range;
2376
- me.replaceSeamless = data.seamlessFlag || "0";
2607
+ me2.range = range;
2608
+ me2.replaceSeamless = data.seamlessFlag || "0";
2377
2609
  const replaceInput = document.querySelector(".replace-input");
2378
- me.removePreviousImg = () => me.removeParentByClass(e.target, "halo-img-content");
2610
+ me2.removePreviousImg = () => me2.removeParentByClass(e.target, "halo-img-content");
2379
2611
  replaceInput.click();
2380
2612
  };
2381
2613
  delBtn.onclick = function(e) {
2382
- if (me.disabled)
2614
+ if (me2.disabled)
2383
2615
  return;
2384
- const cur = me.findParentByClass(e.target, "halo-img-content");
2616
+ const cur = me2.findParentByClass(e.target, "halo-img-content");
2385
2617
  const currentImg = cur.getElementsByClassName("halo-picture-area")[0];
2386
2618
  const currentData = JSON.parse(currentImg.getAttribute("data"));
2387
2619
  if (currentData.seamlessFlag === "0") {
@@ -2399,15 +2631,15 @@ const _sfc_main = {
2399
2631
  console.log(e2);
2400
2632
  }
2401
2633
  }
2402
- me.removeParentByClass(e.target, "halo-img-content");
2403
- me.updateData(true);
2634
+ me2.removeParentByClass(e.target, "halo-img-content");
2635
+ me2.updateData(true);
2404
2636
  };
2405
2637
  replaceBtn.innerHTML = "\u66FF\u6362";
2406
2638
  return [replaceBtn, delBtn, descInputWrap];
2407
2639
  },
2408
2640
  removeSeamlessLaster(e) {
2409
- const me = this;
2410
- const cur = me.findParentByClass(e.target, "halo-img-content");
2641
+ const me2 = this;
2642
+ const cur = me2.findParentByClass(e.target, "halo-img-content");
2411
2643
  const currentImg = cur.getElementsByClassName("halo-picture-area")[0];
2412
2644
  const currentData = JSON.parse(currentImg.getAttribute("data"));
2413
2645
  if (currentData.seamlessFlag === "0") {
@@ -2434,9 +2666,9 @@ const _sfc_main = {
2434
2666
  });
2435
2667
  },
2436
2668
  initSquire() {
2437
- const me = this;
2438
- const editorDom = me.editorDom;
2439
- me.editor = new window.Squire(me.editorDom, {
2669
+ const me2 = this;
2670
+ me2.editorDom;
2671
+ me2.editor = new window.Squire(me2.editorDom, {
2440
2672
  blockTag: "p",
2441
2673
  blockAttributes: {
2442
2674
  "class": "halo-paragraph"
@@ -2451,7 +2683,7 @@ const _sfc_main = {
2451
2683
  this.styleStatus.size = parseInt(this.fontInfo.size) === 100 ? 17 : this.fontInfo.size;
2452
2684
  this.styleStatus.color = this.fontInfo.color;
2453
2685
  });
2454
- me.editor.addEventListener("willPaste", function(type, handler) {
2686
+ me2.editor.addEventListener("willPaste", function(type, handler) {
2455
2687
  function validateDom() {
2456
2688
  const fragment = type && type.fragment || {};
2457
2689
  let tmpNode = document.createElement("div");
@@ -2462,7 +2694,7 @@ const _sfc_main = {
2462
2694
  }
2463
2695
  validateDom();
2464
2696
  if (type.defaultPrevented) {
2465
- me.getSticker(type, handler);
2697
+ me2.getSticker(type, handler);
2466
2698
  }
2467
2699
  });
2468
2700
  window.Squire.prototype.makeParagraph = function(content, position, textAlign) {
@@ -2522,7 +2754,7 @@ const _sfc_main = {
2522
2754
  selection.addRange(range);
2523
2755
  };
2524
2756
  window.Squire.prototype.insertImages = function(src, data = {}, range) {
2525
- var isHaloImage = me.isHaloImage(src);
2757
+ var isHaloImage = me2.isHaloImage(src);
2526
2758
  var scrollTop = document.documentElement.scrollTop;
2527
2759
  const isSeameless = data.seamlessFlag === "1";
2528
2760
  var loading = this.createElement("div", {
@@ -2554,10 +2786,9 @@ const _sfc_main = {
2554
2786
  "data": JSON.stringify(data),
2555
2787
  "style": isSeameless ? "margin: 0" : "margin-top: 0",
2556
2788
  "data-content": data.content || "",
2557
- "contenteditable": "false",
2558
- "draggable": "false"
2789
+ "contenteditable": "false"
2559
2790
  });
2560
- const btns = me.insertImgOperateBtns(this, data);
2791
+ const btns = me2.insertImgOperateBtns(this, data);
2561
2792
  var childList = [];
2562
2793
  childList.push(img);
2563
2794
  childList.push(...btns);
@@ -2566,19 +2797,12 @@ const _sfc_main = {
2566
2797
  !isHaloImage && childList.push(again);
2567
2798
  var p = this.createElement("div", {
2568
2799
  "class": "halo-img-content",
2569
- "contenteditable": "false",
2570
- "draggable": "false"
2800
+ "contenteditable": "false"
2571
2801
  }, [...childList]);
2572
- p.onfocus = function() {
2573
- img.style["outline"] = "1px solid #1a74ff";
2574
- };
2575
- p.onblur = function() {
2576
- img.style["outline"] = "none";
2577
- };
2578
2802
  this.insertElement(p, range);
2579
2803
  if (isSeameless) {
2580
- me.removeDefault(p, "nextElementSibling");
2581
- me.removeDefault(p, "previousElementSibling");
2804
+ me2.removeDefault(p, "nextElementSibling");
2805
+ me2.removeDefault(p, "previousElementSibling");
2582
2806
  }
2583
2807
  setTimeout(() => {
2584
2808
  document.documentElement.scrollTop = scrollTop;
@@ -2614,41 +2838,22 @@ const _sfc_main = {
2614
2838
  "data-content": data.content || "",
2615
2839
  "poster": data.img || ""
2616
2840
  });
2617
- var delBtn = me.genIconDom({
2841
+ var delBtn = me2.genIconDom({
2618
2842
  "class": "pointer video-delete icon",
2619
2843
  "contenteditable": "false",
2620
2844
  onClick(e) {
2621
- me.removeParentByClass(e.target, "halo-video-content");
2845
+ me2.removeParentByClass(e.target, "halo-video-content");
2622
2846
  e.stopPropagation();
2623
2847
  }
2624
2848
  });
2625
2849
  console.log(delBtn);
2626
- const posterBtn = me.insertVideoBtns(this, video);
2627
2850
  var p = this.createElement("DIV", {
2628
2851
  "class": "halo-video-content",
2629
- "contenteditable": "false",
2630
- "data-video": JSON.stringify(data),
2631
- "draggable": "true"
2632
- }, [video, delBtn, posterBtn]);
2852
+ "contenteditable": "true",
2853
+ "data-video": JSON.stringify(data)
2854
+ }, [video, delBtn]);
2633
2855
  p.onclick = function() {
2634
- me.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2635
- };
2636
- let targetMove = null;
2637
- p.ondragstart = function(e) {
2638
- e.dataTransfer.setData("text/html", e.target);
2639
- e.dataTransfer.effectAllowed = "move";
2640
- e.dataTransfer.dropEffect = "move";
2641
- targetMove = e.target;
2642
- console.log(e, "drag");
2643
- };
2644
- editorDom.ondragover = function(e) {
2645
- console.log(e, "over", me);
2646
- e.preventDefault();
2647
- };
2648
- editorDom.ondrop = function(e) {
2649
- console.log(e, "ondrop");
2650
- e.target.after(targetMove);
2651
- e.preventDefault();
2856
+ me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2652
2857
  };
2653
2858
  this.insertElement(p);
2654
2859
  setTimeout(() => {
@@ -2659,7 +2864,7 @@ const _sfc_main = {
2659
2864
  var scrollTop = document.documentElement.scrollTop;
2660
2865
  var img = `<img class="link-img" src='/static/img/icon_link@3x.png'></img>`;
2661
2866
  var a = `<a class="halo-link-mes" data-url="${link}" target="_blank">${text}</a>`;
2662
- const del = me.generateDelLinkIcon();
2867
+ const del = me2.generateDelLinkIcon();
2663
2868
  var p = this.createElement("DIV", {
2664
2869
  "class": "halo-link",
2665
2870
  "contenteditable": "false"
@@ -2671,10 +2876,10 @@ const _sfc_main = {
2671
2876
  document.documentElement.scrollTop = scrollTop;
2672
2877
  }, 50);
2673
2878
  };
2674
- me.sticky();
2879
+ me2.sticky();
2675
2880
  },
2676
2881
  removeDefault(next, key) {
2677
- const me = this;
2882
+ const me2 = this;
2678
2883
  const cur = next[key];
2679
2884
  if (!cur || cur.innerText !== "\n")
2680
2885
  return;
@@ -2682,30 +2887,30 @@ const _sfc_main = {
2682
2887
  const isLasterBlock = next.classList.contains("halo-paragraph") || false;
2683
2888
  if (blockDefault && isLasterBlock) {
2684
2889
  cur.remove();
2685
- me.removeDefault(cur, key);
2890
+ me2.removeDefault(cur, key);
2686
2891
  } else {
2687
2892
  if (blockDefault) {
2688
2893
  cur.style.display = "none";
2689
- me.removeDefault(cur, key);
2894
+ me2.removeDefault(cur, key);
2690
2895
  }
2691
2896
  }
2692
2897
  },
2693
2898
  generateDelLinkIcon() {
2694
- const me = this;
2899
+ const me2 = this;
2695
2900
  const del = this.editor.createElement("img", {
2696
2901
  "class": "img-delete",
2697
2902
  "contenteditable": "false",
2698
2903
  "src": car_ciose
2699
2904
  });
2700
2905
  del.onclick = function(e) {
2701
- const parent = me.findParentByClass(e.target, "halo-link");
2906
+ const parent = me2.findParentByClass(e.target, "halo-link");
2702
2907
  parent.remove();
2703
2908
  };
2704
2909
  return del;
2705
2910
  },
2706
2911
  getEditorData() {
2707
- const me = this;
2708
- const children = Array.from(me.editorDom.children);
2912
+ const me2 = this;
2913
+ const children = Array.from(me2.editorDom.children);
2709
2914
  let isNotParagraph = true;
2710
2915
  let count = 0;
2711
2916
  let imgCount = 0;
@@ -2721,7 +2926,7 @@ const _sfc_main = {
2721
2926
  } else if (value.className.includes("article-wrap")) {
2722
2927
  const article = JSON.parse(value.dataset.article);
2723
2928
  cardEassyFlagStatus = !!article.cardEassyFlag;
2724
- me.hasArticleCard = true;
2929
+ me2.hasArticleCard = true;
2725
2930
  } else if (value.className.includes("halo-paragraph") || value.tagName === "OL" || value.tagName === "UL") {
2726
2931
  const text = value.innerText && value.innerText.trim();
2727
2932
  if (text.length < 1) {
@@ -2764,43 +2969,43 @@ const _sfc_main = {
2764
2969
  return url.indexOf("jddmoto.com") > -1 || url.indexOf("58moto.com") > -1;
2765
2970
  },
2766
2971
  updateUploads() {
2767
- const me = this;
2972
+ const me2 = this;
2768
2973
  setTimeout(() => {
2769
2974
  const uploads = document.querySelectorAll(".no-upload") || [];
2770
- me.uploadStore = {};
2771
- me.currentIndex = 0;
2975
+ me2.uploadStore = {};
2976
+ me2.currentIndex = 0;
2772
2977
  Array.from(uploads).map((_, index) => {
2773
2978
  const id = _.getAttribute("id");
2774
2979
  const key = index + "|" + id;
2775
- me.uploadStore[key] = _;
2980
+ me2.uploadStore[key] = _;
2776
2981
  });
2777
- me.uploadImageHandler();
2982
+ me2.uploadImageHandler();
2778
2983
  }, 500);
2779
2984
  },
2780
2985
  uploadImageHandler(key = "") {
2781
- const me = this;
2782
- const list = Object.keys(me.uploadStore);
2783
- if (!list.length || me.currentIndex > list.length)
2986
+ const me2 = this;
2987
+ const list = Object.keys(me2.uploadStore);
2988
+ if (!list.length || me2.currentIndex > list.length)
2784
2989
  return;
2785
2990
  const one = 1;
2786
2991
  const two = 2;
2787
2992
  const three = 3;
2788
2993
  const moreImage = list.length > three;
2789
- if (me.currentIndex) {
2994
+ if (me2.currentIndex) {
2790
2995
  if (moreImage) {
2791
- me.uploadImage(key).then((_) => me.uploadImageHandler(list[me.currentIndex++]));
2996
+ me2.uploadImage(key).then((_) => me2.uploadImageHandler(list[me2.currentIndex++]));
2792
2997
  }
2793
2998
  } else {
2794
- me.uploadImage(list[0]).then((_) => me.uploadImageHandler(list[me.currentIndex++]));
2795
- list.length > one && me.uploadImage(list[one]).then((_) => me.uploadImageHandler(list[me.currentIndex++]));
2796
- list.length > two && me.uploadImage(list[two]).then((_) => moreImage && me.uploadImageHandler(list[me.currentIndex++]));
2797
- me.currentIndex = three;
2999
+ me2.uploadImage(list[0]).then((_) => me2.uploadImageHandler(list[me2.currentIndex++]));
3000
+ list.length > one && me2.uploadImage(list[one]).then((_) => me2.uploadImageHandler(list[me2.currentIndex++]));
3001
+ list.length > two && me2.uploadImage(list[two]).then((_) => moreImage && me2.uploadImageHandler(list[me2.currentIndex++]));
3002
+ me2.currentIndex = three;
2798
3003
  }
2799
3004
  },
2800
3005
  uploadImage(key = "") {
2801
- const me = this;
2802
- const itemId = me.guid || "";
2803
- const currentImg = me.uploadStore[key];
3006
+ const me2 = this;
3007
+ const itemId = me2.guid || "";
3008
+ const currentImg = me2.uploadStore[key];
2804
3009
  const imageUrl = key.split("|")[1] || "";
2805
3010
  if (!currentImg) {
2806
3011
  console.log("\u56FE\u7247\u4E0D\u5B58\u5728", key);
@@ -2821,7 +3026,7 @@ const _sfc_main = {
2821
3026
  if (imgAgain) {
2822
3027
  imgAgain.className = "img-again";
2823
3028
  imgAgain.onclick = function(e) {
2824
- me.currentImg = currentImg2;
3029
+ me2.currentImg = currentImg2;
2825
3030
  const upload = document.querySelector(".upload-again-input");
2826
3031
  upload && upload.click();
2827
3032
  };
@@ -2834,13 +3039,13 @@ const _sfc_main = {
2834
3039
  }).then((_) => {
2835
3040
  if (_.data.code === 0 && _.data.data) {
2836
3041
  const img = _.data.data.thirdPartyImageUrl;
2837
- me.updateImage(img, currentImg);
3042
+ me2.updateImage(img, currentImg);
2838
3043
  } else {
2839
3044
  parent && uploadFailHandler(currentImg);
2840
3045
  }
2841
- if (Object.keys(me.uploadStore).length === Number(key.split("|")[0] || "") + 1) {
3046
+ if (Object.keys(me2.uploadStore).length === Number(key.split("|")[0] || "") + 1) {
2842
3047
  setTimeout(() => {
2843
- me.updateData(true);
3048
+ me2.updateData(true);
2844
3049
  }, 100);
2845
3050
  }
2846
3051
  }).catch((e) => {
@@ -2874,7 +3079,7 @@ const _sfc_main = {
2874
3079
  this.setSticker(type.fragment.children);
2875
3080
  },
2876
3081
  setSticker(data) {
2877
- const me = this;
3082
+ const me2 = this;
2878
3083
  data = Array.from(data);
2879
3084
  data.map(function(value, index) {
2880
3085
  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)");
@@ -2884,28 +3089,28 @@ const _sfc_main = {
2884
3089
  }
2885
3090
  if (nValue.indexOf("[img") > -1) {
2886
3091
  const src = nValue.replace(/\[img src=(.*?)\]/g, "$1").replace(/amp;/g, "");
2887
- me.editor.insertImages(src, {
3092
+ me2.editor.insertImages(src, {
2888
3093
  src,
2889
3094
  img: src,
2890
3095
  selected: false,
2891
3096
  type: "2"
2892
3097
  });
2893
3098
  } else {
2894
- me.editor.makeParagraph(nValue);
3099
+ me2.editor.makeParagraph(nValue);
2895
3100
  }
2896
3101
  });
2897
3102
  });
2898
- me.updateUploads();
3103
+ me2.updateUploads();
2899
3104
  this.updateData(true);
2900
3105
  },
2901
3106
  mouseLeave() {
2902
- const me = this;
2903
- me.updateData();
3107
+ const me2 = this;
3108
+ me2.updateData();
2904
3109
  },
2905
3110
  setBack(e, type) {
2906
- const me = this;
2907
- me.refreshImg();
2908
- me.updateData(true);
3111
+ const me2 = this;
3112
+ me2.refreshImg();
3113
+ me2.updateData(true);
2909
3114
  },
2910
3115
  refreshImg() {
2911
3116
  Array.from(document.querySelectorAll(".halo-img-content")).map((_ = {}) => {
@@ -2932,8 +3137,8 @@ const _sfc_main = {
2932
3137
  });
2933
3138
  },
2934
3139
  sticky() {
2935
- const me = this;
2936
- me.$nextTick(function() {
3140
+ const me2 = this;
3141
+ me2.$nextTick(function() {
2937
3142
  const sticky = document.querySelector(".tool-box");
2938
3143
  if (!sticky) {
2939
3144
  return;
@@ -2951,12 +3156,12 @@ const _sfc_main = {
2951
3156
  });
2952
3157
  },
2953
3158
  setContent(e, obj) {
2954
- const me = this;
3159
+ const me2 = this;
2955
3160
  const id = e.target.id || e.target.dataset.editorId;
2956
3161
  const value = "";
2957
- if (id && me.editor && me.editor[id]) {
2958
- me.editor[id](value, obj);
2959
- me.updateData(true);
3162
+ if (id && me2.editor && me2.editor[id]) {
3163
+ me2.editor[id](value, obj);
3164
+ me2.updateData(true);
2960
3165
  }
2961
3166
  },
2962
3167
  canSetAlign() {
@@ -2992,47 +3197,47 @@ const _sfc_main = {
2992
3197
  this.updateData(true);
2993
3198
  },
2994
3199
  addLink(type) {
2995
- const me = this;
2996
- me.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
2997
- me.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
2998
- me.viewStatus = true;
2999
- me.linkStatus = true;
3200
+ const me2 = this;
3201
+ me2.linkTitleName = type === "link" ? "\u6DFB\u52A0\u94FE\u63A5" : "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740";
3202
+ me2.linkPlaceholder = type === "link" ? "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740" : "\u4EC5\u652F\u6301\u8F93\u5165\u5FAE\u4FE1\u94FE\u63A5";
3203
+ me2.viewStatus = true;
3204
+ me2.linkStatus = true;
3000
3205
  },
3001
3206
  validUrl(url) {
3002
3207
  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.,;?'&%$#=~_-]+))*$/;
3003
3208
  return objExp.test(url);
3004
3209
  },
3005
3210
  confirmLink() {
3006
- const me = this;
3007
- if (!me.linkContent) {
3211
+ const me2 = this;
3212
+ if (!me2.linkContent) {
3008
3213
  return ElMessage.error("\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740\uFF01");
3009
3214
  }
3010
- if (me.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
3215
+ if (me2.linkTitleName === "\u6DFB\u52A0\u5BFC\u5165\u94FE\u63A5\u5730\u5740" || this.visibleCollectArticle) {
3011
3216
  this.visibleCollectArticle = false;
3012
- return me.importLinkData();
3217
+ return me2.importLinkData();
3013
3218
  }
3014
- if (!this.validUrl(me.linkContent)) {
3015
- return me.setToast("URL\u65E0\u6548");
3219
+ if (!this.validUrl(me2.linkContent)) {
3220
+ return me2.setToast("URL\u65E0\u6548");
3016
3221
  }
3017
- if (me.linkContent.indexOf("jddmoto.com") === -1 && me.linkContent.indexOf("58moto.com") === -1) {
3018
- return me.setToast("\u8BF7\u8F93\u5165\u54C8\u7F57\u6469\u6258\u5185\u90E8\u7F51\u5740");
3222
+ if (me2.linkContent.indexOf("jddmoto.com") === -1 && me2.linkContent.indexOf("58moto.com") === -1) {
3223
+ return me2.setToast("\u8BF7\u8F93\u5165\u54C8\u7F57\u6469\u6258\u5185\u90E8\u7F51\u5740");
3019
3224
  }
3020
- me.editor["insertLink"](me.linkContent);
3021
- me.linkContent = "";
3022
- me.closeDialog();
3225
+ me2.editor["insertLink"](me2.linkContent);
3226
+ me2.linkContent = "";
3227
+ me2.closeDialog();
3023
3228
  },
3024
3229
  importLinkData() {
3025
- const me = this;
3026
- if (me.loading) {
3230
+ const me2 = this;
3231
+ if (me2.loading) {
3027
3232
  return ElMessage("\u6B63\u5728\u83B7\u53D6\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u540E...");
3028
3233
  }
3029
- me.loading = true;
3234
+ me2.loading = true;
3030
3235
  const params = {
3031
- action: me.isOss ? "30008OSS" : 30008,
3032
- url: me.linkContent
3236
+ action: me2.isOss ? "30008OSS" : 30008,
3237
+ url: me2.linkContent
3033
3238
  };
3034
- if (!me.isOss) {
3035
- params.autherid = me.user.uid;
3239
+ if (!me2.isOss) {
3240
+ params.autherid = me2.user.uid;
3036
3241
  }
3037
3242
  this.importEssay(params).then((response) => {
3038
3243
  console.log(response);
@@ -3041,26 +3246,26 @@ const _sfc_main = {
3041
3246
  data.data.content = data.data.content.replace(/<a href="(.*?)"(.*?)>/g, "").replace(/<\/a>/g, "").replace(/<iframe([^<>]*)>([^<>]*)<\/iframe>/g, "").replace(/<video([^<>]*)>([^<>]*)<\/video>/g, "");
3042
3247
  const importContent = document.createElement("div");
3043
3248
  importContent.innerHTML = data.data.content;
3044
- me.setSticker(importContent.children);
3045
- me.closeDialog();
3046
- me.linkContent = "";
3249
+ me2.setSticker(importContent.children);
3250
+ me2.closeDialog();
3251
+ me2.linkContent = "";
3047
3252
  return;
3048
3253
  } else {
3049
- me.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
3254
+ me2.setToast("\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
3050
3255
  }
3051
3256
  }).catch((err) => {
3052
3257
  console.log(err.message);
3053
- me.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
3258
+ me2.setToast("\u5BFC\u5165\u5F02\u5E38\uFF0C\u8BF7\u91CD\u8BD5");
3054
3259
  }).finally((_) => {
3055
- me.loading = false;
3260
+ me2.loading = false;
3056
3261
  });
3057
3262
  },
3058
3263
  openDialog(name) {
3059
- const me = this;
3060
- me.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
3061
- me.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
3062
- 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)";
3063
- me.viewStatus = true;
3264
+ const me2 = this;
3265
+ me2.viewName = name === "img" ? "\u6DFB\u52A0\u56FE\u7247" : "\u6DFB\u52A0\u89C6\u9891";
3266
+ me2.viewButton = name === "img" ? "\u9009\u62E9\u56FE\u7247" : "\u9009\u62E9\u89C6\u9891";
3267
+ 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)";
3268
+ me2.viewStatus = true;
3064
3269
  },
3065
3270
  closeDialog() {
3066
3271
  this.viewStatus = false;
@@ -3217,13 +3422,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3217
3422
  class: "replace-input hide",
3218
3423
  accept: "image/*",
3219
3424
  onChange: _cache[12] || (_cache[12] = (...args) => $options.replaceImg && $options.replaceImg(...args))
3220
- }, null, 32),
3221
- createElementVNode("input", {
3222
- type: "file",
3223
- name: "file",
3224
- class: "replace-poster hide",
3225
- accept: "image/*",
3226
- onChange: _cache[13] || (_cache[13] = (...args) => $options.replacePoster && $options.replacePoster(...args))
3227
3425
  }, null, 32)
3228
3426
  ]);
3229
3427
  }