@web-utils/component 3.2.3 → 3.3.1
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/chunks/{FormTemp.0ezzipG4.mjs → FormTemp.2IfXIr8o.mjs} +6 -5
- package/chunks/{form-input-mixin.DLHG0EnH.mjs → form-input-mixin.IKogWBfn.mjs} +2 -2
- package/chunks/{form-item-mixin.gd9p9Rrj.mjs → form-item-mixin.BilKDUlK.mjs} +1 -1
- package/chunks/{index.Uf8ONhVI.mjs → index.LGsb2aDq.mjs} +3 -3
- package/data-display/index.mjs +15 -129
- package/data-table-picker/index.mjs +1 -1
- package/easy-popup/index.mjs +7 -8
- package/editable-tree/index.mjs +1 -1
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow-designer/index.mjs +164 -218
- package/flow-viewer/index.mjs +73 -161
- package/form-button/index.mjs +11 -25
- package/form-cascader/index.mjs +2 -2
- package/form-checkbox-group/index.mjs +2 -2
- package/form-date-picker/index.mjs +2 -2
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +2 -2
- package/form-input-email/index.mjs +2 -2
- package/form-input-id-card/index.mjs +2 -2
- package/form-input-number/index.mjs +2 -2
- package/form-input-phone-number/index.mjs +2 -2
- package/form-input-tag/index.mjs +31 -155
- package/form-input-time/index.mjs +2 -2
- package/form-item/index.mjs +1 -1
- package/form-radio-group/index.mjs +2 -2
- package/form-select/index.mjs +2 -2
- package/form-switch/index.mjs +2 -2
- package/form-textarea/index.mjs +2 -2
- package/form-view/index.mjs +13 -12
- package/fy-curd/index.mjs +5 -4
- package/fy-form/index.mjs +1 -1
- package/fy-form-design/index.mjs +329 -498
- package/fy-input-icon/index.mjs +21 -20
- package/fy-u-editor/index.mjs +237 -75
- package/highlight-j-s/index.mjs +3 -4
- package/icon-temp/index.mjs +6 -7
- package/nav-bar/index.mjs +6 -7
- package/package.json +1 -1
- package/page/index.mjs +0 -1
- package/page-header/index.mjs +2 -3
- package/page-skeleton/index.mjs +17 -95
- package/pageable-table/index.mjs +1 -1
- package/pageable-view/index.mjs +8 -8
- package/present-view/index.mjs +4 -3
- package/resize-observer/index.mjs +3 -4
- package/split-pane/index.mjs +4 -3
- package/swiper/index.mjs +4 -3
- package/table-view/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +9 -10
- package/chunks/FyUEditor.c06LkvIy.mjs +0 -224
- package/chunks/FyUEditor.vue_vue_type_style_index_0_lang.0-PDx197.mjs +0 -167
- package/chunks/IconTemp.tzsg5qth.mjs +0 -29
- package/chunks/ResizeObserver.sOHk2Cm-.mjs +0 -51
package/page-skeleton/index.mjs
CHANGED
|
@@ -1,94 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import o from "../page/index.mjs";
|
|
2
|
+
import "../page/style.css";
|
|
3
|
+
import n from "../nav-bar/index.mjs";
|
|
4
|
+
import "../nav-bar/style.css";
|
|
5
|
+
import l from "../page-header/index.mjs";
|
|
6
|
+
import "../page-header/style.css";
|
|
7
|
+
import { n as r } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
5
8
|
const a = {
|
|
6
|
-
name: "Page",
|
|
7
|
-
props: {
|
|
8
|
-
vertical: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: !0
|
|
11
|
-
},
|
|
12
|
-
horizontal: Boolean
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
var r = function() {
|
|
16
|
-
var e = this, t = e._self._c;
|
|
17
|
-
return t("div", { staticClass: "page flex-row flex-item", class: { vertical: e.vertical && !e.horizontal } }, [e._t("default")], 2);
|
|
18
|
-
}, o = [], s = /* @__PURE__ */ n(
|
|
19
|
-
a,
|
|
20
|
-
r,
|
|
21
|
-
o,
|
|
22
|
-
!1,
|
|
23
|
-
null,
|
|
24
|
-
null,
|
|
25
|
-
null,
|
|
26
|
-
null
|
|
27
|
-
);
|
|
28
|
-
const c = s.exports, i = {
|
|
29
|
-
name: "NavBar",
|
|
30
|
-
props: {
|
|
31
|
-
onGoBack: Function,
|
|
32
|
-
showBack: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: !0
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
methods: {
|
|
38
|
-
goBack() {
|
|
39
|
-
this.onGoBack ? this.onGoBack() : this.$router.back();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var _ = function() {
|
|
44
|
-
var e = this, t = e._self._c;
|
|
45
|
-
return t("div", { staticClass: "nav-bar" }, [e.showBack ? t("ElButton", { attrs: { type: "text", icon: "el-icon-arrow-left" }, on: { click: e.goBack } }, [e._v(" 返回 ")]) : e._e(), e.$slots.right ? t("div", { staticClass: "flex-item flex-row-column vertical-center" }, [e._t("right")], 2) : e._e()], 1);
|
|
46
|
-
}, f = [], u = /* @__PURE__ */ n(
|
|
47
|
-
i,
|
|
48
|
-
_,
|
|
49
|
-
f,
|
|
50
|
-
!1,
|
|
51
|
-
null,
|
|
52
|
-
null,
|
|
53
|
-
null,
|
|
54
|
-
null
|
|
55
|
-
);
|
|
56
|
-
const d = u.exports, v = {
|
|
57
|
-
name: "PageHeader",
|
|
58
|
-
props: {
|
|
59
|
-
title: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: "标题"
|
|
62
|
-
},
|
|
63
|
-
alignEnd: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: !0
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
var p = function() {
|
|
70
|
-
var e = this, t = e._self._c;
|
|
71
|
-
return t("div", { staticClass: "egd-header flex-row egd-page-header" }, [e._t("section-title", function() {
|
|
72
|
-
return [t("span", { staticClass: "section-title" }, [e._t("title", function() {
|
|
73
|
-
return [e._v(e._s(e.title))];
|
|
74
|
-
}, { title: e.title })], 2)];
|
|
75
|
-
}, { title: e.title }), t("div", { staticClass: "flex-row flex-item vertical-center" }, [t("div", { class: ["flex-row", "flex-item", "vertical-center", { "align-end": e.alignEnd }] }, [e._t("default")], 2)])], 2);
|
|
76
|
-
}, m = [], g = /* @__PURE__ */ n(
|
|
77
|
-
v,
|
|
78
|
-
p,
|
|
79
|
-
m,
|
|
80
|
-
!1,
|
|
81
|
-
null,
|
|
82
|
-
null,
|
|
83
|
-
null,
|
|
84
|
-
null
|
|
85
|
-
);
|
|
86
|
-
const x = g.exports, h = {
|
|
87
9
|
name: "PageSkeleton",
|
|
88
10
|
components: {
|
|
89
|
-
Page:
|
|
90
|
-
NavBar:
|
|
91
|
-
PageHeader:
|
|
11
|
+
Page: o,
|
|
12
|
+
NavBar: n,
|
|
13
|
+
PageHeader: l
|
|
92
14
|
},
|
|
93
15
|
props: {
|
|
94
16
|
title: String,
|
|
@@ -105,7 +27,7 @@ const x = g.exports, h = {
|
|
|
105
27
|
}
|
|
106
28
|
}
|
|
107
29
|
};
|
|
108
|
-
var
|
|
30
|
+
var s = function() {
|
|
109
31
|
var e = this, t = e._self._c;
|
|
110
32
|
return t("Page", { staticClass: "page-skeleton" }, [e.header ? e._t("header", function() {
|
|
111
33
|
return [e.title ? t("PageHeader", { attrs: { title: e.title } }) : t("NavBar")];
|
|
@@ -114,17 +36,17 @@ var B = function() {
|
|
|
114
36
|
{ "flex-column": e.flexColumn, "flex-row": e.flexRow, "content-scroll": e.contentScroll },
|
|
115
37
|
e.contentClass
|
|
116
38
|
] }, [e._t("default")], 2)], 2);
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
39
|
+
}, c = [], f = /* @__PURE__ */ r(
|
|
40
|
+
a,
|
|
41
|
+
s,
|
|
42
|
+
c,
|
|
121
43
|
!1,
|
|
122
44
|
null,
|
|
123
45
|
null,
|
|
124
46
|
null,
|
|
125
47
|
null
|
|
126
48
|
);
|
|
127
|
-
const
|
|
49
|
+
const x = f.exports;
|
|
128
50
|
export {
|
|
129
|
-
|
|
51
|
+
x as default
|
|
130
52
|
};
|
package/pageable-table/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ var h = (t, e, a) => new Promise((s, l) => {
|
|
|
37
37
|
});
|
|
38
38
|
import { hasOwn as v } from "@web-utils/core";
|
|
39
39
|
import { cloneDeep as S, merge as C } from "@web-utils/integrations/lodash";
|
|
40
|
-
import { f as T,
|
|
40
|
+
import { f as T, h as k, i as B } from "../chunks/index.LGsb2aDq.mjs";
|
|
41
41
|
import { n as P } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
42
42
|
const o = {
|
|
43
43
|
loading: 1,
|
package/pageable-view/index.mjs
CHANGED
|
@@ -37,9 +37,9 @@ var h = (e, t, s) => new Promise((l, r) => {
|
|
|
37
37
|
});
|
|
38
38
|
import { cloneDeep as S, merge as w } from "@web-utils/integrations/lodash";
|
|
39
39
|
import { copy as P, hasOwn as C } from "@web-utils/core";
|
|
40
|
-
import { f as v,
|
|
40
|
+
import { f as v, h as x, i as O } from "../chunks/index.LGsb2aDq.mjs";
|
|
41
41
|
import { n as R } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
42
|
-
function
|
|
42
|
+
function k(e) {
|
|
43
43
|
let t = "";
|
|
44
44
|
for (const s in e)
|
|
45
45
|
t += `<ElTableColumn prop="${s}" label="${s}"/>
|
|
@@ -51,7 +51,7 @@ const c = {
|
|
|
51
51
|
error: -1,
|
|
52
52
|
empty: 2,
|
|
53
53
|
success: 0
|
|
54
|
-
},
|
|
54
|
+
}, E = {
|
|
55
55
|
name: "PageableView",
|
|
56
56
|
bus: {
|
|
57
57
|
reloadTableView(e) {
|
|
@@ -200,7 +200,7 @@ const c = {
|
|
|
200
200
|
onTableScroll() {
|
|
201
201
|
this.tableScrollTop = this.$refs.scroller.scrollTop, this.tableScrollLeft = this.$refs.scroller.scrollLeft;
|
|
202
202
|
},
|
|
203
|
-
copy: (e) => P(
|
|
203
|
+
copy: (e) => P(k(e)),
|
|
204
204
|
onSortChange({ prop: e, order: t }) {
|
|
205
205
|
this.page.ascs = t === "ascending" ? e : "", this.page.descs = t === "descending" ? e : "";
|
|
206
206
|
},
|
|
@@ -297,24 +297,24 @@ const c = {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
|
-
var
|
|
300
|
+
var F = function() {
|
|
301
301
|
var t = this, s = t._self._c;
|
|
302
302
|
return s("div", { staticClass: "work", staticStyle: { height: "100%", "background-color": "#fff" } }, [s("div", { staticClass: "flex-column list-content", staticStyle: { height: "100%" } }, [s("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], staticClass: "flex-item-relative", attrs: { "element-loading-text": "加载中...", "element-loading-background": "#fff" } }, [s("div", { ref: "scroller", staticClass: "scroll-wrapper" }, [s("div", { staticClass: "cards-block" }, [t._t("prepend"), t._l(t.records, function(l) {
|
|
303
303
|
return [t._t("default", null, { item: l })];
|
|
304
304
|
}), t._t("append")], 2)])]), s("ElPagination", { staticClass: "flex-not-shrink", staticStyle: { "border-top": "1px solid #ebeef5" }, attrs: { "current-page": t.page.page, "hide-on-single-page": t.hideOnSinglePage, "page-size": t.page.limit, total: t.page.total, background: "", layout: "total, prev, pager, next, jumper" }, on: { "current-change": (l) => {
|
|
305
305
|
t.page.page = l;
|
|
306
306
|
} } })], 1)]);
|
|
307
|
-
},
|
|
308
|
-
k,
|
|
307
|
+
}, L = [], M = /* @__PURE__ */ R(
|
|
309
308
|
E,
|
|
310
309
|
F,
|
|
310
|
+
L,
|
|
311
311
|
!1,
|
|
312
312
|
null,
|
|
313
313
|
null,
|
|
314
314
|
null,
|
|
315
315
|
null
|
|
316
316
|
);
|
|
317
|
-
const I =
|
|
317
|
+
const I = M.exports;
|
|
318
318
|
export {
|
|
319
319
|
I as default
|
|
320
320
|
};
|
package/present-view/index.mjs
CHANGED
|
@@ -28,7 +28,8 @@ var d = (e, t, o) => new Promise((r, s) => {
|
|
|
28
28
|
});
|
|
29
29
|
import { hasOwn as p, toStringArray as S, delay as F, isInContainer as k } from "@web-utils/core";
|
|
30
30
|
import { merge as B } from "@web-utils/integrations/lodash";
|
|
31
|
-
import
|
|
31
|
+
import L from "../resize-observer/index.mjs";
|
|
32
|
+
import "../resize-observer/style.css";
|
|
32
33
|
import { n as C } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
33
34
|
const w = [
|
|
34
35
|
"back",
|
|
@@ -227,7 +228,7 @@ var O = function() {
|
|
|
227
228
|
null,
|
|
228
229
|
null
|
|
229
230
|
);
|
|
230
|
-
const
|
|
231
|
+
const W = z.exports;
|
|
231
232
|
export {
|
|
232
|
-
|
|
233
|
+
W as default
|
|
233
234
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/* empty css */
|
|
1
|
+
import { j as r } from "../chunks/index.LGsb2aDq.mjs";
|
|
3
2
|
import { n as o } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
4
3
|
let t;
|
|
5
4
|
function i() {
|
|
@@ -45,7 +44,7 @@ var a = function() {
|
|
|
45
44
|
null,
|
|
46
45
|
null
|
|
47
46
|
);
|
|
48
|
-
const
|
|
47
|
+
const _ = d.exports;
|
|
49
48
|
export {
|
|
50
|
-
|
|
49
|
+
_ as default
|
|
51
50
|
};
|
package/split-pane/index.mjs
CHANGED
|
@@ -15,7 +15,8 @@ var l = (e, t, s) => new Promise((o, i) => {
|
|
|
15
15
|
a((s = s.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
17
|
import { n as u } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
18
|
-
import
|
|
18
|
+
import d from "../resize-observer/index.mjs";
|
|
19
|
+
import "../resize-observer/style.css";
|
|
19
20
|
function g(e, t) {
|
|
20
21
|
for (let s = 0; s < t.length; s++)
|
|
21
22
|
if (e === t[s])
|
|
@@ -211,7 +212,7 @@ var M = function() {
|
|
|
211
212
|
null,
|
|
212
213
|
null
|
|
213
214
|
);
|
|
214
|
-
const
|
|
215
|
+
const C = w.exports;
|
|
215
216
|
export {
|
|
216
|
-
|
|
217
|
+
C as default
|
|
217
218
|
};
|
package/swiper/index.mjs
CHANGED
|
@@ -15,7 +15,8 @@ var h = (e, t, s) => new Promise((i, r) => {
|
|
|
15
15
|
a((s = s.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
17
|
import { getEleWidth as c } from "@web-utils/core";
|
|
18
|
-
import
|
|
18
|
+
import u from "../resize-observer/index.mjs";
|
|
19
|
+
import "../resize-observer/style.css";
|
|
19
20
|
import { n as p } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
20
21
|
const f = {
|
|
21
22
|
name: "Swiper",
|
|
@@ -135,7 +136,7 @@ var w = function() {
|
|
|
135
136
|
null,
|
|
136
137
|
null
|
|
137
138
|
);
|
|
138
|
-
const
|
|
139
|
+
const x = X.exports;
|
|
139
140
|
export {
|
|
140
|
-
|
|
141
|
+
x as default
|
|
141
142
|
};
|
package/table-view/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ var a = (r, e, t) => new Promise((s, l) => {
|
|
|
16
16
|
});
|
|
17
17
|
import { merge as n } from "@web-utils/integrations/lodash";
|
|
18
18
|
import { isString as d, isArray as u, trace as f, warning as m, toStringArray as g, isFunction as w, hasOwn as p } from "@web-utils/core";
|
|
19
|
-
import { k as _ } from "../chunks/index.
|
|
19
|
+
import { k as _ } from "../chunks/index.LGsb2aDq.mjs";
|
|
20
20
|
import { n as v } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
21
21
|
const P = [
|
|
22
22
|
"back",
|
package/watermark/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var c = (l, t, e) => t in l ? d(l, t, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
x.call(t, e) && c(l, e, t[e]);
|
|
11
11
|
return l;
|
|
12
12
|
}, u = (l, t) => g(l, y(t));
|
|
13
|
-
import { g as b } from "../chunks/index.
|
|
13
|
+
import { g as b } from "../chunks/index.LGsb2aDq.mjs";
|
|
14
14
|
import { n as S } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
15
15
|
const k = {
|
|
16
16
|
name: "Watermark",
|
package/web-types.json
CHANGED
package/x-input-tag/index.mjs
CHANGED
|
@@ -10,23 +10,22 @@ var h = (a, t, e) => t in a ? g(a, t, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
v.call(t, e) && h(a, e, t[e]);
|
|
11
11
|
return a;
|
|
12
12
|
}, m = (a, t) => f(a, b(t));
|
|
13
|
-
var
|
|
13
|
+
var r = (a, t, e) => new Promise((s, n) => {
|
|
14
14
|
var o = (i) => {
|
|
15
15
|
try {
|
|
16
16
|
l(e.next(i));
|
|
17
|
-
} catch (
|
|
18
|
-
n(
|
|
17
|
+
} catch (u) {
|
|
18
|
+
n(u);
|
|
19
19
|
}
|
|
20
20
|
}, c = (i) => {
|
|
21
21
|
try {
|
|
22
22
|
l(e.throw(i));
|
|
23
|
-
} catch (
|
|
24
|
-
n(
|
|
23
|
+
} catch (u) {
|
|
24
|
+
n(u);
|
|
25
25
|
}
|
|
26
26
|
}, l = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, c);
|
|
27
27
|
l((e = e.apply(a, t)).next());
|
|
28
28
|
});
|
|
29
|
-
/* empty css */
|
|
30
29
|
import { n as y } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
31
30
|
const V = {
|
|
32
31
|
name: "XInputTag",
|
|
@@ -86,7 +85,7 @@ const V = {
|
|
|
86
85
|
},
|
|
87
86
|
methods: {
|
|
88
87
|
showInput() {
|
|
89
|
-
return
|
|
88
|
+
return r(this, null, function* () {
|
|
90
89
|
this.inputVisible = !0, yield this.$nextTick(), this.$refs.saveTagInput.$refs.input.focus();
|
|
91
90
|
});
|
|
92
91
|
},
|
|
@@ -95,7 +94,7 @@ const V = {
|
|
|
95
94
|
this.$emit("input", this.arrayMode ? t : t.map((e) => e.name || e).join(this.separator));
|
|
96
95
|
},
|
|
97
96
|
handleInputConfirm() {
|
|
98
|
-
return
|
|
97
|
+
return r(this, null, function* () {
|
|
99
98
|
var t;
|
|
100
99
|
if (this.tags.length >= this.maxTag) {
|
|
101
100
|
this.$message.warning({ message: "标签已达上限,请删除一些标签再添加!", showClose: !0 }), this.inputVisible = !1, this.inputValue = "";
|
|
@@ -136,7 +135,7 @@ var w = function() {
|
|
|
136
135
|
null,
|
|
137
136
|
null
|
|
138
137
|
);
|
|
139
|
-
const
|
|
138
|
+
const k = C.exports;
|
|
140
139
|
export {
|
|
141
|
-
|
|
140
|
+
k as default
|
|
142
141
|
};
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
var y = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
-
var b = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var h = Object.getOwnPropertySymbols;
|
|
4
|
-
var S = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var p = (t, s, e) => s in t ? y(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e, u = (t, s) => {
|
|
6
|
-
for (var e in s || (s = {}))
|
|
7
|
-
S.call(s, e) && p(t, e, s[e]);
|
|
8
|
-
if (h)
|
|
9
|
-
for (var e of h(s))
|
|
10
|
-
O.call(s, e) && p(t, e, s[e]);
|
|
11
|
-
return t;
|
|
12
|
-
}, f = (t, s) => g(t, b(s));
|
|
13
|
-
var c = (t, s, e) => new Promise((a, i) => {
|
|
14
|
-
var d = (r) => {
|
|
15
|
-
try {
|
|
16
|
-
l(e.next(r));
|
|
17
|
-
} catch (o) {
|
|
18
|
-
i(o);
|
|
19
|
-
}
|
|
20
|
-
}, n = (r) => {
|
|
21
|
-
try {
|
|
22
|
-
l(e.throw(r));
|
|
23
|
-
} catch (o) {
|
|
24
|
-
i(o);
|
|
25
|
-
}
|
|
26
|
-
}, l = (r) => r.done ? a(r.value) : Promise.resolve(r.value).then(d, n);
|
|
27
|
-
l((e = e.apply(t, s)).next());
|
|
28
|
-
});
|
|
29
|
-
import "@wangeditor/editor/dist/css/style.css";
|
|
30
|
-
import { g as C, a as _ } from "./FyUEditor.vue_vue_type_style_index_0_lang.0-PDx197.mjs";
|
|
31
|
-
import { createEditor as v, createToolbar as K } from "@wangeditor/editor";
|
|
32
|
-
import { p as H } from "./util.y1gUGRqi.mjs";
|
|
33
|
-
import { n as j } from "./_plugin-vue2_normalizer.JwmUNtgn.mjs";
|
|
34
|
-
const F = {
|
|
35
|
-
name: "FyUEditor",
|
|
36
|
-
props: {
|
|
37
|
-
data: {
|
|
38
|
-
type: Object,
|
|
39
|
-
default: () => ({})
|
|
40
|
-
},
|
|
41
|
-
headers: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default: () => ({})
|
|
44
|
-
},
|
|
45
|
-
customConfig: {
|
|
46
|
-
type: Object,
|
|
47
|
-
default: () => ({})
|
|
48
|
-
},
|
|
49
|
-
toolbarConfig: {
|
|
50
|
-
type: Object,
|
|
51
|
-
default: () => ({})
|
|
52
|
-
},
|
|
53
|
-
propsHttp: {
|
|
54
|
-
type: Object,
|
|
55
|
-
default: () => ({})
|
|
56
|
-
},
|
|
57
|
-
ali: {
|
|
58
|
-
type: Object,
|
|
59
|
-
default: () => ({})
|
|
60
|
-
},
|
|
61
|
-
qiniu: {
|
|
62
|
-
type: Object,
|
|
63
|
-
default: () => ({})
|
|
64
|
-
},
|
|
65
|
-
oss: String,
|
|
66
|
-
action: String,
|
|
67
|
-
disabled: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: !1
|
|
70
|
-
},
|
|
71
|
-
value: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: ""
|
|
74
|
-
},
|
|
75
|
-
placeholder: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: ""
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
data() {
|
|
81
|
-
return {
|
|
82
|
-
editor: null
|
|
83
|
-
};
|
|
84
|
-
},
|
|
85
|
-
computed: {
|
|
86
|
-
fileName() {
|
|
87
|
-
return this.propsHttp.fileName || "file";
|
|
88
|
-
},
|
|
89
|
-
homeUrl() {
|
|
90
|
-
return this.propsHttp.home || "";
|
|
91
|
-
},
|
|
92
|
-
resKey() {
|
|
93
|
-
return this.propsHttp.res;
|
|
94
|
-
},
|
|
95
|
-
urlKey() {
|
|
96
|
-
return this.propsHttp.url || "url";
|
|
97
|
-
},
|
|
98
|
-
isQiniuOSS() {
|
|
99
|
-
return this.oss === "qiniu";
|
|
100
|
-
},
|
|
101
|
-
isAliOSS() {
|
|
102
|
-
return this.oss === "ali";
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
watch: {
|
|
106
|
-
disabled(t) {
|
|
107
|
-
t ? this.editor.disable() : this.editor.enable();
|
|
108
|
-
},
|
|
109
|
-
value(t) {
|
|
110
|
-
t ? this.editor.setHtml(t) : this.editor.clear();
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
mounted() {
|
|
114
|
-
this.initEdit();
|
|
115
|
-
},
|
|
116
|
-
beforeDestroy() {
|
|
117
|
-
var t;
|
|
118
|
-
(t = this.editor) == null || t.destroy();
|
|
119
|
-
},
|
|
120
|
-
methods: {
|
|
121
|
-
initEdit() {
|
|
122
|
-
const t = "default", s = f(u({
|
|
123
|
-
placeholder: this.placeholder,
|
|
124
|
-
readOnly: this.disabled,
|
|
125
|
-
MENU_CONF: {
|
|
126
|
-
uploadImage: {
|
|
127
|
-
customUpload: (a) => c(this, null, function* () {
|
|
128
|
-
const i = yield this.uploadFile(a);
|
|
129
|
-
this.editor.dangerouslyInsertHtml(i);
|
|
130
|
-
})
|
|
131
|
-
},
|
|
132
|
-
uploadVideo: {
|
|
133
|
-
customUpload: (a) => c(this, null, function* () {
|
|
134
|
-
const i = yield this.uploadFile(a);
|
|
135
|
-
this.editor.dangerouslyInsertHtml(i);
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}, this.customConfig), {
|
|
140
|
-
onFocus: () => {
|
|
141
|
-
this.$emit("focus", this.value);
|
|
142
|
-
},
|
|
143
|
-
onBlur: (a) => {
|
|
144
|
-
const i = a.getHtml();
|
|
145
|
-
this.$emit("blur", i);
|
|
146
|
-
},
|
|
147
|
-
onChange: (a) => {
|
|
148
|
-
const i = a.getHtml();
|
|
149
|
-
this.$emit("input", i);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
this.editor = Object.seal(
|
|
153
|
-
v({
|
|
154
|
-
selector: this.$refs.editor,
|
|
155
|
-
config: s,
|
|
156
|
-
html: this.value,
|
|
157
|
-
mode: t
|
|
158
|
-
})
|
|
159
|
-
);
|
|
160
|
-
const e = u({}, this.toolbarConfig);
|
|
161
|
-
this.toolbar = K({
|
|
162
|
-
editor: this.editor,
|
|
163
|
-
selector: this.$refs.toolbar,
|
|
164
|
-
config: e,
|
|
165
|
-
mode: t
|
|
166
|
-
});
|
|
167
|
-
},
|
|
168
|
-
uploadFile(t) {
|
|
169
|
-
return new Promise((s, e) => {
|
|
170
|
-
const a = Object.assign(this.headers, {
|
|
171
|
-
"Content-Type": "multipart/form-data"
|
|
172
|
-
});
|
|
173
|
-
let i = {}, d;
|
|
174
|
-
const n = new FormData();
|
|
175
|
-
let l = this.action;
|
|
176
|
-
if (n.append(this.fileName, t), Object.keys(this.data).forEach((r) => {
|
|
177
|
-
n.append(r, this.data[r]);
|
|
178
|
-
}), this.isQiniuOSS) {
|
|
179
|
-
i = this.qiniu;
|
|
180
|
-
const r = C(i.AK, i.SK, {
|
|
181
|
-
scope: i.scope,
|
|
182
|
-
deadline: (/* @__PURE__ */ new Date()).getTime() + i.deadline * 3600
|
|
183
|
-
});
|
|
184
|
-
n.append("token", r), l = "http://up.qiniu.com/";
|
|
185
|
-
} else
|
|
186
|
-
this.isAliOSS && (i = this.ali, d = _({
|
|
187
|
-
region: i.region,
|
|
188
|
-
endpoint: i.endpoint,
|
|
189
|
-
accessKeyId: i.accessKeyId,
|
|
190
|
-
accessKeySecret: i.accessKeySecret,
|
|
191
|
-
bucket: i.bucket
|
|
192
|
-
}));
|
|
193
|
-
(() => this.isAliOSS ? d.put(t.name, t) : this.$axios.post(l, n, { headers: a }))().then((r) => {
|
|
194
|
-
let o;
|
|
195
|
-
this.isAliOSS ? o = r : this.isQiniuOSS ? (o = r.data, o.key = i.url + o.key) : typeof this.resKey == "function" ? o = this.resKey(r.data) : (o = H(r.data, this.resKey), o = o[this.urlKey]);
|
|
196
|
-
const m = this.homeUrl + o;
|
|
197
|
-
s(m);
|
|
198
|
-
}).catch((r) => {
|
|
199
|
-
e(r);
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
getUEContent() {
|
|
204
|
-
return this.editor.getHtml();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
var k = function() {
|
|
209
|
-
var s = this, e = s._self._c;
|
|
210
|
-
return e("div", { staticClass: "avue-ueditor" }, [e("div", { ref: "toolbar", staticClass: "fy-editor-toolbar" }), e("div", { ref: "editor", staticClass: "fy-editor" })]);
|
|
211
|
-
}, E = [], U = /* @__PURE__ */ j(
|
|
212
|
-
F,
|
|
213
|
-
k,
|
|
214
|
-
E,
|
|
215
|
-
!1,
|
|
216
|
-
null,
|
|
217
|
-
null,
|
|
218
|
-
null,
|
|
219
|
-
null
|
|
220
|
-
);
|
|
221
|
-
const T = U.exports;
|
|
222
|
-
export {
|
|
223
|
-
T as default
|
|
224
|
-
};
|