@web-utils/component 4.0.10 → 4.0.12
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.BQxO5IQq.mjs +1 -1
- package/chunks/{dictionary.C6NmC-bT.mjs → dictionary.DGt59Ir7.mjs} +4 -4
- package/chunks/index.BmYCjxZQ.mjs +47 -0
- package/configComponents.d.ts +29 -0
- package/{chunks/configComponents.DQaqUQFs.mjs → configComponents.mjs} +25 -22
- package/flow-designer/index.mjs +1 -1
- package/flow-viewer/index.mjs +1 -1
- package/form-view/index.mjs +1 -1
- package/fy-curd/index.mjs +1 -1
- package/fy-form-design/index.mjs +2 -2
- package/fy-from/crud/config.d.ts +69 -0
- package/fy-from/crud/eval.d.ts +1 -0
- package/fy-from/crud/zh.d.ts +87 -0
- package/fy-input-icon/index.mjs +1 -1
- package/helper-function.d.ts +33 -0
- package/helper-function.mjs +68 -0
- package/index.d.ts +180 -0
- package/index.mjs +364 -422
- package/input-number/index.mjs +2 -2
- package/package.json +5 -4
- package/page-skeleton/index.mjs +3 -3
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.d.ts +4 -0
- package/photo-swipe/index.mjs +34 -3
- package/present-view/index.mjs +1 -1
- package/split-pane/index.mjs +1 -1
- package/swiper/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-view/index.mjs +1 -1
- package/tabs-view/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/video/index.d.ts +10 -0
- package/web-types.json +1 -1
- package/chunks/PhotoSwipe.BunkqqPu.mjs +0 -80
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isBlank as _ } from "@web-utils/core";
|
|
2
2
|
import { formatDate as i } from "@web-utils/integrations/dayjs";
|
|
3
3
|
import { p as h, M as g, A as b, b as c, q as A, e as S, k as d, t as T, h as C, v, u as x } from "./util.DqFv_pWg.mjs";
|
|
4
|
-
import "
|
|
4
|
+
import "../fy-u-editor/style.css";
|
|
5
5
|
import { a as D, b as O } from "./dataformat.CpqOeGBl.mjs";
|
|
6
6
|
import { s as j } from "./slot.DXIbhGat.mjs";
|
|
7
7
|
import { n as L } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as g, b as l } from "./core.0Exl13Mz.mjs";
|
|
2
|
-
import {
|
|
3
|
-
const $ = {}, h = {}, m = {},
|
|
2
|
+
import { getDictTreeByType as d, remote as w } from "../configComponents.mjs";
|
|
3
|
+
const $ = {}, h = {}, m = {}, b = (t, i = !0, { options: r, treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
|
|
4
4
|
let e = t;
|
|
5
5
|
o && (e = `${t}-${n}-${c}${r ? "-options" : ""}`);
|
|
6
6
|
const a = $[e];
|
|
@@ -9,7 +9,7 @@ const $ = {}, h = {}, m = {}, w = (t, i = !0, { options: r, treeDict: o, idAsVal
|
|
|
9
9
|
if (m[t])
|
|
10
10
|
return m[t];
|
|
11
11
|
const r = new Promise((o, n) => {
|
|
12
|
-
i && $[t] ? o($[t]) :
|
|
12
|
+
i && $[t] ? o($[t]) : w(t).then((c) => {
|
|
13
13
|
let e = c.data.data;
|
|
14
14
|
if (i) {
|
|
15
15
|
const a = {};
|
|
@@ -44,7 +44,7 @@ const $ = {}, h = {}, m = {}, w = (t, i = !0, { options: r, treeDict: o, idAsVal
|
|
|
44
44
|
if (r && a)
|
|
45
45
|
f = a[i];
|
|
46
46
|
else {
|
|
47
|
-
let s = await
|
|
47
|
+
let s = await b(t, r, { treeDict: o, idAsValue: n, labelAsValue: c });
|
|
48
48
|
if (r)
|
|
49
49
|
f = h[e][i];
|
|
50
50
|
else {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import s from "photoswipe";
|
|
2
|
+
import "photoswipe/dist/photoswipe.css";
|
|
3
|
+
function d(h) {
|
|
4
|
+
new s(h).init();
|
|
5
|
+
}
|
|
6
|
+
async function b(h, n, r = { selector: "chat-image" }) {
|
|
7
|
+
const a = h.target;
|
|
8
|
+
if (!(!a || a.classList.contains(r.selector) || a.tagName === "IMG"))
|
|
9
|
+
return;
|
|
10
|
+
const t = n.querySelectorAll(r.selector === "img" ? r.selector : `.${r.selector}`), i = [...t].findIndex((o) => o === a);
|
|
11
|
+
i >= 0 && (r.index = i);
|
|
12
|
+
const e = await u(t);
|
|
13
|
+
await d({ dataSource: e, index: i });
|
|
14
|
+
}
|
|
15
|
+
async function u(h) {
|
|
16
|
+
const n = [];
|
|
17
|
+
for (let r = 0, a = h.length; r < a; r++) {
|
|
18
|
+
const t = h[r], i = t.getAttribute("data-src") || t.getAttribute("src"), e = {
|
|
19
|
+
src: i,
|
|
20
|
+
msrc: i,
|
|
21
|
+
alt: t.getAttribute("data-title") || t.getAttribute("alt"),
|
|
22
|
+
element: t
|
|
23
|
+
}, o = t.getAttribute("data-height"), g = t.getAttribute("data-width");
|
|
24
|
+
let c = { width: g, height: o };
|
|
25
|
+
!o && !g && (c = await w(t), t.setAttribute("data-height", c.height), t.setAttribute("data-width", c.width)), e.w = c.width, e.width = c.width, e.h = c.height, e.height = c.height, n.push(e);
|
|
26
|
+
}
|
|
27
|
+
return n;
|
|
28
|
+
}
|
|
29
|
+
function w(h) {
|
|
30
|
+
const n = h.getAttribute("data-src") || h.getAttribute("src"), r = h.getAttribute("data-height"), a = h.getAttribute("data-width");
|
|
31
|
+
return r && a ? { width: a, height: r } : h.complete ? {
|
|
32
|
+
width: h.naturalWidth,
|
|
33
|
+
height: h.naturalHeight
|
|
34
|
+
} : new Promise((t) => {
|
|
35
|
+
const i = new Image();
|
|
36
|
+
i.src = n;
|
|
37
|
+
const e = {};
|
|
38
|
+
i.complete ? (e.width = i.width, e.height = i.height, t(e)) : (i.onload = () => {
|
|
39
|
+
e.width = i.width, e.height = i.height, t(e);
|
|
40
|
+
}, i.onerror = () => {
|
|
41
|
+
e.width = 0, e.height = 0, t(e);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
b as p
|
|
47
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ConfigOptions {
|
|
2
|
+
privilege?: {
|
|
3
|
+
processButtons?: (buttons: Array<string | Record<string, string>>) => Array<string | Record<string, boolean>>;
|
|
4
|
+
hasAuthority?: (privilege: string) => boolean;
|
|
5
|
+
};
|
|
6
|
+
dict?: {
|
|
7
|
+
getDictTreeByType?: (type: string, options: {
|
|
8
|
+
idAsValue?: boolean;
|
|
9
|
+
labelAsValue?: boolean;
|
|
10
|
+
}) => Promise<unknown[]>;
|
|
11
|
+
remote?: (type: string) => Promise<unknown[]>;
|
|
12
|
+
};
|
|
13
|
+
tableView?: {
|
|
14
|
+
reload?: () => void;
|
|
15
|
+
};
|
|
16
|
+
toolbar?: {
|
|
17
|
+
goBack?: (path: string) => void;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const processButtons: (buttons: Array<string | Record<string, string>>) => (string | Record<string, boolean>)[] | undefined;
|
|
21
|
+
export declare const hasAuthority: (str: string) => boolean | undefined;
|
|
22
|
+
export declare const goBack: (path: string) => void | undefined;
|
|
23
|
+
export declare const reloadTable: () => void | undefined;
|
|
24
|
+
export declare const getDictTreeByType: (type: string, options: {
|
|
25
|
+
idAsValue?: boolean;
|
|
26
|
+
labelAsValue?: boolean;
|
|
27
|
+
}) => Promise<unknown[]> | undefined;
|
|
28
|
+
export declare const remote: (type: string) => Promise<unknown[]> | undefined;
|
|
29
|
+
export declare const configComponents: (options: ConfigOptions) => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
import {
|
|
1
|
+
import { isObject as s, isString as c } from "@web-utils/core";
|
|
2
|
+
import { mergeWith as p } from "@web-utils/integrations/lodash";
|
|
3
3
|
const r = {
|
|
4
4
|
privilege: {
|
|
5
5
|
processButtons(e) {
|
|
6
6
|
return e.map((t) => {
|
|
7
|
-
if (
|
|
8
|
-
const o = t,
|
|
9
|
-
for (const
|
|
10
|
-
c(o[
|
|
11
|
-
return
|
|
7
|
+
if (s(t)) {
|
|
8
|
+
const o = t, n = {};
|
|
9
|
+
for (const i in o)
|
|
10
|
+
c(o[i]) && (n[i] = u(o[i]) ?? !0);
|
|
11
|
+
return n;
|
|
12
12
|
}
|
|
13
13
|
return t;
|
|
14
14
|
});
|
|
@@ -17,33 +17,36 @@ const r = {
|
|
|
17
17
|
return !0;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, f = (e) => {
|
|
21
21
|
var t, o;
|
|
22
22
|
return (o = (t = r.privilege) == null ? void 0 : t.processButtons) == null ? void 0 : o.call(t, e);
|
|
23
|
-
},
|
|
23
|
+
}, u = (e) => {
|
|
24
24
|
var t, o;
|
|
25
25
|
return (o = (t = r.privilege) == null ? void 0 : t.hasAuthority) == null ? void 0 : o.call(t, e);
|
|
26
|
-
},
|
|
26
|
+
}, l = (e) => {
|
|
27
27
|
var t, o;
|
|
28
28
|
return (o = (t = r.toolbar) == null ? void 0 : t.goBack) == null ? void 0 : o.call(t, e);
|
|
29
|
-
},
|
|
29
|
+
}, m = () => {
|
|
30
30
|
var e, t;
|
|
31
31
|
return (t = (e = r.tableView) == null ? void 0 : e.reload) == null ? void 0 : t.call(e);
|
|
32
32
|
}, y = (e, t) => {
|
|
33
|
-
var o,
|
|
34
|
-
return (
|
|
35
|
-
},
|
|
33
|
+
var o, n;
|
|
34
|
+
return (n = (o = r.dict) == null ? void 0 : o.getDictTreeByType) == null ? void 0 : n.call(o, e, t);
|
|
35
|
+
}, b = (e) => {
|
|
36
36
|
var t, o;
|
|
37
37
|
return (o = (t = r.dict) == null ? void 0 : t.remote) == null ? void 0 : o.call(t, e);
|
|
38
38
|
}, h = (e) => {
|
|
39
|
-
|
|
39
|
+
p(r, e, (t, o) => {
|
|
40
|
+
if (typeof o == "function")
|
|
41
|
+
return o;
|
|
42
|
+
});
|
|
40
43
|
};
|
|
41
44
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
b as
|
|
45
|
+
h as configComponents,
|
|
46
|
+
y as getDictTreeByType,
|
|
47
|
+
l as goBack,
|
|
48
|
+
u as hasAuthority,
|
|
49
|
+
f as processButtons,
|
|
50
|
+
m as reloadTable,
|
|
51
|
+
b as remote
|
|
49
52
|
};
|
package/flow-designer/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import Ee from "highlight.js/lib/languages/xml";
|
|
|
22
22
|
import Te from "highlight.js/lib/languages/json";
|
|
23
23
|
import { isArray as K } from "@web-utils/core";
|
|
24
24
|
import Ce from "../highlight-j-s/index.mjs";
|
|
25
|
-
import "
|
|
25
|
+
import "../highlight-j-s/style.css";
|
|
26
26
|
function G(n, e, t, i, r, a, p, o, y, S, l, s, m) {
|
|
27
27
|
n = n || {}, i.registerProvider(this), this._contextPad = i, this._modeling = r, this._elementFactory = a, this._connect = p, this._create = o, this._popupMenu = y, this._canvas = S, this._rules = l, this._translate = s, n.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(g) {
|
|
28
28
|
const A = g.context.shape;
|
package/flow-viewer/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import c from "diagram-js/lib/navigation/zoomscroll/ZoomScroll";
|
|
|
3
3
|
import { create as l, attr as a, append as p } from "tiny-svg";
|
|
4
4
|
import { query as w } from "min-dom";
|
|
5
5
|
import y from "../easy-popup/index.mjs";
|
|
6
|
-
import "
|
|
6
|
+
import "../easy-popup/style.css";
|
|
7
7
|
import { n as v } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
8
8
|
const m = c.prototype._handleWheel, k = {
|
|
9
9
|
__init__: ["zoomScroll"],
|
package/form-view/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isInContainer as d, animate as m, hasOwn as a, toStringArray as h } from "@web-utils/core";
|
|
2
2
|
import { merge as p } from "@web-utils/integrations/lodash";
|
|
3
3
|
import b from "../resize-observer/index.mjs";
|
|
4
|
-
import "
|
|
4
|
+
import "../resize-observer/style.css";
|
|
5
5
|
import { n as v } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
6
6
|
const f = [
|
|
7
7
|
"back",
|
package/fy-curd/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
|
9
9
|
import { F as L, d as w } from "../chunks/FormTemp.BQxO5IQq.mjs";
|
|
10
10
|
import { s as V } from "../chunks/dic.Dkl-leRW.mjs";
|
|
11
11
|
import R from "../icon-temp/index.mjs";
|
|
12
|
-
import "
|
|
12
|
+
import "../icon-temp/style.css";
|
|
13
13
|
const p = {
|
|
14
14
|
menuWidth: 220,
|
|
15
15
|
menuFixed: "right",
|
package/fy-form-design/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isBlank as E } from "@web-utils/core";
|
|
2
2
|
import { c as v, M as f } from "../chunks/MonacoEditor.D31t4FTy.mjs";
|
|
3
|
-
import "
|
|
3
|
+
import "../monaco-editor/style.css";
|
|
4
4
|
import b from "vuedraggable";
|
|
5
5
|
import { d as p, z as u } from "../chunks/util.DqFv_pWg.mjs";
|
|
6
6
|
import { cloneDeep as g } from "@web-utils/integrations/lodash";
|
|
7
|
-
import "
|
|
7
|
+
import "../fy-u-editor/style.css";
|
|
8
8
|
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
9
|
const _ = [
|
|
10
10
|
{
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
menuWidth: number;
|
|
3
|
+
menuFixed: string;
|
|
4
|
+
menuXsWidth: number;
|
|
5
|
+
menuAlign: string;
|
|
6
|
+
menuHeaderAlign: string;
|
|
7
|
+
headerAlign: string;
|
|
8
|
+
cancelBtnIcon: string;
|
|
9
|
+
viewBtnIcon: string;
|
|
10
|
+
editBtnIcon: string;
|
|
11
|
+
copyBtnIcon: string;
|
|
12
|
+
addBtnIcon: string;
|
|
13
|
+
printBtnIcon: string;
|
|
14
|
+
excelBtnIcon: string;
|
|
15
|
+
delBtnIcon: string;
|
|
16
|
+
searchBtnIcon: string;
|
|
17
|
+
emptyBtnIcon: string;
|
|
18
|
+
saveBtnIcon: string;
|
|
19
|
+
updateBtnIcon: string;
|
|
20
|
+
columnBtnIcon: string;
|
|
21
|
+
filterBtnIcon: string;
|
|
22
|
+
refreshBtnIcon: string;
|
|
23
|
+
viewBtn: boolean;
|
|
24
|
+
editBtn: boolean;
|
|
25
|
+
copyBtn: boolean;
|
|
26
|
+
cancelBtn: boolean;
|
|
27
|
+
addBtn: boolean;
|
|
28
|
+
addRowBtn: boolean;
|
|
29
|
+
printBtn: boolean;
|
|
30
|
+
excelBtn: boolean;
|
|
31
|
+
delBtn: boolean;
|
|
32
|
+
cellBtn: boolean;
|
|
33
|
+
dateBtn: boolean;
|
|
34
|
+
updateBtn: boolean;
|
|
35
|
+
saveBtn: boolean;
|
|
36
|
+
refreshBtn: boolean;
|
|
37
|
+
columnBtn: boolean;
|
|
38
|
+
filterBtn: boolean;
|
|
39
|
+
queryBtn: boolean;
|
|
40
|
+
menuBtn: boolean;
|
|
41
|
+
searchBtn: boolean;
|
|
42
|
+
clearBtn: boolean;
|
|
43
|
+
selectClearBtn: boolean;
|
|
44
|
+
searchShow: boolean;
|
|
45
|
+
tip: boolean;
|
|
46
|
+
dialogWidth: string;
|
|
47
|
+
dialogDrag: boolean;
|
|
48
|
+
formFullscreen: boolean;
|
|
49
|
+
pageBackground: boolean;
|
|
50
|
+
page: boolean;
|
|
51
|
+
menu: boolean;
|
|
52
|
+
indexLabel: string;
|
|
53
|
+
indexWidth: number;
|
|
54
|
+
indexFixed: string;
|
|
55
|
+
selectionWidth: number;
|
|
56
|
+
selectionFixed: string;
|
|
57
|
+
expandWidth: number;
|
|
58
|
+
expandFixed: string;
|
|
59
|
+
filterMultiple: boolean;
|
|
60
|
+
calcHeight: number;
|
|
61
|
+
width: string;
|
|
62
|
+
searchGutter: number;
|
|
63
|
+
searchLabelWidth: number;
|
|
64
|
+
searchSpan: number;
|
|
65
|
+
dropRowClass: string;
|
|
66
|
+
dropColClass: string;
|
|
67
|
+
ghostClass: string;
|
|
68
|
+
};
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function addAttrs(safe: any, data?: never[], { parent, preIndex, level, expandLevel, expand, show }?: any): void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const lang: {
|
|
2
|
+
common: {
|
|
3
|
+
condition: string;
|
|
4
|
+
display: string;
|
|
5
|
+
hide: string;
|
|
6
|
+
};
|
|
7
|
+
tip: {
|
|
8
|
+
select: string;
|
|
9
|
+
input: string;
|
|
10
|
+
};
|
|
11
|
+
check: {
|
|
12
|
+
checkAll: string;
|
|
13
|
+
};
|
|
14
|
+
upload: {
|
|
15
|
+
upload: string;
|
|
16
|
+
tip: string;
|
|
17
|
+
};
|
|
18
|
+
time: {
|
|
19
|
+
start: string;
|
|
20
|
+
end: string;
|
|
21
|
+
};
|
|
22
|
+
date: {
|
|
23
|
+
start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
t: string;
|
|
26
|
+
y: string;
|
|
27
|
+
n: string;
|
|
28
|
+
a: string;
|
|
29
|
+
};
|
|
30
|
+
form: {
|
|
31
|
+
printBtn: string;
|
|
32
|
+
mockBtn: string;
|
|
33
|
+
submitBtn: string;
|
|
34
|
+
emptyBtn: string;
|
|
35
|
+
};
|
|
36
|
+
crud: {
|
|
37
|
+
filter: {
|
|
38
|
+
addBtn: string;
|
|
39
|
+
clearBtn: string;
|
|
40
|
+
resetBtn: string;
|
|
41
|
+
cancelBtn: string;
|
|
42
|
+
submitBtn: string;
|
|
43
|
+
};
|
|
44
|
+
column: {
|
|
45
|
+
name: string;
|
|
46
|
+
hide: string;
|
|
47
|
+
fixed: string;
|
|
48
|
+
filters: string;
|
|
49
|
+
sortable: string;
|
|
50
|
+
index: string;
|
|
51
|
+
width: string;
|
|
52
|
+
};
|
|
53
|
+
tipStartTitle: string;
|
|
54
|
+
tipEndTitle: string;
|
|
55
|
+
editTitle: string;
|
|
56
|
+
copyTitle: string;
|
|
57
|
+
addTitle: string;
|
|
58
|
+
viewTitle: string;
|
|
59
|
+
filterTitle: string;
|
|
60
|
+
showTitle: string;
|
|
61
|
+
menu: string;
|
|
62
|
+
addBtn: string;
|
|
63
|
+
show: string;
|
|
64
|
+
hide: string;
|
|
65
|
+
open: string;
|
|
66
|
+
shrink: string;
|
|
67
|
+
printBtn: string;
|
|
68
|
+
excelBtn: string;
|
|
69
|
+
updateBtn: string;
|
|
70
|
+
cancelBtn: string;
|
|
71
|
+
searchBtn: string;
|
|
72
|
+
emptyBtn: string;
|
|
73
|
+
menuBtn: string;
|
|
74
|
+
saveBtn: string;
|
|
75
|
+
viewBtn: string;
|
|
76
|
+
editBtn: string;
|
|
77
|
+
copyBtn: string;
|
|
78
|
+
delBtn: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare const getValueByPath: (object: any, prop: any) => any;
|
|
82
|
+
export declare const getPropByPath: (obj: any, path: any, strict: any) => {
|
|
83
|
+
o: any;
|
|
84
|
+
k: any;
|
|
85
|
+
v: any;
|
|
86
|
+
};
|
|
87
|
+
export declare const translate: (path: any) => any;
|
package/fy-input-icon/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as s, e as l } from "../chunks/event.9aDS6jcw.mjs";
|
|
2
2
|
import a from "../icon-temp/index.mjs";
|
|
3
|
-
import "
|
|
3
|
+
import "../icon-temp/style.css";
|
|
4
4
|
import { n as r } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
5
|
const o = {
|
|
6
6
|
name: "FyInputIcon",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as Vue } from 'vue';
|
|
2
|
+
import { photoswipe } from './photo-swipe';
|
|
3
|
+
import { configComponents } from '../components/configComponents';
|
|
4
|
+
declare const imagePreview: (datas?: never[], index?: number, ops?: {}) => import('vue/types/vue').CombinedVueInstance<import('vue/types/v3-component-options').ExtractComputedReturns<{}> & Record<never, any> & Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue> & import('vue').ShallowUnwrapRef<{}> & Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue>, {
|
|
5
|
+
datas: never[];
|
|
6
|
+
index: number;
|
|
7
|
+
ops: {
|
|
8
|
+
closeOnClickModal: boolean;
|
|
9
|
+
beforeClose: null;
|
|
10
|
+
click: null;
|
|
11
|
+
modal: boolean;
|
|
12
|
+
};
|
|
13
|
+
}, object, object, Record<never, any>, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, import('vue/types/v3-component-public-instance').OptionTypesType<{}, {}, {}, {}, {}, {}>>;
|
|
14
|
+
declare const imageCropper: (ops?: {}) => import('vue/types/vue').CombinedVueInstance<import('vue/types/v3-component-options').ExtractComputedReturns<{}> & Record<never, any> & Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue> & import('vue').ShallowUnwrapRef<{}> & Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue>, {
|
|
15
|
+
option: {
|
|
16
|
+
outputSize: number;
|
|
17
|
+
outputType: string;
|
|
18
|
+
info: boolean;
|
|
19
|
+
canScale: boolean;
|
|
20
|
+
autoCrop: boolean;
|
|
21
|
+
fixed: boolean;
|
|
22
|
+
full: boolean;
|
|
23
|
+
fixedBox: boolean;
|
|
24
|
+
canMove: boolean;
|
|
25
|
+
canMoveBox: boolean;
|
|
26
|
+
original: boolean;
|
|
27
|
+
centerBox: boolean;
|
|
28
|
+
height: boolean;
|
|
29
|
+
infoTrue: boolean;
|
|
30
|
+
enlarge: number;
|
|
31
|
+
};
|
|
32
|
+
}, object, object, Record<never, any>, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, import('vue/types/v3-component-public-instance').OptionTypesType<{}, {}, {}, {}, {}, {}>>;
|
|
33
|
+
export { photoswipe, configComponents, imagePreview, imageCropper };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import a from "vue";
|
|
2
|
+
import i from "./image-preview/index.mjs";
|
|
3
|
+
import "../image-preview/style.css";
|
|
4
|
+
import s from "./image-cropper/index.mjs";
|
|
5
|
+
import "../image-cropper/style.css";
|
|
6
|
+
import { p as w } from "./chunks/index.BmYCjxZQ.mjs";
|
|
7
|
+
import { configComponents as v } from "./configComponents.mjs";
|
|
8
|
+
const d = (o = [], t = 0, r = {}) => {
|
|
9
|
+
const e = a.extend(i), p = {
|
|
10
|
+
datas: o,
|
|
11
|
+
index: t,
|
|
12
|
+
ops: {
|
|
13
|
+
closeOnClickModal: !1,
|
|
14
|
+
beforeClose: null,
|
|
15
|
+
click: null,
|
|
16
|
+
modal: !0,
|
|
17
|
+
...r
|
|
18
|
+
}
|
|
19
|
+
}, n = new e({
|
|
20
|
+
data: p
|
|
21
|
+
}).$mount();
|
|
22
|
+
return document.body.appendChild(n.$el), n.isShow = !0, n;
|
|
23
|
+
}, g = (o = {}) => {
|
|
24
|
+
const t = a.extend(s), r = {
|
|
25
|
+
outputSize: 1,
|
|
26
|
+
// 裁剪生成图片的质量(可选0.1 - 1)
|
|
27
|
+
outputType: "jpeg",
|
|
28
|
+
// 裁剪生成图片的格式(jpeg || png || webp)
|
|
29
|
+
info: !0,
|
|
30
|
+
// 图片大小信息
|
|
31
|
+
canScale: !0,
|
|
32
|
+
// 图片是否允许滚轮缩放
|
|
33
|
+
autoCrop: !0,
|
|
34
|
+
// 是否默认生成截图框
|
|
35
|
+
fixed: !1,
|
|
36
|
+
// 是否开启截图框宽高固定比例
|
|
37
|
+
full: !1,
|
|
38
|
+
// false按原比例裁切图片,不失真
|
|
39
|
+
fixedBox: !1,
|
|
40
|
+
// 固定截图框大小,不允许改变
|
|
41
|
+
canMove: !0,
|
|
42
|
+
// 上传图片是否可以移动
|
|
43
|
+
canMoveBox: !0,
|
|
44
|
+
// 截图框能否拖动
|
|
45
|
+
original: !1,
|
|
46
|
+
// 上传图片按照原始比例渲染
|
|
47
|
+
centerBox: !0,
|
|
48
|
+
// 截图框是否被限制在图片里面
|
|
49
|
+
height: !0,
|
|
50
|
+
// 是否按照设备的dpr 输出等比例图片
|
|
51
|
+
infoTrue: !1,
|
|
52
|
+
// true为展示真实输出图片宽高,false展示看到的截图框宽高
|
|
53
|
+
enlarge: 1,
|
|
54
|
+
// 图片根据截图框输出比例倍数
|
|
55
|
+
...o
|
|
56
|
+
}, e = new t({
|
|
57
|
+
data: {
|
|
58
|
+
option: r
|
|
59
|
+
}
|
|
60
|
+
}).$mount();
|
|
61
|
+
return document.body.appendChild(e.$el), e.show(), e;
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
v as configComponents,
|
|
65
|
+
g as imageCropper,
|
|
66
|
+
d as imagePreview,
|
|
67
|
+
w as photoswipe
|
|
68
|
+
};
|