@10yun/cv-pc-ui 0.3.49 → 0.3.50
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/lib/cv-ui.cjs +8 -8
- package/lib/cv-ui.css +1 -1
- package/lib/cv-ui.js +833 -838
- package/package.json +18 -18
package/lib/cv-ui.js
CHANGED
|
@@ -1,77 +1,87 @@
|
|
|
1
|
-
import { ElBadge as
|
|
2
|
-
import { resolveComponent as C, createBlock as S, openBlock as
|
|
3
|
-
import { basicSetup as
|
|
4
|
-
import { EditorState as
|
|
5
|
-
import { EditorView as
|
|
6
|
-
import { indentWithTab as
|
|
7
|
-
import { indentUnit as
|
|
1
|
+
import { ElBadge as Ri, ElButton as Ne, ElAutocomplete as vl, ElForm as et, ElFormItem as Ui, ElInput as Eo, ElInputNumber as Ql, ElRadioGroup as Jl, ElCheckbox as en, ElCheckboxButton as tn, ElCheckboxGroup as on, ElMessage as q, ElOption as Wi, ElSelect as yl, ElCascader as an, ElTimePicker as ln, ElDatePicker as nn, ElSwitch as sn, ElMessageBox as Fi, ElTag as rn, ElTable as cn, ElTableColumn as Z, ElPopover as Oi, ElScrollbar as $i, ElImage as Ni, ClickOutside as dn, ElAvatar as bl, ElPagination as hn, ElIcon as Cl, ElDialog as pn, ElDrawer as un } from "element-plus";
|
|
2
|
+
import { resolveComponent as C, createBlock as S, openBlock as r, mergeProps as O, withCtx as v, renderSlot as D, resolveDirective as ae, withDirectives as N, createElementBlock as u, createVNode as b, createCommentVNode as w, normalizeProps as U, withModifiers as wl, createTextVNode as F, toHandlers as kl, guardReactiveProps as Y, createSlots as Ie, createElementVNode as d, normalizeClass as z, toDisplayString as L, Fragment as $, renderList as M, normalizeStyle as A, defineComponent as xl, vShow as H, TransitionGroup as mn, withKeys as $e, ref as B, unref as T, reactive as Ho, computed as G, inject as se, watch as ie, onMounted as ze, Transition as gn, nextTick as Ee, useCssVars as fn, onUnmounted as vn, h as Mi, shallowRef as re, shallowReadonly as yn, toValue as Fe, getCurrentScope as bn, onScopeDispose as Cn, getCurrentInstance as wn, toRaw as Sl, toRefs as kn, provide as De, useSlots as xn, resolveDynamicComponent as Vl, onBeforeUnmount as Sn, vModelText as Vn, render as zo } from "vue";
|
|
3
|
+
import { basicSetup as _n } from "codemirror";
|
|
4
|
+
import { EditorState as Ve, Compartment as In, StateEffect as Ln, EditorSelection as Dn } from "@codemirror/state";
|
|
5
|
+
import { EditorView as X, keymap as Tn, placeholder as Fn } from "@codemirror/view";
|
|
6
|
+
import { indentWithTab as On } from "@codemirror/commands";
|
|
7
|
+
import { indentUnit as $n, syntaxHighlighting as Q, HighlightStyle as J } from "@codemirror/language";
|
|
8
8
|
import { tags as s } from "@lezer/highlight";
|
|
9
|
-
import { javascript as
|
|
10
|
-
import { html as
|
|
11
|
-
import { json as
|
|
12
|
-
import { markdown as
|
|
13
|
-
import { vue as
|
|
14
|
-
import { php as
|
|
15
|
-
import { java as
|
|
16
|
-
import { sql as
|
|
17
|
-
import { python as
|
|
18
|
-
import { xml as
|
|
19
|
-
import { go as
|
|
20
|
-
import { css as
|
|
21
|
-
import
|
|
9
|
+
import { javascript as Yi } from "@codemirror/lang-javascript";
|
|
10
|
+
import { html as Nn } from "@codemirror/lang-html";
|
|
11
|
+
import { json as Mn } from "@codemirror/lang-json";
|
|
12
|
+
import { markdown as Bn } from "@codemirror/lang-markdown";
|
|
13
|
+
import { vue as En } from "@codemirror/lang-vue";
|
|
14
|
+
import { php as zn } from "@codemirror/lang-php";
|
|
15
|
+
import { java as An } from "@codemirror/lang-java";
|
|
16
|
+
import { sql as Xi } from "@codemirror/lang-sql";
|
|
17
|
+
import { python as Hn } from "@codemirror/lang-python";
|
|
18
|
+
import { xml as Pn } from "@codemirror/lang-xml";
|
|
19
|
+
import { go as jn } from "@codemirror/lang-go";
|
|
20
|
+
import { css as Rn } from "@codemirror/lang-css";
|
|
21
|
+
import Un from "html-to-md";
|
|
22
22
|
const V = (e, t) => {
|
|
23
23
|
const o = e.__vccOpts || e;
|
|
24
24
|
for (const [l, i] of t) o[l] = i;
|
|
25
25
|
return o;
|
|
26
|
-
},
|
|
26
|
+
}, tt = V({ name: "cvBadge", extends: { ExtendBadge: Ri }, props: { ...Ri.props }, created() {
|
|
27
27
|
}, computed: { isShow() {
|
|
28
28
|
return !this.value || !(this.value > 0);
|
|
29
29
|
} }, data: () => ({}) }, [["render", function(e, t, o, l, i, a) {
|
|
30
30
|
const n = C("el-badge");
|
|
31
|
-
return
|
|
31
|
+
return r(), S(n, O(e.$props, { hidden: a.isShow }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["hidden"]);
|
|
32
32
|
}]]);
|
|
33
|
-
|
|
34
|
-
e.component(
|
|
33
|
+
tt.install = function(e) {
|
|
34
|
+
e.component(tt.name, tt);
|
|
35
35
|
};
|
|
36
|
-
const
|
|
36
|
+
const ot = V({ name: "cvRow", props: { gutter: { type: [Number, String], default: 0 }, type: { type: [String], default: "" }, justify: { type: [String], default: "start" }, align: { type: [String], default: "top" }, tag: { type: [String], default: "div" } }, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
37
37
|
const n = C("el-row");
|
|
38
|
-
return
|
|
39
|
-
}]]),
|
|
38
|
+
return r(), S(n, O({ class: "cv-row" }, { type: o.type, justify: o.justify, align: o.align, tag: o.tag }, { gutter: parseInt(o.gutter) }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["gutter"]);
|
|
39
|
+
}]]), it = V({ name: "cvCol", props: { span: { type: [Number, String], default: 24 }, offset: { type: [Number, String], default: 0 } }, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
40
40
|
const n = C("el-col");
|
|
41
|
-
return
|
|
41
|
+
return r(), S(n, { class: "cv-col", span: parseInt(o.span), offset: parseInt(o.offset) }, { default: v(() => [D(e.$slots, "default")]), _: 3 }, 8, ["span", "offset"]);
|
|
42
42
|
}]]);
|
|
43
|
-
|
|
43
|
+
ot.install = function(e) {
|
|
44
|
+
e.component(ot.name, ot);
|
|
45
|
+
}, it.install = function(e) {
|
|
44
46
|
e.component(it.name, it);
|
|
45
|
-
}, at.install = function(e) {
|
|
46
|
-
e.component(at.name, at);
|
|
47
47
|
};
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
const at = V({ name: "cvBtnBase", emits: ["click"], props: { ...Ne.props, autoLoading: { type: Boolean, default: !1 } }, data: () => ({ loadingStatus: !1 }), computed: { filteredProps() {
|
|
49
|
+
const { autoLoading: e, ...t } = this.$props;
|
|
50
|
+
return t;
|
|
51
|
+
}, hasDefaultContent() {
|
|
52
|
+
const e = this.$slots.default?.();
|
|
53
|
+
return e && e.length > 0;
|
|
54
|
+
} }, methods: { handleClick(e) {
|
|
55
|
+
this.autoLoading && (this.loadingStatus = !0);
|
|
56
|
+
try {
|
|
57
|
+
this.$emit("click", () => {
|
|
58
|
+
this.loadingStatus = !1;
|
|
59
|
+
});
|
|
60
|
+
} catch (t) {
|
|
61
|
+
throw this.loadingStatus = !1, t;
|
|
62
|
+
}
|
|
53
63
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
54
64
|
const n = C("el-button");
|
|
55
|
-
return
|
|
56
|
-
}]]),
|
|
65
|
+
return e.$slots.default || a.hasDefaultContent ? (r(), S(n, O({ key: 0, class: "cv-btn" }, a.filteredProps, { loading: i.loadingStatus, onClick: a.handleClick }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["loading", "onClick"])) : (r(), S(n, O({ key: 1, class: "cv-btn" }, a.filteredProps, { loading: i.loadingStatus, onClick: a.handleClick }), null, 16, ["loading", "onClick"]));
|
|
66
|
+
}]]), lt = V({ name: "cvBtnText", emits: ["click"], props: { ...Ne.props, autoLoading: { type: Boolean, default: !1 } }, data: () => ({ loadingStatus: !1 }), methods: { handleClick() {
|
|
57
67
|
this.autoLoading && (this.loadingStatus = !0), this.$emit("click", () => {
|
|
58
68
|
this.loadingStatus = !1;
|
|
59
69
|
});
|
|
60
70
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
61
71
|
const n = C("el-button");
|
|
62
|
-
return
|
|
72
|
+
return r(), S(n, O({ class: "cv-btn" }, e.$props, { link: "", loading: i.loadingStatus, onClick: a.handleClick }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["loading", "onClick"]);
|
|
63
73
|
}]]);
|
|
64
|
-
|
|
74
|
+
at.install = function(e) {
|
|
75
|
+
e.component(at.name, at);
|
|
76
|
+
}, lt.install = function(e) {
|
|
65
77
|
e.component(lt.name, lt);
|
|
66
|
-
}, nt.install = function(e) {
|
|
67
|
-
e.component(nt.name, nt);
|
|
68
78
|
};
|
|
69
|
-
const
|
|
79
|
+
const nt = V({ name: "cvAutocompleteBase", props: { ...vl.props }, data: () => ({ localVal: "", loadingStatus: !1 }), created() {
|
|
70
80
|
}, methods: { async querySearchAsync(e, t) {
|
|
71
81
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
72
82
|
const n = C("el-autocomplete");
|
|
73
|
-
return
|
|
74
|
-
}]]),
|
|
83
|
+
return r(), S(n, O({ modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => i.localVal = c) }, e.$props, { "fetch-suggestions": a.querySearchAsync }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["modelValue", "fetch-suggestions"]);
|
|
84
|
+
}]]), Po = { props: { compConfig: {}, dataParse: { type: [Function], default: () => null } }, data: () => ({ searchData: {}, loadDataLoading: !1, loadDataList: [], loadDataTotal: 0, loadPageCurr: 1, loadPageLimit: 10, loadConfigSetting: {}, loadConfigDef: { pageCurr: 1, pageLimit: 10, isSkip: !1, url: null, apiFunc: null, mockData: null, where: {}, response: { statusName: "status", statusCode: 200, msgName: "msg", countName: "total", dataName: "data" }, request: { pageName: "page", limitName: "pagesize" } } }), methods: { loadEnding() {
|
|
75
85
|
this.loadDataLoading = !1, this.$nextTick(() => {
|
|
76
86
|
this.loadDataLoading = !1;
|
|
77
87
|
});
|
|
@@ -95,17 +105,17 @@ const st = V({ name: "cvAutocompleteBase", props: { ...yl.props }, data: () => (
|
|
|
95
105
|
o.status = e[t.statusName], o.msg = e[t.msgName], o.total = e[t.countName], l = e[t.dataName];
|
|
96
106
|
for (let a in l) i[a] = l[a];
|
|
97
107
|
return o.data = i, o;
|
|
98
|
-
} } },
|
|
108
|
+
} } }, st = V({ name: "cvAutocompleteLoad", mixins: [Po], emits: ["update:modelValue", "input"], props: { ...vl.props, modelValue: { type: [String, Object, Number], default: () => ({}) }, placeholder: { type: [String], default: "请输入内容" }, popperClass: { type: [String], default: "cv-autocomplete-load" }, clearable: { type: [Boolean], default: !0 }, triggerOnFocus: !1, debounce: 500, refID: { type: [String], required: !1, default: () => "cvAutocompleteLoad-" + +/* @__PURE__ */ new Date() + (Math.random() / 1e4).toFixed(0) }, compConfig: { type: [Object], default: () => ({}) } }, data: () => ({ localVal: "", searchList: [], compConfigDef: { searchField: ["value"] }, timeout: null, loadingMore: !1 }), directives: { loadmore: { mounted(e, t) {
|
|
99
109
|
const o = /* @__PURE__ */ ((i, a) => {
|
|
100
110
|
let n = null;
|
|
101
|
-
return function(...
|
|
111
|
+
return function(...c) {
|
|
102
112
|
n && clearTimeout(n), n = setTimeout(() => {
|
|
103
|
-
i.apply(this,
|
|
113
|
+
i.apply(this, c);
|
|
104
114
|
}, a);
|
|
105
115
|
};
|
|
106
116
|
})((i) => {
|
|
107
|
-
const { scrollTop: a, scrollHeight: n, clientHeight:
|
|
108
|
-
n - (a +
|
|
117
|
+
const { scrollTop: a, scrollHeight: n, clientHeight: c } = i.target;
|
|
118
|
+
n - (a + c) < 10 && !t.instance.loading && t.value();
|
|
109
119
|
}, 200), l = new MutationObserver(() => {
|
|
110
120
|
const i = e.querySelector(".el-autocomplete-suggestion__wrap");
|
|
111
121
|
i && !e.__scrollHandler__ && (i.addEventListener("scroll", o), e.__scrollHandler__ = o, l.disconnect());
|
|
@@ -148,38 +158,38 @@ const st = V({ name: "cvAutocompleteBase", props: { ...yl.props }, data: () => (
|
|
|
148
158
|
}, handleSelect(e) {
|
|
149
159
|
this.$emit("update:modelValue", e);
|
|
150
160
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
151
|
-
const n = C("cv-icons"),
|
|
152
|
-
return N((
|
|
161
|
+
const n = C("cv-icons"), c = C("el-autocomplete"), p = ae("loadmore");
|
|
162
|
+
return N((r(), u("div", null, [b(c, O(e.$props, { modelValue: i.localVal, "onUpdate:modelValue": t[1] || (t[1] = (h) => i.localVal = h), "fetch-suggestions": a.querySearchAsync, onChange: a.handleChange, onSelect: a.handleSelect, teleported: !1, "popper-append-to-body": !1 }), { load: v(() => t[2] || (t[2] = [])), default: v(({ item: h }) => [h.is_last_tip ? w("", !0) : D(e.$slots, "default", U(O({ key: 0 }, { item: h }))), h.is_last_tip ? (r(), u("div", { key: 1, class: "cv-autocomolete-nodata", onClick: t[0] || (t[0] = wl((...m) => a.getData && a.getData(...m), ["stop"])), disabled: "" }, [t[3] || (t[3] = F(" 没有更多数据了 ")), b(n, { type: "ElIconRefreshLeft" }), t[4] || (t[4] = F(" 刷新按钮 "))])) : w("", !0)]), _: 3 }, 16, ["modelValue", "fetch-suggestions", "onChange", "onSelect"])])), [[p, a.getMoreData]]);
|
|
153
163
|
}]]);
|
|
154
|
-
|
|
164
|
+
nt.install = function(e) {
|
|
165
|
+
e.component(nt.name, nt);
|
|
166
|
+
}, st.install = function(e) {
|
|
155
167
|
e.component(st.name, st);
|
|
156
|
-
}, rt.install = function(e) {
|
|
157
|
-
e.component(rt.name, rt);
|
|
158
168
|
};
|
|
159
|
-
const
|
|
169
|
+
const rt = V({ ...et, name: "cvFormBase", extends: et, provide() {
|
|
160
170
|
return { elForm: this };
|
|
161
|
-
}, props: { ...
|
|
171
|
+
}, props: { ...et.props, labelWidth: { type: [String, Number], default: "auto" }, labelPosition: { type: String, default: "right" } }, watch: { model() {
|
|
162
172
|
} }, data: () => ({}) }, [["render", function(e, t, o, l, i, a) {
|
|
163
173
|
const n = C("el-form");
|
|
164
|
-
return
|
|
165
|
-
}]]),
|
|
174
|
+
return r(), S(n, O({ class: "cv-form-base" }, { ...e.$props, ...e.$attrs }, kl(e.$attrs)), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16);
|
|
175
|
+
}]]), ct = V({ name: "cvFormInline", provide() {
|
|
166
176
|
return { elForm: this };
|
|
167
|
-
}, props: { ...
|
|
177
|
+
}, props: { ...et.props }, watch: {}, data: () => ({ form: {} }) }, [["render", function(e, t, o, l, i, a) {
|
|
168
178
|
const n = C("el-form");
|
|
169
|
-
return
|
|
170
|
-
}]]),
|
|
171
|
-
}, methods: {} },
|
|
179
|
+
return r(), S(n, O({ class: "cv-form-base" }, e.$props, kl(e.$attrs), { inline: !0 }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16);
|
|
180
|
+
}]]), Wn = { name: "cvFormItem", extends: Ui, props: { ...Ui.props }, data: () => ({ localLabelWidth: "", localError: "" }), created() {
|
|
181
|
+
}, methods: {} }, Yn = { key: 0, class: "cv-form-item__tip" }, dt = V(Wn, [["render", function(e, t, o, l, i, a) {
|
|
172
182
|
const n = C("el-form-item");
|
|
173
|
-
return
|
|
183
|
+
return r(), S(n, U(Y({ ...e.$props, ...e.$attrs })), { default: v(() => [D(e.$slots, "default"), e.$slots.tip ? (r(), u("div", Yn, [D(e.$slots, "tip")])) : w("", !0)]), _: 3 }, 16);
|
|
174
184
|
}]]);
|
|
175
|
-
|
|
185
|
+
rt.install = function(e) {
|
|
186
|
+
e.component(rt.name, rt);
|
|
187
|
+
}, ct.install = function(e) {
|
|
176
188
|
e.component(ct.name, ct);
|
|
177
189
|
}, dt.install = function(e) {
|
|
178
190
|
e.component(dt.name, dt);
|
|
179
|
-
}, ht.install = function(e) {
|
|
180
|
-
e.component(ht.name, ht);
|
|
181
191
|
};
|
|
182
|
-
const
|
|
192
|
+
const le = { extends: Eo, emits: ["update:modelValue", "change"], props: { ...Eo.props, modelValue: { type: [Number, String], default: "" }, placeholder: { type: [Number, String], default: "" }, disabled: { type: Boolean, default: !1 } }, watch: { modelValue(e) {
|
|
183
193
|
this.localVal = e;
|
|
184
194
|
}, localVal() {
|
|
185
195
|
this.handleChange(), this.handleInput();
|
|
@@ -196,7 +206,7 @@ const se = { extends: zo, emits: ["update:modelValue", "change"], props: { ...zo
|
|
|
196
206
|
this.localError = e || "请输入正确的" + this.label;
|
|
197
207
|
}, _diyValidate() {
|
|
198
208
|
}, _isCheckValue() {
|
|
199
|
-
const t = this
|
|
209
|
+
const t = this?.rules.split("|");
|
|
200
210
|
this.localError = "";
|
|
201
211
|
for (let o in t) {
|
|
202
212
|
let l = t[o].split(":"), i = l[0] || "", a = l[1] || "";
|
|
@@ -214,51 +224,53 @@ const se = { extends: zo, emits: ["update:modelValue", "change"], props: { ...zo
|
|
|
214
224
|
this._diyValidate(i);
|
|
215
225
|
}
|
|
216
226
|
}
|
|
217
|
-
} } },
|
|
227
|
+
} } }, Xn = V({ name: "cvInputText", mixins: [le], props: {}, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
218
228
|
const n = C("el-input");
|
|
219
|
-
return
|
|
220
|
-
}]]),
|
|
229
|
+
return r(), S(n, O({ type: "text" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入", clearable: "" }), Ie({ _: 2 }, [e.$slots.prepend ? { name: "prepend", fn: v(() => [D(e.$slots, "prepend")]), key: "0" } : void 0, e.$slots.prepend ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "1" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
230
|
+
}]]), ht = V({ name: "cvInputMobile", mixins: [le], components: {}, props: {}, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
221
231
|
const n = C("el-input");
|
|
222
|
-
return
|
|
223
|
-
}]]),
|
|
232
|
+
return r(), S(n, O({ type: "number", oninput: "if(value.length>11)value=value.slice(0,11)" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入11位大陆手机号", clearable: "" }), Ie({ prepend: v(() => [t[1] || (t[1] = F("+86"))]), _: 2 }, [e.$slots.append ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "0" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
233
|
+
}]]), pt = V({ name: "cvInputEmail", mixins: [le], components: {}, props: {}, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
224
234
|
const n = C("el-input");
|
|
225
|
-
return
|
|
226
|
-
}]]),
|
|
235
|
+
return r(), S(n, O({ type: "text" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入邮箱", clearable: "" }), Ie({ _: 2 }, [e.$slots.prepend ? { name: "prepend", fn: v(() => [D(e.$slots, "prepend")]), key: "0" } : void 0, e.$slots.append ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "1" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
236
|
+
}]]), ut = V({ name: "cvInputPassword", mixins: [le], components: {}, props: { showPassword: { type: Boolean, default: !1 } }, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
227
237
|
const n = C("el-input");
|
|
228
|
-
return
|
|
229
|
-
}]]),
|
|
238
|
+
return r(), S(n, O({ type: "password" }, { disabled: e.disabled, showPassword: o.showPassword }, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入密码", clearable: "" }), Ie({ _: 2 }, [e.$slots.prepend ? { name: "prepend", fn: v(() => [D(e.$slots, "prepend")]), key: "0" } : void 0, e.$slots.append ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "1" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
239
|
+
}]]), mt = V({ name: "cvInputNumber", mixins: [le], props: {}, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
230
240
|
const n = C("el-input");
|
|
231
|
-
return
|
|
232
|
-
}]]),
|
|
241
|
+
return r(), S(n, O({ class: "cv-number", type: "number" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入整数", clearable: "" }), Ie({ _: 2 }, [e.$slots.prepend ? { name: "prepend", fn: v(() => [D(e.$slots, "prepend")]), key: "0" } : void 0, e.$slots.append ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "1" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
242
|
+
}]]), gt = V({ name: "cvInputIdcard", mixins: [le], components: {}, props: {}, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
233
243
|
const n = C("el-input");
|
|
234
|
-
return
|
|
235
|
-
}]]),
|
|
244
|
+
return r(), S(n, O({ type: "text", oninput: "if(value.length>18)value=value.slice(0,18)" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入身份证", clearable: "", maxlength: "18" }), Ie({ _: 2 }, [e.$slots.prepend ? { name: "prepend", fn: v(() => [D(e.$slots, "prepend")]), key: "0" } : void 0, e.$slots.append ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "1" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
245
|
+
}]]), ft = V({ name: "cvInputDigit", mixins: [le], components: {}, props: {}, data: () => ({}), methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
236
246
|
const n = C("el-input");
|
|
237
|
-
return
|
|
238
|
-
}]]),
|
|
247
|
+
return r(), S(n, O({ type: "number" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入", clearable: "" }), Ie({ _: 2 }, [e.$slots.prepend ? { name: "prepend", fn: v(() => [D(e.$slots, "prepend")]), key: "0" } : void 0, e.$slots.append ? { name: "append", fn: v(() => [D(e.$slots, "append")]), key: "1" } : void 0]), 1040, ["modelValue", "onChange", "onInput", "placeholder"]);
|
|
248
|
+
}]]), vt = V({ name: "cvTextarea", mixins: [le], props: { rows: { type: [Number, String], default: 3 }, autosize: { type: [Boolean, Object], default: !1 } }, data: () => ({}), computed: { lastRow() {
|
|
239
249
|
return parseInt(this.rows);
|
|
240
250
|
} }, created() {
|
|
241
251
|
}, methods: { onSubmit() {
|
|
242
252
|
this.$emit("btnClick", this.localVal);
|
|
243
253
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
244
254
|
const n = C("el-input");
|
|
245
|
-
return
|
|
246
|
-
}]]),
|
|
255
|
+
return r(), S(n, O({ type: "textarea" }, { disabled: e.disabled, rows: a.lastRow, autosize: o.autosize }, { rows: a.lastRow, modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入内容", clearable: "" }), null, 16, ["rows", "modelValue", "onInput", "placeholder"]);
|
|
256
|
+
}]]), qn = { name: "cvTextareaBtn", mixins: [le], components: {}, props: { rows: { type: [Number, String], default: 3 }, btnText: { type: [Number, String], default: "" }, btnIcon: { type: [String], default: "" }, autosize: { type: [Boolean, Object], default: !1 } }, data: () => ({}), computed: { lastRow() {
|
|
247
257
|
return parseInt(this.rows);
|
|
248
258
|
} }, methods: { onSubmit() {
|
|
249
259
|
this.$emit("btnClick", this.localVal);
|
|
250
|
-
} } },
|
|
251
|
-
const n = C("el-input"),
|
|
252
|
-
return
|
|
253
|
-
}]]),
|
|
260
|
+
} } }, Kn = { class: "cv-textab-group" }, Gn = { class: "cv-textab-group__append" }, Zn = { class: "cv-textab_slot-wrap" }, yt = V(qn, [["render", function(e, t, o, l, i, a) {
|
|
261
|
+
const n = C("el-input"), c = C("el-button");
|
|
262
|
+
return r(), u("div", Kn, [b(n, O({ type: "textarea" }, { disabled: e.disabled, rows: a.lastRow, autosize: o.autosize }, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (p) => e.localVal = p), onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入内容", clearable: "" }), null, 16, ["modelValue", "onInput", "placeholder"]), d("div", Gn, [d("div", Zn, [D(e.$slots, "default", {}, () => [b(c, { class: "cv-textab_slotbtn", type: "primary", size: e.size, onClick: a.onSubmit }, { default: v(() => [o.btnIcon ? (r(), u("i", { key: 0, class: z(o.btnIcon), style: { "margin-right": "5px" } }, null, 2)) : w("", !0), F(" " + L(o.btnText), 1)]), _: 1 }, 8, ["size", "onClick"])])])])]);
|
|
263
|
+
}]]), Qn = { class: "cv-input-group" }, Jn = { class: "cv-input-group__append" }, bt = V({ name: "cvInputBtn", mixins: [le], emits: ["btnClick"], components: {}, props: { btnText: { type: [Number, String], default: "确定" }, btnIcon: { type: [String], default: "" } }, data: () => ({}), methods: { onSubmit() {
|
|
254
264
|
this.$emit("btnClick", this.localVal);
|
|
255
265
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
256
|
-
const n = C("el-input"),
|
|
257
|
-
return
|
|
258
|
-
}]]),
|
|
259
|
-
return
|
|
266
|
+
const n = C("el-input"), c = C("el-button");
|
|
267
|
+
return r(), u("div", Qn, [b(n, O({ type: "text" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (p) => e.localVal = p), onChange: e.handleChange, onInput: e.handleInput, placeholder: e.placeholder ? e.placeholder : "请输入", clearable: "" }), null, 16, ["modelValue", "onChange", "onInput", "placeholder"]), d("div", Jn, [D(e.$slots, "default", {}, () => [b(c, { class: "cv-input-btn__slotbtn", type: "primary", size: e.size, onClick: a.onSubmit }, { default: v(() => [o.btnIcon ? (r(), u("i", { key: 0, class: z(o.btnIcon), style: { "margin-right": "5px" } }, null, 2)) : w("", !0), F(" " + L(o.btnText), 1)]), _: 1 }, 8, ["size", "onClick"])])])]);
|
|
268
|
+
}]]), Uo = V({ data: () => ({ formData: {} }) }, [["render", function(e, t, o, l, i, a) {
|
|
269
|
+
return r(), u("div");
|
|
260
270
|
}]]);
|
|
261
|
-
|
|
271
|
+
ht.install = function(e) {
|
|
272
|
+
e.component(ht.name, ht);
|
|
273
|
+
}, pt.install = function(e) {
|
|
262
274
|
e.component(pt.name, pt);
|
|
263
275
|
}, ut.install = function(e) {
|
|
264
276
|
e.component(ut.name, ut);
|
|
@@ -274,43 +286,41 @@ pt.install = function(e) {
|
|
|
274
286
|
e.component(yt.name, yt);
|
|
275
287
|
}, bt.install = function(e) {
|
|
276
288
|
e.component(bt.name, bt);
|
|
277
|
-
},
|
|
278
|
-
e.component(
|
|
279
|
-
}, Wo.install = function(e) {
|
|
280
|
-
e.component(Wo.name, Wo);
|
|
289
|
+
}, Uo.install = function(e) {
|
|
290
|
+
e.component(Uo.name, Uo);
|
|
281
291
|
};
|
|
282
|
-
const
|
|
292
|
+
const Ct = V({ name: "cvInputCounter", extends: Ql, props: {}, watch: { modelValue() {
|
|
283
293
|
this.localVal = this.modelValue;
|
|
284
294
|
} }, data: () => ({ localVal: 0 }), created() {
|
|
285
295
|
}, methods: { handleChange(e) {
|
|
286
296
|
this.$emit("update:modelValue", this.localVal);
|
|
287
297
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
288
298
|
const n = C("el-input-number");
|
|
289
|
-
return
|
|
299
|
+
return r(), S(n, O(e.$props, { modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => i.localVal = c), onChange: a.handleChange, step: e.step }), null, 16, ["modelValue", "onChange", "step"]);
|
|
290
300
|
}]]);
|
|
291
|
-
|
|
292
|
-
e.component(
|
|
301
|
+
Ct.install = function(e) {
|
|
302
|
+
e.component(Ct.name, Ct);
|
|
293
303
|
};
|
|
294
|
-
const
|
|
304
|
+
const es = { class: "cv-show-text" }, ts = ["innerHTML"], wt = V({ name: "cvShowText", mixins: [], components: {}, props: { text: { type: [Number, String, Object], default: "" } }, data: () => ({}), created() {
|
|
295
305
|
}, methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
296
|
-
return
|
|
297
|
-
}]]),
|
|
306
|
+
return r(), u("div", es, [o.text ? (r(), u("div", { key: 0, innerHTML: o.text }, null, 8, ts)) : w("", !0), o.text ? w("", !0) : D(e.$slots, "default", { key: 1 })]);
|
|
307
|
+
}]]), os = { class: "cv-show-image" }, kt = V({ name: "cvShowImage", mixins: [], components: {}, props: { url: { type: [String, Array, Object], default: "" }, width: { type: [String], default: "100px" }, height: { type: [String], default: "100px" } }, data: () => ({ localUrl: "" }), watch: { url: { handler() {
|
|
298
308
|
this.localUrl = typeof this.url == "string" ? [this.url] : this.url;
|
|
299
309
|
}, immediate: !0, deep: !0 } }, created() {
|
|
300
310
|
}, methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
301
311
|
const n = C("el-image");
|
|
302
|
-
return
|
|
303
|
-
}]]),
|
|
312
|
+
return r(), u("div", os, [(r(!0), u($, null, M(i.localUrl, (c, p) => (r(), S(n, { style: A("width:" + o.width + "; height:" + o.height + "; margin-right:10px"), key: p, src: c, "preview-src-list": i.localUrl }, null, 8, ["style", "src", "preview-src-list"]))), 128))]);
|
|
313
|
+
}]]), xt = V({ name: "cvShowTip", props: { borderColor: { type: [String], default: "#50bfff" }, bgColor: { type: [String], default: "#ecf8ff" } }, data: () => ({ backgroundColor: "#ecf8ff", borderLeft: "5px solid #50bfff" }), created() {
|
|
304
314
|
this.borderLeft = `5px solid ${this.borderColor}`, this.backgroundColor = `${this.bgColor}`;
|
|
305
315
|
}, methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
306
|
-
return
|
|
307
|
-
}]]),
|
|
316
|
+
return r(), u("div", { class: "cv-show-tip", style: A({ backgroundColor: this.backgroundColor, borderLeft: this.borderLeft }) }, [D(e.$slots, "default")], 4);
|
|
317
|
+
}]]), is = { name: "cv-gallery-dialog", props: { type: String, title: String, sources: Array, sliceSingle: { type: Boolean, default: !1 }, carouselAttrs: Object }, data: () => ({ isShowCarousel: !1, sourceTitle: "", initialIndex: 0, isShowPreview: !1 }), methods: { startPreview(e) {
|
|
308
318
|
this.isShowPreview = !0, this.initialIndex = e, this.sourceTitle = this.sources[e].title;
|
|
309
319
|
}, handleCarouselChange(e) {
|
|
310
320
|
this.sources[e] && this.sources[e].title ? this.sourceTitle = this.sources[e].title : this.sourceTitle = "";
|
|
311
|
-
} } },
|
|
312
|
-
const n = C("el-carousel-item"),
|
|
313
|
-
return
|
|
321
|
+
} } }, as = ["src"], ls = { key: 0, class: "cv-gallery-iframe embed-responsive embed-responsive-16by9" }, ns = ["src"], ss = ["src"], rs = ["src"], cs = { name: "gallery", components: { GalleryDialog: V(is, [["render", function(e, t, o, l, i, a) {
|
|
322
|
+
const n = C("el-carousel-item"), c = C("el-carousel"), p = C("el-dialog");
|
|
323
|
+
return r(), S(p, { visible: i.isShowPreview, "append-to-body": "", onOpen: t[0] || (t[0] = (h) => i.isShowCarousel = !0), onClosed: t[1] || (t[1] = (h) => i.isShowCarousel = !1), style: { "text-align": "center" } }, { header: v(() => [F(L(i.sourceTitle || o.title), 1)]), default: v(() => [o.type === "video" ? (r(), u($, { key: 0 }, [i.isShowPreview ? (r(), u("video", { key: 0, src: o.sources[i.initialIndex].src, autoplay: "autoplay", class: "cv-gallery-video", controls: "controls", width: "100%" }, null, 8, as)) : w("", !0)], 64)) : o.type === "iframe" ? (r(), u($, { key: 1 }, [i.isShowPreview ? (r(), u("div", ls, [d("iframe", { src: o.sources[i.initialIndex].src, allowfullscreen: "true", border: "0", frameborder: "no", framespacing: "0", scrolling: "no" }, null, 8, ns)])) : w("", !0)], 64)) : o.type === "image" ? (r(), u($, { key: 2 }, [o.sliceSingle && o.sources[i.initialIndex] || o.sources.length === 1 ? (r(), u("img", { key: 0, src: o.sources[i.initialIndex].src, class: "cv-gallery-image" }, null, 8, ss)) : (r(), u($, { key: 1 }, [i.isShowCarousel ? (r(), S(c, O({ key: 0, "initial-index": i.initialIndex, onChange: a.handleCarouselChange, "indicator-position": "outside" }, o.carouselAttrs), { default: v(() => [(r(!0), u($, null, M(o.sources, (h, m) => (r(), S(n, { key: m }, { default: v(() => [d("img", { src: h.src, class: "cv-gallery-image" }, null, 8, rs)]), _: 2 }, 1024))), 128))]), _: 1 }, 16, ["initial-index", "onChange"])) : w("", !0)], 64))], 64)) : w("", !0)]), _: 1 }, 8, ["visible"]);
|
|
314
324
|
}]]) }, props: { type: { type: String, default: "image", validator: (e) => ["image", "video", "iframe"].includes(e) }, size: Number, width: Number, height: Number, lazy: { type: Boolean, default: !1 }, source: [String, Array, Object], thumbSuffix: { type: String, default: "" }, thumbStyle: Object, carouselAttrs: Object, title: String, sliceSingle: { type: Boolean, default: !1 } }, data: () => ({}), computed: { computedStyle() {
|
|
315
325
|
let e = this.width || this.size, t = this.height || this.size;
|
|
316
326
|
return this.type === "iframe" && (e = e ? e + "px" : "360px", t = t ? t + "px" : "auto"), Object.assign({}, { width: e, height: t, display: "block" }, this.thumbStyle);
|
|
@@ -333,26 +343,26 @@ const ts = { class: "cv-show-text" }, os = ["innerHTML"], kt = V({ name: "cvShow
|
|
|
333
343
|
return this.type === "image" && this.thumbSuffix && (t += this.thumbSuffix), { type: this.type, src: e, thumb: t };
|
|
334
344
|
}, getObjectSource(e) {
|
|
335
345
|
return e.type = e.thumb ? "image" : this.type, e.thumb = e.thumb || e.src, e;
|
|
336
|
-
} } },
|
|
337
|
-
const n = C("cv-icons"),
|
|
338
|
-
return o.source ? (
|
|
346
|
+
} } }, ds = { key: 0, class: "cv-gallery" }, hs = { class: "el-upload-list el-upload-list--picture-card" }, ps = ["src"], us = { class: "el-upload-list__item-actions" }, ms = ["onClick"], Wo = V(cs, [["render", function(e, t, o, l, i, a) {
|
|
347
|
+
const n = C("cv-icons"), c = C("GalleryDialog");
|
|
348
|
+
return o.source ? (r(), u("div", ds, [d("div", hs, [(r(!0), u($, null, M(a.computedSources, (p, h) => (r(), u("li", { key: h, class: "el-upload-list__item" }, [d("div", { style: A(a.computedStyle), class: "cv-gallery-iframe embed-responsive embed-responsive-16by9" }, [d("iframe", { src: p.thumb, allowfullscreen: "true", border: "0", frameborder: "no", framespacing: "0", scrolling: "no" }, null, 8, ps)], 4), d("span", us, [d("span", { onClick: (m) => a.handlePreview(h, p) }, [b(n, { type: "ElIconVideoPlay", size: "20" })], 8, ms), D(e.$slots, "action", O({ ref_for: !0 }, { source: p, index: h }))])]))), 128))]), b(c, { carouselAttrs: o.carouselAttrs, sliceSingle: o.sliceSingle, sources: a.computedSources, title: o.title, type: o.type, ref: "dialog" }, null, 8, ["carouselAttrs", "sliceSingle", "sources", "title", "type"])])) : w("", !0);
|
|
339
349
|
}]]);
|
|
340
|
-
|
|
350
|
+
wt.install = function(e) {
|
|
351
|
+
e.component(wt.name, wt);
|
|
352
|
+
}, kt.install = function(e) {
|
|
341
353
|
e.component(kt.name, kt);
|
|
342
354
|
}, xt.install = function(e) {
|
|
343
355
|
e.component(xt.name, xt);
|
|
344
|
-
},
|
|
345
|
-
e.component(
|
|
346
|
-
}, Yo.install = function(e) {
|
|
347
|
-
e.component(Yo.name, Yo);
|
|
356
|
+
}, Wo.install = function(e) {
|
|
357
|
+
e.component(Wo.name, Wo);
|
|
348
358
|
};
|
|
349
|
-
const
|
|
359
|
+
const St = V({ name: "cvRadioOptBase" }, [["render", function(e, t, o, l, i, a) {
|
|
350
360
|
const n = C("el-radio");
|
|
351
|
-
return
|
|
352
|
-
}]]),
|
|
361
|
+
return r(), S(n, U(Y(e.$props)), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16);
|
|
362
|
+
}]]), Vt = V({ name: "cvRadioOptBtn" }, [["render", function(e, t, o, l, i, a) {
|
|
353
363
|
const n = C("el-radio-button");
|
|
354
|
-
return
|
|
355
|
-
}]]),
|
|
364
|
+
return r(), S(n, U(Y(e.$props)), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16);
|
|
365
|
+
}]]), _t = V({ name: "cvRadioGroup", props: { ...Jl.props, modelValue: { default: "" }, type: { type: [String], default: "base" }, dataLists: { type: Array, default: () => [] }, dataField: { type: [Object], default: () => ({}) }, disabled: { type: Boolean, default: !1 } }, watch: { modelValue(e) {
|
|
356
366
|
this.localVal = e;
|
|
357
367
|
}, localVal() {
|
|
358
368
|
this.handleChange();
|
|
@@ -377,23 +387,23 @@ const Vt = V({ name: "cvRadioOptBase" }, [["render", function(e, t, o, l, i, a)
|
|
|
377
387
|
}), this.localOpt = e;
|
|
378
388
|
}
|
|
379
389
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
380
|
-
const n = C("el-radio"),
|
|
381
|
-
return
|
|
390
|
+
const n = C("el-radio"), c = C("el-radio-button"), p = C("el-radio-group");
|
|
391
|
+
return r(), S(p, { class: "cv-radio-group", modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (h) => i.localVal = h) }, { default: v(() => [D(e.$slots, "default", {}, () => [o.type == "base" ? (r(!0), u($, { key: 0 }, M(i.localOpt, (h, m) => (r(), S(n, { label: h.label, value: h.value, key: m, disabled: o.disabled || h.disabled }, { default: v(() => [F(L(h.label), 1)]), _: 2 }, 1032, ["label", "value", "disabled"]))), 128)) : w("", !0), o.type == "button" ? (r(!0), u($, { key: 1 }, M(i.localOpt, (h, m) => (r(), S(c, { label: h.label, value: h.value, key: m, disabled: o.disabled || h.disabled }, { default: v(() => [F(L(h.label), 1)]), _: 2 }, 1032, ["label", "value", "disabled"]))), 128)) : w("", !0)])]), _: 3 }, 8, ["modelValue"]);
|
|
382
392
|
}]]);
|
|
383
|
-
|
|
393
|
+
St.install = function(e) {
|
|
394
|
+
e.component(St.name, St);
|
|
395
|
+
}, Vt.install = function(e) {
|
|
384
396
|
e.component(Vt.name, Vt);
|
|
385
397
|
}, _t.install = function(e) {
|
|
386
398
|
e.component(_t.name, _t);
|
|
387
|
-
}, It.install = function(e) {
|
|
388
|
-
e.component(It.name, It);
|
|
389
399
|
};
|
|
390
|
-
const
|
|
400
|
+
const It = V({ name: "cvCheckboxOptBase", extends: en }, [["render", function(e, t, o, l, i, a) {
|
|
391
401
|
const n = C("el-checkbox");
|
|
392
|
-
return
|
|
393
|
-
}]]),
|
|
402
|
+
return r(), S(n, U(Y(e.$props)), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16);
|
|
403
|
+
}]]), Lt = V({ name: "cvCheckboxOptBtn", extends: tn, props: {} }, [["render", function(e, t, o, l, i, a) {
|
|
394
404
|
const n = C("el-checkbox-button");
|
|
395
|
-
return
|
|
396
|
-
}]]),
|
|
405
|
+
return r(), S(n, U(Y(e.$props)), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16);
|
|
406
|
+
}]]), _l = { props: { ...on.props, modelValue: { type: [Array], default: () => [] }, dataLists: { type: Array, default: () => [] }, dataField: { type: [Object], default: () => ({}) }, disabled: { type: Boolean, default: !1 } }, watch: { modelValue() {
|
|
397
407
|
this.localVal = this.modelValue;
|
|
398
408
|
}, localVal() {
|
|
399
409
|
this.handleChange();
|
|
@@ -419,7 +429,7 @@ const Lt = V({ name: "cvCheckboxOptBase", extends: tn }, [["render", function(e,
|
|
|
419
429
|
}
|
|
420
430
|
this._parseLocalOptDiy();
|
|
421
431
|
}, _parseLocalOptDiy() {
|
|
422
|
-
} } },
|
|
432
|
+
} } }, gs = { class: "cv-checkbox-all" }, Dt = V({ name: "cvCheckboxAll", mixins: [_l], components: {}, data: () => ({ checkAll: !1, isIndeterminate: !0, localOptAll: [] }), methods: { handleCheckAllChange(e) {
|
|
423
433
|
this.localVal = e ? this.localOptAll : [], this.isIndeterminate = !1, this.handleChange();
|
|
424
434
|
}, handleCheckedCitiesChange(e) {
|
|
425
435
|
let t = e.length;
|
|
@@ -429,37 +439,37 @@ const Lt = V({ name: "cvCheckboxOptBase", extends: tn }, [["render", function(e,
|
|
|
429
439
|
e.disabled || this.localOptAll.push(e.label);
|
|
430
440
|
});
|
|
431
441
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
432
|
-
const n = C("el-checkbox"),
|
|
433
|
-
return
|
|
434
|
-
}]]),
|
|
435
|
-
const n = C("el-checkbox"),
|
|
436
|
-
return
|
|
442
|
+
const n = C("el-checkbox"), c = C("el-checkbox-group");
|
|
443
|
+
return r(), u("div", gs, [b(n, { indeterminate: i.isIndeterminate, modelValue: i.checkAll, "onUpdate:modelValue": t[0] || (t[0] = (p) => i.checkAll = p), onChange: a.handleCheckAllChange }, { default: v(() => t[2] || (t[2] = [F("全选")])), _: 1, __: [2] }, 8, ["indeterminate", "modelValue", "onChange"]), t[3] || (t[3] = d("div", { style: { margin: "15px 0" } }, null, -1)), b(c, { modelValue: e.localVal, "onUpdate:modelValue": t[1] || (t[1] = (p) => e.localVal = p), onChange: a.handleCheckedCitiesChange }, { default: v(() => [D(e.$slots, "default", {}, () => [(r(!0), u($, null, M(e.localOpt, (p, h) => (r(), S(n, { label: p.label, value: p.value, key: h, onChange: e.handleChange, disabled: e.disabled || p.disabled }, { default: v(() => [F(L(p.label), 1)]), _: 2 }, 1032, ["label", "value", "onChange", "disabled"]))), 128))])]), _: 3 }, 8, ["modelValue", "onChange"])]);
|
|
444
|
+
}]]), Tt = V({ name: "cvCheckboxGroup", mixins: [_l], components: {}, props: { type: { type: [String], default: "base" } }, data: () => ({}) }, [["render", function(e, t, o, l, i, a) {
|
|
445
|
+
const n = C("el-checkbox"), c = C("el-checkbox-button"), p = C("el-checkbox-group");
|
|
446
|
+
return r(), S(p, O(e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (h) => e.localVal = h) }), { default: v(() => [D(e.$slots, "default", {}, () => [o.type == "base" ? (r(!0), u($, { key: 0 }, M(e.localOpt, (h, m) => (r(), S(n, { label: h.label, value: h.value, key: m, onChange: e.handleChange, disabled: e.disabled || h.disabled }, { default: v(() => [F(L(h.label), 1)]), _: 2 }, 1032, ["label", "value", "onChange", "disabled"]))), 128)) : w("", !0), o.type == "button" ? (r(!0), u($, { key: 1 }, M(e.localOpt, (h, m) => (r(), S(c, { label: h.label, value: h.value, key: m, onChange: e.handleChange, disabled: e.disabled || h.disabled }, { default: v(() => [F(L(h.label), 1)]), _: 2 }, 1032, ["label", "value", "onChange", "disabled"]))), 128)) : w("", !0)])]), _: 3 }, 16, ["modelValue"]);
|
|
437
447
|
}]]);
|
|
438
|
-
function
|
|
448
|
+
function Il(e, t, o) {
|
|
439
449
|
var l = {}.atBegin;
|
|
440
450
|
return function(i, a, n) {
|
|
441
|
-
var
|
|
451
|
+
var c, p = n || {}, h = p.noTrailing, m = h !== void 0 && h, f = p.noLeading, g = f !== void 0 && f, k = p.debounceMode, x = k === void 0 ? void 0 : k, y = !1, _ = 0;
|
|
442
452
|
function I() {
|
|
443
|
-
|
|
453
|
+
c && clearTimeout(c);
|
|
444
454
|
}
|
|
445
|
-
function
|
|
446
|
-
for (var
|
|
447
|
-
var
|
|
448
|
-
function
|
|
449
|
-
_ = Date.now(), a.apply(
|
|
455
|
+
function E() {
|
|
456
|
+
for (var P = arguments.length, j = new Array(P), W = 0; W < P; W++) j[W] = arguments[W];
|
|
457
|
+
var ee = this, te = Date.now() - _;
|
|
458
|
+
function ce() {
|
|
459
|
+
_ = Date.now(), a.apply(ee, j);
|
|
450
460
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
461
|
+
function Ae() {
|
|
462
|
+
c = void 0;
|
|
453
463
|
}
|
|
454
|
-
y || (g || !x ||
|
|
464
|
+
y || (g || !x || c || ce(), I(), x === void 0 && te > i ? g ? (_ = Date.now(), m || (c = setTimeout(x ? Ae : ce, i))) : ce() : m !== !0 && (c = setTimeout(x ? Ae : ce, x === void 0 ? i - te : i)));
|
|
455
465
|
}
|
|
456
|
-
return
|
|
457
|
-
var
|
|
458
|
-
I(), y = !
|
|
459
|
-
},
|
|
466
|
+
return E.cancel = function(P) {
|
|
467
|
+
var j = (P || {}).upcomingOnly, W = j !== void 0 && j;
|
|
468
|
+
I(), y = !W;
|
|
469
|
+
}, E;
|
|
460
470
|
}(e, t, { debounceMode: (l !== void 0 && l) !== !1 });
|
|
461
471
|
}
|
|
462
|
-
function
|
|
472
|
+
function _e(e, t = !1, o = !0) {
|
|
463
473
|
return new Promise((l, i) => {
|
|
464
474
|
const a = document.createElement("script");
|
|
465
475
|
e = e.replace(/([^:]\/)\/+/g, "$1"), a.id = e, a.type = "text/javascript", a.src = t ? e + "?t=" + (/* @__PURE__ */ new Date()).getTime() : e, document.getElementById(e) && o ? l() : (document.body.appendChild(a), a.onload = () => {
|
|
@@ -467,9 +477,9 @@ function Ie(e, t = !1, o = !0) {
|
|
|
467
477
|
});
|
|
468
478
|
});
|
|
469
479
|
}
|
|
470
|
-
function
|
|
480
|
+
function fs(e) {
|
|
471
481
|
const t = e, o = document.createElement("textarea");
|
|
472
|
-
o.value = t, document.body.appendChild(o), o.select(), document.execCommand("Copy"),
|
|
482
|
+
o.value = t, document.body.appendChild(o), o.select(), document.execCommand("Copy"), q({ message: "复制成功", type: "success" }), o.remove();
|
|
473
483
|
try {
|
|
474
484
|
document.execCommand("Copy");
|
|
475
485
|
} catch {
|
|
@@ -479,68 +489,68 @@ function vs(e) {
|
|
|
479
489
|
}
|
|
480
490
|
this.$message({ message: "复制成功", type: "success" }), o.remove(), document.body.removeChild(o);
|
|
481
491
|
}
|
|
482
|
-
function
|
|
492
|
+
function vs(e) {
|
|
483
493
|
var t = /* @__PURE__ */ new Date(), o = new Date(e), l = t - o, i = Math.floor(l / 1e3), a = Math.floor(i / 60), n = Math.floor(a / 60);
|
|
484
|
-
if (a < 1) var
|
|
485
|
-
else n < 1 ?
|
|
486
|
-
return
|
|
494
|
+
if (a < 1) var c = i + "秒前";
|
|
495
|
+
else n < 1 ? c = a + "分钟前" : n < 24 ? c = n + "小时前" : c = o.toLocaleString();
|
|
496
|
+
return c;
|
|
487
497
|
}
|
|
488
|
-
function
|
|
498
|
+
function ke(e, ...t) {
|
|
489
499
|
return t.reduce((o, l) => Object.keys(l).reduce((i, a) => {
|
|
490
500
|
const n = l[a];
|
|
491
|
-
return
|
|
492
|
-
if (
|
|
501
|
+
return Ao(n) ? i[a] = ke(i[a] ? i[a] : {}, n) : Dl(n) ? i[a] = n.map((c, p) => {
|
|
502
|
+
if (Ao(c)) {
|
|
493
503
|
const h = i[a] ? i[a] : [];
|
|
494
|
-
return
|
|
504
|
+
return ke(h[p] ? h[p] : {}, c);
|
|
495
505
|
}
|
|
496
|
-
return
|
|
506
|
+
return c;
|
|
497
507
|
}) : i[a] = n, i;
|
|
498
508
|
}, o), e);
|
|
499
509
|
}
|
|
500
|
-
function
|
|
510
|
+
function Ll(e, t) {
|
|
501
511
|
const { [t[0]]: o, ...l } = e;
|
|
502
512
|
return Object.keys(e).reduce((i, a) => (t.includes(a) || (i[a] = e[a]), i), {});
|
|
503
513
|
}
|
|
504
|
-
function
|
|
514
|
+
function Ao(e) {
|
|
505
515
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
506
516
|
}
|
|
507
|
-
function
|
|
517
|
+
function Dl(e) {
|
|
508
518
|
return typeof Array.isArray == "function" ? Array.isArray(e) : Object.prototype.toString.call(e) === "[object Array]";
|
|
509
519
|
}
|
|
510
|
-
function
|
|
511
|
-
return
|
|
520
|
+
function Oe(e) {
|
|
521
|
+
return Dl(e) ? e.length === 0 : Ao(e) ? Object.keys(e).length === 0 : e === "" || e == null;
|
|
512
522
|
}
|
|
513
|
-
function
|
|
514
|
-
return
|
|
523
|
+
function Be(e, t) {
|
|
524
|
+
return Oe(e) ? t : e;
|
|
515
525
|
}
|
|
516
|
-
function
|
|
526
|
+
function ys(e) {
|
|
517
527
|
let t = e.lastIndexOf("."), o = e.substring(t + 1);
|
|
518
528
|
return ["png", "jpg", "jpeg", "gif", "webp", "svg"].indexOf(o.toLowerCase()) != -1;
|
|
519
529
|
}
|
|
520
|
-
function
|
|
530
|
+
function Se(e) {
|
|
521
531
|
return e == null ? "" : String(e);
|
|
522
532
|
}
|
|
523
|
-
|
|
533
|
+
It.install = function(e) {
|
|
534
|
+
e.component(It.name, It);
|
|
535
|
+
}, Lt.install = function(e) {
|
|
524
536
|
e.component(Lt.name, Lt);
|
|
525
|
-
}, Dt.install = function(e) {
|
|
526
|
-
e.component(Dt.name, Dt);
|
|
527
|
-
}, Ft.install = function(e) {
|
|
528
|
-
e.component(Ft.name, Ft);
|
|
529
537
|
}, Tt.install = function(e) {
|
|
530
538
|
e.component(Tt.name, Tt);
|
|
539
|
+
}, Dt.install = function(e) {
|
|
540
|
+
e.component(Dt.name, Dt);
|
|
531
541
|
};
|
|
532
|
-
const
|
|
542
|
+
const Tl = (() => {
|
|
533
543
|
const e = { svg: ["image/svg+xml", "image/svg"], jpg: ["image/jpeg", "image/jpg"], jpeg: ["image/jpeg"], png: ["image/png"], gif: ["image/gif"], webp: ["image/webp"], bmp: ["image/bmp", "image/x-bmp", "image/x-ms-bmp"], ico: ["image/x-icon", "image/vnd.microsoft.icon"], tiff: ["image/tiff", "image/tif", "image/x-tiff"], apng: ["image/apng"], avif: ["image/avif"], heic: ["image/heic"], pdf: ["application/pdf"], txt: ["text/plain"], csv: ["text/csv"], json: ["application/json"], xml: ["application/xml"], doc: ["application/msword"], docx: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"], xls: ["application/vnd.ms-excel"], xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"], ppt: ["application/vnd.ms-powerpoint"], pptx: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"], zip: ["application/zip"], rar: ["application/x-rar-compressed"], "7z": ["application/x-7z-compressed"], mp3: ["audio/mpeg"], mp4: ["video/mp4"], mov: ["video/quicktime"], avi: ["video/x-msvideo"], wav: ["audio/wav"] }, t = {}, o = {};
|
|
534
544
|
for (const [l, i] of Object.entries(e)) {
|
|
535
545
|
t[l] = i[0];
|
|
536
546
|
for (const a of i) o[a] = l;
|
|
537
547
|
}
|
|
538
548
|
return { extensionToMime: t, mimeToExtension: o };
|
|
539
|
-
})(),
|
|
549
|
+
})(), bs = { name: "cvGeoCity", mixins: [], components: {}, props: { modelValue: { type: [String, Array, Number], default: () => [] }, cityHide: { type: Boolean, default: !1 }, districtHide: { type: Boolean, default: !1 }, initChoose: { type: [String, Array, Number], default: () => [] }, initStr: { type: [String, Array, Number], default: () => [] } }, watch: { modelValue(e) {
|
|
540
550
|
}, initChoose: { deep: !0, immediate: !0, handler(e) {
|
|
541
551
|
this.initProvince(e);
|
|
542
552
|
} } }, data: () => ({ provinceCdnList: {}, cityCdnList: {}, districtCdnList: {}, isCdnLoading: !0, provinceList: [], cityList: [], districtList: [], provinceCode: "", cityCode: "", districtCode: "", provinceFlag: !1, cityFlag: !1, districtFlag: !1, activeSelectArr: {} }), async mounted() {
|
|
543
|
-
await
|
|
553
|
+
await _e(this.CDN_URL_UI + "/dict/dict-area/area-province.js"), await _e(this.CDN_URL_UI + "/dict/dict-area/area-city.js"), await _e(this.CDN_URL_UI + "/dict/dict-area/area-district.js").then(() => {
|
|
544
554
|
this.initLoad();
|
|
545
555
|
});
|
|
546
556
|
}, methods: { initLoad() {
|
|
@@ -620,13 +630,13 @@ const Fl = (() => {
|
|
|
620
630
|
this.districtList.map((o) => {
|
|
621
631
|
o.districtCode == e && (t = o.districtName);
|
|
622
632
|
}), this.$emit("addressSelect", [e, t]);
|
|
623
|
-
} } },
|
|
624
|
-
const n = C("el-option"),
|
|
625
|
-
return N((
|
|
626
|
-
}]]),
|
|
633
|
+
} } }, Cs = { class: "cv-geo-city" }, ws = { key: 0 }, ks = { key: 1 }, Ft = V(bs, [["render", function(e, t, o, l, i, a) {
|
|
634
|
+
const n = C("el-option"), c = C("el-select"), p = ae("loading");
|
|
635
|
+
return N((r(), u("div", Cs, [d("div", null, [b(c, { modelValue: i.provinceCode, "onUpdate:modelValue": t[0] || (t[0] = (h) => i.provinceCode = h), onFocus: a.getProvinces, onChange: a.changeProvince, placeholder: "省", filterable: "" }, { default: v(() => [(r(!0), u($, null, M(i.provinceList, (h, m) => (r(), S(n, { onClick: (f) => a.handleChoose("provinceCode", h, m), key: h.provinceCode, label: h.provinceName, value: h.provinceCode }, null, 8, ["onClick", "label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onFocus", "onChange"])]), o.cityHide ? w("", !0) : (r(), u("div", ws, [b(c, { modelValue: i.cityCode, "onUpdate:modelValue": t[1] || (t[1] = (h) => i.cityCode = h), onFocus: a.getCities, onChange: a.changeCity, placeholder: "市", filterable: "" }, { default: v(() => [(r(!0), u($, null, M(i.cityList, (h, m) => (r(), S(n, { onClick: (f) => a.handleChoose("cityCode", h, m), key: h.cityCode, label: h.cityName, value: h.cityCode }, null, 8, ["onClick", "label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onFocus", "onChange"])])), o.cityHide || o.districtHide ? w("", !0) : (r(), u("div", ks, [b(c, { modelValue: i.districtCode, "onUpdate:modelValue": t[2] || (t[2] = (h) => i.districtCode = h), onFocus: a.getDistrict, onChange: a.changeDistrict, placeholder: "区/县", filterable: "" }, { default: v(() => [(r(!0), u($, null, M(i.districtList, (h, m) => (r(), S(n, { onClick: (f) => a.handleChoose("districtCode", h, m), key: h.districtCode, label: h.districtName, value: h.districtCode }, null, 8, ["onClick", "label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onFocus", "onChange"])]))])), [[p, i.isCdnLoading]]);
|
|
636
|
+
}]]), xs = { name: "cvGeoCity2", mixins: [], components: {}, props: { modelValue: { type: [String, Array, Number], default: () => [] }, cityHide: { type: Boolean, default: !1 }, districtHide: { type: Boolean, default: !1 }, initChoose: { type: [String, Array, Number], default: () => [] }, initStr: { type: [String, Array, Number], default: () => [] } }, watch: { initChoose: { deep: !0, immediate: !0, handler(e) {
|
|
627
637
|
this.initProvince(e);
|
|
628
638
|
} } }, data: () => ({ provinceCdnList: {}, cityCdnList: {}, districtCdnList: {}, isCdnLoading: !0, provinceList: [], cityList: [], districtList: [], provinceCode: "", cityCode: "", districtCode: "", hideMunicipality: !1, municipalities: ["110000", "120000", "310000", "500000", "北京市", "天津市", "上海市", "重庆市"], provinceFlag: !1, cityFlag: !1, districtFlag: !1, activeSelectArr: {} }), async mounted() {
|
|
629
|
-
await
|
|
639
|
+
await _e(this.CDN_URL_UI + "/dict/dict-area/area-province.js"), await _e(this.CDN_URL_UI + "/dict/dict-area/area-city.js"), await _e(this.CDN_URL_UI + "/dict/dict-area/area-district.js").then(() => {
|
|
630
640
|
this.initLoad();
|
|
631
641
|
});
|
|
632
642
|
}, methods: { initLoad() {
|
|
@@ -711,16 +721,16 @@ const Fl = (() => {
|
|
|
711
721
|
this.districtList.map((o) => {
|
|
712
722
|
o.districtCode == e && (t = o.districtName);
|
|
713
723
|
}), this.$emit("addressSelect", [e, t]);
|
|
714
|
-
} } },
|
|
715
|
-
const n = C("el-option"),
|
|
716
|
-
return N((
|
|
724
|
+
} } }, Ss = { class: "cv-geo-city" }, Vs = ["hidden"], _s = { key: 1 }, Ot = V(xs, [["render", function(e, t, o, l, i, a) {
|
|
725
|
+
const n = C("el-option"), c = C("el-select"), p = ae("loading");
|
|
726
|
+
return N((r(), u("div", Ss, [d("div", null, [b(c, { modelValue: i.provinceCode, "onUpdate:modelValue": t[0] || (t[0] = (h) => i.provinceCode = h), onFocus: a.getProvinces, onChange: a.changeProvince, placeholder: "省", filterable: "" }, { default: v(() => [(r(!0), u($, null, M(i.provinceList, (h, m) => (r(), S(n, { onClick: (f) => a.handleChoose("provinceCode", h, m), key: h.provinceCode, label: h.provinceName, value: h.provinceCode }, null, 8, ["onClick", "label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onFocus", "onChange"])]), o.cityHide ? w("", !0) : (r(), u("div", { key: 0, hidden: i.hideMunicipality }, [b(c, { modelValue: i.cityCode, "onUpdate:modelValue": t[1] || (t[1] = (h) => i.cityCode = h), onFocus: a.getCities, onChange: a.changeCity, placeholder: "市", filterable: "" }, { default: v(() => [(r(!0), u($, null, M(i.cityList, (h, m) => (r(), S(n, { onClick: (f) => a.handleChoose("cityCode", h, m), key: h.cityCode, label: h.cityName, value: h.cityCode }, null, 8, ["onClick", "label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onFocus", "onChange"])], 8, Vs)), o.cityHide || o.districtHide ? w("", !0) : (r(), u("div", _s, [b(c, { modelValue: i.districtCode, "onUpdate:modelValue": t[2] || (t[2] = (h) => i.districtCode = h), onFocus: a.getDistrict, onChange: a.changeDistrict, placeholder: "区/县", filterable: "" }, { default: v(() => [(r(!0), u($, null, M(i.districtList, (h, m) => (r(), S(n, { onClick: (f) => a.handleChoose("districtCode", h, m), key: h.districtCode, label: h.districtName, value: h.districtCode }, null, 8, ["onClick", "label", "value"]))), 128))]), _: 1 }, 8, ["modelValue", "onFocus", "onChange"])]))])), [[p, i.isCdnLoading]]);
|
|
717
727
|
}]]);
|
|
718
|
-
|
|
728
|
+
Ft.install = function(e) {
|
|
729
|
+
e.component(Ft.name, Ft);
|
|
730
|
+
}, Ot.install = function(e) {
|
|
719
731
|
e.component(Ot.name, Ot);
|
|
720
|
-
}, $t.install = function(e) {
|
|
721
|
-
e.component($t.name, $t);
|
|
722
732
|
};
|
|
723
|
-
const
|
|
733
|
+
const $t = { ...Wi, extends: Wi, name: "cvSelectOpt" }, Nt = V({ name: "cvSelectBase", emits: ["onChoose", "change", "update:modelValue"], props: { ...yl.props, modelValue: { type: [String, Array, Number], default: () => "" }, dataLists: { type: [Array], default: () => [] }, dataField: { type: [Object], default: () => ({}) }, dataDisabled: { type: [Array], default: () => [] }, disabled: { type: Boolean, default: !1 }, placeholder: { type: [String, Number], default: "请选择" } }, watch: { modelValue(e) {
|
|
724
734
|
this.localVal = e;
|
|
725
735
|
}, dataLists: { handler() {
|
|
726
736
|
this._parseLocalOpt();
|
|
@@ -746,9 +756,9 @@ const Nt = { ...Yi, extends: Yi, name: "cvSelectOpt" }, Mt = V({ name: "cvSelect
|
|
|
746
756
|
}), this.localOpt = e;
|
|
747
757
|
}
|
|
748
758
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
749
|
-
const n = C("el-option"),
|
|
750
|
-
return
|
|
751
|
-
}]]),
|
|
759
|
+
const n = C("el-option"), c = C("el-select");
|
|
760
|
+
return r(), S(c, O({ class: "cv-select-base" }, e.$props, { modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (p) => i.localVal = p), size: e.size, filterable: "", clearable: "" }), { default: v(() => [D(e.$slots, "default", {}, () => [(r(!0), u($, null, M(i.localOpt, (p, h) => (r(), S(n, { onClick: (m) => a.handleChoose(p, h), disabled: p.disabled, label: p.label, value: p.value, key: h }, null, 8, ["onClick", "disabled", "label", "value"]))), 128))])]), _: 3 }, 16, ["modelValue", "size"]);
|
|
761
|
+
}]]), Mt = V({ name: "cvSelectTree", emits: ["update:modelValue", "change"], props: { ...yl.props, modelValue: { type: [String, Array, Number], default: () => "" }, dataLists: { type: [Array], default: () => [] }, dataField: { type: [Object], default: () => ({ value: "id", label: "title", children: "children" }) }, clearable: { type: Boolean, default: !0 }, accordion: { type: Boolean, default: !1 }, defaultExpandAll: { type: Boolean, default: !0 }, dataDisabled: { type: [Array], default: () => [] }, disabled: { type: Boolean, default: !1 }, placeholder: { type: [String, Number], default: "请选择" }, showAllLevels: { type: Boolean, default: !0 }, showCheckbox: { type: Boolean, default: !1 }, filterable: { type: Boolean, default: !0 }, emitPath: { type: Boolean, default: !0 }, multiple: { type: Boolean, default: !1 }, refID: { type: [String], required: !1, default: () => "cvSelectTree-" + +/* @__PURE__ */ new Date() + (Math.random() / 1e4).toFixed(0) } }, watch: { modelValue() {
|
|
752
762
|
this.localVal = this.modelValue, this.initHandle();
|
|
753
763
|
}, dataLists: { handler() {
|
|
754
764
|
this._parseLocalOpt();
|
|
@@ -783,22 +793,22 @@ const Nt = { ...Yi, extends: Yi, name: "cvSelectOpt" }, Mt = V({ name: "cvSelect
|
|
|
783
793
|
this.dataField && this.dataField.label;
|
|
784
794
|
let t = this.dataField && this.dataField.value || "value", o = this.dataField && this.dataField.children || "children", l = this.dataDisabled;
|
|
785
795
|
(function i(a) {
|
|
786
|
-
for (let n in a) l.map((
|
|
787
|
-
a[n][t] ==
|
|
796
|
+
for (let n in a) l.map((c) => {
|
|
797
|
+
a[n][t] == c[t] && (a[n].disabled = !0);
|
|
788
798
|
}), a[n][o] && i(a[n][o]);
|
|
789
799
|
})(e), this.localOpt = e;
|
|
790
800
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
791
|
-
const n = C("el-tree"),
|
|
792
|
-
return
|
|
801
|
+
const n = C("el-tree"), c = C("el-option"), p = C("el-select");
|
|
802
|
+
return r(), S(p, O(e.$props, { ref: o.refID, "popper-class": "cv-select-tree", modelValue: i.localTitle, onClear: a.clearHandle }), { default: v(() => [b(c, { value: i.localTitle, label: i.localTitle, class: "options" }, { default: v(() => [b(n, { "highlight-current": "", id: o.refID + "tree", ref: o.refID + "tree", accordion: o.accordion, showCheckbox: o.showCheckbox, data: i.localOpt, props: o.dataField, "node-key": o.dataField.value, onNodeClick: a.handleNodeClick, "default-expand-all": o.defaultExpandAll }, null, 8, ["id", "accordion", "showCheckbox", "data", "props", "node-key", "onNodeClick", "default-expand-all"])]), _: 1 }, 8, ["value", "label"])]), _: 1 }, 16, ["modelValue", "onClear"]);
|
|
793
803
|
}]]);
|
|
794
|
-
|
|
804
|
+
$t.install = function(e) {
|
|
805
|
+
e.component($t.name, $t);
|
|
806
|
+
}, Nt.install = function(e) {
|
|
795
807
|
e.component(Nt.name, Nt);
|
|
796
808
|
}, Mt.install = function(e) {
|
|
797
809
|
e.component(Mt.name, Mt);
|
|
798
|
-
}, Bt.install = function(e) {
|
|
799
|
-
e.component(Bt.name, Bt);
|
|
800
810
|
};
|
|
801
|
-
const
|
|
811
|
+
const Is = { name: "cvCascaderBase", components: {}, props: { ...an.props, modelValue: { type: [String, Array, Number], default() {
|
|
802
812
|
} }, dataLists: { type: [Array], default: () => [] }, dataDisabled: { type: [Array], default: () => [] }, disabled: { type: Boolean, default: !1 }, placeholder: { type: [String, Number], default: "请选择" }, showAllLevels: { type: Boolean, default: !0 }, filterable: { type: Boolean, default: !0 }, dataField: { type: [Object], default: () => ({}) }, emitPath: { type: Boolean, default: !0 }, multiple: { type: Boolean, default: !1 } }, watch: { modelValue() {
|
|
803
813
|
this.localVal = this.modelValue;
|
|
804
814
|
}, dataLists: { handler() {
|
|
@@ -822,14 +832,14 @@ const Ls = { name: "cvCascaderBase", components: {}, props: { ...ln.props, model
|
|
|
822
832
|
}), i[a].children && l(i[a].children);
|
|
823
833
|
})(e), this.localOpt = e;
|
|
824
834
|
}, getCheckedNodes() {
|
|
825
|
-
} } },
|
|
835
|
+
} } }, Ls = { class: "cv-cascader-base block" }, Bt = V(Is, [["render", function(e, t, o, l, i, a) {
|
|
826
836
|
const n = C("el-cascader");
|
|
827
|
-
return
|
|
837
|
+
return r(), u("div", Ls, [b(n, O(e.$props, { props: a.props2, modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => i.localVal = c), options: i.localOpt, onChange: a.handleChange, onGetCheckedNodes: a.getCheckedNodes }), null, 16, ["props", "modelValue", "options", "onChange", "onGetCheckedNodes"])]);
|
|
828
838
|
}]]);
|
|
829
|
-
|
|
830
|
-
e.component(
|
|
839
|
+
Bt.install = function(e) {
|
|
840
|
+
e.component(Bt.name, Bt);
|
|
831
841
|
};
|
|
832
|
-
const
|
|
842
|
+
const Fl = { props: { ...ln.props, modelValue: { type: [String, Array, Number, Object, Date], default: null } }, watch: { modelValue: { handler() {
|
|
833
843
|
if (this.valueFormat != "timestamp") this.localVal = this.modelValue;
|
|
834
844
|
else if (Array.isArray(this.modelValue)) {
|
|
835
845
|
var e;
|
|
@@ -848,16 +858,16 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
848
858
|
this.$emit("update:modelValue", e);
|
|
849
859
|
} else isNaN(this.localVal) || this.localVal.toString().length != 13 || (e = parseInt(this.localVal / 1e3), this.modelValue != e && this.$emit("update:modelValue", e));
|
|
850
860
|
} }, data: () => ({ localVal: "" }), created() {
|
|
851
|
-
}, methods: {} },
|
|
861
|
+
}, methods: {} }, Et = V({ name: "cvTimeBase", mixins: [Fl], props: { format: { type: String, default: "HH:mm:ss" }, valueFormat: { type: String, default: "HH:mm:ss" }, placeholder: { type: [String, Number], default: "选择时间" } } }, [["render", function(e, t, o, l, i, a) {
|
|
852
862
|
const n = C("el-time-picker");
|
|
853
|
-
return
|
|
854
|
-
}]]),
|
|
863
|
+
return r(), S(n, O({ class: "cv-timePicker-base" }, e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), format: o.format, "picker-options": {} }), null, 16, ["modelValue", "format"]);
|
|
864
|
+
}]]), zt = V({ name: "cvTimeRange", mixins: [Fl], props: { format: { type: String, default: "HH:mm:ss" }, valueFormat: { type: String, default: "HH:mm:ss" }, startPlaceholder: { type: [String, Number], default: "开始时间" }, rangeSeparator: { type: [String, Number], default: "至" }, endPlaceholder: { type: [String, Number], default: "结束时间" } } }, [["render", function(e, t, o, l, i, a) {
|
|
855
865
|
const n = C("el-time-picker");
|
|
856
|
-
return
|
|
857
|
-
}]]),
|
|
866
|
+
return r(), S(n, O({ class: "cv-timePicker-range" }, e.$props, { "is-range": "", modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), format: o.format, "range-separator": o.rangeSeparator, "start-placeholder": o.startPlaceholder, "end-placeholder": o.endPlaceholder }), null, 16, ["modelValue", "format", "range-separator", "start-placeholder", "end-placeholder"]);
|
|
867
|
+
}]]), At = V({ name: "cvTimeSelect" }, [["render", function(e, t, o, l, i, a) {
|
|
858
868
|
const n = C("el-time-select");
|
|
859
|
-
return
|
|
860
|
-
}]]),
|
|
869
|
+
return r(), S(n, O({ class: "cv-time-select" }, e.$props), null, 16);
|
|
870
|
+
}]]), jo = { props: { ...nn.props, modelValue: { type: [String, Array, Number, Object, Date], default: null }, pickerOptions: { type: Boolean, default: !1 } }, watch: { modelValue: { handler() {
|
|
861
871
|
if (this.valueFormat != "timestamp") this.localVal = this.modelValue;
|
|
862
872
|
else if (Array.isArray(this.modelValue)) {
|
|
863
873
|
var e;
|
|
@@ -875,7 +885,7 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
875
885
|
}), this.modelValue && e[0] == this.modelValue[0] && e[1] == this.modelValue[1]) return;
|
|
876
886
|
this.$emit("update:modelValue", e);
|
|
877
887
|
} else isNaN(this.localVal) || this.localVal.toString().length != 13 || (e = parseInt(this.localVal / 1e3), this.modelValue != e && this.$emit("update:modelValue", e));
|
|
878
|
-
} }, data: () => ({ localVal: "" }) },
|
|
888
|
+
} }, data: () => ({ localVal: "" }) }, Ht = V({ name: "cvDateBase", mixins: [jo], props: { format: { type: String, default: "YYYY-MM-DD" }, valueFormat: { type: String, default: "YYYY-MM-DD" }, placeholder: { type: [String, Number], default: "选择日期" } }, data: () => ({ localPickerOptions: { disabledDate: (e) => e.getTime() > Date.now(), shortcuts: [{ text: "今天", onClick(e) {
|
|
879
889
|
e.$emit("pick", /* @__PURE__ */ new Date());
|
|
880
890
|
} }, { text: "昨天", onClick(e) {
|
|
881
891
|
const t = /* @__PURE__ */ new Date();
|
|
@@ -897,8 +907,8 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
897
907
|
t.setTime(t.getTime() - 31536e6), e.$emit("pick", t);
|
|
898
908
|
} }] } }) }, [["render", function(e, t, o, l, i, a) {
|
|
899
909
|
const n = C("el-date-picker");
|
|
900
|
-
return
|
|
901
|
-
}]]),
|
|
910
|
+
return r(), S(n, O(e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), type: "date", "value-format": o.valueFormat, placeholder: o.placeholder, "picker-options": e.pickerOptions && i.localPickerOptions }), null, 16, ["modelValue", "value-format", "placeholder", "picker-options"]);
|
|
911
|
+
}]]), Pt = V({ name: "cvDateRange", mixins: [jo], props: { valueFormat: { type: String, default: "yyyy-MM-dd" }, startPlaceholder: { type: [String, Number], default: "开始日期" }, rangeSeparator: { type: [String, Number], default: "至" }, endPlaceholder: { type: [String, Number], default: "结束日期" } }, data: () => ({ localPickerOptions: { shortcuts: [{ text: "今天", onClick(e) {
|
|
902
912
|
const t = /* @__PURE__ */ new Date(), o = /* @__PURE__ */ new Date();
|
|
903
913
|
e.$emit("pick", [o, t]);
|
|
904
914
|
} }, { text: "昨天", onClick(e) {
|
|
@@ -921,8 +931,8 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
921
931
|
o.setTime(o.getTime() - 31536e6), e.$emit("pick", [o, t]);
|
|
922
932
|
} }] } }) }, [["render", function(e, t, o, l, i, a) {
|
|
923
933
|
const n = C("el-date-picker");
|
|
924
|
-
return
|
|
925
|
-
}]]),
|
|
934
|
+
return r(), S(n, O(e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), type: "daterange", "value-format": o.valueFormat, "range-separator": o.rangeSeparator, "start-placeholder": o.startPlaceholder, "end-placeholder": o.endPlaceholder, "picker-options": e.pickerOptions && i.localPickerOptions }), null, 16, ["modelValue", "value-format", "range-separator", "start-placeholder", "end-placeholder", "picker-options"]);
|
|
935
|
+
}]]), jt = V({ name: "cvDatetimeBase", mixins: [jo], props: { format: { type: String, default: "YYYY-MM-DD HH:mm:ss" }, valueFormat: { type: String, default: "YYYY-MM-DD HH:mm:ss" }, placeholder: { type: [String, Number], default: "选择日期时间" } }, data: () => ({ localPickerOptions: { disabledDate: (e) => e.getTime() > Date.now(), shortcuts: [{ text: "今天", onClick(e) {
|
|
926
936
|
e.$emit("pick", /* @__PURE__ */ new Date());
|
|
927
937
|
} }, { text: "昨天", onClick(e) {
|
|
928
938
|
const t = /* @__PURE__ */ new Date();
|
|
@@ -944,8 +954,8 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
944
954
|
t.setTime(t.getTime() - 31536e6), e.$emit("pick", t);
|
|
945
955
|
} }] } }) }, [["render", function(e, t, o, l, i, a) {
|
|
946
956
|
const n = C("el-date-picker");
|
|
947
|
-
return
|
|
948
|
-
}]]),
|
|
957
|
+
return r(), S(n, O(e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), type: "datetime", "value-format": o.valueFormat, placeholder: o.placeholder, "picker-options": e.pickerOptions && i.localPickerOptions }), null, 16, ["modelValue", "value-format", "placeholder", "picker-options"]);
|
|
958
|
+
}]]), Rt = V({ name: "cvDatetimeRange", mixins: [jo], props: { valueFormat: { type: String, default: "YYYY-MM-DD HH:mm:ss" }, startPlaceholder: { type: [String, Number], default: "开始日期" }, rangeSeparator: { type: [String, Number], default: "至" }, endPlaceholder: { type: [String, Number], default: "结束日期" } }, data: () => ({ localPickerOptions: { shortcuts: [{ text: "今天", onClick(e) {
|
|
949
959
|
const t = /* @__PURE__ */ new Date(), o = /* @__PURE__ */ new Date();
|
|
950
960
|
e.$emit("pick", [o, t]);
|
|
951
961
|
} }, { text: "昨天", onClick(e) {
|
|
@@ -968,8 +978,8 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
968
978
|
o.setTime(o.getTime() - 31536e6), e.$emit("pick", [o, t]);
|
|
969
979
|
} }] } }) }, [["render", function(e, t, o, l, i, a) {
|
|
970
980
|
const n = C("el-date-picker");
|
|
971
|
-
return
|
|
972
|
-
}]]),
|
|
981
|
+
return r(), S(n, O(e.$props, { modelValue: e.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => e.localVal = c), type: "datetimerange", "value-format": o.valueFormat, "range-separator": o.rangeSeparator, "start-placeholder": o.startPlaceholder, "end-placeholder": o.endPlaceholder, align: "right", "picker-options": e.pickerOptions && i.localPickerOptions }), null, 16, ["modelValue", "value-format", "range-separator", "start-placeholder", "end-placeholder", "picker-options"]);
|
|
982
|
+
}]]), Ut = V({ name: "cvDatetimeScreen", props: { start: { type: String, default: null }, end: { type: String, default: null }, autoUpdate: { type: Boolean, default: !0 } }, emits: ["update:start", "update:end", "change"], data() {
|
|
973
983
|
return { defaultTime: [new Date(2e3, 0, 1, 0, 0, 0), new Date(2e3, 0, 1, 23, 59, 59)], internalValue: [this.start || "", this.end || ""] };
|
|
974
984
|
}, watch: { start(e) {
|
|
975
985
|
e !== null && e !== "" || this.end !== null && this.end !== "" ? this.internalValue[0] = e : this.internalValue = [null, null];
|
|
@@ -1007,9 +1017,11 @@ const Ol = { props: { ...nn.props, modelValue: { type: [String, Array, Number, O
|
|
|
1007
1017
|
this.syncInternalValue();
|
|
1008
1018
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
1009
1019
|
const n = C("el-date-picker");
|
|
1010
|
-
return
|
|
1020
|
+
return r(), S(n, { modelValue: i.internalValue, "onUpdate:modelValue": t[0] || (t[0] = (c) => i.internalValue = c), type: "datetimerange", shortcuts: a.refinedShortcuts, "range-separator": "至", "start-placeholder": "开始时间", "end-placeholder": "结束时间", "value-format": "YYYY-MM-DD HH:mm:ss", "default-time": i.defaultTime, onChange: a.handleDateChange, onCalendarChange: a.handleCalendarChange, clearable: "", class: "screen-date-picker" }, null, 8, ["modelValue", "shortcuts", "default-time", "onChange", "onCalendarChange"]);
|
|
1011
1021
|
}]]);
|
|
1012
|
-
|
|
1022
|
+
Et.install = function(e) {
|
|
1023
|
+
e.component(Et.name, Et);
|
|
1024
|
+
}, zt.install = function(e) {
|
|
1013
1025
|
e.component(zt.name, zt);
|
|
1014
1026
|
}, At.install = function(e) {
|
|
1015
1027
|
e.component(At.name, At);
|
|
@@ -1023,10 +1035,8 @@ zt.install = function(e) {
|
|
|
1023
1035
|
e.component(Rt.name, Rt);
|
|
1024
1036
|
}, Ut.install = function(e) {
|
|
1025
1037
|
e.component(Ut.name, Ut);
|
|
1026
|
-
}, Wt.install = function(e) {
|
|
1027
|
-
e.component(Wt.name, Wt);
|
|
1028
1038
|
};
|
|
1029
|
-
const
|
|
1039
|
+
const Wt = V({ name: "cvSwitchBase", props: { ...sn.props, activeColor: { type: [String], default: "" }, inactiveColor: { type: [String], default: "" }, disabled: { type: Boolean, default: !1 } }, watch: { modelValue() {
|
|
1030
1040
|
this.localVal = this.modelValue;
|
|
1031
1041
|
}, localVal() {
|
|
1032
1042
|
this.$emit("update:modelValue", this.localVal);
|
|
@@ -1036,12 +1046,12 @@ const Yt = V({ name: "cvSwitchBase", props: { ...rn.props, activeColor: { type:
|
|
|
1036
1046
|
this.localVal = this.modelValue;
|
|
1037
1047
|
}, methods: {} }, [["render", function(e, t, o, l, i, a) {
|
|
1038
1048
|
const n = C("el-switch");
|
|
1039
|
-
return
|
|
1049
|
+
return r(), S(n, O(e.$props, { modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (c) => i.localVal = c) }), null, 16, ["modelValue"]);
|
|
1040
1050
|
}]]);
|
|
1041
|
-
|
|
1042
|
-
e.component(
|
|
1051
|
+
Wt.install = function(e) {
|
|
1052
|
+
e.component(Wt.name, Wt);
|
|
1043
1053
|
};
|
|
1044
|
-
const
|
|
1054
|
+
const Yt = V({ name: "cvCodeSms", mixins: [], components: {}, props: { ...Eo.props, maxlength: { type: [Number, String], default: 6 }, modelValue: { type: [Number, String], default: "" }, placeholder: { type: [Number, String], default: "请输入验证码" }, disabled: { type: Boolean, default: !1 }, mobile: { type: [Number, String], default: "" }, mobileParam: { type: String, default: "mobile" }, codeUrl: { type: String, default: "" }, codeSign: { type: Boolean, default: !1 }, apiFunc: { type: Function, default: null }, waitTime: { type: [Number, String], default: 60 } }, watch: { mobile(e) {
|
|
1045
1055
|
this.localMobile = e;
|
|
1046
1056
|
}, modelValue(e) {
|
|
1047
1057
|
this.localVal = e;
|
|
@@ -1074,19 +1084,19 @@ const Xt = V({ name: "cvCodeSms", mixins: [], components: {}, props: { ...zo.pro
|
|
|
1074
1084
|
}, updateInput(e) {
|
|
1075
1085
|
this.$emit("update:modelValue", this.localVal);
|
|
1076
1086
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
1077
|
-
const n = C("el-button"),
|
|
1078
|
-
return
|
|
1087
|
+
const n = C("el-button"), c = C("el-input");
|
|
1088
|
+
return r(), S(c, O(e.$props, { modelValue: i.localVal, "onUpdate:modelValue": t[0] || (t[0] = (p) => i.localVal = p), clearable: "", placeholder: i.diyPlaceholder, onInput: a.updateInput }), { append: v(() => [b(n, { onClick: a.getSmsCode, disabled: i.btnDisabled }, { default: v(() => [F(L(i.btnText), 1)]), _: 1 }, 8, ["onClick", "disabled"])]), _: 1 }, 16, ["modelValue", "placeholder", "onInput"]);
|
|
1079
1089
|
}]]);
|
|
1080
|
-
|
|
1081
|
-
e.component(
|
|
1090
|
+
Yt.install = function(e) {
|
|
1091
|
+
e.component(Yt.name, Yt);
|
|
1082
1092
|
};
|
|
1083
|
-
const
|
|
1084
|
-
return
|
|
1093
|
+
const Ds = { props: { fileType: { type: [Array], default: [] }, fileSize: { type: [Number], default: 2 }, fileUnit: { type: [String], default: "" }, multiple: { type: [Boolean], default: !1 }, limit: { type: [Number], default: 5 } } }, Ts = { class: "cv-upload-tip-box" }, Fs = { key: 0 }, Os = { key: 1 }, Ro = { inheritAttrs: !1, emits: ["update:modelValue", "update:initValue", "delete", "error", "success"], components: { uploadTip: V(Ds, [["render", function(e, t, o, l, i, a) {
|
|
1094
|
+
return r(), u("div", Ts, [t[0] || (t[0] = d("span", null, "最多上传", -1)), d("b", null, L(o.limit), 1), d("span", null, L(o.fileUnit), 1), o.fileType.length ? (r(), u("b", Fs, L(o.fileType.length ? o.fileType.join("/") : ""), 1)) : w("", !0), o.fileType.length ? (r(), u("span", Os, "格式")) : w("", !0), d("span", null, "文件;且每" + L(o.fileUnit) + "不超过", 1), d("b", null, L(o.fileSize) + "MB", 1)]);
|
|
1085
1095
|
}]]) }, props: { multiple: { type: [Boolean], default: !1 }, limit: { type: [Number, String], default: 1 }, drag: { type: Boolean, default: !1 }, httpRequest: { type: [Function], default: () => {
|
|
1086
1096
|
} }, accept: String, beforeRemove: Function, upResponseFn: { type: [Function], default: null }, signatureFn: { type: Function, default: null }, signatureType: { type: [String], default: "aliyun_oss_type2" }, signatureParam: { type: [Object], default: () => ({}) } }, data: () => ({ cropShow: !1, upIngPercent: 0, upIngLoading: !1, upIngFileInfo: {} }), computed: { fileTypeStr() {
|
|
1087
1097
|
return this.fileType.join(",");
|
|
1088
1098
|
}, tipAttr() {
|
|
1089
|
-
return { fileType: this.fileType || [], fileSize: this.fileSize || "", multiple:
|
|
1099
|
+
return { fileType: this.fileType || [], fileSize: this.fileSize || "", multiple: this?.multiple || !1, limit: this.limit ? parseInt(this.limit) : 5 };
|
|
1090
1100
|
}, componentName() {
|
|
1091
1101
|
return this.$options.name;
|
|
1092
1102
|
}, mergeAttrs() {
|
|
@@ -1113,19 +1123,19 @@ const Ts = { props: { fileType: { type: [Array], default: [] }, fileSize: { type
|
|
|
1113
1123
|
}, initOnExceed() {
|
|
1114
1124
|
this.$message.error(`最多上传${this.limit}个文件`);
|
|
1115
1125
|
} } };
|
|
1116
|
-
function
|
|
1126
|
+
function qi(e) {
|
|
1117
1127
|
let t = e.lastIndexOf("/"), o = e.substring(t + 1, e.length), l = "";
|
|
1118
1128
|
return o.lastIndexOf(".") > -1 && (l = o.slice(o.lastIndexOf(".") + 1), l = "image/" + l), { name: o, url: e, type: l, status: "success" };
|
|
1119
1129
|
}
|
|
1120
|
-
function
|
|
1130
|
+
function de(e) {
|
|
1121
1131
|
return Math.pow(1024, e);
|
|
1122
1132
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return e ? e <
|
|
1133
|
+
function Ki(e) {
|
|
1134
|
+
return e ? e < de(1) ? e + " B" : e < de(2) ? (e / de(1)).toFixed(2) + " KB" : e < de(3) ? (e / de(2)).toFixed(2) + " MB" : e < de(4) ? (e / de(3)).toFixed(2) + " GB" : (e / de(4)).toFixed(2) + " TB" : "-";
|
|
1125
1135
|
}
|
|
1126
|
-
function
|
|
1136
|
+
function $s(e) {
|
|
1127
1137
|
if (!e) return !0;
|
|
1128
|
-
const t = e
|
|
1138
|
+
const t = e?.expiration_last;
|
|
1129
1139
|
if (!t) return !0;
|
|
1130
1140
|
const o = function(i) {
|
|
1131
1141
|
if (/^\d{8}T\d{6}Z$/.test(i)) {
|
|
@@ -1136,10 +1146,10 @@ function Ns(e) {
|
|
|
1136
1146
|
}(t), l = /* @__PURE__ */ new Date();
|
|
1137
1147
|
return !!isNaN(o.getTime()) || o.getTime() - l.getTime() <= 6e4;
|
|
1138
1148
|
}
|
|
1139
|
-
function
|
|
1149
|
+
function Ol(e) {
|
|
1140
1150
|
return e ? typeof e == "string" ? [e] : Object.prototype.toString.call(e) === "[object Object]" ? [] : [...e] : [];
|
|
1141
1151
|
}
|
|
1142
|
-
function
|
|
1152
|
+
function Gi(e, t) {
|
|
1143
1153
|
let o = [];
|
|
1144
1154
|
Array.isArray(e) && e.length > 0 && o.push(...e), Array.isArray(t) && t.length > 0 && o.push(...t), typeof t == "string" && o.push(t);
|
|
1145
1155
|
let l = [];
|
|
@@ -1149,33 +1159,33 @@ function Zi(e, t) {
|
|
|
1149
1159
|
}
|
|
1150
1160
|
return l;
|
|
1151
1161
|
}
|
|
1152
|
-
function
|
|
1162
|
+
function Bi(e) {
|
|
1153
1163
|
let t = [], o = Object.prototype.toString.call(e);
|
|
1154
|
-
if (o === "[object String]") t.push(
|
|
1164
|
+
if (o === "[object String]") t.push(qi(e));
|
|
1155
1165
|
else if (o === "[object Object]") e.name && e.url && t.push(e);
|
|
1156
1166
|
else if (o === "[object Array]") for (let l in e) {
|
|
1157
1167
|
let i = e[l], a = Object.prototype.toString.call(i);
|
|
1158
|
-
a === "[object String]" ? t.push(
|
|
1168
|
+
a === "[object String]" ? t.push(qi(i)) : a === "[object Object]" && i.name && i.url && t.push(i);
|
|
1159
1169
|
}
|
|
1160
1170
|
return t;
|
|
1161
1171
|
}
|
|
1162
|
-
async function
|
|
1172
|
+
async function Zi(e, t) {
|
|
1163
1173
|
if (!e || typeof e != "function") return !1;
|
|
1164
1174
|
let o = null;
|
|
1165
|
-
if (
|
|
1175
|
+
if ($s(o)) {
|
|
1166
1176
|
let l = await e({ ...t });
|
|
1167
|
-
if (!l || !l.data || l.status != 200) throw
|
|
1177
|
+
if (!l || !l.data || l.status != 200) throw q.error("获取STS令牌失败"), new Error(`获取STS令牌失败 ${l?.message}`);
|
|
1168
1178
|
o = l.data || {};
|
|
1169
1179
|
}
|
|
1170
1180
|
return { ...o, pass: !!o };
|
|
1171
1181
|
}
|
|
1172
|
-
async function
|
|
1182
|
+
async function Qi(e, t, o, l) {
|
|
1173
1183
|
e = e || "aliyun_oss_type2", l = l || {};
|
|
1174
|
-
const i = await
|
|
1175
|
-
if (!i.pass) return
|
|
1184
|
+
const i = await Zi(t, { upload_type: e, ...o });
|
|
1185
|
+
if (!i.pass) return q.error("获取oss上传凭证异常");
|
|
1176
1186
|
if (e == "oss_upload1") {
|
|
1177
1187
|
const a = { bucket: i.bucket, region: i.endpoint.split(".")[0], accessKeyId: i.accessKeyId, accessKeySecret: i.accessKeySecret, stsToken: i.securityToken, expiration: i.expiration, ...l, refreshSTSToken: async () => {
|
|
1178
|
-
const n = await
|
|
1188
|
+
const n = await Zi(t);
|
|
1179
1189
|
return { accessKeyId: n.accessKeyId, accessKeySecret: n.accessKeySecret, stsToken: n.securityToken };
|
|
1180
1190
|
}, refreshSTSTokenInterval: new Date(i.expiration) - /* @__PURE__ */ new Date() - 6e4 };
|
|
1181
1191
|
return new OSS(a);
|
|
@@ -1183,11 +1193,11 @@ async function Ji(e, t, o, l) {
|
|
|
1183
1193
|
if (e == "aliyun_oss_type2") return i;
|
|
1184
1194
|
throw new Error("上传类型错误");
|
|
1185
1195
|
}
|
|
1186
|
-
async function
|
|
1196
|
+
async function $l(e, t, o) {
|
|
1187
1197
|
let l = new FormData();
|
|
1188
1198
|
l.append("success_action_status", t.success_action_status || "200"), l.append("policy", t.policy), l.append("signature", t.signature), l.append("x-oss-signature", t.signature), l.append("x-oss-signature-version", "OSS4-HMAC-SHA256"), l.append("x-oss-credential", t.x_oss_credential), l.append("x-oss-date", t.x_oss_date), l.append("x-oss-security-token", t.security_token);
|
|
1189
1199
|
let i = t.key;
|
|
1190
|
-
if (t.key || (i = t.dir + "/" + e.name), l.append("key", i), t.callback && l.append("callback", t.callback), t.callback_var &&
|
|
1200
|
+
if (t.key || (i = t.dir + "/" + e.name), l.append("key", i), t.callback && l.append("callback", t.callback), t.callback_var && Ao(t.callback_var)) for (const a in t.callback_var) t.callback_var.hasOwnProperty(a) && l.append(a, t.callback_var[a]);
|
|
1191
1201
|
return l.append("file", e), fetch(t.host, { method: "POST", body: l, headers: {} }).then((a) => {
|
|
1192
1202
|
if (a.ok) return a.json();
|
|
1193
1203
|
}).then((a) => {
|
|
@@ -1195,8 +1205,8 @@ async function Nl(e, t, o) {
|
|
|
1195
1205
|
}).catch((a) => {
|
|
1196
1206
|
});
|
|
1197
1207
|
}
|
|
1198
|
-
async function
|
|
1199
|
-
if (!o || typeof o != "function") return
|
|
1208
|
+
async function Ei(e, t, o, l) {
|
|
1209
|
+
if (!o || typeof o != "function") return q.error("签名方法错误"), Promise.reject();
|
|
1200
1210
|
try {
|
|
1201
1211
|
let i = function() {
|
|
1202
1212
|
const p = /* @__PURE__ */ new Date();
|
|
@@ -1204,21 +1214,21 @@ async function zi(e, t, o, l) {
|
|
|
1204
1214
|
}(), a = function(p) {
|
|
1205
1215
|
if (!p) return "jpg";
|
|
1206
1216
|
const h = p.toLowerCase().trim();
|
|
1207
|
-
return
|
|
1217
|
+
return Tl.mimeToExtension[h] || "jpg";
|
|
1208
1218
|
}(e.type), n = `${i}.${a}`;
|
|
1209
|
-
const
|
|
1210
|
-
if (!
|
|
1211
|
-
if (
|
|
1219
|
+
const c = await o({ upload_type: t, ...l, save_extension: a }).then((p) => p.data || {}).catch((p) => (q.error("签名失败"), Promise.reject()));
|
|
1220
|
+
if (!c) return Promise.reject();
|
|
1221
|
+
if (c.name && (n = `${c.name}.${a}`), e instanceof Blob && (e = new File([e], n, { type: e.type, lastModified: Date.now() })), e) return await $l(e, c);
|
|
1212
1222
|
} catch {
|
|
1213
1223
|
return Promise.reject();
|
|
1214
1224
|
}
|
|
1215
1225
|
}
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1226
|
+
const Nl = {};
|
|
1227
|
+
Nl.getData = (e) => new Promise((t, o) => {
|
|
1218
1228
|
let l = {};
|
|
1219
1229
|
(function(i) {
|
|
1220
1230
|
let a = null;
|
|
1221
|
-
return new Promise((n,
|
|
1231
|
+
return new Promise((n, c) => {
|
|
1222
1232
|
if (i.src) if (/^data\:/i.test(i.src)) a = function(m, f) {
|
|
1223
1233
|
f = f || m.match(/^data\:([^\;]+)\;base64,/im)[1] || "", m = m.replace(/^data\:([^\;]+)\;base64,/gim, "");
|
|
1224
1234
|
for (var g = atob(m), k = g.length % 2 == 0 ? g.length : g.length + 1, x = new ArrayBuffer(k), y = new Uint16Array(x), _ = 0; _ < k; _++) y[_] = g.charCodeAt(_);
|
|
@@ -1243,13 +1253,13 @@ Ml.getData = (e) => new Promise((t, o) => {
|
|
|
1243
1253
|
a = h.response, n(a), h = null;
|
|
1244
1254
|
}, h.open("GET", i.src, !0), h.responseType = "arraybuffer", h.send(null);
|
|
1245
1255
|
}
|
|
1246
|
-
else
|
|
1256
|
+
else c("img error");
|
|
1247
1257
|
});
|
|
1248
1258
|
})(e).then((i) => {
|
|
1249
1259
|
l.arrayBuffer = i;
|
|
1250
1260
|
try {
|
|
1251
1261
|
l.orientation = function(a) {
|
|
1252
|
-
var n,
|
|
1262
|
+
var n, c, p, h, m, f, g, k, x, y, _ = new DataView(a), I = _.byteLength;
|
|
1253
1263
|
if (_.getUint8(0) === 255 && _.getUint8(1) === 216) for (x = 2; x < I; ) {
|
|
1254
1264
|
if (_.getUint8(x) === 255 && _.getUint8(x + 1) === 225) {
|
|
1255
1265
|
g = x;
|
|
@@ -1257,11 +1267,11 @@ Ml.getData = (e) => new Promise((t, o) => {
|
|
|
1257
1267
|
}
|
|
1258
1268
|
x++;
|
|
1259
1269
|
}
|
|
1260
|
-
if (g && (
|
|
1261
|
-
var
|
|
1262
|
-
for (
|
|
1263
|
-
return
|
|
1264
|
-
}(_,
|
|
1270
|
+
if (g && (c = g + 4, p = g + 10, function(E, P, j) {
|
|
1271
|
+
var W, ee = "";
|
|
1272
|
+
for (W = P, j += P; W < j; W++) ee += String.fromCharCode(E.getUint8(W));
|
|
1273
|
+
return ee;
|
|
1274
|
+
}(_, c, 4) === "Exif" && (f = _.getUint16(p), ((m = f === 18761) || f === 19789) && _.getUint16(p + 2, m) === 42 && (h = _.getUint32(p + 4, m), h >= 8 && (k = p + h)))), k) {
|
|
1265
1275
|
for (I = _.getUint16(k, m), y = 0; y < I; y++) if (x = k + 12 * y + 2, _.getUint16(x, m) === 274) {
|
|
1266
1276
|
x += 8, n = _.getUint16(x, m);
|
|
1267
1277
|
break;
|
|
@@ -1277,11 +1287,11 @@ Ml.getData = (e) => new Promise((t, o) => {
|
|
|
1277
1287
|
o(i);
|
|
1278
1288
|
});
|
|
1279
1289
|
});
|
|
1280
|
-
const
|
|
1290
|
+
const Ns = (e, t) => {
|
|
1281
1291
|
const o = e.__vccOpts || e;
|
|
1282
1292
|
for (const [l, i] of t) o[l] = i;
|
|
1283
1293
|
return o;
|
|
1284
|
-
},
|
|
1294
|
+
}, Ms = xl({ data: function() {
|
|
1285
1295
|
return { w: 0, h: 0, scale: 1, x: 0, y: 0, loading: !0, trueWidth: 0, trueHeight: 0, move: !0, moveX: 0, moveY: 0, crop: !1, cropping: !1, cropW: 0, cropH: 0, cropOldW: 0, cropOldH: 0, canChangeX: !1, canChangeY: !1, changeCropTypeX: 1, changeCropTypeY: 1, cropX: 0, cropY: 0, cropChangeX: 0, cropChangeY: 0, cropOffsertX: 0, cropOffsertY: 0, support: "", touches: [], touchNow: !1, rotate: 0, isIos: !1, orientation: 0, imgs: "", coe: 0.2, scaling: !1, scalingSet: "", coeStatus: "", isCanShow: !0, imgIsQqualCrop: !1 };
|
|
1286
1296
|
}, props: { img: { type: [String, Blob, null, File], default: "" }, outputSize: { type: Number, default: 1 }, outputType: { type: String, default: "jpeg" }, info: { type: Boolean, default: !0 }, canScale: { type: Boolean, default: !0 }, autoCrop: { type: Boolean, default: !1 }, autoCropWidth: { type: [Number, String], default: 0 }, autoCropHeight: { type: [Number, String], default: 0 }, fixed: { type: Boolean, default: !1 }, fixedNumber: { type: Array, default: () => [1, 1] }, fixedBox: { type: Boolean, default: !1 }, full: { type: Boolean, default: !1 }, canMove: { type: Boolean, default: !0 }, canMoveBox: { type: Boolean, default: !0 }, original: { type: Boolean, default: !1 }, centerBox: { type: Boolean, default: !1 }, high: { type: Boolean, default: !0 }, infoTrue: { type: Boolean, default: !1 }, maxImgSize: { type: [Number, String], default: 2e3 }, enlarge: { type: [Number, String], default: 1 }, preW: { type: [Number, String], default: 0 }, mode: { type: String, default: "contain" }, limitMinSize: { type: [Number, Array, String], default: () => 10, validator: function(e) {
|
|
1287
1297
|
return Array.isArray(e) ? Number(e[0]) >= 0 && Number(e[1]) >= 0 : Number(e) >= 0;
|
|
@@ -1338,8 +1348,8 @@ const Ms = (e, t) => {
|
|
|
1338
1348
|
} else {
|
|
1339
1349
|
const n = navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);
|
|
1340
1350
|
if (n) {
|
|
1341
|
-
let
|
|
1342
|
-
|
|
1351
|
+
let c = n[1];
|
|
1352
|
+
c = c.split("_"), (c[0] > 13 || c[0] >= 13 && c[1] >= 4) && (t = -1);
|
|
1343
1353
|
}
|
|
1344
1354
|
}
|
|
1345
1355
|
let i = document.createElement("canvas"), a = i.getContext("2d");
|
|
@@ -1369,8 +1379,8 @@ const Ms = (e, t) => {
|
|
|
1369
1379
|
i.width = o, i.height = l;
|
|
1370
1380
|
}
|
|
1371
1381
|
a.drawImage(e, 0, 0, o, l), a.restore(), i.toBlob((n) => {
|
|
1372
|
-
let
|
|
1373
|
-
URL.revokeObjectURL(this.imgs), this.imgs =
|
|
1382
|
+
let c = URL.createObjectURL(n);
|
|
1383
|
+
URL.revokeObjectURL(this.imgs), this.imgs = c;
|
|
1374
1384
|
}, "image/" + this.outputType, 1);
|
|
1375
1385
|
}, checkedImg() {
|
|
1376
1386
|
if (this.img === null || this.img === "") return this.imgs = "", void this.clearCrop();
|
|
@@ -1379,7 +1389,7 @@ const Ms = (e, t) => {
|
|
|
1379
1389
|
if (e.onload = () => {
|
|
1380
1390
|
if (this.img === "") return this.$emit("img-load", new Error("图片不能为空")), !1;
|
|
1381
1391
|
let o = e.width, l = e.height;
|
|
1382
|
-
|
|
1392
|
+
Nl.getData(e).then((i) => {
|
|
1383
1393
|
this.orientation = i.orientation || 1;
|
|
1384
1394
|
let a = Number(this.maxImgSize);
|
|
1385
1395
|
!this.orientation && o < a & l < a ? this.imgs = this.img : (o > a && (l = l / o * a, o = a), l > a && (o = o / l * a, l = a), this.checkOrientationImage(e, this.orientation, o, l));
|
|
@@ -1403,7 +1413,7 @@ const Ms = (e, t) => {
|
|
|
1403
1413
|
}, touchScale(e) {
|
|
1404
1414
|
e.preventDefault();
|
|
1405
1415
|
let t = this.scale;
|
|
1406
|
-
var o = this.touches[0].clientX, l = this.touches[0].clientY, i = e.touches[0].clientX, a = e.touches[0].clientY, n = this.touches[1].clientX,
|
|
1416
|
+
var o = this.touches[0].clientX, l = this.touches[0].clientY, i = e.touches[0].clientX, a = e.touches[0].clientY, n = this.touches[1].clientX, c = this.touches[1].clientY, p = e.touches[1].clientX, h = e.touches[1].clientY, m = Math.sqrt(Math.pow(o - n, 2) + Math.pow(l - c, 2)), f = Math.sqrt(Math.pow(i - p, 2) + Math.pow(a - h, 2)) - m, g = 1, k = (g = (g = g / this.trueWidth > g / this.trueHeight ? g / this.trueHeight : g / this.trueWidth) > 0.1 ? 0.1 : g) * f;
|
|
1407
1417
|
if (!this.touchNow) {
|
|
1408
1418
|
if (this.touchNow = !0, f > 0 ? t += Math.abs(k) : f < 0 && t > Math.abs(k) && (t -= Math.abs(k)), this.touches = e.touches, setTimeout(() => {
|
|
1409
1419
|
this.touchNow = !1;
|
|
@@ -1417,18 +1427,18 @@ const Ms = (e, t) => {
|
|
|
1417
1427
|
let t, o, l = "clientX" in e ? e.clientX : e.touches[0].clientX, i = "clientY" in e ? e.clientY : e.touches[0].clientY;
|
|
1418
1428
|
t = l - this.moveX, o = i - this.moveY, this.$nextTick(() => {
|
|
1419
1429
|
if (this.centerBox) {
|
|
1420
|
-
let a, n,
|
|
1430
|
+
let a, n, c, p, h = this.getImgAxis(t, o, this.scale), m = this.getCropAxis(), f = this.trueHeight * this.scale, g = this.trueWidth * this.scale;
|
|
1421
1431
|
switch (this.rotate) {
|
|
1422
1432
|
case 1:
|
|
1423
1433
|
case -1:
|
|
1424
1434
|
case 3:
|
|
1425
1435
|
case -3:
|
|
1426
|
-
a = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2 + (f - g) / 2, n = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2 + (g - f) / 2,
|
|
1436
|
+
a = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2 + (f - g) / 2, n = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2 + (g - f) / 2, c = a - f + this.cropW, p = n - g + this.cropH;
|
|
1427
1437
|
break;
|
|
1428
1438
|
default:
|
|
1429
|
-
a = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2, n = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2,
|
|
1439
|
+
a = this.cropOffsertX - this.trueWidth * (1 - this.scale) / 2, n = this.cropOffsertY - this.trueHeight * (1 - this.scale) / 2, c = a - g + this.cropW, p = n - f + this.cropH;
|
|
1430
1440
|
}
|
|
1431
|
-
h.x1 >= m.x1 && (t = a), h.y1 >= m.y1 && (o = n), h.x2 <= m.x2 && (t =
|
|
1441
|
+
h.x1 >= m.x1 && (t = a), h.y1 >= m.y1 && (o = n), h.x2 <= m.x2 && (t = c), h.y2 <= m.y2 && (o = p);
|
|
1432
1442
|
}
|
|
1433
1443
|
this.x = t, this.y = o, this.$emit("img-moving", { moving: !0, axis: this.getImgAxis() });
|
|
1434
1444
|
});
|
|
@@ -1476,16 +1486,16 @@ const Ms = (e, t) => {
|
|
|
1476
1486
|
let h = this.getImgAxis(), m = h.x2, f = h.y2;
|
|
1477
1487
|
a = h.x1 > 0 ? h.x1 : 0, n = h.y1 > 0 ? h.y1 : 0, l > m && (l = m), i > f && (i = f);
|
|
1478
1488
|
}
|
|
1479
|
-
const [
|
|
1489
|
+
const [c, p] = this.checkCropLimitSize();
|
|
1480
1490
|
this.$nextTick(() => {
|
|
1481
1491
|
var h = t - this.cropX, m = o - this.cropY;
|
|
1482
|
-
if (this.canChangeX && (this.changeCropTypeX === 1 ? this.cropOldW - h <
|
|
1492
|
+
if (this.canChangeX && (this.changeCropTypeX === 1 ? this.cropOldW - h < c ? (this.cropW = c, this.cropOffsertX = this.cropOldW + this.cropChangeX - a - c) : this.cropOldW - h > 0 ? (this.cropW = l - this.cropChangeX - h <= l - a ? this.cropOldW - h : this.cropOldW + this.cropChangeX - a, this.cropOffsertX = l - this.cropChangeX - h <= l - a ? this.cropChangeX + h : a) : (this.cropW = Math.abs(h) + this.cropChangeX <= l ? Math.abs(h) - this.cropOldW : l - this.cropOldW - this.cropChangeX, this.cropOffsertX = this.cropChangeX + this.cropOldW) : this.changeCropTypeX === 2 && (this.cropOldW + h < c ? this.cropW = c : this.cropOldW + h > 0 ? (this.cropW = this.cropOldW + h + this.cropOffsertX <= l ? this.cropOldW + h : l - this.cropOffsertX, this.cropOffsertX = this.cropChangeX) : (this.cropW = l - this.cropChangeX + Math.abs(h + this.cropOldW) <= l - a ? Math.abs(h + this.cropOldW) : this.cropChangeX - a, this.cropOffsertX = l - this.cropChangeX + Math.abs(h + this.cropOldW) <= l - a ? this.cropChangeX - Math.abs(h + this.cropOldW) : a))), this.canChangeY && (this.changeCropTypeY === 1 ? this.cropOldH - m < p ? (this.cropH = p, this.cropOffsertY = this.cropOldH + this.cropChangeY - n - p) : this.cropOldH - m > 0 ? (this.cropH = i - this.cropChangeY - m <= i - n ? this.cropOldH - m : this.cropOldH + this.cropChangeY - n, this.cropOffsertY = i - this.cropChangeY - m <= i - n ? this.cropChangeY + m : n) : (this.cropH = Math.abs(m) + this.cropChangeY <= i ? Math.abs(m) - this.cropOldH : i - this.cropOldH - this.cropChangeY, this.cropOffsertY = this.cropChangeY + this.cropOldH) : this.changeCropTypeY === 2 && (this.cropOldH + m < p ? this.cropH = p : this.cropOldH + m > 0 ? (this.cropH = this.cropOldH + m + this.cropOffsertY <= i ? this.cropOldH + m : i - this.cropOffsertY, this.cropOffsertY = this.cropChangeY) : (this.cropH = i - this.cropChangeY + Math.abs(m + this.cropOldH) <= i - n ? Math.abs(m + this.cropOldH) : this.cropChangeY - n, this.cropOffsertY = i - this.cropChangeY + Math.abs(m + this.cropOldH) <= i - n ? this.cropChangeY - Math.abs(m + this.cropOldH) : n))), this.canChangeX && this.fixed) {
|
|
1483
1493
|
var f = this.cropW / this.fixedNumber[0] * this.fixedNumber[1];
|
|
1484
1494
|
f < p ? (this.cropH = p, this.cropW = this.fixedNumber[0] * p / this.fixedNumber[1], this.changeCropTypeX === 1 && (this.cropOffsertX = this.cropChangeX + (this.cropOldW - this.cropW))) : f + this.cropOffsertY > i ? (this.cropH = i - this.cropOffsertY, this.cropW = this.cropH / this.fixedNumber[1] * this.fixedNumber[0], this.changeCropTypeX === 1 && (this.cropOffsertX = this.cropChangeX + (this.cropOldW - this.cropW))) : this.cropH = f;
|
|
1485
1495
|
}
|
|
1486
1496
|
if (this.canChangeY && this.fixed) {
|
|
1487
1497
|
var g = this.cropH / this.fixedNumber[1] * this.fixedNumber[0];
|
|
1488
|
-
g <
|
|
1498
|
+
g < c ? (this.cropW = c, this.cropH = this.fixedNumber[1] * c / this.fixedNumber[0], this.cropOffsertY = this.cropOldH + this.cropChangeY - this.cropH) : g + this.cropOffsertX > l ? (this.cropW = l - this.cropOffsertX, this.cropH = this.cropW / this.fixedNumber[0] * this.fixedNumber[1]) : this.cropW = g;
|
|
1489
1499
|
}
|
|
1490
1500
|
});
|
|
1491
1501
|
}, checkCropLimitSize() {
|
|
@@ -1495,8 +1505,8 @@ const Ms = (e, t) => {
|
|
|
1495
1505
|
window.removeEventListener("mousemove", this.changeCropNow), window.removeEventListener("mouseup", this.changeCropEnd), window.removeEventListener("touchmove", this.changeCropNow), window.removeEventListener("touchend", this.changeCropEnd);
|
|
1496
1506
|
}, calculateSize(e, t, o, l, i, a) {
|
|
1497
1507
|
const n = e / t;
|
|
1498
|
-
let
|
|
1499
|
-
return
|
|
1508
|
+
let c = i, p = a;
|
|
1509
|
+
return c < o && (c = o, p = Math.ceil(c / n)), p < l && (p = l, c = Math.ceil(p * n), c < o && (c = o, p = Math.ceil(c / n))), c < i && (c = i, p = Math.ceil(c / n)), p < a && (p = a, c = Math.ceil(p * n)), { width: c, height: p };
|
|
1500
1510
|
}, endCrop() {
|
|
1501
1511
|
this.cropW === 0 && this.cropH === 0 && (this.cropping = !1);
|
|
1502
1512
|
let [e, t] = this.checkCropLimitSize();
|
|
@@ -1517,8 +1527,8 @@ const Ms = (e, t) => {
|
|
|
1517
1527
|
}, moveCrop(e, t) {
|
|
1518
1528
|
let o = 0, l = 0;
|
|
1519
1529
|
e && (e.preventDefault(), o = "clientX" in e ? e.clientX : e.touches[0].clientX, l = "clientY" in e ? e.clientY : e.touches[0].clientY), this.$nextTick(() => {
|
|
1520
|
-
let i, a, n = o - this.cropX,
|
|
1521
|
-
if (t && (n = this.cropOffsertX,
|
|
1530
|
+
let i, a, n = o - this.cropX, c = l - this.cropY;
|
|
1531
|
+
if (t && (n = this.cropOffsertX, c = this.cropOffsertY), i = n <= 0 ? 0 : n + this.cropW > this.w ? this.w - this.cropW : n, a = c <= 0 ? 0 : c + this.cropH > this.h ? this.h - this.cropH : c, this.centerBox) {
|
|
1522
1532
|
let p = this.getImgAxis();
|
|
1523
1533
|
i <= p.x1 && (i = p.x1), i + this.cropW > p.x2 && (i = p.x2 - this.cropW), a <= p.y1 && (a = p.y1), a + this.cropH > p.y2 && (a = p.y2 - this.cropH);
|
|
1524
1534
|
}
|
|
@@ -1547,12 +1557,12 @@ const Ms = (e, t) => {
|
|
|
1547
1557
|
}, leaveCrop(e) {
|
|
1548
1558
|
window.removeEventListener("mousemove", this.moveCrop), window.removeEventListener("mouseup", this.leaveCrop), window.removeEventListener("touchmove", this.moveCrop), window.removeEventListener("touchend", this.leaveCrop), this.$emit("crop-moving", { moving: !1, axis: this.getCropAxis() });
|
|
1549
1559
|
}, getCropChecked(e) {
|
|
1550
|
-
let t = document.createElement("canvas"), o = t.getContext("2d"), l = new Image(), i = this.rotate, a = this.trueWidth, n = this.trueHeight,
|
|
1560
|
+
let t = document.createElement("canvas"), o = t.getContext("2d"), l = new Image(), i = this.rotate, a = this.trueWidth, n = this.trueHeight, c = this.cropOffsertX, p = this.cropOffsertY;
|
|
1551
1561
|
l.onload = () => {
|
|
1552
1562
|
if (this.cropW !== 0) {
|
|
1553
1563
|
let f = 1;
|
|
1554
1564
|
this.high & !this.full && (f = window.devicePixelRatio), this.enlarge !== 1 & !this.full && (f = Math.abs(Number(this.enlarge)));
|
|
1555
|
-
let g = this.cropW * f, k = this.cropH * f, x = a * this.scale * f, y = n * this.scale * f, _ = (this.x -
|
|
1565
|
+
let g = this.cropW * f, k = this.cropH * f, x = a * this.scale * f, y = n * this.scale * f, _ = (this.x - c + this.trueWidth * (1 - this.scale) / 2) * f, I = (this.y - p + this.trueHeight * (1 - this.scale) / 2) * f;
|
|
1556
1566
|
switch (m(g, k), o.save(), i) {
|
|
1557
1567
|
case 0:
|
|
1558
1568
|
this.full ? (m(g / this.scale, k / this.scale), o.drawImage(l, _ / this.scale, I / this.scale, x / this.scale, y / this.scale)) : o.drawImage(l, _, I, x, y);
|
|
@@ -1653,8 +1663,8 @@ const Ms = (e, t) => {
|
|
|
1653
1663
|
if (i.search("px") !== -1) {
|
|
1654
1664
|
i = i.replace("px", ""), t = parseFloat(i);
|
|
1655
1665
|
const a = t / this.trueWidth;
|
|
1656
|
-
let n = 1,
|
|
1657
|
-
|
|
1666
|
+
let n = 1, c = l[1];
|
|
1667
|
+
c.search("px") !== -1 && (c = c.replace("px", ""), o = parseFloat(c), n = o / this.trueHeight), e = Math.min(a, n);
|
|
1658
1668
|
}
|
|
1659
1669
|
if (i.search("%") !== -1 && (i = i.replace("%", ""), t = parseFloat(i) / 100 * this.w, e = t / this.trueWidth), l.length === 2 && i === "auto") {
|
|
1660
1670
|
let a = l[1];
|
|
@@ -1671,8 +1681,8 @@ const Ms = (e, t) => {
|
|
|
1671
1681
|
let o = this.w, l = this.h;
|
|
1672
1682
|
if (this.centerBox) {
|
|
1673
1683
|
const n = Math.abs(this.rotate) % 2 > 0;
|
|
1674
|
-
let
|
|
1675
|
-
o =
|
|
1684
|
+
let c = (n ? this.trueHeight : this.trueWidth) * this.scale, p = (n ? this.trueWidth : this.trueHeight) * this.scale;
|
|
1685
|
+
o = c < o ? c : o, l = p < l ? p : l;
|
|
1676
1686
|
}
|
|
1677
1687
|
var i = e || parseFloat(this.autoCropWidth), a = t || parseFloat(this.autoCropHeight);
|
|
1678
1688
|
(i === 0 || a === 0) && (i = 0.8 * o, a = 0.8 * l), i = i > o ? o : i, a = a > l ? l : a, this.fixed && (a = i / this.fixedNumber[0] * this.fixedNumber[1]), a > this.h && (i = (a = this.h) / this.fixedNumber[1] * this.fixedNumber[0]), this.changeCrop(i, a);
|
|
@@ -1706,7 +1716,7 @@ const Ms = (e, t) => {
|
|
|
1706
1716
|
let l = this.trueWidth, i = this.trueHeight, a = l * o, n = i * o;
|
|
1707
1717
|
if (a >= this.cropW && n >= this.cropH) this.scale = o;
|
|
1708
1718
|
else {
|
|
1709
|
-
const
|
|
1719
|
+
const c = this.cropW / l, p = this.cropH / i, h = this.cropH <= i * c ? c : p;
|
|
1710
1720
|
this.scale = h, a = l * h, n = i * h;
|
|
1711
1721
|
}
|
|
1712
1722
|
this.imgIsQqualCrop || (e.x1 >= t.x1 && (this.isRotateRightOrLeft ? this.x = t.x1 - (l - a) / 2 - (a - n) / 2 : this.x = t.x1 - (l - a) / 2), e.x2 <= t.x2 && (this.isRotateRightOrLeft ? this.x = t.x1 - (l - a) / 2 - (a - n) / 2 - n + this.cropW : this.x = t.x2 - (l - a) / 2 - a), e.y1 >= t.y1 && (this.isRotateRightOrLeft ? this.y = t.y1 - (i - n) / 2 - (n - a) / 2 : this.y = t.y1 - (i - n) / 2), e.y2 <= t.y2 && (this.isRotateRightOrLeft ? this.y = t.y2 - (i - n) / 2 - (n - a) / 2 - a : this.y = t.y2 - (i - n) / 2 - n)), (a < this.cropW || n < this.cropH) && (this.imgIsQqualCrop = !0);
|
|
@@ -1715,14 +1725,14 @@ const Ms = (e, t) => {
|
|
|
1715
1725
|
let e = this;
|
|
1716
1726
|
var t = navigator.userAgent;
|
|
1717
1727
|
this.isIOS = !!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), HTMLCanvasElement.prototype.toBlob || Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", { value: function(o, l, i) {
|
|
1718
|
-
for (var a = atob(this.toDataURL(l, i).split(",")[1]), n = a.length,
|
|
1719
|
-
o(new Blob([
|
|
1728
|
+
for (var a = atob(this.toDataURL(l, i).split(",")[1]), n = a.length, c = new Uint8Array(n), p = 0; p < n; p++) c[p] = a.charCodeAt(p);
|
|
1729
|
+
o(new Blob([c], { type: e.type || "image/png" }));
|
|
1720
1730
|
} }), this.showPreview(), this.checkedImg();
|
|
1721
1731
|
}, unmounted() {
|
|
1722
1732
|
window.removeEventListener("mousemove", this.moveCrop), window.removeEventListener("mouseup", this.leaveCrop), window.removeEventListener("touchmove", this.moveCrop), window.removeEventListener("touchend", this.leaveCrop), this.cancelScale();
|
|
1723
|
-
} }),
|
|
1724
|
-
return
|
|
1725
|
-
}], ["__scopeId", "data-v-a742df44"]]),
|
|
1733
|
+
} }), Bs = { key: 0, class: "cropper-box" }, Es = ["src"], zs = { class: "cropper-view-box" }, As = ["src"], Hs = { key: 1 }, Ps = Ns(Ms, [["render", function(e, t, o, l, i, a) {
|
|
1734
|
+
return r(), u("div", { class: "vue-cropper", ref: "cropper", onMouseover: t[28] || (t[28] = (...n) => e.scaleImg && e.scaleImg(...n)), onMouseout: t[29] || (t[29] = (...n) => e.cancelScale && e.cancelScale(...n)) }, [e.imgs ? (r(), u("div", Bs, [N(d("div", { class: "cropper-box-canvas", style: A({ width: e.trueWidth + "px", height: e.trueHeight + "px", transform: "scale(" + e.scale + "," + e.scale + ") translate3d(" + e.x / e.scale + "px," + e.y / e.scale + "px,0)rotateZ(" + 90 * e.rotate + "deg)" }) }, [d("img", { src: e.imgs, alt: "cropper-img", ref: "cropperImg" }, null, 8, Es)], 4), [[H, !e.loading]])])) : w("", !0), d("div", { class: z(["cropper-drag-box", { "cropper-move": e.move && !e.crop, "cropper-crop": e.crop, "cropper-modal": e.cropping }]), onMousedown: t[0] || (t[0] = (...n) => e.startMove && e.startMove(...n)), onTouchstart: t[1] || (t[1] = (...n) => e.startMove && e.startMove(...n)) }, null, 34), N(d("div", { class: "cropper-crop-box", style: A({ width: e.cropW + "px", height: e.cropH + "px", transform: "translate3d(" + e.cropOffsertX + "px," + e.cropOffsertY + "px,0)" }) }, [d("span", zs, [d("img", { style: A({ width: e.trueWidth + "px", height: e.trueHeight + "px", transform: "scale(" + e.scale + "," + e.scale + ") translate3d(" + (e.x - e.cropOffsertX) / e.scale + "px," + (e.y - e.cropOffsertY) / e.scale + "px,0)rotateZ(" + 90 * e.rotate + "deg)" }), src: e.imgs, alt: "cropper-img" }, null, 12, As)]), d("span", { class: "cropper-face cropper-move", onMousedown: t[2] || (t[2] = (...n) => e.cropMove && e.cropMove(...n)), onTouchstart: t[3] || (t[3] = (...n) => e.cropMove && e.cropMove(...n)) }, null, 32), e.info ? (r(), u("span", { key: 0, class: "crop-info", style: A({ top: e.cropInfo.top }) }, L(e.cropInfo.width) + " × " + L(e.cropInfo.height), 5)) : w("", !0), e.fixedBox ? w("", !0) : (r(), u("span", Hs, [d("span", { class: "crop-line line-w", onMousedown: t[4] || (t[4] = (n) => e.changeCropSize(n, !1, !0, 0, 1)), onTouchstart: t[5] || (t[5] = (n) => e.changeCropSize(n, !1, !0, 0, 1)) }, null, 32), d("span", { class: "crop-line line-a", onMousedown: t[6] || (t[6] = (n) => e.changeCropSize(n, !0, !1, 1, 0)), onTouchstart: t[7] || (t[7] = (n) => e.changeCropSize(n, !0, !1, 1, 0)) }, null, 32), d("span", { class: "crop-line line-s", onMousedown: t[8] || (t[8] = (n) => e.changeCropSize(n, !1, !0, 0, 2)), onTouchstart: t[9] || (t[9] = (n) => e.changeCropSize(n, !1, !0, 0, 2)) }, null, 32), d("span", { class: "crop-line line-d", onMousedown: t[10] || (t[10] = (n) => e.changeCropSize(n, !0, !1, 2, 0)), onTouchstart: t[11] || (t[11] = (n) => e.changeCropSize(n, !0, !1, 2, 0)) }, null, 32), d("span", { class: "crop-point point1", onMousedown: t[12] || (t[12] = (n) => e.changeCropSize(n, !0, !0, 1, 1)), onTouchstart: t[13] || (t[13] = (n) => e.changeCropSize(n, !0, !0, 1, 1)) }, null, 32), d("span", { class: "crop-point point2", onMousedown: t[14] || (t[14] = (n) => e.changeCropSize(n, !1, !0, 0, 1)), onTouchstart: t[15] || (t[15] = (n) => e.changeCropSize(n, !1, !0, 0, 1)) }, null, 32), d("span", { class: "crop-point point3", onMousedown: t[16] || (t[16] = (n) => e.changeCropSize(n, !0, !0, 2, 1)), onTouchstart: t[17] || (t[17] = (n) => e.changeCropSize(n, !0, !0, 2, 1)) }, null, 32), d("span", { class: "crop-point point4", onMousedown: t[18] || (t[18] = (n) => e.changeCropSize(n, !0, !1, 1, 0)), onTouchstart: t[19] || (t[19] = (n) => e.changeCropSize(n, !0, !1, 1, 0)) }, null, 32), d("span", { class: "crop-point point5", onMousedown: t[20] || (t[20] = (n) => e.changeCropSize(n, !0, !1, 2, 0)), onTouchstart: t[21] || (t[21] = (n) => e.changeCropSize(n, !0, !1, 2, 0)) }, null, 32), d("span", { class: "crop-point point6", onMousedown: t[22] || (t[22] = (n) => e.changeCropSize(n, !0, !0, 1, 2)), onTouchstart: t[23] || (t[23] = (n) => e.changeCropSize(n, !0, !0, 1, 2)) }, null, 32), d("span", { class: "crop-point point7", onMousedown: t[24] || (t[24] = (n) => e.changeCropSize(n, !1, !0, 0, 2)), onTouchstart: t[25] || (t[25] = (n) => e.changeCropSize(n, !1, !0, 0, 2)) }, null, 32), d("span", { class: "crop-point point8", onMousedown: t[26] || (t[26] = (n) => e.changeCropSize(n, !0, !0, 2, 2)), onTouchstart: t[27] || (t[27] = (n) => e.changeCropSize(n, !0, !0, 2, 2)) }, null, 32)]))], 4), [[H, e.cropping]])], 544);
|
|
1735
|
+
}], ["__scopeId", "data-v-a742df44"]]), js = { props: { loading: { type: [Boolean], default: !1 }, modelValue: { type: [Boolean], default: !1 }, src: { type: [String], default: "" }, size: { type: [Number], default: 120 }, title: { type: [String], default: "裁剪" } }, components: { VueCropper: Ps }, emits: ["update:modelValue", "onSubmit", "onClose"], data() {
|
|
1726
1736
|
return { cropDialogVisible: !1, cropAutoCrop: !0, cropFixedBox: !0, cropOutputType: "png", cropPreviews: {}, cropVisible: !1, cropBeforelImage: "", cropAfterImage: "", cropLocalWidth: this.size, cropLocalHeight: this.size };
|
|
1727
1737
|
}, watch: { modelValue(e) {
|
|
1728
1738
|
this.cropDialogVisible = e, this.cropInit();
|
|
@@ -1761,9 +1771,9 @@ const Ms = (e, t) => {
|
|
|
1761
1771
|
e = e || 1, this.$refs.cvAvatartCropper.changeScale(e);
|
|
1762
1772
|
}, cropRealTime(e) {
|
|
1763
1773
|
this.cropPreviews = e;
|
|
1764
|
-
} } },
|
|
1765
|
-
const n = C("vue-cropper"),
|
|
1766
|
-
return
|
|
1774
|
+
} } }, Rs = { class: "cv-upload-crop-box" }, Us = { class: "cv-upload-crop-left-box" }, Ws = { class: "cv-upload-crop-left-opt" }, Ys = { class: "cv-upload-crop-left-opt2" }, Xs = { class: "cv-upload-crop-left-opt2" }, qs = { class: "cv-upload-crop-right-box" }, Ks = ["innerHTML"], Gs = { title: "头像上传", name: "cvUploadAvatar", mixins: [Ro], components: { UploadCrop: V(js, [["render", function(e, t, o, l, i, a) {
|
|
1775
|
+
const n = C("vue-cropper"), c = C("el-button"), p = C("el-tooltip"), h = C("el-input"), m = C("el-dialog"), f = ae("loading");
|
|
1776
|
+
return r(), S(m, { title: o.title, modelValue: i.cropDialogVisible, "onUpdate:modelValue": t[7] || (t[7] = (g) => i.cropDialogVisible = g), width: "800px", "append-to-body": "", onOpened: a.cropDialogOpened, onClose: a.cropDialoClose }, { footer: v(() => [b(c, { type: "primary", onClick: a.cropSubmit, loading: o.loading, disabled: o.loading }, { default: v(() => t[12] || (t[12] = [F("提 交")])), _: 1, __: [12] }, 8, ["onClick", "loading", "disabled"])]), default: v(() => [N((r(), u("div", Rs, [d("div", Us, [i.cropVisible ? (r(), S(n, O({ key: 0, ref: "cvAvatartCropper", img: i.cropBeforelImage }, a.cropAttrs, { onRealTime: a.cropRealTime }), null, 16, ["img", "onRealTime"])) : w("", !0), d("div", Ws, [D(e.$slots, "default"), b(p, { effect: "dark", content: "重置", placement: "top" }, { default: v(() => [b(c, { icon: "ElIconRefresh", onClick: t[0] || (t[0] = (g) => a.cropRotateRefresh()) })]), _: 1 }), b(p, { effect: "dark", content: "放大", placement: "top" }, { default: v(() => [b(c, { icon: "ElIconZoomIn", onClick: t[1] || (t[1] = (g) => a.cropChangeScale(1)) })]), _: 1 }), b(p, { effect: "dark", content: "缩小", placement: "top" }, { default: v(() => [b(c, { icon: "ElIconZoomOut", onClick: t[2] || (t[2] = (g) => a.cropChangeScale(-1)) })]), _: 1 }), b(p, { effect: "dark", content: "向左旋转", placement: "top" }, { default: v(() => [b(c, { icon: "ElIconRefreshLeft", onClick: t[3] || (t[3] = (g) => a.cropRotateLeft()) })]), _: 1 }), b(p, { effect: "dark", content: "向右旋转", placement: "top" }, { default: v(() => [b(c, { icon: "ElIconRefreshRight", onClick: t[4] || (t[4] = (g) => a.cropRotateRight()) })]), _: 1 })]), d("div", Ys, [b(h, { size: "small" }, { prepend: v(() => t[8] || (t[8] = [F("X 坐标")])), _: 1 }), b(h, { size: "small" }, { prepend: v(() => t[9] || (t[9] = [F("Y 坐标")])), _: 1 })]), d("div", Xs, [b(h, { size: "small", modelValue: i.cropLocalWidth, "onUpdate:modelValue": t[5] || (t[5] = (g) => i.cropLocalWidth = g) }, { prepend: v(() => t[10] || (t[10] = [F("宽度")])), _: 1 }, 8, ["modelValue"]), b(h, { size: "small", modelValue: i.cropLocalHeight, "onUpdate:modelValue": t[6] || (t[6] = (g) => i.cropLocalHeight = g) }, { prepend: v(() => t[11] || (t[11] = [F("高度")])), _: 1 }, 8, ["modelValue"])])]), d("div", qs, [d("div", { class: "cv-upload-crop-preview", innerHTML: i.cropPreviews.html }, null, 8, Ks)])])), [[f, o.loading]])]), _: 3 }, 8, ["title", "modelValue", "onOpened", "onClose"]);
|
|
1767
1777
|
}]]) }, props: { modelValue: { type: [String], default: "" }, initValue: { type: [String], default: "" }, fileSize: { type: [Number], default: 2 }, fileType: { type: [Array], default: () => ["png", "jpg", "jpeg", "gif"] }, showSize: { type: Number, default: 120 }, crop: { type: [Boolean], default: !0 }, signatureParam: { type: [Object], default: () => ({ save_sign: "avatar" }) } }, data: () => ({ localValue: "", localList: [], upAccept: "image/*" }), computed: { localRef: () => "cvUploadAvatar" + +/* @__PURE__ */ new Date() + (1e3 * Math.random()).toFixed(0), handlerAttr() {
|
|
1768
1778
|
return { ref: this.localRef, action: "#", accept: this.upAccept, limit: 1, multiple: !1, drag: !1, disabled: this.upIngLoading, showFileList: !1 };
|
|
1769
1779
|
}, showStyle() {
|
|
@@ -1790,17 +1800,17 @@ const Ms = (e, t) => {
|
|
|
1790
1800
|
const { file: t } = e;
|
|
1791
1801
|
this.upIngLoading = !0;
|
|
1792
1802
|
const o = this.mergeAttrs.signatureType || null, l = this.mergeAttrs.signatureFn || null, i = this.mergeAttrs.signatureParam || {};
|
|
1793
|
-
await
|
|
1803
|
+
await Ei(t, o, l, i).then((a) => {
|
|
1794
1804
|
this.$nextTick(() => {
|
|
1795
1805
|
this.$emit("update:modelValue", a.full_path), this.$emit("update:initValue", a.cdn_full_path);
|
|
1796
|
-
}),
|
|
1806
|
+
}), q.success("上传成功"), this.upIngLoading = !1, this.cropShow = !1;
|
|
1797
1807
|
}).catch(() => {
|
|
1798
1808
|
this.upIngLoading = !1;
|
|
1799
1809
|
});
|
|
1800
|
-
} } },
|
|
1801
|
-
const n = C("upload-tip"),
|
|
1802
|
-
return
|
|
1803
|
-
}]]),
|
|
1810
|
+
} } }, Zs = ["src"], Xt = V(Gs, [["render", function(e, t, o, l, i, a) {
|
|
1811
|
+
const n = C("upload-tip"), c = C("cv-icons"), p = C("el-button"), h = C("el-tooltip"), m = C("el-upload"), f = C("upload-crop");
|
|
1812
|
+
return r(), u("div", { class: "cv-upload-avatar-wrap", onClick: t[2] || (t[2] = (...g) => a.cropDialogOpen && a.cropDialogOpen(...g)) }, [o.initValue ? w("", !0) : (r(), u("div", { key: 0, class: "cv-upload-avatar-box cv-upload-avatar-empty", style: A(a.showStyle) }, t[3] || (t[3] = [d("div", { class: "cv-upload-avatar__text" }, "上传头像", -1)]), 4)), o.initValue ? (r(), u("div", { key: 1, class: "cv-upload-avatar-box", style: A(a.showStyle) }, [d("img", { class: "cv-upload-avatar__img", src: o.initValue }, null, 8, Zs)], 4)) : w("", !0), b(n, O(e.tipAttr, { fileUnit: "张", multiple: !1, limit: 1 }), null, 16), o.crop ? (r(), S(f, { key: 2, modelValue: e.cropShow, "onUpdate:modelValue": t[0] || (t[0] = (g) => e.cropShow = g), title: "修改头像", size: o.showSize, onOnSubmit: a.onHttpRequest, onOnClose: t[1] || (t[1] = (g) => e.upIngLoading = !1), loading: e.upIngLoading, src: i.localValue }, { default: v(() => [b(m, O(a.handlerAttr, { "before-upload": a.initBeforeUpload, "http-request": e.initHttpRequest }), { default: v(() => [b(h, { effect: "dark", content: "选择图片", placement: "top" }, { default: v(() => [b(p, { style: { "margin-right": "10px" }, loading: e.upIngLoading, disabled: e.upIngLoading }, { default: v(() => [b(c, { type: "ElIconPlus", size: "14", style: { "margin-right": "10px" } }), t[4] || (t[4] = F(" 选择 "))]), _: 1, __: [4] }, 8, ["loading", "disabled"])]), _: 1 })]), _: 1 }, 16, ["before-upload", "http-request"])]), _: 1 }, 8, ["modelValue", "size", "onOnSubmit", "loading", "src"])) : w("", !0)]);
|
|
1813
|
+
}]]), Qs = { title: "图片上传", name: "cvUploadImage", mixins: [Ro], components: {}, props: { modelValue: { type: [String, Array, Object], default: () => [] }, initValue: { type: [String, Array], default: () => "" }, fileSize: { type: [Number], default: 2 }, fileType: { type: [Array], default: () => ["png", "jpg", "jpeg", "gif"] }, showSize: { type: Number, default: 150 }, showBig: { type: [Boolean], default: !1 }, crop: { type: [Boolean], default: !1 }, galleryLabel: { type: String, default: "" }, lazy: { type: Boolean, default: !0 }, drag: { type: Boolean, default: !1 }, signatureParam: { type: [Object], default: () => ({ save_sign: "image" }) } }, data: () => ({ localValue: [], localList: [], previewShow: !1, previewTitle: "", previewUrl: "", upAccept: "image/*" }), computed: { localRef: () => "cvUploadImage" + +/* @__PURE__ */ new Date() + (1e3 * Math.random()).toFixed(0), handlerAttr() {
|
|
1804
1814
|
return { ref: this.localRef, action: "#", accept: this.upAccept, limit: parseInt(this.limit), multiple: this.multiple, drag: !!this.drag, disabled: this.upIngLoading, showFileList: !1 };
|
|
1805
1815
|
}, showUpload() {
|
|
1806
1816
|
return !(this.localList.length >= this.limit);
|
|
@@ -1813,9 +1823,9 @@ const Ms = (e, t) => {
|
|
|
1813
1823
|
this._init_parse_list();
|
|
1814
1824
|
} }, mounted() {
|
|
1815
1825
|
}, methods: { _init_parse_value() {
|
|
1816
|
-
this.modelValue ? this.localValue =
|
|
1826
|
+
this.modelValue ? this.localValue = Ol(this.modelValue) : this.localValue = [];
|
|
1817
1827
|
}, _init_parse_list() {
|
|
1818
|
-
this.initValue ? this.localList =
|
|
1828
|
+
this.initValue ? this.localList = Bi(this.initValue) : this.localList = [];
|
|
1819
1829
|
}, initOnChange(e, t) {
|
|
1820
1830
|
}, initBeforeUpload(e) {
|
|
1821
1831
|
return this.upIngLoading = !0, !!this._commonBeforeUpload(e) || (this.upIngLoading = !1, !1);
|
|
@@ -1823,20 +1833,20 @@ const Ms = (e, t) => {
|
|
|
1823
1833
|
const { file: t } = e;
|
|
1824
1834
|
this.upIngLoading = !0, this.mergeAttrs.upResponseFn;
|
|
1825
1835
|
const o = this.mergeAttrs.signatureType || null, l = this.mergeAttrs.signatureFn || null, i = this.mergeAttrs.signatureParam || {};
|
|
1826
|
-
await
|
|
1836
|
+
await Ei(t, o, l, i).then((a) => {
|
|
1827
1837
|
this.$nextTick(() => {
|
|
1828
1838
|
this.updateValue(a.full_path, a.cdn_full_path);
|
|
1829
|
-
}),
|
|
1839
|
+
}), q.success("上传成功"), this.upIngLoading = !1;
|
|
1830
1840
|
}).catch(() => {
|
|
1831
1841
|
this.upIngLoading = !1;
|
|
1832
1842
|
});
|
|
1833
1843
|
}, updateValue(e, t) {
|
|
1834
1844
|
if (this.multiple) {
|
|
1835
|
-
let o =
|
|
1845
|
+
let o = Gi(this.localValue, e);
|
|
1836
1846
|
this.$emit("update:modelValue", o);
|
|
1837
1847
|
} else this.$emit("update:modelValue", e);
|
|
1838
1848
|
if (this.multiple) {
|
|
1839
|
-
let o =
|
|
1849
|
+
let o = Gi(this.localList, t);
|
|
1840
1850
|
this.$emit("update:initValue", o);
|
|
1841
1851
|
} else this.$emit("update:initValue", t);
|
|
1842
1852
|
}, handleItemPreview(e, t) {
|
|
@@ -1852,35 +1862,34 @@ const Ms = (e, t) => {
|
|
|
1852
1862
|
}) : l !== !1 && this.doRemove(t);
|
|
1853
1863
|
} else this.doRemove(t);
|
|
1854
1864
|
}, handleItemEdit(e, t) {
|
|
1855
|
-
|
|
1856
|
-
var p, h;
|
|
1865
|
+
Fi.prompt("请输入文件地址", "编辑", { confirmButtonText: "OK", cancelButtonText: "Cancel", inputValue: e.url || "", inputErrorMessage: "格式不正确" }).then(({ value: o }) => {
|
|
1857
1866
|
const l = o.split("/").pop(), i = l.split(".").pop().toLowerCase();
|
|
1858
1867
|
if (!this.fileType.includes(i)) {
|
|
1859
|
-
let
|
|
1860
|
-
return
|
|
1868
|
+
let p = this.fileType.join("、");
|
|
1869
|
+
return q.error(`文件格式错误,请填写类型,如:${p} 格式文件`), !1;
|
|
1861
1870
|
}
|
|
1862
|
-
const a = function(
|
|
1863
|
-
if (!
|
|
1864
|
-
const
|
|
1865
|
-
return
|
|
1871
|
+
const a = function(p) {
|
|
1872
|
+
if (!p) return "";
|
|
1873
|
+
const h = p.replace(/^\./, "").toLowerCase();
|
|
1874
|
+
return Tl.extensionToMime[h] || "";
|
|
1866
1875
|
}(i);
|
|
1867
|
-
if (!a) return
|
|
1876
|
+
if (!a) return q.error("文件格式错误"), !1;
|
|
1868
1877
|
var n;
|
|
1869
|
-
(n = o).startsWith("http://") || n.startsWith("https://") || n.startsWith("//") ||
|
|
1870
|
-
const
|
|
1871
|
-
this.localList[t] =
|
|
1878
|
+
(n = o).startsWith("http://") || n.startsWith("https://") || n.startsWith("//") || this.mergeAttrs?.baseDomain && (o = this.mergeAttrs?.baseDomain + o);
|
|
1879
|
+
const c = { name: l, status: "success", type: a, uid: Date.now(), url: o };
|
|
1880
|
+
this.localList[t] = c;
|
|
1872
1881
|
}).catch(() => {
|
|
1873
1882
|
});
|
|
1874
1883
|
}, handleItemCrop(e, t) {
|
|
1875
|
-
} } },
|
|
1876
|
-
const n = C("el-image"),
|
|
1877
|
-
return
|
|
1878
|
-
}]]),
|
|
1879
|
-
function
|
|
1880
|
-
return `https://10ui.cn/default/icon_ext/${
|
|
1884
|
+
} } }, Js = { class: "cv-upload-image cv-upload-common" }, er = { class: "cv-upload-list-box el-upload-list el-upload-list--picture-card" }, tr = ["tabindex"], or = { class: "el-upload-list__item-status-label" }, ir = { class: "el-upload-list__item-actions" }, ar = ["onClick"], lr = { class: "el-upload-list__item-delete" }, nr = { class: "el-upload-list__item-delete" }, sr = ["onClick"], rr = { style: { margin: "0 auto" } }, cr = ["src"], qt = V(Qs, [["render", function(e, t, o, l, i, a) {
|
|
1885
|
+
const n = C("el-image"), c = C("cv-icons"), p = C("el-upload"), h = C("upload-tip"), m = C("el-dialog"), f = ae("loading");
|
|
1886
|
+
return r(), u("div", Js, [d("div", er, [(r(!0), u($, null, M(i.localList, (g, k) => (r(), u("section", { class: "el-upload-list__item is-success", key: k, tabindex: k, style: A(a.showStyle) }, [b(n, { class: "el-upload-list__item-thumbnail", lazy: o.lazy, src: g.url, style: A(a.showStyle), fit: "contain" }, null, 8, ["lazy", "src", "style"]), d("label", or, [b(c, { type: "ElIconCheck", color: "#ffffff", size: "12" })]), d("span", ir, [d("span", { class: "el-upload-list__item-preview", onClick: (x) => a.handleItemPreview(g) }, [b(c, { type: "ElIconZoomIn", size: "20" })], 8, ar), d("span", lr, [b(c, { type: "ElIconDelete", size: "20", onClick: (x) => a.handleItemRemove(g, k) }, null, 8, ["onClick"])]), d("span", nr, [b(c, { type: "ElIconEdit", size: "20", onClick: (x) => a.handleItemEdit(g, k) }, null, 8, ["onClick"])]), o.crop ? (r(), u("span", { key: 0, class: "el-upload-list__item-preview", onClick: (x) => a.handleItemCrop(g) }, [b(c, { type: "ElIconCrop", size: "20" })], 8, sr)) : w("", !0)])], 12, tr))), 128)), a.showUpload ? (r(), S(p, O({ key: 0, class: "cv-upload-common-handle" }, a.handlerAttr, { "file-list": i.localList, "before-upload": a.initBeforeUpload, "http-request": a.initHttpRequest, "on-change": a.initOnChange, "on-exceed": e.initOnExceed, style: a.showStyle }), { default: v(() => [N((r(), u("div", { class: "cv-upload-common__ing", style: A(a.showStyle) }, [o.drag ? (r(), u($, { key: 0 }, [b(c, { type: "ElIconUpload", size: "24" }), t[1] || (t[1] = d("div", { class: "el-upload__text" }, [F(" 将文件拖到此处,或 "), d("em", null, "点击上传")], -1))], 64)) : (r(), S(c, { key: 1, type: "ElIconPlus", size: o.showSize / 3 }, null, 8, ["size"]))], 4)), [[f, e.upIngLoading]])]), _: 1 }, 16, ["file-list", "before-upload", "http-request", "on-change", "on-exceed", "style"])) : w("", !0)]), b(h, O(e.tipAttr, { fileUnit: "张" }), null, 16), b(m, { modelValue: i.previewShow, "onUpdate:modelValue": t[0] || (t[0] = (g) => i.previewShow = g), title: i.previewTitle, "append-to-body": "" }, { default: v(() => [d("div", rr, [d("img", { width: "100%", src: i.previewUrl, style: { "max-width": "300px" } }, null, 8, cr)])]), _: 1 }, 8, ["modelValue", "title"])]);
|
|
1887
|
+
}]]), dr = { mdb: "access", accdb: "access", ai: "ai", html: "html", htm: "html", asp: "web", pdf: "pdf", psd: "photoshop", psb: "photoshop", mpo: "photoshop", eps: "photoshop", avi: "video", wmv: "video", rm: "video", rmvb: "video", mp4: "video", "3gp": "video", asf: "video", mov: "video", m4v: "video", flv: "video", f4v: "video", mkv: "video", mts: "video", swf: "flash", ts: "video", mp3: "audio", wav: "audio", wma: "audio", ape: "audio", aac: "audio", zip: "zip", rar: "zip", gz: "zip", "7z": "zip", z: "zip", bmp: "image", jpg: "image", jpeg: "image", png: "image", gif: "image", webp: "image", svg: "image", txt: "txt", rtf: "txt", xls: "excel", xlsx: "excel", xlsm: "excel", xltx: "excel", doc: "word", docx: "word", docm: "word", wps: "word", dotx: "word", dotm: "word", ppt: "powerpoint", pptx: "powerpoint", mdf: "db", db: "db", dbf: "db", wdb: "db", vue: "vue", php: "php", jar: "jar", ini: "ini", bat: "bat", config: "config", fla: "fla", eot: "font", otf: "font", fon: "font", font: "font", ttf: "font", ttc: "font", woff: "font", woff2: "font", js: "js", md: "markdown", one: "onenote", jsx: "reactjs", xfl: "xfl", file: "file", css: "css" };
|
|
1888
|
+
function Yo(e) {
|
|
1889
|
+
return `https://10ui.cn/default/icon_ext/${dr[e]}.svg`;
|
|
1881
1890
|
}
|
|
1882
|
-
const
|
|
1883
|
-
return e.lastIndexOf(".") > -1 &&
|
|
1891
|
+
const hr = { name: "uploadList", props: { files: { type: Array, default: () => [] }, disabled: { type: Boolean, default: !1 }, isCanDownload: { type: Boolean, default: !0 }, isCanDelete: { type: Boolean, default: !0 } }, methods: { getExtension(e) {
|
|
1892
|
+
return e.lastIndexOf(".") > -1 && Yo[e.slice(e.lastIndexOf(".") + 1).toLowerCase()] || Yo.file;
|
|
1884
1893
|
}, getSize: (e) => e && !isNaN(Number(e)) ? e : "", parsePercentage: (e) => parseInt(e, 10), handleDownload(e) {
|
|
1885
1894
|
e.url;
|
|
1886
1895
|
}, handleDelete(e, t) {
|
|
@@ -1888,9 +1897,9 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1888
1897
|
this.$emit("remove", e, t);
|
|
1889
1898
|
}).catch(() => {
|
|
1890
1899
|
});
|
|
1891
|
-
} } },
|
|
1900
|
+
} } }, pr = ["src"], ur = { class: "cv-upload-list__item-content-action" }, mr = { title: "文件上传", inheritAttrs: !1, name: "cvUploadFile", mixins: [Ro], components: { uploadList: V(hr, [["render", function(e, t, o, l, i, a) {
|
|
1892
1901
|
const n = C("el-link");
|
|
1893
|
-
return
|
|
1902
|
+
return r(), S(mn, { class: "cv-upload-file-list el-upload-list el-upload-list--text", name: "el-list", tag: "ul" }, { default: v(() => [(r(!0), u($, null, M(o.files, (c, p) => (r(), u("li", { key: c.uid, class: "el-upload-list__item cv-upload-list__item-content" }, [b(n, { href: c.url, underline: !1, target: "_blank" }, { default: v(() => [d("img", { src: a.getExtension(c.name), class: "el-upload-list__item-content-name-icon" }, null, 8, pr), d("span", null, L(c.name), 1)]), _: 2 }, 1032, ["href"]), d("div", ur, [b(n, { underline: !1 }, { default: v(() => [F(L(a.getSize(c.size)), 1)]), _: 2 }, 1024), o.isCanDownload ? (r(), S(n, { key: 0, underline: !1, onClick: (h) => a.handleDownload(c) }, { default: v(() => t[0] || (t[0] = [F("下载")])), _: 2, __: [0] }, 1032, ["onClick"])) : w("", !0), !o.disabled && o.isCanDelete ? (r(), S(n, { key: 1, underline: !1, onClick: (h) => a.handleDelete(p, c), type: "danger" }, { default: v(() => t[1] || (t[1] = [F(" 删除 ")])), _: 2, __: [1] }, 1032, ["onClick"])) : w("", !0)])]))), 128))]), _: 1 });
|
|
1894
1903
|
}]]) }, props: { modelValue: { type: [String, Object, Array], default: "" }, initValue: { type: [String, Object, Array], default: "" }, fileSize: { type: [Number], default: 5 }, fileType: { type: [Array], default: ["txt", "png", "jpg", "xlsx", "xls"] }, multiple: { type: [Boolean], default: !1 }, limit: { type: [Number], default: 5 }, disabled: Boolean, isCanDownload: { type: Boolean, default: !0 }, isCanDelete: { type: Boolean, default: !0 }, isCanUploadSame: { type: Boolean, default: !0 } }, data: () => ({ localValue: [], localList: [] }), computed: { localRef: () => "cvUploadFile" + +/* @__PURE__ */ new Date() + (1e3 * Math.random()).toFixed(0), handlerAttr() {
|
|
1895
1904
|
return { ref: this.localRef, action: "#", limit: parseInt(this.limit), multiple: this.multiple, drag: !1, disabled: this.upIngLoading, showFileList: !0 };
|
|
1896
1905
|
}, list() {
|
|
@@ -1901,7 +1910,7 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1901
1910
|
} }, mounted() {
|
|
1902
1911
|
this._init_parse();
|
|
1903
1912
|
}, methods: { _init_parse() {
|
|
1904
|
-
this.initValue ? this.localList =
|
|
1913
|
+
this.initValue ? this.localList = Bi(this.initValue) : this.localList = [];
|
|
1905
1914
|
}, initOnChange(e, t) {
|
|
1906
1915
|
this.localList = t;
|
|
1907
1916
|
}, initBeforeUpload(e) {
|
|
@@ -1923,10 +1932,10 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1923
1932
|
const t = [...this.list];
|
|
1924
1933
|
t.splice(e, 1), this.$emit("update:modelValue", t || []);
|
|
1925
1934
|
} else this.$emit("update:modelValue", null);
|
|
1926
|
-
} } },
|
|
1927
|
-
const n = C("el-button"),
|
|
1928
|
-
return
|
|
1929
|
-
}]]),
|
|
1935
|
+
} } }, gr = { class: "cv-upload-file" }, Kt = V(mr, [["render", function(e, t, o, l, i, a) {
|
|
1936
|
+
const n = C("el-button"), c = C("el-upload"), p = C("upload-tip"), h = C("upload-list");
|
|
1937
|
+
return r(), u("div", gr, [b(c, O({ class: "cv-upload-file-uploader" }, a.handlerAttr, { "file-list": i.localList, "onUpdate:fileList": t[0] || (t[0] = (m) => i.localList = m), "before-upload": a.initBeforeUpload, "on-change": a.initOnChange, "on-exceed": e.initOnExceed, "on-error": a.upFileError, "on-success": a.upFileSuccess }), { default: v(() => [b(n, { type: "primary", icon: "ElIconUpload" }, { default: v(() => t[1] || (t[1] = [F("上传文件")])), _: 1, __: [1] })]), _: 1 }, 16, ["file-list", "before-upload", "on-change", "on-exceed", "on-error", "on-success"]), b(p, O(e.tipAttr, { fileUnit: "个" }), null, 16), b(h, { disabled: o.disabled, files: a.list, isCanDelete: o.isCanDelete, isCanDownload: o.isCanDownload, onRemove: a.handleRemove }, null, 8, ["disabled", "files", "isCanDelete", "isCanDownload", "onRemove"])]);
|
|
1938
|
+
}]]), fr = { class: "cv-upload-video" }, vr = { class: "cv-upload-list-box el-upload-list el-upload-list--picture-card" }, yr = ["tabindex"], br = ["src"], Cr = { class: "el-upload-list__item-status-label" }, wr = { class: "el-upload-list__item-actions" }, kr = ["onClick"], xr = { class: "el-upload-list__item-delete" }, Sr = { class: "el-upload-list__item-delete" }, Vr = { key: 0, style: { width: "500px", height: "300px", margin: "0 auto" } }, _r = ["src"], Gt = V({ title: "视频上传", name: "cvUploadVideo", mixins: [Ro], components: {}, props: { modelValue: { type: [String], default: "" }, initValue: { type: [String], default: "" }, fileSize: { type: [Number], default: 10 }, fileType: { type: Array, default: ["mp4", "mp3"] }, showSize: { type: Number, default: 360 }, signatureParam: { type: [Object], default: () => ({ save_sign: "video" }) } }, data: () => ({ localValue: "", localList: "", previewShow: !1, previewTitle: "", previewUrl: "", upAccept: "video/*" }), computed: { localRef: () => "cvUploadVideo" + +/* @__PURE__ */ new Date() + (1e3 * Math.random()).toFixed(0), handlerAttr() {
|
|
1930
1939
|
return { ref: this.localRef, action: "#", accept: this.upAccept, limit: 1, multiple: !1, drag: !0, disabled: this.upIngLoading, showFileList: !1 };
|
|
1931
1940
|
}, showUpload() {
|
|
1932
1941
|
return !this.localValue;
|
|
@@ -1939,16 +1948,16 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1939
1948
|
} }, mounted() {
|
|
1940
1949
|
this._init_parse_value(), this._init_parse_list();
|
|
1941
1950
|
}, methods: { _init_parse_value() {
|
|
1942
|
-
this.modelValue ? this.localValue =
|
|
1951
|
+
this.modelValue ? this.localValue = Ol(this.modelValue) : this.localValue = "";
|
|
1943
1952
|
}, _init_parse_list() {
|
|
1944
|
-
this.initValue ? this.localList =
|
|
1953
|
+
this.initValue ? this.localList = Bi(this.initValue) : this.localList = "";
|
|
1945
1954
|
}, initBeforeUpload(e) {
|
|
1946
1955
|
return this.upIngLoading = !0, !!this._commonBeforeUpload(e) || (this.upIngLoading = !1, !1);
|
|
1947
1956
|
}, async initHttpRequest(e) {
|
|
1948
1957
|
const { file: t } = e;
|
|
1949
1958
|
this.upIngLoading = !0, this.mergeAttrs.upResponseFn;
|
|
1950
1959
|
const o = this.mergeAttrs.signatureType || null, l = this.mergeAttrs.signatureFn || null, i = this.mergeAttrs.signatureParam || {};
|
|
1951
|
-
await
|
|
1960
|
+
await Ei(t, o, l, i).then((a) => {
|
|
1952
1961
|
this.$nextTick(() => {
|
|
1953
1962
|
this.$emit("update:modelValue", a.full_path), this.$emit("update:initValue", a.cdn_full_path);
|
|
1954
1963
|
}), ExtendMessage.success("上传成功"), this.upIngLoading = !1;
|
|
@@ -1968,9 +1977,9 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1968
1977
|
}) : l !== !1 && this.doRemove(t);
|
|
1969
1978
|
} else this.doRemove(t);
|
|
1970
1979
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
1971
|
-
const n = C("cv-icons"),
|
|
1972
|
-
return
|
|
1973
|
-
}]]),
|
|
1980
|
+
const n = C("cv-icons"), c = C("el-progress"), p = C("el-upload"), h = C("upload-tip"), m = C("el-dialog");
|
|
1981
|
+
return r(), u("div", fr, [d("div", vr, [i.localList ? (r(!0), u($, { key: 0 }, M(i.localList, (f, g) => (r(), u("section", { class: "el-upload-list__item is-success", key: g, tabindex: g, style: A(a.showStyle) }, [d("video", { class: "el-upload-list__item-thumbnail", autoplay: !1, src: f.url, style: A(a.showStyle) }, " 您的浏览器不支持视频播放 ", 12, br), d("label", Cr, [b(n, { type: "ElIconCheck", color: "#ffffff", size: "12" })]), d("span", wr, [d("span", { class: "el-upload-list__item-preview", onClick: (k) => a.handleItemPreview(f) }, [b(n, { type: "ElIconVideoPlay", size: "20" })], 8, kr), d("span", xr, [b(n, { type: "ElIconDelete", size: "20", onClick: (k) => a.handleItemRemove(f, g) }, null, 8, ["onClick"])]), d("span", Sr, [b(n, { type: "ElIconEdit", size: "20", onClick: (k) => e.handleItemEdit(f, g) }, null, 8, ["onClick"])])])], 12, yr))), 128)) : w("", !0), a.showUpload ? (r(), S(p, O({ key: 1, class: "cv-upload-handler" }, a.handlerAttr, { "before-upload": a.initBeforeUpload, "http-request": a.initHttpRequest, style: a.showStyle }), { default: v(() => [e.upIngPercent > 0 ? (r(), S(c, { key: 0, percentage: e.upIngPercent, style: { "margin-top": "20px" }, type: "circle" }, null, 8, ["percentage"])) : (r(), u("div", { key: 1, class: "cv-upload-video__ing", style: A(a.showStyle) }, [b(n, { type: "ElIconUpload", size: "24" }), t[1] || (t[1] = d("div", { class: "el-upload__text" }, [F(" 将视频拖到此处,或 "), d("em", null, "点击上传")], -1))], 4))]), _: 1 }, 16, ["before-upload", "http-request", "style"])) : w("", !0)]), b(h, O(e.tipAttr, { fileUnit: "个", limit: 1 }), null, 16), b(m, { modelValue: i.previewShow, "onUpdate:modelValue": t[0] || (t[0] = (f) => i.previewShow = f), title: i.previewTitle, "append-to-body": "" }, { default: v(() => [i.previewShow ? (r(), u("div", Vr, [d("video", { autoplay: !0, src: i.previewUrl, controls: "controls", style: { width: "500px", height: "300px" } }, " 您的浏览器不支持视频播放 ", 8, _r)])) : w("", !0)]), _: 1 }, 8, ["modelValue", "title"])]);
|
|
1982
|
+
}]]), Ir = { emits: ["get-unlist", "on-close", "on-update", "on-delete"], props: { modelValue: { type: Array, default: () => [] }, model: { type: String, default: "" }, accept: { type: String, default: "" }, multiple: { type: Boolean, default: !1 } }, data: () => ({ audioInfo: {}, file: null, fileList: [], fileHash: "", tempCheckpoint: null, uploadId: "", uploadStatus: null, showAudio: !1, percentage: 0, uploadName: "", client: null, year: (/* @__PURE__ */ new Date()).getFullYear(), uploadDisabled: !0, resumeDisabled: !0, pauseDisabled: !0, dialogVisible: !1, isDoing: !1, unList: [], fileMap: {}, map_max_key: 0, partSize: 1048576, parallel: 4, checkpoints: {} }), watch: { dialogVisible: { handler(e) {
|
|
1974
1983
|
e || (this.fileList = [], this.$refs.upload.uploadFiles = []);
|
|
1975
1984
|
} }, fileList: { handler(e) {
|
|
1976
1985
|
if (e.length) {
|
|
@@ -1982,7 +1991,7 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1982
1991
|
}
|
|
1983
1992
|
}, deep: !0 } }, mounted() {
|
|
1984
1993
|
window.addEventListener("online", this.resumeUpload);
|
|
1985
|
-
}, methods: { filterSize:
|
|
1994
|
+
}, methods: { filterSize: Ki, handleExceed() {
|
|
1986
1995
|
this.$confirm("上传文件数量不能超过100个,请重新选择!", "操作提示", { confirmButtonText: "确 定", cancelButtonText: "取 消", type: "warning" }).then(() => {
|
|
1987
1996
|
this.fileList = [], this.dialogVisible = !1;
|
|
1988
1997
|
}).catch(() => {
|
|
@@ -1991,8 +2000,8 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
1991
2000
|
}, handleDeleteChangeFile(e) {
|
|
1992
2001
|
this.fileList.splice(e, 1), this.fileList.length || (this.dialogVisible = !1);
|
|
1993
2002
|
}, fileTypeIcon(e) {
|
|
1994
|
-
const { type: t } = e.raw, o = t.indexOf("video") !== -1, l = t.indexOf("image") !== -1, i = t.indexOf("audio") !== -1, a = t.indexOf("zip") !== -1, n = t.indexOf("wordprocessingml") !== -1,
|
|
1995
|
-
return o ? "MP4" : l ? "JPG1" : i ? "mp3-1" : a ? "yasuo" : n ? "DOCX" :
|
|
2003
|
+
const { type: t } = e.raw, o = t.indexOf("video") !== -1, l = t.indexOf("image") !== -1, i = t.indexOf("audio") !== -1, a = t.indexOf("zip") !== -1, n = t.indexOf("wordprocessingml") !== -1, c = t.indexOf("pdf") !== -1, p = t.indexOf("text") !== -1, h = t.indexOf("sheet") !== -1;
|
|
2004
|
+
return o ? "MP4" : l ? "JPG1" : i ? "mp3-1" : a ? "yasuo" : n ? "DOCX" : c ? "wenjianleixing-biaozhuntu-PDFwendang" : p ? "div-1" : h ? "excel1" : "weizhiwenjian";
|
|
1996
2005
|
}, handleClose() {
|
|
1997
2006
|
this.$emit("on-close"), this.isDoing ? this.dialogVisible = !1 : this.$confirm("正在上传文件,关闭后上传文件会丢失!是否继续?", "操作提示", { confirmButtonText: "确 定", cancelButtonText: "取 消", type: "warning" }).then(() => {
|
|
1998
2007
|
this.$emit("get-unlist"), this.fileList.forEach((e) => {
|
|
@@ -2008,7 +2017,7 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2008
2017
|
}, async multipartUpload() {
|
|
2009
2018
|
this.file ? this.fileList.forEach(async (e) => {
|
|
2010
2019
|
e.isLoading = !0, await this.ossUploadHandle(e, this.fileList);
|
|
2011
|
-
}) :
|
|
2020
|
+
}) : q.error("请选择文件");
|
|
2012
2021
|
}, async resumeUpload() {
|
|
2013
2022
|
this.pauseDisabled = !1, this.uploadDisabled = !0, this.resumeDisabled = !0, await this.resumeMultipartUpload();
|
|
2014
2023
|
}, stopUpload() {
|
|
@@ -2026,9 +2035,9 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2026
2035
|
}, handle_network_speed(e, t, o) {
|
|
2027
2036
|
const l = e.rt / 1e3, i = new Date(e.headers.date).getTime(), a = i - l;
|
|
2028
2037
|
let n = parseInt(t / l);
|
|
2029
|
-
return o === 0 && (n = 0), n === 0 || this.handle_network_speed_change(a, i, n), n ?
|
|
2038
|
+
return o === 0 && (n = 0), n === 0 || this.handle_network_speed_change(a, i, n), n ? Ki(n) : 0;
|
|
2030
2039
|
}, async resetUpload(e, t) {
|
|
2031
|
-
JSON.stringify(e).indexOf("Error") !== -1 && (t.client && t.client.cancel(), t.client = await
|
|
2040
|
+
JSON.stringify(e).indexOf("Error") !== -1 && (t.client && t.client.cancel(), t.client = await Qi(this.signatureType, this.apiFunc), await this.resumeMultipartUpload(t));
|
|
2032
2041
|
}, async resumeMultipartUpload(e) {
|
|
2033
2042
|
if (e) {
|
|
2034
2043
|
const { tempCheckpoint: t } = e;
|
|
@@ -2041,12 +2050,12 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2041
2050
|
const { uploadId: o, file: l, name: i } = t;
|
|
2042
2051
|
try {
|
|
2043
2052
|
const { raw: a, percentage: n } = e;
|
|
2044
|
-
e.partSize = 0, n < 100 && a.name.indexOf(".") !== -1 && e.client.multipartUpload(o, l, { parallel: this.parallel, partSize: this.partSize, progress: async (
|
|
2045
|
-
await this.onUploadProgress(e,
|
|
2053
|
+
e.partSize = 0, n < 100 && a.name.indexOf(".") !== -1 && e.client.multipartUpload(o, l, { parallel: this.parallel, partSize: this.partSize, progress: async (c, p, h) => {
|
|
2054
|
+
await this.onUploadProgress(e, c, p, h, i);
|
|
2046
2055
|
}, checkpoint: t }).then(() => {
|
|
2047
2056
|
delete this.checkpoints[t.uploadId], this.$emit("update:modelValue", this.fileList), this.resumeDisabled = !0, this.unList.length && this.uploadDisabled && (this.resumeDisabled = !1), this.onCreatePanFile(e);
|
|
2048
|
-
}).catch(async (
|
|
2049
|
-
await this.resetUpload(
|
|
2057
|
+
}).catch(async (c) => {
|
|
2058
|
+
await this.resetUpload(c, e);
|
|
2050
2059
|
});
|
|
2051
2060
|
} catch {
|
|
2052
2061
|
}
|
|
@@ -2055,18 +2064,18 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2055
2064
|
}, async ossUploadHandle(e) {
|
|
2056
2065
|
let t = { pass: !0, filePath: "" };
|
|
2057
2066
|
try {
|
|
2058
|
-
const { raw: o, percentage: l } = e, i = o, a = await
|
|
2067
|
+
const { raw: o, percentage: l } = e, i = o, a = await Qi(this.signatureType, this.apiFunc, {}, { secure: !0 });
|
|
2059
2068
|
if (this.signatureType == "aliyun_oss_type1") {
|
|
2060
2069
|
if (e.client = a, e.partSize = 0, l < 100 && o.name.indexOf(".") !== -1) {
|
|
2061
2070
|
const n = a.dir + i.name;
|
|
2062
|
-
await e.client.multipartUpload(n, i, { parallel: this.parallel, partSize: this.partSize, progress: async (
|
|
2063
|
-
await this.onUploadProgress(e,
|
|
2071
|
+
await e.client.multipartUpload(n, i, { parallel: this.parallel, partSize: this.partSize, progress: async (c, p, h) => {
|
|
2072
|
+
await this.onUploadProgress(e, c, p, h, n);
|
|
2064
2073
|
} }).then(() => {
|
|
2065
2074
|
this.$emit("upload:modelValue", this.fileList), this.resumeDisabled = !0, this.onCreatePanFile(e), this.unList.length && this.uploadDisabled && (this.resumeDisabled = !1);
|
|
2066
|
-
}).catch(async (
|
|
2075
|
+
}).catch(async (c) => {
|
|
2067
2076
|
});
|
|
2068
2077
|
}
|
|
2069
|
-
} else this.signatureType == "aliyun_oss_type2" &&
|
|
2078
|
+
} else this.signatureType == "aliyun_oss_type2" && $l(i, a);
|
|
2070
2079
|
} catch (o) {
|
|
2071
2080
|
t = { ...o, pass: !1, filePath: "" };
|
|
2072
2081
|
}
|
|
@@ -2080,7 +2089,7 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2080
2089
|
}), this.fileList = t, this.file = e.raw, this.uploadDisabled = !1, this.pauseDisabled = this.resumeDisabled = !0;
|
|
2081
2090
|
}, handleDeleteFile(e) {
|
|
2082
2091
|
const t = e.indexOf(this.model);
|
|
2083
|
-
e.substring(t, e.length), this.$emit("on-delete"), this.fileList = [],
|
|
2092
|
+
e.substring(t, e.length), this.$emit("on-delete"), this.fileList = [], q.success("删除成功");
|
|
2084
2093
|
}, async onCreatePanFile(e) {
|
|
2085
2094
|
await this.getParams(e), this.$emit("on-update");
|
|
2086
2095
|
}, handleMediaRes: (e) => ({ image: async function(t) {
|
|
@@ -2099,8 +2108,8 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2099
2108
|
l.onload = function(i) {
|
|
2100
2109
|
var a = i.target.result, n = new Audio();
|
|
2101
2110
|
n.onloadeddata = function() {
|
|
2102
|
-
const
|
|
2103
|
-
o({ Duration: 1e3 *
|
|
2111
|
+
const c = n.duration;
|
|
2112
|
+
o({ Duration: 1e3 * c });
|
|
2104
2113
|
}, n.src = a;
|
|
2105
2114
|
}, l.readAsDataURL(t);
|
|
2106
2115
|
});
|
|
@@ -2116,11 +2125,13 @@ const pr = { name: "uploadList", props: { files: { type: Array, default: () => [
|
|
|
2116
2125
|
const { type: t } = e.raw, o = t.indexOf("video") !== -1, l = t.indexOf("image") !== -1, i = t.indexOf("audio") !== -1;
|
|
2117
2126
|
let a, n = "";
|
|
2118
2127
|
return o ? n = "video" : l ? t.indexOf("adobe") === -1 && (n = "image") : i && (n = "audio"), (o || l || i) && n && (a = await this.handleMediaRes(n)(e.raw)), { ResTitle: e.name, ResDescribe: "", OssKey: e.uploadName, ContentType: t || "application/octet-stream", ContentLength: e.size, ...a };
|
|
2119
|
-
} } },
|
|
2120
|
-
const n = C("el-button"),
|
|
2121
|
-
return
|
|
2128
|
+
} } }, Lr = { class: "oss-upload" }, Dr = { class: "cv-upload-task-hd-title" }, Tr = { class: "cv-upload-task-hd-num" }, Fr = { class: "cv-upload-task-opts" }, Or = { class: "cv-upload-task-lists" }, $r = { class: "cv-upload-task-item-name" }, Nr = { class: "name" }, Mr = { class: "file-name-item" }, Br = { key: 0, class: "speed" }, Er = { key: 1, class: "speed" }, zr = { key: 2, class: "success" }, Ar = { class: "total" }, Hr = { key: 0, class: "name error" }, Pr = { class: "cv-upload-task-item-tool" }, jr = ["onClick"], Rr = ["onClick"], Zt = V({ name: "cvUploadOss", mixins: [Ir] }, [["render", function(e, t, o, l, i, a) {
|
|
2129
|
+
const n = C("el-button"), c = C("el-upload"), p = C("el-progress"), h = C("cv-icons"), m = C("el-dialog");
|
|
2130
|
+
return r(), u("div", Lr, [b(c, { ref: "upload", action: "", "show-file-list": !1, multiple: "", "on-change": e.handleChange, "before-upload": e.handleBeforeUpload, "auto-upload": !1, limit: 100, "on-exceed": e.handleExceed, accept: e.accept }, { default: v(() => [b(n, { type: "primary", icon: "ElIconUpload", round: "" }, { default: v(() => t[1] || (t[1] = [F("上 传")])), _: 1, __: [1] })]), _: 1 }, 8, ["on-change", "before-upload", "on-exceed", "accept"]), b(m, { modelValue: e.dialogVisible, "onUpdate:modelValue": t[0] || (t[0] = (f) => e.dialogVisible = f), width: "650px", height: "500", "destroy-on-close": "", "close-on-click-modal": !1, "before-close": e.handleClose, style: { height: "500px" } }, { header: v(() => [d("div", Dr, [t[2] || (t[2] = d("span", null, "上传", -1)), d("span", Tr, L(e.fileList.length - e.unList.length) + "/" + L(e.fileList.length), 1)])]), default: v(() => [d("div", Fr, [b(n, { type: "primary", icon: "ElIconVideoPlay", disabled: e.uploadDisabled, onClick: e.starUpload }, { default: v(() => t[3] || (t[3] = [F("开始上传")])), _: 1, __: [3] }, 8, ["disabled", "onClick"]), b(n, { type: "success", icon: "ElIconRefreshRight", disabled: e.resumeDisabled, onClick: e.resumeUpload }, { default: v(() => t[4] || (t[4] = [F("继续")])), _: 1, __: [4] }, 8, ["disabled", "onClick"]), b(n, { type: "danger", icon: "ElIconVideoPause", disabled: e.pauseDisabled, onClick: e.stopUpload }, { default: v(() => t[5] || (t[5] = [F("暂停")])), _: 1, __: [5] }, 8, ["disabled", "onClick"])]), d("div", Or, [(r(!0), u($, null, M(e.fileList, (f, g) => (r(), u("div", { class: "cv-upload-task-item-box", key: g }, [d("div", $r, [d("div", Nr, [d("span", Mr, L(g + 1) + "." + L(f.name), 1), f.isLoading && !f.isPlay ? (r(), u("span", Br, "准备就绪")) : w("", !0), f.isPlay && f.percentage !== 100 ? (r(), u("span", Er, L(f.speed) + "/s", 1)) : w("", !0), f.percentage === 100 ? (r(), u("span", zr, "完成")) : w("", !0), d("div", Ar, L(e.filterSize(f.size)), 1)]), f.errMsg ? (r(), u("span", Hr, L(f.errMsg), 1)) : w("", !0), f.percentage < 100 && !f.errMsg ? (r(), S(p, { key: 1, percentage: f.percentage }, null, 8, ["percentage"])) : (r(), S(p, { key: 2, percentage: f.percentage, status: f.errMsg ? "exception" : "success" }, null, 8, ["percentage", "status"]))]), d("div", Pr, [!f.percentage || 0 < f.percentage < 100 && !f.isPlay ? (r(), u("span", { key: 0, class: "icon delete", onClick: (k) => e.handleDeleteChangeFile(g) }, [b(h, { type: "ElIconClose" })], 8, jr)) : w("", !0), f.percentage && f.percentage !== 100 ? (r(), u("span", { key: 1, class: z(["icon", f.isPlay ? "delete" : "success"]), onClick: (k) => e.handleStopChangeFile(g, f) }, [f.isPlay ? (r(), S(h, { key: 0, type: "ElIconVideoPause" })) : (r(), S(h, { key: 1, type: "ElIconCaretRight" }))], 10, Rr)) : w("", !0)])]))), 128))])]), _: 1 }, 8, ["modelValue", "before-close"])]);
|
|
2122
2131
|
}], ["__scopeId", "data-v-9c3ea43c"]]);
|
|
2123
|
-
|
|
2132
|
+
Xt.install = function(e) {
|
|
2133
|
+
e.component(Xt.name, Xt);
|
|
2134
|
+
}, qt.install = function(e) {
|
|
2124
2135
|
e.component(qt.name, qt);
|
|
2125
2136
|
}, Kt.install = function(e) {
|
|
2126
2137
|
e.component(Kt.name, Kt);
|
|
@@ -2128,10 +2139,8 @@ qt.install = function(e) {
|
|
|
2128
2139
|
e.component(Gt.name, Gt);
|
|
2129
2140
|
}, Zt.install = function(e) {
|
|
2130
2141
|
e.component(Zt.name, Zt);
|
|
2131
|
-
}, Qt.install = function(e) {
|
|
2132
|
-
e.component(Qt.name, Qt);
|
|
2133
2142
|
};
|
|
2134
|
-
const
|
|
2143
|
+
const Ur = { class: "tabs-header" }, Qt = V({ name: "cvTabsJump", props: { tabPosition: { type: String, default: "top" } }, provide() {
|
|
2135
2144
|
return { addChildComponents: (e) => {
|
|
2136
2145
|
this.childComponents.push(e);
|
|
2137
2146
|
}, clearChildClass: () => {
|
|
@@ -2144,22 +2153,22 @@ const Wr = { class: "tabs-header" }, Jt = V({ name: "cvTabsJump", props: { tabPo
|
|
|
2144
2153
|
} }, created() {
|
|
2145
2154
|
}, mounted() {
|
|
2146
2155
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2147
|
-
return
|
|
2148
|
-
}]]),
|
|
2156
|
+
return r(), u("div", { class: z(["cv-tabs-jump", a.tabPositionClass]) }, [d("div", Ur, [D(e.$slots, "default")])], 2);
|
|
2157
|
+
}]]), Wr = { name: "cvTabPane", emits: ["click"], inject: ["addChildComponents", "clearChildClass"], data: () => ({ isshow: !0, className: null }), props: { label: { type: String, default: "" }, current: { type: Boolean, default: !1 }, name: { type: String } }, mounted() {
|
|
2149
2158
|
this.addChildComponents(this), this.initCurrent();
|
|
2150
2159
|
}, methods: { initCurrent() {
|
|
2151
2160
|
this.current && this.handleClick();
|
|
2152
2161
|
}, handleClick() {
|
|
2153
2162
|
this.clearChildClass(), this.className = "active", this.$emit("click");
|
|
2154
|
-
} } },
|
|
2155
|
-
return N((
|
|
2163
|
+
} } }, Yr = { key: 1 }, Jt = V(Wr, [["render", function(e, t, o, l, i, a) {
|
|
2164
|
+
return N((r(), u("div", { class: z(["cv-tab-pane", i.className]), onClick: t[0] || (t[0] = (...n) => a.handleClick && a.handleClick(...n)) }, [e.$slots.label ? D(e.$slots, "label", { key: 0 }) : (r(), u("span", Yr, L(o.label), 1))], 2)), [[H, i.isshow]]);
|
|
2156
2165
|
}]]);
|
|
2157
|
-
|
|
2166
|
+
Qt.install = function(e) {
|
|
2167
|
+
e.component(Qt.name, Qt);
|
|
2168
|
+
}, Jt.install = function(e) {
|
|
2158
2169
|
e.component(Jt.name, Jt);
|
|
2159
|
-
}, eo.install = function(e) {
|
|
2160
|
-
e.component(eo.name, eo);
|
|
2161
2170
|
};
|
|
2162
|
-
const
|
|
2171
|
+
const Xr = { class: "cv-draw-captcha" }, qr = ["width", "height"], eo = V({ name: "cvDrawCaptcha", props: { modelValue: { type: [String, Number], default: "1234" }, baseCode: { type: String, default: "1234567890ABCDEFGHGKMNPQRSTUVWXY" }, fontSizeMin: { type: Number, default: 25 }, fontSizeMax: { type: Number, default: 30 }, backgroundColorMin: { type: Number, default: 255 }, backgroundColorMax: { type: Number, default: 255 }, colorMin: { type: Number, default: 0 }, colorMax: { type: Number, default: 160 }, lineColorMin: { type: Number, default: 100 }, lineColorMax: { type: Number, default: 255 }, dotColorMin: { type: Number, default: 0 }, dotColorMax: { type: Number, default: 255 }, contentWidth: { type: Number, default: 112 }, contentHeight: { type: Number, default: 31 }, refreshNum: { type: Number, default: 1 } }, data: () => ({ localCode: "" }), watch: { modelValue(e) {
|
|
2163
2172
|
this.localCode = e, this.drawPic();
|
|
2164
2173
|
}, refreshNum() {
|
|
2165
2174
|
this.refreshCode(), this.drawPic();
|
|
@@ -2188,16 +2197,16 @@ const qr = { class: "cv-draw-captcha" }, Kr = ["width", "height"], to = V({ name
|
|
|
2188
2197
|
}, drawDot(e) {
|
|
2189
2198
|
for (let t = 0; t < 80; t++) e.fillStyle = this.randomColor(0, 255), e.beginPath(), e.arc(this.randomNum(0, this.contentWidth), this.randomNum(0, this.contentHeight), 1, 0, 2 * Math.PI), e.fill();
|
|
2190
2199
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
2191
|
-
return
|
|
2192
|
-
}]]),
|
|
2193
|
-
return
|
|
2200
|
+
return r(), u("div", Xr, [d("canvas", { id: "cv-draw-captcha", width: o.contentWidth, height: o.contentHeight, onClick: t[0] || (t[0] = (...n) => a.refreshCode && a.refreshCode(...n)) }, null, 8, qr)]);
|
|
2201
|
+
}]]), to = V({ name: "cvDrawQrcode", data: () => ({}) }, [["render", function(e, t, o, l, i, a) {
|
|
2202
|
+
return r(), u("div", null, "二维码");
|
|
2194
2203
|
}]]);
|
|
2195
|
-
|
|
2204
|
+
eo.install = function(e) {
|
|
2205
|
+
e.component(eo.name, eo);
|
|
2206
|
+
}, to.install = function(e) {
|
|
2196
2207
|
e.component(to.name, to);
|
|
2197
|
-
}, oo.install = function(e) {
|
|
2198
|
-
e.component(oo.name, oo);
|
|
2199
2208
|
};
|
|
2200
|
-
const
|
|
2209
|
+
const Kr = { name: "cvTagBase", mixins: [], components: {}, emits: ["update:modelValue", "exceed-max-length"], props: { ...rn.props, modelValue: { type: [Array, Object], default: () => [] }, closable: { type: Boolean, default: !1 }, disableTransitions: { type: Boolean, default: !1 }, effect: { type: String, default: "light" }, color: { type: String, default: "" }, hit: { type: Boolean, default: !1 }, type: { type: [String], default: "primary" }, size: { type: [String], default: "large" }, disabled: { type: Boolean, default: !1 }, maxlength: { type: Number, default: 3, validator: (e) => e > 0 } }, watch: { modelValue() {
|
|
2201
2210
|
this.localVal = this.modelValue;
|
|
2202
2211
|
}, localVal(e) {
|
|
2203
2212
|
this.$emit("update:modelValue", e), e.length >= this.maxlength && this.$emit("exceed-max-length", e.length);
|
|
@@ -2214,14 +2223,14 @@ const Gr = { name: "cvTagBase", mixins: [], components: {}, emits: ["update:mode
|
|
|
2214
2223
|
t.length == 0 ? this.localVal.pop() : this.localVal[e] = t;
|
|
2215
2224
|
}, removeTag(e) {
|
|
2216
2225
|
this.disabled || this.localVal.splice(e, 1);
|
|
2217
|
-
} } },
|
|
2218
|
-
const n = C("el-tag"),
|
|
2219
|
-
return
|
|
2226
|
+
} } }, Gr = { class: "cv-tag-base" }, Zr = ["contenteditable", "onKeyup", "onBlur"], Qr = { key: 1, class: "cv-tag-maxlength-hint" }, oo = V(Kr, [["render", function(e, t, o, l, i, a) {
|
|
2227
|
+
const n = C("el-tag"), c = C("cv-icons");
|
|
2228
|
+
return r(), u("div", Gr, [(r(!0), u($, null, M(i.localVal, (p, h) => (r(), S(n, O({ class: "cv-tag-content" }, { ref_for: !0 }, { closable: !o.disabled && o.closable, disableTransitions: o.disableTransitions, effect: o.effect, type: o.type, color: o.color, hit: o.hit, size: o.size }, { key: h, onClose: (m) => a.removeTag(h), disabled: o.disabled }), { default: v(() => [d("div", { class: "cv-tag-item", contenteditable: !o.disabled && "plaintext-only", ref_for: !0, ref: `newTag${h}`, onKeyup: $e((m) => !o.disabled && a.checkTag(h), ["enter"]), onBlur: (m) => !o.disabled && a.checkTag(h) }, L(p), 41, Zr)]), _: 2 }, 1040, ["onClose", "disabled"]))), 128)), !o.disabled && i.localVal.length < o.maxlength ? (r(), S(c, { key: 0, type: "ElIconCirclePlus", size: "20", onClick: t[0] || (t[0] = (p) => a.addTag()) })) : w("", !0), !o.disabled && i.localVal.length >= o.maxlength ? (r(), u("span", Qr, "已达到最大数量 (" + L(o.maxlength) + ")", 1)) : w("", !0)]);
|
|
2220
2229
|
}]]);
|
|
2221
|
-
|
|
2222
|
-
e.component(
|
|
2230
|
+
oo.install = function(e) {
|
|
2231
|
+
e.component(oo.name, oo);
|
|
2223
2232
|
};
|
|
2224
|
-
const
|
|
2233
|
+
const Jr = { name: "cvTransferTable", props: { modelValue: { type: [Array], default: () => [] }, showQuery: { type: Boolean, default: !1 }, showPagination: { type: Boolean, default: !1 }, paginationCallBack: { type: Function, default: function() {
|
|
2225
2234
|
return new Promise((e, t) => {
|
|
2226
2235
|
try {
|
|
2227
2236
|
e({ total: 0, data: null });
|
|
@@ -2301,16 +2310,16 @@ const ec = { name: "cvTransferTable", props: { modelValue: { type: [Array], defa
|
|
|
2301
2310
|
for (const e in this.leftQueryCondition) this.leftQueryCondition[e] = void 0;
|
|
2302
2311
|
for (const e in this.rightQueryCondition) this.rightQueryCondition[e] = void 0;
|
|
2303
2312
|
this.pageIndex = 1, this.handlePaginationCallBack();
|
|
2304
|
-
} } },
|
|
2305
|
-
const n = C("el-button"),
|
|
2306
|
-
return
|
|
2313
|
+
} } }, ec = { class: "cv-transfer-table" }, tc = { class: "transfer-panel" }, oc = { class: "transfer-panel-header" }, ic = { key: 0 }, ac = { style: { padding: "5px" } }, lc = { class: "transfer-buttons" }, nc = { key: 0, class: "button-text" }, sc = { key: 0, class: "button-text" }, rc = { class: "transfer-panel" }, cc = { class: "transfer-panel-header" }, dc = { key: 0 }, hc = { style: { padding: "5px" } }, io = V(Jr, [["render", function(e, t, o, l, i, a) {
|
|
2314
|
+
const n = C("el-button"), c = C("el-form-item"), p = C("el-form"), h = C("el-table-column"), m = C("el-table"), f = C("el-pagination"), g = C("cv-icons");
|
|
2315
|
+
return r(), u("div", ec, [d("div", tc, [d("p", oc, [d("span", null, L(o.titleTexts && o.titleTexts[0]), 1), d("span", null, L(i.leftSelection.length) + "/" + L(i.leftTableData.length), 1)]), o.showQuery ? (r(), u("div", ic, [b(p, { inline: !0, model: i.leftQueryCondition, class: "cv-transfer-form" }, { default: v(() => [D(e.$slots, "leftCondition", { scope: i.leftQueryCondition }), b(c, null, { default: v(() => [b(n, { type: "primary", onClick: t[0] || (t[0] = (k) => a.onLeftQuerySubmit()) }, { default: v(() => [F(L(o.queryTexts[0]), 1)]), _: 1 })]), _: 1 })]), _: 3 }, 8, ["model"])])) : w("", !0), b(m, { ref: "leftTable", "max-height": o.maxHeight, height: o.minHeight, data: i.leftTableData, "row-key": o.tableRowKey, "row-style": a.handleRowStyle, onRowClick: a.handleLeftRowClick, onSelectionChange: a.handleLeftSelectionChange, border: "", stripe: "" }, { default: v(() => [b(h, { width: "40px", type: "selection", selectable: a.handleSelectable }, null, 8, ["selectable"]), (r(!0), u($, null, M(o.leftColumns, (k) => (r(), S(h, { prop: k.id, key: k.id, label: k.label, width: k.width }, { default: v((x) => [D(e.$slots, "default", { scope: { row: x.row, col: k } }, () => [d("span", null, L(x.row[k.id]), 1)])]), _: 2 }, 1032, ["prop", "label", "width"]))), 128))]), _: 3 }, 8, ["max-height", "height", "data", "row-key", "row-style", "onRowClick", "onSelectionChange"]), d("div", ac, [o.showPagination ? (r(), S(f, { key: 0, onSizeChange: a.handleSizeChange, onCurrentChange: a.handleCurrentChange, "current-page": i.pageIndex, "page-sizes": [10, 20, 50, 100], "page-size": i.pageSize, "pager-count": 5, total: i.totalSize, layout: "total, sizes, prev, pager, next" }, null, 8, ["onSizeChange", "onCurrentChange", "current-page", "page-size", "total"])) : w("", !0)])]), d("div", lc, [b(n, { type: "primary", class: z(a.buttonClasses), disabled: a.disabledLeftButton, onClick: a.addToRight }, { default: v(() => [o.buttonTexts[0] !== void 0 ? (r(), u("span", nc, L(o.buttonTexts[0]), 1)) : w("", !0), b(g, { type: "ElIconArrowRight" })]), _: 1 }, 8, ["class", "disabled", "onClick"]), b(n, { type: "primary", class: z(a.buttonClasses), disabled: i.rightSelection.length === 0, onClick: a.addToLeft }, { default: v(() => [b(g, { type: "ElIconArrowLeft" }), o.buttonTexts[1] !== void 0 ? (r(), u("span", sc, L(o.buttonTexts[1]), 1)) : w("", !0)]), _: 1 }, 8, ["class", "disabled", "onClick"])]), d("div", rc, [d("p", cc, [d("span", null, L(o.titleTexts && o.titleTexts[1]), 1), d("span", null, L(i.rightSelection.length) + "/" + L(i.rightTableData.length), 1)]), o.showQuery ? (r(), u("div", dc, [b(p, { inline: !0, model: i.rightQueryCondition, class: "cv-transfer-form" }, { default: v(() => [D(e.$slots, "rightCondition", { scope: i.rightQueryCondition }), b(c, null, { default: v(() => [b(n, { type: "primary", onClick: t[1] || (t[1] = (k) => a.onRightQuerySubmit()) }, { default: v(() => [F(L(o.queryTexts[1]), 1)]), _: 1 })]), _: 1 })]), _: 3 }, 8, ["model"])])) : w("", !0), b(m, { ref: "rightTable", "max-height": o.maxHeight, height: o.minHeight, data: a.calcRightTableData, "row-key": o.tableRowKey, onRowClick: a.handleRightRowClick, onSelectionChange: a.handleRightSelectionChange, border: "", stripe: "" }, { default: v(() => [b(h, { width: "40px", type: "selection" }), (r(!0), u($, null, M(o.rightColumns || o.leftColumns, (k) => (r(), S(h, { prop: k.id, key: k.id, label: k.label, width: k.width }, { default: v((x) => [D(e.$slots, "default", { scope: { row: x.row, col: k } }, () => [d("span", null, L(x.row[k.id]), 1)])]), _: 2 }, 1032, ["prop", "label", "width"]))), 128))]), _: 3 }, 8, ["max-height", "height", "data", "row-key", "onRowClick", "onSelectionChange"]), d("div", hc, [o.showPagination ? (r(), S(f, { key: 0, total: i.rightTableData.length, layout: "total" }, null, 8, ["total"])) : w("", !0)])])]);
|
|
2307
2316
|
}]]);
|
|
2308
|
-
|
|
2309
|
-
e.component(
|
|
2317
|
+
io.install = function(e) {
|
|
2318
|
+
e.component(io.name, io);
|
|
2310
2319
|
};
|
|
2311
|
-
const
|
|
2320
|
+
const zi = { provide() {
|
|
2312
2321
|
return { pageCurr: this.loadConfigSetting.pageCurr || 1, pageLimit: this.loadConfigSetting.pageLimit || 10 };
|
|
2313
|
-
}, props: { ...
|
|
2322
|
+
}, props: { ...cn.props, modelValue: { type: [Array, Object], default: () => [] }, headerCellStyle: { type: [Function, Object], default: () => ({}) } }, data: () => ({ loadDataList: [] }), watch: { modelValue(e) {
|
|
2314
2323
|
this.loadDataList = e;
|
|
2315
2324
|
}, loadDataList(e) {
|
|
2316
2325
|
this.$emit("update:modelValue", e);
|
|
@@ -2324,7 +2333,7 @@ const Ai = { provide() {
|
|
|
2324
2333
|
this.loadPageCurr = e, this.getData();
|
|
2325
2334
|
}, handleSizeChange(e) {
|
|
2326
2335
|
this.loadPageLimit = e, this.getData();
|
|
2327
|
-
} } },
|
|
2336
|
+
} } }, pc = { name: "cvTableBase", mixins: [Po, zi], props: { align: { type: String, default: "left" }, showPagebreak: { type: [Boolean, String], default: !0 }, tablePagin: { type: Object, default: () => ({}) }, tableConfig: { type: Object, default: () => ({}) }, tableRefresh: { type: Number, default: () => 0 } }, data: () => ({ paginationGroup: [10, 20, 30, 50, 100, 200], paginationCount: 7, searchData: {}, tableConfDef: {} }), watch: { tableRefresh(e, t) {
|
|
2328
2337
|
this.initConfAll(), this.refresh();
|
|
2329
2338
|
} }, updated() {
|
|
2330
2339
|
}, created() {
|
|
@@ -2343,10 +2352,10 @@ const Ai = { provide() {
|
|
|
2343
2352
|
this.searchData = {}, this.page = 1, this.getData();
|
|
2344
2353
|
}, refresh(e) {
|
|
2345
2354
|
this.getData();
|
|
2346
|
-
} } },
|
|
2347
|
-
const n = C("el-table"),
|
|
2348
|
-
return
|
|
2349
|
-
}]]),
|
|
2355
|
+
} } }, uc = { class: "cv-table-list" }, mc = { key: 0, class: "cv-tablie-list-page page" }, ao = V(pc, [["render", function(e, t, o, l, i, a) {
|
|
2356
|
+
const n = C("el-table"), c = C("cv-icons"), p = C("el-button"), h = C("el-pagination"), m = ae("loading");
|
|
2357
|
+
return r(), u("div", uc, [N((r(), S(n, O(e.$props, { data: e.loadDataList, style: { width: "100%" }, onSelectionChange: a.handleSelectionChange }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["data", "onSelectionChange"])), [[m, e.loadDataLoading]]), o.showPagebreak ? N((r(), u("div", mc, [b(p, { onClick: a.refresh, style: { float: "left", margin: "0 10px 0 0", padding: "5px 10px" } }, { default: v(() => [b(c, { type: "ElIconRefresh", size: "14" })]), _: 1 }, 8, ["onClick"]), b(h, { background: "", onSizeChange: e.handleSizeChange, onCurrentChange: e.handleCurrentChange, "pager-count": i.paginationCount, "page-sizes": i.paginationGroup, "current-page": e.loadPageCurr, "page-size": e.loadPageLimit, layout: "total, sizes, prev, pager, next, jumper", total: e.loadDataTotal }, null, 8, ["onSizeChange", "onCurrentChange", "pager-count", "page-sizes", "current-page", "page-size", "total"])], 512)), [[H, e.loadDataLoading === !1]]) : w("", !0)]);
|
|
2358
|
+
}]]), gc = { class: "cv-table-tree" }, lo = V({ name: "cvTableTree", mixins: [Po, zi], props: { tableConfig: { type: Object, default: () => ({}) }, tableRefresh: { type: Number, default: () => 0 } }, data: () => ({ searchData: {}, tableConfDef: { tablePrimary: "", childName: "children" }, pager_count: 7, page: 1 }), watch: { tableRefresh(e, t) {
|
|
2350
2359
|
this.refresh();
|
|
2351
2360
|
} }, created() {
|
|
2352
2361
|
this.initConfAll(), this.getData();
|
|
@@ -2365,9 +2374,9 @@ const Ai = { provide() {
|
|
|
2365
2374
|
}, refresh(e) {
|
|
2366
2375
|
this.getData();
|
|
2367
2376
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
2368
|
-
const n = C("el-table"),
|
|
2369
|
-
return
|
|
2370
|
-
}]]),
|
|
2377
|
+
const n = C("el-table"), c = ae("loading");
|
|
2378
|
+
return r(), u("div", gc, [N((r(), S(n, O(e.$props, { data: e.loadDataList, style: { width: "100%" }, onSelectionChange: a.handleSelectionChange, "row-key": e.loadConfigSetting.tablePrimary, "tree-props": { children: e.loadConfigSetting.childName, hasChildren: "hasChildren" } }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["data", "onSelectionChange", "row-key", "tree-props"])), [[c, e.loadDataLoading]])]);
|
|
2379
|
+
}]]), fc = { name: "cvTableEditor", mixins: [Po, zi], props: { border: { type: [Boolean], default: !0 }, tableConfig: { type: [Array, Object], default: () => ({}) } }, data: () => ({ mergeRules: {}, apiFunc: null, tableConfDef: {}, cell_click_index: null, cell_click_label: "" }), watch: {}, created() {
|
|
2371
2380
|
this.loadConfigSetting = Object.assign({}, this.tableConfDef, this.tableConfig);
|
|
2372
2381
|
}, mounted() {
|
|
2373
2382
|
}, methods: { cell_click(e, t, o, l) {
|
|
@@ -2380,27 +2389,27 @@ const Ai = { provide() {
|
|
|
2380
2389
|
return;
|
|
2381
2390
|
}
|
|
2382
2391
|
}, handleChangeTData(e) {
|
|
2383
|
-
} } },
|
|
2384
|
-
const n = C("el-table"),
|
|
2385
|
-
return
|
|
2386
|
-
}]]),
|
|
2392
|
+
} } }, vc = { class: "cv-table-editor" }, no = V(fc, [["render", function(e, t, o, l, i, a) {
|
|
2393
|
+
const n = C("el-table"), c = ae("loading");
|
|
2394
|
+
return r(), u("div", vc, [N((r(), S(n, O(e.$props, { data: e.loadDataList, style: { width: "100%" }, "row-class-name": "cv-tbed-tr" }), { default: v(() => [D(e.$slots, "default")]), _: 3 }, 16, ["data"])), [[c, e.loadDataLoading]])]);
|
|
2395
|
+
}]]), so = V({ name: "cvTbColumnIndex", inject: { pageCurr: { default: 1 }, pageLimit: { default: 10 } }, props: { ...Z.props, fixed: { type: [String], default: "left" }, align: { type: String, default: "center" }, width: { type: [String, Number], default: 55 }, continuity: { type: [Boolean, String], default: !1 } }, data: () => ({}), created() {
|
|
2387
2396
|
}, methods: { indexMethod(e) {
|
|
2388
2397
|
return this.continuity && this.pageCurr && this.pageLimit ? e + 1 + (this.pageCurr - 1) * this.pageLimit : e + 1;
|
|
2389
2398
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
2390
2399
|
const n = C("el-table-column");
|
|
2391
|
-
return
|
|
2392
|
-
}]]),
|
|
2400
|
+
return r(), S(n, O(e.$props, { type: "index", index: a.indexMethod }), null, 16, ["index"]);
|
|
2401
|
+
}]]), ro = V({ name: "cvTbColumnCheck", props: { ...Z.props, fixed: { type: [String], default: "left" }, align: { type: [String], default: "center" }, width: { type: [String, Number], default: 55 } }, data: () => ({}), created() {
|
|
2393
2402
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2394
2403
|
const n = C("el-table-column");
|
|
2395
|
-
return
|
|
2396
|
-
}]]),
|
|
2404
|
+
return r(), S(n, O(e.$props, { type: "selection" }), null, 16);
|
|
2405
|
+
}]]), yc = { name: "cvTbColumnText", props: { ...Z.props }, data: () => ({}), created() {
|
|
2397
2406
|
}, methods: { getContentText(e) {
|
|
2398
2407
|
let t = e.row[this.prop];
|
|
2399
2408
|
return this.formatter && (t = this.formatter(e.row, e.column)), t;
|
|
2400
|
-
} } },
|
|
2409
|
+
} } }, bc = { style: { display: "contents" } }, co = V(yc, [["render", function(e, t, o, l, i, a) {
|
|
2401
2410
|
const n = C("el-table-column");
|
|
2402
|
-
return
|
|
2403
|
-
}]]),
|
|
2411
|
+
return r(), S(n, U(Y(e.$props)), { default: v((c) => [d("div", bc, L(c.row[e.prop]), 1)]), _: 1 }, 16);
|
|
2412
|
+
}]]), Cc = { name: "cvTbColumnImg", props: { ...Z.props, imgWidth: { type: [String, Number], default: null }, imgHeight: { type: [String, Number], default: null } }, data: () => ({ localImgWidth: "50px", localImgHeight: "50px", localImgArr: [], localImgOne: "" }), created() {
|
|
2404
2413
|
this.imgWidth && (this.localImgWidth = this.imgWidth.indexOf("px") !== -1 ? this.imgWidth : this.imgWidth + "px"), this.imgHeight && (this.localImgHeight = this.imgHeight.indexOf("px") !== -1 ? this.imgHeight : this.imgHeight + "px");
|
|
2405
2414
|
}, methods: { handleImgOne(e) {
|
|
2406
2415
|
let t = e[this.prop] || null;
|
|
@@ -2417,29 +2426,29 @@ const Ai = { provide() {
|
|
|
2417
2426
|
}, handleImgLeng(e) {
|
|
2418
2427
|
let t = e[this.prop] || null;
|
|
2419
2428
|
return t ? Object.prototype.toString.call(t) === "[object Array]" ? t.length : Object.prototype.toString.call(t) === "[object String]" ? 1 : void 0 : 0;
|
|
2420
|
-
} } },
|
|
2421
|
-
const n = C("el-image"),
|
|
2422
|
-
return
|
|
2423
|
-
}]]),
|
|
2429
|
+
} } }, wc = { key: 0, class: "cv-table-column-img-mark" }, kc = { class: "cv-table-column-img-text" }, ho = V(Cc, [["render", function(e, t, o, l, i, a) {
|
|
2430
|
+
const n = C("el-image"), c = C("el-table-column");
|
|
2431
|
+
return r(), S(c, U(Y(e.$props)), { default: v((p) => [d("div", { class: "cv-table-column-img-box", style: A({ width: i.localImgWidth, height: i.localImgHeight }) }, [b(n, { style: A({ width: i.localImgWidth, height: i.localImgHeight }), fit: "scale-down", lazy: "", src: a.handleImgOne(p.row), "preview-src-list": a.handleImgArr(p.row) }, { error: v(() => t[0] || (t[0] = [d("span", { class: "el-image__error cv-table-column-img-err" }, [F(" 暂无 "), d("br"), F(" 图片 ")], -1)])), _: 2 }, 1032, ["style", "src", "preview-src-list"]), a.handleImgLeng(p.row) > 1 ? (r(), u("p", wc, [d("span", kc, L(a.handleImgLeng(p.row)) + "张", 1)])) : w("", !0)], 4)]), _: 1 }, 16);
|
|
2432
|
+
}]]), po = V({ name: "cvTbColumnOpt", props: { ...Z.props, fixed: { type: [String], default: "right" }, label: { type: [String], default: "操作" } }, data: () => ({}), created() {
|
|
2424
2433
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2425
2434
|
const n = C("el-table-column");
|
|
2426
|
-
return
|
|
2427
|
-
}]]),
|
|
2435
|
+
return r(), S(n, U(Y(e.$props)), { default: v((c) => [D(e.$slots, "default", U(Y({ row: c.row, $index: c.$index, scope: c })))]), _: 3 }, 16);
|
|
2436
|
+
}]]), uo = V({ name: "cvTbColumnBase", props: { ...Z.props, width: { type: [String, Number], default: "" } }, data: () => ({}), created() {
|
|
2428
2437
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2429
2438
|
const n = C("el-table-column");
|
|
2430
|
-
return
|
|
2431
|
-
}]]),
|
|
2439
|
+
return r(), S(n, U(Y(e.$props)), { default: v((c) => [D(e.$slots, "default", U(Y({ row: c.row, $index: c.$index, scope: c })))]), _: 3 }, 16);
|
|
2440
|
+
}]]), mo = V({ name: "cvTbColumnExpand", props: { ...Z.props }, data: () => ({}), created() {
|
|
2432
2441
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2433
2442
|
const n = C("el-table-column");
|
|
2434
|
-
return
|
|
2435
|
-
}]]),
|
|
2443
|
+
return r(), S(n, O(e.$props, { type: "expand" }), { default: v((c) => [D(e.$slots, "default", U(Y({ row: c.row, $index: c.$index, props: c })))]), _: 3 }, 16);
|
|
2444
|
+
}]]), go = V({ name: "cvTbColumnEnum", props: { ...Z.props, dataLists: { type: [Object, Array], default: () => ({}) } }, data: () => ({}), created() {
|
|
2436
2445
|
}, methods: { dealTypeEnum(e) {
|
|
2437
2446
|
let t = Object.keys(this.dataLists);
|
|
2438
2447
|
return e[this.prop] ? this.dataLists[e[this.prop]] || "" : this.dataLists[t[0]] || "";
|
|
2439
2448
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
2440
2449
|
const n = C("el-table-column");
|
|
2441
|
-
return
|
|
2442
|
-
}]]),
|
|
2450
|
+
return r(), S(n, U(Y(e.$props)), { default: v((c) => [d("span", null, L(a.dealTypeEnum(c.row)), 1)]), _: 1 }, 16);
|
|
2451
|
+
}]]), xc = { name: "cvTbEditSearch", props: { ...Z.props, modelValue: { type: [String], default: "" }, align: { type: [String], default: "left" } }, data: () => ({ isEditIndex: null, localVal: "", autocompleteAttr: { debounce: 0 }, searchSett: { searchFunc: null, searchParam: {}, searchMockData: null, searchField: {} }, searchResList: [], searchCurrClass: "", searchCurrTbIndex: 0, searchIsSelect: !1 }), watch: { modelValue(e) {
|
|
2443
2452
|
}, localVal(e) {
|
|
2444
2453
|
this.$emit("update:modelValue", e);
|
|
2445
2454
|
} }, directives: { edfocus: { mounted: (e) => {
|
|
@@ -2476,8 +2485,8 @@ const Ai = { provide() {
|
|
|
2476
2485
|
if (this.searchResList.length > 0) {
|
|
2477
2486
|
for (let a in this.searchResList) {
|
|
2478
2487
|
let n = this.searchResList[a];
|
|
2479
|
-
const
|
|
2480
|
-
n.row_price = n[
|
|
2488
|
+
const c = i.searchField.row_price;
|
|
2489
|
+
n.row_price = n[c];
|
|
2481
2490
|
const p = i.searchField.row_stock;
|
|
2482
2491
|
n.row_stock = n[p];
|
|
2483
2492
|
const h = i.searchField.row_attr;
|
|
@@ -2496,10 +2505,10 @@ const Ai = { provide() {
|
|
|
2496
2505
|
}, 600);
|
|
2497
2506
|
}, inputSearchFilter: (e) => (t) => t.value.toLowerCase().indexOf(e.toLowerCase()) === 0, searchIconClick() {
|
|
2498
2507
|
this.isEditIndex = null;
|
|
2499
|
-
} } },
|
|
2500
|
-
const n = C("ElIconCircleClose"),
|
|
2501
|
-
return
|
|
2502
|
-
}]]),
|
|
2508
|
+
} } }, Sc = { class: "name" }, Vc = { class: "addr" }, _c = { class: "addr" }, Ic = { class: "droplist-item" }, Lc = { class: "name" }, Dc = { key: 0, class: "attr" }, Tc = { class: "price" }, Fc = { class: "rest" }, Oc = ["onClick"], fo = V(xc, [["render", function(e, t, o, l, i, a) {
|
|
2509
|
+
const n = C("ElIconCircleClose"), c = C("el-icon"), p = C("el-autocomplete"), h = C("el-table-column");
|
|
2510
|
+
return r(), S(h, O(e.$props, { "class-name": "cv-table-editor-search-column" }), { default: v((m) => [i.isEditIndex == m.$index ? (r(), S(p, O({ key: 0, ref: `cv-tbce-autocomplete${m.$index}` }, i.autocompleteAttr, { modelValue: m.row[e.prop], "onUpdate:modelValue": (f) => m.row[e.prop] = f, "popper-class": `cv-tbce-autocomplete cvtegac${m.$index}`, "fetch-suggestions": a.searchQuery, onSelect: (f) => a.searchSelect(f, m.row, m.$index), onFocus: (f) => a.searchFocus(m.$index, f), onBlur: (f) => a.searchBlur(m.row, m.$index) }), { suffix: v(() => [b(c, { onClick: (f) => a.searchIconClick(m.row, m.$index) }, { default: v(() => [b(n)]), _: 2 }, 1032, ["onClick"])]), default: v(({ item: f }) => [D(e.$slots, "default", { item: f }, () => [d("div", Sc, L(f.row_name), 1), d("span", Vc, "价格:" + L(f.row_price), 1), d("span", _c, L(f.row_rest), 1), d("div", Ic, [d("div", Lc, [F(L(f.row_name) + " ", 1), f.row_attr ? (r(), u("div", Dc, "[ " + L(f.row_attr) + "]", 1)) : w("", !0)]), d("div", Tc, "¥ " + L(f.row_price), 1), d("div", Fc, L(f.attr_stock), 1)])])]), _: 2 }, 1040, ["modelValue", "onUpdate:modelValue", "popper-class", "fetch-suggestions", "onSelect", "onFocus", "onBlur"])) : (r(), u("span", { key: 1, class: "showtext", onClick: (f) => a.searchEdit(m.row, m.$index) }, L(m.row[e.prop]), 9, Oc))]), _: 3 }, 16);
|
|
2511
|
+
}]]), vo = V({ name: "cvTbEditOpt", props: { tableData: { type: [Array], default: () => [] }, ...Z.props, label: { type: [String], default: "操作" }, align: { type: [String], default: "center" }, width: { type: [String], default: "100" }, fixed: { type: [String], default: "left" }, btnAdd: { type: [Boolean, String], default: !0 }, btnDel: { type: [Boolean, String], default: !0 } }, data: () => ({ localTbData: [] }), watch: { tableData(e) {
|
|
2503
2512
|
this.localTbData = e;
|
|
2504
2513
|
} }, created() {
|
|
2505
2514
|
this.localTbData = this.tableData;
|
|
@@ -2508,9 +2517,9 @@ const Ai = { provide() {
|
|
|
2508
2517
|
}, optHdAdd() {
|
|
2509
2518
|
this.localTbData.push({});
|
|
2510
2519
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
2511
|
-
const n = C("cv-icons"),
|
|
2512
|
-
return
|
|
2513
|
-
}]]),
|
|
2520
|
+
const n = C("cv-icons"), c = C("el-button"), p = C("el-table-column");
|
|
2521
|
+
return r(), S(p, U(Y(e.$props)), { default: v((h) => [o.btnAdd ? (r(), S(c, { key: 0, plain: "", style: { padding: "5px", width: "26px", height: "26px" }, onClick: t[0] || (t[0] = (m) => a.optHdAdd()) }, { default: v(() => [b(n, { type: "ElIconPlus" })]), _: 1 })) : w("", !0), o.btnDel ? (r(), S(c, { key: 1, plain: "", style: { padding: "5px", width: "26px", height: "26px" }, onClick: (m) => a.optHdDelete(h.$index, h.row) }, { default: v(() => [b(n, { type: "ElIconClose" })]), _: 2 }, 1032, ["onClick"])) : w("", !0)]), _: 1 }, 16);
|
|
2522
|
+
}]]), $c = { name: "cvTbEditText", props: { ...Z.props, width: { type: [String, Number], default: "" }, editAttr: { type: [Object], default: () => ({ placeholder: "请输入" }) }, editClearable: { type: [Boolean], default: !0 }, editStyle: { type: [Object], default: () => ({ "--el-input-border": 0, "--el-input-border-radius": 0, "--el-input-height": "36px" }) }, editClass: { type: [Object], default: () => ({}) }, editChange: { type: [Function], default: () => {
|
|
2514
2523
|
} }, editFormatter: { type: [Function], default: () => {
|
|
2515
2524
|
} }, toFixed: { type: [String, Number], default: "" } }, data: () => ({ currValue: "", isEditIndex: null, isErrIndex: [] }), directives: { edfocus: { mounted: (e) => {
|
|
2516
2525
|
e.querySelector("input").focus();
|
|
@@ -2546,31 +2555,33 @@ const Ai = { provide() {
|
|
|
2546
2555
|
this.isEditIndex = i;
|
|
2547
2556
|
} } }, this.currValue);
|
|
2548
2557
|
} } });
|
|
2549
|
-
} },
|
|
2550
|
-
const n = C("el-input"),
|
|
2551
|
-
return
|
|
2552
|
-
}]]),
|
|
2558
|
+
} }, Nc = ["onClick"], yo = V($c, [["render", function(e, t, o, l, i, a) {
|
|
2559
|
+
const n = C("el-input"), c = C("el-table-column"), p = ae("edfocus");
|
|
2560
|
+
return r(), S(c, O(e.$props, { "class-name": "cv-table-editor-text-column" }), { default: v((h) => [i.isEditIndex != h.$index || o.editAttr.disabled ? (r(), u("span", { key: 1, class: "showtext", onClick: (m) => a.textHdEdit(h.row, h.$index) }, L(h.row[e.prop]), 9, Nc)) : N((r(), S(n, O({ key: 0 }, o.editAttr, { clearable: o.editClearable, style: o.editStyle, class: o.editClass, modelValue: h.row[e.prop], "onUpdate:modelValue": (m) => h.row[e.prop] = m, onBlur: wl((m) => a.textHdSave(h.row, h.$index), ["prevent"]), onClear: (m) => a.textHdClear(h.row, h.$index) }), null, 16, ["clearable", "style", "class", "modelValue", "onUpdate:modelValue", "onBlur", "onClear"])), [[p]])]), _: 1 }, 16);
|
|
2561
|
+
}]]), bo = V({ name: "cvTbEditRadio", props: { ...Z.props, editAttr: { type: [Object], default: () => ({}) }, editStyle: { type: [Object], default: () => ({}) }, editClass: { type: [Object], default: () => ({}) }, dataLists: { type: [Object, Array], default: () => ({}) }, dataField: { type: Object, default: () => ({ label: "label", value: "value" }) }, editChange: { type: [Function], default: () => {
|
|
2553
2562
|
} }, editFormatter: { type: [Function], default: () => {
|
|
2554
2563
|
} } }, data: () => ({}), created() {
|
|
2555
2564
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2556
|
-
const n = C("el-radio"),
|
|
2557
|
-
return
|
|
2558
|
-
}]]),
|
|
2565
|
+
const n = C("el-radio"), c = C("el-radio-group"), p = C("el-table-column");
|
|
2566
|
+
return r(), S(p, U(Y(e.$props)), { default: v((h) => [b(c, O({ style: o.editStyle, class: o.editClass, modelValue: h.row[e.prop], "onUpdate:modelValue": (m) => h.row[e.prop] = m }, o.editAttr), { default: v(() => [(r(!0), u($, null, M(o.dataLists, (m, f) => (r(), S(n, { key: f, label: m[o.dataField.label], value: m[o.dataField.value] }, { default: v(() => [F(L(m[o.dataField.label]), 1)]), _: 2 }, 1032, ["label", "value"]))), 128))]), _: 2 }, 1040, ["style", "class", "modelValue", "onUpdate:modelValue"])]), _: 1 }, 16);
|
|
2567
|
+
}]]), Co = V({ name: "cvTbEditCheckbox", props: { ...Z.props, editAttr: { type: [Object], default: () => ({}) }, editStyle: { type: [Object], default: () => ({}) }, editClass: { type: [Object], default: () => ({}) }, dataLists: { type: [Object, Array], default: () => ({}) }, dataField: { type: Object, default: () => ({ label: "label", value: "value" }) }, editChange: { type: [Function], default: () => {
|
|
2559
2568
|
} }, editFormatter: { type: [Function], default: () => {
|
|
2560
2569
|
} } }, data: () => ({ localVal: [] }), created() {
|
|
2561
2570
|
}, methods: { handleParseValue(e) {
|
|
2562
2571
|
this.localVal = [];
|
|
2563
2572
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
2564
|
-
const n = C("el-checkbox"),
|
|
2565
|
-
return
|
|
2566
|
-
}]]),
|
|
2573
|
+
const n = C("el-checkbox"), c = C("el-checkbox-group"), p = C("el-table-column");
|
|
2574
|
+
return r(), S(p, U(Y(e.$props)), { default: v((h) => [h.row[e.prop] ? (r(), S(c, O({ key: 0, style: o.editStyle, class: o.editClass, modelValue: h.row[e.prop], "onUpdate:modelValue": (m) => h.row[e.prop] = m }, o.editAttr), { default: v(() => [(r(!0), u($, null, M(o.dataLists, (m, f) => (r(), S(n, { key: f, label: m[o.dataField.label], value: m[o.dataField.value] }, { default: v(() => [F(L(m[o.dataField.label]), 1)]), _: 2 }, 1032, ["label", "value"]))), 128))]), _: 2 }, 1040, ["style", "class", "modelValue", "onUpdate:modelValue"])) : w("", !0)]), _: 1 }, 16);
|
|
2575
|
+
}]]), wo = V({ name: "cvTbEditSelect", props: { ...Z.props, editAttr: { type: [Object], default: () => ({}) }, editStyle: { type: [Object], default: () => ({}) }, editClass: { type: [Object], default: () => ({}) }, dataLists: { type: [Object, Array], default: () => ({}) }, dataField: { type: Object, default: () => ({ label: "label", value: "value" }) }, editChange: { type: [Function], default: () => {
|
|
2567
2576
|
} }, editFormatter: { type: [Function], default: () => {
|
|
2568
2577
|
} } }, data: () => ({}), created() {
|
|
2569
2578
|
} }, [["render", function(e, t, o, l, i, a) {
|
|
2570
|
-
const n = C("el-option"),
|
|
2571
|
-
return
|
|
2579
|
+
const n = C("el-option"), c = C("el-select"), p = C("el-table-column");
|
|
2580
|
+
return r(), S(p, U(Y(e.$props)), { default: v((h) => [b(c, O({ style: o.editStyle, class: o.editClass, modelValue: h.row[e.prop], "onUpdate:modelValue": (m) => h.row[e.prop] = m }, o.editAttr), { default: v(() => [(r(!0), u($, null, M(o.dataLists, (m, f) => (r(), S(n, { key: f, label: m[o.dataField.label], value: m[o.dataField.value] }, { default: v(() => [F(L(m[o.dataField.label]), 1)]), _: 2 }, 1032, ["label", "value"]))), 128))]), _: 2 }, 1040, ["style", "class", "modelValue", "onUpdate:modelValue"])]), _: 1 }, 16);
|
|
2572
2581
|
}]]);
|
|
2573
|
-
|
|
2582
|
+
ao.install = function(e) {
|
|
2583
|
+
e.component(ao.name, ao);
|
|
2584
|
+
}, lo.install = function(e) {
|
|
2574
2585
|
e.component(lo.name, lo);
|
|
2575
2586
|
}, no.install = function(e) {
|
|
2576
2587
|
e.component(no.name, no);
|
|
@@ -2602,35 +2613,33 @@ lo.install = function(e) {
|
|
|
2602
2613
|
e.component(Co.name, Co);
|
|
2603
2614
|
}, wo.install = function(e) {
|
|
2604
2615
|
e.component(wo.name, wo);
|
|
2605
|
-
}, ko.install = function(e) {
|
|
2606
|
-
e.component(ko.name, ko);
|
|
2607
2616
|
};
|
|
2608
|
-
const
|
|
2609
|
-
return
|
|
2610
|
-
}]]),
|
|
2611
|
-
return
|
|
2612
|
-
}]]),
|
|
2613
|
-
return
|
|
2614
|
-
}]]),
|
|
2615
|
-
return
|
|
2616
|
-
}]]),
|
|
2617
|
-
return
|
|
2618
|
-
}]]),
|
|
2619
|
-
return
|
|
2620
|
-
}]]),
|
|
2621
|
-
return
|
|
2622
|
-
}]]),
|
|
2623
|
-
return
|
|
2624
|
-
}]]),
|
|
2625
|
-
return
|
|
2626
|
-
}]]),
|
|
2627
|
-
return
|
|
2628
|
-
}]]),
|
|
2629
|
-
const o = e, l =
|
|
2617
|
+
const Mc = { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, Bc = V({}, [["render", function(e, t) {
|
|
2618
|
+
return r(), u("svg", Mc, t[0] || (t[0] = [d("rect", { width: "12", height: "12", rx: "2", fill: "#86909C" }, null, -1), d("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.98095 5.49307L8.22012 3.25389C8.28521 3.18881 8.39074 3.18881 8.45582 3.25389L8.69153 3.4896C8.75661 3.55468 8.75661 3.66021 8.69153 3.7253L6.45235 5.96447L8.69153 8.20364C8.75661 8.26873 8.75661 8.37426 8.69153 8.43934L8.45582 8.67505C8.39074 8.74013 8.28521 8.74013 8.22012 8.67505L5.98095 6.43587L3.74178 8.67505C3.67669 8.74013 3.57116 8.74013 3.50608 8.67505L3.27037 8.43934C3.20529 8.37426 3.20529 8.26873 3.27037 8.20364L5.50954 5.96447L3.27037 3.7253C3.20529 3.66021 3.20529 3.55468 3.27037 3.4896L3.50608 3.25389C3.57116 3.18881 3.67669 3.18881 3.74178 3.25389L5.98095 5.49307Z", fill: "white" }, null, -1)]));
|
|
2619
|
+
}]]), Ec = { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "icon" }, zc = V({}, [["render", function(e, t) {
|
|
2620
|
+
return r(), u("svg", Ec, t[0] || (t[0] = [d("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z" }, null, -1)]));
|
|
2621
|
+
}]]), Ac = { class: "comment-common-icon" }, Hc = V({}, [["render", function(e, t) {
|
|
2622
|
+
return r(), u("i", Ac, t[0] || (t[0] = [d("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "" }, [d("path", { d: "M4.88933 0.613974C4.92947 0.616946 4.96831 0.629568 5.00253 0.650767C6.67348 1.68589 7.55141 3.13884 7.63632 5.00962C7.947 5.00962 8.2245 4.65999 8.46882 3.96072L8.49487 3.88447C8.53862 3.75351 8.68025 3.68282 8.8112 3.72656C8.83398 3.73417 8.85554 3.74502 8.87522 3.75878C9.96316 4.5193 10.5048 5.50231 10.5 6.70782C10.4999 6.73762 10.4982 6.76675 10.495 6.7952C10.4985 6.86294 10.5 6.93131 10.5 7.00005C10.5 9.48533 8.48528 11.5 6 11.5C3.51472 11.5 1.5 9.48533 1.5 7.00005C1.5 6.90255 1.5031 6.80578 1.50921 6.70983C1.5062 6.70917 1.5031 6.70849 1.5 6.70782C1.50864 6.60849 1.52139 6.50994 1.53824 6.41219C1.54515 6.35775 1.55321 6.30373 1.56222 6.25003L1.57017 6.24983C1.7622 5.3813 2.28426 4.57601 3.13635 3.83394C4.00892 3.07405 4.50079 2.11523 4.61198 0.957499L4.62156 0.844839C4.63175 0.707146 4.75163 0.603784 4.88933 0.613974Z" })], -1)]));
|
|
2623
|
+
}]]), Pc = { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "icon" }, jc = V({}, [["render", function(e, t) {
|
|
2624
|
+
return r(), u("svg", Pc, t[0] || (t[0] = [d("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 1.3335C14.3514 1.3335 14.6394 1.60546 14.6648 1.95041L14.6666 2.00016V14.0002C14.6666 14.3516 14.3947 14.6396 14.0497 14.665L14 14.6668H1.99998C1.64853 14.6668 1.36059 14.3949 1.33514 14.0499L1.33331 14.0002V2.00016C1.33331 1.64871 1.60527 1.36077 1.95023 1.33532L1.99998 1.3335H14ZM13.3333 2.66618H2.66664V13.3328H13.3333V2.66618ZM11.9219 6.7879C11.9719 6.83791 12 6.90574 12 6.97647V11.7993C12 11.9098 11.9104 11.9993 11.8 11.9993H6.81615C6.7975 11.9993 6.77945 11.9968 6.76232 11.992L3.91042 11.9847C3.79996 11.9844 3.71063 11.8947 3.7109 11.7842C3.71102 11.7313 3.73209 11.6807 3.76948 11.6433L6.52468 8.88807C6.62882 8.78393 6.79766 8.78393 6.9018 8.88807L8.17297 10.1593L11.5447 6.7879C11.6489 6.68376 11.8177 6.68376 11.9219 6.7879ZM5.99997 3.99951V5.99951H3.99997V3.99951H5.99997Z" }, null, -1)]));
|
|
2625
|
+
}]]), Rc = { class: "comment-common-icon" }, Uc = V({}, [["render", function(e, t) {
|
|
2626
|
+
return r(), u("i", Rc, t[0] || (t[0] = [d("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, [d("path", { d: "M586.624 234.624a74.624 74.624 0 1 1-149.184 0 74.624 74.624 0 0 1 149.12 0z m0 554.624a74.624 74.624 0 1 1-149.248 0 74.624 74.624 0 0 1 149.248 0zM512 586.624a74.624 74.624 0 1 0 0-149.248 74.624 74.624 0 0 0 0 149.248z", fill: "currentColor" })], -1)]));
|
|
2627
|
+
}]]), Wc = { class: "comment-common-icon", style: { color: "#1e80ff" } }, Yc = V({}, [["render", function(e, t) {
|
|
2628
|
+
return r(), u("i", Wc, t[0] || (t[0] = [d("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "1534" }, [d("path", { d: "M668.928 166.912c-20.48-53.504-47.9744-84.7872-82.0224-94.9248-33.5872-10.0352-61.952 4.096-76.032 13.9776-27.5456 19.3536-41.216 49.664-50.0224 74.1376-3.3792 9.3184-6.4512 19.0976-9.216 27.9552l-2.6624 8.3968a227.8912 227.8912 0 0 1-10.3936 27.9552c-25.344 52.9408-47.4112 84.5312-66.7648 104.96-18.944 19.968-36.4544 30.464-55.1936 39.7824a45.3632 45.3632 0 0 0-25.088 40.5504l-0.1024 480.7168c0 24.9344 20.2752 45.2096 45.2096 45.2096h423.0656c21.7088 0 38.144-6.912 50.0224-16.9984a72.192 72.192 0 0 0 14.4896-16.896l0.2048-0.2048 0.0512-0.1536 0.8192-1.024 1.2288-1.8944c39.424-63.7952 66.7648-114.688 88.2176-175.616 24.4224-69.4784 36.8128-129.6896 42.0352-176.64 5.12-45.6704 3.7888-81.664-1.5872-101.376a77.9776 77.9776 0 0 0-45.568-52.3264 116.5824 116.5824 0 0 0-45.4144-8.6016l-192.8192-2.6624c28.1088-115.0976 10.0864-181.6064-2.4576-214.3744zM64.0512 413.9008a45.2096 45.2096 0 0 1 45.1584-47.36H176.128c24.9344 0 45.2096 20.2752 45.2096 45.2096v480.6144a45.2096 45.2096 0 0 1-45.2096 45.2096h-44.288a45.2096 45.2096 0 0 1-45.1584-43.0592L64 413.952z", "p-id": "1535" })], -1)]));
|
|
2629
|
+
}]]), Xc = { class: "comment-common-icon" }, qc = V({}, [["render", function(e, t) {
|
|
2630
|
+
return r(), u("i", Xc, t[0] || (t[0] = [d("svg", { t: "1650360973068", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "1168", width: "200", height: "200" }, [d("path", { d: "M547.968 138.88c6.656-4.672 14.08-6.976 20.48-5.056 6.08 1.792 22.848 10.752 40.192 56.128 8.576 22.4 27.264 81.536-5.632 197.504a45.44 45.44 0 0 0 42.88 57.984l217.6 3.008h0.448a53.12 53.12 0 0 1 20.096 3.328 16.256 16.256 0 0 1 5.568 3.648 14.464 14.464 0 0 1 3.264 6.4c2.176 7.808 4.608 33.984-0.256 77.248-4.672 41.984-15.936 97.408-38.784 162.368-19.136 54.336-43.52 100.48-81.472 161.792a56.384 56.384 0 0 0-1.664 2.496l-0.128 0.128-1.408 2.112a7.872 7.872 0 0 1-1.28 1.472 3.84 3.84 0 0 1-1.28 0.64 20.48 20.48 0 0 1-6.848 0.96H356.032V421.44c19.712-10.624 40.704-24.576 62.592-47.616 25.472-26.88 51.008-64.768 78.208-121.6 5.568-11.584 9.856-24.384 13.632-36.032l3.072-9.856c2.688-8.448 5.184-16.384 8.064-24.32 8.064-22.4 16.128-36.032 26.368-43.136z m120.96 27.968c-20.48-53.44-48-84.736-81.984-94.912-33.6-9.984-61.952 4.16-76.032 14.08-27.584 19.264-41.28 49.6-50.048 74.048-3.392 9.344-6.464 19.2-9.216 27.968l-2.688 8.448a227.84 227.84 0 0 1-10.432 27.904c-25.28 52.928-47.36 84.544-66.752 104.96-18.944 19.968-36.48 30.464-55.168 39.808a45.376 45.376 0 0 0-25.088 40.576l-0.064 480.64c0 24.96 20.224 45.248 45.184 45.248h423.04c21.76 0 38.144-6.912 50.048-16.96a71.808 71.808 0 0 0 14.528-16.896l0.128-0.256 0.128-0.128 0.832-0.96 1.152-1.92c39.424-63.872 66.816-114.688 88.256-175.68a810.24 810.24 0 0 0 42.048-176.64c5.12-45.632 3.776-81.664-1.6-101.376a77.952 77.952 0 0 0-45.568-52.288 116.544 116.544 0 0 0-45.44-8.64l-192.768-2.688c28.096-115.072 10.048-181.568-2.496-214.336z m-604.864 247.04a45.184 45.184 0 0 1 45.12-47.296h67.008c24.96 0 45.184 20.288 45.184 45.248v480.64c0 24.96-20.224 45.12-45.184 45.12H131.84a45.184 45.184 0 0 1-45.12-43.072l-22.656-480.64z", "p-id": "1169" })], -1)]));
|
|
2631
|
+
}]]), Kc = { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "" }, Gc = V({}, [["render", function(e, t) {
|
|
2632
|
+
return r(), u("svg", Kc, t[0] || (t[0] = [d("path", { "data-v-d6f79dbc": "", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.99976 7.93206L10.0656 3.86619C10.1633 3.76856 10.3215 3.76856 10.4192 3.86619L10.7727 4.21975C10.8704 4.31738 10.8704 4.47567 10.7727 4.5733L6.35331 8.99272C6.15805 9.18798 5.84147 9.18798 5.6462 8.99272L1.22679 4.5733C1.12916 4.47567 1.12916 4.31738 1.22679 4.21975L1.58034 3.86619C1.67797 3.76856 1.83626 3.76856 1.93389 3.86619L5.99976 7.93206Z" }, null, -1)]));
|
|
2633
|
+
}]]), Zc = { class: "comment-common-icon" }, Qc = V({}, [["render", function(e, t) {
|
|
2634
|
+
return r(), u("i", Zc, t[0] || (t[0] = [d("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "" }, [d("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.99951 0.5C9.03708 0.5 11.4995 2.96243 11.4995 6C11.4995 9.03757 9.03708 11.5 5.99951 11.5C2.96195 11.5 0.499512 9.03757 0.499512 6C0.499512 2.96243 2.96195 0.5 5.99951 0.5ZM6.25 3.49988C6.38807 3.49988 6.5 3.61181 6.5 3.74988V5.49988H8.25C8.38807 5.49988 8.5 5.61181 8.5 5.74988V6.24988C8.5 6.38795 8.38807 6.49988 8.25 6.49988H5.75C5.61193 6.49988 5.5 6.38795 5.5 6.24988V3.74988C5.5 3.61181 5.61193 3.49988 5.75 3.49988H6.25Z" })], -1)]));
|
|
2635
|
+
}]]), Jc = { class: "comment-common-icon" }, ed = V({}, [["render", function(e, t) {
|
|
2636
|
+
return r(), u("i", Jc, t[0] || (t[0] = [d("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "1320", width: "200", height: "200" }, [d("path", { d: "M147.264 647.296V220.928c0-49.536 40.128-89.728 89.6-89.728H793.6c49.536 0 89.728 40.192 89.728 89.728v426.368c0 49.536-40.128 89.728-89.6 89.728h-145.216a47.04 47.04 0 0 0-28.16 9.408l-194.56 145.792a3.392 3.392 0 0 1-5.12-1.984l-26.752-116.672a47.04 47.04 0 0 0-45.824-36.544H236.992a89.728 89.728 0 0 1-89.728-89.728zM236.864 64A156.928 156.928 0 0 0 80 220.928l0.064 426.368a156.928 156.928 0 0 0 156.928 156.928h94.976l23.232 101.312 0.064 0.448a70.592 70.592 0 0 0 109.696 40.832l190.208-142.592H793.6a156.928 156.928 0 0 0 156.928-156.928l-0.064-426.368A156.928 156.928 0 0 0 793.536 64H236.928z m69.44 442.496a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z m268.8-65.344a65.344 65.344 0 1 1-130.752 0 65.344 65.344 0 0 1 130.752 0z m138.368 65.344a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z", "p-id": "1321" })], -1)]));
|
|
2637
|
+
}]]), td = { class: "cv-comment-emoji" }, od = { class: "face-tooltip-head select-none" }, id = ["onClick"], ad = ["src"], ld = { class: "emoji-body select-none" }, nd = { style: { padding: "0 5px" } }, sd = ["onClick"], rd = { class: "emoji-btn select-none" }, cd = { key: 0 }, dd = V(Object.assign({ name: "CompInputEmoji" }, { __name: "input-emoji", props: { emoji: { faceList: [], emojiList: [], allEmoji: {} }, placement: "bottom" }, emits: ["addEmoji"], setup(e, { emit: t }) {
|
|
2638
|
+
const o = e, l = B(0), i = B(0), a = B(new Array(2)), { emojiList: n, faceList: c } = o.emoji;
|
|
2630
2639
|
function p() {
|
|
2631
2640
|
a.value[0] = n[0];
|
|
2632
2641
|
}
|
|
2633
|
-
return (h, m) => (
|
|
2642
|
+
return (h, m) => (r(), u("div", td, [b(T(Oi), { placement: e.placement, "popper-class": "emoji-popover", width: 250, trigger: "click", onBeforeEnter: p }, { reference: v(() => [d("div", rd, [h.$slots.default ? D(h.$slots, "default", { key: 1 }, void 0, !0) : (r(), u("div", cd, [b(T(zc)), m[0] || (m[0] = d("span", null, "表情", -1))]))])]), default: v(() => [d("div", od, [(r(!0), u($, null, M(T(c), (f, g) => (r(), u("label", { key: g, class: z(l.value == g ? "active" : ""), onClick: (k) => function(x) {
|
|
2634
2643
|
switch (l.value = x, x) {
|
|
2635
2644
|
case 0:
|
|
2636
2645
|
i.value = 0;
|
|
@@ -2638,134 +2647,125 @@ const Bc = { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmln
|
|
|
2638
2647
|
case 1:
|
|
2639
2648
|
i.value = -50, a.value[1] = n[1];
|
|
2640
2649
|
}
|
|
2641
|
-
}(g) }, [
|
|
2642
|
-
} }), [["__scopeId", "data-v-2fb59975"]]),
|
|
2643
|
-
const l = e, i =
|
|
2644
|
-
function
|
|
2645
|
-
|
|
2646
|
-
p.value && (p.value.innerHTML = "", i.value = p.value.innerHTML, n.value = !1), g.value.length = 0, k.value = [], h.value = !0,
|
|
2650
|
+
}(g) }, [d("img", { src: f, alt: "" }, null, 8, ad)], 10, id))), 128))]), d("div", ld, [d("div", { class: "emjio-container", style: A({ transform: `translateX(${i.value}%)` }) }, [(r(!0), u($, null, M(a.value, (f, g) => (r(), u("div", { key: g, class: "emoji-wrapper" }, [b(T($i), null, { default: v(() => [d("div", nd, [(r(!0), u($, null, M(f, (k, x) => (r(), u("span", { key: x, class: "emoji-item", onClick: (y) => h.$emit("addEmoji", x) }, [b(T(Ni), { src: k, title: String(x), class: "emoji", style: { width: "24px", height: "24px", margin: "5px" }, lazy: "" }, null, 8, ["src", "title"])], 8, sd))), 128))])]), _: 2 }, 1024)]))), 128))], 4)])]), _: 3 }, 8, ["placement"])]));
|
|
2651
|
+
} }), [["__scopeId", "data-v-2fb59975"]]), hd = { class: "cv-comment-editor" }, pd = ["placeholder", "innerHTML"], ud = ["src"], md = ["onClick"], gd = { key: 0, class: "cv-comment-editor__action" }, fd = { __name: "input-box", props: { placeholder: "", contentBtn: "", parentId: "", reply: "" }, emits: ["hide", "close"], setup(e, { expose: t, emit: o }) {
|
|
2652
|
+
const l = e, i = B(""), a = B(), n = B(!1), c = B(!1), p = B(), h = B(!0), m = B(), f = B(), g = B([]), k = B([]), x = Ho({ imgLength: 0 }), y = 64, _ = B(), I = B(!1), E = B(), P = G(() => y + "px"), j = G(() => "8px 12px"), W = o, { upload: ee, submit: te, focus: ce } = se("InjectInputBox"), Ae = se("InjectionEmojiApi");
|
|
2653
|
+
function Pi() {
|
|
2654
|
+
te({ content: l.reply ? `回复 <span style="color: var(--cv-color-success-dark-2);">@${l.reply.user.username}:</span> ${i.value}` : i.value, parentId: Be(l.parentId, null), reply: l.reply, files: k.value, clear: () => {
|
|
2655
|
+
p.value && (p.value.innerHTML = "", i.value = p.value.innerHTML, n.value = !1), g.value.length = 0, k.value = [], h.value = !0, W("close");
|
|
2647
2656
|
} });
|
|
2648
2657
|
}
|
|
2649
|
-
function
|
|
2650
|
-
|
|
2658
|
+
function Yl(K) {
|
|
2659
|
+
Oe(i.value) && !x.imgLength && (c.value = !1, W("hide", K));
|
|
2651
2660
|
}
|
|
2652
|
-
function
|
|
2653
|
-
I.value = !0, n.value = !0,
|
|
2661
|
+
function Xl(K) {
|
|
2662
|
+
I.value = !0, n.value = !0, c.value = !0, Ee(() => {
|
|
2654
2663
|
m.value = document.querySelector("div[id^='el-popper-container']");
|
|
2655
|
-
}),
|
|
2664
|
+
}), ce();
|
|
2656
2665
|
}
|
|
2657
|
-
function
|
|
2658
|
-
|
|
2659
|
-
_.value = (j = window.getSelection()) == null ? void 0 : j.getRangeAt(0), (G = p.value) != null && G.innerHTML || (n.value = !1), I.value = !1;
|
|
2666
|
+
function ql(K) {
|
|
2667
|
+
_.value = window.getSelection()?.getRangeAt(0), p.value?.innerHTML || (n.value = !1), I.value = !1;
|
|
2660
2668
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const { innerHTML:
|
|
2663
|
-
i.value =
|
|
2669
|
+
function Kl(K) {
|
|
2670
|
+
const { innerHTML: R } = K?.target || K;
|
|
2671
|
+
i.value = R || "", Oe(i.value.replace(/ |<br>| /g, "")) ? h.value = !0 : h.value = !1;
|
|
2664
2672
|
}
|
|
2665
|
-
function
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
(W = p.value) == null || W.focus();
|
|
2673
|
+
function ji() {
|
|
2674
|
+
Ee(() => {
|
|
2675
|
+
p.value?.focus();
|
|
2669
2676
|
});
|
|
2670
2677
|
}
|
|
2671
|
-
function
|
|
2672
|
-
|
|
2678
|
+
function Gl(K) {
|
|
2679
|
+
K.ctrlKey && K.key == "Enter" && (Oe(i.value.replace(/ |<br>| /g, "")) ? q({ message: "内容不能为空", type: "info" }) : Pi());
|
|
2673
2680
|
}
|
|
2674
|
-
function
|
|
2675
|
-
var ae;
|
|
2681
|
+
function Zl(K) {
|
|
2676
2682
|
g.value.length = 0, k.value.length = 0;
|
|
2677
|
-
const
|
|
2678
|
-
if (x.imgLength =
|
|
2679
|
-
let
|
|
2680
|
-
k.value.push(
|
|
2683
|
+
const R = f.value?.files;
|
|
2684
|
+
if (x.imgLength = Be(R?.length, 0), R) for (let oe = 0; oe < R.length; oe++) {
|
|
2685
|
+
let xe = R[oe].name, He = (ne = R[oe], window.URL ? window.URL.createObjectURL(ne) : window.webkitURL ? window.webkitURL.createObjectURL(ne) : "");
|
|
2686
|
+
k.value.push(R[oe]), ys(xe) ? g.value.push(He) : q({ type: "warn", message: "请选择图片类型文件!", duration: 2500 });
|
|
2681
2687
|
}
|
|
2682
|
-
var
|
|
2683
|
-
}
|
|
2684
|
-
return
|
|
2685
|
-
I.value || (a.value =
|
|
2686
|
-
}),
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
G.innerHTML == "<br>" && (G.innerHTML = "");
|
|
2688
|
+
var ne;
|
|
2689
|
+
}
|
|
2690
|
+
return ie(() => i.value, (K) => {
|
|
2691
|
+
I.value || (a.value = K);
|
|
2692
|
+
}), ze(() => {
|
|
2693
|
+
p.value?.addEventListener("keyup", (K) => {
|
|
2694
|
+
const R = K.target;
|
|
2695
|
+
R.innerHTML == "<br>" && (R.innerHTML = "");
|
|
2691
2696
|
});
|
|
2692
|
-
}), t({ focus: () =>
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
}
|
|
2705
|
-
vn((r) => ({ "15491e60": o.value }));
|
|
2706
|
-
const t = e, o = Q(() => {
|
|
2707
|
-
let r = Math.trunc(Number(t.line));
|
|
2708
|
-
return r > 0 ? r : 1;
|
|
2709
|
-
}), l = E(!0), i = E(!1), a = E();
|
|
2697
|
+
}), t({ focus: () => ji() }), (K, R) => N((r(), u("div", hd, [d("div", { class: z(["cv-comment-editor__box", { active: n.value, "input-active": c.value }]) }, [d("div", { ref_key: "editorRef", ref: p, class: "rich-input", contenteditable: "true", placeholder: l.placeholder, onFocus: Xl, onInput: Kl, onBlur: ql, onKeydown: $e(Gl, ["enter"]), innerHTML: a.value, style: A({ minHeight: P.value, padding: j.value }) }, null, 44, pd), d("div", { ref_key: "imageRef", ref: E, class: "image-preview-box" }, [(r(!0), u($, null, M(g.value, (ne, oe) => (r(), u("div", { key: oe, class: "image-preview" }, [d("img", { src: ne, alt: "" }, null, 8, ud), d("div", { class: "clean-btn", onClick: (xe) => {
|
|
2698
|
+
return He = oe, void g?.value?.splice(He, 1);
|
|
2699
|
+
var He;
|
|
2700
|
+
} }, [b(T(Bc))], 8, md)]))), 128))], 512)], 2), b(gn, { name: "fade" }, { default: v(() => [c.value ? (r(), u("div", gd, [d("div", null, [b(dd, { emoji: T(Ae), onAddEmoji: R[0] || (R[0] = (ne) => function(oe) {
|
|
2701
|
+
let xe = window.getSelection();
|
|
2702
|
+
xe && (xe.removeAllRanges(), _.value || (ji(), _.value = xe.getRangeAt(0)), _.value.deleteContents(), _.value.insertNode(_.value.createContextualFragment(oe)), _.value.collapse(!1), xe.addRange(_.value), i.value = p?.value?.innerHTML || "", Oe(i.value.replace(/ |<br>| /g, "")) ? h.value = !0 : h.value = !1);
|
|
2703
|
+
}(ne)) }, null, 8, ["emoji"]), d("div", { class: "picture", onClick: R[1] || (R[1] = (...ne) => f.value?.click && f.value?.click(...ne)) }, [b(T(jc)), R[2] || (R[2] = d("span", null, "图片", -1)), d("input", { id: "comment-upload", ref_key: "inputRef", ref: f, type: "file", multiple: "", onChange: Zl }, null, 544)])]), d("div", null, [R[3] || (R[3] = d("span", { style: { "margin-right": "10px" } }, [F(" 文明上网理性发言,请遵守 "), d("a", { href: "###", target: "_blank" }, "《新闻评论服务协议》")], -1)), b(T(Ne), { type: "primary", disabled: h.value, onClick: Pi }, { default: v(() => [F(L(l.contentBtn), 1)]), _: 1 }, 8, ["disabled"])])])) : w("", !0)]), _: 1 })])), [[T(dn), Yl, m.value]]);
|
|
2704
|
+
} }, Ml = V(fd, [["__scopeId", "data-v-e3fd437e"]]), vd = { class: "u-fold" }, yd = { class: "action-box select-none" }, bd = V(Object.assign({ name: "UFold" }, { __name: "fold", props: { line: { type: [Number, String], default: 5 } }, setup(e) {
|
|
2705
|
+
fn((c) => ({ "15491e60": o.value }));
|
|
2706
|
+
const t = e, o = G(() => {
|
|
2707
|
+
let c = Math.trunc(Number(t.line));
|
|
2708
|
+
return c > 0 ? c : 1;
|
|
2709
|
+
}), l = B(!0), i = B(!1), a = B();
|
|
2710
2710
|
let n;
|
|
2711
|
-
return
|
|
2712
|
-
n = new ResizeObserver((
|
|
2711
|
+
return ze(() => {
|
|
2712
|
+
n = new ResizeObserver((c) => {
|
|
2713
2713
|
l.value && a.value && (i.value = a.value.offsetHeight < a.value.scrollHeight);
|
|
2714
2714
|
}), n.observe(a.value);
|
|
2715
|
-
}),
|
|
2715
|
+
}), vn(() => {
|
|
2716
2716
|
n.disconnect();
|
|
2717
|
-
}), (
|
|
2718
|
-
} }), [["__scopeId", "data-v-94334818"]]),
|
|
2719
|
-
const t =
|
|
2720
|
-
return (a, n) => T(l).card ? (
|
|
2717
|
+
}), (c, p) => (r(), u("div", vd, [d("div", { class: z(["txt-box", { "over-hidden": l.value }]) }, [d("div", { ref_key: "divBox", ref: a }, [D(c.$slots, "default", {}, void 0, !0)], 512)], 2), d("div", yd, [i.value && c.unfold ? (r(), u("div", { key: 0, class: "expand-btn", onClick: p[0] || (p[0] = (h) => l.value = !l.value) }, L(l.value ? "展开" : "收起"), 1)) : w("", !0)])]));
|
|
2718
|
+
} }), [["__scopeId", "data-v-94334818"]]), Ji = { __name: "user-card", props: { uid: "" }, setup(e) {
|
|
2719
|
+
const t = B({}), { showInfo: o } = se("InjectContentBox"), l = se("InjectSlots"), i = () => Mi("div", l.card(t.value));
|
|
2720
|
+
return (a, n) => T(l).card ? (r(), S(T(Oi), { key: 0, placement: "top", width: 300, "show-after": 300, onBeforeEnter: n[0] || (n[0] = () => T(o)(e.uid, (c) => t.value = c)) }, { reference: v(() => [D(a.$slots, "default")]), default: v(() => [b(i)]), _: 3 })) : D(a.$slots, "default", { key: 1 });
|
|
2721
2721
|
} };
|
|
2722
|
-
function
|
|
2723
|
-
return !!
|
|
2722
|
+
function Bl(e) {
|
|
2723
|
+
return !!bn() && (Cn(e), !0);
|
|
2724
2724
|
}
|
|
2725
|
-
const
|
|
2726
|
-
const
|
|
2727
|
-
function
|
|
2725
|
+
const Ai = typeof window < "u" && typeof document < "u";
|
|
2726
|
+
const Cd = Object.prototype.toString, wd = (e) => Cd.call(e) === "[object Object]";
|
|
2727
|
+
function Xo(e) {
|
|
2728
2728
|
return Array.isArray(e) ? e : [e];
|
|
2729
2729
|
}
|
|
2730
|
-
const
|
|
2731
|
-
function
|
|
2730
|
+
const kd = Ai ? window : void 0, El = Ai ? window.navigator : void 0;
|
|
2731
|
+
function zl(...e) {
|
|
2732
2732
|
const t = [], o = () => {
|
|
2733
|
-
t.forEach((
|
|
2734
|
-
}, l =
|
|
2735
|
-
const
|
|
2736
|
-
return
|
|
2737
|
-
}), i = (a = ([
|
|
2738
|
-
if (o(), !
|
|
2739
|
-
const f =
|
|
2740
|
-
t.push(...
|
|
2741
|
-
}, n = { flush: "post" },
|
|
2742
|
-
var
|
|
2743
|
-
return [(p = (
|
|
2733
|
+
t.forEach((c) => c()), t.length = 0;
|
|
2734
|
+
}, l = G(() => {
|
|
2735
|
+
const c = Xo(Fe(e[0])).filter((p) => p != null);
|
|
2736
|
+
return c.every((p) => typeof p != "string") ? c : void 0;
|
|
2737
|
+
}), i = (a = ([c, p, h, m]) => {
|
|
2738
|
+
if (o(), !c?.length || !p?.length || !h?.length) return;
|
|
2739
|
+
const f = wd(m) ? { ...m } : m;
|
|
2740
|
+
t.push(...c.flatMap((g) => p.flatMap((k) => h.map((x) => ((y, _, I, E) => (y.addEventListener(_, I, E), () => y.removeEventListener(_, I, E)))(g, k, x, f)))));
|
|
2741
|
+
}, n = { flush: "post" }, ie(() => {
|
|
2742
|
+
var c, p;
|
|
2743
|
+
return [(p = (c = l.value) == null ? void 0 : c.map((h) => function(m) {
|
|
2744
2744
|
var f;
|
|
2745
|
-
const g =
|
|
2746
|
-
return (f = g
|
|
2747
|
-
}(h))) != null ? p : [
|
|
2745
|
+
const g = Fe(m);
|
|
2746
|
+
return (f = g?.$el) != null ? f : g;
|
|
2747
|
+
}(h))) != null ? p : [kd].filter((h) => h != null), Xo(Fe(l.value ? e[1] : e[0])), Xo(T(l.value ? e[2] : e[1])), Fe(l.value ? e[3] : e[2])];
|
|
2748
2748
|
}, a, { ...n, immediate: !0 }));
|
|
2749
2749
|
var a, n;
|
|
2750
|
-
return
|
|
2750
|
+
return Bl(o), () => {
|
|
2751
2751
|
i(), o();
|
|
2752
2752
|
};
|
|
2753
2753
|
}
|
|
2754
|
-
function
|
|
2754
|
+
function Al(e) {
|
|
2755
2755
|
const t = function() {
|
|
2756
|
-
const o =
|
|
2757
|
-
return l &&
|
|
2756
|
+
const o = re(!1), l = wn();
|
|
2757
|
+
return l && ze(() => {
|
|
2758
2758
|
o.value = !0;
|
|
2759
2759
|
}, l), o;
|
|
2760
2760
|
}();
|
|
2761
|
-
return
|
|
2761
|
+
return G(() => (t.value, !!e()));
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2764
|
-
const { controls: o = !1, navigator: l =
|
|
2763
|
+
function ea(e, t = {}) {
|
|
2764
|
+
const { controls: o = !1, navigator: l = El } = t, i = Al(() => l && "permissions" in l), a = re(), n = typeof e == "string" ? { name: e } : e, c = re(), p = () => {
|
|
2765
2765
|
var m, f;
|
|
2766
|
-
|
|
2766
|
+
c.value = (f = (m = a.value) == null ? void 0 : m.state) != null ? f : "prompt";
|
|
2767
2767
|
};
|
|
2768
|
-
|
|
2768
|
+
zl(a, "change", p, { passive: !0 });
|
|
2769
2769
|
const h = function(m) {
|
|
2770
2770
|
let f;
|
|
2771
2771
|
function g() {
|
|
@@ -2784,41 +2784,41 @@ function ta(e, t = {}) {
|
|
|
2784
2784
|
} finally {
|
|
2785
2785
|
p();
|
|
2786
2786
|
}
|
|
2787
|
-
return o ?
|
|
2787
|
+
return o ? Sl(a.value) : void 0;
|
|
2788
2788
|
}
|
|
2789
2789
|
});
|
|
2790
|
-
return h(), o ? { state:
|
|
2790
|
+
return h(), o ? { state: c, isSupported: i, query: h } : c;
|
|
2791
2791
|
}
|
|
2792
|
-
function
|
|
2793
|
-
const { navigator: t =
|
|
2794
|
-
const { immediate: I = !0, immediateCallback:
|
|
2795
|
-
let
|
|
2796
|
-
function
|
|
2797
|
-
|
|
2792
|
+
function xd(e = {}) {
|
|
2793
|
+
const { navigator: t = El, read: o = !1, source: l, copiedDuring: i = 1500, legacy: a = !1 } = e, n = Al(() => t && "clipboard" in t), c = ea("clipboard-read"), p = ea("clipboard-write"), h = G(() => n.value || a), m = re(""), f = re(!1), g = function(x, y, _ = {}) {
|
|
2794
|
+
const { immediate: I = !0, immediateCallback: E = !1 } = _, P = re(!1);
|
|
2795
|
+
let j;
|
|
2796
|
+
function W() {
|
|
2797
|
+
j && (clearTimeout(j), j = void 0);
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2800
|
-
|
|
2799
|
+
function ee() {
|
|
2800
|
+
P.value = !1, W();
|
|
2801
2801
|
}
|
|
2802
|
-
function
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
},
|
|
2802
|
+
function te(...ce) {
|
|
2803
|
+
E && x(), W(), P.value = !0, j = setTimeout(() => {
|
|
2804
|
+
P.value = !1, j = void 0, x(...ce);
|
|
2805
|
+
}, Fe(y));
|
|
2806
2806
|
}
|
|
2807
|
-
return I && (
|
|
2807
|
+
return I && (P.value = !0, Ai && te()), Bl(ee), { isPending: yn(P), start: te, stop: ee };
|
|
2808
2808
|
}(() => f.value = !1, i, { immediate: !1 });
|
|
2809
2809
|
function k(x) {
|
|
2810
2810
|
return x === "granted" || x === "prompt";
|
|
2811
2811
|
}
|
|
2812
|
-
return h.value && o &&
|
|
2813
|
-
let x = !(n.value && k(
|
|
2812
|
+
return h.value && o && zl(["copy", "cut"], async function() {
|
|
2813
|
+
let x = !(n.value && k(c.value));
|
|
2814
2814
|
if (!x) try {
|
|
2815
2815
|
m.value = await t.clipboard.readText();
|
|
2816
2816
|
} catch {
|
|
2817
2817
|
x = !0;
|
|
2818
2818
|
}
|
|
2819
2819
|
var y, _, I;
|
|
2820
|
-
x && (m.value = (I = (_ = (y = document
|
|
2821
|
-
}, { passive: !0 }), { isSupported: h, text: m, copied: f, copy: async function(x =
|
|
2820
|
+
x && (m.value = (I = (_ = (y = document?.getSelection) == null ? void 0 : y.call(document)) == null ? void 0 : _.toString()) != null ? I : "");
|
|
2821
|
+
}, { passive: !0 }), { isSupported: h, text: m, copied: f, copy: async function(x = Fe(l)) {
|
|
2822
2822
|
if (h.value && x != null) {
|
|
2823
2823
|
let y = !(n.value && k(p.value));
|
|
2824
2824
|
if (!y) try {
|
|
@@ -2833,50 +2833,47 @@ function Sd(e = {}) {
|
|
|
2833
2833
|
}
|
|
2834
2834
|
} };
|
|
2835
2835
|
}
|
|
2836
|
-
const
|
|
2837
|
-
const { copy: t } =
|
|
2836
|
+
const Sd = { class: "comment-list-actbox__right" }, Vd = { class: "operation-warp" }, _d = { class: "dialog-footer" }, Id = { __name: "comment-operate", props: { data: { type: [Object], default: () => ({}) } }, setup(e) {
|
|
2837
|
+
const { copy: t } = xd(), o = B(!1), l = B({ report_type: "", report_content: "" }), i = e;
|
|
2838
2838
|
function a() {
|
|
2839
2839
|
let n = i.data || {};
|
|
2840
|
-
o.value = !1,
|
|
2840
|
+
o.value = !1, q({ type: "info", message: "举报成功: " + n.id });
|
|
2841
2841
|
}
|
|
2842
|
-
return (n,
|
|
2842
|
+
return (n, c) => {
|
|
2843
2843
|
const p = C("el-dropdown-item"), h = C("el-dropdown-menu"), m = C("el-dropdown"), f = C("el-radio"), g = C("el-radio-group"), k = C("el-form-item"), x = C("el-input"), y = C("el-form"), _ = C("el-button"), I = C("el-dialog");
|
|
2844
|
-
return
|
|
2845
|
-
let
|
|
2846
|
-
switch (
|
|
2844
|
+
return r(), u("div", Sd, [b(m, { trigger: "click", onCommand: c[0] || (c[0] = (E) => function(P) {
|
|
2845
|
+
let j = i.data || {};
|
|
2846
|
+
switch (P) {
|
|
2847
2847
|
case "remove":
|
|
2848
2848
|
setTimeout(() => {
|
|
2849
|
-
|
|
2850
|
-
(R = commentRef.value) == null || R.remove(U);
|
|
2849
|
+
commentRef.value?.remove(j);
|
|
2851
2850
|
}, 200);
|
|
2852
2851
|
break;
|
|
2853
2852
|
case "report":
|
|
2854
2853
|
o.value = !0;
|
|
2855
2854
|
break;
|
|
2856
2855
|
case "copy":
|
|
2857
|
-
t(
|
|
2856
|
+
t(j.content), q({ type: "info", message: "复制成功" });
|
|
2858
2857
|
}
|
|
2859
|
-
}(
|
|
2858
|
+
}(E)) }, { dropdown: v(() => [b(h, null, { default: v(() => [b(p, { command: "report" }, { default: v(() => c[5] || (c[5] = [F("举报")])), _: 1, __: [5] }), b(p, { command: "remove" }, { default: v(() => c[6] || (c[6] = [F("删除")])), _: 1, __: [6] }), b(p, { divided: "", command: "copy" }, { default: v(() => c[7] || (c[7] = [F("复制")])), _: 1, __: [7] })]), _: 1 })]), default: v(() => [d("div", Vd, [b(T(Uc))])]), _: 1 }), b(I, { title: "举报", modelValue: o.value, "onUpdate:modelValue": c[4] || (c[4] = (E) => o.value = E), width: "400px", style: { width: "90%", "max-width": "400px" } }, { footer: v(() => [d("span", _d, [b(_, { onClick: c[3] || (c[3] = (E) => o.value = !1) }, { default: v(() => c[13] || (c[13] = [F("取消")])), _: 1, __: [13] }), b(_, { type: "primary", onClick: a }, { default: v(() => c[14] || (c[14] = [F("提交")])), _: 1, __: [14] })])]), default: v(() => [b(y, { "label-position": "top" }, { default: v(() => [b(k, { label: "您为什么要举报此信息?" }, { default: v(() => [b(g, { modelValue: l.value.report_type, "onUpdate:modelValue": c[1] || (c[1] = (E) => l.value.report_type = E) }, { default: v(() => [b(f, { value: "色情淫秽" }, { default: v(() => c[8] || (c[8] = [F("色情淫秽")])), _: 1, __: [8] }), b(f, { value: "骚扰谩骂" }, { default: v(() => c[9] || (c[9] = [F("骚扰谩骂")])), _: 1, __: [9] }), b(f, { value: "广告欺诈" }, { default: v(() => c[10] || (c[10] = [F("广告欺诈")])), _: 1, __: [10] }), b(f, { value: "反动" }, { default: v(() => c[11] || (c[11] = [F("反动")])), _: 1, __: [11] }), b(f, { value: "其他" }, { default: v(() => c[12] || (c[12] = [F("其他")])), _: 1, __: [12] })]), _: 1 }, 8, ["modelValue"])]), _: 1 }), b(k, { label: "举报说明(可选):" }, { default: v(() => [b(x, { type: "textarea", modelValue: l.value.report_content, "onUpdate:modelValue": c[2] || (c[2] = (E) => l.value.report_content = E), maxlength: "200", placeholder: "描述恶意行为", rows: "3" }, null, 8, ["modelValue"])]), _: 1 })]), _: 1 })]), _: 1 }, 8, ["modelValue"])]);
|
|
2860
2859
|
};
|
|
2861
|
-
} },
|
|
2862
|
-
const t = e, o =
|
|
2860
|
+
} }, Ld = { class: "comment-sub" }, Dd = ["href"], Td = { class: "comment-primary" }, Fd = { class: "comment-main" }, Od = { key: 1, class: "user-info" }, $d = ["href"], Nd = { class: "username" }, Md = { class: "name", style: { "max-width": "10em" } }, Bd = { blank: "true", class: "rank" }, Ed = ["innerHTML"], zd = { class: "address", style: { color: "#939393", "font-size": "12px" } }, Ad = { class: "time" }, Hd = { class: "content" }, Pd = ["innerHTML"], jd = { class: "imgbox", style: { display: "flex" } }, Rd = { class: "comment-list-actbox select-none" }, Ud = { class: "comment-list-actbox__left" }, Wd = { key: 2 }, Yd = { class: "comment-list-actbox__right" }, Xd = { key: 2 }, Hl = V({ __name: "content-box", props: { reply: { type: [Boolean], default: !1 }, data: { type: [Object], default: () => ({}) }, id: { type: [String], default: "" } }, setup(e) {
|
|
2861
|
+
const t = e, o = Ho({ active: !1 }), l = B(), i = B(), a = G(() => {
|
|
2863
2862
|
let _ = t.data.contentImg;
|
|
2864
|
-
return
|
|
2865
|
-
}), { allEmoji: n } =
|
|
2863
|
+
return Oe(_) ? [] : _?.split("||");
|
|
2864
|
+
}), { allEmoji: n } = se("InjectionEmojiApi"), { like: c, user: p, relativeTime: h } = se("InjectContentBox");
|
|
2866
2865
|
function m() {
|
|
2867
|
-
o.active = !o.active, o.active &&
|
|
2868
|
-
|
|
2869
|
-
(_ = l.value) == null || _.focus();
|
|
2866
|
+
o.active = !o.active, o.active && Ee(() => {
|
|
2867
|
+
l.value?.focus();
|
|
2870
2868
|
});
|
|
2871
2869
|
}
|
|
2872
2870
|
function f(_) {
|
|
2873
|
-
var B;
|
|
2874
2871
|
const I = _.target;
|
|
2875
|
-
|
|
2872
|
+
i.value?.contains(I) || (o.active = !1);
|
|
2876
2873
|
}
|
|
2877
|
-
const g =
|
|
2878
|
-
const
|
|
2879
|
-
return
|
|
2874
|
+
const g = se("InjectSlots"), k = () => Mi("div", g.info(t.data)), x = G(() => ((_, I) => I.replace(/\[.+?\]/g, (E) => {
|
|
2875
|
+
const P = _[E];
|
|
2876
|
+
return P ? ['<img src="', P, '" width="20" height="20" alt="', E, '" title="', E, '" style="margin: 0 1px; vertical-align: text-bottom"', "/>"].join("") : E;
|
|
2880
2877
|
}))(n, t.data.content)), y = (_) => {
|
|
2881
2878
|
switch (_) {
|
|
2882
2879
|
case 1:
|
|
@@ -2895,9 +2892,9 @@ const Vd = { class: "comment-list-actbox__right" }, _d = { class: "operation-war
|
|
|
2895
2892
|
return "";
|
|
2896
2893
|
}
|
|
2897
2894
|
};
|
|
2898
|
-
return (_, I) => (
|
|
2899
|
-
} }, [["__scopeId", "data-v-cfe79df7"]]),
|
|
2900
|
-
const t = e, o =
|
|
2895
|
+
return (_, I) => (r(), u("div", { class: z(["comment", { reply: t.reply }]) }, [d("div", Ld, [b(Ji, { uid: T(Se)(e.data.uid) }, { default: v(() => [d("a", { href: e.data.user.homeLink, target: "_blank", class: "no-underline", style: { display: "block" } }, [b(T(bl), { style: { "margin-top": "5px" }, size: 40, fit: "cover", src: e.data.user.avatar }, { default: v(() => I[2] || (I[2] = [d("img", { src: "https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" }, null, -1)])), _: 1, __: [2] }, 8, ["src"])], 8, Dd)]), _: 1 }, 8, ["uid"])]), d("div", Td, [d("div", Fd, [T(g).info ? (r(), S(k, { key: 0 })) : (r(), u("div", Od, [b(Ji, { uid: T(Se)(e.data.uid) }, { default: v(() => [d("a", { href: e.data.user.homeLink, target: "_blank", class: "no-underline", style: { display: "block" } }, [d("div", Nd, [d("span", Md, L(e.data.user.username), 1), d("span", Bd, [d("i", { class: "comment-common-icon", style: { "font-size": "24px" }, innerHTML: y(e.data.user.level) }, null, 8, Ed)])])], 8, $d)]), _: 1 }, 8, ["uid"]), d("span", zd, " " + L(e.data.address), 1), d("time", Ad, L(T(h) ? T(vs)(e.data.createTime) : e.data.createTime), 1)])), d("div", Hd, [b(bd, { unfold: "" }, { default: v(() => [d("div", { innerHTML: x.value }, null, 8, Pd), d("div", jd, [(r(!0), u($, null, M(a.value, (E, P) => (r(), S(T(Ni), { key: P, src: E, style: { height: "72px", padding: "8px 4px" }, lazy: "", "preview-src-list": a.value, "initial-index": P }, null, 8, ["src", "preview-src-list", "initial-index"]))), 128))])]), _: 1 })]), d("div", Rd, [d("div", Ud, [d("div", { "data-tip": "点赞", class: "item", onClick: I[0] || (I[0] = (E) => T(c)(T(Se)(e.data.id))) }, [T(p).likeIds.map(String).indexOf(T(Se)(e.data.id)) == -1 ? (r(), S(T(qc), { key: 0 })) : (r(), S(T(Yc), { key: 1 })), e.data.likes != 0 ? (r(), u("span", Wd, L(e.data.likes), 1)) : w("", !0)]), d("div", { "data-tip": "回复", ref_key: "btnRef", ref: i, class: z(["item", { active: o.active }]), onClick: m }, [b(T(ed)), d("span", null, L(o.active ? "取消回复" : "回复"), 1)], 2)]), d("div", Yd, [D(_.$slots, "operate", {}, () => [b(Id, { data: t.data }, null, 8, ["data"])], !0)])]), o.active ? (r(), u("div", Xd, [b(Ml, { ref_key: "commentRef", ref: l, "parent-id": T(Se)(e.id), placeholder: `回复 @${e.data.user.username}...`, reply: e.data, "content-btn": "发布", style: { "margin-top": "12px" }, onHide: f, onClose: I[1] || (I[1] = (E) => o.active = !1) }, null, 8, ["parent-id", "placeholder", "reply"])])) : w("", !0)]), D(_.$slots, "default", {}, void 0, !0)])], 2));
|
|
2896
|
+
} }, [["__scopeId", "data-v-cfe79df7"]]), qd = { key: 0, class: "reply-box" }, Kd = { class: "reply-list" }, Gd = { key: 0, class: "fetch-more" }, Zd = { key: 0 }, Qd = { key: 1 }, Jd = { key: 0 }, eh = { key: 1, class: "fetch-more" }, th = V({ __name: "reply-box", props: { data: { type: [Array, Object], default: () => null }, id: { type: [String], default: "" } }, setup(e) {
|
|
2897
|
+
const t = e, o = Ho({ loading: !1, over: !1, pageNum: 1, pageSize: 5 }), { replyPage: l, replyShowSize: i, comments: a, page: n } = se("InjectReplyBox"), c = G(() => {
|
|
2901
2898
|
let g = { total: 0, length: 0, list: [] };
|
|
2902
2899
|
if (t.data) {
|
|
2903
2900
|
let k = t.data.list.length;
|
|
@@ -2919,28 +2916,27 @@ const Vd = { class: "comment-list-actbox__right" }, _d = { class: "operation-war
|
|
|
2919
2916
|
}, f = (g) => {
|
|
2920
2917
|
o.pageSize = g, l(t.id, o.pageNum, g, (k) => h(k));
|
|
2921
2918
|
};
|
|
2922
|
-
return (g, k) =>
|
|
2923
|
-
} }, [["__scopeId", "data-v-16e0a50b"]]),
|
|
2924
|
-
const l = e, { user: i, comments: a, showSize: n, replyShowSize:
|
|
2919
|
+
return (g, k) => c.value.length > 0 ? (r(), u("div", qd, [d("div", Kd, [(r(!0), u($, null, M(c.value.list, (x, y) => (r(), S(Hl, { id: e.id, key: y, data: x, reply: "" }, null, 8, ["id", "data"]))), 128)), c.value.length > T(i) ? (r(), u("div", Gd, [o.loading ? (r(), u("span", Zd, "加载中...")) : (r(), u("div", Qd, [o.over ? w("", !0) : (r(), u("div", Jd, [F(" 共" + L(c.value.total) + "条回复, ", 1), d("span", { class: "fetch-more-comment select-none", onClick: p }, [k[0] || (k[0] = F(" 点击查看 ")), b(T(Gc))])]))]))])) : w("", !0), o.over && T(n) ? (r(), u("div", eh, [b(T(hn), { small: "", "hide-on-single-page": "", layout: "total, prev, pager, next", total: c.value.total, "page-size": o.pageSize, onCurrentChange: m, onSizeChange: f }, null, 8, ["total", "page-size"])])) : w("", !0)])])) : w("", !0);
|
|
2920
|
+
} }, [["__scopeId", "data-v-16e0a50b"]]), oh = { key: 0, class: "comment-list" }, ih = { __name: "comment-list", props: { data: { type: [Array, Object], default: () => [] }, total: { type: [Number], default: 0 }, showSize: { type: [Number], default: 0 } }, setup: (e) => (t, o) => e.data ? (r(), u("div", oh, [(r(!0), u($, null, M(e.data, (l, i) => (r(), S(Hl, { id: T(Se)(l.id), key: i, data: l }, { default: v(() => [b(th, { id: T(Se)(l.id), data: l.reply }, null, 8, ["id", "data"])]), _: 2 }, 1032, ["id", "data"]))), 128))])) : w("", !0) }, ah = { class: "cv-comment-base" }, lh = { class: "cv-comment-form" }, nh = { class: "cv-comment-form__content" }, sh = { class: "cv-comment-form__avatar" }, rh = { class: "cv-comment-list-wrapper" }, ko = Object.assign({ name: "cvCommentBase" }, { __name: "comment", props: { config: {}, page: !1, upload: !1, relativeTime: !1 }, emits: ["submit", "like", "replyPage", "showInfo", "focus"], setup(e, { expose: t, emit: o }) {
|
|
2921
|
+
const l = e, { user: i, comments: a, showSize: n, replyShowSize: c, total: p } = kn(l.config), h = o, m = { upload: l.upload, submit: ({ content: g, parentId: k, reply: x, files: y, clear: _ }) => {
|
|
2925
2922
|
h("submit", { content: g, parentId: k, reply: x, files: y, finish: (I) => {
|
|
2926
2923
|
if (_(), k) {
|
|
2927
|
-
let
|
|
2928
|
-
if (
|
|
2929
|
-
let
|
|
2930
|
-
|
|
2924
|
+
let E = a.value.find((P) => P.id == k);
|
|
2925
|
+
if (E) {
|
|
2926
|
+
let P = E.reply;
|
|
2927
|
+
P ? (P.list.unshift(I), P.total++) : E.reply = { total: 1, list: [I] };
|
|
2931
2928
|
}
|
|
2932
2929
|
} else a.value.unshift(I);
|
|
2933
2930
|
} });
|
|
2934
2931
|
}, focus: () => h("focus") };
|
|
2935
|
-
|
|
2932
|
+
De("InjectInputBox", m);
|
|
2936
2933
|
const f = (g, k) => {
|
|
2937
2934
|
let x = null;
|
|
2938
2935
|
a.value.forEach((y) => {
|
|
2939
|
-
|
|
2940
|
-
x = y.id == g ? y : (_ = y.reply) == null ? void 0 : _.list.find((I) => I.id == g), x && (x.likes += k);
|
|
2936
|
+
x = y.id == g ? y : y.reply?.list.find((_) => _.id == g), x && (x.likes += k);
|
|
2941
2937
|
});
|
|
2942
2938
|
};
|
|
2943
|
-
return
|
|
2939
|
+
return De("InjectContentBox", { user: i, like: (g) => {
|
|
2944
2940
|
const k = l.config.user.likeIds;
|
|
2945
2941
|
h("like", g, () => {
|
|
2946
2942
|
if (k.findIndex((x) => x == g) == -1) k.push(g), f(g, 1);
|
|
@@ -2949,14 +2945,14 @@ const Vd = { class: "comment-list-actbox__right" }, _d = { class: "operation-war
|
|
|
2949
2945
|
x != -1 && (k.splice(x, 1), f(g, -1));
|
|
2950
2946
|
}
|
|
2951
2947
|
});
|
|
2952
|
-
}, relativeTime:
|
|
2948
|
+
}, relativeTime: Be(l.relativeTime, !1), showInfo: (g, k) => h("showInfo", g, k) }), De("InjectReplyBox", { page: l.page, replyPage: (g, k, x, y) => {
|
|
2953
2949
|
h("replyPage", { parentId: g, pageNum: k, pageSize: x, finish: y });
|
|
2954
|
-
}, replyShowSize:
|
|
2950
|
+
}, replyShowSize: Be(c, 3), comments: a }), De("InjectionEmojiApi", l.config.emoji), De("InjectSlots", xn()), t({ remove: (g) => {
|
|
2955
2951
|
const { parentId: k, id: x } = g;
|
|
2956
2952
|
if (k) {
|
|
2957
|
-
let y = a.value.find((I) => I.id == k), _ = y
|
|
2953
|
+
let y = a.value.find((I) => I.id == k), _ = y?.reply;
|
|
2958
2954
|
if (_) {
|
|
2959
|
-
let I = _.list.findIndex((
|
|
2955
|
+
let I = _.list.findIndex((E) => E.id == x);
|
|
2960
2956
|
I != -1 && (_.list.splice(I, 1), _.total--);
|
|
2961
2957
|
}
|
|
2962
2958
|
} else {
|
|
@@ -2965,57 +2961,57 @@ const Vd = { class: "comment-list-actbox__right" }, _d = { class: "operation-war
|
|
|
2965
2961
|
}
|
|
2966
2962
|
} }), (g, k) => {
|
|
2967
2963
|
const x = C("el-avatar");
|
|
2968
|
-
return
|
|
2964
|
+
return r(), u("div", ah, [d("div", lh, [k[1] || (k[1] = d("div", { class: "cv-comment-form__header" }, [d("span", { class: "cv-comment-form__hdtitle" }, "评论")], -1)), d("div", nh, [d("div", sh, [b(x, { size: 40, src: e.config.user.avatar }, { default: v(() => k[0] || (k[0] = [d("img", { src: "https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" }, null, -1)])), _: 1, __: [0] }, 8, ["src"])]), b(Ml, { placeholder: "输入评论(Enter换行,Ctrl + Enter发送)", "content-btn": "发表评论" })])]), D(g.$slots, "default", {}, () => [k[2] || (k[2] = d("div", { class: "title" }, "全部评论", -1))]), d("div", rh, [b(ih, { data: T(a), total: T(p), "show-size": T(Be)(T(n), 5) }, null, 8, ["data", "total", "show-size"])])]);
|
|
2969
2965
|
};
|
|
2970
|
-
} }),
|
|
2971
|
-
const o = e, l =
|
|
2966
|
+
} }), ch = { class: "comment-scroll" }, dh = ["infinite-scroll-disabled"], hh = { class: "scroll-btn" }, ph = { key: 1 }, uh = { key: 2 }, xo = Object.assign({ name: "cvCommentScroll" }, { __name: "comment-scroll", props: { disable: { type: [Boolean], default: !1 }, show: { type: [Boolean], default: !1 } }, emits: ["more"], setup(e, { emit: t }) {
|
|
2967
|
+
const o = e, l = B(!1), i = B(!1), a = t, n = G(() => i.value && o.disable), c = G(() => !i.value || l.value || n.value), p = Il(() => {
|
|
2972
2968
|
a("more"), l.value = !1;
|
|
2973
2969
|
}, 500), h = () => {
|
|
2974
2970
|
l.value = !0, p();
|
|
2975
2971
|
};
|
|
2976
2972
|
return (m, f) => {
|
|
2977
|
-
const g = C("el-link"), k =
|
|
2978
|
-
return
|
|
2973
|
+
const g = C("el-link"), k = ae("infinite-scroll");
|
|
2974
|
+
return r(), u("div", ch, [N((r(), u("div", { "infinite-scroll-disabled": c.value, "infinite-scroll-distance": "2" }, [D(m.$slots, "default"), d("div", hh, [i.value ? w("", !0) : (r(), S(g, { key: 0, type: "primary", underline: "never", onClick: f[0] || (f[0] = (x) => i.value = !i.value) }, { default: v(() => f[1] || (f[1] = [F("加载更多")])), _: 1, __: [1] })), l.value ? (r(), u("p", ph, "加载中...")) : w("", !0), n.value ? (r(), u("p", uh, "没有更多了")) : w("", !0)])], 8, dh)), [[k, h]])]);
|
|
2979
2975
|
};
|
|
2980
|
-
} }),
|
|
2981
|
-
const o = e, l = t, i =
|
|
2976
|
+
} }), mh = { class: "cv-comment-nav-wrap" }, gh = { class: "cv-comment-nav__sort" }, So = Object.assign({ name: "cvCommentNav" }, { __name: "comment-nav", props: { modelValue: !1 }, emits: ["update:modelValue", "sorted"], setup(e, { emit: t }) {
|
|
2977
|
+
const o = e, l = t, i = G({ get: () => o.modelValue, set(a) {
|
|
2982
2978
|
l("update:modelValue", a), l("sorted", a);
|
|
2983
2979
|
} });
|
|
2984
|
-
return (a, n) => (
|
|
2980
|
+
return (a, n) => (r(), u("div", mh, [n[4] || (n[4] = d("span", { class: "cv-comment-nav__title" }, "全部评论", -1)), d("div", gh, [d("div", { class: z(["item select-none", { active: i.value }]), onClick: n[0] || (n[0] = (c) => i.value = !0) }, [b(T(Qc)), n[2] || (n[2] = F(" 最新 "))], 2), d("div", { class: z(["item select-none", { active: !i.value }]), onClick: n[1] || (n[1] = (c) => i.value = !1) }, [b(T(Hc)), n[3] || (n[3] = F(" 最热 "))], 2)])]));
|
|
2985
2981
|
} });
|
|
2986
|
-
|
|
2982
|
+
ko.install = function(e) {
|
|
2983
|
+
e.component(ko.name, ko);
|
|
2984
|
+
}, xo.install = function(e) {
|
|
2987
2985
|
e.component(xo.name, xo);
|
|
2988
2986
|
}, So.install = function(e) {
|
|
2989
2987
|
e.component(So.name, So);
|
|
2990
|
-
}, Vo.install = function(e) {
|
|
2991
|
-
e.component(Vo.name, Vo);
|
|
2992
2988
|
};
|
|
2993
|
-
const
|
|
2989
|
+
const fh = { name: "cvSvgs", props: { ...Cl.prop, type: { type: [String], default: "" }, size: { type: [String, Number], default: 12 }, name: { type: [String], default: "" } }, data: () => ({}), computed: { svgType() {
|
|
2994
2990
|
return "svg" + this.type;
|
|
2995
2991
|
}, style() {
|
|
2996
2992
|
return { fontSize: isNaN(Number(this.size)) ? this.size + "px" : this.size, color: props.color };
|
|
2997
2993
|
} }, created() {
|
|
2998
|
-
}, methods: {} },
|
|
2994
|
+
}, methods: {} }, vh = { key: 0, "aria-hidden": "true" }, yh = ["xlink:href"], Vo = V(fh, [["render", function(e, t, o, l, i, a) {
|
|
2999
2995
|
const n = C("el-icon");
|
|
3000
|
-
return
|
|
3001
|
-
}]]),
|
|
2996
|
+
return r(), S(n, U(Y(e.$props)), { default: v(() => [D(e.$slots, "default", {}, () => [(r(), S(Vl(a.svgType)))]), o.name ? (r(), u("svg", vh, [d("use", { "xlink:href": o.name }, null, 8, yh)])) : w("", !0)]), _: 3 }, 16);
|
|
2997
|
+
}]]), bh = { name: "cvIcons", props: { ...Cl.prop, type: { type: [String], default: "" }, size: { type: [String, Number], default: 12 }, name: { type: [String], default: "" } }, data: () => ({}), computed: { style() {
|
|
3002
2998
|
return { fontSize: isNaN(Number(this.size)) ? this.size + "px" : this.size, color: props.color };
|
|
3003
2999
|
} }, created() {
|
|
3004
|
-
}, methods: {} },
|
|
3000
|
+
}, methods: {} }, Ch = { key: 0, "aria-hidden": "true" }, wh = ["xlink:href"], _o = V(bh, [["render", function(e, t, o, l, i, a) {
|
|
3005
3001
|
const n = C("el-icon");
|
|
3006
|
-
return
|
|
3002
|
+
return r(), S(n, U(Y(e.$props)), { default: v(() => [D(e.$slots, "default", {}, () => [(r(), S(Vl(o.type)))]), o.name ? (r(), u("svg", Ch, [d("use", { "xlink:href": o.name }, null, 8, wh)])) : w("", !0)]), _: 3 }, 16);
|
|
3007
3003
|
}]]);
|
|
3008
|
-
|
|
3009
|
-
e.component(Io.name, Io);
|
|
3010
|
-
}, _o.install = function(e) {
|
|
3004
|
+
_o.install = function(e) {
|
|
3011
3005
|
e.component(_o.name, _o);
|
|
3006
|
+
}, Vo.install = function(e) {
|
|
3007
|
+
e.component(Vo.name, Vo);
|
|
3012
3008
|
};
|
|
3013
|
-
const
|
|
3014
|
-
const o = e, l =
|
|
3009
|
+
const kh = { class: "u-emoji" }, xh = { class: "face-tooltip-head select-none" }, Sh = ["onClick"], Vh = ["src"], _h = { class: "emoji-body select-none" }, Ih = { style: { padding: "0 5px" } }, Lh = ["onClick"], Dh = { class: "emoji-btn select-none" }, Th = { key: 0 }, Fh = V(Object.assign({ name: "cvEmoji" }, { __name: "emoji", props: { emoji: { faceList: [], emojiList: [], allEmoji: {} }, placement: "bottom" }, emits: ["addEmoji"], setup(e, { emit: t }) {
|
|
3010
|
+
const o = e, l = B(0), i = B(0), a = B(new Array(2)), { emojiList: n, faceList: c } = o.emoji;
|
|
3015
3011
|
function p() {
|
|
3016
3012
|
a.value[0] = n[0];
|
|
3017
3013
|
}
|
|
3018
|
-
return (h, m) => (
|
|
3014
|
+
return (h, m) => (r(), u("div", kh, [b(T(Oi), { placement: e.placement, "popper-class": "emoji-popover", width: 250, trigger: "click", onBeforeEnter: p }, { reference: v(() => [d("div", Dh, [h.$slots.default ? D(h.$slots, "default", { key: 1 }, void 0, !0) : (r(), u("div", Th, m[0] || (m[0] = [d("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "icon" }, [d("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z" })], -1), d("span", null, "表情", -1)])))])]), default: v(() => [d("div", xh, [(r(!0), u($, null, M(T(c), (f, g) => (r(), u("label", { key: g, class: z(l.value == g ? "active" : ""), onClick: (k) => function(x) {
|
|
3019
3015
|
switch (l.value = x, x) {
|
|
3020
3016
|
case 0:
|
|
3021
3017
|
i.value = 0;
|
|
@@ -3023,112 +3019,111 @@ const xh = { class: "u-emoji" }, Sh = { class: "face-tooltip-head select-none" }
|
|
|
3023
3019
|
case 1:
|
|
3024
3020
|
i.value = -50, a.value[1] = n[1];
|
|
3025
3021
|
}
|
|
3026
|
-
}(g) }, [
|
|
3027
|
-
} }), [["__scopeId", "data-v-da53b6ed"]]),
|
|
3028
|
-
const { allEmoji: o } =
|
|
3022
|
+
}(g) }, [d("img", { src: f, alt: "" }, null, 8, Vh)], 10, Sh))), 128))]), d("div", _h, [d("div", { class: "emjio-container", style: A({ transform: `translateX(${i.value}%)` }) }, [(r(!0), u($, null, M(a.value, (f, g) => (r(), u("div", { key: g, class: "emoji-wrapper" }, [b(T($i), null, { default: v(() => [d("div", Ih, [(r(!0), u($, null, M(f, (k, x) => (r(), u("span", { key: x, class: "emoji-item", onClick: (y) => h.$emit("addEmoji", x) }, [b(T(Ni), { src: k, title: String(x), class: "emoji", style: { width: "24px", height: "24px", margin: "5px" }, lazy: "" }, null, 8, ["src", "title"])], 8, Lh))), 128))])]), _: 2 }, 1024)]))), 128))], 4)])]), _: 3 }, 8, ["placement"])]));
|
|
3023
|
+
} }), [["__scopeId", "data-v-da53b6ed"]]), Oh = { class: "cv-chat-message" }, $h = { class: "chat-list" }, Nh = { class: "content" }, Mh = { key: 0, class: "username" }, Bh = ["innerHTML"], Eh = { __name: "message", props: { data: { type: [Array], default: () => [] }, userId: { type: [Number], default: 0 } }, setup(e, { expose: t }) {
|
|
3024
|
+
const { allEmoji: o } = se("InjectionEmojiApi"), l = B();
|
|
3029
3025
|
t({ scroll: () => {
|
|
3030
|
-
|
|
3026
|
+
Ee(() => {
|
|
3031
3027
|
const a = document.querySelector(".chat-item:last-child");
|
|
3032
3028
|
l.value.setScrollTop(a.offsetTop);
|
|
3033
3029
|
});
|
|
3034
3030
|
} });
|
|
3035
|
-
const i = (a, n) => n = n.replace(/\[.+?\]/g, (
|
|
3036
|
-
const p = a[
|
|
3037
|
-
return p ? ['<img src="', p, '" width="20" height="20" alt="',
|
|
3031
|
+
const i = (a, n) => n = n.replace(/\[.+?\]/g, (c) => {
|
|
3032
|
+
const p = a[c];
|
|
3033
|
+
return p ? ['<img src="', p, '" width="20" height="20" alt="', c, '" title="', c, '" style="margin: 0 1px; vertical-align: text-bottom"', "/>"].join("") : c;
|
|
3038
3034
|
});
|
|
3039
|
-
return (a, n) => (
|
|
3040
|
-
} },
|
|
3041
|
-
const o = e, l =
|
|
3035
|
+
return (a, n) => (r(), u("div", Oh, [b(T($i), { ref_key: "scrollbarRef", ref: l }, { default: v(() => [d("div", $h, [(r(!0), u($, null, M(e.data, (c, p) => (r(), u("div", { key: p, class: z([{ self: e.userId == c.id }, "chat-item"]) }, [d("div", null, [b(T(bl), null, { default: v(() => n[0] || (n[0] = [d("img", { src: "https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" }, null, -1)])), _: 1, __: [0] })]), d("div", Nh, [e.userId != c.id ? (r(), u("div", Mh, L(c.username), 1)) : w("", !0), d("div", { class: "card-box", innerHTML: i(T(o), c.content) }, null, 8, Bh)]), n[1] || (n[1] = d("div", { class: "date" }, null, -1))], 2))), 128))])]), _: 1 }, 512)]));
|
|
3036
|
+
} }, zh = { class: "cv-chat-wrap" }, Ah = { class: "header" }, Hh = { id: "chat-footer", class: "footer" }, Io = Object.assign({ name: "cvChat" }, { __name: "chat", props: { data: { type: [Array], default: () => [] }, userId: { type: [Number], default: 0 }, emoji: { type: [Object], default: () => ({}) } }, emits: ["submit"], setup(e, { emit: t }) {
|
|
3037
|
+
const o = e, l = B(!1), i = B(""), a = B(), { data: n } = o, c = t, p = (g) => {
|
|
3042
3038
|
const { ctrlKey: k, key: x } = g;
|
|
3043
3039
|
k && x == "Enter" && m();
|
|
3044
3040
|
}, h = () => {
|
|
3045
3041
|
i.value = "", a.value.scroll();
|
|
3046
3042
|
}, m = () => {
|
|
3047
3043
|
let g = i.value;
|
|
3048
|
-
g.trim() ? (g = g.replace(/\n/g, "<br/>"),
|
|
3044
|
+
g.trim() ? (g = g.replace(/\n/g, "<br/>"), c("submit", { clear: h, content: g })) : q({ type: "error", message: "内容不能为空" });
|
|
3049
3045
|
}, f = (g) => {
|
|
3050
3046
|
let k = document.getElementById("emojiInput"), x = k.selectionStart, y = k.selectionEnd, _ = k.value;
|
|
3051
3047
|
if (x === null || y === null) return;
|
|
3052
3048
|
let I = _.substring(0, x) + g + _.substring(y);
|
|
3053
3049
|
k.value = I, k.focus(), k.selectionStart = x + g.length, k.selectionEnd = x + g.length, i.value = I;
|
|
3054
3050
|
};
|
|
3055
|
-
return
|
|
3051
|
+
return De("InjectionEmojiApi", o.emoji), (g, k) => {
|
|
3056
3052
|
const x = C("cvIcons");
|
|
3057
|
-
return
|
|
3053
|
+
return r(), u("div", zh, [d("div", { class: z([{ active: l.value }, "chat-container translate"]) }, [d("div", Ah, [b(x, { size: "32" }, { default: v(() => k[2] || (k[2] = [d("svg", { viewBox: "0 0 1318 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, [d("path", { d: "M1318.502489 432.779052c0-231.790522-209.29842-419.704826-467.458992-419.704826s-467.56979 188.357498-467.56979 419.704826 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319412-19.168145L1165.822116 742.350141C1259.336074 665.56676 1318.502489 555.433023 1318.502489 432.779052z", fill: "#612273", "p-id": "10993" }), d("path", { d: "M1034.304263 745.784895a509.673231 509.673231 0 0 1-183.482363 33.239559c-244.532352 0-445.077689-168.524562-465.353819-383.25211-1.107985 12.07704-1.883575 24.264878-1.883575 36.563514 0 231.790522 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319411-19.168145 25.262064 25.262064 0 0 0-7.5343-17.284571zM1165.822116 669.223112l2.769964 70.689461C1260.44406 663.239991 1318.502489 553.992642 1318.502489 432.779052a366.632331 366.632331 0 0 0-1.883575-36.785111 403.971435 403.971435 0 0 1-150.796798 273.229171z", fill: "#612273", opacity: ".2", "p-id": "10994" }), d("path", { d: "M383.25211 432.779052a383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978C173.510496 258.160571 0 413.943302 0 606.178749c0 101.713049 48.97295 193.011037 126.421121 256.609392l-5.761524 148.470028a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696c-177.831638-59.388011-304.91755-212.733175-304.91755-393.113179z", fill: "#EB3D72", "p-id": "10995" }), d("path", { d: "M342.256654 391.672798c0 117.557239 53.958883 223.59143 140.714132 299.71002a391.008007 391.008007 0 0 1-99.718676-258.603766 383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978-7.091106 0-14.071413 0-21.05172 0.553993a375.939407 375.939407 0 0 0-24.375677 132.958234zM630.111231 802.181346a407.627786 407.627786 0 0 1-283.533434 110.798528 424.136767 424.136767 0 0 1-152.12638-27.699632l-71.686647 71.686648-2.105173 54.291279a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696 486.294741 486.294741 0 0 1-58.058429-23.710885zM85.425665 821.792686l-5.761523-4.985934c1.883575 2.215971 3.656351 4.431941 5.650725 6.647911z", fill: "#EB3D72", opacity: ".5", "p-id": "10996" }), d("path", { d: "M833.426531 332.395585c64.263147-10.193465 64.041549-66.479117 62.601169-75.342999s-15.400995-54.291279-59.942004-47.200173S799.078987 254.836615 799.078987 254.836615a28.475222 28.475222 0 1 0 56.174854-8.97468s6.315516 3.323956 8.30989 20.27613-11.966241 29.029214-35.455529 33.239559-88.638823-19.943735-104.039819-115.452067C709.110582 96.39472 781.57282 28.253625 838.966457 13.185025a55.399264 55.399264 0 0 0-64.041549-5.318329c-56.064055 35.123134-97.170309 109.579745-85.536464 182.817571 14.957801 93.846354 79.664142 151.904783 144.038087 141.711318zM203.980091 573.825579a53.072495 53.072495 0 0 0 33.90435-67.919498c-2.659165-6.537113-21.162519-38.225492-53.51569-25.040467a30.026401 30.026401 0 0 0-19.832936 40.773858 22.159706 22.159706 0 1 0 40.773858-16.619779s5.318329 1.329582 9.861069 13.739017-3.988747 24.043281-21.05172 31.023588-70.02467 0.553993-98.832288-68.695087C68.916685 417.599654 110.798528 353.558104 151.904783 332.395585a42.879031 42.879031 0 0 0-48.97295 7.423502 146.918849 146.918849 0 0 0-32.574767 152.458775c27.810431 68.141095 86.866046 100.605064 133.623025 81.547717z", fill: "#FED150", "p-id": "10997" })], -1)])), _: 1, __: [2] }), k[3] || (k[3] = d("div", { style: { "margin-left": "12px" } }, [d("div", null, "聊天室"), d("div", { style: { "font-size": "12px" } }, "当前2人在线")], -1))]), b(Eh, { ref_key: "messageRef", ref: a, data: T(n), "user-id": e.userId }, null, 8, ["data", "user-id"]), d("div", Hh, [b(T(Eo), { id: "emojiInput", modelValue: i.value, "onUpdate:modelValue": k[0] || (k[0] = (y) => i.value = y), type: "textarea", autosize: { minRows: 1, maxRows: 4 }, placeholder: "请输入内容", onKeydown: $e(p, ["enter"]) }, null, 8, ["modelValue"]), b(Fh, { style: { margin: "0 8px 0" }, emoji: e.emoji, placement: "top-end", onAddEmoji: f }, { default: v(() => k[4] || (k[4] = [d("svg", { width: "22", height: "22", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "7186" }, [d("path", { d: "M510.944 960c-247.04 0-448-200.96-448-448s200.992-448 448-448c247.008 0 448 200.96 448 448S757.984 960 510.944 960zM510.944 128c-211.744 0-384 172.256-384 384 0 211.744 172.256 384 384 384 211.744 0 384-172.256 384-384C894.944 300.256 722.688 128 510.944 128zM512 773.344c-89.184 0-171.904-40.32-226.912-110.624-10.88-13.92-8.448-34.016 5.472-44.896 13.888-10.912 34.016-8.48 44.928 5.472 42.784 54.688 107.136 86.048 176.512 86.048 70.112 0 134.88-31.904 177.664-87.552 10.784-14.016 30.848-16.672 44.864-5.888 14.016 10.784 16.672 30.88 5.888 44.864C685.408 732.32 602.144 773.344 512 773.344zM368 515.2c-26.528 0-48-21.472-48-48l0-64c0-26.528 21.472-48 48-48s48 21.472 48 48l0 64C416 493.696 394.496 515.2 368 515.2zM656 515.2c-26.496 0-48-21.472-48-48l0-64c0-26.528 21.504-48 48-48s48 21.472 48 48l0 64C704 493.696 682.496 515.2 656 515.2z", "p-id": "7187" })], -1)])), _: 1, __: [4] }, 8, ["emoji"]), b(x, { size: "18", class: z([{ ".cv-chat-wrap submit-btn": i.value.trim() != "" }, "select-none cursor-pointer"]), style: { "padding-bottom": "5px" }, onClick: m }, { default: v(() => k[5] || (k[5] = [d("svg", { viewBox: "0 0 1025 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "15072" }, [d("path", { d: "M1008.00076 6.285714q18.857143 13.714286 15.428571 36.571429l-146.285714 877.714286q-2.857143 16.571429-18.285714 25.714286-8 4.571429-17.714286 4.571429-6.285714 0-13.714286-2.857143l-258.857143-105.714286-138.285714 168.571429q-10.285714 13.142857-28 13.142857-7.428571 0-12.571429-2.285714-10.857143-4-17.428571-13.428571t-6.571429-20.857143l0-199.428571 493.714286-605.142857-610.857143 528.571429-225.714286-92.571429q-21.142857-8-22.857143-31.428571-1.142857-22.857143 18.285714-33.714286l950.857143-548.571429q8.571429-5.142857 18.285714-5.142857 11.428571 0 20.571429 6.285714z", "p-id": "15073" })], -1)])), _: 1, __: [5] }, 8, ["class"])])], 2), b(T(Ne), { class: "chat-btn", onClick: k[1] || (k[1] = (y) => l.value = !l.value) }, { default: v(() => k[6] || (k[6] = [F("chat")])), _: 1, __: [6] })]);
|
|
3058
3054
|
};
|
|
3059
3055
|
} });
|
|
3060
|
-
|
|
3061
|
-
e.component(
|
|
3056
|
+
Io.install = function(e) {
|
|
3057
|
+
e.component(Io.name, Io);
|
|
3062
3058
|
};
|
|
3063
|
-
const
|
|
3064
|
-
const t = e, { data: o, vertical: l, suffixIcon: i, prefixIcon: a, size: n, height:
|
|
3059
|
+
const Ph = { key: 0 }, Lo = Object.assign({ name: "cvNoticeBar" }, { __name: "notice-bar", props: { data: { type: [String, Array], default: () => [] }, vertical: { type: [Boolean], default: !1 }, suffixIcon: { type: [String], default: "" }, prefixIcon: { type: [String], default: "" }, size: { type: [Number], default: 14 }, height: { type: [Number], default: 40 }, delay: { type: [Number], default: 1e3 }, spped: { type: [Number], default: 100 }, color: { type: [String], default: "--color-warning" }, background: { type: [String], default: "var(--color-warning-light-9)" } }, setup(e) {
|
|
3060
|
+
const t = e, { data: o, vertical: l, suffixIcon: i, prefixIcon: a, size: n, height: c, delay: p, spped: h, color: m, background: f } = t, g = Ho({ boxWidth: 0, textWidth: 0, oneTime: 0, twoTime: 0, order: 1 }), k = B({}), x = B({ style: { cssText: "" } }), y = G(() => t.delay > 2e3 ? t.delay : 2e3), _ = () => {
|
|
3065
3061
|
g.oneTime = g.textWidth / t.spped, g.twoTime = (g.textWidth + g.boxWidth) / t.spped;
|
|
3066
3062
|
}, I = () => {
|
|
3067
|
-
|
|
3068
|
-
g.order === 1 ? ((B = x.value) != null && B.style && (x.value.style.cssText = `animation: oneAnimation ${g.oneTime}s linear; opactity: 1;}`), g.order = 2) : (H = x.value) != null && H.style && (x.value.style.cssText = `animation: twoAnimation ${g.twoTime}s linear infinite; opacity: 1;`);
|
|
3063
|
+
g.order === 1 ? (x.value?.style && (x.value.style.cssText = `animation: oneAnimation ${g.oneTime}s linear; opactity: 1;}`), g.order = 2) : x.value?.style && (x.value.style.cssText = `animation: twoAnimation ${g.twoTime}s linear infinite; opacity: 1;`);
|
|
3069
3064
|
};
|
|
3070
|
-
return
|
|
3071
|
-
t.vertical || (
|
|
3065
|
+
return ze(() => {
|
|
3066
|
+
t.vertical || (Ee(() => {
|
|
3072
3067
|
g.boxWidth = k.value.offsetWidth, g.textWidth = x.value.offsetWidth, document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${g.textWidth}px;}}`), document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${g.boxWidth}px;} 100% {left: -${g.textWidth}px;}}`), _(), setTimeout(() => {
|
|
3073
3068
|
I();
|
|
3074
3069
|
}, t.delay);
|
|
3075
3070
|
}), x.value.addEventListener("animationend", () => {
|
|
3076
3071
|
I();
|
|
3077
3072
|
}, !1));
|
|
3078
|
-
}), (
|
|
3079
|
-
const
|
|
3080
|
-
return
|
|
3073
|
+
}), (E, P) => {
|
|
3074
|
+
const j = C("el-carousel-item"), W = C("el-carousel"), ee = C("cvIcons");
|
|
3075
|
+
return r(), u("div", { class: "cv-notice-bar", style: A({ background: T(f), height: `${T(c)}px` }) }, [T(l) ? (r(), u("div", Ph, [b(W, { height: "40px", direction: "vertical", autoplay: !0, "indicator-position": "none", interval: y.value }, { default: v(() => [(r(!0), u($, null, M(T(o), (te) => (r(), S(j, { key: te }, { default: v(() => [F(L(te), 1)]), _: 2 }, 1024))), 128))]), _: 1 }, 8, ["interval"])])) : (r(), u("div", { key: 1, style: A({ color: T(m), fontSize: `${T(n)}px` }), class: "cv-notice-bar-wrap" }, [T(a) ? (r(), S(ee, { key: 0, type: T(a) }, null, 8, ["type"])) : w("", !0), d("div", { ref_key: "boxRef", ref: k, class: "text-box" }, [d("div", { ref_key: "textRef", ref: x, class: "text" }, L(T(o)), 513)], 512), T(i) ? (r(), S(ee, { key: 1, type: T(i) }, null, 8, ["type"])) : w("", !0)], 4))], 4);
|
|
3081
3076
|
};
|
|
3082
3077
|
} });
|
|
3083
|
-
|
|
3084
|
-
e.component(
|
|
3078
|
+
Lo.install = function(e) {
|
|
3079
|
+
e.component(Lo.name, Lo);
|
|
3085
3080
|
};
|
|
3086
|
-
const
|
|
3087
|
-
const t = new
|
|
3081
|
+
const jh = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSize: 2, placeholder: "", autoDestroy: !0, extensions: [_n] }), ta = "change", oa = "update", ia = "focus", aa = "blur", la = "ready", na = "update:modelValue", Te = (e) => {
|
|
3082
|
+
const t = new In();
|
|
3088
3083
|
return { compartment: t, run: (o) => {
|
|
3089
|
-
t.get(e.state) ? e.dispatch({ effects: t.reconfigure(o) }) : e.dispatch({ effects:
|
|
3084
|
+
t.get(e.state) ? e.dispatch({ effects: t.reconfigure(o) }) : e.dispatch({ effects: Ln.appendConfig.of(t.of(o)) });
|
|
3090
3085
|
} };
|
|
3091
|
-
},
|
|
3092
|
-
const { compartment: o, run: l } =
|
|
3086
|
+
}, sa = (e, t) => {
|
|
3087
|
+
const { compartment: o, run: l } = Te(e);
|
|
3093
3088
|
return (i) => {
|
|
3094
3089
|
const a = o.get(e.state);
|
|
3095
3090
|
l(i ?? a !== t ? t : []);
|
|
3096
3091
|
};
|
|
3097
|
-
},
|
|
3098
|
-
const o =
|
|
3099
|
-
const
|
|
3100
|
-
return Object.keys(
|
|
3101
|
-
p !== "modelValue" && (
|
|
3102
|
-
}),
|
|
3092
|
+
}, Rh = xl({ name: "VueCodemirror", props: { modelValue: { type: String, default: "" }, autofocus: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, indentWithTab: { type: Boolean, default: !1 }, tabSize: Number, placeholder: String, style: Object, autoDestroy: { type: Boolean, default: !1 }, phrases: Object, root: Object, extensions: Array, selection: Object }, emits: { [ta]: (e, t) => !0, [oa]: (e) => !0, [ia]: (e) => !0, [aa]: (e) => !0, [la]: (e) => !0, [na]: (e, t) => !0 }, setup(e, t) {
|
|
3093
|
+
const o = re(), l = re(), i = re(), a = { ...jh }, n = G(() => {
|
|
3094
|
+
const c = {};
|
|
3095
|
+
return Object.keys(Sl(e)).forEach((p) => {
|
|
3096
|
+
p !== "modelValue" && (c[p] = e[p] ?? a[p]);
|
|
3097
|
+
}), c;
|
|
3103
3098
|
});
|
|
3104
|
-
return
|
|
3105
|
-
l.value = (({ onUpdate: p, onChange: h, onFocus: m, onBlur: f, ...g }) =>
|
|
3099
|
+
return ze(() => {
|
|
3100
|
+
l.value = (({ onUpdate: p, onChange: h, onFocus: m, onBlur: f, ...g }) => Ve.create({ doc: g.doc, selection: g.selection, extensions: [...Array.isArray(g.extensions) ? g.extensions : [g.extensions], X.updateListener.of((k) => {
|
|
3106
3101
|
p(k), k.docChanged && h(k.state.doc.toString(), k), k.focusChanged && (k.view.hasFocus ? m(k) : f(k));
|
|
3107
|
-
})] }))({ doc: e.modelValue, selection: n.value.selection, extensions: a.extensions ?? [], onFocus: (p) => t.emit(
|
|
3108
|
-
p !== e.modelValue && (t.emit(
|
|
3109
|
-
} }), i.value = new
|
|
3102
|
+
})] }))({ doc: e.modelValue, selection: n.value.selection, extensions: a.extensions ?? [], onFocus: (p) => t.emit(ia, p), onBlur: (p) => t.emit(aa, p), onUpdate: (p) => t.emit(oa, p), onChange: (p, h) => {
|
|
3103
|
+
p !== e.modelValue && (t.emit(ta, p, h), t.emit(na, p, h));
|
|
3104
|
+
} }), i.value = new X({ state: l.value, parent: o.value, root: n.value.root }), i.value.contentDOM.addEventListener("scroll", (p) => {
|
|
3110
3105
|
});
|
|
3111
|
-
const
|
|
3112
|
-
const h = () => p.state.doc.toString(), { run: m } =
|
|
3106
|
+
const c = ((p) => {
|
|
3107
|
+
const h = () => p.state.doc.toString(), { run: m } = Te(p), f = sa(p, [X.editable.of(!1), Ve.readOnly.of(!0)]), g = sa(p, Tn.of([On])), { run: k } = Te(p), { run: x } = Te(p), { run: y } = Te(p), { run: _ } = Te(p);
|
|
3113
3108
|
return { focus: () => p.focus(), getDoc: h, setDoc: (I) => {
|
|
3114
3109
|
I !== h() && p.dispatch({ changes: { from: 0, to: p.state.doc.length, insert: I } });
|
|
3115
3110
|
}, reExtensions: m, toggleDisabled: f, toggleIndentWithTab: g, setTabSize: (I) => {
|
|
3116
|
-
k([
|
|
3111
|
+
k([Ve.tabSize.of(I), $n.of(" ".repeat(I))]);
|
|
3117
3112
|
}, setPhrases: (I) => {
|
|
3118
|
-
x([
|
|
3113
|
+
x([Ve.phrases.of(I)]);
|
|
3119
3114
|
}, setPlaceholder: (I) => {
|
|
3120
|
-
y(
|
|
3115
|
+
y(Fn(I));
|
|
3121
3116
|
}, setStyle: (I = {}) => {
|
|
3122
|
-
_(
|
|
3117
|
+
_(X.theme({ "&": { ...I } }));
|
|
3123
3118
|
} };
|
|
3124
3119
|
})(i.value);
|
|
3125
|
-
|
|
3126
|
-
p !==
|
|
3127
|
-
}),
|
|
3128
|
-
}),
|
|
3120
|
+
ie(() => e.modelValue, (p) => {
|
|
3121
|
+
p !== c.getDoc() && c.setDoc(p);
|
|
3122
|
+
}), ie(() => e.extensions, (p) => c.reExtensions(p || []), { immediate: !0 }), ie(() => n.value.disabled, (p) => c.toggleDisabled(p), { immediate: !0 }), ie(() => n.value.indentWithTab, (p) => c.toggleIndentWithTab(p), { immediate: !0 }), ie(() => n.value.tabSize, (p) => c.setTabSize(p), { immediate: !0 }), ie(() => n.value.phrases, (p) => c.setPhrases(p || {}), { immediate: !0 }), ie(() => n.value.placeholder, (p) => c.setPlaceholder(p), { immediate: !0 }), ie(() => n.value.style, (p) => c.setStyle(p), { immediate: !0 }), n.value.autofocus && c.focus(), t.emit(la, { state: l.value, view: i.value, container: o.value, editorTools: c });
|
|
3123
|
+
}), Sn(() => {
|
|
3129
3124
|
n.value.autoDestroy && i.value && i.value.destroy();
|
|
3130
|
-
}), () =>
|
|
3131
|
-
} }), ca = "#e06c75", To = "#abb2bf", Fi = "#7d8799", da = "#d19a66", ha = "#2c313a", pa = "#282c34", Ko = "#353a42", ua = "#528bff", Wh = q.theme({ "&": { color: To, backgroundColor: pa }, ".cm-content": { caretColor: ua }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: ua }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: "#3E4451" }, ".cm-panels": { backgroundColor: "#21252b", color: To }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: "#72a1ff59", outline: "1px solid #457dff" }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: "#6199ff2f" }, ".cm-activeLine": { backgroundColor: "#6699ff0b" }, ".cm-selectionMatch": { backgroundColor: "#aafe661a" }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bad0f847" }, ".cm-gutters": { backgroundColor: pa, color: Fi, border: "none" }, ".cm-activeLineGutter": { backgroundColor: ha }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: "#ddd" }, ".cm-tooltip": { border: "none", backgroundColor: Ko }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: Ko, borderBottomColor: Ko }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { backgroundColor: ha, color: To } } }, { dark: !0 }), Yh = te.define([{ tag: s.keyword, color: "#c678dd" }, { tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color: ca }, { tag: [s.function(s.variableName), s.labelName], color: "#61afef" }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: da }, { tag: [s.definition(s.name), s.separator], color: To }, { tag: [s.typeName, s.className, s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: "#e5c07b" }, { tag: [s.operator, s.operatorKeyword, s.url, s.escape, s.regexp, s.link, s.special(s.string)], color: "#56b6c2" }, { tag: [s.meta, s.comment], color: Fi }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.strikethrough, textDecoration: "line-through" }, { tag: s.link, color: Fi, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: ca }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: da }, { tag: [s.processingInstruction, s.string, s.inserted], color: "#98c379" }, { tag: s.invalid, color: "#ffffff" }]), Xh = [Wh, ee(Yh)], qh = !1, Go = "#FAFAFA", pe = "#90A4AE", je = "#80CBC440", ma = "#272727", Zo = "#FAFAFA", ga = "#00000010", Kh = "#c2c2c222", Gh = "#CFD8DC", Zh = "#7E939E", Qh = "#FAFAFA", fa = "#7C4DFF", Qo = "#90A4AE", va = "#6182B8", Jh = "#91B859", ep = "#F76D47", ya = "#8796B0", tp = "#FFB62C", op = "#F76D47", ip = "#90A4AE", ap = "#91B859", lp = "#E53935", np = "#39ADB5", sp = q.theme({ "&": { color: pe, backgroundColor: Go }, ".cm-content": { caretColor: ma }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: ma }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: je }, ".cm-panels": { backgroundColor: Zo, color: pe }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: Zo, outline: `1px solid ${ga}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: je }, ".cm-activeLine": { backgroundColor: Kh }, ".cm-selectionMatch": { backgroundColor: je }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Qh, outline: "none" }, ".cm-gutters": { backgroundColor: Go, color: pe, border: "none" }, ".cm-activeLineGutter": { backgroundColor: Go }, ".cm-lineNumbers .cm-gutterElement": { color: Gh }, ".cm-lineNumbers .cm-activeLineGutter": { color: Zh }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: pe }, ".cm-tooltip": { border: `1px solid ${ga}`, backgroundColor: Zo, color: pe }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: pe, borderBottomColor: pe }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: je, color: pe } } }, { dark: qh }), rp = te.define([{ tag: s.keyword, color: fa }, { tag: [s.name, s.deleted, s.character, s.macroName], color: Qo }, { tag: [s.propertyName], color: va }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Jh }, { tag: [s.function(s.variableName), s.labelName], color: va }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: ep }, { tag: [s.definition(s.name), s.separator], color: Qo }, { tag: [s.className], color: tp }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: op }, { tag: [s.typeName], color: ya, fontStyle: ya }, { tag: [s.operator, s.operatorKeyword], color: fa }, { tag: [s.url, s.escape, s.regexp, s.link], color: np }, { tag: [s.meta, s.comment], color: ip }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: ap }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: Qo }, { tag: s.invalid, color: lp }, { tag: s.strikethrough, textDecoration: "line-through" }]), cp = [sp, ee(rp)], dp = !0, Jo = "#263238", ue = "#EEFFFF", Re = "#80CBC420", ba = "#FFCC00", ei = "#263238", Ca = "#FFFFFF10", hp = "#4c616c22", pp = "#37474F", up = "#607a86", mp = "#263238", wa = "#C792EA", ti = "#EEFFFF", ka = "#82AAFF", gp = "#C3E88D", fp = "#F78C6C", xa = "#B2CCD6", vp = "#FFCB6B", yp = "#F78C6C", bp = "#546E7A", Cp = "#C3E88D", wp = "#FF5370", kp = "#89DDFF", xp = q.theme({ "&": { color: ue, backgroundColor: Jo }, ".cm-content": { caretColor: ba }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: ba }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Re }, ".cm-panels": { backgroundColor: ei, color: ue }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: ei, outline: `1px solid ${Ca}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Re }, ".cm-activeLine": { backgroundColor: hp }, ".cm-selectionMatch": { backgroundColor: Re }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: mp, outline: "none" }, ".cm-gutters": { backgroundColor: Jo, color: ue, border: "none" }, ".cm-activeLineGutter": { backgroundColor: Jo }, ".cm-lineNumbers .cm-gutterElement": { color: pp }, ".cm-lineNumbers .cm-activeLineGutter": { color: up }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ue }, ".cm-tooltip": { border: `1px solid ${Ca}`, backgroundColor: ei, color: ue }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ue, borderBottomColor: ue }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Re, color: ue } } }, { dark: dp }), Sp = te.define([{ tag: s.keyword, color: wa }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ti }, { tag: [s.propertyName], color: ka }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: gp }, { tag: [s.function(s.variableName), s.labelName], color: ka }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: fp }, { tag: [s.definition(s.name), s.separator], color: ti }, { tag: [s.className], color: vp }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: yp }, { tag: [s.typeName], color: xa, fontStyle: xa }, { tag: [s.operator, s.operatorKeyword], color: wa }, { tag: [s.url, s.escape, s.regexp, s.link], color: kp }, { tag: [s.meta, s.comment], color: bp }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Cp }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ti }, { tag: s.invalid, color: wp }, { tag: s.strikethrough, textDecoration: "line-through" }]), Vp = [xp, ee(Sp)], _p = !1, oi = "#FDF6E3", me = "#586E75", Ue = "#EEE8D5", Sa = "#657B83", ii = "#FDF6E3", Va = "#D3AF86", Ip = "#d5bd5c22", Lp = "#586E75", Dp = "#567983", Tp = "#EEE8D5", _a = "#859900", ai = "#268BD2", Ia = "#268BD2", Fp = "#2AA198", Op = "#CB4B16", La = "#CB4B16", $p = "#CB4B16", Np = "#D33682", Mp = "#93A1A1", Bp = "#268BD2", Ep = "#DC322F", zp = "#DC322F", Ap = q.theme({ "&": { color: me, backgroundColor: oi }, ".cm-content": { caretColor: Sa }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Sa }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ue }, ".cm-panels": { backgroundColor: ii, color: me }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: ii, outline: `1px solid ${Va}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ue }, ".cm-activeLine": { backgroundColor: Ip }, ".cm-selectionMatch": { backgroundColor: Ue }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Tp, outline: "none" }, ".cm-gutters": { backgroundColor: oi, color: me, border: "none" }, ".cm-activeLineGutter": { backgroundColor: oi }, ".cm-lineNumbers .cm-gutterElement": { color: Lp }, ".cm-lineNumbers .cm-activeLineGutter": { color: Dp }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: me }, ".cm-tooltip": { border: `1px solid ${Va}`, backgroundColor: ii, color: me }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: me, borderBottomColor: me }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ue, color: me } } }, { dark: _p }), Hp = te.define([{ tag: s.keyword, color: _a }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ai }, { tag: [s.propertyName], color: Ia }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Fp }, { tag: [s.function(s.variableName), s.labelName], color: Ia }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Op }, { tag: [s.definition(s.name), s.separator], color: ai }, { tag: [s.className], color: $p }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Np }, { tag: [s.typeName], color: La, fontStyle: La }, { tag: [s.operator, s.operatorKeyword], color: _a }, { tag: [s.url, s.escape, s.regexp, s.link], color: zp }, { tag: [s.meta, s.comment], color: Mp }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Bp }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ai }, { tag: s.invalid, color: Ep }, { tag: s.strikethrough, textDecoration: "line-through" }]), Pp = [Ap, ee(Hp)], jp = !0, li = "#002B36", ge = "#93A1A1", We = "#274642", Da = "#D30102", ni = "#002B36", Ta = "#2AA19899", Rp = "#005b7022", Up = "#93A1A1", Wp = "#949494", Yp = "#073642", Fa = "#859900", si = "#268BD2", Oa = "#268BD2", Xp = "#2AA198", qp = "#CB4B16", $a = "#CB4B16", Kp = "#CB4B16", Gp = "#D33682", Zp = "#586E75", Qp = "#268BD2", Jp = "#DC322F", eu = "#DC322F", tu = [q.theme({ "&": { color: ge, backgroundColor: li }, ".cm-content": { caretColor: Da }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Da }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: We }, ".cm-panels": { backgroundColor: ni, color: ge }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: ni, outline: `1px solid ${Ta}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: We }, ".cm-activeLine": { backgroundColor: Rp }, ".cm-selectionMatch": { backgroundColor: We }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Yp, outline: "none" }, ".cm-gutters": { backgroundColor: li, color: ge, border: "none" }, ".cm-activeLineGutter": { backgroundColor: li }, ".cm-lineNumbers .cm-gutterElement": { color: Up }, ".cm-lineNumbers .cm-activeLineGutter": { color: Wp }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ge }, ".cm-tooltip": { border: `1px solid ${Ta}`, backgroundColor: ni, color: ge }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ge, borderBottomColor: ge }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: We, color: ge } } }, { dark: jp }), ee(te.define([{ tag: s.keyword, color: Fa }, { tag: [s.name, s.deleted, s.character, s.macroName], color: si }, { tag: [s.propertyName], color: Oa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Xp }, { tag: [s.function(s.variableName), s.labelName], color: Oa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: qp }, { tag: [s.definition(s.name), s.separator], color: si }, { tag: [s.className], color: Kp }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Gp }, { tag: [s.typeName], color: $a, fontStyle: $a }, { tag: [s.operator, s.operatorKeyword], color: Fa }, { tag: [s.url, s.escape, s.regexp, s.link], color: eu }, { tag: [s.meta, s.comment], color: Zp }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Qp }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: si }, { tag: s.invalid, color: Jp }, { tag: s.strikethrough, textDecoration: "line-through" }]))], ou = !0, ri = "#282A36", fe = "#F8F8F2", Ye = "#44475A", Na = "#F8F8F2", ci = "#282A36", Ma = "#191A21", iu = "#53576c22", au = "#6272A4", lu = "#F8F8F2", nu = "#44475A", Ba = "#FF79C6", di = "#F8F8F2", Ea = "#50FA7B", su = "#F1FA8C", ru = "#BD93F9", za = "#8BE9FD", cu = "#8BE9FD", du = "#BD93F9", hu = "#6272A4", pu = "#BD93F9", uu = "#FF5555", mu = "#F1FA8C", gu = [q.theme({ "&": { color: fe, backgroundColor: ri }, ".cm-content": { caretColor: Na }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Na }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ye }, ".cm-panels": { backgroundColor: ci, color: fe }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: ci, outline: `1px solid ${Ma}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ye }, ".cm-activeLine": { backgroundColor: iu }, ".cm-selectionMatch": { backgroundColor: Ye }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: nu, outline: "none" }, ".cm-gutters": { backgroundColor: ri, color: fe, border: "none" }, ".cm-activeLineGutter": { backgroundColor: ri }, ".cm-lineNumbers .cm-gutterElement": { color: au }, ".cm-lineNumbers .cm-activeLineGutter": { color: lu }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: fe }, ".cm-tooltip": { border: `1px solid ${Ma}`, backgroundColor: ci, color: fe }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: fe, borderBottomColor: fe }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ye, color: fe } } }, { dark: ou }), ee(te.define([{ tag: s.keyword, color: Ba }, { tag: [s.name, s.deleted, s.character, s.macroName], color: di }, { tag: [s.propertyName], color: Ea }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: su }, { tag: [s.function(s.variableName), s.labelName], color: Ea }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: ru }, { tag: [s.definition(s.name), s.separator], color: di }, { tag: [s.className], color: cu }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: du }, { tag: [s.typeName], color: za, fontStyle: za }, { tag: [s.operator, s.operatorKeyword], color: Ba }, { tag: [s.url, s.escape, s.regexp, s.link], color: mu }, { tag: [s.meta, s.comment], color: hu }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: pu }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: di }, { tag: s.invalid, color: uu }, { tag: s.strikethrough, textDecoration: "line-through" }]))], fu = !1, hi = "#fff", ve = "#444d56", Xe = "#0366d625", Aa = "#044289", pi = "#fff", Ha = "#e1e4e8", vu = "#c6c6c622", yu = "#1b1f234d", bu = "#24292e", Cu = "#34d05840", Pa = "#d73a49", ui = "#e36209", ja = "#005cc5", wu = "#032f62", ku = "#005cc5", Ra = "#005cc5", xu = "#6f42c1", Su = "#005cc5", Vu = "#6a737d", _u = "#005cc5", Iu = "#cb2431", Lu = "#032f62", Du = [q.theme({ "&": { color: ve, backgroundColor: hi }, ".cm-content": { caretColor: Aa }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Aa }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Xe }, ".cm-panels": { backgroundColor: pi, color: ve }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: pi, outline: `1px solid ${Ha}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Xe }, ".cm-activeLine": { backgroundColor: vu }, ".cm-selectionMatch": { backgroundColor: Xe }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Cu, outline: "none" }, ".cm-gutters": { backgroundColor: hi, color: ve, border: "none" }, ".cm-activeLineGutter": { backgroundColor: hi }, ".cm-lineNumbers .cm-gutterElement": { color: yu }, ".cm-lineNumbers .cm-activeLineGutter": { color: bu }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ve }, ".cm-tooltip": { border: `1px solid ${Ha}`, backgroundColor: pi, color: ve }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ve, borderBottomColor: ve }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Xe, color: ve } } }, { dark: fu }), ee(te.define([{ tag: s.keyword, color: Pa }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ui }, { tag: [s.propertyName], color: ja }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: wu }, { tag: [s.function(s.variableName), s.labelName], color: ja }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: ku }, { tag: [s.definition(s.name), s.separator], color: ui }, { tag: [s.className], color: xu }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Su }, { tag: [s.typeName], color: Ra, fontStyle: Ra }, { tag: [s.operator, s.operatorKeyword], color: Pa }, { tag: [s.url, s.escape, s.regexp, s.link], color: Lu }, { tag: [s.meta, s.comment], color: Vu }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: _u }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ui }, { tag: s.invalid, color: Iu }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Tu = !0, mi = "#24292e", ye = "#d1d5da", qe = "#3392FF44", Ua = "#c8e1ff", gi = "#24292e", Wa = "#1b1f23", Fu = "#4d566022", Ou = "#444d56", $u = "#e1e4e8", Nu = "#17E5E650", Ya = "#f97583", fi = "#ffab70", Xa = "#79b8ff", Mu = "#9ecbff", Bu = "#79b8ff", qa = "#79b8ff", Eu = "#b392f0", zu = "#79b8ff", Au = "#6a737d", Hu = "#79b8ff", Pu = "#f97583", ju = "#9ecbff", Ru = [q.theme({ "&": { color: ye, backgroundColor: mi }, ".cm-content": { caretColor: Ua }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Ua }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: qe }, ".cm-panels": { backgroundColor: gi, color: ye }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: gi, outline: `1px solid ${Wa}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: qe }, ".cm-activeLine": { backgroundColor: Fu }, ".cm-selectionMatch": { backgroundColor: qe }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Nu, outline: "none" }, ".cm-gutters": { backgroundColor: mi, color: ye, border: "none" }, ".cm-activeLineGutter": { backgroundColor: mi }, ".cm-lineNumbers .cm-gutterElement": { color: Ou }, ".cm-lineNumbers .cm-activeLineGutter": { color: $u }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ye }, ".cm-tooltip": { border: `1px solid ${Wa}`, backgroundColor: gi, color: ye }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ye, borderBottomColor: ye }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: qe, color: ye } } }, { dark: Tu }), ee(te.define([{ tag: s.keyword, color: Ya }, { tag: [s.name, s.deleted, s.character, s.macroName], color: fi }, { tag: [s.propertyName], color: Xa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Mu }, { tag: [s.function(s.variableName), s.labelName], color: Xa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Bu }, { tag: [s.definition(s.name), s.separator], color: fi }, { tag: [s.className], color: Eu }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: zu }, { tag: [s.typeName], color: qa, fontStyle: qa }, { tag: [s.operator, s.operatorKeyword], color: Ya }, { tag: [s.url, s.escape, s.regexp, s.link], color: ju }, { tag: [s.meta, s.comment], color: Au }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Hu }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: fi }, { tag: s.invalid, color: Pu }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Uu = !0, vi = "#21202e", be = "#edecee", Ke = "#3d375e7f", Ka = "#a277ff", yi = "#21202e", Ga = "#3b334b", Wu = "#4d4b6622", Yu = "#a394f033", Xu = "#cdccce", qu = "#a394f033", Za = "#a277ff", bi = "#edecee", Qa = "#ffca85", Ku = "#61ffca", Gu = "#61ffca", Ja = "#82e2ff", Zu = "#82e2ff", Qu = "#61ffca", Ju = "#6d6d6d", em = "#a277ff", tm = "#ff6767", om = "#61ffca", im = [q.theme({ "&": { color: be, backgroundColor: vi }, ".cm-content": { caretColor: Ka }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Ka }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ke }, ".cm-panels": { backgroundColor: yi, color: be }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: yi, outline: `1px solid ${Ga}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ke }, ".cm-activeLine": { backgroundColor: Wu }, ".cm-selectionMatch": { backgroundColor: Ke }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: qu, outline: "none" }, ".cm-gutters": { backgroundColor: vi, color: be, border: "none" }, ".cm-activeLineGutter": { backgroundColor: vi }, ".cm-lineNumbers .cm-gutterElement": { color: Yu }, ".cm-lineNumbers .cm-activeLineGutter": { color: Xu }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: be }, ".cm-tooltip": { border: `1px solid ${Ga}`, backgroundColor: yi, color: be }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: be, borderBottomColor: be }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ke, color: be } } }, { dark: Uu }), ee(te.define([{ tag: s.keyword, color: Za }, { tag: [s.name, s.deleted, s.character, s.macroName], color: bi }, { tag: [s.propertyName], color: Qa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Ku }, { tag: [s.function(s.variableName), s.labelName], color: Qa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Gu }, { tag: [s.definition(s.name), s.separator], color: bi }, { tag: [s.className], color: Zu }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Qu }, { tag: [s.typeName], color: Ja, fontStyle: Ja }, { tag: [s.operator, s.operatorKeyword], color: Za }, { tag: [s.url, s.escape, s.regexp, s.link], color: om }, { tag: [s.meta, s.comment], color: Ju }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: em }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: bi }, { tag: s.invalid, color: tm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], am = !0, Ci = "#1a1b26", Ce = "#787c99", Ge = "#515c7e40", el = "#c0caf5", wi = "#1a1b26", tl = "#787c99", lm = "#43455c22", nm = "#363b54", sm = "#737aa2", rm = "#16161e", ol = "#bb9af7", ki = "#c0caf5", il = "#7aa2f7", cm = "#9ece6a", dm = "#bb9af7", al = "#0db9d7", hm = "#c0caf5", pm = "#ff9e64", um = "#444b6a", mm = "#89ddff", gm = "#ff5370", fm = "#b4f9f8", vm = [q.theme({ "&": { color: Ce, backgroundColor: Ci }, ".cm-content": { caretColor: el }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: el }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ge }, ".cm-panels": { backgroundColor: wi, color: Ce }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: wi, outline: `1px solid ${tl}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ge }, ".cm-activeLine": { backgroundColor: lm }, ".cm-selectionMatch": { backgroundColor: Ge }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: rm, outline: "none" }, ".cm-gutters": { backgroundColor: Ci, color: Ce, border: "none" }, ".cm-activeLineGutter": { backgroundColor: Ci }, ".cm-lineNumbers .cm-gutterElement": { color: nm }, ".cm-lineNumbers .cm-activeLineGutter": { color: sm }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: Ce }, ".cm-tooltip": { border: `1px solid ${tl}`, backgroundColor: wi, color: Ce }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: Ce, borderBottomColor: Ce }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ge, color: Ce } } }, { dark: am }), ee(te.define([{ tag: s.keyword, color: ol }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ki }, { tag: [s.propertyName], color: il }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: cm }, { tag: [s.function(s.variableName), s.labelName], color: il }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: dm }, { tag: [s.definition(s.name), s.separator], color: ki }, { tag: [s.className], color: hm }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: pm }, { tag: [s.typeName], color: al, fontStyle: al }, { tag: [s.operator, s.operatorKeyword], color: ol }, { tag: [s.url, s.escape, s.regexp, s.link], color: fm }, { tag: [s.meta, s.comment], color: um }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: mm }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ki }, { tag: s.invalid, color: gm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], ym = !0, xi = "#24283b", we = "#7982a9", Ze = "#6f7bb630", ll = "#c0caf5", Si = "#24283b", nl = "#7982a9", bm = "#4d547722", Cm = "#3b4261", wm = "#737aa2", km = "#1f2335", sl = "#bb9af7", Vi = "#c0caf5", rl = "#7aa2f7", xm = "#9ece6a", Sm = "#bb9af7", cl = "#2ac3de", Vm = "#c0caf5", _m = "#ff9e64", Im = "#565f89", Lm = "#89ddff", Dm = "#ff5370", Tm = "#b4f9f8", Fm = [q.theme({ "&": { color: we, backgroundColor: xi }, ".cm-content": { caretColor: ll }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: ll }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ze }, ".cm-panels": { backgroundColor: Si, color: we }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: Si, outline: `1px solid ${nl}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ze }, ".cm-activeLine": { backgroundColor: bm }, ".cm-selectionMatch": { backgroundColor: Ze }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: km, outline: "none" }, ".cm-gutters": { backgroundColor: xi, color: we, border: "none" }, ".cm-activeLineGutter": { backgroundColor: xi }, ".cm-lineNumbers .cm-gutterElement": { color: Cm }, ".cm-lineNumbers .cm-activeLineGutter": { color: wm }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: we }, ".cm-tooltip": { border: `1px solid ${nl}`, backgroundColor: Si, color: we }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: we, borderBottomColor: we }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ze, color: we } } }, { dark: ym }), ee(te.define([{ tag: s.keyword, color: sl }, { tag: [s.name, s.deleted, s.character, s.macroName], color: Vi }, { tag: [s.propertyName], color: rl }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: xm }, { tag: [s.function(s.variableName), s.labelName], color: rl }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Sm }, { tag: [s.definition(s.name), s.separator], color: Vi }, { tag: [s.className], color: Vm }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: _m }, { tag: [s.typeName], color: cl, fontStyle: cl }, { tag: [s.operator, s.operatorKeyword], color: sl }, { tag: [s.url, s.escape, s.regexp, s.link], color: Tm }, { tag: [s.meta, s.comment], color: Im }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Lm }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: Vi }, { tag: s.invalid, color: Dm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Om = !1, _i = "#e1e2e7", ke = "#6a6f8e", Qe = "#8591b840", dl = "#3760bf", Ii = "#e1e2e7", hl = "#6a6f8e", $m = "#a7aaba22", Nm = "#b3b6cd", Mm = "#68709a", Bm = "#e9e9ec", pl = "#9854f1", Li = "#3760bf", ul = "#2e7de9", Em = "#587539", zm = "#9854f1", ml = "#07879d", Am = "#3760bf", Hm = "#b15c00", Pm = "#9da3c2", jm = "#006a83", Rm = "#ff3e64", Um = "#2e5857", Wm = [q.theme({ "&": { color: ke, backgroundColor: _i }, ".cm-content": { caretColor: dl }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: dl }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Qe }, ".cm-panels": { backgroundColor: Ii, color: ke }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: Ii, outline: `1px solid ${hl}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Qe }, ".cm-activeLine": { backgroundColor: $m }, ".cm-selectionMatch": { backgroundColor: Qe }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Bm, outline: "none" }, ".cm-gutters": { backgroundColor: _i, color: ke, border: "none" }, ".cm-activeLineGutter": { backgroundColor: _i }, ".cm-lineNumbers .cm-gutterElement": { color: Nm }, ".cm-lineNumbers .cm-activeLineGutter": { color: Mm }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ke }, ".cm-tooltip": { border: `1px solid ${hl}`, backgroundColor: Ii, color: ke }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ke, borderBottomColor: ke }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Qe, color: ke } } }, { dark: Om }), ee(te.define([{ tag: s.keyword, color: pl }, { tag: [s.name, s.deleted, s.character, s.macroName], color: Li }, { tag: [s.propertyName], color: ul }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Em }, { tag: [s.function(s.variableName), s.labelName], color: ul }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: zm }, { tag: [s.definition(s.name), s.separator], color: Li }, { tag: [s.className], color: Am }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Hm }, { tag: [s.typeName], color: ml, fontStyle: ml }, { tag: [s.operator, s.operatorKeyword], color: pl }, { tag: [s.url, s.escape, s.regexp, s.link], color: Um }, { tag: [s.meta, s.comment], color: Pm }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: jm }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: Li }, { tag: s.invalid, color: Rm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Ym = { disabled: !1, indentWithTab: !0, tabSize: 4, autofocus: !1, placeholder: "input...", backgroundColor: "white", language: "markdown", theme: "oneDark", phrases: "en-us" }, jl = { emits: ["update:config"], components: { CodemirrorEditor: Uh }, data: () => ({ codemrrConfig: { ...Ym }, codemrrThemes: { oneDark: Xh, materialLight: cp, materialDark: Vp, solarizedLight: Pp, solarizedDark: tu, dracula: gu, githubLight: Du, githubDark: Ru, aura: im, tokyoNight: vm, tokyoNightStorm: Fm, tokyoNightDay: Wm }, codemrrLanguages: { javascript: Xi(), js: Xi(), html: Mn(), markdown: En(), json: Bn(), vue: zn(), java: Hn(), php: An(), python: Pn(), go: Rn(), mysql: qi(), sql: qi(), xml: jn(), css: Un() }, codemrrPhrases: { "Control character": "Steuerzeichen", "Selection deleted": "Auswahl gelöscht", "Folded lines": "Eingeklappte Zeilen", "Unfolded lines": "Ausgeklappte Zeilen", to: "bis", "folded code": "eingeklappter Code", unfold: "ausklappen", "Fold line": "Zeile einklappen", "Unfold line": "Zeile ausklappen", "Go to line": "Springe zu Zeile", go: "OK", Find: "Suchen", Replace: "Ersetzen", next: "nächste", previous: "vorherige", all: "alle", "match case": "groß/klein beachten", "by word": "ganze Wörter", replace: "ersetzen", "replace all": "alle ersetzen", close: "schließen", "current match": "aktueller Treffer", "replaced $ matches": "$ Treffer ersetzt", "replaced match on line $": "Treffer on Zeile $ ersetzt", "on line": "auf Zeile", Completions: "Vervollständigungen", Diagnostics: "Diagnosen", "No diagnostics": "Keine Diagnosen" }, editorViewInst: null, editorStateInst: null }), computed: { optionTheme() {
|
|
3125
|
+
}), () => Mi("div", { class: "cv-editor-codemirror", ref: o });
|
|
3126
|
+
} }), ra = "#e06c75", Do = "#abb2bf", Ti = "#7d8799", ca = "#d19a66", da = "#2c313a", ha = "#282c34", qo = "#353a42", pa = "#528bff", Uh = X.theme({ "&": { color: Do, backgroundColor: ha }, ".cm-content": { caretColor: pa }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: pa }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: "#3E4451" }, ".cm-panels": { backgroundColor: "#21252b", color: Do }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: "#72a1ff59", outline: "1px solid #457dff" }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: "#6199ff2f" }, ".cm-activeLine": { backgroundColor: "#6699ff0b" }, ".cm-selectionMatch": { backgroundColor: "#aafe661a" }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bad0f847" }, ".cm-gutters": { backgroundColor: ha, color: Ti, border: "none" }, ".cm-activeLineGutter": { backgroundColor: da }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: "#ddd" }, ".cm-tooltip": { border: "none", backgroundColor: qo }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: qo, borderBottomColor: qo }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { backgroundColor: da, color: Do } } }, { dark: !0 }), Wh = J.define([{ tag: s.keyword, color: "#c678dd" }, { tag: [s.name, s.deleted, s.character, s.propertyName, s.macroName], color: ra }, { tag: [s.function(s.variableName), s.labelName], color: "#61afef" }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: ca }, { tag: [s.definition(s.name), s.separator], color: Do }, { tag: [s.typeName, s.className, s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: "#e5c07b" }, { tag: [s.operator, s.operatorKeyword, s.url, s.escape, s.regexp, s.link, s.special(s.string)], color: "#56b6c2" }, { tag: [s.meta, s.comment], color: Ti }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.strikethrough, textDecoration: "line-through" }, { tag: s.link, color: Ti, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: ra }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ca }, { tag: [s.processingInstruction, s.string, s.inserted], color: "#98c379" }, { tag: s.invalid, color: "#ffffff" }]), Yh = [Uh, Q(Wh)], Xh = !1, Ko = "#FAFAFA", he = "#90A4AE", Pe = "#80CBC440", ua = "#272727", Go = "#FAFAFA", ma = "#00000010", qh = "#c2c2c222", Kh = "#CFD8DC", Gh = "#7E939E", Zh = "#FAFAFA", ga = "#7C4DFF", Zo = "#90A4AE", fa = "#6182B8", Qh = "#91B859", Jh = "#F76D47", va = "#8796B0", ep = "#FFB62C", tp = "#F76D47", op = "#90A4AE", ip = "#91B859", ap = "#E53935", lp = "#39ADB5", np = X.theme({ "&": { color: he, backgroundColor: Ko }, ".cm-content": { caretColor: ua }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: ua }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Pe }, ".cm-panels": { backgroundColor: Go, color: he }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: Go, outline: `1px solid ${ma}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Pe }, ".cm-activeLine": { backgroundColor: qh }, ".cm-selectionMatch": { backgroundColor: Pe }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Zh, outline: "none" }, ".cm-gutters": { backgroundColor: Ko, color: he, border: "none" }, ".cm-activeLineGutter": { backgroundColor: Ko }, ".cm-lineNumbers .cm-gutterElement": { color: Kh }, ".cm-lineNumbers .cm-activeLineGutter": { color: Gh }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: he }, ".cm-tooltip": { border: `1px solid ${ma}`, backgroundColor: Go, color: he }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: he, borderBottomColor: he }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Pe, color: he } } }, { dark: Xh }), sp = J.define([{ tag: s.keyword, color: ga }, { tag: [s.name, s.deleted, s.character, s.macroName], color: Zo }, { tag: [s.propertyName], color: fa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Qh }, { tag: [s.function(s.variableName), s.labelName], color: fa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Jh }, { tag: [s.definition(s.name), s.separator], color: Zo }, { tag: [s.className], color: ep }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: tp }, { tag: [s.typeName], color: va, fontStyle: va }, { tag: [s.operator, s.operatorKeyword], color: ga }, { tag: [s.url, s.escape, s.regexp, s.link], color: lp }, { tag: [s.meta, s.comment], color: op }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: ip }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: Zo }, { tag: s.invalid, color: ap }, { tag: s.strikethrough, textDecoration: "line-through" }]), rp = [np, Q(sp)], cp = !0, Qo = "#263238", pe = "#EEFFFF", je = "#80CBC420", ya = "#FFCC00", Jo = "#263238", ba = "#FFFFFF10", dp = "#4c616c22", hp = "#37474F", pp = "#607a86", up = "#263238", Ca = "#C792EA", ei = "#EEFFFF", wa = "#82AAFF", mp = "#C3E88D", gp = "#F78C6C", ka = "#B2CCD6", fp = "#FFCB6B", vp = "#F78C6C", yp = "#546E7A", bp = "#C3E88D", Cp = "#FF5370", wp = "#89DDFF", kp = X.theme({ "&": { color: pe, backgroundColor: Qo }, ".cm-content": { caretColor: ya }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: ya }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: je }, ".cm-panels": { backgroundColor: Jo, color: pe }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: Jo, outline: `1px solid ${ba}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: je }, ".cm-activeLine": { backgroundColor: dp }, ".cm-selectionMatch": { backgroundColor: je }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: up, outline: "none" }, ".cm-gutters": { backgroundColor: Qo, color: pe, border: "none" }, ".cm-activeLineGutter": { backgroundColor: Qo }, ".cm-lineNumbers .cm-gutterElement": { color: hp }, ".cm-lineNumbers .cm-activeLineGutter": { color: pp }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: pe }, ".cm-tooltip": { border: `1px solid ${ba}`, backgroundColor: Jo, color: pe }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: pe, borderBottomColor: pe }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: je, color: pe } } }, { dark: cp }), xp = J.define([{ tag: s.keyword, color: Ca }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ei }, { tag: [s.propertyName], color: wa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: mp }, { tag: [s.function(s.variableName), s.labelName], color: wa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: gp }, { tag: [s.definition(s.name), s.separator], color: ei }, { tag: [s.className], color: fp }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: vp }, { tag: [s.typeName], color: ka, fontStyle: ka }, { tag: [s.operator, s.operatorKeyword], color: Ca }, { tag: [s.url, s.escape, s.regexp, s.link], color: wp }, { tag: [s.meta, s.comment], color: yp }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: bp }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ei }, { tag: s.invalid, color: Cp }, { tag: s.strikethrough, textDecoration: "line-through" }]), Sp = [kp, Q(xp)], Vp = !1, ti = "#FDF6E3", ue = "#586E75", Re = "#EEE8D5", xa = "#657B83", oi = "#FDF6E3", Sa = "#D3AF86", _p = "#d5bd5c22", Ip = "#586E75", Lp = "#567983", Dp = "#EEE8D5", Va = "#859900", ii = "#268BD2", _a = "#268BD2", Tp = "#2AA198", Fp = "#CB4B16", Ia = "#CB4B16", Op = "#CB4B16", $p = "#D33682", Np = "#93A1A1", Mp = "#268BD2", Bp = "#DC322F", Ep = "#DC322F", zp = X.theme({ "&": { color: ue, backgroundColor: ti }, ".cm-content": { caretColor: xa }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: xa }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Re }, ".cm-panels": { backgroundColor: oi, color: ue }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: oi, outline: `1px solid ${Sa}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Re }, ".cm-activeLine": { backgroundColor: _p }, ".cm-selectionMatch": { backgroundColor: Re }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Dp, outline: "none" }, ".cm-gutters": { backgroundColor: ti, color: ue, border: "none" }, ".cm-activeLineGutter": { backgroundColor: ti }, ".cm-lineNumbers .cm-gutterElement": { color: Ip }, ".cm-lineNumbers .cm-activeLineGutter": { color: Lp }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ue }, ".cm-tooltip": { border: `1px solid ${Sa}`, backgroundColor: oi, color: ue }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ue, borderBottomColor: ue }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Re, color: ue } } }, { dark: Vp }), Ap = J.define([{ tag: s.keyword, color: Va }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ii }, { tag: [s.propertyName], color: _a }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Tp }, { tag: [s.function(s.variableName), s.labelName], color: _a }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Fp }, { tag: [s.definition(s.name), s.separator], color: ii }, { tag: [s.className], color: Op }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: $p }, { tag: [s.typeName], color: Ia, fontStyle: Ia }, { tag: [s.operator, s.operatorKeyword], color: Va }, { tag: [s.url, s.escape, s.regexp, s.link], color: Ep }, { tag: [s.meta, s.comment], color: Np }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Mp }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ii }, { tag: s.invalid, color: Bp }, { tag: s.strikethrough, textDecoration: "line-through" }]), Hp = [zp, Q(Ap)], Pp = !0, ai = "#002B36", me = "#93A1A1", Ue = "#274642", La = "#D30102", li = "#002B36", Da = "#2AA19899", jp = "#005b7022", Rp = "#93A1A1", Up = "#949494", Wp = "#073642", Ta = "#859900", ni = "#268BD2", Fa = "#268BD2", Yp = "#2AA198", Xp = "#CB4B16", Oa = "#CB4B16", qp = "#CB4B16", Kp = "#D33682", Gp = "#586E75", Zp = "#268BD2", Qp = "#DC322F", Jp = "#DC322F", eu = [X.theme({ "&": { color: me, backgroundColor: ai }, ".cm-content": { caretColor: La }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: La }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ue }, ".cm-panels": { backgroundColor: li, color: me }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: li, outline: `1px solid ${Da}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ue }, ".cm-activeLine": { backgroundColor: jp }, ".cm-selectionMatch": { backgroundColor: Ue }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Wp, outline: "none" }, ".cm-gutters": { backgroundColor: ai, color: me, border: "none" }, ".cm-activeLineGutter": { backgroundColor: ai }, ".cm-lineNumbers .cm-gutterElement": { color: Rp }, ".cm-lineNumbers .cm-activeLineGutter": { color: Up }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: me }, ".cm-tooltip": { border: `1px solid ${Da}`, backgroundColor: li, color: me }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: me, borderBottomColor: me }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ue, color: me } } }, { dark: Pp }), Q(J.define([{ tag: s.keyword, color: Ta }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ni }, { tag: [s.propertyName], color: Fa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Yp }, { tag: [s.function(s.variableName), s.labelName], color: Fa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Xp }, { tag: [s.definition(s.name), s.separator], color: ni }, { tag: [s.className], color: qp }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Kp }, { tag: [s.typeName], color: Oa, fontStyle: Oa }, { tag: [s.operator, s.operatorKeyword], color: Ta }, { tag: [s.url, s.escape, s.regexp, s.link], color: Jp }, { tag: [s.meta, s.comment], color: Gp }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Zp }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ni }, { tag: s.invalid, color: Qp }, { tag: s.strikethrough, textDecoration: "line-through" }]))], tu = !0, si = "#282A36", ge = "#F8F8F2", We = "#44475A", $a = "#F8F8F2", ri = "#282A36", Na = "#191A21", ou = "#53576c22", iu = "#6272A4", au = "#F8F8F2", lu = "#44475A", Ma = "#FF79C6", ci = "#F8F8F2", Ba = "#50FA7B", nu = "#F1FA8C", su = "#BD93F9", Ea = "#8BE9FD", ru = "#8BE9FD", cu = "#BD93F9", du = "#6272A4", hu = "#BD93F9", pu = "#FF5555", uu = "#F1FA8C", mu = [X.theme({ "&": { color: ge, backgroundColor: si }, ".cm-content": { caretColor: $a }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: $a }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: We }, ".cm-panels": { backgroundColor: ri, color: ge }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: ri, outline: `1px solid ${Na}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: We }, ".cm-activeLine": { backgroundColor: ou }, ".cm-selectionMatch": { backgroundColor: We }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: lu, outline: "none" }, ".cm-gutters": { backgroundColor: si, color: ge, border: "none" }, ".cm-activeLineGutter": { backgroundColor: si }, ".cm-lineNumbers .cm-gutterElement": { color: iu }, ".cm-lineNumbers .cm-activeLineGutter": { color: au }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ge }, ".cm-tooltip": { border: `1px solid ${Na}`, backgroundColor: ri, color: ge }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ge, borderBottomColor: ge }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: We, color: ge } } }, { dark: tu }), Q(J.define([{ tag: s.keyword, color: Ma }, { tag: [s.name, s.deleted, s.character, s.macroName], color: ci }, { tag: [s.propertyName], color: Ba }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: nu }, { tag: [s.function(s.variableName), s.labelName], color: Ba }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: su }, { tag: [s.definition(s.name), s.separator], color: ci }, { tag: [s.className], color: ru }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: cu }, { tag: [s.typeName], color: Ea, fontStyle: Ea }, { tag: [s.operator, s.operatorKeyword], color: Ma }, { tag: [s.url, s.escape, s.regexp, s.link], color: uu }, { tag: [s.meta, s.comment], color: du }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: hu }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: ci }, { tag: s.invalid, color: pu }, { tag: s.strikethrough, textDecoration: "line-through" }]))], gu = !1, di = "#fff", fe = "#444d56", Ye = "#0366d625", za = "#044289", hi = "#fff", Aa = "#e1e4e8", fu = "#c6c6c622", vu = "#1b1f234d", yu = "#24292e", bu = "#34d05840", Ha = "#d73a49", pi = "#e36209", Pa = "#005cc5", Cu = "#032f62", wu = "#005cc5", ja = "#005cc5", ku = "#6f42c1", xu = "#005cc5", Su = "#6a737d", Vu = "#005cc5", _u = "#cb2431", Iu = "#032f62", Lu = [X.theme({ "&": { color: fe, backgroundColor: di }, ".cm-content": { caretColor: za }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: za }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ye }, ".cm-panels": { backgroundColor: hi, color: fe }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: hi, outline: `1px solid ${Aa}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ye }, ".cm-activeLine": { backgroundColor: fu }, ".cm-selectionMatch": { backgroundColor: Ye }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: bu, outline: "none" }, ".cm-gutters": { backgroundColor: di, color: fe, border: "none" }, ".cm-activeLineGutter": { backgroundColor: di }, ".cm-lineNumbers .cm-gutterElement": { color: vu }, ".cm-lineNumbers .cm-activeLineGutter": { color: yu }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: fe }, ".cm-tooltip": { border: `1px solid ${Aa}`, backgroundColor: hi, color: fe }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: fe, borderBottomColor: fe }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ye, color: fe } } }, { dark: gu }), Q(J.define([{ tag: s.keyword, color: Ha }, { tag: [s.name, s.deleted, s.character, s.macroName], color: pi }, { tag: [s.propertyName], color: Pa }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Cu }, { tag: [s.function(s.variableName), s.labelName], color: Pa }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: wu }, { tag: [s.definition(s.name), s.separator], color: pi }, { tag: [s.className], color: ku }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: xu }, { tag: [s.typeName], color: ja, fontStyle: ja }, { tag: [s.operator, s.operatorKeyword], color: Ha }, { tag: [s.url, s.escape, s.regexp, s.link], color: Iu }, { tag: [s.meta, s.comment], color: Su }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Vu }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: pi }, { tag: s.invalid, color: _u }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Du = !0, ui = "#24292e", ve = "#d1d5da", Xe = "#3392FF44", Ra = "#c8e1ff", mi = "#24292e", Ua = "#1b1f23", Tu = "#4d566022", Fu = "#444d56", Ou = "#e1e4e8", $u = "#17E5E650", Wa = "#f97583", gi = "#ffab70", Ya = "#79b8ff", Nu = "#9ecbff", Mu = "#79b8ff", Xa = "#79b8ff", Bu = "#b392f0", Eu = "#79b8ff", zu = "#6a737d", Au = "#79b8ff", Hu = "#f97583", Pu = "#9ecbff", ju = [X.theme({ "&": { color: ve, backgroundColor: ui }, ".cm-content": { caretColor: Ra }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Ra }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Xe }, ".cm-panels": { backgroundColor: mi, color: ve }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: mi, outline: `1px solid ${Ua}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Xe }, ".cm-activeLine": { backgroundColor: Tu }, ".cm-selectionMatch": { backgroundColor: Xe }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: $u, outline: "none" }, ".cm-gutters": { backgroundColor: ui, color: ve, border: "none" }, ".cm-activeLineGutter": { backgroundColor: ui }, ".cm-lineNumbers .cm-gutterElement": { color: Fu }, ".cm-lineNumbers .cm-activeLineGutter": { color: Ou }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ve }, ".cm-tooltip": { border: `1px solid ${Ua}`, backgroundColor: mi, color: ve }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ve, borderBottomColor: ve }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Xe, color: ve } } }, { dark: Du }), Q(J.define([{ tag: s.keyword, color: Wa }, { tag: [s.name, s.deleted, s.character, s.macroName], color: gi }, { tag: [s.propertyName], color: Ya }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Nu }, { tag: [s.function(s.variableName), s.labelName], color: Ya }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Mu }, { tag: [s.definition(s.name), s.separator], color: gi }, { tag: [s.className], color: Bu }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Eu }, { tag: [s.typeName], color: Xa, fontStyle: Xa }, { tag: [s.operator, s.operatorKeyword], color: Wa }, { tag: [s.url, s.escape, s.regexp, s.link], color: Pu }, { tag: [s.meta, s.comment], color: zu }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Au }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: gi }, { tag: s.invalid, color: Hu }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Ru = !0, fi = "#21202e", ye = "#edecee", qe = "#3d375e7f", qa = "#a277ff", vi = "#21202e", Ka = "#3b334b", Uu = "#4d4b6622", Wu = "#a394f033", Yu = "#cdccce", Xu = "#a394f033", Ga = "#a277ff", yi = "#edecee", Za = "#ffca85", qu = "#61ffca", Ku = "#61ffca", Qa = "#82e2ff", Gu = "#82e2ff", Zu = "#61ffca", Qu = "#6d6d6d", Ju = "#a277ff", em = "#ff6767", tm = "#61ffca", om = [X.theme({ "&": { color: ye, backgroundColor: fi }, ".cm-content": { caretColor: qa }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: qa }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: qe }, ".cm-panels": { backgroundColor: vi, color: ye }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: vi, outline: `1px solid ${Ka}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: qe }, ".cm-activeLine": { backgroundColor: Uu }, ".cm-selectionMatch": { backgroundColor: qe }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Xu, outline: "none" }, ".cm-gutters": { backgroundColor: fi, color: ye, border: "none" }, ".cm-activeLineGutter": { backgroundColor: fi }, ".cm-lineNumbers .cm-gutterElement": { color: Wu }, ".cm-lineNumbers .cm-activeLineGutter": { color: Yu }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: ye }, ".cm-tooltip": { border: `1px solid ${Ka}`, backgroundColor: vi, color: ye }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: ye, borderBottomColor: ye }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: qe, color: ye } } }, { dark: Ru }), Q(J.define([{ tag: s.keyword, color: Ga }, { tag: [s.name, s.deleted, s.character, s.macroName], color: yi }, { tag: [s.propertyName], color: Za }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: qu }, { tag: [s.function(s.variableName), s.labelName], color: Za }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Ku }, { tag: [s.definition(s.name), s.separator], color: yi }, { tag: [s.className], color: Gu }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Zu }, { tag: [s.typeName], color: Qa, fontStyle: Qa }, { tag: [s.operator, s.operatorKeyword], color: Ga }, { tag: [s.url, s.escape, s.regexp, s.link], color: tm }, { tag: [s.meta, s.comment], color: Qu }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Ju }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: yi }, { tag: s.invalid, color: em }, { tag: s.strikethrough, textDecoration: "line-through" }]))], im = !0, bi = "#1a1b26", be = "#787c99", Ke = "#515c7e40", Ja = "#c0caf5", Ci = "#1a1b26", el = "#787c99", am = "#43455c22", lm = "#363b54", nm = "#737aa2", sm = "#16161e", tl = "#bb9af7", wi = "#c0caf5", ol = "#7aa2f7", rm = "#9ece6a", cm = "#bb9af7", il = "#0db9d7", dm = "#c0caf5", hm = "#ff9e64", pm = "#444b6a", um = "#89ddff", mm = "#ff5370", gm = "#b4f9f8", fm = [X.theme({ "&": { color: be, backgroundColor: bi }, ".cm-content": { caretColor: Ja }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: Ja }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ke }, ".cm-panels": { backgroundColor: Ci, color: be }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: Ci, outline: `1px solid ${el}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ke }, ".cm-activeLine": { backgroundColor: am }, ".cm-selectionMatch": { backgroundColor: Ke }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: sm, outline: "none" }, ".cm-gutters": { backgroundColor: bi, color: be, border: "none" }, ".cm-activeLineGutter": { backgroundColor: bi }, ".cm-lineNumbers .cm-gutterElement": { color: lm }, ".cm-lineNumbers .cm-activeLineGutter": { color: nm }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: be }, ".cm-tooltip": { border: `1px solid ${el}`, backgroundColor: Ci, color: be }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: be, borderBottomColor: be }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ke, color: be } } }, { dark: im }), Q(J.define([{ tag: s.keyword, color: tl }, { tag: [s.name, s.deleted, s.character, s.macroName], color: wi }, { tag: [s.propertyName], color: ol }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: rm }, { tag: [s.function(s.variableName), s.labelName], color: ol }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: cm }, { tag: [s.definition(s.name), s.separator], color: wi }, { tag: [s.className], color: dm }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: hm }, { tag: [s.typeName], color: il, fontStyle: il }, { tag: [s.operator, s.operatorKeyword], color: tl }, { tag: [s.url, s.escape, s.regexp, s.link], color: gm }, { tag: [s.meta, s.comment], color: pm }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: um }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: wi }, { tag: s.invalid, color: mm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], vm = !0, ki = "#24283b", Ce = "#7982a9", Ge = "#6f7bb630", al = "#c0caf5", xi = "#24283b", ll = "#7982a9", ym = "#4d547722", bm = "#3b4261", Cm = "#737aa2", wm = "#1f2335", nl = "#bb9af7", Si = "#c0caf5", sl = "#7aa2f7", km = "#9ece6a", xm = "#bb9af7", rl = "#2ac3de", Sm = "#c0caf5", Vm = "#ff9e64", _m = "#565f89", Im = "#89ddff", Lm = "#ff5370", Dm = "#b4f9f8", Tm = [X.theme({ "&": { color: Ce, backgroundColor: ki }, ".cm-content": { caretColor: al }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: al }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ge }, ".cm-panels": { backgroundColor: xi, color: Ce }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: xi, outline: `1px solid ${ll}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ge }, ".cm-activeLine": { backgroundColor: ym }, ".cm-selectionMatch": { backgroundColor: Ge }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: wm, outline: "none" }, ".cm-gutters": { backgroundColor: ki, color: Ce, border: "none" }, ".cm-activeLineGutter": { backgroundColor: ki }, ".cm-lineNumbers .cm-gutterElement": { color: bm }, ".cm-lineNumbers .cm-activeLineGutter": { color: Cm }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: Ce }, ".cm-tooltip": { border: `1px solid ${ll}`, backgroundColor: xi, color: Ce }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: Ce, borderBottomColor: Ce }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ge, color: Ce } } }, { dark: vm }), Q(J.define([{ tag: s.keyword, color: nl }, { tag: [s.name, s.deleted, s.character, s.macroName], color: Si }, { tag: [s.propertyName], color: sl }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: km }, { tag: [s.function(s.variableName), s.labelName], color: sl }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: xm }, { tag: [s.definition(s.name), s.separator], color: Si }, { tag: [s.className], color: Sm }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Vm }, { tag: [s.typeName], color: rl, fontStyle: rl }, { tag: [s.operator, s.operatorKeyword], color: nl }, { tag: [s.url, s.escape, s.regexp, s.link], color: Dm }, { tag: [s.meta, s.comment], color: _m }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Im }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: Si }, { tag: s.invalid, color: Lm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Fm = !1, Vi = "#e1e2e7", we = "#6a6f8e", Ze = "#8591b840", cl = "#3760bf", _i = "#e1e2e7", dl = "#6a6f8e", Om = "#a7aaba22", $m = "#b3b6cd", Nm = "#68709a", Mm = "#e9e9ec", hl = "#9854f1", Ii = "#3760bf", pl = "#2e7de9", Bm = "#587539", Em = "#9854f1", ul = "#07879d", zm = "#3760bf", Am = "#b15c00", Hm = "#9da3c2", Pm = "#006a83", jm = "#ff3e64", Rm = "#2e5857", Um = [X.theme({ "&": { color: we, backgroundColor: Vi }, ".cm-content": { caretColor: cl }, ".cm-cursor, .cm-dropCursor": { borderLeftColor: cl }, "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Ze }, ".cm-panels": { backgroundColor: _i, color: we }, ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" }, ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" }, ".cm-searchMatch": { backgroundColor: _i, outline: `1px solid ${dl}` }, ".cm-searchMatch.cm-searchMatch-selected": { backgroundColor: Ze }, ".cm-activeLine": { backgroundColor: Om }, ".cm-selectionMatch": { backgroundColor: Ze }, "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": { backgroundColor: Mm, outline: "none" }, ".cm-gutters": { backgroundColor: Vi, color: we, border: "none" }, ".cm-activeLineGutter": { backgroundColor: Vi }, ".cm-lineNumbers .cm-gutterElement": { color: $m }, ".cm-lineNumbers .cm-activeLineGutter": { color: Nm }, ".cm-foldPlaceholder": { backgroundColor: "transparent", border: "none", color: we }, ".cm-tooltip": { border: `1px solid ${dl}`, backgroundColor: _i, color: we }, ".cm-tooltip .cm-tooltip-arrow:before": { borderTopColor: "transparent", borderBottomColor: "transparent" }, ".cm-tooltip .cm-tooltip-arrow:after": { borderTopColor: we, borderBottomColor: we }, ".cm-tooltip-autocomplete": { "& > ul > li[aria-selected]": { background: Ze, color: we } } }, { dark: Fm }), Q(J.define([{ tag: s.keyword, color: hl }, { tag: [s.name, s.deleted, s.character, s.macroName], color: Ii }, { tag: [s.propertyName], color: pl }, { tag: [s.processingInstruction, s.string, s.inserted, s.special(s.string)], color: Bm }, { tag: [s.function(s.variableName), s.labelName], color: pl }, { tag: [s.color, s.constant(s.name), s.standard(s.name)], color: Em }, { tag: [s.definition(s.name), s.separator], color: Ii }, { tag: [s.className], color: zm }, { tag: [s.number, s.changed, s.annotation, s.modifier, s.self, s.namespace], color: Am }, { tag: [s.typeName], color: ul, fontStyle: ul }, { tag: [s.operator, s.operatorKeyword], color: hl }, { tag: [s.url, s.escape, s.regexp, s.link], color: Rm }, { tag: [s.meta, s.comment], color: Hm }, { tag: s.strong, fontWeight: "bold" }, { tag: s.emphasis, fontStyle: "italic" }, { tag: s.link, textDecoration: "underline" }, { tag: s.heading, fontWeight: "bold", color: Pm }, { tag: [s.atom, s.bool, s.special(s.variableName)], color: Ii }, { tag: s.invalid, color: jm }, { tag: s.strikethrough, textDecoration: "line-through" }]))], Wm = { disabled: !1, indentWithTab: !0, tabSize: 4, autofocus: !1, placeholder: "input...", backgroundColor: "white", language: "markdown", theme: "oneDark", phrases: "en-us" }, Pl = { emits: ["update:config"], components: { CodemirrorEditor: Rh }, data: () => ({ codemrrConfig: { ...Wm }, codemrrThemes: { oneDark: Yh, materialLight: rp, materialDark: Sp, solarizedLight: Hp, solarizedDark: eu, dracula: mu, githubLight: Lu, githubDark: ju, aura: om, tokyoNight: fm, tokyoNightStorm: Tm, tokyoNightDay: Um }, codemrrLanguages: { javascript: Yi(), js: Yi(), html: Nn(), markdown: Bn(), json: Mn(), vue: En(), java: An(), php: zn(), python: Hn(), go: jn(), mysql: Xi(), sql: Xi(), xml: Pn(), css: Rn() }, codemrrPhrases: { "Control character": "Steuerzeichen", "Selection deleted": "Auswahl gelöscht", "Folded lines": "Eingeklappte Zeilen", "Unfolded lines": "Ausgeklappte Zeilen", to: "bis", "folded code": "eingeklappter Code", unfold: "ausklappen", "Fold line": "Zeile einklappen", "Unfold line": "Zeile ausklappen", "Go to line": "Springe zu Zeile", go: "OK", Find: "Suchen", Replace: "Ersetzen", next: "nächste", previous: "vorherige", all: "alle", "match case": "groß/klein beachten", "by word": "ganze Wörter", replace: "ersetzen", "replace all": "alle ersetzen", close: "schließen", "current match": "aktueller Treffer", "replaced $ matches": "$ Treffer ersetzt", "replaced match on line $": "Treffer on Zeile $ ersetzt", "on line": "auf Zeile", Completions: "Vervollständigungen", Diagnostics: "Diagnosen", "No diagnostics": "Keine Diagnosen" }, editorViewInst: null, editorStateInst: null }), computed: { optionTheme() {
|
|
3132
3127
|
let e = Object.keys(this.codemrrThemes);
|
|
3133
3128
|
return ["default"].concat(e);
|
|
3134
3129
|
}, optionPhrases: () => ["en-us", "de-de"], optionLanguage() {
|
|
@@ -3140,35 +3135,35 @@ const Rh = Object.freeze({ autofocus: !1, disabled: !1, indentWithTab: !0, tabSi
|
|
|
3140
3135
|
return { theme: this.codemrrConfig.theme, language: this.codemrrConfig.language, autofocus: this.codemrrConfig.autofocus, placeholder: this.codemrrConfig.placeholder, indentWithTab: this.codemrrConfig.indentWithTab, tabSize: this.codemrrConfig.tabSize, disabled: this.codemrrConfig.disabled, phrases: this.codemrrConfig.phrases === "en-us" ? {} : this.codemrrPhrases };
|
|
3141
3136
|
} }, watch: { codemrrConfig(e) {
|
|
3142
3137
|
this.$emit("update:config", e);
|
|
3143
|
-
} } },
|
|
3138
|
+
} } }, Me = { props: { editorID: { type: [String], required: !1, default: () => "" } }, data: () => ({ editorRefEL: null }), computed: { editorRefID() {
|
|
3144
3139
|
return this.editorID ? this.editorID : this.$options.name + +/* @__PURE__ */ new Date() + ((1e3 * Math.random()).toFixed(0) + "");
|
|
3145
3140
|
} } };
|
|
3146
|
-
function
|
|
3141
|
+
function jl(e, t) {
|
|
3147
3142
|
var o = document.createElement("a");
|
|
3148
3143
|
if (o.setAttribute("href", "data:text/plain;charset=UTF-8," + encodeURIComponent(e)), o.setAttribute("download", t), o.style.display = "none", document.createEvent) {
|
|
3149
3144
|
const l = document.createEvent("MouseEvents");
|
|
3150
3145
|
l.initEvent("click", !0, !0), o.dispatchEvent(l);
|
|
3151
3146
|
} else o.click();
|
|
3152
3147
|
}
|
|
3153
|
-
function
|
|
3148
|
+
function Qe(e) {
|
|
3154
3149
|
return e < 10 ? "0" + e : e;
|
|
3155
3150
|
}
|
|
3156
|
-
const
|
|
3157
|
-
return
|
|
3151
|
+
const Ym = { undo: !1, redo: !1, strong: !0, italic: !0, overline: !0, h1: !0, h2: !0, h3: !0, h4: !0, h5: !0, h6: !0, hr: !0, quote: !0, ul: !0, ol: !0, notChecked: !0, checked: !0, link: !0, table: !0, image: !0, uploadImage: !0, custom_image: !0, custom_uploadImage: !0, custom_uploadFile: !0, importmd: !0, exportmd: !0, code: !0, html_to_markdown: !0, split: !0, preview: !0, scrollSync: !0, save: !0, clear: !0, copy: !0, toc: !0, fullscreen: !0, theme: !0, backgroundColor: !1, language: !1, phrases: !1, disabled: !1, autofocus: !1, indentWithTab: !1 }, Xm = { t: "1713021153946", class: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "1924", width: "20", height: "20" }, qm = { t: "1599285632421", class: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "45640", width: "17", height: "17" }, Km = { t: "1611551476626", class: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "4615", width: "22", height: "22" }, Gm = { t: "1713097613984", class: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "6856", width: "18", height: "18" }, Zm = { t: "1713109019954", class: "icon", viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "p-id": "13071", width: "18", height: "18" }, Hi = { components: { SvgImgMap: V({ name: "SvgImgMap" }, [["render", function(e, t, o, l, i, a) {
|
|
3152
|
+
return r(), u("svg", Xm, t[0] || (t[0] = [d("path", { d: "M659.456 786.432l-114.688-188.416c-4.10112-8.192-8.19712-12.28288-16.384-12.28288-4.096 0-8.19712 4.096-12.288 4.096l-57.344 57.344-61.44-90.11712c-4.096-8.192-8.192-12.28288-16.384-12.28288s-12.288 4.096-16.384 8.192l-151.552 225.28c0 4.096-4.096 8.192-4.096 12.288 0 12.28288 8.192 20.48 20.48 20.48h413.696c12.288 0 20.48-8.19712 20.48-20.48l-4.096-4.10112zM286.72 512c40.96 0 73.728-32.768 73.728-73.728S327.68 364.544 286.72 364.544s-73.728 32.768-73.728 73.728C208.896 479.232 245.76 512 286.72 512zM851.968 98.304H323.584c-40.96 0-73.728 32.768-73.728 73.728v20.48c0 12.288 8.192 20.48 20.48 20.48s16.384-12.288 16.384-20.48v-20.48c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.85888 16.384 36.85888 36.864v528.384c0 20.48-16.37888 36.864-36.85888 36.864h-20.48c-12.288 0-20.48 8.192-20.48 20.48s8.192 20.48 20.48 20.48h20.48c40.96 0 73.72288-32.768 73.72288-73.728v-532.48c0.00512-40.96-32.76288-73.728-73.72288-73.728z", "p-id": "1925" }, null, -1), d("path", { d: "M700.416 249.856H172.032c-40.96 0-73.728 32.768-73.728 73.728v528.384c0 40.96 32.768 73.72288 73.728 73.72288h528.384c40.96 0 73.728-32.76288 73.728-73.72288V323.584c0-40.96-32.768-73.728-73.728-73.728z m36.864 602.112c0 20.48-16.384 36.85888-36.864 36.85888H172.032c-20.48 0-36.864-16.37888-36.864-36.85888V323.584c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.864 16.384 36.864 36.864v528.384z", "p-id": "1926" }, null, -1)]));
|
|
3158
3153
|
}]]), SvgUploadFile: V({ name: "SvgUploadFile" }, [["render", function(e, t, o, l, i, a) {
|
|
3159
|
-
return
|
|
3154
|
+
return r(), u("svg", qm, t[0] || (t[0] = [d("path", { d: "M127.519 892.879v-763.34h655.448V514.69h63.612V81.831c0-8.783-7.12-15.903-15.903-15.903H79.81c-8.783 0-15.903 7.12-15.903 15.903v858.757c0 8.783 7.12 15.903 15.903 15.903h493.993v-63.612H127.519z", "p-id": "45641" }, null, -1), d("path", { d: "M231.608 228.388h447.269V292H231.608zM231.608 384.409h447.269v63.612H231.608zM231.608 540.43h245.141v63.612H231.608zM231.608 696.451h245.141v63.612H231.608zM923.269 762.938L745.315 584.984c-3.545-3.545-8.34-5.074-12.966-4.596a15.931 15.931 0 0 0-9.848 4.616L544.586 762.918c-6.248 6.248-6.248 16.379 0 22.627l22.353 22.353c6.248 6.248 16.379 6.248 22.627 0l112.555-112.555v245.148c0 8.837 7.163 16 16 16h31.612c8.837 0 16-7.163 16-16V695.363l112.555 112.555c6.248 6.248 16.379 6.248 22.627 0l22.353-22.353c6.249-6.248 6.249-16.378 0.001-22.627z", "p-id": "45642" }, null, -1)]));
|
|
3160
3155
|
}]]), SvgToc: V({ name: "SvgToc" }, [["render", function(e, t, o, l, i, a) {
|
|
3161
|
-
return
|
|
3156
|
+
return r(), u("svg", Km, t[0] || (t[0] = [d("path", { d: "M370.1 371.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7zM370.1 712.4h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.2-2.6 5.7-5.7 5.7z m333.5-7.5H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.1-2.7 5.7-5.8 5.7zM370.1 542.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7z", "p-id": "4616" }, null, -1), d("path", { d: "M847.1 560.4V250.1s0-24.7-14-46.4c-10.8-16.8-30-31.8-64.2-31.8h-261c-0.2 0-0.3 0-0.5 0.1H255s-78.1 0-78.1 78.1l0.1 213.4V774s0 24.7 13.9 46.3c10.8 16.8 30 31.8 64.2 31.8h261.1c0.2 0 0.3 0 0.5-0.1H769s78.1 0 78.1-78.1l-0.1-213.4 0.1-0.1z m-39 213.6c-1.3 38.5-38.9 39-38.9 39h-514c-1.3-0.1-2.5-0.2-3.8-0.3-5.4-1.1-15.7-4.1-23.9-11.7-9-9.7-11.2-22.3-11.7-26.1v-0.7l0.1-524.2c1.3-38.5 38.9-39 38.9-39h514c1.3 0.1 2.5 0.2 3.7 0.3 5.4 1.1 15.7 4.1 23.9 11.7 9 9.7 11.2 22.2 11.7 26 0 0.2 0 0.5 0.1 0.7l-0.1 524.3z", "p-id": "4617" }, null, -1)]));
|
|
3162
3157
|
}]]), SvgCopy: V({ name: "SvgCopy" }, [["render", function(e, t, o, l, i, a) {
|
|
3163
|
-
return
|
|
3158
|
+
return r(), u("svg", Gm, t[0] || (t[0] = [d("path", { d: "M857.373005 65.290005 469.604424 65.290005c-34.211173 0-62.044078 27.832905-62.044078 62.043055l0 10.340509-63.076594 0c-25.993001 0-48.228421 16.346293-57.001225 39.293935L166.626995 176.967504c-34.21015 0-62.043055 27.832905-62.043055 62.043055l0 657.655358c0 34.21015 27.832905 62.043055 62.043055 62.043055l550.115086 0c34.21015 0 62.043055-27.832905 62.043055-62.043055l0-49.634444 78.587869 0c34.21015 0 62.043055-27.832905 62.043055-62.043055L919.41606 127.33306C919.41606 93.122911 891.583155 65.290005 857.373005 65.290005zM344.483752 179.035606l194.402595 0c10.833743 0 19.646456 8.813736 19.646456 19.646456 0 10.833743-8.813736 19.646456-19.646456 19.646456L344.483752 218.328517c-10.833743 0-19.646456-8.813736-19.646456-19.646456C324.836273 187.849342 333.650009 179.035606 344.483752 179.035606zM737.423099 896.665917c0 11.402701-9.278317 20.681018-20.681018 20.681018L166.626995 917.346935c-11.403724 0-20.681018-9.278317-20.681018-20.681018L145.945977 239.010559c0-11.402701 9.277294-20.681018 20.681018-20.681018l120.111588 0c8.197706 24.02723 30.977525 41.362037 57.744145 41.362037l194.402595 0c26.767644 0 49.54644-17.334807 57.744145-41.362037l120.111588 0c11.402701 0 20.681018 9.278317 20.681018 20.681018L737.422076 896.665917zM878.054023 784.988418c0 11.402701-9.278317 20.681018-20.681018 20.681018l-78.587869 0L778.785136 239.010559c0-34.21015-27.832905-62.043055-62.043055-62.043055L595.886549 176.967504c-8.771781-22.947641-31.007201-39.293935-57.001225-39.293935l-89.963964 0L448.921359 127.33306c0-11.403724 9.278317-20.681018 20.683065-20.681018l387.768581 0c11.402701 0 20.681018 9.277294 20.681018 20.681018L878.054023 784.988418z", "p-id": "6857" }, null, -1), d("path", { d: "M620.597347 334.252737 260.748652 334.252737c-11.422144 0-20.681018 9.259898-20.681018 20.681018s9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018S632.018467 334.252737 620.597347 334.252737z", "p-id": "6858" }, null, -1), d("path", { d: "M620.597347 454.201619 260.748652 454.201619c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C641.278365 463.46254 632.018467 454.201619 620.597347 454.201619z", "p-id": "6859" }, null, -1), d("path", { d: "M440.673511 574.151525 260.748652 574.151525c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l179.924859 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C461.35453 583.411423 452.093609 574.151525 440.673511 574.151525z", "p-id": "6860" }, null, -1)]));
|
|
3164
3159
|
}]]), SvgLanguage: V({ name: "SvgLanguage" }, [["render", function(e, t, o, l, i, a) {
|
|
3165
|
-
return
|
|
3160
|
+
return r(), u("svg", Zm, t[0] || (t[0] = [d("path", { d: "M200.313605 806.764028h487.993851v78.708685h-487.993851z", fill: "#6C7280", "p-id": "13072" }, null, -1), d("path", { d: "M809.518832 136.166026H79.102229a78.708686 78.708686 0 0 0-78.708686 78.708686V944.504228a78.708686 78.708686 0 0 0 78.708686 78.708685h730.416603a78.708686 78.708686 0 0 0 78.708685-78.708685V214.874712a78.708686 78.708686 0 0 0-78.708685-78.708686z m0 848.479631V944.504228H79.102229V214.874712h730.416603V944.504228z", "p-id": "13073" }, null, -1), d("path", { d: "M944.897771 0H171.978478v78.708686H944.897771v787.086856h78.708686V78.708686a78.708686 78.708686 0 0 0-78.708686-78.708686z", "p-id": "13074" }, null, -1), d("path", { d: "M360.092237 609.205227h161.352805l44.863951 117.275941h58.244427l-157.417371-385.672559h-55.09608L263.280553 725.694081H315.228286z m57.45734-157.417372a487.206764 487.206764 0 0 0 20.464259-73.986164q8.657955 31.483474 27.548039 78.708686l40.14143 107.043812H375.046887z", "p-id": "13075" }, null, -1)]));
|
|
3166
3161
|
}]]) }, emits: ["on-action", "on-act-copy", "on-act-save", "on-act-theme", "on-act-custom", "on-act-choose-image"], props: { exportFileName: { type: String, default: "" }, toolbars: { type: Object, default: () => ({}) }, isPreview: { type: Boolean, default: !1 }, isFullscreen: { type: Boolean, default: !1 } }, data: () => ({ actionThemeDropdown: !1, actionPhrasesDropdown: !1, actionLanguageDropdown: !1, actionBgColorDropdown: !1, actionSplit: !0, actionPreview: !1, actionScrollSync: !0, actionToc: !0, actionFullscreen: !1, actionHtmlDiaVisible: !1, actionHtmlText: "" }), computed: { lastExpFileName() {
|
|
3167
|
-
let e = /* @__PURE__ */ new Date(), t = e.getFullYear(), o = e.getMonth() + 1, l = e.getDate(), i = e.getHours(), a = e.getMinutes(), n = t + "-" +
|
|
3162
|
+
let e = /* @__PURE__ */ new Date(), t = e.getFullYear(), o = e.getMonth() + 1, l = e.getDate(), i = e.getHours(), a = e.getMinutes(), n = t + "-" + Qe(o) + "-" + Qe(l) + "_" + Qe(i) + "-" + Qe(a);
|
|
3168
3163
|
return this.exportFileName || n;
|
|
3169
3164
|
}, toolConfig() {
|
|
3170
3165
|
const { toolbars: e = {} } = this;
|
|
3171
|
-
return { ...
|
|
3166
|
+
return { ...Ym, ...e };
|
|
3172
3167
|
} }, created() {
|
|
3173
3168
|
this.actionPreview = this.isPreview || !1;
|
|
3174
3169
|
}, methods: { actionPhrasesSet(e) {
|
|
@@ -3194,11 +3189,11 @@ const Xm = { undo: !1, redo: !1, strong: !0, italic: !0, overline: !0, h1: !0, h
|
|
|
3194
3189
|
t ? this.insertContent("==" + t + "==") : (this.insertContent("===="), this.setCursor(e.line, e.ch + 1));
|
|
3195
3190
|
}, actionUndo() {
|
|
3196
3191
|
if (this.editorViewInst) {
|
|
3197
|
-
const e = this.editorViewInst.state.behavior(
|
|
3198
|
-
this.editorViewInst.update([{ changes: { from: 0, to: e.doc.length, insert: e.doc }, selection:
|
|
3192
|
+
const e = this.editorViewInst.state.behavior(Ve.effect(Ve.undo));
|
|
3193
|
+
this.editorViewInst.update([{ changes: { from: 0, to: e.doc.length, insert: e.doc }, selection: Dn.single(0) }]);
|
|
3199
3194
|
}
|
|
3200
3195
|
}, actionRedo() {
|
|
3201
|
-
this.editorViewInst && this.editorViewInst.dispatch({ ...this.editorViewInst.state, effects:
|
|
3196
|
+
this.editorViewInst && this.editorViewInst.dispatch({ ...this.editorViewInst.state, effects: Ve.redo() });
|
|
3202
3197
|
}, actionInsStrong() {
|
|
3203
3198
|
const e = this.getLastPoint(), t = e.content || !1;
|
|
3204
3199
|
let o = "";
|
|
@@ -3293,7 +3288,7 @@ row 2 col 1 | row 2 col 2
|
|
|
3293
3288
|
}, actionExportFile() {
|
|
3294
3289
|
let e = ".text";
|
|
3295
3290
|
const t = { java: ".java", php: ".php", css: ".css", vue: ".vue", go: ".go", python: ".py", json: ".json", javascript: ".js", js: ".js", html: ".html", markdown: ".md" };
|
|
3296
|
-
this.language && t[this.language] && (e = t[this.language]),
|
|
3291
|
+
this.language && t[this.language] && (e = t[this.language]), jl(this.localVal, this.lastExpFileName + e);
|
|
3297
3292
|
}, insertCode() {
|
|
3298
3293
|
const e = this.getLastPoint(), t = e.content || !1;
|
|
3299
3294
|
let o = "";
|
|
@@ -3309,12 +3304,12 @@ row 2 col 1 | row 2 col 2
|
|
|
3309
3304
|
const e = this.getLastPoint();
|
|
3310
3305
|
let t = "";
|
|
3311
3306
|
t = `
|
|
3312
|
-
` +
|
|
3307
|
+
` + Un(this.actionHtmlText), this.insertContent(e.end, t), this.setCursor(e.start + t.length, e.start + t.length), this.actionHtmlText = "", this.actionHtmlDiaVisible = !1;
|
|
3313
3308
|
}, actionCurrent(e, t) {
|
|
3314
3309
|
this.$emit("on-action", e, t);
|
|
3315
3310
|
}, actionCustom(e) {
|
|
3316
3311
|
this.$emit("on-act-custom", e);
|
|
3317
|
-
} } },
|
|
3312
|
+
} } }, Qm = { name: "cvEditorCode", mixins: [Pl, Me, Hi], emits: ["update:modelValue", "on-ready"], props: { modelValue: { type: [String, Number], default: "" }, options: { type: [Object], default: () => ({ autoRefresh: !0, autofocus: !1, lineNumbers: !0, tabSize: 4, indentUnit: 2, line: !0, styleActiveLine: !0 }) }, toolbars: { type: [Object], default: () => ({}) }, language: { type: [String], default: "" }, theme: { type: [String], default: "oneDark" }, readOnly: { type: [Boolean], default: !1 }, autoSave: { type: [Boolean], default: !1 }, width: { type: [Number, String], default: "auto" }, height: { type: [Number, String], default: 600 }, bordered: { type: [Boolean], default: !0 } }, data: () => ({ localVal: "", heightMainPx: "", editorWrapRefEL: null }), watch: { localVal(e) {
|
|
3318
3313
|
this.$emit("update:modelValue", e);
|
|
3319
3314
|
}, modelValue(e) {
|
|
3320
3315
|
this.localVal != e && (this.localVal = e);
|
|
@@ -3342,10 +3337,10 @@ row 2 col 1 | row 2 col 2
|
|
|
3342
3337
|
const { container: t, state: o, view: l } = e;
|
|
3343
3338
|
this.editorStateInst = o, this.editorViewInst = l, this.listerenEvent(), this.$emit("on-ready");
|
|
3344
3339
|
}, listerenEvent() {
|
|
3345
|
-
} } },
|
|
3346
|
-
const n = C("SvgLanguage"),
|
|
3347
|
-
return
|
|
3348
|
-
}]]),
|
|
3340
|
+
} } }, Jm = { key: 0, class: "cv-editor-code-toolbar", "data-title": "头部工具栏" }, e1 = { class: "cv-editor-toolbars" }, t1 = { name: "导入文件", class: "import-file" }, o1 = { name: "保存到本地" }, i1 = { key: 1, class: "shift-theme", name: "主题" }, a1 = ["onClick"], l1 = { class: "shift-theme", name: "语言" }, n1 = ["onClick"], s1 = { class: "icon-svg" }, r1 = { key: 5, class: "segmentation" }, c1 = ["name"], d1 = { title: "编辑器", class: "cv-editor-code-main" }, To = V(Qm, [["render", function(e, t, o, l, i, a) {
|
|
3341
|
+
const n = C("SvgLanguage"), c = C("SvgCopy"), p = C("CodemirrorEditor");
|
|
3342
|
+
return r(), u("div", { ref: a.editorWrapRefID, class: z(["cv-editor-code-wrap cv-editor-vars", o.bordered ? "border" : ""]), style: A({ width: a.widthTotalPx, height: a.heightTotalPx }) }, [e.actionPreview ? w("", !0) : (r(), u("div", Jm, [d("ul", e1, [e.$slots.title ? (r(), u($, { key: 0 }, [d("li", null, [D(e.$slots, "title")]), t[16] || (t[16] = d("li", { class: "segmentation" }, [d("div")], -1))], 64)) : w("", !0), N(d("li", t1, [d("span", { class: "iconfont icon-daoru", onClick: t[0] || (t[0] = (...h) => e.actionImportFile && e.actionImportFile(...h)) }), d("input", { type: "file", onChange: t[1] || (t[1] = (h) => e.actionImportFile(h)), accept: "text/markdown" }, null, 32)], 512), [[H, e.toolConfig.importmd]]), N(d("li", o1, [d("span", { class: "iconfont icon-download", onClick: t[2] || (t[2] = (...h) => e.actionExportFile && e.actionExportFile(...h)) })], 512), [[H, e.toolConfig.exportmd]]), t[20] || (t[20] = d("li", { class: "segmentation" }, [d("div")], -1)), e.toolConfig.theme ? (r(), u("li", i1, [d("span", { class: "iconfont icon-theme", onClick: t[3] || (t[3] = (h) => e.actionThemeDropdown = !e.actionThemeDropdown) }), d("ul", { class: z({ active: e.actionThemeDropdown }), onMouseleave: t[4] || (t[4] = (h) => e.actionThemeDropdown = !1) }, [(r(!0), u($, null, M(e.optionTheme, (h) => (r(), u("li", { onClick: (m) => e.actionThemesSet(h) }, L(h), 9, a1))), 256))], 34)])) : w("", !0), d("li", l1, [d("span", { class: "icon-svg", onClick: t[5] || (t[5] = (h) => e.actionLanguageDropdown = !e.actionLanguageDropdown) }, [b(n)]), d("ul", { class: z({ active: e.actionLanguageDropdown }), onMouseleave: t[6] || (t[6] = (h) => e.actionLanguageDropdown = !1) }, [(r(!0), u($, null, M(e.optionLanguage, (h) => (r(), u("li", { class: z(h == o.language ? "active" : ""), onClick: (m) => e.actionLanguageSet(h) }, L(h), 11, n1))), 256))], 34)]), t[21] || (t[21] = d("li", { class: "empty" }, null, -1)), e.toolConfig.copy ? (r(), u("li", { key: 2, name: "复制", onClick: t[7] || (t[7] = (...h) => e.actionCopySet && e.actionCopySet(...h)) }, [d("span", s1, [b(c)])])) : w("", !0), e.toolConfig.clear ? (r(), u("li", { key: 3, name: "清空", onClick: t[8] || (t[8] = (h) => i.localVal = "") }, t[17] || (t[17] = [d("span", { class: "iconfont icon-clear" }, null, -1)]))) : w("", !0), e.toolConfig.save ? (r(), u("li", { key: 4, name: "保存", onClick: t[9] || (t[9] = (...h) => e.actionSaveSet && e.actionSaveSet(...h)) }, t[18] || (t[18] = [d("span", { class: "iconfont icon-save" }, null, -1)]))) : w("", !0), e.toolConfig.fullscreen ? (r(), u("li", r1, t[19] || (t[19] = [d("div", null, null, -1)]))) : w("", !0), e.toolConfig.fullscreen ? (r(), u("li", { key: 6, name: e.actionFullscreen ? "退出全屏" : "全屏" }, [N(d("span", { onClick: t[10] || (t[10] = (h) => e.actionFullscreenSet(!1)), class: "iconfont icon-quite" }, null, 512), [[H, e.actionFullscreen]]), N(d("span", { onClick: t[11] || (t[11] = (h) => e.actionFullscreenSet(!0)), class: "iconfont icon-fullscreen" }, null, 512), [[H, !e.actionFullscreen]])], 8, c1)) : w("", !0)])])), d("div", d1, [b(p, O(e.codemrrBind, { id: e.editorRefID, ref: e.editorRefID, style: { height: i.heightMainPx, backgroundColor: e.codemrrConfig.backgroundColor }, extensions: e.extensions, modelValue: i.localVal, "onUpdate:modelValue": t[12] || (t[12] = (h) => i.localVal = h), onReady: a.initEditorReady, onChange: t[13] || (t[13] = (h) => a.consoleLog("change", h)), onFocus: t[14] || (t[14] = (h) => a.consoleLog("focus", h)), onBlur: t[15] || (t[15] = (h) => a.consoleLog("blur", h)) }), null, 16, ["id", "style", "extensions", "modelValue", "onReady"])])], 6);
|
|
3343
|
+
}]]), h1 = { name: "cvEditorJson", components: {}, mixins: [Me], props: { modelValue: { type: [Object, Array, Number, String, Boolean], default: "" }, mode: { type: [String], default: "text" }, readOnly: { type: [Boolean], default: !1 }, options: { type: [Object], default: () => ({ mode: "text" }) }, height: { type: String }, plus: { type: Boolean, default: !0 } }, data: () => ({ editorInstance: null, style: {}, max: !1, internalChange: !1, localVal: "" }), watch: { modelValue: { handler(e) {
|
|
3349
3344
|
this.localVal != e && (this.localVal = e, this.updateVal(e));
|
|
3350
3345
|
}, deep: !0 }, max(e) {
|
|
3351
3346
|
this.$nextTick(() => {
|
|
@@ -3387,23 +3382,23 @@ row 2 col 1 | row 2 col 2
|
|
|
3387
3382
|
}, destroyView() {
|
|
3388
3383
|
this.editor && (this.editorInstance.destroy(), this.editor = null);
|
|
3389
3384
|
}, handleChange(e) {
|
|
3390
|
-
this.emitData || (this.emitData =
|
|
3385
|
+
this.emitData || (this.emitData = Il(400, (t) => {
|
|
3391
3386
|
this.$emit("update:modelValue", t);
|
|
3392
3387
|
})), this.emitData(e);
|
|
3393
|
-
} } },
|
|
3394
|
-
return
|
|
3395
|
-
}]]),
|
|
3396
|
-
let
|
|
3397
|
-
const
|
|
3388
|
+
} } }, Fo = V(h1, [["render", function(e, t, o, l, i, a) {
|
|
3389
|
+
return r(), u("div", { class: z(["cv-editor-json", { "max-box": i.max, "min-box": !i.max }]), style: A(a.getHeight) }, [d("div", { ref: e.editorRefID, class: "jsoneditor-box" }, null, 512), d("a", { onClick: t[0] || (t[0] = (n) => i.max = !i.max), class: "max-btn" })], 6);
|
|
3390
|
+
}]]), p1 = { class: "cv-editor-upload-container" }, u1 = ["advlist", "anchor", "autolink", "autosave", "code", "codesample", "directionality", "emoticons", "fullscreen", "image", "insertdatetime", "link", "lists", "media", "nonbreaking", "pagebreak", "preview", "save", "searchreplace", "table", "visualblocks", "visualchars", "wordcount"], m1 = ["hr blockquote anchor pagebreak insertdatetime table emoticons | searchreplace preview code codesample | fullscreen | link media image ", "inserttemplate undo redo | styles | removeformat subscript superscript forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist indent"];
|
|
3391
|
+
let Le = [];
|
|
3392
|
+
const g1 = (e, t) => {
|
|
3398
3393
|
const o = document.getElementById(e), l = t || function() {
|
|
3399
3394
|
};
|
|
3400
3395
|
if (!o) {
|
|
3401
3396
|
const i = document.createElement("script");
|
|
3402
|
-
i.src = e, i.id = e, document.body.appendChild(i),
|
|
3397
|
+
i.src = e, i.id = e, document.body.appendChild(i), Le.push(l), ("onload" in i ? function(n) {
|
|
3403
3398
|
n.onload = function() {
|
|
3404
3399
|
this.onerror = this.onload = null;
|
|
3405
|
-
for (const
|
|
3406
|
-
|
|
3400
|
+
for (const c of Le) c(null, n);
|
|
3401
|
+
Le = null;
|
|
3407
3402
|
}, n.onerror = function() {
|
|
3408
3403
|
this.onerror = this.onload = null, l(new Error("Failed to load " + e), n);
|
|
3409
3404
|
};
|
|
@@ -3411,14 +3406,14 @@ const f1 = (e, t) => {
|
|
|
3411
3406
|
n.onreadystatechange = function() {
|
|
3412
3407
|
if (this.readyState === "complete" || this.readyState === "loaded") {
|
|
3413
3408
|
this.onreadystatechange = null;
|
|
3414
|
-
for (const
|
|
3415
|
-
|
|
3409
|
+
for (const c of Le) c(null, n);
|
|
3410
|
+
Le = null;
|
|
3416
3411
|
}
|
|
3417
3412
|
};
|
|
3418
3413
|
})(i);
|
|
3419
3414
|
}
|
|
3420
|
-
o && l && (window.tinymce ? l(null, o) :
|
|
3421
|
-
},
|
|
3415
|
+
o && l && (window.tinymce ? l(null, o) : Le.push(l));
|
|
3416
|
+
}, f1 = ["id"], v1 = { class: "editor-custom-btn-container" }, Oo = V({ inheritAttrs: !1, name: "cvEditorTinymce", components: { EditorSlideUpload: V({ name: "EditorSlideUpload", props: { color: { type: String, default: "#1890ff" }, accept: { type: [String], default: "image/jpeg,image/gif,image/png" }, upName: { type: [String], default: "" }, upAction: { type: [String], default: "" }, upResponseFn: { type: [Function], default: () => {
|
|
3422
3417
|
} }, upHeaders: { type: [Object], default: () => {
|
|
3423
3418
|
} }, upData: { type: [Object], default: () => {
|
|
3424
3419
|
} } }, data: () => ({ dialogVisible: !1, listObj: {}, fileList: [], diyUpList: new FormData() }), methods: { checkAllSuccess() {
|
|
@@ -3441,9 +3436,9 @@ const f1 = (e, t) => {
|
|
|
3441
3436
|
}, i(!0);
|
|
3442
3437
|
});
|
|
3443
3438
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
3444
|
-
const n = C("cv-icons"),
|
|
3445
|
-
return
|
|
3446
|
-
}]]) }, emits: ["update:modelValue"], mixins: [
|
|
3439
|
+
const n = C("cv-icons"), c = C("el-button"), p = C("el-upload"), h = C("el-dialog");
|
|
3440
|
+
return r(), u("div", p1, [b(c, { style: A({ background: o.color, borderColor: o.color, fontSize: "16px" }), type: "primary", onClick: t[0] || (t[0] = (m) => i.dialogVisible = !0) }, { default: v(() => [b(n, { type: "ElIconUpload", size: "16", style: { "margin-right": "5px" } }), t[2] || (t[2] = F(" 上传 "))]), _: 1, __: [2] }, 8, ["style"]), b(h, { visible: i.dialogVisible }, { default: v(() => [b(p, O({ class: "editor-slide-upload" }, { action: o.upAction, headers: o.upHeaders, data: o.upData, name: o.upName, multiple: !0, showFileList: !0, listType: "picture-card", autoUpload: !0 }, { "file-list": i.fileList, "on-remove": a.handleRemove, "on-success": a.handleSuccess, "before-upload": a.beforeUpload }), { default: v(() => [b(c, { type: "primary" }, { default: v(() => t[3] || (t[3] = [F("点击上传")])), _: 1, __: [3] })]), _: 1 }, 16, ["file-list", "on-remove", "on-success", "before-upload"]), b(c, { onClick: t[1] || (t[1] = (m) => i.dialogVisible = !1) }, { default: v(() => t[4] || (t[4] = [F("取消")])), _: 1, __: [4] }), b(c, { type: "primary", onClick: a.handleSubmit }, { default: v(() => t[5] || (t[5] = [F("确定")])), _: 1, __: [5] }, 8, ["onClick"])]), _: 1 }, 8, ["visible"])]);
|
|
3441
|
+
}]]) }, emits: ["update:modelValue"], mixins: [Me], props: { modelValue: { type: String, default: "" }, toolbar: { type: Array, required: !1, default: () => [] }, menubar: { type: String, default: "file edit insert view format table" }, height: { type: [Number, String], required: !1, default: 360 }, width: { type: [Number, String], required: !1, default: "100%" }, uploadAttr: { type: [Object], default: () => ({}) } }, data: () => ({ localVal: "", fullscreen: !1, languageTypeList: { en: "en", zh: "zh_CN", es: "es_MX", ja: "ja" } }), computed: { containerWidth() {
|
|
3447
3442
|
const e = this.width;
|
|
3448
3443
|
return /^[\d]+(\.[\d]+)?$/.test(e) ? `${e}px` : e;
|
|
3449
3444
|
} }, watch: { modelValue(e) {
|
|
@@ -3459,12 +3454,12 @@ const f1 = (e, t) => {
|
|
|
3459
3454
|
}, destroyed() {
|
|
3460
3455
|
this.destroyTinymce();
|
|
3461
3456
|
}, methods: { initLoad() {
|
|
3462
|
-
|
|
3457
|
+
g1("https://10ui.cn/tinymce/@7.0.0/tinymce.min.js", (e) => {
|
|
3463
3458
|
e ? this.$message.error(e.message) : this.initTinymce();
|
|
3464
3459
|
});
|
|
3465
3460
|
}, initTinymce() {
|
|
3466
3461
|
const e = this;
|
|
3467
|
-
window.tinymce.init({ selector: `#${this.editorRefID}`, license_key: "gpl", language: this.languageTypeList.zh, height: this.height, body_class: "panel-body ", object_resizing: !1, toolbar: this.toolbar.length > 0 ? this.toolbar :
|
|
3462
|
+
window.tinymce.init({ selector: `#${this.editorRefID}`, license_key: "gpl", language: this.languageTypeList.zh, height: this.height, body_class: "panel-body ", object_resizing: !1, toolbar: this.toolbar.length > 0 ? this.toolbar : m1, menubar: this.menubar, plugins: u1, end_container_on_empty_block: !0, powerpaste_word_import: "clean", code_dialog_height: 450, code_dialog_width: 1e3, advlist_bullet_styles: "square", advlist_number_styles: "default", editimage_cors_hosts: ["www.tinymce.com", "codepen.io"], link_default_target: "_blank", link_title: !1, nonbreaking_force_tab: !0, init_instance_callback: (t) => {
|
|
3468
3463
|
e.localVal && t.setContent(e.localVal);
|
|
3469
3464
|
}, setup(t) {
|
|
3470
3465
|
t.on("FullscreenStateChanged", (o) => {
|
|
@@ -3486,8 +3481,8 @@ const f1 = (e, t) => {
|
|
|
3486
3481
|
e.forEach((t) => window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${t.url}" >`));
|
|
3487
3482
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
3488
3483
|
const n = C("EditorSlideUpload");
|
|
3489
|
-
return
|
|
3490
|
-
}], ["__scopeId", "data-v-8cbc5d06"]]),
|
|
3484
|
+
return r(), u("div", { class: z(["cv-editor-tinymce tinymce-container", { fullscreen: i.fullscreen }]), style: A({ width: a.containerWidth }) }, [d("textarea", { id: e.editorRefID, class: "tinymce-textarea" }, null, 8, f1), d("div", v1, [b(n, O({ color: "#1890ff", class: "editor-upload-btn", onSuccessCBK: a.imageSuccessCBK }, o.uploadAttr), null, 16, ["onSuccessCBK"])])], 6);
|
|
3485
|
+
}], ["__scopeId", "data-v-8cbc5d06"]]), y1 = { name: "cvEditorMarkdown", mixins: [Pl, Me, Hi], emits: ["update:modelValue", "on-ready", "on-upload-image"], props: { modelValue: { type: [String, Number], default: "" }, options: { type: [Object], default: () => ({}) }, toolbars: { type: [Object], default: () => ({}) }, language: { type: [String], default: "markdown" }, theme: { type: [String], default: "light" }, readOnly: { type: [Boolean], default: !1 }, autoSave: { type: [Boolean], default: !1 }, width: { type: [Number, String], default: "auto" }, height: { type: [Number, String], default: 600 }, bordered: { type: [Boolean], default: !0 } }, data: () => ({ lastPos: "", lastInsert: "", lastHtml: "", scrollSide: "", localVal: "", heightMainPx: "", editorWrapRefEL: null }), watch: { localVal(e) {
|
|
3491
3486
|
this.$emit("update:modelValue", e);
|
|
3492
3487
|
}, modelValue(e) {
|
|
3493
3488
|
this.localVal != e && (this.localVal = e);
|
|
@@ -3564,49 +3559,49 @@ const f1 = (e, t) => {
|
|
|
3564
3559
|
}
|
|
3565
3560
|
}, previewScroll() {
|
|
3566
3561
|
if (this.actionScrollSync && this.scrollSide === "right") {
|
|
3567
|
-
const { markdownRef: e, markdownScrollHeight: t, markdownScrollTop: o, previewRef: l, contentHeight: i, previewScrollHeight: a, previewScrollTop: n } = this.getScrollData(),
|
|
3568
|
-
e.scrollTop =
|
|
3562
|
+
const { markdownRef: e, markdownScrollHeight: t, markdownScrollTop: o, previewRef: l, contentHeight: i, previewScrollHeight: a, previewScrollTop: n } = this.getScrollData(), c = parseInt(n / (a - i) * (t - i), 0);
|
|
3563
|
+
e.scrollTop = c;
|
|
3569
3564
|
}
|
|
3570
|
-
} } },
|
|
3571
|
-
const n = C("SvgImgMap"),
|
|
3572
|
-
return d(), u("div", { ref: a.editorWrapRefID, class: z(["cv-editor-markdown-wrap", o.bordered ? "border" : ""]), style: A({ width: a.widthTotalPx, height: a.heightTotalPx }) }, [e.actionPreview ? w("", !0) : (d(), u("div", C1, [c("ul", w1, [e.$slots.title ? (d(), u($, { key: 0 }, [c("li", null, [D(e.$slots, "title", {}, void 0, !0)]), t[65] || (t[65] = c("li", { class: "segmentation" }, [c("div")], -1))], 64)) : w("", !0), e.toolConfig.image ? (d(), u("li", k1, [c("span", { onClick: t[0] || (t[0] = (...y) => e.actionInsImage && e.actionInsImage(...y)), class: "iconfont icon-img" })])) : w("", !0), e.toolConfig.uploadImage ? (d(), u("li", x1, [c("span", { onClick: t[1] || (t[1] = (...y) => e.actionChooseImage && e.actionChooseImage(...y)), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.custom_image ? (d(), u("li", { key: 3, name: "图片空间", onClick: t[2] || (t[2] = (y) => e.actionCustom("image-browse")) }, [c("span", S1, [b(n)])])) : w("", !0), e.toolConfig.custom_uploadImage ? (d(), u("li", V1, [c("span", { onClick: t[3] || (t[3] = (y) => e.actionCustom("image-upload")), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.custom_uploadFile ? (d(), u("li", _1, [c("span", { onClick: t[4] || (t[4] = (y) => e.actionCustom("file-upload")), class: "icon-svg" }, [b(r)])])) : w("", !0), N(c("li", I1, [c("span", { class: "iconfont icon-daoru", onClick: t[5] || (t[5] = (...y) => e.actionImportFile && e.actionImportFile(...y)) }), c("input", { type: "file", onChange: t[6] || (t[6] = (y) => e.actionImportFile(y)), accept: "text/markdown" }, null, 32)], 512), [[P, e.toolConfig.importmd]]), N(c("li", L1, [c("span", { class: "iconfont icon-download", onClick: t[7] || (t[7] = (...y) => e.actionExportFile && e.actionExportFile(...y)) })], 512), [[P, e.toolConfig.exportmd]]), t[72] || (t[72] = c("li", { class: "segmentation" }, [c("div")], -1)), e.toolConfig.code ? (d(), u("li", D1, [c("span", { onClick: t[8] || (t[8] = (...y) => e.insertCode && e.insertCode(...y)), class: "iconfont icon-code" })])) : w("", !0), e.toolConfig.theme ? (d(), u("li", T1, [c("span", { class: "iconfont icon-theme", onClick: t[9] || (t[9] = (y) => e.actionThemeDropdown = !e.actionThemeDropdown) }), c("ul", { class: z({ active: e.actionThemeDropdown }), onMouseleave: t[10] || (t[10] = (y) => e.actionThemeDropdown = !1) }, [(d(!0), u($, null, M(e.optionTheme, (y) => (d(), u("li", { onClick: (_) => e.actionThemesSet(y) }, L(y), 9, F1))), 256))], 34)])) : w("", !0), e.toolConfig.backgroundColor ? (d(), u("li", O1, [c("span", { class: "iconfont icon-theme", onClick: t[11] || (t[11] = (y) => e.actionBgColorDropdown = !e.actionBgColorDropdown) }), c("ul", { class: z({ active: e.actionBgColorDropdown }), onMouseleave: t[12] || (t[12] = (y) => e.actionBgColorDropdown = !1) }, [(d(), u($, null, M(["red", "black", "yellow", "lawngreen", "blue", "white"], (y) => c("li", { onClick: (_) => e.actionBgColorSet(y) }, L(y), 9, $1)), 64))], 34)])) : w("", !0), e.toolConfig.phrases ? (d(), u("li", N1, [c("span", { class: "iconfont icon-theme", onClick: t[13] || (t[13] = (y) => e.actionPhrasesDropdown = !e.actionPhrasesDropdown) }), c("ul", { class: z({ active: e.actionPhrasesDropdown }), onMouseleave: t[14] || (t[14] = (y) => e.actionPhrasesDropdown = !1) }, [(d(!0), u($, null, M(e.optionPhrases, (y) => (d(), u("li", { onClick: (_) => e.actionPhrasesSet(y) }, L(y), 9, M1))), 256))], 34)])) : w("", !0), e.toolConfig.html_to_markdown ? (d(), u("li", { key: 10, name: "html转markdown", onClick: t[15] || (t[15] = (y) => e.actionHtmlVisible(!0)) }, t[66] || (t[66] = [c("span", { style: { width: "auto", "font-size": "12px !important", padding: "0px 6px", margin: "0 10px", border: "1px #e2e2e2 solid" } }, " HTML2MD ", -1)]))) : w("", !0), e.toolConfig.disabled ? (d(), u("li", { key: 11, name: e.codemrrConfig.disabled ? "toggle disabled:开" : "toggle disabled:关" }, [N(c("span", { onClick: t[16] || (t[16] = (y) => e.codemrrConfig.disabled = !e.codemrrConfig.disabled), class: "iconfont icon-on" }, null, 512), [[P, e.codemrrConfig.disabled]]), N(c("span", { onClick: t[17] || (t[17] = (y) => e.codemrrConfig.disabled = !e.codemrrConfig.disabled), class: "iconfont icon-off" }, null, 512), [[P, !e.codemrrConfig.disabled]])], 8, B1)) : w("", !0), e.toolConfig.autofocus ? (d(), u("li", { key: 12, name: e.codemrrConfig.autofocus ? "toggle autofocus:开" : "toggle autofocus:关" }, [N(c("span", { onClick: t[18] || (t[18] = (y) => e.codemrrConfig.autofocus = !e.codemrrConfig.autofocus), class: "iconfont icon-on" }, null, 512), [[P, e.codemrrConfig.autofocus]]), N(c("span", { onClick: t[19] || (t[19] = (y) => e.codemrrConfig.autofocus = !e.codemrrConfig.autofocus), class: "iconfont icon-off" }, null, 512), [[P, !e.codemrrConfig.autofocus]])], 8, E1)) : w("", !0), e.toolConfig.indentWithTab ? (d(), u("li", { key: 13, name: e.codemrrConfig.indentWithTab ? "toggle indentWithTab:开" : "toggle indentWithTab:关" }, [N(c("span", { onClick: t[20] || (t[20] = (y) => e.codemrrConfig.indentWithTab = !e.codemrrConfig.indentWithTab), class: "iconfont icon-on" }, null, 512), [[P, e.codemrrConfig.indentWithTab]]), N(c("span", { onClick: t[21] || (t[21] = (y) => e.codemrrConfig.indentWithTab = !e.codemrrConfig.indentWithTab), class: "iconfont icon-off" }, null, 512), [[P, !e.codemrrConfig.indentWithTab]])], 8, z1)) : w("", !0), t[73] || (t[73] = c("li", { class: "empty" }, null, -1)), e.toolConfig.scrollSync ? (d(), u("li", { key: 14, name: e.actionScrollSync ? "同步滚动:开" : "同步滚动:关" }, [N(c("span", { onClick: t[22] || (t[22] = (y) => e.actionScrollSync = !e.actionScrollSync), class: "iconfont icon-on active" }, null, 512), [[P, e.actionScrollSync]]), N(c("span", { onClick: t[23] || (t[23] = (y) => e.actionScrollSync = !e.actionScrollSync), class: "iconfont icon-off" }, null, 512), [[P, !e.actionScrollSync]])], 8, A1)) : w("", !0), e.toolConfig.split && e.actionSplit ? (d(), u("li", H1, [c("span", { onClick: t[24] || (t[24] = (y) => e.actionSplit = !1), class: "iconfont icon-md" })])) : w("", !0), e.toolConfig.split && !e.actionSplit ? (d(), u("li", P1, [c("span", { onClick: t[25] || (t[25] = (y) => e.actionSplit = !0), class: "iconfont icon-group" })])) : w("", !0), e.toolConfig.preview ? (d(), u("li", j1, [c("span", { onClick: t[26] || (t[26] = (y) => e.actionPreview = !0), class: "iconfont icon-preview" })])) : w("", !0), e.toolConfig.copy || e.toolConfig.clear || e.toolConfig.save ? (d(), u("li", R1, t[67] || (t[67] = [c("div", null, null, -1)]))) : w("", !0), e.toolConfig.copy ? (d(), u("li", { key: 19, name: "复制", onClick: t[27] || (t[27] = (...y) => e.actionCopySet && e.actionCopySet(...y)) }, [c("span", U1, [b(p)])])) : w("", !0), e.toolConfig.clear ? (d(), u("li", { key: 20, name: "清空", onClick: t[28] || (t[28] = (y) => i.localVal = "") }, t[68] || (t[68] = [c("span", { class: "iconfont icon-clear" }, null, -1)]))) : w("", !0), e.toolConfig.save ? (d(), u("li", { key: 21, name: "保存", onClick: t[29] || (t[29] = (...y) => e.actionSaveSet && e.actionSaveSet(...y)) }, t[69] || (t[69] = [c("span", { class: "iconfont icon-save" }, null, -1)]))) : w("", !0), e.toolConfig.toc ? (d(), u("li", W1, t[70] || (t[70] = [c("div", null, null, -1)]))) : w("", !0), e.toolConfig.toc ? (d(), u("li", Y1, [N(c("span", { onClick: t[30] || (t[30] = (y) => e.actionToc = !e.actionToc), class: "icon-svg active" }, [b(h)], 512), [[P, e.actionToc]]), N(c("span", { onClick: t[31] || (t[31] = (y) => e.actionToc = !e.actionToc), class: "icon-svg" }, [b(h)], 512), [[P, !e.actionToc]])])) : w("", !0), e.toolConfig.fullscreen ? (d(), u("li", X1, t[71] || (t[71] = [c("div", null, null, -1)]))) : w("", !0), e.toolConfig.fullscreen ? (d(), u("li", { key: 25, name: e.actionFullscreen ? "退出全屏" : "全屏" }, [N(c("span", { onClick: t[32] || (t[32] = (y) => e.actionFullscreenSet(!1)), class: "iconfont icon-quite" }, null, 512), [[P, e.actionFullscreen]]), N(c("span", { onClick: t[33] || (t[33] = (y) => e.actionFullscreenSet(!0)), class: "iconfont icon-fullscreen" }, null, 512), [[P, !e.actionFullscreen]])], 8, q1)) : w("", !0)]), c("ul", K1, [e.toolConfig.undo ? (d(), u("li", G1, [c("span", { class: "iconfont icon-undo", onClick: t[34] || (t[34] = (...y) => e.actionUndo && e.actionUndo(...y)) })])) : w("", !0), e.toolConfig.redo ? (d(), u("li", { key: 1, name: "重做", onClick: t[35] || (t[35] = (...y) => e.actionRedo && e.actionRedo(...y)) }, t[74] || (t[74] = [c("span", { class: "iconfont icon-redo" }, null, -1)]))) : w("", !0), e.toolConfig.strong ? (d(), u("li", Z1, [c("span", { onClick: t[36] || (t[36] = (...y) => e.actionInsStrong && e.actionInsStrong(...y)), class: "iconfont icon-bold" })])) : w("", !0), e.toolConfig.italic ? (d(), u("li", Q1, [c("span", { onClick: t[37] || (t[37] = (...y) => e.actionInsItalic && e.actionInsItalic(...y)), class: "iconfont icon-italic" })])) : w("", !0), e.toolConfig.overline ? (d(), u("li", J1, [c("span", { onClick: t[38] || (t[38] = (...y) => e.actionInsOverline && e.actionInsOverline(...y)), class: "iconfont icon-overline" })])) : w("", !0), e.toolConfig.overline ? (d(), u("li", eg, [c("span", { onClick: t[39] || (t[39] = (...y) => e.actionInsUnderline && e.actionInsUnderline(...y)), class: "iconfont icon-under-line" })])) : w("", !0), e.toolConfig.h1 ? (d(), u("li", tg, [c("span", { style: { "font-size": "16px" }, onClick: t[40] || (t[40] = (y) => e.actionInsTitle(1)) }, "h1")])) : w("", !0), e.toolConfig.h2 ? (d(), u("li", og, [c("span", { style: { "font-size": "16px" }, onClick: t[41] || (t[41] = (y) => e.actionInsTitle(2)) }, "h2")])) : w("", !0), e.toolConfig.h3 ? (d(), u("li", ig, [c("span", { style: { "font-size": "16px" }, onClick: t[42] || (t[42] = (y) => e.actionInsTitle(3)) }, "h3")])) : w("", !0), e.toolConfig.h4 ? (d(), u("li", ag, [c("span", { style: { "font-size": "16px" }, onClick: t[43] || (t[43] = (y) => e.actionInsTitle(4)) }, "h4")])) : w("", !0), e.toolConfig.h5 ? (d(), u("li", lg, [c("span", { style: { "font-size": "16px" }, onClick: t[44] || (t[44] = (y) => e.actionInsTitle(5)) }, "h5")])) : w("", !0), e.toolConfig.h6 ? (d(), u("li", ng, [c("span", { style: { "font-size": "16px" }, onClick: t[45] || (t[45] = (y) => e.actionInsTitle(6)) }, "h6")])) : w("", !0), e.toolConfig.hr ? (d(), u("li", sg, [c("span", { onClick: t[46] || (t[46] = (...y) => e.actionInsLine && e.actionInsLine(...y)), class: "iconfont icon-horizontal" })])) : w("", !0), e.toolConfig.quote ? (d(), u("li", rg, [c("span", { style: { "font-size": "16px" }, onClick: t[47] || (t[47] = (...y) => e.actionInsQuote && e.actionInsQuote(...y)), class: "iconfont icon-quote" })])) : w("", !0), e.toolConfig.ul ? (d(), u("li", cg, [c("span", { onClick: t[48] || (t[48] = (...y) => e.actionInsUl && e.actionInsUl(...y)), class: "iconfont icon-ul" })])) : w("", !0), e.toolConfig.ol ? (d(), u("li", dg, [c("span", { onClick: t[49] || (t[49] = (...y) => e.actionInsOl && e.actionInsOl(...y)), class: "iconfont icon-ol" })])) : w("", !0), e.toolConfig.notChecked ? (d(), u("li", hg, [c("span", { onClick: t[50] || (t[50] = (...y) => e.insertNotFinished && e.insertNotFinished(...y)), class: "iconfont icon-checked-false" })])) : w("", !0), e.toolConfig.checked ? (d(), u("li", pg, [c("span", { onClick: t[51] || (t[51] = (...y) => e.insertFinished && e.insertFinished(...y)), class: "iconfont icon-checked" })])) : w("", !0), e.toolConfig.link ? (d(), u("li", ug, [c("span", { onClick: t[52] || (t[52] = (...y) => e.actionInsLink && e.actionInsLink(...y)), class: "iconfont icon-link" })])) : w("", !0), e.toolConfig.table ? (d(), u("li", mg, [c("span", { onClick: t[53] || (t[53] = (...y) => e.actionInsTable && e.actionInsTable(...y)), class: "iconfont icon-table" })])) : w("", !0)])])), c("div", { title: "编辑器", class: "cv-editor-markdown-main", style: A({ background: e.actionPreview ? "#fff" : "" }) }, [N(b(m, O(e.codemrrBind, { id: e.editorRefID, ref: e.editorRefID, style: { height: i.heightMainPx, backgroundColor: e.codemrrConfig.backgroundColor }, extensions: e.extensions, modelValue: i.localVal, "onUpdate:modelValue": t[54] || (t[54] = (y) => i.localVal = y), onReady: a.initEditorReady, onChange: t[55] || (t[55] = (y) => a.consoleLog("change", y)), onFocus: t[56] || (t[56] = (y) => a.consoleLog("focus", y)), onBlur: t[57] || (t[57] = (y) => a.consoleLog("blur", y)), onMouseenter: t[58] || (t[58] = (y) => a.mousescrollSide("left")) }), null, 16, ["id", "style", "extensions", "modelValue", "onReady"]), [[P, !e.actionPreview]]), N(b(f, { html: i.lastHtml, "onUpdate:html": t[59] || (t[59] = (y) => i.lastHtml = y), ref: a.previewRefID, editorID: a.previewRefID, modelValue: i.localVal, theme: e.codemrrConfig.theme || o.theme, language: o.language, tocShow: e.actionToc, style: A([{ flex: "1", height: "100%", "border-left": "1px solid #dedede", "overflow-y": "auto" }, { height: e.actionPreview ? "" : i.heightMainPx }]), onMouseenter: t[60] || (t[60] = (y) => a.mousescrollSide("right")) }, null, 8, ["html", "editorID", "modelValue", "theme", "language", "tocShow", "style"]), [[P, e.actionPreview ? e.actionPreview : e.actionSplit]])], 4), N(c("div", { title: "关闭预览按钮", class: "close-preview", onClick: t[61] || (t[61] = (y) => e.actionPreview = !1) }, t[75] || (t[75] = [c("span", { class: "iconfont icon-close" }, null, -1)]), 512), [[P, e.actionPreview]]), b(x, { modelValue: e.actionHtmlDiaVisible, "onUpdate:modelValue": t[64] || (t[64] = (y) => e.actionHtmlDiaVisible = y), title: "html转markdown", width: "680", "show-close": !1, "append-to-body": "" }, { footer: v(() => [b(k, { onClick: t[63] || (t[63] = (y) => e.actionHtmlVisible(!1)) }, { default: v(() => t[76] || (t[76] = [F("取消")])), _: 1, __: [76] }), b(k, { type: "primary", onClick: e.actionHtmlToMD }, { default: v(() => t[77] || (t[77] = [F("转换成markdown")])), _: 1, __: [77] }, 8, ["onClick"])]), default: v(() => [b(g, { type: "textarea", modelValue: e.actionHtmlText, "onUpdate:modelValue": t[62] || (t[62] = (y) => e.actionHtmlText = y), rows: 14, placeholder: "请输入html代码..." }, null, 8, ["modelValue"])]), _: 1 }, 8, ["modelValue"])], 6);
|
|
3573
|
-
}], ["__scopeId", "data-v-a76ecd6a"]]),
|
|
3565
|
+
} } }, b1 = { key: 0, class: "cv-editor-markdown-toolbar", "data-title": "头部工具栏" }, C1 = { class: "cv-editor-toolbars" }, w1 = { key: 1, name: "插入图片" }, k1 = { key: 2, name: "本地图片" }, x1 = { class: "icon-svg" }, S1 = { key: 4, name: "上传图片" }, V1 = { key: 5, name: "上传文件" }, _1 = { name: "导入文件", class: "import-file" }, I1 = { name: "保存到本地" }, L1 = { key: 6, name: "代码块" }, D1 = { key: 7, class: "shift-theme", name: "主题" }, T1 = ["onClick"], F1 = { key: 8, class: "shift-theme", name: "背景颜色" }, O1 = ["onClick"], $1 = { key: 9, class: "shift-theme", name: "phrases" }, N1 = ["onClick"], M1 = ["name"], B1 = ["name"], E1 = ["name"], z1 = ["name"], A1 = { key: 15, name: "全屏编辑" }, H1 = { key: 16, name: "分屏显示" }, P1 = { key: 17, name: "预览" }, j1 = { key: 18, class: "segmentation" }, R1 = { class: "icon-svg" }, U1 = { key: 22, class: "segmentation" }, W1 = { key: 23, name: "目录" }, Y1 = { key: 24, class: "segmentation" }, X1 = ["name"], q1 = { class: "cv-editor-toolbars" }, K1 = { key: 0, name: "撤销" }, G1 = { key: 2, name: "粗体" }, Z1 = { key: 3, name: "斜体" }, Q1 = { key: 4, name: "删除线" }, J1 = { key: 5, name: "下划线" }, eg = { key: 6, name: "标题1" }, tg = { key: 7, name: "标题2" }, og = { key: 8, name: "标题3" }, ig = { key: 9, name: "标题4" }, ag = { key: 10, name: "标题5" }, lg = { key: 11, name: "标题6" }, ng = { key: 12, name: "分割线" }, sg = { key: 13, name: "引用" }, rg = { key: 14, name: "无序列表" }, cg = { key: 15, name: "有序列表" }, dg = { key: 16, name: "未完成列表" }, hg = { key: 17, name: "已完成列表" }, pg = { key: 18, name: "链接" }, ug = { key: 19, name: "表格" }, $o = V(y1, [["render", function(e, t, o, l, i, a) {
|
|
3566
|
+
const n = C("SvgImgMap"), c = C("SvgUploadFile"), p = C("SvgCopy"), h = C("SvgToc"), m = C("CodemirrorEditor"), f = C("cv-markdown-show"), g = C("el-input"), k = C("el-button"), x = C("el-dialog");
|
|
3567
|
+
return r(), u("div", { ref: a.editorWrapRefID, class: z(["cv-editor-markdown-wrap", o.bordered ? "border" : ""]), style: A({ width: a.widthTotalPx, height: a.heightTotalPx }) }, [e.actionPreview ? w("", !0) : (r(), u("div", b1, [d("ul", C1, [e.$slots.title ? (r(), u($, { key: 0 }, [d("li", null, [D(e.$slots, "title", {}, void 0, !0)]), t[65] || (t[65] = d("li", { class: "segmentation" }, [d("div")], -1))], 64)) : w("", !0), e.toolConfig.image ? (r(), u("li", w1, [d("span", { onClick: t[0] || (t[0] = (...y) => e.actionInsImage && e.actionInsImage(...y)), class: "iconfont icon-img" })])) : w("", !0), e.toolConfig.uploadImage ? (r(), u("li", k1, [d("span", { onClick: t[1] || (t[1] = (...y) => e.actionChooseImage && e.actionChooseImage(...y)), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.custom_image ? (r(), u("li", { key: 3, name: "图片空间", onClick: t[2] || (t[2] = (y) => e.actionCustom("image-browse")) }, [d("span", x1, [b(n)])])) : w("", !0), e.toolConfig.custom_uploadImage ? (r(), u("li", S1, [d("span", { onClick: t[3] || (t[3] = (y) => e.actionCustom("image-upload")), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.custom_uploadFile ? (r(), u("li", V1, [d("span", { onClick: t[4] || (t[4] = (y) => e.actionCustom("file-upload")), class: "icon-svg" }, [b(c)])])) : w("", !0), N(d("li", _1, [d("span", { class: "iconfont icon-daoru", onClick: t[5] || (t[5] = (...y) => e.actionImportFile && e.actionImportFile(...y)) }), d("input", { type: "file", onChange: t[6] || (t[6] = (y) => e.actionImportFile(y)), accept: "text/markdown" }, null, 32)], 512), [[H, e.toolConfig.importmd]]), N(d("li", I1, [d("span", { class: "iconfont icon-download", onClick: t[7] || (t[7] = (...y) => e.actionExportFile && e.actionExportFile(...y)) })], 512), [[H, e.toolConfig.exportmd]]), t[72] || (t[72] = d("li", { class: "segmentation" }, [d("div")], -1)), e.toolConfig.code ? (r(), u("li", L1, [d("span", { onClick: t[8] || (t[8] = (...y) => e.insertCode && e.insertCode(...y)), class: "iconfont icon-code" })])) : w("", !0), e.toolConfig.theme ? (r(), u("li", D1, [d("span", { class: "iconfont icon-theme", onClick: t[9] || (t[9] = (y) => e.actionThemeDropdown = !e.actionThemeDropdown) }), d("ul", { class: z({ active: e.actionThemeDropdown }), onMouseleave: t[10] || (t[10] = (y) => e.actionThemeDropdown = !1) }, [(r(!0), u($, null, M(e.optionTheme, (y) => (r(), u("li", { onClick: (_) => e.actionThemesSet(y) }, L(y), 9, T1))), 256))], 34)])) : w("", !0), e.toolConfig.backgroundColor ? (r(), u("li", F1, [d("span", { class: "iconfont icon-theme", onClick: t[11] || (t[11] = (y) => e.actionBgColorDropdown = !e.actionBgColorDropdown) }), d("ul", { class: z({ active: e.actionBgColorDropdown }), onMouseleave: t[12] || (t[12] = (y) => e.actionBgColorDropdown = !1) }, [(r(), u($, null, M(["red", "black", "yellow", "lawngreen", "blue", "white"], (y) => d("li", { onClick: (_) => e.actionBgColorSet(y) }, L(y), 9, O1)), 64))], 34)])) : w("", !0), e.toolConfig.phrases ? (r(), u("li", $1, [d("span", { class: "iconfont icon-theme", onClick: t[13] || (t[13] = (y) => e.actionPhrasesDropdown = !e.actionPhrasesDropdown) }), d("ul", { class: z({ active: e.actionPhrasesDropdown }), onMouseleave: t[14] || (t[14] = (y) => e.actionPhrasesDropdown = !1) }, [(r(!0), u($, null, M(e.optionPhrases, (y) => (r(), u("li", { onClick: (_) => e.actionPhrasesSet(y) }, L(y), 9, N1))), 256))], 34)])) : w("", !0), e.toolConfig.html_to_markdown ? (r(), u("li", { key: 10, name: "html转markdown", onClick: t[15] || (t[15] = (y) => e.actionHtmlVisible(!0)) }, t[66] || (t[66] = [d("span", { style: { width: "auto", "font-size": "12px !important", padding: "0px 6px", margin: "0 10px", border: "1px #e2e2e2 solid" } }, " HTML2MD ", -1)]))) : w("", !0), e.toolConfig.disabled ? (r(), u("li", { key: 11, name: e.codemrrConfig.disabled ? "toggle disabled:开" : "toggle disabled:关" }, [N(d("span", { onClick: t[16] || (t[16] = (y) => e.codemrrConfig.disabled = !e.codemrrConfig.disabled), class: "iconfont icon-on" }, null, 512), [[H, e.codemrrConfig.disabled]]), N(d("span", { onClick: t[17] || (t[17] = (y) => e.codemrrConfig.disabled = !e.codemrrConfig.disabled), class: "iconfont icon-off" }, null, 512), [[H, !e.codemrrConfig.disabled]])], 8, M1)) : w("", !0), e.toolConfig.autofocus ? (r(), u("li", { key: 12, name: e.codemrrConfig.autofocus ? "toggle autofocus:开" : "toggle autofocus:关" }, [N(d("span", { onClick: t[18] || (t[18] = (y) => e.codemrrConfig.autofocus = !e.codemrrConfig.autofocus), class: "iconfont icon-on" }, null, 512), [[H, e.codemrrConfig.autofocus]]), N(d("span", { onClick: t[19] || (t[19] = (y) => e.codemrrConfig.autofocus = !e.codemrrConfig.autofocus), class: "iconfont icon-off" }, null, 512), [[H, !e.codemrrConfig.autofocus]])], 8, B1)) : w("", !0), e.toolConfig.indentWithTab ? (r(), u("li", { key: 13, name: e.codemrrConfig.indentWithTab ? "toggle indentWithTab:开" : "toggle indentWithTab:关" }, [N(d("span", { onClick: t[20] || (t[20] = (y) => e.codemrrConfig.indentWithTab = !e.codemrrConfig.indentWithTab), class: "iconfont icon-on" }, null, 512), [[H, e.codemrrConfig.indentWithTab]]), N(d("span", { onClick: t[21] || (t[21] = (y) => e.codemrrConfig.indentWithTab = !e.codemrrConfig.indentWithTab), class: "iconfont icon-off" }, null, 512), [[H, !e.codemrrConfig.indentWithTab]])], 8, E1)) : w("", !0), t[73] || (t[73] = d("li", { class: "empty" }, null, -1)), e.toolConfig.scrollSync ? (r(), u("li", { key: 14, name: e.actionScrollSync ? "同步滚动:开" : "同步滚动:关" }, [N(d("span", { onClick: t[22] || (t[22] = (y) => e.actionScrollSync = !e.actionScrollSync), class: "iconfont icon-on active" }, null, 512), [[H, e.actionScrollSync]]), N(d("span", { onClick: t[23] || (t[23] = (y) => e.actionScrollSync = !e.actionScrollSync), class: "iconfont icon-off" }, null, 512), [[H, !e.actionScrollSync]])], 8, z1)) : w("", !0), e.toolConfig.split && e.actionSplit ? (r(), u("li", A1, [d("span", { onClick: t[24] || (t[24] = (y) => e.actionSplit = !1), class: "iconfont icon-md" })])) : w("", !0), e.toolConfig.split && !e.actionSplit ? (r(), u("li", H1, [d("span", { onClick: t[25] || (t[25] = (y) => e.actionSplit = !0), class: "iconfont icon-group" })])) : w("", !0), e.toolConfig.preview ? (r(), u("li", P1, [d("span", { onClick: t[26] || (t[26] = (y) => e.actionPreview = !0), class: "iconfont icon-preview" })])) : w("", !0), e.toolConfig.copy || e.toolConfig.clear || e.toolConfig.save ? (r(), u("li", j1, t[67] || (t[67] = [d("div", null, null, -1)]))) : w("", !0), e.toolConfig.copy ? (r(), u("li", { key: 19, name: "复制", onClick: t[27] || (t[27] = (...y) => e.actionCopySet && e.actionCopySet(...y)) }, [d("span", R1, [b(p)])])) : w("", !0), e.toolConfig.clear ? (r(), u("li", { key: 20, name: "清空", onClick: t[28] || (t[28] = (y) => i.localVal = "") }, t[68] || (t[68] = [d("span", { class: "iconfont icon-clear" }, null, -1)]))) : w("", !0), e.toolConfig.save ? (r(), u("li", { key: 21, name: "保存", onClick: t[29] || (t[29] = (...y) => e.actionSaveSet && e.actionSaveSet(...y)) }, t[69] || (t[69] = [d("span", { class: "iconfont icon-save" }, null, -1)]))) : w("", !0), e.toolConfig.toc ? (r(), u("li", U1, t[70] || (t[70] = [d("div", null, null, -1)]))) : w("", !0), e.toolConfig.toc ? (r(), u("li", W1, [N(d("span", { onClick: t[30] || (t[30] = (y) => e.actionToc = !e.actionToc), class: "icon-svg active" }, [b(h)], 512), [[H, e.actionToc]]), N(d("span", { onClick: t[31] || (t[31] = (y) => e.actionToc = !e.actionToc), class: "icon-svg" }, [b(h)], 512), [[H, !e.actionToc]])])) : w("", !0), e.toolConfig.fullscreen ? (r(), u("li", Y1, t[71] || (t[71] = [d("div", null, null, -1)]))) : w("", !0), e.toolConfig.fullscreen ? (r(), u("li", { key: 25, name: e.actionFullscreen ? "退出全屏" : "全屏" }, [N(d("span", { onClick: t[32] || (t[32] = (y) => e.actionFullscreenSet(!1)), class: "iconfont icon-quite" }, null, 512), [[H, e.actionFullscreen]]), N(d("span", { onClick: t[33] || (t[33] = (y) => e.actionFullscreenSet(!0)), class: "iconfont icon-fullscreen" }, null, 512), [[H, !e.actionFullscreen]])], 8, X1)) : w("", !0)]), d("ul", q1, [e.toolConfig.undo ? (r(), u("li", K1, [d("span", { class: "iconfont icon-undo", onClick: t[34] || (t[34] = (...y) => e.actionUndo && e.actionUndo(...y)) })])) : w("", !0), e.toolConfig.redo ? (r(), u("li", { key: 1, name: "重做", onClick: t[35] || (t[35] = (...y) => e.actionRedo && e.actionRedo(...y)) }, t[74] || (t[74] = [d("span", { class: "iconfont icon-redo" }, null, -1)]))) : w("", !0), e.toolConfig.strong ? (r(), u("li", G1, [d("span", { onClick: t[36] || (t[36] = (...y) => e.actionInsStrong && e.actionInsStrong(...y)), class: "iconfont icon-bold" })])) : w("", !0), e.toolConfig.italic ? (r(), u("li", Z1, [d("span", { onClick: t[37] || (t[37] = (...y) => e.actionInsItalic && e.actionInsItalic(...y)), class: "iconfont icon-italic" })])) : w("", !0), e.toolConfig.overline ? (r(), u("li", Q1, [d("span", { onClick: t[38] || (t[38] = (...y) => e.actionInsOverline && e.actionInsOverline(...y)), class: "iconfont icon-overline" })])) : w("", !0), e.toolConfig.overline ? (r(), u("li", J1, [d("span", { onClick: t[39] || (t[39] = (...y) => e.actionInsUnderline && e.actionInsUnderline(...y)), class: "iconfont icon-under-line" })])) : w("", !0), e.toolConfig.h1 ? (r(), u("li", eg, [d("span", { style: { "font-size": "16px" }, onClick: t[40] || (t[40] = (y) => e.actionInsTitle(1)) }, "h1")])) : w("", !0), e.toolConfig.h2 ? (r(), u("li", tg, [d("span", { style: { "font-size": "16px" }, onClick: t[41] || (t[41] = (y) => e.actionInsTitle(2)) }, "h2")])) : w("", !0), e.toolConfig.h3 ? (r(), u("li", og, [d("span", { style: { "font-size": "16px" }, onClick: t[42] || (t[42] = (y) => e.actionInsTitle(3)) }, "h3")])) : w("", !0), e.toolConfig.h4 ? (r(), u("li", ig, [d("span", { style: { "font-size": "16px" }, onClick: t[43] || (t[43] = (y) => e.actionInsTitle(4)) }, "h4")])) : w("", !0), e.toolConfig.h5 ? (r(), u("li", ag, [d("span", { style: { "font-size": "16px" }, onClick: t[44] || (t[44] = (y) => e.actionInsTitle(5)) }, "h5")])) : w("", !0), e.toolConfig.h6 ? (r(), u("li", lg, [d("span", { style: { "font-size": "16px" }, onClick: t[45] || (t[45] = (y) => e.actionInsTitle(6)) }, "h6")])) : w("", !0), e.toolConfig.hr ? (r(), u("li", ng, [d("span", { onClick: t[46] || (t[46] = (...y) => e.actionInsLine && e.actionInsLine(...y)), class: "iconfont icon-horizontal" })])) : w("", !0), e.toolConfig.quote ? (r(), u("li", sg, [d("span", { style: { "font-size": "16px" }, onClick: t[47] || (t[47] = (...y) => e.actionInsQuote && e.actionInsQuote(...y)), class: "iconfont icon-quote" })])) : w("", !0), e.toolConfig.ul ? (r(), u("li", rg, [d("span", { onClick: t[48] || (t[48] = (...y) => e.actionInsUl && e.actionInsUl(...y)), class: "iconfont icon-ul" })])) : w("", !0), e.toolConfig.ol ? (r(), u("li", cg, [d("span", { onClick: t[49] || (t[49] = (...y) => e.actionInsOl && e.actionInsOl(...y)), class: "iconfont icon-ol" })])) : w("", !0), e.toolConfig.notChecked ? (r(), u("li", dg, [d("span", { onClick: t[50] || (t[50] = (...y) => e.insertNotFinished && e.insertNotFinished(...y)), class: "iconfont icon-checked-false" })])) : w("", !0), e.toolConfig.checked ? (r(), u("li", hg, [d("span", { onClick: t[51] || (t[51] = (...y) => e.insertFinished && e.insertFinished(...y)), class: "iconfont icon-checked" })])) : w("", !0), e.toolConfig.link ? (r(), u("li", pg, [d("span", { onClick: t[52] || (t[52] = (...y) => e.actionInsLink && e.actionInsLink(...y)), class: "iconfont icon-link" })])) : w("", !0), e.toolConfig.table ? (r(), u("li", ug, [d("span", { onClick: t[53] || (t[53] = (...y) => e.actionInsTable && e.actionInsTable(...y)), class: "iconfont icon-table" })])) : w("", !0)])])), d("div", { title: "编辑器", class: "cv-editor-markdown-main", style: A({ background: e.actionPreview ? "#fff" : "" }) }, [N(b(m, O(e.codemrrBind, { id: e.editorRefID, ref: e.editorRefID, style: { height: i.heightMainPx, backgroundColor: e.codemrrConfig.backgroundColor }, extensions: e.extensions, modelValue: i.localVal, "onUpdate:modelValue": t[54] || (t[54] = (y) => i.localVal = y), onReady: a.initEditorReady, onChange: t[55] || (t[55] = (y) => a.consoleLog("change", y)), onFocus: t[56] || (t[56] = (y) => a.consoleLog("focus", y)), onBlur: t[57] || (t[57] = (y) => a.consoleLog("blur", y)), onMouseenter: t[58] || (t[58] = (y) => a.mousescrollSide("left")) }), null, 16, ["id", "style", "extensions", "modelValue", "onReady"]), [[H, !e.actionPreview]]), N(b(f, { html: i.lastHtml, "onUpdate:html": t[59] || (t[59] = (y) => i.lastHtml = y), ref: a.previewRefID, editorID: a.previewRefID, modelValue: i.localVal, theme: e.codemrrConfig.theme || o.theme, language: o.language, tocShow: e.actionToc, style: A([{ flex: "1", height: "100%", "border-left": "1px solid #dedede", "overflow-y": "auto" }, { height: e.actionPreview ? "" : i.heightMainPx }]), onMouseenter: t[60] || (t[60] = (y) => a.mousescrollSide("right")) }, null, 8, ["html", "editorID", "modelValue", "theme", "language", "tocShow", "style"]), [[H, e.actionPreview ? e.actionPreview : e.actionSplit]])], 4), N(d("div", { title: "关闭预览按钮", class: "close-preview", onClick: t[61] || (t[61] = (y) => e.actionPreview = !1) }, t[75] || (t[75] = [d("span", { class: "iconfont icon-close" }, null, -1)]), 512), [[H, e.actionPreview]]), b(x, { modelValue: e.actionHtmlDiaVisible, "onUpdate:modelValue": t[64] || (t[64] = (y) => e.actionHtmlDiaVisible = y), title: "html转markdown", width: "680", "show-close": !1, "append-to-body": "" }, { footer: v(() => [b(k, { onClick: t[63] || (t[63] = (y) => e.actionHtmlVisible(!1)) }, { default: v(() => t[76] || (t[76] = [F("取消")])), _: 1, __: [76] }), b(k, { type: "primary", onClick: e.actionHtmlToMD }, { default: v(() => t[77] || (t[77] = [F("转换成markdown")])), _: 1, __: [77] }, 8, ["onClick"])]), default: v(() => [b(g, { type: "textarea", modelValue: e.actionHtmlText, "onUpdate:modelValue": t[62] || (t[62] = (y) => e.actionHtmlText = y), rows: 14, placeholder: "请输入html代码..." }, null, 8, ["modelValue"])]), _: 1 }, 8, ["modelValue"])], 6);
|
|
3568
|
+
}], ["__scopeId", "data-v-a76ecd6a"]]), Je = { add(e, t) {
|
|
3574
3569
|
const o = `toc${t}${++this.index}`, l = { anchor: o, level: t, text: e }, i = this.tocItems;
|
|
3575
3570
|
return l.level <= 5 && i.push(l), o;
|
|
3576
3571
|
}, reset: function() {
|
|
3577
3572
|
this.tocItems = [], this.index = 0;
|
|
3578
3573
|
}, tocItems: [], index: 0 };
|
|
3579
|
-
function
|
|
3574
|
+
function ml(e) {
|
|
3580
3575
|
return (t) => {
|
|
3581
3576
|
typeof t == "string" && t !== e.text && (e.escaped = !0, e.text = t);
|
|
3582
3577
|
};
|
|
3583
3578
|
}
|
|
3584
|
-
const
|
|
3585
|
-
function
|
|
3579
|
+
const Rl = /[&<>"']/, mg = new RegExp(Rl.source, "g"), Ul = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, gg = new RegExp(Ul.source, "g"), fg = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, gl = (e) => fg[e];
|
|
3580
|
+
function fl(e, t) {
|
|
3586
3581
|
if (t) {
|
|
3587
|
-
if (
|
|
3588
|
-
} else if (
|
|
3582
|
+
if (Rl.test(e)) return e.replace(mg, gl);
|
|
3583
|
+
} else if (Ul.test(e)) return e.replace(gg, gl);
|
|
3589
3584
|
return e;
|
|
3590
3585
|
}
|
|
3591
|
-
const
|
|
3586
|
+
const vg = { name: "cvMarkdownShow", mixins: [Me], emits: ["update:html", "on-copy"], props: { html: { type: [String] }, modelValue: { type: [String], default: "" }, markedOptions: { type: Object, default: () => ({}) }, theme: { type: String, default: "light" }, language: { type: String, default: "" }, copyCode: { type: Boolean, default: !0 }, copyBtnText: { type: String, default: "复制代码" }, tocShow: { type: [Boolean], default: !1 } }, watch: { modelValue(e) {
|
|
3592
3587
|
this.localVal = e || "", this.initNewCreate();
|
|
3593
3588
|
}, localHtml(e) {
|
|
3594
3589
|
this.$emit("update:html", e);
|
|
3595
3590
|
} }, data: () => ({ localVal: "", localHtml: "", previewImgModal: !1, previewImgSrc: "", previewImgMode: "", timeoutId: null, imgs: [], tocTrigger: !1, tocAction: "", tocLists: [] }), created() {
|
|
3596
3591
|
this.localVal = this.modelValue || "";
|
|
3597
3592
|
}, async mounted() {
|
|
3598
|
-
|
|
3593
|
+
Je.reset(), await function(e, t = !1) {
|
|
3599
3594
|
let o = document.createElement("link");
|
|
3600
3595
|
o.setAttribute("rel", "stylesheet"), o.setAttribute("type", "text/css"), o.setAttribute("id", e), t ? o.setAttribute("href", e + "?t=" + (/* @__PURE__ */ new Date()).getTime()) : o.setAttribute("href", e), document.getElementById(e) || document.head.appendChild(o);
|
|
3601
|
-
}(this.CDN_URL_UI + "/highlight.js/@11.8.0/styles/default.min.css"), await
|
|
3596
|
+
}(this.CDN_URL_UI + "/highlight.js/@11.8.0/styles/default.min.css"), await _e(this.CDN_URL_UI + "/highlight.js/@11.8.0/highlight.min.js").then(() => {
|
|
3602
3597
|
setTimeout(() => {
|
|
3603
3598
|
hljs.highlightAll(), this.initNewCreate();
|
|
3604
3599
|
}, 30);
|
|
3605
3600
|
});
|
|
3606
3601
|
}, methods: { async initNewCreate() {
|
|
3607
3602
|
const { Marked: e, Renderer: t } = await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");
|
|
3608
|
-
t.prototype.heading = function(i, a, n,
|
|
3609
|
-
let p =
|
|
3603
|
+
t.prototype.heading = function(i, a, n, c) {
|
|
3604
|
+
let p = Je.add(i, a);
|
|
3610
3605
|
return `<h${a} id="${n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g, "-")}" toc-id="${p}">${i}</h${a}>`;
|
|
3611
3606
|
};
|
|
3612
3607
|
const o = new e(function(i) {
|
|
@@ -3616,13 +3611,13 @@ const yg = { name: "cvMarkdownShow", mixins: [Be], emits: ["update:html", "on-co
|
|
|
3616
3611
|
const n = function(p) {
|
|
3617
3612
|
return (p.lang || "").match(/\S*/)[0];
|
|
3618
3613
|
}(a);
|
|
3619
|
-
if (i.async) return Promise.resolve(i.highlight(a.text, n)).then(
|
|
3620
|
-
const
|
|
3621
|
-
if (
|
|
3622
|
-
|
|
3623
|
-
}, renderer: { code(a, n,
|
|
3624
|
-
const p = (n || "").match(/\S*/)[0], h = p ? ` class="${i.langPrefix}${
|
|
3625
|
-
return a = a.replace(/\n$/, ""), `<pre><code${h}>${
|
|
3614
|
+
if (i.async) return Promise.resolve(i.highlight(a.text, n)).then(ml(a));
|
|
3615
|
+
const c = i.highlight(a.text, n);
|
|
3616
|
+
if (c instanceof Promise) throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");
|
|
3617
|
+
ml(a)(c);
|
|
3618
|
+
}, renderer: { code(a, n, c) {
|
|
3619
|
+
const p = (n || "").match(/\S*/)[0], h = p ? ` class="${i.langPrefix}${fl(p)}"` : "";
|
|
3620
|
+
return a = a.replace(/\n$/, ""), `<pre><code${h}>${c ? a : fl(a, !0)}
|
|
3626
3621
|
</code></pre>`;
|
|
3627
3622
|
} } };
|
|
3628
3623
|
}({ langPrefix: "hljs language-", highlight(i, a) {
|
|
@@ -3631,7 +3626,7 @@ const yg = { name: "cvMarkdownShow", mixins: [Be], emits: ["update:html", "on-co
|
|
|
3631
3626
|
} }));
|
|
3632
3627
|
o.use({ gfm: !0, tables: !0, breaks: !1, pedantic: !1, smartLists: !0 });
|
|
3633
3628
|
let l = o.parse(this.localVal, { sanitize: !1, ...this.markedOptions });
|
|
3634
|
-
l = l.replace(/href="/gi, 'target="_blank" href="'), this.copyCode && (l = l.replace(/<pre>/g, '<div class="code-block"><span class="copy-code">' + this.copyBtnText + "</span><pre>").replace(/<\/pre>/g, "</pre></div>")), /\[\[TOC\]\]/.test(l) && (l = l.replace(/\[\[TOC\]\]/g, '<ul class="toc-anchor"></ul>')), this.localHtml = l, this.tocLists =
|
|
3629
|
+
l = l.replace(/href="/gi, 'target="_blank" href="'), this.copyCode && (l = l.replace(/<pre>/g, '<div class="code-block"><span class="copy-code">' + this.copyBtnText + "</span><pre>").replace(/<\/pre>/g, "</pre></div>")), /\[\[TOC\]\]/.test(l) && (l = l.replace(/\[\[TOC\]\]/g, '<ul class="toc-anchor"></ul>')), this.localHtml = l, this.tocLists = Je.tocItems, this.tocTrigger, Je.reset(), this.addCopyListener(), this.addImageClickListener();
|
|
3635
3630
|
}, addCopyListener() {
|
|
3636
3631
|
setTimeout(() => {
|
|
3637
3632
|
const e = document.querySelectorAll(".code-block .copy-code");
|
|
@@ -3680,10 +3675,10 @@ const yg = { name: "cvMarkdownShow", mixins: [Be], emits: ["update:html", "on-co
|
|
|
3680
3675
|
return t === void 0 && (t = this.tocLists), t.forEach(({ level: l }) => {
|
|
3681
3676
|
o = Math.min(o, l);
|
|
3682
3677
|
}), o === 9999 ? e : e - (o - 1);
|
|
3683
|
-
} } },
|
|
3678
|
+
} } }, yg = ["id"], bg = ["innerHTML"], Cg = { class: "toc-anchor" }, wg = ["anchor", "onClick"], kg = ["anchor", "title"], xg = ["src"], No = V(vg, [["render", function(e, t, o, l, i, a) {
|
|
3684
3679
|
const n = C("cv-icons");
|
|
3685
|
-
return
|
|
3686
|
-
}]]),
|
|
3680
|
+
return r(), u("div", { class: "cv-markdown-preview", id: e.editorRefID, ref: e.editorRefID, style: A([o.tocShow ? "display:flex;" : ""]) }, [e.$slots.default ? D(e.$slots, "default", { key: 0 }, () => [F(L(i.localHtml), 1)]) : w("", !0), d("div", { class: z("markdown-preview markdown-theme-base " + ("markdown-theme-" + o.theme)), onScroll: t[0] || (t[0] = (...c) => a.handleScroll && a.handleScroll(...c)), innerHTML: i.localHtml }, null, 42, bg), N(d("ul", Cg, [(r(!0), u($, null, M(i.tocLists, (c) => (r(), u("li", { class: "toc-anchor-item", anchor: c.anchor, key: c.anchor, onClick: (p) => a.tocClick(c) }, [d("span", { class: z(`toc-link-${a.tocLevel(c.level)}${i.tocAction == c.anchor ? " toc-link-action" : ""}`), anchor: c.anchor, title: c.text }, L(c.text), 11, kg)], 8, wg))), 128))], 512), [[H, o.tocShow]]), d("div", { class: z(["preview-img", i.previewImgModal ? "active" : ""]) }, [b(n, { type: "ElIconClose", onClick: t[1] || (t[1] = (c) => i.previewImgModal = !1) }), d("img", { src: i.previewImgSrc, class: z([i.previewImgMode]), alt: "" }, null, 10, xg)], 2)], 12, yg);
|
|
3681
|
+
}]]), Sg = { name: "cvMarkdownSimple", mixins: [Me, Hi, { methods: { toggleSlideDown() {
|
|
3687
3682
|
this.slideDown = !this.slideDown;
|
|
3688
3683
|
}, actionThemesSet(e) {
|
|
3689
3684
|
this.codemrrConfig.theme = e, this.actionThemeDropdown = !1, this.$emit("on-act-theme", e);
|
|
@@ -3757,7 +3752,7 @@ row 2 col 1 | row 2 col 2
|
|
|
3757
3752
|
}, l.onerror = (i) => {
|
|
3758
3753
|
};
|
|
3759
3754
|
}, actionExportFile() {
|
|
3760
|
-
|
|
3755
|
+
jl(this.localVal, this.lastExpFileName + ".md");
|
|
3761
3756
|
}, insertCode() {
|
|
3762
3757
|
const e = this.getCursortPosition(), t = this.localVal.substring(e - 1, e);
|
|
3763
3758
|
this.insertContent("\n```\n\n```"), t !== `
|
|
@@ -3861,9 +3856,9 @@ row 2 col 1 | row 2 col 2
|
|
|
3861
3856
|
}
|
|
3862
3857
|
}, mousescrollSide(e) {
|
|
3863
3858
|
this.scroll = e;
|
|
3864
|
-
} } },
|
|
3865
|
-
return
|
|
3866
|
-
}], ["__scopeId", "data-v-36211c6f"]]),
|
|
3859
|
+
} } }, Vg = { key: 0, title: "头部工具栏" }, _g = { class: "cv-editor-toolbars" }, Ig = { key: 0, name: "粗体" }, Lg = { key: 1, name: "斜体" }, Dg = { key: 2, name: "删除线" }, Tg = { key: 3, name: "下划线" }, Fg = { key: 4, name: "标题1" }, Og = { key: 5, name: "标题2" }, $g = { key: 6, name: "标题3" }, Ng = { key: 7, name: "标题4" }, Mg = { key: 8, name: "标题5" }, Bg = { key: 9, name: "标题6" }, Eg = { key: 10, name: "分割线" }, zg = { key: 11, name: "引用" }, Ag = { key: 12, name: "无序列表" }, Hg = { key: 13, name: "有序列表" }, Pg = { key: 14, name: "未完成列表" }, jg = { key: 15, name: "已完成列表" }, Rg = { key: 16, name: "链接" }, Ug = { key: 17, name: "表格" }, Wg = ["name"], Yg = { key: 19, name: "全屏编辑" }, Xg = { key: 20, name: "分屏显示" }, qg = { key: 21, name: "预览" }, Kg = { class: "cv-editor-toolbars" }, Gg = { key: 0, name: "图片" }, Zg = { key: 1, name: "本地图片" }, Qg = { key: 2, name: "图片空间" }, Jg = { key: 3, name: "上传图片" }, e0 = { key: 4, name: "上传文件" }, t0 = { key: 5, class: "shift-theme", name: "代码块主题" }, o0 = { name: "导入文件", class: "import-file" }, i0 = { name: "保存到本地" }, a0 = { key: 6, name: "全屏" }, l0 = { key: 7, name: "退出全屏" }, n0 = ["innerHTML"], Mo = V(Sg, [["render", function(e, t, o, l, i, a) {
|
|
3860
|
+
return r(), u("div", { class: z(`markdown ${i.fullscreen ? "fullscreen" : ""} ${o.bordered ? "border" : ""}`), ref: "markdown", style: A({ width: o.width + (typeof o.width == "string" ? "" : "px"), height: o.height + (typeof o.height == "string" ? "" : "px") }) }, [e.actionPreview ? w("", !0) : (r(), u("div", Vg, [d("ul", _g, [d("li", null, [D(e.$slots, "title", {}, void 0, !0)]), e.toolConfig.strong ? (r(), u("li", Ig, [d("span", { onClick: t[0] || (t[0] = (...n) => e.actionInsStrong && e.actionInsStrong(...n)), class: "iconfont icon-bold" })])) : w("", !0), e.toolConfig.italic ? (r(), u("li", Lg, [d("span", { onClick: t[1] || (t[1] = (...n) => e.actionInsItalic && e.actionInsItalic(...n)), class: "iconfont icon-italic" })])) : w("", !0), e.toolConfig.overline ? (r(), u("li", Dg, [d("span", { onClick: t[2] || (t[2] = (...n) => e.actionInsOverline && e.actionInsOverline(...n)), class: "iconfont icon-overline" })])) : w("", !0), e.toolConfig.overline ? (r(), u("li", Tg, [d("span", { onClick: t[3] || (t[3] = (...n) => e.actionInsUnderline && e.actionInsUnderline(...n)), class: "iconfont icon-under-line" })])) : w("", !0), e.toolConfig.h1 ? (r(), u("li", Fg, [d("span", { style: { "font-size": "16px" }, onClick: t[4] || (t[4] = (n) => e.actionInsTitle(1)) }, "h1")])) : w("", !0), e.toolConfig.h2 ? (r(), u("li", Og, [d("span", { style: { "font-size": "16px" }, onClick: t[5] || (t[5] = (n) => e.actionInsTitle(2)) }, "h2")])) : w("", !0), e.toolConfig.h3 ? (r(), u("li", $g, [d("span", { style: { "font-size": "16px" }, onClick: t[6] || (t[6] = (n) => e.actionInsTitle(3)) }, "h3")])) : w("", !0), e.toolConfig.h4 ? (r(), u("li", Ng, [d("span", { style: { "font-size": "16px" }, onClick: t[7] || (t[7] = (n) => e.actionInsTitle(4)) }, "h4")])) : w("", !0), e.toolConfig.h5 ? (r(), u("li", Mg, [d("span", { style: { "font-size": "16px" }, onClick: t[8] || (t[8] = (n) => e.actionInsTitle(5)) }, "h5")])) : w("", !0), e.toolConfig.h6 ? (r(), u("li", Bg, [d("span", { style: { "font-size": "16px" }, onClick: t[9] || (t[9] = (n) => e.actionInsTitle(6)) }, "h6")])) : w("", !0), e.toolConfig.hr ? (r(), u("li", Eg, [d("span", { onClick: t[10] || (t[10] = (...n) => e.actionInsLine && e.actionInsLine(...n)), class: "iconfont icon-horizontal" })])) : w("", !0), e.toolConfig.quote ? (r(), u("li", zg, [d("span", { style: { "font-size": "16px" }, onClick: t[11] || (t[11] = (...n) => e.actionInsQuote && e.actionInsQuote(...n)), class: "iconfont icon-quote" })])) : w("", !0), e.toolConfig.ul ? (r(), u("li", Ag, [d("span", { onClick: t[12] || (t[12] = (...n) => e.actionInsUl && e.actionInsUl(...n)), class: "iconfont icon-ul" })])) : w("", !0), e.toolConfig.ol ? (r(), u("li", Hg, [d("span", { onClick: t[13] || (t[13] = (...n) => e.actionInsOl && e.actionInsOl(...n)), class: "iconfont icon-ol" })])) : w("", !0), e.toolConfig.notChecked ? (r(), u("li", Pg, [d("span", { onClick: t[14] || (t[14] = (...n) => e.insertNotFinished && e.insertNotFinished(...n)), class: "iconfont icon-checked-false" })])) : w("", !0), e.toolConfig.checked ? (r(), u("li", jg, [d("span", { onClick: t[15] || (t[15] = (...n) => e.insertFinished && e.insertFinished(...n)), class: "iconfont icon-checked" })])) : w("", !0), e.toolConfig.link ? (r(), u("li", Rg, [d("span", { onClick: t[16] || (t[16] = (...n) => e.actionInsLink && e.actionInsLink(...n)), class: "iconfont icon-link" })])) : w("", !0), e.toolConfig.table ? (r(), u("li", Ug, [d("span", { onClick: t[17] || (t[17] = (...n) => e.actionInsTable && e.actionInsTable(...n)), class: "iconfont icon-table" })])) : w("", !0), t[53] || (t[53] = d("li", { class: "empty" }, null, -1)), e.toolConfig.scrollSync ? (r(), u("li", { key: 18, name: e.actionScrollSync ? "同步滚动:开" : "同步滚动:关" }, [N(d("span", { onClick: t[18] || (t[18] = (n) => e.actionScrollSync = !e.actionScrollSync), class: "iconfont icon-on" }, null, 512), [[H, e.actionScrollSync]]), N(d("span", { onClick: t[19] || (t[19] = (n) => e.actionScrollSync = !e.actionScrollSync), class: "iconfont icon-off" }, null, 512), [[H, !e.actionScrollSync]])], 8, Wg)) : w("", !0), e.toolConfig.split && e.actionSplit ? (r(), u("li", Yg, [d("span", { onClick: t[20] || (t[20] = (n) => e.actionSplit = !1), class: "iconfont icon-md" })])) : w("", !0), e.toolConfig.split && !e.actionSplit ? (r(), u("li", Xg, [d("span", { onClick: t[21] || (t[21] = (n) => e.actionSplit = !0), class: "iconfont icon-group" })])) : w("", !0), e.toolConfig.preview ? (r(), u("li", qg, [d("span", { onClick: t[22] || (t[22] = (n) => e.actionPreview = !0), class: "iconfont icon-preview" })])) : w("", !0), e.toolConfig.clear ? (r(), u("li", { key: 22, name: "清空", onClick: t[23] || (t[23] = (n) => i.localVal = "") }, t[51] || (t[51] = [d("span", { class: "iconfont icon-clear" }, null, -1)]))) : w("", !0), e.toolConfig.save ? (r(), u("li", { key: 23, name: "保存", onClick: t[24] || (t[24] = (...n) => e.actionSaveSet && e.actionSaveSet(...n)) }, t[52] || (t[52] = [d("span", { class: "iconfont icon-save" }, null, -1)]))) : w("", !0)]), d("ul", Kg, [e.toolConfig.image ? (r(), u("li", Gg, [d("span", { onClick: t[25] || (t[25] = (...n) => e.actionInsImage && e.actionInsImage(...n)), class: "iconfont icon-img" })])) : w("", !0), e.toolConfig.uploadImage ? (r(), u("li", Zg, [d("span", { onClick: t[26] || (t[26] = (...n) => e.actionChooseImage && e.actionChooseImage(...n)), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.custom_image ? (r(), u("li", Qg, [d("span", { onClick: t[27] || (t[27] = (...n) => e.custom_actionInsImage && e.custom_actionInsImage(...n)), class: "iconfont icon-img" })])) : w("", !0), e.toolConfig.custom_uploadImage ? (r(), u("li", Jg, [d("span", { onClick: t[28] || (t[28] = (...n) => e.custom_chooseImage && e.custom_chooseImage(...n)), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.custom_uploadFile ? (r(), u("li", e0, [d("span", { onClick: t[29] || (t[29] = (...n) => e.custom_chooseFile && e.custom_chooseFile(...n)), class: "iconfont icon-upload-img" })])) : w("", !0), e.toolConfig.theme ? (r(), u("li", t0, [d("div", null, [d("span", { class: "iconfont icon-theme", onClick: t[30] || (t[30] = (n) => i.themeSlideDown = !i.themeSlideDown) }), d("ul", { class: z({ active: i.themeSlideDown }), onMouseleave: t[35] || (t[35] = (n) => i.themeSlideDown = !1) }, [d("li", { onClick: t[31] || (t[31] = (n) => e.setThemes("light")) }, "Light"), d("li", { onClick: t[32] || (t[32] = (n) => e.setThemes("dark")) }, "VS Code"), d("li", { onClick: t[33] || (t[33] = (n) => e.setThemes("oneDark")) }, "Atom OneDark"), d("li", { onClick: t[34] || (t[34] = (n) => e.setThemes("gitHub")) }, "GitHub")], 34)])])) : w("", !0), N(d("li", o0, [d("span", { class: "iconfont icon-daoru", onClick: t[36] || (t[36] = (...n) => e.actionImportFile && e.actionImportFile(...n)) }), d("input", { type: "file", onChange: t[37] || (t[37] = (n) => e.actionImportFile(n)), accept: "text/markdown" }, null, 32)], 512), [[H, e.toolConfig.importmd]]), N(d("li", i0, [d("span", { class: "iconfont icon-download", onClick: t[38] || (t[38] = (...n) => e.actionExportFile && e.actionExportFile(...n)) })], 512), [[H, e.toolConfig.exportmd]]), t[54] || (t[54] = d("li", { class: "empty" }, null, -1)), e.toolConfig.fullscreen && !i.fullscreen ? (r(), u("li", a0, [d("span", { onClick: t[39] || (t[39] = (n) => i.fullscreen = !i.fullscreen), class: "iconfont icon-fullscreen" })])) : w("", !0), e.toolConfig.fullscreen && i.fullscreen ? (r(), u("li", l0, [d("span", { onClick: t[40] || (t[40] = (n) => i.fullscreen = !i.fullscreen), class: "iconfont icon-quite" })])) : w("", !0)])])), N(d("div", { title: "关闭预览按钮", class: "close-preview", onClick: t[41] || (t[41] = (n) => e.actionPreview = !1) }, t[55] || (t[55] = [d("span", { class: "iconfont icon-close" }, null, -1)]), 512), [[H, e.actionPreview]]), d("div", { title: "编辑器", class: "cv-editor-markdown-main", style: A({ background: e.actionPreview ? "#fff" : "" }) }, [N(d("div", { class: "markdown-editor", ref: "markdownEditor", onScroll: t[47] || (t[47] = (...n) => a.markdownScroll && a.markdownScroll(...n)), onMouseenter: t[48] || (t[48] = (n) => a.mousescrollSide("markdown")) }, [d("ul", { class: "index", ref: "index", style: A({ height: i.textareaHeight ? `${i.textareaHeight}px` : "100%" }) }, [(r(!0), u($, null, M(i.indexLenth, (n) => (r(), u("li", { key: n }, L(n), 1))), 128))], 4), N(d("textarea", { "onUpdate:modelValue": t[42] || (t[42] = (n) => i.localVal = n), ref: "textarea", onKeydown: t[43] || (t[43] = $e((...n) => a.tab && a.tab(...n), ["tab"])), onKeyup: [t[44] || (t[44] = $e((...n) => a.enter && a.enter(...n), ["enter"])), t[45] || (t[45] = $e((...n) => a.onDelete && a.onDelete(...n), ["delete"]))], onMouseenter: t[46] || (t[46] = (n) => a.mousescrollSide("left")), style: A({ height: i.textareaHeight ? `${i.textareaHeight}px` : "100%" }) }, null, 36), [[Vn, i.localVal]])], 544), [[H, !e.preview]]), N(d("div", { class: z("markdown-preview " + ("markdown-theme-" + e.codemrrConfig.theme)), ref: "preview", onScroll: t[49] || (t[49] = (...n) => a.previewScroll && a.previewScroll(...n)), onMouseenter: t[50] || (t[50] = (n) => a.mousescrollSide("right")) }, [d("div", { innerHTML: i.html, ref: "previewInner" }, null, 8, n0)], 34), [[H, e.preview ? e.preview : e.split]])], 4)], 6);
|
|
3861
|
+
}], ["__scopeId", "data-v-36211c6f"]]), s0 = ["innerHTML"], Bo = V({ name: "cvMarkdownNostyle", props: { modelValue: { type: String, default: "" }, initValue: { type: String, default: "" } }, data: () => ({ localHtml: "", localVal: "" }), watch: { initValue() {
|
|
3867
3862
|
this.initNewCreate();
|
|
3868
3863
|
} }, created() {
|
|
3869
3864
|
this.localVal = this.initValue || "";
|
|
@@ -3874,29 +3869,29 @@ row 2 col 1 | row 2 col 2
|
|
|
3874
3869
|
let o = new e().parser(this.localVal, { sanitize: !1 });
|
|
3875
3870
|
o = o.replace(/href="/gi, 'target="_blank" href="'), this.localHtml = o;
|
|
3876
3871
|
} } }, [["render", function(e, t, o, l, i, a) {
|
|
3877
|
-
return
|
|
3872
|
+
return r(), u("div", { class: "markdown-preview-nostyle", innerHTML: i.localHtml }, null, 8, s0);
|
|
3878
3873
|
}]]);
|
|
3879
|
-
function
|
|
3874
|
+
function Li(e) {
|
|
3880
3875
|
return { text: "按钮", clickFn: null, type: "default", isHide: !1, order: 2, ...e };
|
|
3881
3876
|
}
|
|
3882
|
-
|
|
3877
|
+
$o.install = function(e) {
|
|
3878
|
+
e.component($o.name, $o);
|
|
3879
|
+
}, No.install = function(e) {
|
|
3883
3880
|
e.component(No.name, No);
|
|
3884
3881
|
}, Mo.install = function(e) {
|
|
3885
3882
|
e.component(Mo.name, Mo);
|
|
3886
3883
|
}, Bo.install = function(e) {
|
|
3887
3884
|
e.component(Bo.name, Bo);
|
|
3888
|
-
},
|
|
3889
|
-
e.component(
|
|
3885
|
+
}, To.install = function(e) {
|
|
3886
|
+
e.component(To.name, To);
|
|
3890
3887
|
}, Fo.install = function(e) {
|
|
3891
3888
|
e.component(Fo.name, Fo);
|
|
3892
3889
|
}, Oo.install = function(e) {
|
|
3893
3890
|
e.component(Oo.name, Oo);
|
|
3894
|
-
}, $o.install = function(e) {
|
|
3895
|
-
e.component($o.name, $o);
|
|
3896
3891
|
};
|
|
3897
|
-
class
|
|
3892
|
+
class r0 {
|
|
3898
3893
|
constructor(t, o) {
|
|
3899
|
-
this.WinVue = t, this.vmCompObj = null, this.vmComponent = null, this.vmApp = null, this.dialogObj = null, this.boxShow =
|
|
3894
|
+
this.WinVue = t, this.vmCompObj = null, this.vmComponent = null, this.vmApp = null, this.dialogObj = null, this.boxShow = B(!1), this.boxProps = B({}), this.boxOptions = ke({ closeIsConfirm: !1, closeIsDestroy: !0, width: "40%", title: "默认标题" }, o.diyOpts), this.boxProps.value = Ll(this.boxOptions, ["closeIsConfirm", "closeIsDestroy"]), this.bodyComponent = o.component || "", this.bodyOptions = ke({}, o.props), this.bodyFunc = ke({}, o.onFunc);
|
|
3900
3895
|
for (const l in this.bodyFunc) if (this.bodyFunc.hasOwnProperty(l) && !l.startsWith("on")) {
|
|
3901
3896
|
const i = "on" + l.charAt(0).toUpperCase() + l.slice(1);
|
|
3902
3897
|
this.bodyFunc[i] = this.bodyFunc[l], delete this.bodyFunc[l];
|
|
@@ -3917,20 +3912,20 @@ class c0 {
|
|
|
3917
3912
|
const a = b(t.bodyComponent, { ...t.bodyOptions, ref: "inner", onSetTitle(m) {
|
|
3918
3913
|
t.boxProps.value.title = m;
|
|
3919
3914
|
}, onClose: () => t.close(), ...t.bodyFunc }, { default: () => "" });
|
|
3920
|
-
let n = { ok:
|
|
3915
|
+
let n = { ok: Li({ text: "确定", type: "primary", order: 0 }), cancel: Li({ text: "取消", order: 1 }) };
|
|
3921
3916
|
Object.entries(n).forEach(([m, f]) => {
|
|
3922
3917
|
if (["ok", "cancel"].includes(m)) {
|
|
3923
3918
|
const g = m === "ok" ? t.defaultFunc.onOK : t.defaultFunc.onCancel;
|
|
3924
3919
|
f.clickFn = f.clickFn || g;
|
|
3925
|
-
} else n[m] =
|
|
3920
|
+
} else n[m] = Li(f);
|
|
3926
3921
|
});
|
|
3927
|
-
const
|
|
3928
|
-
b("div", {},
|
|
3922
|
+
const c = Object.values(n).filter((m) => !m.isHide);
|
|
3923
|
+
b("div", {}, c.map((m) => b(Ne, { type: m.type, onClick: m.clickFn }, m.text)));
|
|
3929
3924
|
const p = function(m) {
|
|
3930
3925
|
t.close();
|
|
3931
3926
|
}, h = typeof t.boxOptions.beforeClose == "function" ? t.boxOptions.beforeClose : p;
|
|
3932
|
-
return b(
|
|
3933
|
-
t.boxOptions.closeIsConfirm ?
|
|
3927
|
+
return b(pn, { ...t.boxProps.value, modelValue: t.boxShow.value, beforeClose: (m) => {
|
|
3928
|
+
t.boxOptions.closeIsConfirm ? Fi.confirm("确认关闭?", "提示").then((f) => {
|
|
3934
3929
|
h(p);
|
|
3935
3930
|
}).catch((f) => {
|
|
3936
3931
|
p();
|
|
@@ -3943,10 +3938,10 @@ class c0 {
|
|
|
3943
3938
|
const l = document.createElement("div");
|
|
3944
3939
|
document.body.appendChild(l), this.vmTargetElement = l;
|
|
3945
3940
|
const i = b(o);
|
|
3946
|
-
i.appContext = this.WinVue._context,
|
|
3941
|
+
i.appContext = this.WinVue._context, zo(i, this.vmTargetElement), this.vmApp = i;
|
|
3947
3942
|
}
|
|
3948
3943
|
close() {
|
|
3949
|
-
this.boxShow && (this.boxShow.value = !1), this.vmTargetElement && (
|
|
3944
|
+
this.boxShow && (this.boxShow.value = !1), this.vmTargetElement && (zo(null, this.vmTargetElement), document.body.removeChild(this.vmTargetElement), this.vmApp = null);
|
|
3950
3945
|
}
|
|
3951
3946
|
show() {
|
|
3952
3947
|
this.boxShow.value = !0;
|
|
@@ -3955,12 +3950,12 @@ class c0 {
|
|
|
3955
3950
|
return this.vmCompObj.$refs.inner;
|
|
3956
3951
|
}
|
|
3957
3952
|
}
|
|
3958
|
-
function
|
|
3953
|
+
function Di(e) {
|
|
3959
3954
|
return { text: "按钮", clickFn: null, type: "default", isHide: !1, order: 2, ...e };
|
|
3960
3955
|
}
|
|
3961
|
-
class
|
|
3956
|
+
class c0 {
|
|
3962
3957
|
constructor(t, o) {
|
|
3963
|
-
this.WinVue = t, this.vmCompObj = null, this.vmComponent = null, this.vmApp = null, this.dialogObj = null, this.boxShow =
|
|
3958
|
+
this.WinVue = t, this.vmCompObj = null, this.vmComponent = null, this.vmApp = null, this.dialogObj = null, this.boxShow = B(!1), this.boxProps = B({}), this.boxOptions = ke({ closeIsConfirm: !0, closeIsDestroy: !0, width: "40%", title: "默认标题" }, o.diyOpts), this.boxProps.value = Ll(this.boxOptions, ["closeIsConfirm", "closeIsDestroy"]), this.bodyComponent = o.component || "", this.bodyOptions = ke({}, o.props), this.bodyFunc = ke({}, o.onFunc);
|
|
3964
3959
|
for (const l in this.bodyFunc) if (this.bodyFunc.hasOwnProperty(l) && !l.startsWith("on")) {
|
|
3965
3960
|
const i = "on" + l.charAt(0).toUpperCase() + l.slice(1);
|
|
3966
3961
|
this.bodyFunc[i] = this.bodyFunc[l], delete this.bodyFunc[l];
|
|
@@ -3982,20 +3977,20 @@ class d0 {
|
|
|
3982
3977
|
const a = b(t.bodyComponent, { ...t.bodyOptions, ref: "inner", onSetTitle(m) {
|
|
3983
3978
|
t.boxProps.value.title = m;
|
|
3984
3979
|
}, onClose: this.clearVm, ...t.bodyFunc }, { default: () => "" });
|
|
3985
|
-
let n = { ok:
|
|
3980
|
+
let n = { ok: Di({ text: "确定", type: "primary", order: 0 }), cancel: Di({ text: "取消", order: 1 }) };
|
|
3986
3981
|
Object.entries(n).forEach(([m, f]) => {
|
|
3987
3982
|
if (["ok", "cancel"].includes(m)) {
|
|
3988
3983
|
const g = m === "ok" ? t.defaultFunc.onOK : t.defaultFunc.onCancel;
|
|
3989
3984
|
f.clickFn = f.clickFn || g;
|
|
3990
|
-
} else n[m] =
|
|
3985
|
+
} else n[m] = Di(f);
|
|
3991
3986
|
});
|
|
3992
|
-
const
|
|
3993
|
-
b("div", {},
|
|
3987
|
+
const c = Object.values(n).filter((m) => !m.isHide);
|
|
3988
|
+
b("div", {}, c.map((m) => b(Ne, { type: m.type, onClick: m.clickFn }, m.text)));
|
|
3994
3989
|
const p = function(m) {
|
|
3995
3990
|
t.close();
|
|
3996
3991
|
}, h = typeof t.boxOptions.beforeClose == "function" ? t.boxOptions.beforeClose : p;
|
|
3997
|
-
return b(
|
|
3998
|
-
t.boxOptions.closeIsConfirm ?
|
|
3992
|
+
return b(un, { ...t.boxProps.value, modelValue: t.boxShow.value, beforeClose: (m) => {
|
|
3993
|
+
t.boxOptions.closeIsConfirm ? Fi.confirm("确认关闭?", "提示").then((f) => {
|
|
3999
3994
|
h(p);
|
|
4000
3995
|
}).catch((f) => {
|
|
4001
3996
|
p();
|
|
@@ -4008,10 +4003,10 @@ class d0 {
|
|
|
4008
4003
|
const l = document.createElement("div");
|
|
4009
4004
|
document.body.appendChild(l), this.vmTargetElement = l;
|
|
4010
4005
|
const i = b(o);
|
|
4011
|
-
i.appContext = this.WinVue._context,
|
|
4006
|
+
i.appContext = this.WinVue._context, zo(i, this.vmTargetElement), this.vmApp = i;
|
|
4012
4007
|
}
|
|
4013
4008
|
close() {
|
|
4014
|
-
this.boxShow.value = !1,
|
|
4009
|
+
this.boxShow.value = !1, zo(null, this.vmTargetElement);
|
|
4015
4010
|
}
|
|
4016
4011
|
show() {
|
|
4017
4012
|
this.boxShow.value = !0;
|
|
@@ -4020,38 +4015,38 @@ class d0 {
|
|
|
4020
4015
|
return this.vmCompObj.$refs.inner;
|
|
4021
4016
|
}
|
|
4022
4017
|
}
|
|
4023
|
-
function
|
|
4024
|
-
const a = new
|
|
4018
|
+
function d0(e, t = null, o = {}, l = {}, i = {}) {
|
|
4019
|
+
const a = new r0(e, { component: t, diyOpts: o, props: l, onFunc: i, onOK() {
|
|
4025
4020
|
a.getInner(), a.close();
|
|
4026
4021
|
}, onCancel() {
|
|
4027
4022
|
a.close();
|
|
4028
4023
|
} });
|
|
4029
4024
|
return a;
|
|
4030
4025
|
}
|
|
4031
|
-
function
|
|
4032
|
-
const a = new
|
|
4026
|
+
function h0(e, t = "", o = {}, l = {}, i = null) {
|
|
4027
|
+
const a = new c0(e, { component: t, diyOpts: { ...o }, props: l, onFunc: i, onOK() {
|
|
4033
4028
|
a.getInner(), a.close();
|
|
4034
4029
|
}, onCancel() {
|
|
4035
4030
|
a.close();
|
|
4036
4031
|
} });
|
|
4037
4032
|
return a;
|
|
4038
4033
|
}
|
|
4039
|
-
var
|
|
4040
|
-
const
|
|
4041
|
-
|
|
4034
|
+
var p0 = [tt, ot, it, at, lt, nt, st, rt, ct, dt, Xn, ht, pt, ut, mt, gt, ft, bt, Ct, vt, yt, wt, kt, xt, _t, St, Vt, Tt, It, Lt, Dt, $t, Nt, Mt, Bt, Et, zt, At, Ht, Pt, jt, Rt, Ut, Wt, Xt, qt, Kt, Gt, Zt, oo, io, Yt, eo, to, lo, ao, no, fo, vo, yo, bo, Co, wo, so, ro, co, ho, po, uo, mo, go, Qt, Jt, Ft, Ot, ko, xo, So, _o, Vo, Io, Lo, To, Fo, Oo, $o, No, Mo, Bo];
|
|
4035
|
+
const Wl = function(e, t = {}) {
|
|
4036
|
+
p0.forEach((o) => {
|
|
4042
4037
|
e.component(o.name, o);
|
|
4043
4038
|
}), e.config.globalProperties.$cvUiParams = { ...t }, e.config.globalProperties.$cvDialogRender = function() {
|
|
4039
|
+
return d0(e, ...arguments);
|
|
4040
|
+
}, e.config.globalProperties.$cvCopy = fs, e.config.globalProperties.$cvDrawerRender = function() {
|
|
4044
4041
|
return h0(e, ...arguments);
|
|
4045
|
-
}, e.config.globalProperties.$cvCopy = vs, e.config.globalProperties.$cvDrawerRender = function() {
|
|
4046
|
-
return p0(e, ...arguments);
|
|
4047
4042
|
}, e.config.globalProperties.CDN_URL_UI = "https://10ui.cn/";
|
|
4048
4043
|
};
|
|
4049
|
-
typeof window < "u" && window._vueApp_ &&
|
|
4050
|
-
const
|
|
4044
|
+
typeof window < "u" && window._vueApp_ && Wl(window._vueApp_);
|
|
4045
|
+
const N0 = { version: "0.3.x", install: Wl };
|
|
4051
4046
|
export {
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4047
|
+
p0 as components,
|
|
4048
|
+
d0 as cvDialogRender,
|
|
4049
|
+
h0 as cvDrawerRender,
|
|
4050
|
+
N0 as default,
|
|
4051
|
+
Wl as install
|
|
4057
4052
|
};
|