@king-one/antdv 1.0.96 → 1.0.98
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/CHANGELOG.md +12 -0
- package/dist/es/components/cover-scroll-bar/hooks/use-has-scroll.mjs +17 -0
- package/dist/es/components/cover-scroll-bar/index.mjs +10 -0
- package/dist/es/components/cover-scroll-bar/src/cover-scroll-bar.mjs +146 -0
- package/dist/es/components/cover-scroll-bar/src/types.mjs +17 -0
- package/dist/es/components/cover-scroll-bar/style/index.mjs +2 -0
- package/dist/es/components/index.mjs +30 -25
- package/dist/es/components/pro-contract-view/apis/pro-contract-view.api.mjs +10 -0
- package/dist/es/components/pro-contract-view/hooks/use-contract-view.mjs +39 -0
- package/dist/es/components/pro-contract-view/index.mjs +11 -0
- package/dist/es/components/pro-contract-view/src/pro-contract-view.vue.mjs +4 -0
- package/dist/es/components/pro-contract-view/src/pro-contract-view.vue2.mjs +128 -0
- package/dist/es/components/pro-contract-view/src/types.mjs +24 -0
- package/dist/es/components/pro-contract-view/style/index.mjs +2 -0
- package/dist/es/components/pro-loading/index.mjs +5 -0
- package/dist/es/components/pro-loading/src/pro-loading.mjs +59 -0
- package/dist/es/components/pro-loading/src/types.mjs +1 -0
- package/dist/es/components/pro-upload/src/file-list.mjs +5 -5
- package/dist/es/components/pro-upload/src/gd-upload.mjs +99 -88
- package/dist/es/components/pro-upload/src/hooks/useUpload.mjs +24 -21
- package/dist/es/components/pro-upload/src/props.mjs +3 -0
- package/dist/es/index.mjs +54 -44
- package/dist/lib/components/cover-scroll-bar/hooks/use-has-scroll.js +1 -0
- package/dist/lib/components/cover-scroll-bar/index.js +1 -0
- package/dist/lib/components/cover-scroll-bar/src/cover-scroll-bar.js +1 -0
- package/dist/lib/components/cover-scroll-bar/src/types.js +1 -0
- package/dist/lib/components/cover-scroll-bar/style/index.js +1 -0
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/pro-contract-view/apis/pro-contract-view.api.js +1 -0
- package/dist/lib/components/pro-contract-view/hooks/use-contract-view.js +1 -0
- package/dist/lib/components/pro-contract-view/index.js +1 -0
- package/dist/lib/components/pro-contract-view/src/pro-contract-view.vue.js +1 -0
- package/dist/lib/components/pro-contract-view/src/pro-contract-view.vue2.js +1 -0
- package/dist/lib/components/pro-contract-view/src/types.js +1 -0
- package/dist/lib/components/pro-contract-view/style/index.js +1 -0
- package/dist/lib/components/pro-loading/index.js +1 -0
- package/dist/lib/components/pro-loading/src/pro-loading.js +1 -0
- package/dist/lib/components/pro-loading/src/types.js +1 -0
- package/dist/lib/components/pro-upload/src/file-list.js +1 -1
- package/dist/lib/components/pro-upload/src/gd-upload.js +1 -1
- package/dist/lib/components/pro-upload/src/hooks/useUpload.js +1 -1
- package/dist/lib/components/pro-upload/src/props.js +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/theme-chalk/cover-scroll-bar.css +1 -0
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/pro-contract-view.css +1 -0
- package/dist/theme-chalk/pro-modal.css +1 -1
- package/dist/types/components/cover-scroll-bar/hooks/use-has-scroll.d.ts +5 -0
- package/dist/types/components/cover-scroll-bar/index.d.ts +47 -0
- package/dist/types/components/cover-scroll-bar/src/cover-scroll-bar.d.ts +45 -0
- package/dist/types/components/cover-scroll-bar/src/types.d.ts +15 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/pro-contract-view/apis/pro-contract-view.api.d.ts +8 -0
- package/dist/types/components/pro-contract-view/hooks/use-contract-view.d.ts +35 -0
- package/dist/types/components/pro-contract-view/index.d.ts +43 -0
- package/dist/types/components/pro-contract-view/src/pro-contract-view.vue.d.ts +40 -0
- package/dist/types/components/pro-contract-view/src/types.d.ts +34 -0
- package/dist/types/components/pro-loading/index.d.ts +2 -0
- package/dist/types/components/pro-loading/src/pro-loading.d.ts +12 -0
- package/dist/types/components/pro-loading/src/types.d.ts +7 -0
- package/dist/types/components/pro-upload/index.d.ts +10 -1
- package/dist/types/components/pro-upload/src/gd-upload.d.ts +10 -1
- package/dist/types/components/pro-upload/src/props.d.ts +4 -0
- package/global.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ref as l, unref as i, onMounted as u, onBeforeUnmount as h } from "vue";
|
|
2
|
+
function v(o, a = 0) {
|
|
3
|
+
const s = l(!1), c = l(!1), r = () => {
|
|
4
|
+
const e = i(o);
|
|
5
|
+
e && (s.value = e.scrollWidth > e.clientWidth - a, c.value = e.scrollHeight > e.clientHeight);
|
|
6
|
+
};
|
|
7
|
+
return u(() => {
|
|
8
|
+
r();
|
|
9
|
+
const e = new MutationObserver(r), n = new ResizeObserver(r), t = i(o);
|
|
10
|
+
t && (e.observe(t, { childList: !0, subtree: !0, characterData: !0 }), n.observe(t)), h(() => {
|
|
11
|
+
e.disconnect(), n.disconnect();
|
|
12
|
+
});
|
|
13
|
+
}), { hasHorizontalScroll: s, hasVerticalScroll: c };
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
v as useHasScroll
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { withInstall as r } from "../utils/install.mjs";
|
|
2
|
+
import o from "./src/cover-scroll-bar.mjs";
|
|
3
|
+
import "./style/index.mjs";
|
|
4
|
+
import { CoverScrollbarProps as c } from "./src/types.mjs";
|
|
5
|
+
const e = r(o);
|
|
6
|
+
export {
|
|
7
|
+
c as CoverScrollbarProps,
|
|
8
|
+
e as KCoverScrollBar,
|
|
9
|
+
e as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { defineComponent as j, createVNode as d, ref as l, computed as c, onMounted as q, unref as A, onBeforeUnmount as F } from "vue";
|
|
2
|
+
import { off as P, on as z } from "evtd";
|
|
3
|
+
import { useNamespace as G } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { useHasScroll as J } from "../hooks/use-has-scroll.mjs";
|
|
5
|
+
import { CoverScrollbarProps as K } from "./types.mjs";
|
|
6
|
+
const ne = /* @__PURE__ */ j({
|
|
7
|
+
props: K,
|
|
8
|
+
setup(r) {
|
|
9
|
+
const o = l(null), s = l(null), p = l(null), i = l(null), u = l(null), m = l(0), {
|
|
10
|
+
hasVerticalScroll: D
|
|
11
|
+
} = J(o), {
|
|
12
|
+
b: $
|
|
13
|
+
} = G("cover"), V = $("scrollbar");
|
|
14
|
+
function w() {
|
|
15
|
+
o.value && (m.value = o.value.scrollTop);
|
|
16
|
+
}
|
|
17
|
+
const C = () => {
|
|
18
|
+
o.value && (i.value = o.value.clientHeight, u.value = o.value.scrollHeight);
|
|
19
|
+
const {
|
|
20
|
+
value: e
|
|
21
|
+
} = s;
|
|
22
|
+
e && (p.value = e.offsetHeight);
|
|
23
|
+
};
|
|
24
|
+
function S() {
|
|
25
|
+
C(), w();
|
|
26
|
+
}
|
|
27
|
+
const f = l(!1), M = c(() => {
|
|
28
|
+
const {
|
|
29
|
+
value: e
|
|
30
|
+
} = i, {
|
|
31
|
+
value: t
|
|
32
|
+
} = u, {
|
|
33
|
+
value: n
|
|
34
|
+
} = p;
|
|
35
|
+
return !e || !t || !n ? 0 : Math.min(e, n * e / t + 5 * 1.5);
|
|
36
|
+
}), E = c(() => `${M.value}px`), L = c(() => {
|
|
37
|
+
const {
|
|
38
|
+
value: e
|
|
39
|
+
} = i, {
|
|
40
|
+
value: t
|
|
41
|
+
} = m, {
|
|
42
|
+
value: n
|
|
43
|
+
} = u, {
|
|
44
|
+
value: v
|
|
45
|
+
} = p;
|
|
46
|
+
if (e === null || n === null || v === null)
|
|
47
|
+
return 0;
|
|
48
|
+
{
|
|
49
|
+
const R = n - e;
|
|
50
|
+
return R ? t / R * (v - M.value) : 0;
|
|
51
|
+
}
|
|
52
|
+
}), O = c(() => `${L.value}px`), U = c(() => {
|
|
53
|
+
const {
|
|
54
|
+
trigger: e
|
|
55
|
+
} = r;
|
|
56
|
+
return e !== "none" && (e === "always" || f.value);
|
|
57
|
+
});
|
|
58
|
+
let h = !1, y = 0, g = 0, B, b;
|
|
59
|
+
const T = (e) => {
|
|
60
|
+
if (!h) return;
|
|
61
|
+
b !== void 0 && window.clearTimeout(b), B !== void 0 && window.clearTimeout(B);
|
|
62
|
+
const {
|
|
63
|
+
value: t
|
|
64
|
+
} = i, {
|
|
65
|
+
value: n
|
|
66
|
+
} = u, {
|
|
67
|
+
value: v
|
|
68
|
+
} = M;
|
|
69
|
+
if (t === null || n === null) return;
|
|
70
|
+
const _ = (e.clientY - g) * (n - t) / (t - v), k = n - t;
|
|
71
|
+
let a = y + _;
|
|
72
|
+
a = Math.min(k, a), a = Math.max(a, 0);
|
|
73
|
+
const {
|
|
74
|
+
value: x
|
|
75
|
+
} = o;
|
|
76
|
+
x && (x.scrollTop = a);
|
|
77
|
+
}, Y = (e) => {
|
|
78
|
+
e.preventDefault(), e.stopPropagation(), P("mousemove", window, T, !0), P("mouseup", window, Y, !0), h = !1, S();
|
|
79
|
+
}, I = (e) => {
|
|
80
|
+
e.preventDefault(), e.stopPropagation(), z("mousemove", window, T, !0), z("mouseup", window, Y, !0), y = m.value, g = e.clientY, h = !0, f.value = !0;
|
|
81
|
+
}, H = new MutationObserver(S);
|
|
82
|
+
q(() => {
|
|
83
|
+
S();
|
|
84
|
+
const e = A(o);
|
|
85
|
+
e && H.observe(e, {
|
|
86
|
+
childList: !0,
|
|
87
|
+
subtree: !0,
|
|
88
|
+
characterData: !0
|
|
89
|
+
});
|
|
90
|
+
}), F(() => {
|
|
91
|
+
H.disconnect();
|
|
92
|
+
});
|
|
93
|
+
function N(e) {
|
|
94
|
+
w();
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
be: V,
|
|
98
|
+
contentRef: o,
|
|
99
|
+
hasVerticalScroll: D,
|
|
100
|
+
showYBarRef: U,
|
|
101
|
+
yRailRef: s,
|
|
102
|
+
yBarSizePxRef: E,
|
|
103
|
+
yBarTopPxRef: O,
|
|
104
|
+
handleScroll: N,
|
|
105
|
+
handleYScrollMouseDown: I,
|
|
106
|
+
handleMouseLeave: () => {
|
|
107
|
+
h || (f.value = !1);
|
|
108
|
+
},
|
|
109
|
+
handleMouseEnter: () => {
|
|
110
|
+
f.value = !0;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
render() {
|
|
115
|
+
var s;
|
|
116
|
+
const {
|
|
117
|
+
$slots: r
|
|
118
|
+
} = this, o = () => d("div", {
|
|
119
|
+
class: `${this.be}-rail`,
|
|
120
|
+
ref: "yRailRef",
|
|
121
|
+
style: {
|
|
122
|
+
right: `${this.scrollbarOffset}px`
|
|
123
|
+
}
|
|
124
|
+
}, [this.hasVerticalScroll && this.showYBarRef && d("div", {
|
|
125
|
+
class: `${this.be}-rail__scrollbar--vertical`,
|
|
126
|
+
style: {
|
|
127
|
+
height: this.yBarSizePxRef,
|
|
128
|
+
top: this.yBarTopPxRef,
|
|
129
|
+
background: this.scrollbarColor
|
|
130
|
+
},
|
|
131
|
+
onMousedown: this.handleYScrollMouseDown
|
|
132
|
+
}, null, 46, ["onMousedown"])], 6);
|
|
133
|
+
return d("div", {
|
|
134
|
+
class: `${this.be}`,
|
|
135
|
+
onMouseenter: this.handleMouseEnter,
|
|
136
|
+
onMouseleave: this.handleMouseLeave
|
|
137
|
+
}, [d("div", {
|
|
138
|
+
ref: "contentRef",
|
|
139
|
+
class: `${this.be}-container`,
|
|
140
|
+
onScroll: this.handleScroll
|
|
141
|
+
}, [(s = r.default) == null ? void 0 : s.call(r)], 42, ["onScroll"]), o()], 42, ["onMouseenter", "onMouseleave"]);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
export {
|
|
145
|
+
ne as default
|
|
146
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
trigger: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: "hover"
|
|
5
|
+
},
|
|
6
|
+
scrollbarColor: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "rgba(0, 0, 0, 0.1)"
|
|
9
|
+
},
|
|
10
|
+
scrollbarOffset: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: 2
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
r as CoverScrollbarProps
|
|
17
|
+
};
|
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
import { KForm as
|
|
2
|
-
import { KCollapseTranstion as
|
|
3
|
-
import { KProModal as
|
|
4
|
-
import { KProTitle as
|
|
5
|
-
import { KScrollBar as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { KForm as t, KFormItem as m } from "./form/index.mjs";
|
|
2
|
+
import { KCollapseTranstion as K } from "./collapse-transtion/index.mjs";
|
|
3
|
+
import { KProModal as x } from "./pro-modal/index.mjs";
|
|
4
|
+
import { KProTitle as l } from "./pro-title/index.mjs";
|
|
5
|
+
import { KScrollBar as i } from "./scroll-bar/index.mjs";
|
|
6
|
+
import { KCoverScrollBar as n } from "./cover-scroll-bar/index.mjs";
|
|
7
|
+
import { KScaleVirtualList as T } from "./scale-virtual-list/index.mjs";
|
|
8
|
+
import { KProTag as C } from "./pro-tag/index.mjs";
|
|
9
|
+
import { KProPicker as g } from "./pro-picker/index.mjs";
|
|
10
|
+
import { KProArea as B } from "./pro-area/index.mjs";
|
|
11
|
+
import { KProSignature as I } from "./pro-signature/index.mjs";
|
|
11
12
|
import { KProTable as b } from "./pro-table/index.mjs";
|
|
12
|
-
import { KIcon as
|
|
13
|
-
import { KProUpload as
|
|
13
|
+
import { KIcon as v } from "./icon/index.mjs";
|
|
14
|
+
import { KProUpload as A } from "./pro-upload/index.mjs";
|
|
15
|
+
import { KProContractView as M } from "./pro-contract-view/index.mjs";
|
|
16
|
+
import "./pro-loading/index.mjs";
|
|
14
17
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
t as
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
K as KCollapseTranstion,
|
|
19
|
+
n as KCoverScrollBar,
|
|
20
|
+
t as KForm,
|
|
21
|
+
m as KFormItem,
|
|
22
|
+
v as KIcon,
|
|
23
|
+
B as KProArea,
|
|
24
|
+
M as KProContractView,
|
|
25
|
+
x as KProModal,
|
|
26
|
+
g as KProPicker,
|
|
27
|
+
I as KProSignature,
|
|
23
28
|
b as KProTable,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
C as KProTag,
|
|
30
|
+
l as KProTitle,
|
|
31
|
+
A as KProUpload,
|
|
32
|
+
T as KScaleVirtualList,
|
|
33
|
+
i as KScrollBar
|
|
29
34
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
getContractPrefix: (t) => globalThis.$http.get("/contract/uri/prefix", t),
|
|
3
|
+
getSignPrefix: (t) => globalThis.$http.get("/sign/uri/prefix", t),
|
|
4
|
+
getPreviewUrl: (t, e) => globalThis.$http.get(`${t}/redirect/contract-preview-url`, e),
|
|
5
|
+
getFileList: (t, e) => globalThis.$http.get(`${t}/contract/file/detail/list`, e),
|
|
6
|
+
getFilePreview: (t, e) => globalThis.$http.get(`${t}//file/preview`, e)
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
i as proContractViewApi
|
|
10
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ref as o, reactive as p, onMounted as P } from "vue";
|
|
2
|
+
import { proContractViewApi as e } from "../apis/pro-contract-view.api.mjs";
|
|
3
|
+
function u({
|
|
4
|
+
contractId: r
|
|
5
|
+
}) {
|
|
6
|
+
const c = o([]), i = o([]), t = p({
|
|
7
|
+
contractPrefix: "",
|
|
8
|
+
signPrefix: "",
|
|
9
|
+
appToken: "",
|
|
10
|
+
userIdentity: ""
|
|
11
|
+
});
|
|
12
|
+
return P(async () => {
|
|
13
|
+
const { data: a } = await e.getContractPrefix(), { data: n } = await e.getSignPrefix();
|
|
14
|
+
if (a.contractUriPrefix && n.signUriPrefix) {
|
|
15
|
+
t.contractPrefix = a.contractUriPrefix, t.signPrefix = n.signUriPrefix;
|
|
16
|
+
const { data: s } = await e.getPreviewUrl(t.contractPrefix, {
|
|
17
|
+
params: {
|
|
18
|
+
contractId: r
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
t.userIdentity = s.userIdentity, t.appToken = s.appToken;
|
|
22
|
+
const { data: f } = await e.getFileList(t.signPrefix, {
|
|
23
|
+
headers: {
|
|
24
|
+
"SEAL-APP-TOKEN ": t.appToken,
|
|
25
|
+
userIdentity: t.userIdentity
|
|
26
|
+
},
|
|
27
|
+
params: { contractId: r }
|
|
28
|
+
});
|
|
29
|
+
i.value = f;
|
|
30
|
+
}
|
|
31
|
+
}), {
|
|
32
|
+
pageList: c,
|
|
33
|
+
viewStatus: t,
|
|
34
|
+
fileList: i
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
u as useProContractView
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { withInstall as o } from "../utils/install.mjs";
|
|
2
|
+
import "./src/pro-contract-view.vue.mjs";
|
|
3
|
+
import "./style/index.mjs";
|
|
4
|
+
import { useProContractView as n } from "./hooks/use-contract-view.mjs";
|
|
5
|
+
import t from "./src/pro-contract-view.vue2.mjs";
|
|
6
|
+
const e = o(t);
|
|
7
|
+
export {
|
|
8
|
+
e as KProContractView,
|
|
9
|
+
e as default,
|
|
10
|
+
n as useProContractView
|
|
11
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { defineComponent as b, ref as u, computed as C, onMounted as V, watchEffect as z, unref as l, createElementBlock as g, openBlock as h, normalizeClass as d, createVNode as v, createCommentVNode as E, withCtx as H, createElementVNode as w, normalizeStyle as R } from "vue";
|
|
2
|
+
import { Spin as A } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as B } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import "../../index.mjs";
|
|
5
|
+
import { proContractViewApi as T } from "../apis/pro-contract-view.api.mjs";
|
|
6
|
+
import { ProContractViewProps as U } from "./types.mjs";
|
|
7
|
+
import { KScaleVirtualList as $ } from "../../scale-virtual-list/index.mjs";
|
|
8
|
+
const K = ["data-page-index"], M = ["src"], Q = /* @__PURE__ */ b({
|
|
9
|
+
__name: "pro-contract-view",
|
|
10
|
+
props: U,
|
|
11
|
+
setup(x) {
|
|
12
|
+
const o = x, _ = u(null), c = u([]), y = {
|
|
13
|
+
itemHeight: (e) => c.value[e].size,
|
|
14
|
+
overscan: 3
|
|
15
|
+
}, p = u(!0), r = u(null), { b: N, e: m } = B("pro-contract-view"), k = C(() => [
|
|
16
|
+
N()
|
|
17
|
+
]);
|
|
18
|
+
V(() => {
|
|
19
|
+
if (r.value) {
|
|
20
|
+
const e = r.value.parentElement;
|
|
21
|
+
!r.value.clientHeight && (e != null && e.clientHeight) && (r.value.style.height = `${e == null ? void 0 : e.clientHeight}px`);
|
|
22
|
+
}
|
|
23
|
+
}), z(() => {
|
|
24
|
+
const { signPrefix: e, userIdentity: a, appToken: t } = o.viewStatus;
|
|
25
|
+
e && a && t && o.pageList.length > 0 && o.fileId && F(o.pageList);
|
|
26
|
+
});
|
|
27
|
+
function F(e, a) {
|
|
28
|
+
const t = l(e), i = Math.max(...t.map((s) => s.width));
|
|
29
|
+
let n = 1;
|
|
30
|
+
a && (n = Number.parseFloat((a / i).toFixed(2))), c.value = t.map((s) => {
|
|
31
|
+
const S = Number.parseFloat((+s.width * n).toFixed(2)), f = Number.parseFloat((+s.height * n).toFixed(2));
|
|
32
|
+
return {
|
|
33
|
+
url: "",
|
|
34
|
+
loaded: !1,
|
|
35
|
+
width: S,
|
|
36
|
+
height: f,
|
|
37
|
+
size: f + 10,
|
|
38
|
+
pageNum: s.pageNum
|
|
39
|
+
};
|
|
40
|
+
}), p.value = !1;
|
|
41
|
+
}
|
|
42
|
+
function I(e) {
|
|
43
|
+
L(e.start, e.end);
|
|
44
|
+
}
|
|
45
|
+
async function L(e, a) {
|
|
46
|
+
let t = e;
|
|
47
|
+
for (; t <= a; ) {
|
|
48
|
+
const i = c.value[t];
|
|
49
|
+
if (!i)
|
|
50
|
+
return;
|
|
51
|
+
if (!i.loaded) {
|
|
52
|
+
i.loaded = !0;
|
|
53
|
+
const n = await P(t + 1);
|
|
54
|
+
i.url = n;
|
|
55
|
+
}
|
|
56
|
+
t++;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function P(e) {
|
|
60
|
+
const { viewStatus: a, fileId: t } = o;
|
|
61
|
+
return (await T.getFilePreview(a.signPrefix, {
|
|
62
|
+
headers: {
|
|
63
|
+
"SEAL-APP-TOKEN ": a.appToken,
|
|
64
|
+
userIdentity: a.userIdentity
|
|
65
|
+
},
|
|
66
|
+
params: {
|
|
67
|
+
fileId: t,
|
|
68
|
+
pageNum: e,
|
|
69
|
+
pageSize: 1,
|
|
70
|
+
absoluteEnable: !0
|
|
71
|
+
}
|
|
72
|
+
})).data.pages[e - 1].url;
|
|
73
|
+
}
|
|
74
|
+
return (e, a) => (h(), g(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
ref_key: "containerRef",
|
|
78
|
+
ref: r,
|
|
79
|
+
class: d(k.value)
|
|
80
|
+
},
|
|
81
|
+
[
|
|
82
|
+
v(l(A), {
|
|
83
|
+
tip: "Loading...",
|
|
84
|
+
spinning: p.value
|
|
85
|
+
}, null, 8, ["spinning"]),
|
|
86
|
+
p.value ? E("v-if", !0) : (h(), g(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
key: 0,
|
|
90
|
+
class: d(l(m)("content"))
|
|
91
|
+
},
|
|
92
|
+
[
|
|
93
|
+
v(l($), {
|
|
94
|
+
ref_key: "virtualListRef",
|
|
95
|
+
ref: _,
|
|
96
|
+
list: c.value,
|
|
97
|
+
option: y,
|
|
98
|
+
"onUpdate:state": I
|
|
99
|
+
}, {
|
|
100
|
+
default: H(({ index: t, item: i }) => [
|
|
101
|
+
w("div", {
|
|
102
|
+
"data-page-index": t + 1,
|
|
103
|
+
class: d(l(m)("content-item")),
|
|
104
|
+
style: R({ height: `${i.data.height}px`, width: `${i.data.width}px`, marginBottom: "10px" })
|
|
105
|
+
}, [
|
|
106
|
+
w("img", {
|
|
107
|
+
src: i.data.url,
|
|
108
|
+
width: "100%",
|
|
109
|
+
alt: ""
|
|
110
|
+
}, null, 8, M)
|
|
111
|
+
], 14, K)
|
|
112
|
+
]),
|
|
113
|
+
_: 1
|
|
114
|
+
/* STABLE */
|
|
115
|
+
}, 8, ["list"])
|
|
116
|
+
],
|
|
117
|
+
2
|
|
118
|
+
/* CLASS */
|
|
119
|
+
))
|
|
120
|
+
],
|
|
121
|
+
2
|
|
122
|
+
/* CLASS */
|
|
123
|
+
));
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
export {
|
|
127
|
+
Q as default
|
|
128
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { definePropType as e } from "../../utils/install.mjs";
|
|
2
|
+
const r = {
|
|
3
|
+
viewStatus: {
|
|
4
|
+
type: e(Object),
|
|
5
|
+
required: !0
|
|
6
|
+
},
|
|
7
|
+
fileId: {
|
|
8
|
+
type: String
|
|
9
|
+
},
|
|
10
|
+
pageList: {
|
|
11
|
+
type: e(Array),
|
|
12
|
+
default: () => []
|
|
13
|
+
}
|
|
14
|
+
// fileId: {
|
|
15
|
+
// type: definePropType<string>(String)
|
|
16
|
+
// },
|
|
17
|
+
// fileList: {
|
|
18
|
+
// type: definePropType<fileType[]>(Array),
|
|
19
|
+
// default: () => []
|
|
20
|
+
// }
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
r as ProContractViewProps
|
|
24
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as d, h as a, createApp as p } from "vue";
|
|
2
|
+
import { Spin as m } from "ant-design-vue";
|
|
3
|
+
let i;
|
|
4
|
+
function f(e) {
|
|
5
|
+
const { target: t, ...n } = e, o = d({
|
|
6
|
+
name: "Spin",
|
|
7
|
+
setup() {
|
|
8
|
+
return () => a("div", null, a(m, { ...n }));
|
|
9
|
+
}
|
|
10
|
+
}), r = p(o), c = r.mount(document.createElement("div"));
|
|
11
|
+
function u() {
|
|
12
|
+
var s, l;
|
|
13
|
+
(l = (s = c.$el) == null ? void 0 : s.parentNode) == null || l.removeChild(c.$el), r.unmount(), i = void 0;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
close: u,
|
|
17
|
+
get $el() {
|
|
18
|
+
return c.$el;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function g(e = {}) {
|
|
23
|
+
if (i)
|
|
24
|
+
return i;
|
|
25
|
+
const t = y(e), n = f({
|
|
26
|
+
...t
|
|
27
|
+
});
|
|
28
|
+
return v(n, e), t.target.appendChild(n.$el), i = n, n;
|
|
29
|
+
}
|
|
30
|
+
function y(e) {
|
|
31
|
+
let t;
|
|
32
|
+
return ((o) => typeof o == "string")(e.target) ? t = document.querySelector(e.target) ?? document.body : t = e.target || document.body, {
|
|
33
|
+
...e,
|
|
34
|
+
target: t
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function v(e, t = {}) {
|
|
38
|
+
const n = {
|
|
39
|
+
position: t.target ? "absolute" : "fixed",
|
|
40
|
+
zIndex: 2e3,
|
|
41
|
+
top: 0,
|
|
42
|
+
right: 0,
|
|
43
|
+
bottom: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
46
|
+
display: "flex",
|
|
47
|
+
justifyContent: "center",
|
|
48
|
+
alignItems: "center"
|
|
49
|
+
};
|
|
50
|
+
for (const [o, r] of Object.entries(n))
|
|
51
|
+
e.$el.style[o] = r;
|
|
52
|
+
}
|
|
53
|
+
const C = {
|
|
54
|
+
service: g
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
f as createSpinComponent,
|
|
58
|
+
C as default
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -31,7 +31,7 @@ const z = /* @__PURE__ */ u({
|
|
|
31
31
|
deleteFileApi: d
|
|
32
32
|
} = w(i.http), {
|
|
33
33
|
downloadFile: p
|
|
34
|
-
} = v(i.http), n = x(i.list),
|
|
34
|
+
} = v(i.http), n = x(i.list), r = async (t) => {
|
|
35
35
|
try {
|
|
36
36
|
const l = await d({
|
|
37
37
|
params: {
|
|
@@ -40,9 +40,9 @@ const z = /* @__PURE__ */ u({
|
|
|
40
40
|
});
|
|
41
41
|
l.status === 0 ? (o.success("文件删除成功~"), n.value = n.value.filter((c) => t.id !== c.id), s("update:list", n.value)) : o.error(l.msg);
|
|
42
42
|
} catch (l) {
|
|
43
|
-
console.log(l);
|
|
43
|
+
console.log(l), o.error(l);
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, a = async (t) => {
|
|
46
46
|
t.spining = !0, await p([t.id]) && (t.spining = !1);
|
|
47
47
|
};
|
|
48
48
|
return () => e(h, null, [n.value.map((t) => e("div", {
|
|
@@ -73,7 +73,7 @@ const z = /* @__PURE__ */ u({
|
|
|
73
73
|
alignItems: "center",
|
|
74
74
|
justifyContent: "center"
|
|
75
75
|
},
|
|
76
|
-
onClick: () =>
|
|
76
|
+
onClick: () => r(t)
|
|
77
77
|
}, [e(y, {
|
|
78
78
|
style: {
|
|
79
79
|
fontSize: "8px",
|
|
@@ -90,7 +90,7 @@ const z = /* @__PURE__ */ u({
|
|
|
90
90
|
color: "#cccccc",
|
|
91
91
|
cursor: "pointer"
|
|
92
92
|
},
|
|
93
|
-
onClick: () =>
|
|
93
|
+
onClick: () => a(t)
|
|
94
94
|
}, null, 8, ["onClick"]) : "", e("div", null, [t.type === "img" ? e(m, {
|
|
95
95
|
src: t.icon,
|
|
96
96
|
style: {
|