@king-one/antdv 1.0.55 → 1.0.57
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/pro-modal/src/Modal.mjs +39 -13
- package/dist/es/components/pro-modal/src/types.mjs +5 -4
- package/dist/es/components/scroll-bar/src/scroll-bar.mjs +224 -136
- package/dist/lib/components/pro-modal/src/Modal.js +1 -1
- package/dist/lib/components/pro-modal/src/types.js +1 -1
- package/dist/lib/components/scroll-bar/src/scroll-bar.js +1 -1
- package/dist/theme-chalk/icon.css +1 -1
- package/dist/theme-chalk/index.css +1 -1
- package/dist/types/components/pro-modal/index.d.ts +12 -10
- package/dist/types/components/pro-modal/src/Modal.d.ts +12 -10
- package/dist/types/components/pro-modal/src/types.d.ts +3 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,44 @@
|
|
|
1
|
-
import { defineComponent as p } from "vue";
|
|
2
|
-
import { Modal as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as c, computed as p, createVNode as u, mergeProps as s } from "vue";
|
|
2
|
+
import { Modal as f } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as C } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { ProModalProps as i } from "./types.mjs";
|
|
5
|
+
const M = /* @__PURE__ */ c({
|
|
6
|
+
props: i,
|
|
7
|
+
emits: ["update:modelValue", "onCancel", "onConfirm"],
|
|
8
|
+
setup(a, {
|
|
9
|
+
slots: o,
|
|
10
|
+
emit: n
|
|
11
|
+
}) {
|
|
12
|
+
const {
|
|
13
|
+
b: l
|
|
14
|
+
} = C("pro-modal"), t = p(() => l()), r = p({
|
|
15
|
+
get() {
|
|
16
|
+
return a.modelValue;
|
|
17
|
+
},
|
|
18
|
+
set(e) {
|
|
19
|
+
n("update:modelValue", e);
|
|
12
20
|
}
|
|
13
|
-
})
|
|
21
|
+
}), d = () => {
|
|
22
|
+
n("onConfirm");
|
|
23
|
+
}, m = () => {
|
|
24
|
+
n("onCancel");
|
|
25
|
+
};
|
|
26
|
+
return () => u(f, s({
|
|
27
|
+
open: r.value,
|
|
28
|
+
"onUpdate:open": (e) => r.value = e
|
|
29
|
+
}, a.modalProps, {
|
|
30
|
+
onOk: d,
|
|
31
|
+
onCancel: m,
|
|
32
|
+
"wrap-class-name": t.value
|
|
33
|
+
}), {
|
|
34
|
+
default: () => {
|
|
35
|
+
var e;
|
|
36
|
+
return (e = o.default) == null ? void 0 : e.call(o);
|
|
37
|
+
},
|
|
38
|
+
_: 1
|
|
39
|
+
}, 16, ["open", "onUpdate:open", "onOk", "onCancel", "wrap-class-name"]);
|
|
14
40
|
}
|
|
15
41
|
});
|
|
16
42
|
export {
|
|
17
|
-
|
|
43
|
+
M as default
|
|
18
44
|
};
|
|
@@ -1,169 +1,257 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VResizeObserver as
|
|
3
|
-
import { off as
|
|
4
|
-
import { defaultNamespace as
|
|
5
|
-
import { scrollbarProps as
|
|
6
|
-
|
|
1
|
+
import { isVNode as ie, defineComponent as ce, onMounted as se, ref as a, computed as i, createVNode as u, mergeProps as ue } from "vue";
|
|
2
|
+
import { VResizeObserver as k } from "vueuc";
|
|
3
|
+
import { off as y, on as M } from "evtd";
|
|
4
|
+
import { defaultNamespace as f } from "../../../hooks/use-namespace/index.mjs";
|
|
5
|
+
import { scrollbarProps as fe } from "./types.mjs";
|
|
6
|
+
function de(o) {
|
|
7
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !ie(o);
|
|
8
|
+
}
|
|
9
|
+
const we = /* @__PURE__ */ ce({
|
|
7
10
|
name: "KScrollbar",
|
|
8
|
-
props:
|
|
11
|
+
props: fe,
|
|
9
12
|
inheritAttrs: !1,
|
|
10
|
-
setup(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
setup(o) {
|
|
14
|
+
se(() => {
|
|
15
|
+
o.container || R();
|
|
13
16
|
});
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
},
|
|
17
|
+
const d = () => {
|
|
18
|
+
R();
|
|
19
|
+
}, b = () => {
|
|
20
|
+
R();
|
|
21
|
+
}, p = a(null), x = a(null), m = a(null), P = a(null), s = a(null), h = a(null), v = a(null), S = a(null), T = a(null), X = a(null), q = i(() => {
|
|
19
22
|
var e;
|
|
20
|
-
return ((e =
|
|
21
|
-
}),
|
|
23
|
+
return ((e = o.content) == null ? void 0 : e.call(o)) || p.value;
|
|
24
|
+
}), B = i(() => {
|
|
22
25
|
var e;
|
|
23
|
-
return ((e =
|
|
24
|
-
}),
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
return ((e = o.container) == null ? void 0 : e.call(o)) || x.value;
|
|
27
|
+
}), Y = a(0), C = a(0), F = i(() => {
|
|
28
|
+
const {
|
|
29
|
+
value: e
|
|
30
|
+
} = v, {
|
|
31
|
+
value: n
|
|
32
|
+
} = s;
|
|
33
|
+
return e !== null && n !== null && n > e;
|
|
34
|
+
}), H = i(() => {
|
|
35
|
+
const {
|
|
36
|
+
value: e
|
|
37
|
+
} = v, {
|
|
38
|
+
value: n
|
|
39
|
+
} = s, {
|
|
40
|
+
value: t
|
|
41
|
+
} = T;
|
|
42
|
+
return e === null || n === null || t === null ? 0 : Math.min(e, t * e / n + 5 * 1.5);
|
|
43
|
+
}), G = i(() => `${H.value}px`), J = i(() => {
|
|
44
|
+
const {
|
|
45
|
+
value: e
|
|
46
|
+
} = v, {
|
|
47
|
+
value: n
|
|
48
|
+
} = Y, {
|
|
49
|
+
value: t
|
|
50
|
+
} = s, {
|
|
51
|
+
value: r
|
|
52
|
+
} = T;
|
|
53
|
+
if (e === null || t === null || r === null)
|
|
33
54
|
return 0;
|
|
34
55
|
{
|
|
35
|
-
const
|
|
36
|
-
return
|
|
56
|
+
const l = t - e;
|
|
57
|
+
return l ? n / l * (r - H.value) : 0;
|
|
37
58
|
}
|
|
38
|
-
}),
|
|
39
|
-
let
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
}), Q = i(() => `${J.value}px`);
|
|
60
|
+
let L = !1, N = 0, V = 0, g, z;
|
|
61
|
+
const U = (e) => {
|
|
62
|
+
if (!L) return;
|
|
63
|
+
z !== void 0 && window.clearTimeout(z), g !== void 0 && window.clearTimeout(g);
|
|
64
|
+
const {
|
|
65
|
+
value: n
|
|
66
|
+
} = v, {
|
|
67
|
+
value: t
|
|
68
|
+
} = s, {
|
|
69
|
+
value: r
|
|
70
|
+
} = H;
|
|
71
|
+
if (n === null || t === null) return;
|
|
72
|
+
const D = (e.clientY - V) * (t - n) / (n - r), _ = t - n;
|
|
73
|
+
let c = N + D;
|
|
74
|
+
c = Math.min(_, c), c = Math.max(c, 0);
|
|
75
|
+
const {
|
|
76
|
+
value: w
|
|
77
|
+
} = B;
|
|
78
|
+
w && (w.scrollTop = c);
|
|
79
|
+
}, j = (e) => {
|
|
80
|
+
e.preventDefault(), e.stopPropagation(), y("mousemove", window, U, !0), y("mouseup", window, j, !0), L = !1, R();
|
|
81
|
+
}, Z = (e) => {
|
|
82
|
+
e.preventDefault(), e.stopPropagation(), M("mousemove", window, U, !0), M("mouseup", window, j, !0), N = Y.value, V = e.clientY, L = !0;
|
|
56
83
|
};
|
|
57
|
-
function
|
|
58
|
-
const {
|
|
59
|
-
|
|
84
|
+
function ee(e) {
|
|
85
|
+
const {
|
|
86
|
+
onScroll: n
|
|
87
|
+
} = o;
|
|
88
|
+
n && n(e), K();
|
|
60
89
|
}
|
|
61
|
-
const
|
|
62
|
-
const {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
const ne = i(() => {
|
|
91
|
+
const {
|
|
92
|
+
value: e
|
|
93
|
+
} = S, {
|
|
94
|
+
value: n
|
|
95
|
+
} = h;
|
|
96
|
+
return e !== null && n !== null && n > e;
|
|
97
|
+
}), W = i(() => {
|
|
98
|
+
const {
|
|
99
|
+
value: e
|
|
100
|
+
} = S, {
|
|
101
|
+
value: n
|
|
102
|
+
} = h, {
|
|
103
|
+
value: t
|
|
104
|
+
} = X;
|
|
105
|
+
return e === null || n === null || t === null ? 0 : t * e / n + 5 * 1.5;
|
|
106
|
+
}), te = i(() => `${W.value}px`), oe = i(() => {
|
|
107
|
+
const {
|
|
108
|
+
value: e
|
|
109
|
+
} = S, {
|
|
110
|
+
value: n
|
|
111
|
+
} = C, {
|
|
112
|
+
value: t
|
|
113
|
+
} = h, {
|
|
114
|
+
value: r
|
|
115
|
+
} = X;
|
|
116
|
+
if (e === null || t === null || r === null)
|
|
70
117
|
return 0;
|
|
71
118
|
{
|
|
72
|
-
const
|
|
73
|
-
return
|
|
119
|
+
const l = t - e;
|
|
120
|
+
return l ? n / l * (r - W.value) : 0;
|
|
74
121
|
}
|
|
75
|
-
}), le =
|
|
76
|
-
let
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
122
|
+
}), le = i(() => `${oe.value}px`);
|
|
123
|
+
let $ = !1, O = 0, E = 0;
|
|
124
|
+
const I = (e) => {
|
|
125
|
+
if (!$) return;
|
|
126
|
+
z !== void 0 && window.clearTimeout(z), g !== void 0 && window.clearTimeout(g);
|
|
127
|
+
const {
|
|
128
|
+
value: n
|
|
129
|
+
} = S, {
|
|
130
|
+
value: t
|
|
131
|
+
} = h, {
|
|
132
|
+
value: r
|
|
133
|
+
} = W;
|
|
134
|
+
if (n === null || t === null) return;
|
|
135
|
+
const D = (e.clientX - E) * (t - n) / (n - r), _ = t - n;
|
|
136
|
+
let c = O + D;
|
|
137
|
+
c = Math.min(_, c), c = Math.max(c, 0);
|
|
138
|
+
const {
|
|
139
|
+
value: w
|
|
140
|
+
} = B;
|
|
141
|
+
w && (w.scrollLeft = c);
|
|
142
|
+
}, A = (e) => {
|
|
143
|
+
e.preventDefault(), e.stopPropagation(), y("mousemove", window, I, !0), y("mouseup", window, A, !0), $ = !1, R();
|
|
91
144
|
};
|
|
92
|
-
function
|
|
93
|
-
e.preventDefault(), e.stopPropagation(),
|
|
145
|
+
function re(e) {
|
|
146
|
+
e.preventDefault(), e.stopPropagation(), $ = !0, M("mousemove", window, I, !0), M("mouseup", window, A, !0), O = C.value, E = e.clientX;
|
|
94
147
|
}
|
|
95
|
-
function
|
|
96
|
-
const {
|
|
97
|
-
|
|
148
|
+
function K() {
|
|
149
|
+
const {
|
|
150
|
+
value: e
|
|
151
|
+
} = B;
|
|
152
|
+
e && (Y.value = e.scrollTop, C.value = e.scrollLeft);
|
|
98
153
|
}
|
|
99
|
-
const
|
|
100
|
-
const {
|
|
154
|
+
const ae = () => {
|
|
155
|
+
const {
|
|
156
|
+
value: e
|
|
157
|
+
} = q;
|
|
101
158
|
if (e) {
|
|
102
|
-
const
|
|
103
|
-
s.value =
|
|
159
|
+
const l = e.getBoundingClientRect();
|
|
160
|
+
s.value = l.height, h.value = l.width;
|
|
104
161
|
}
|
|
105
|
-
const {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
162
|
+
const {
|
|
163
|
+
value: n
|
|
164
|
+
} = B;
|
|
165
|
+
if (n) {
|
|
166
|
+
const l = n.getBoundingClientRect();
|
|
167
|
+
v.value = l.height, S.value = l.width;
|
|
109
168
|
}
|
|
110
|
-
const {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
169
|
+
const {
|
|
170
|
+
value: t
|
|
171
|
+
} = m;
|
|
172
|
+
t && (T.value = t.offsetHeight);
|
|
173
|
+
const {
|
|
174
|
+
value: r
|
|
175
|
+
} = P;
|
|
176
|
+
r && (X.value = r.offsetWidth);
|
|
114
177
|
};
|
|
115
|
-
function
|
|
116
|
-
|
|
178
|
+
function R() {
|
|
179
|
+
ae(), K();
|
|
117
180
|
}
|
|
118
181
|
return {
|
|
119
|
-
sync:
|
|
120
|
-
handleContentResize:
|
|
121
|
-
handleContainerResize:
|
|
122
|
-
contentRef:
|
|
123
|
-
yRailRef:
|
|
124
|
-
xRailRef:
|
|
125
|
-
containerRef:
|
|
182
|
+
sync: R,
|
|
183
|
+
handleContentResize: d,
|
|
184
|
+
handleContainerResize: b,
|
|
185
|
+
contentRef: p,
|
|
186
|
+
yRailRef: m,
|
|
187
|
+
xRailRef: P,
|
|
188
|
+
containerRef: x,
|
|
126
189
|
contentHeightRef: s,
|
|
127
|
-
containerHeightRef:
|
|
128
|
-
needYBarRef:
|
|
129
|
-
needXBarRef:
|
|
130
|
-
yBarSizePxRef:
|
|
131
|
-
handleYScrollMouseDown:
|
|
132
|
-
handleXScrollMouseDown:
|
|
133
|
-
yBarTopPxRef:
|
|
134
|
-
handleScroll:
|
|
190
|
+
containerHeightRef: v,
|
|
191
|
+
needYBarRef: F,
|
|
192
|
+
needXBarRef: ne,
|
|
193
|
+
yBarSizePxRef: G,
|
|
194
|
+
handleYScrollMouseDown: Z,
|
|
195
|
+
handleXScrollMouseDown: re,
|
|
196
|
+
yBarTopPxRef: Q,
|
|
197
|
+
handleScroll: ee,
|
|
135
198
|
xBarSizePxRef: te,
|
|
136
199
|
xBarLeftPxRef: le
|
|
137
200
|
};
|
|
138
201
|
},
|
|
139
202
|
render() {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
203
|
+
let o;
|
|
204
|
+
const {
|
|
205
|
+
$slots: d,
|
|
206
|
+
xScrollable: b
|
|
207
|
+
} = this, p = () => u("div", {
|
|
208
|
+
class: `${f}-scrollbar-rail ${f}-scrollbar-rail--horizontal`,
|
|
209
|
+
ref: "xRailRef"
|
|
210
|
+
}, [this.needXBarRef && u("div", {
|
|
211
|
+
class: `${f}-scrollbar-rail__scrollbar--horizontal`,
|
|
212
|
+
style: {
|
|
213
|
+
width: this.xBarSizePxRef,
|
|
214
|
+
left: this.xBarLeftPxRef
|
|
215
|
+
},
|
|
216
|
+
onMousedown: this.handleXScrollMouseDown
|
|
217
|
+
}, null, 44, ["onMousedown"])], 512), x = () => u("div", {
|
|
218
|
+
class: `${f}-scrollbar-rail ${f}-scrollbar-rail--vertical`,
|
|
219
|
+
ref: "yRailRef"
|
|
220
|
+
}, [this.needYBarRef && u("div", {
|
|
221
|
+
class: `${f}-scrollbar-rail__scrollbar--vertical`,
|
|
222
|
+
style: {
|
|
223
|
+
height: this.yBarSizePxRef,
|
|
224
|
+
top: this.yBarTopPxRef
|
|
225
|
+
},
|
|
226
|
+
onMousedown: this.handleYScrollMouseDown
|
|
227
|
+
}, null, 44, ["onMousedown"])], 512), m = () => {
|
|
228
|
+
var s;
|
|
229
|
+
return u("div", ue({
|
|
230
|
+
class: `${f}-scrollbar`
|
|
231
|
+
}, this.$attrs), [this.container ? (s = d.default) == null ? void 0 : s.call(d) : u("div", {
|
|
232
|
+
class: `${f}-scrollbar-container`,
|
|
233
|
+
onScroll: this.handleScroll,
|
|
234
|
+
ref: "containerRef"
|
|
235
|
+
}, [u(k, {
|
|
236
|
+
onResize: this.handleContentResize
|
|
237
|
+
}, {
|
|
238
|
+
default: () => {
|
|
239
|
+
var h;
|
|
240
|
+
return [u("div", {
|
|
241
|
+
ref: "contentRef",
|
|
242
|
+
class: `${f}-scrollbar-content`
|
|
243
|
+
}, [(h = d.default) == null ? void 0 : h.call(d)], 512)];
|
|
244
|
+
}
|
|
245
|
+
}, 8, ["onResize"])], 40, ["onScroll"]), x(), b && p()], 16);
|
|
163
246
|
};
|
|
164
|
-
return this.container ?
|
|
247
|
+
return this.container ? m() : u(k, {
|
|
248
|
+
onResize: this.handleContainerResize
|
|
249
|
+
}, de(o = m()) ? o : {
|
|
250
|
+
default: () => [o],
|
|
251
|
+
_: 1
|
|
252
|
+
}, 8, ["onResize"]);
|
|
165
253
|
}
|
|
166
254
|
});
|
|
167
255
|
export {
|
|
168
|
-
|
|
256
|
+
we as default
|
|
169
257
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),p=require("ant-design-vue"),s=require("../../../hooks/use-namespace/index.js"),m=require("./types.js"),i=n.defineComponent({props:m.ProModalProps,emits:["update:modelValue","onCancel","onConfirm"],setup(r,{slots:o,emit:a}){const{b:u}=s.useNamespace("pro-modal"),l=n.computed(()=>u()),t=n.computed({get(){return r.modelValue},set(e){a("update:modelValue",e)}}),c=()=>{a("onConfirm")},d=()=>{a("onCancel")};return()=>n.createVNode(p.Modal,n.mergeProps({open:t.value,"onUpdate:open":e=>t.value=e},r.modalProps,{onOk:c,onCancel:d,"wrap-class-name":l.value}),{default:()=>{var e;return(e=o.default)==null?void 0:e.call(o)},_:1},16,["open","onUpdate:open","onOk","onCancel","wrap-class-name"])}});exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={modalProps:{type:Object},modelValue:{type:Boolean,required:!0}};exports.ProModalProps=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),E=require("vueuc"),d=require("evtd"),u=require("../../../hooks/use-namespace/index.js"),le=require("./types.js");function re(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!t.isVNode(l)}const ae=t.defineComponent({name:"KScrollbar",props:le.scrollbarProps,inheritAttrs:!1,setup(l){t.onMounted(()=>{l.container||h()});const s=()=>{h()},z=()=>{h()},S=t.ref(null),w=t.ref(null),m=t.ref(null),y=t.ref(null),i=t.ref(null),f=t.ref(null),v=t.ref(null),R=t.ref(null),M=t.ref(null),b=t.ref(null),I=t.computed(()=>{var e;return((e=l.content)==null?void 0:e.call(l))||S.value}),x=t.computed(()=>{var e;return((e=l.container)==null?void 0:e.call(l))||w.value}),N=t.ref(0),P=t.ref(0),A=t.computed(()=>{const{value:e}=v,{value:n}=i;return e!==null&&n!==null&&n>e}),T=t.computed(()=>{const{value:e}=v,{value:n}=i,{value:o}=M;return e===null||n===null||o===null?0:Math.min(e,o*e/n+5*1.5)}),K=t.computed(()=>`${T.value}px`),k=t.computed(()=>{const{value:e}=v,{value:n}=N,{value:o}=i,{value:a}=M;if(e===null||o===null||a===null)return 0;{const r=o-e;return r?n/r*(a-T.value):0}}),F=t.computed(()=>`${k.value}px`);let V=!1,L=0,W=0,B,g;const $=e=>{if(!V)return;g!==void 0&&window.clearTimeout(g),B!==void 0&&window.clearTimeout(B);const{value:n}=v,{value:o}=i,{value:a}=T;if(n===null||o===null)return;const C=(e.clientY-W)*(o-n)/(n-a),H=o-n;let c=L+C;c=Math.min(H,c),c=Math.max(c,0);const{value:p}=x;p&&(p.scrollTop=c)},D=e=>{e.preventDefault(),e.stopPropagation(),d.off("mousemove",window,$,!0),d.off("mouseup",window,D,!0),V=!1,h()},G=e=>{e.preventDefault(),e.stopPropagation(),d.on("mousemove",window,$,!0),d.on("mouseup",window,D,!0),L=N.value,W=e.clientY,V=!0};function J(e){const{onScroll:n}=l;n&&n(e),U()}const Q=t.computed(()=>{const{value:e}=R,{value:n}=f;return e!==null&&n!==null&&n>e}),X=t.computed(()=>{const{value:e}=R,{value:n}=f,{value:o}=b;return e===null||n===null||o===null?0:o*e/n+5*1.5}),Z=t.computed(()=>`${X.value}px`),ee=t.computed(()=>{const{value:e}=R,{value:n}=P,{value:o}=f,{value:a}=b;if(e===null||o===null||a===null)return 0;{const r=o-e;return r?n/r*(a-X.value):0}}),te=t.computed(()=>`${ee.value}px`);let Y=!1,_=0,q=0;const O=e=>{if(!Y)return;g!==void 0&&window.clearTimeout(g),B!==void 0&&window.clearTimeout(B);const{value:n}=R,{value:o}=f,{value:a}=X;if(n===null||o===null)return;const C=(e.clientX-q)*(o-n)/(n-a),H=o-n;let c=_+C;c=Math.min(H,c),c=Math.max(c,0);const{value:p}=x;p&&(p.scrollLeft=c)},j=e=>{e.preventDefault(),e.stopPropagation(),d.off("mousemove",window,O,!0),d.off("mouseup",window,j,!0),Y=!1,h()};function ne(e){e.preventDefault(),e.stopPropagation(),Y=!0,d.on("mousemove",window,O,!0),d.on("mouseup",window,j,!0),_=P.value,q=e.clientX}function U(){const{value:e}=x;e&&(N.value=e.scrollTop,P.value=e.scrollLeft)}const oe=()=>{const{value:e}=I;if(e){const r=e.getBoundingClientRect();i.value=r.height,f.value=r.width}const{value:n}=x;if(n){const r=n.getBoundingClientRect();v.value=r.height,R.value=r.width}const{value:o}=m;o&&(M.value=o.offsetHeight);const{value:a}=y;a&&(b.value=a.offsetWidth)};function h(){oe(),U()}return{sync:h,handleContentResize:s,handleContainerResize:z,contentRef:S,yRailRef:m,xRailRef:y,containerRef:w,contentHeightRef:i,containerHeightRef:v,needYBarRef:A,needXBarRef:Q,yBarSizePxRef:K,handleYScrollMouseDown:G,handleXScrollMouseDown:ne,yBarTopPxRef:F,handleScroll:J,xBarSizePxRef:Z,xBarLeftPxRef:te}},render(){let l;const{$slots:s,xScrollable:z}=this,S=()=>t.createVNode("div",{class:`${u.defaultNamespace}-scrollbar-rail ${u.defaultNamespace}-scrollbar-rail--horizontal`,ref:"xRailRef"},[this.needXBarRef&&t.createVNode("div",{class:`${u.defaultNamespace}-scrollbar-rail__scrollbar--horizontal`,style:{width:this.xBarSizePxRef,left:this.xBarLeftPxRef},onMousedown:this.handleXScrollMouseDown},null,44,["onMousedown"])],512),w=()=>t.createVNode("div",{class:`${u.defaultNamespace}-scrollbar-rail ${u.defaultNamespace}-scrollbar-rail--vertical`,ref:"yRailRef"},[this.needYBarRef&&t.createVNode("div",{class:`${u.defaultNamespace}-scrollbar-rail__scrollbar--vertical`,style:{height:this.yBarSizePxRef,top:this.yBarTopPxRef},onMousedown:this.handleYScrollMouseDown},null,44,["onMousedown"])],512),m=()=>{var i;return t.createVNode("div",t.mergeProps({class:`${u.defaultNamespace}-scrollbar`},this.$attrs),[this.container?(i=s.default)==null?void 0:i.call(s):t.createVNode("div",{class:`${u.defaultNamespace}-scrollbar-container`,onScroll:this.handleScroll,ref:"containerRef"},[t.createVNode(E.VResizeObserver,{onResize:this.handleContentResize},{default:()=>{var f;return[t.createVNode("div",{ref:"contentRef",class:`${u.defaultNamespace}-scrollbar-content`},[(f=s.default)==null?void 0:f.call(s)],512)]}},8,["onResize"])],40,["onScroll"]),w(),z&&S()],16)};return this.container?m():t.createVNode(E.VResizeObserver,{onResize:this.handleContainerResize},re(l=m())?l:{default:()=>[l],_:1},8,["onResize"])}});exports.default=ae;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=96456) format("woff2"),url(fonts/iconfont.woff?t=88136) format("woff"),url(fonts/iconfont.ttf?t=9101) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=
|
|
1
|
+
:root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=45736) format("woff2"),url(fonts/iconfont.woff?t=57995) format("woff"),url(fonts/iconfont.ttf?t=91719) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
|
|
@@ -6,19 +6,21 @@ export declare const KProModal: SFCWithInstall<DefineComponent<{
|
|
|
6
6
|
readonly modalProps: {
|
|
7
7
|
readonly type: PropType<Omit< ModalFuncProps, "open">>;
|
|
8
8
|
};
|
|
9
|
-
readonly
|
|
10
|
-
readonly type:
|
|
11
|
-
|
|
12
|
-
}>;
|
|
9
|
+
readonly modelValue: {
|
|
10
|
+
readonly type: BooleanConstructor;
|
|
11
|
+
readonly required: true;
|
|
13
12
|
};
|
|
14
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
13
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "update:modelValue" | "onConfirm")[], "onCancel" | "update:modelValue" | "onConfirm", PublicProps, Readonly< ExtractPropTypes<{
|
|
15
14
|
readonly modalProps: {
|
|
16
15
|
readonly type: PropType<Omit< ModalFuncProps, "open">>;
|
|
17
16
|
};
|
|
18
|
-
readonly
|
|
19
|
-
readonly type:
|
|
20
|
-
|
|
21
|
-
}>;
|
|
17
|
+
readonly modelValue: {
|
|
18
|
+
readonly type: BooleanConstructor;
|
|
19
|
+
readonly required: true;
|
|
22
20
|
};
|
|
23
|
-
}
|
|
21
|
+
}>> & {
|
|
22
|
+
onOnCancel?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
onOnConfirm?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
}, {}, {}>>;
|
|
24
26
|
export default KProModal;
|
|
@@ -4,19 +4,21 @@ declare const _default: DefineComponent<{
|
|
|
4
4
|
readonly modalProps: {
|
|
5
5
|
readonly type: PropType<Omit< ModalFuncProps, "open">>;
|
|
6
6
|
};
|
|
7
|
-
readonly
|
|
8
|
-
readonly type:
|
|
9
|
-
|
|
10
|
-
}>;
|
|
7
|
+
readonly modelValue: {
|
|
8
|
+
readonly type: BooleanConstructor;
|
|
9
|
+
readonly required: true;
|
|
11
10
|
};
|
|
12
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
11
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "update:modelValue" | "onConfirm")[], "onCancel" | "update:modelValue" | "onConfirm", PublicProps, Readonly< ExtractPropTypes<{
|
|
13
12
|
readonly modalProps: {
|
|
14
13
|
readonly type: PropType<Omit< ModalFuncProps, "open">>;
|
|
15
14
|
};
|
|
16
|
-
readonly
|
|
17
|
-
readonly type:
|
|
18
|
-
|
|
19
|
-
}>;
|
|
15
|
+
readonly modelValue: {
|
|
16
|
+
readonly type: BooleanConstructor;
|
|
17
|
+
readonly required: true;
|
|
20
18
|
};
|
|
21
|
-
}
|
|
19
|
+
}>> & {
|
|
20
|
+
onOnCancel?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onOnConfirm?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}, {}, {}>;
|
|
22
24
|
export default _default;
|
|
@@ -5,10 +5,9 @@ export declare const ProModalProps: {
|
|
|
5
5
|
readonly modalProps: {
|
|
6
6
|
readonly type: PropType<Omit<ModalType, "open">>;
|
|
7
7
|
};
|
|
8
|
-
readonly
|
|
9
|
-
readonly type:
|
|
10
|
-
|
|
11
|
-
}>;
|
|
8
|
+
readonly modelValue: {
|
|
9
|
+
readonly type: BooleanConstructor;
|
|
10
|
+
readonly required: true;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
export {};
|