@king-one/antdv 1.0.57 → 1.0.58

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/es/components/pro-modal/index.mjs +8 -7
  3. package/dist/es/components/pro-modal/src/ProModal.vue.mjs +4 -0
  4. package/dist/es/components/pro-modal/src/ProModal.vue2.mjs +82 -0
  5. package/dist/es/components/pro-modal/src/types.mjs +4 -0
  6. package/dist/es/components/scroll-bar/index.mjs +6 -5
  7. package/dist/es/components/scroll-bar/src/scroll-bar.mjs +163 -156
  8. package/dist/es/components/scroll-bar/src/types.mjs +4 -3
  9. package/dist/es/components/scroll-bar/style/index.mjs +2 -0
  10. package/dist/lib/components/pro-modal/index.js +1 -1
  11. package/dist/lib/components/pro-modal/src/ProModal.vue.js +1 -0
  12. package/dist/lib/components/pro-modal/src/ProModal.vue2.js +1 -0
  13. package/dist/lib/components/pro-modal/src/types.js +1 -1
  14. package/dist/lib/components/scroll-bar/index.js +1 -1
  15. package/dist/lib/components/scroll-bar/src/scroll-bar.js +1 -1
  16. package/dist/lib/components/scroll-bar/src/types.js +1 -1
  17. package/dist/lib/components/scroll-bar/style/index.js +1 -0
  18. package/dist/theme-chalk/icon.css +1 -1
  19. package/dist/theme-chalk/index.css +1 -1
  20. package/dist/theme-chalk/pro-modal.css +1 -1
  21. package/dist/types/components/pro-modal/index.d.ts +81 -13
  22. package/dist/types/components/pro-modal/src/Modal.d.ts +12 -4
  23. package/dist/types/components/pro-modal/src/ProModal.vue.d.ts +52 -0
  24. package/dist/types/components/pro-modal/src/types.d.ts +5 -1
  25. package/dist/types/components/scroll-bar/index.d.ts +7 -3
  26. package/dist/types/components/scroll-bar/src/scroll-bar.d.ts +7 -3
  27. package/dist/types/components/scroll-bar/src/types.d.ts +1 -0
  28. package/package.json +1 -2
  29. package/dist/es/components/pro-modal/src/Modal.mjs +0 -44
  30. package/dist/lib/components/pro-modal/src/Modal.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @king-one/antdv
2
2
 
3
+ ## 1.0.58
4
+
5
+ ### Patch Changes
6
+
7
+ - feat:modal 增加拖拽功能
8
+
3
9
  ## 1.0.57
4
10
 
5
11
  ### Patch Changes
@@ -1,11 +1,12 @@
1
1
  import { withInstall as o } from "../utils/install.mjs";
2
- import r from "./src/Modal.mjs";
2
+ import "./src/ProModal.vue.mjs";
3
3
  import "./style/index.mjs";
4
- import { useProModal as i, useProModalInit as p } from "./hooks/useProModal.mjs";
5
- const m = o(r);
4
+ import { useProModal as e, useProModalInit as f } from "./hooks/useProModal.mjs";
5
+ import r from "./src/ProModal.vue2.mjs";
6
+ const l = o(r);
6
7
  export {
7
- m as KProModal,
8
- m as default,
9
- i as useProModal,
10
- p as useProModalInit
8
+ l as KProModal,
9
+ l as default,
10
+ e as useProModal,
11
+ f as useProModalInit
11
12
  };
@@ -0,0 +1,4 @@
1
+ import f from "./ProModal.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,82 @@
1
+ import { defineComponent as X, mergeModels as M, ref as e, useModel as Y, computed as y, watch as R, watchEffect as _, openBlock as b, createBlock as w, unref as $, mergeProps as E, withCtx as c, createElementVNode as P, toDisplayString as N, normalizeStyle as q, resolveDynamicComponent as z, renderSlot as O } from "vue";
2
+ import { Modal as U } from "ant-design-vue";
3
+ import { useNamespace as j } from "../../../hooks/use-namespace/index.mjs";
4
+ import { useDraggable as A } from "@vueuse/core";
5
+ import { ProModalProps as F } from "./types.mjs";
6
+ const L = /* @__PURE__ */ X({
7
+ name: "ProModal",
8
+ __name: "ProModal",
9
+ props: /* @__PURE__ */ M(F, {
10
+ modelValue: { required: !0, type: Boolean },
11
+ modelModifiers: {}
12
+ }),
13
+ emits: /* @__PURE__ */ M(["onConfirm", "onCancel"], ["update:modelValue"]),
14
+ setup(k, { emit: x }) {
15
+ const d = x, l = e(null), v = Y(k, "modelValue"), { b: B } = j("pro-modal"), D = y(() => B());
16
+ function S() {
17
+ d("onConfirm");
18
+ }
19
+ function T() {
20
+ d("onCancel");
21
+ }
22
+ const { x: r, y: u, isDragging: f } = A(l), p = e(0), g = e(0), n = e(!1), s = e(0), m = e(0), h = e(0), C = e(0), t = e({ left: 0, right: 0, top: 0, bottom: 0 });
23
+ R([r, u], () => {
24
+ if (!n.value && l.value) {
25
+ p.value = r.value, g.value = u.value;
26
+ const o = document.body.getBoundingClientRect(), a = l.value.getBoundingClientRect();
27
+ t.value.right = o.width - a.width, t.value.bottom = o.height - a.height, h.value = s.value, C.value = m.value;
28
+ }
29
+ n.value = !0;
30
+ }), R(f, () => {
31
+ f || (n.value = !1);
32
+ }), _(() => {
33
+ n.value && (s.value = h.value + Math.min(Math.max(t.value.left, r.value), t.value.right) - p.value, m.value = C.value + Math.min(Math.max(t.value.top, u.value), t.value.bottom) - g.value);
34
+ });
35
+ const V = y(() => ({
36
+ transform: `translate(${s.value}px, ${m.value}px)`
37
+ }));
38
+ return (o, a) => (b(), w($(U), E({
39
+ open: v.value,
40
+ "onUpdate:open": a[0] || (a[0] = (i) => v.value = i)
41
+ }, o.modalProps, {
42
+ "wrap-class-name": D.value,
43
+ onOk: S,
44
+ onCancel: T
45
+ }), {
46
+ title: c(() => [
47
+ P(
48
+ "div",
49
+ {
50
+ ref_key: "modalTitleRef",
51
+ ref: l,
52
+ class: "pro-modal-title"
53
+ },
54
+ N(o.title),
55
+ 513
56
+ /* TEXT, NEED_PATCH */
57
+ )
58
+ ]),
59
+ modalRender: c(({ originVNode: i }) => [
60
+ P(
61
+ "div",
62
+ {
63
+ style: q(V.value)
64
+ },
65
+ [
66
+ (b(), w(z(i)))
67
+ ],
68
+ 4
69
+ /* STYLE */
70
+ )
71
+ ]),
72
+ default: c(() => [
73
+ O(o.$slots, "default")
74
+ ]),
75
+ _: 3
76
+ /* FORWARDED */
77
+ }, 16, ["open", "wrap-class-name"]));
78
+ }
79
+ });
80
+ export {
81
+ L as default
82
+ };
@@ -5,6 +5,10 @@ const e = {
5
5
  modelValue: {
6
6
  type: Boolean,
7
7
  required: !0
8
+ },
9
+ title: {
10
+ type: String,
11
+ required: !0
8
12
  }
9
13
  };
10
14
  export {
@@ -1,9 +1,10 @@
1
1
  import { withInstall as r } from "../utils/install.mjs";
2
2
  import o from "./src/scroll-bar.mjs";
3
- import { scrollbarProps as s } from "./src/types.mjs";
4
- const a = r(o);
3
+ import "./style/index.mjs";
4
+ import { scrollbarProps as c } from "./src/types.mjs";
5
+ const m = r(o);
5
6
  export {
6
- a as KScrollBar,
7
- a as default,
8
- s as scrollbarProps
7
+ m as KScrollBar,
8
+ m as default,
9
+ c as scrollbarProps
9
10
  };
@@ -1,257 +1,264 @@
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({
1
+ import { defineComponent as ue, onMounted as se, ref as l, computed as r, createVNode as h, mergeProps as fe } from "vue";
2
+ import { useResizeObserver as k } from "@vueuse/core";
3
+ import { off as T, on as X } from "evtd";
4
+ import { defaultNamespace as s } from "../../../hooks/use-namespace/index.mjs";
5
+ import { scrollbarProps as de } from "./types.mjs";
6
+ const Me = /* @__PURE__ */ ue({
10
7
  name: "KScrollbar",
11
- props: fe,
8
+ props: de,
12
9
  inheritAttrs: !1,
13
10
  setup(o) {
14
11
  se(() => {
15
- o.container || R();
12
+ o.container || v();
16
13
  });
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(() => {
14
+ const R = l(null), m = l(null), x = l(null), Y = l(null), d = l(null), f = l(null), u = l(null), S = l(null), b = l(null), L = l(null), q = r(() => {
22
15
  var e;
23
- return ((e = o.content) == null ? void 0 : e.call(o)) || p.value;
24
- }), B = i(() => {
16
+ return ((e = o.content) == null ? void 0 : e.call(o)) || R.value;
17
+ }), g = r(() => {
25
18
  var e;
26
- return ((e = o.container) == null ? void 0 : e.call(o)) || x.value;
27
- }), Y = a(0), C = a(0), F = i(() => {
19
+ return ((e = o.container) == null ? void 0 : e.call(o)) || m.value;
20
+ }), H = l(0), W = l(0);
21
+ k(R, () => {
22
+ v();
23
+ }), k(m, () => {
24
+ v();
25
+ });
26
+ const F = r(() => {
28
27
  const {
29
28
  value: e
30
- } = v, {
29
+ } = u, {
31
30
  value: n
32
- } = s;
31
+ } = d;
33
32
  return e !== null && n !== null && n > e;
34
- }), H = i(() => {
33
+ }), w = l(!1), G = r(() => {
34
+ const {
35
+ trigger: e
36
+ } = o;
37
+ return e === "none" || w.value;
38
+ }), $ = r(() => {
35
39
  const {
36
40
  value: e
37
- } = v, {
41
+ } = u, {
38
42
  value: n
39
- } = s, {
43
+ } = d, {
40
44
  value: t
41
- } = T;
45
+ } = b;
42
46
  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(() => {
47
+ }), J = r(() => `${$.value}px`), Q = r(() => {
44
48
  const {
45
49
  value: e
46
- } = v, {
50
+ } = u, {
47
51
  value: n
48
- } = Y, {
52
+ } = H, {
49
53
  value: t
50
- } = s, {
51
- value: r
52
- } = T;
53
- if (e === null || t === null || r === null)
54
+ } = d, {
55
+ value: c
56
+ } = b;
57
+ if (e === null || t === null || c === null)
54
58
  return 0;
55
59
  {
56
- const l = t - e;
57
- return l ? n / l * (r - H.value) : 0;
60
+ const a = t - e;
61
+ return a ? n / a * (c - $.value) : 0;
58
62
  }
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);
63
+ }), Z = r(() => `${Q.value}px`);
64
+ let p = !1, N = 0, U = 0, y, z;
65
+ const _ = (e) => {
66
+ if (!p) return;
67
+ z !== void 0 && window.clearTimeout(z), y !== void 0 && window.clearTimeout(y);
64
68
  const {
65
69
  value: n
66
- } = v, {
70
+ } = u, {
67
71
  value: t
68
- } = s, {
69
- value: r
70
- } = H;
72
+ } = d, {
73
+ value: c
74
+ } = $;
71
75
  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);
76
+ const C = (e.clientY - U) * (t - n) / (n - c), E = t - n;
77
+ let i = N + C;
78
+ i = Math.min(E, i), i = Math.max(i, 0);
75
79
  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;
80
+ value: M
81
+ } = g;
82
+ M && (M.scrollTop = i);
83
+ }, V = (e) => {
84
+ e.preventDefault(), e.stopPropagation(), T("mousemove", window, _, !0), T("mouseup", window, V, !0), p = !1, w.value = !1, v();
85
+ }, ee = (e) => {
86
+ e.preventDefault(), e.stopPropagation(), X("mousemove", window, _, !0), X("mouseup", window, V, !0), N = H.value, U = e.clientY, p = !0, w.value = !0;
83
87
  };
84
- function ee(e) {
88
+ function ne(e) {
85
89
  const {
86
90
  onScroll: n
87
91
  } = o;
88
- n && n(e), K();
92
+ n && n(e), j();
89
93
  }
90
- const ne = i(() => {
94
+ const te = r(() => {
91
95
  const {
92
96
  value: e
93
97
  } = S, {
94
98
  value: n
95
- } = h;
99
+ } = f;
96
100
  return e !== null && n !== null && n > e;
97
- }), W = i(() => {
101
+ }), B = l(!1), oe = r(() => {
102
+ const {
103
+ trigger: e
104
+ } = o;
105
+ return e === "none" || B.value;
106
+ }), D = r(() => {
98
107
  const {
99
108
  value: e
100
109
  } = S, {
101
110
  value: n
102
- } = h, {
111
+ } = f, {
103
112
  value: t
104
- } = X;
113
+ } = L;
105
114
  return e === null || n === null || t === null ? 0 : t * e / n + 5 * 1.5;
106
- }), te = i(() => `${W.value}px`), oe = i(() => {
115
+ }), le = r(() => `${D.value}px`), re = r(() => {
107
116
  const {
108
117
  value: e
109
118
  } = S, {
110
119
  value: n
111
- } = C, {
120
+ } = W, {
112
121
  value: t
113
- } = h, {
114
- value: r
115
- } = X;
116
- if (e === null || t === null || r === null)
122
+ } = f, {
123
+ value: c
124
+ } = L;
125
+ if (e === null || t === null || c === null)
117
126
  return 0;
118
127
  {
119
- const l = t - e;
120
- return l ? n / l * (r - W.value) : 0;
128
+ const a = t - e;
129
+ return a ? n / a * (c - D.value) : 0;
121
130
  }
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);
131
+ }), ae = r(() => `${re.value}px`);
132
+ let P = !1, I = 0, A = 0;
133
+ const K = (e) => {
134
+ if (!P) return;
135
+ z !== void 0 && window.clearTimeout(z), y !== void 0 && window.clearTimeout(y);
127
136
  const {
128
137
  value: n
129
138
  } = S, {
130
139
  value: t
131
- } = h, {
132
- value: r
133
- } = W;
140
+ } = f, {
141
+ value: c
142
+ } = D;
134
143
  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);
144
+ const C = (e.clientX - A) * (t - n) / (n - c), E = t - n;
145
+ let i = I + C;
146
+ i = Math.min(E, i), i = Math.max(i, 0);
138
147
  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();
148
+ value: M
149
+ } = g;
150
+ M && (M.scrollLeft = i);
151
+ }, O = (e) => {
152
+ e.preventDefault(), e.stopPropagation(), T("mousemove", window, K, !0), T("mouseup", window, O, !0), B.value = !1, P = !1, v();
144
153
  };
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;
154
+ function ce(e) {
155
+ e.preventDefault(), e.stopPropagation(), P = !0, B.value = !0, X("mousemove", window, K, !0), X("mouseup", window, O, !0), I = W.value, A = e.clientX;
147
156
  }
148
- function K() {
157
+ function j() {
149
158
  const {
150
159
  value: e
151
- } = B;
152
- e && (Y.value = e.scrollTop, C.value = e.scrollLeft);
160
+ } = g;
161
+ e && (H.value = e.scrollTop, W.value = e.scrollLeft);
153
162
  }
154
- const ae = () => {
163
+ const ie = () => {
155
164
  const {
156
165
  value: e
157
166
  } = q;
158
167
  if (e) {
159
- const l = e.getBoundingClientRect();
160
- s.value = l.height, h.value = l.width;
168
+ const a = e.getBoundingClientRect();
169
+ d.value = a.height, f.value = a.width;
161
170
  }
162
171
  const {
163
172
  value: n
164
- } = B;
173
+ } = g;
165
174
  if (n) {
166
- const l = n.getBoundingClientRect();
167
- v.value = l.height, S.value = l.width;
175
+ const a = n.getBoundingClientRect();
176
+ u.value = a.height, S.value = a.width;
168
177
  }
169
178
  const {
170
179
  value: t
171
- } = m;
172
- t && (T.value = t.offsetHeight);
180
+ } = x;
181
+ t && (b.value = t.offsetHeight);
173
182
  const {
174
- value: r
175
- } = P;
176
- r && (X.value = r.offsetWidth);
183
+ value: c
184
+ } = Y;
185
+ c && (L.value = c.offsetWidth);
177
186
  };
178
- function R() {
179
- ae(), K();
187
+ function v() {
188
+ ie(), j();
180
189
  }
181
190
  return {
182
- sync: R,
183
- handleContentResize: d,
184
- handleContainerResize: b,
185
- contentRef: p,
186
- yRailRef: m,
187
- xRailRef: P,
188
- containerRef: x,
189
- contentHeightRef: s,
190
- containerHeightRef: v,
191
+ showYBarRef: G,
192
+ showXBarRef: oe,
193
+ sync: v,
194
+ handleMouseEnter: () => {
195
+ w.value = !0, B.value = !0;
196
+ },
197
+ handleMouseLeave: () => {
198
+ p || (w.value = !1), P || (B.value = !1);
199
+ },
200
+ // handleContentResize,
201
+ // handleContainerResize,
202
+ contentRef: R,
203
+ yRailRef: x,
204
+ xRailRef: Y,
205
+ containerRef: m,
206
+ contentHeightRef: d,
207
+ containerHeightRef: u,
191
208
  needYBarRef: F,
192
- needXBarRef: ne,
193
- yBarSizePxRef: G,
194
- handleYScrollMouseDown: Z,
195
- handleXScrollMouseDown: re,
196
- yBarTopPxRef: Q,
197
- handleScroll: ee,
198
- xBarSizePxRef: te,
199
- xBarLeftPxRef: le
209
+ needXBarRef: te,
210
+ yBarSizePxRef: J,
211
+ handleYScrollMouseDown: ee,
212
+ handleXScrollMouseDown: ce,
213
+ yBarTopPxRef: Z,
214
+ handleScroll: ne,
215
+ xBarSizePxRef: le,
216
+ xBarLeftPxRef: ae
200
217
  };
201
218
  },
202
219
  render() {
203
- let o;
204
220
  const {
205
- $slots: d,
206
- xScrollable: b
207
- } = this, p = () => u("div", {
208
- class: `${f}-scrollbar-rail ${f}-scrollbar-rail--horizontal`,
221
+ $slots: o,
222
+ xScrollable: R
223
+ } = this, m = () => h("div", {
224
+ class: `${s}-scrollbar-rail ${s}-scrollbar-rail--horizontal`,
209
225
  ref: "xRailRef"
210
- }, [this.needXBarRef && u("div", {
211
- class: `${f}-scrollbar-rail__scrollbar--horizontal`,
226
+ }, [this.needXBarRef && this.showXBarRef && h("div", {
227
+ class: `${s}-scrollbar-rail__scrollbar--horizontal`,
212
228
  style: {
213
229
  width: this.xBarSizePxRef,
214
230
  left: this.xBarLeftPxRef
215
231
  },
216
232
  onMousedown: this.handleXScrollMouseDown
217
- }, null, 44, ["onMousedown"])], 512), x = () => u("div", {
218
- class: `${f}-scrollbar-rail ${f}-scrollbar-rail--vertical`,
233
+ }, null, 44, ["onMousedown"])], 512), x = () => h("div", {
234
+ class: `${s}-scrollbar-rail ${s}-scrollbar-rail--vertical`,
219
235
  ref: "yRailRef"
220
- }, [this.needYBarRef && u("div", {
221
- class: `${f}-scrollbar-rail__scrollbar--vertical`,
236
+ }, [this.needYBarRef && this.showYBarRef && h("div", {
237
+ class: `${s}-scrollbar-rail__scrollbar--vertical`,
222
238
  style: {
223
239
  height: this.yBarSizePxRef,
224
240
  top: this.yBarTopPxRef
225
241
  },
226
242
  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`,
243
+ }, null, 44, ["onMousedown"])], 512);
244
+ return (() => {
245
+ var f, u;
246
+ return h("div", fe({
247
+ class: `${s}-scrollbar`
248
+ }, this.$attrs, {
249
+ onMouseenter: this.handleMouseEnter,
250
+ onMouseleave: this.handleMouseLeave
251
+ }), [this.container ? (f = o.default) == null ? void 0 : f.call(o) : h("div", {
252
+ class: `${s}-scrollbar-container`,
233
253
  onScroll: this.handleScroll,
234
254
  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);
246
- };
247
- return this.container ? m() : u(k, {
248
- onResize: this.handleContainerResize
249
- }, de(o = m()) ? o : {
250
- default: () => [o],
251
- _: 1
252
- }, 8, ["onResize"]);
255
+ }, [h("div", {
256
+ ref: "contentRef",
257
+ class: `${s}-scrollbar-content`
258
+ }, [(u = o.default) == null ? void 0 : u.call(o)], 512)], 40, ["onScroll"]), x(), R && m()], 16, ["onMouseenter", "onMouseleave"]);
259
+ })();
253
260
  }
254
261
  });
255
262
  export {
256
- we as default
263
+ Me as default
257
264
  };
@@ -1,9 +1,10 @@
1
- const o = {
1
+ const n = {
2
2
  container: Function,
3
3
  content: Function,
4
4
  onScroll: Function,
5
- xScrollable: Boolean
5
+ xScrollable: Boolean,
6
+ trigger: String
6
7
  };
7
8
  export {
8
- o as scrollbarProps
9
+ n as scrollbarProps
9
10
  };
@@ -0,0 +1,2 @@
1
+ import "../../base/style/index.mjs";
2
+ import "@king-one/antdv/dist/theme-chalk/scroll-bar.css";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../utils/install.js"),l=require("./src/Modal.js");require("./style/index.js");const e=require("./hooks/useProModal.js"),o=r.withInstall(l.default);exports.useProModal=e.useProModal;exports.useProModalInit=e.useProModalInit;exports.KProModal=o;exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../utils/install.js");require("./src/ProModal.vue.js");require("./style/index.js");const e=require("./hooks/useProModal.js"),t=require("./src/ProModal.vue2.js"),o=r.withInstall(t.default);exports.useProModal=e.useProModal;exports.useProModalInit=e.useProModalInit;exports.KProModal=o;exports.default=o;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProModal.vue2.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("ant-design-vue"),B=require("../../../hooks/use-namespace/index.js"),P=require("@vueuse/core"),q=require("./types.js"),D=e.defineComponent({name:"ProModal",__name:"ProModal",props:e.mergeModels(q.ProModalProps,{modelValue:{required:!0,type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["onConfirm","onCancel"],["update:modelValue"]),setup(C,{emit:M}){const d=M,l=e.ref(null),m=e.useModel(C,"modelValue"),{b:y}=B.useNamespace("pro-modal"),w=e.computed(()=>y());function b(){d("onConfirm")}function R(){d("onCancel")}const{x:r,y:u,isDragging:f}=P.useDraggable(l),v=e.ref(0),p=e.ref(0),n=e.ref(!1),s=e.ref(0),i=e.ref(0),g=e.ref(0),h=e.ref(0),t=e.ref({left:0,right:0,top:0,bottom:0});e.watch([r,u],()=>{if(!n.value&&l.value){v.value=r.value,p.value=u.value;const o=document.body.getBoundingClientRect(),a=l.value.getBoundingClientRect();t.value.right=o.width-a.width,t.value.bottom=o.height-a.height,g.value=s.value,h.value=i.value}n.value=!0}),e.watch(f,()=>{f||(n.value=!1)}),e.watchEffect(()=>{n.value&&(s.value=g.value+Math.min(Math.max(t.value.left,r.value),t.value.right)-v.value,i.value=h.value+Math.min(Math.max(t.value.top,u.value),t.value.bottom)-p.value)});const k=e.computed(()=>({transform:`translate(${s.value}px, ${i.value}px)`}));return(o,a)=>(e.openBlock(),e.createBlock(e.unref(x.Modal),e.mergeProps({open:m.value,"onUpdate:open":a[0]||(a[0]=c=>m.value=c)},o.modalProps,{"wrap-class-name":w.value,onOk:b,onCancel:R}),{title:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"modalTitleRef",ref:l,class:"pro-modal-title"},e.toDisplayString(o.title),513)]),modalRender:e.withCtx(({originVNode:c})=>[e.createElementVNode("div",{style:e.normalizeStyle(k.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c)))],4)]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["open","wrap-class-name"]))}});exports.default=D;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={modalProps:{type:Object},modelValue:{type:Boolean,required:!0}};exports.ProModalProps=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={modalProps:{type:Object},modelValue:{type:Boolean,required:!0},title:{type:String,required:!0}};exports.ProModalProps=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../utils/install.js"),l=require("./src/scroll-bar.js"),t=require("./src/types.js"),r=e.withInstall(l.default);exports.scrollbarProps=t.scrollbarProps;exports.KScrollBar=r;exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../utils/install.js"),l=require("./src/scroll-bar.js");require("./style/index.js");const t=require("./src/types.js"),r=e.withInstall(l.default);exports.scrollbarProps=t.scrollbarProps;exports.KScrollBar=r;exports.default=r;
@@ -1 +1 @@
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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),I=require("@vueuse/core"),f=require("evtd"),s=require("../../../hooks/use-namespace/index.js"),ae=require("./types.js"),ce=t.defineComponent({name:"KScrollbar",props:ae.scrollbarProps,inheritAttrs:!1,setup(l){t.onMounted(()=>{l.container||v()});const h=t.ref(null),m=t.ref(null),B=t.ref(null),z=t.ref(null),d=t.ref(null),i=t.ref(null),u=t.ref(null),R=t.ref(null),N=t.ref(null),P=t.ref(null),j=t.computed(()=>{var e;return((e=l.content)==null?void 0:e.call(l))||h.value}),M=t.computed(()=>{var e;return((e=l.container)==null?void 0:e.call(l))||m.value}),T=t.ref(0),X=t.ref(0);I.useResizeObserver(h,()=>{v()}),I.useResizeObserver(m,()=>{v()});const A=t.computed(()=>{const{value:e}=u,{value:n}=d;return e!==null&&n!==null&&n>e}),S=t.ref(!1),K=t.computed(()=>{const{trigger:e}=l;return e==="none"||S.value}),Y=t.computed(()=>{const{value:e}=u,{value:n}=d,{value:o}=N;return e===null||n===null||o===null?0:Math.min(e,o*e/n+5*1.5)}),k=t.computed(()=>`${Y.value}px`),F=t.computed(()=>{const{value:e}=u,{value:n}=T,{value:o}=d,{value:a}=N;if(e===null||o===null||a===null)return 0;{const r=o-e;return r?n/r*(a-Y.value):0}}),G=t.computed(()=>`${F.value}px`);let g=!1,$=0,D=0,x,y;const C=e=>{if(!g)return;y!==void 0&&window.clearTimeout(y),x!==void 0&&window.clearTimeout(x);const{value:n}=u,{value:o}=d,{value:a}=Y;if(n===null||o===null)return;const H=(e.clientY-D)*(o-n)/(n-a),W=o-n;let c=$+H;c=Math.min(W,c),c=Math.max(c,0);const{value:w}=M;w&&(w.scrollTop=c)},V=e=>{e.preventDefault(),e.stopPropagation(),f.off("mousemove",window,C,!0),f.off("mouseup",window,V,!0),g=!1,S.value=!1,v()},J=e=>{e.preventDefault(),e.stopPropagation(),f.on("mousemove",window,C,!0),f.on("mouseup",window,V,!0),$=T.value,D=e.clientY,g=!0,S.value=!0};function Q(e){const{onScroll:n}=l;n&&n(e),O()}const Z=t.computed(()=>{const{value:e}=R,{value:n}=i;return e!==null&&n!==null&&n>e}),p=t.ref(!1),ee=t.computed(()=>{const{trigger:e}=l;return e==="none"||p.value}),L=t.computed(()=>{const{value:e}=R,{value:n}=i,{value:o}=P;return e===null||n===null||o===null?0:o*e/n+5*1.5}),te=t.computed(()=>`${L.value}px`),ne=t.computed(()=>{const{value:e}=R,{value:n}=X,{value:o}=i,{value:a}=P;if(e===null||o===null||a===null)return 0;{const r=o-e;return r?n/r*(a-L.value):0}}),oe=t.computed(()=>`${ne.value}px`);let b=!1,_=0,q=0;const E=e=>{if(!b)return;y!==void 0&&window.clearTimeout(y),x!==void 0&&window.clearTimeout(x);const{value:n}=R,{value:o}=i,{value:a}=L;if(n===null||o===null)return;const H=(e.clientX-q)*(o-n)/(n-a),W=o-n;let c=_+H;c=Math.min(W,c),c=Math.max(c,0);const{value:w}=M;w&&(w.scrollLeft=c)},U=e=>{e.preventDefault(),e.stopPropagation(),f.off("mousemove",window,E,!0),f.off("mouseup",window,U,!0),p.value=!1,b=!1,v()};function le(e){e.preventDefault(),e.stopPropagation(),b=!0,p.value=!0,f.on("mousemove",window,E,!0),f.on("mouseup",window,U,!0),_=X.value,q=e.clientX}function O(){const{value:e}=M;e&&(T.value=e.scrollTop,X.value=e.scrollLeft)}const re=()=>{const{value:e}=j;if(e){const r=e.getBoundingClientRect();d.value=r.height,i.value=r.width}const{value:n}=M;if(n){const r=n.getBoundingClientRect();u.value=r.height,R.value=r.width}const{value:o}=B;o&&(N.value=o.offsetHeight);const{value:a}=z;a&&(P.value=a.offsetWidth)};function v(){re(),O()}return{showYBarRef:K,showXBarRef:ee,sync:v,handleMouseEnter:()=>{S.value=!0,p.value=!0},handleMouseLeave:()=>{g||(S.value=!1),b||(p.value=!1)},contentRef:h,yRailRef:B,xRailRef:z,containerRef:m,contentHeightRef:d,containerHeightRef:u,needYBarRef:A,needXBarRef:Z,yBarSizePxRef:k,handleYScrollMouseDown:J,handleXScrollMouseDown:le,yBarTopPxRef:G,handleScroll:Q,xBarSizePxRef:te,xBarLeftPxRef:oe}},render(){const{$slots:l,xScrollable:h}=this,m=()=>t.createVNode("div",{class:`${s.defaultNamespace}-scrollbar-rail ${s.defaultNamespace}-scrollbar-rail--horizontal`,ref:"xRailRef"},[this.needXBarRef&&this.showXBarRef&&t.createVNode("div",{class:`${s.defaultNamespace}-scrollbar-rail__scrollbar--horizontal`,style:{width:this.xBarSizePxRef,left:this.xBarLeftPxRef},onMousedown:this.handleXScrollMouseDown},null,44,["onMousedown"])],512),B=()=>t.createVNode("div",{class:`${s.defaultNamespace}-scrollbar-rail ${s.defaultNamespace}-scrollbar-rail--vertical`,ref:"yRailRef"},[this.needYBarRef&&this.showYBarRef&&t.createVNode("div",{class:`${s.defaultNamespace}-scrollbar-rail__scrollbar--vertical`,style:{height:this.yBarSizePxRef,top:this.yBarTopPxRef},onMousedown:this.handleYScrollMouseDown},null,44,["onMousedown"])],512);return(()=>{var i,u;return t.createVNode("div",t.mergeProps({class:`${s.defaultNamespace}-scrollbar`},this.$attrs,{onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave}),[this.container?(i=l.default)==null?void 0:i.call(l):t.createVNode("div",{class:`${s.defaultNamespace}-scrollbar-container`,onScroll:this.handleScroll,ref:"containerRef"},[t.createVNode("div",{ref:"contentRef",class:`${s.defaultNamespace}-scrollbar-content`},[(u=l.default)==null?void 0:u.call(l)],512)],40,["onScroll"]),B(),h&&m()],16,["onMouseenter","onMouseleave"])})()}});exports.default=ce;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={container:Function,content:Function,onScroll:Function,xScrollable:Boolean};exports.scrollbarProps=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={container:Function,content:Function,onScroll:Function,xScrollable:Boolean,trigger:String};exports.scrollbarProps=o;
@@ -0,0 +1 @@
1
+ "use strict";require("../../base/style/index.js");require("@king-one/antdv/dist/theme-chalk/scroll-bar.css");
@@ -1 +1 @@
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
+ @font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=68436) format("woff2"),url(fonts/iconfont.woff?t=85068) format("woff"),url(fonts/iconfont.ttf?t=70278) 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=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"}
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-modal .ant-modal-title{flex:1}.king-pro-modal .pro-modal-title{cursor:move;width:100%}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=18903) format("woff2"),url(fonts/iconfont.woff?t=35687) format("woff"),url(fonts/iconfont.ttf?t=35932) 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
- .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}
1
+ .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-modal .ant-modal-title{flex:1}.king-pro-modal .pro-modal-title{cursor:move;width:100%}
@@ -1,26 +1,94 @@
1
1
  import { SFCWithInstall } from '../utils/install';
2
- import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
3
3
  import { ModalFuncProps } from 'ant-design-vue';
4
4
  export * from './hooks/useProModal';
5
- export declare const KProModal: SFCWithInstall<DefineComponent<{
6
- readonly modalProps: {
7
- readonly type: PropType<Omit< ModalFuncProps, "open">>;
5
+ export declare const KProModal: SFCWithInstall<{
6
+ new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
7
+ modalProps: {
8
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
9
+ };
10
+ modelValue: {
11
+ readonly type: BooleanConstructor;
12
+ readonly required: true;
13
+ };
14
+ title: {
15
+ readonly type: StringConstructor;
16
+ readonly required: true;
17
+ };
18
+ }>> & {
19
+ onOnCancel?: ((...args: any[]) => any) | undefined;
20
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
22
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
23
+ onCancel: (...args: any[]) => void;
24
+ onConfirm: (...args: any[]) => void;
25
+ "update:modelValue": (modelValue: boolean) => void;
26
+ }, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
27
+ modalProps: {
28
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
29
+ };
30
+ modelValue: {
31
+ readonly type: BooleanConstructor;
32
+ readonly required: true;
33
+ };
34
+ title: {
35
+ readonly type: StringConstructor;
36
+ readonly required: true;
37
+ };
38
+ }>> & {
39
+ onOnCancel?: ((...args: any[]) => any) | undefined;
40
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
41
+ "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
42
+ }, {}, true, {}, {}, {
43
+ P: {};
44
+ B: {};
45
+ D: {};
46
+ C: {};
47
+ M: {};
48
+ Defaults: {};
49
+ }, Readonly< ExtractPropTypes<{
50
+ modalProps: {
51
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
52
+ };
53
+ modelValue: {
54
+ readonly type: BooleanConstructor;
55
+ readonly required: true;
56
+ };
57
+ title: {
58
+ readonly type: StringConstructor;
59
+ readonly required: true;
60
+ };
61
+ }>> & {
62
+ onOnCancel?: ((...args: any[]) => any) | undefined;
63
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
64
+ "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
65
+ }, {}, {}, {}, {}, {}>;
66
+ __isFragment?: never;
67
+ __isTeleport?: never;
68
+ __isSuspense?: never;
69
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
70
+ modalProps: {
71
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
8
72
  };
9
- readonly modelValue: {
73
+ modelValue: {
10
74
  readonly type: BooleanConstructor;
11
75
  readonly required: true;
12
76
  };
13
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "update:modelValue" | "onConfirm")[], "onCancel" | "update:modelValue" | "onConfirm", PublicProps, Readonly< ExtractPropTypes<{
14
- readonly modalProps: {
15
- readonly type: PropType<Omit< ModalFuncProps, "open">>;
16
- };
17
- readonly modelValue: {
18
- readonly type: BooleanConstructor;
77
+ title: {
78
+ readonly type: StringConstructor;
19
79
  readonly required: true;
20
80
  };
21
81
  }>> & {
22
82
  onOnCancel?: ((...args: any[]) => any) | undefined;
23
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
24
83
  onOnConfirm?: ((...args: any[]) => any) | undefined;
25
- }, {}, {}>>;
84
+ "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
85
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
86
+ onCancel: (...args: any[]) => void;
87
+ onConfirm: (...args: any[]) => void;
88
+ "update:modelValue": (modelValue: boolean) => void;
89
+ }, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
90
+ $slots: {
91
+ default?(_: {}): any;
92
+ };
93
+ })>;
26
94
  export default KProModal;
@@ -2,23 +2,31 @@ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractP
2
2
  import { ModalFuncProps } from 'ant-design-vue';
3
3
  declare const _default: DefineComponent<{
4
4
  readonly modalProps: {
5
- readonly type: PropType<Omit< ModalFuncProps, "open">>;
5
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
6
6
  };
7
7
  readonly modelValue: {
8
8
  readonly type: BooleanConstructor;
9
9
  readonly required: true;
10
10
  };
11
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "update:modelValue" | "onConfirm")[], "onCancel" | "update:modelValue" | "onConfirm", PublicProps, Readonly< ExtractPropTypes<{
11
+ readonly title: {
12
+ readonly type: StringConstructor;
13
+ readonly required: true;
14
+ };
15
+ }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "onConfirm" | "update:modelValue")[], "onCancel" | "onConfirm" | "update:modelValue", PublicProps, Readonly< ExtractPropTypes<{
12
16
  readonly modalProps: {
13
- readonly type: PropType<Omit< ModalFuncProps, "open">>;
17
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
14
18
  };
15
19
  readonly modelValue: {
16
20
  readonly type: BooleanConstructor;
17
21
  readonly required: true;
18
22
  };
23
+ readonly title: {
24
+ readonly type: StringConstructor;
25
+ readonly required: true;
26
+ };
19
27
  }>> & {
20
28
  onOnCancel?: ((...args: any[]) => any) | undefined;
21
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
22
29
  onOnConfirm?: ((...args: any[]) => any) | undefined;
30
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
23
31
  }, {}, {}>;
24
32
  export default _default;
@@ -0,0 +1,52 @@
1
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ import { ModalFuncProps } from 'ant-design-vue';
3
+ declare function __VLS_template(): {
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {
8
+ modalTitleRef: HTMLDivElement;
9
+ };
10
+ attrs: Partial<{}>;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: DefineComponent<{
14
+ modalProps: {
15
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
16
+ };
17
+ modelValue: {
18
+ readonly type: BooleanConstructor;
19
+ readonly required: true;
20
+ };
21
+ title: {
22
+ readonly type: StringConstructor;
23
+ readonly required: true;
24
+ };
25
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
26
+ onCancel: (...args: any[]) => void;
27
+ onConfirm: (...args: any[]) => void;
28
+ "update:modelValue": (modelValue: boolean) => void;
29
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
30
+ modalProps: {
31
+ readonly type: PropType<Omit< ModalFuncProps, "open" | "title">>;
32
+ };
33
+ modelValue: {
34
+ readonly type: BooleanConstructor;
35
+ readonly required: true;
36
+ };
37
+ title: {
38
+ readonly type: StringConstructor;
39
+ readonly required: true;
40
+ };
41
+ }>> & {
42
+ onOnCancel?: ((...args: any[]) => any) | undefined;
43
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
44
+ "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
45
+ }, {}, {}>;
46
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
47
+ export default _default;
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -3,11 +3,15 @@ import { PropType } from 'vue';
3
3
  type ModalType = ModalFuncProps;
4
4
  export declare const ProModalProps: {
5
5
  readonly modalProps: {
6
- readonly type: PropType<Omit<ModalType, "open">>;
6
+ readonly type: PropType<Omit<ModalType, "open" | "title">>;
7
7
  };
8
8
  readonly modelValue: {
9
9
  readonly type: BooleanConstructor;
10
10
  readonly required: true;
11
11
  };
12
+ readonly title: {
13
+ readonly type: StringConstructor;
14
+ readonly required: true;
15
+ };
12
16
  };
13
17
  export {};
@@ -1,15 +1,18 @@
1
1
  import { SFCWithInstall } from '../utils/install';
2
- import { DefineComponent, PropType, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ import { DefineComponent, PropType, ComputedRef, Ref, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
3
  export * from './src/types';
4
4
  export declare const KScrollBar: SFCWithInstall<DefineComponent<{
5
5
  readonly container: PropType<() => HTMLElement | null | undefined>;
6
6
  readonly content: PropType<() => HTMLElement | null | undefined>;
7
7
  readonly onScroll: PropType<(e: Event) => void>;
8
8
  readonly xScrollable: BooleanConstructor;
9
+ readonly trigger: PropType<"none" | "hover">;
9
10
  }, {
11
+ showYBarRef: ComputedRef<boolean>;
12
+ showXBarRef: ComputedRef<boolean>;
10
13
  sync: () => void;
11
- handleContentResize: () => void;
12
- handleContainerResize: () => void;
14
+ handleMouseEnter: () => void;
15
+ handleMouseLeave: () => void;
13
16
  contentRef: Ref<HTMLElement | null>;
14
17
  yRailRef: Ref<HTMLElement | null>;
15
18
  xRailRef: Ref<HTMLElement | null>;
@@ -30,6 +33,7 @@ export declare const KScrollBar: SFCWithInstall<DefineComponent<{
30
33
  readonly content: PropType<() => HTMLElement | null | undefined>;
31
34
  readonly onScroll: PropType<(e: Event) => void>;
32
35
  readonly xScrollable: BooleanConstructor;
36
+ readonly trigger: PropType<"none" | "hover">;
33
37
  }>>, {
34
38
  readonly xScrollable: boolean;
35
39
  }, {}>>;
@@ -1,13 +1,16 @@
1
- import { DefineComponent, PropType, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
1
+ import { DefineComponent, PropType, ComputedRef, Ref, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
2
  declare const _default: DefineComponent<{
3
3
  readonly container: PropType<() => HTMLElement | null | undefined>;
4
4
  readonly content: PropType<() => HTMLElement | null | undefined>;
5
5
  readonly onScroll: PropType<(e: Event) => void>;
6
6
  readonly xScrollable: BooleanConstructor;
7
+ readonly trigger: PropType<"none" | "hover">;
7
8
  }, {
9
+ showYBarRef: ComputedRef<boolean>;
10
+ showXBarRef: ComputedRef<boolean>;
8
11
  sync: () => void;
9
- handleContentResize: () => void;
10
- handleContainerResize: () => void;
12
+ handleMouseEnter: () => void;
13
+ handleMouseLeave: () => void;
11
14
  contentRef: Ref<HTMLElement | null>;
12
15
  yRailRef: Ref<HTMLElement | null>;
13
16
  xRailRef: Ref<HTMLElement | null>;
@@ -28,6 +31,7 @@ declare const _default: DefineComponent<{
28
31
  readonly content: PropType<() => HTMLElement | null | undefined>;
29
32
  readonly onScroll: PropType<(e: Event) => void>;
30
33
  readonly xScrollable: BooleanConstructor;
34
+ readonly trigger: PropType<"none" | "hover">;
31
35
  }>>, {
32
36
  readonly xScrollable: boolean;
33
37
  }, {}>;
@@ -4,4 +4,5 @@ export declare const scrollbarProps: {
4
4
  readonly content: PropType<() => HTMLElement | null | undefined>;
5
5
  readonly onScroll: PropType<(e: Event) => void>;
6
6
  readonly xScrollable: BooleanConstructor;
7
+ readonly trigger: PropType<"none" | "hover">;
7
8
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@king-one/antdv",
3
3
  "type": "module",
4
- "version": "1.0.57",
4
+ "version": "1.0.58",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",
@@ -31,7 +31,6 @@
31
31
  "@vueuse/shared": "^11.0.0",
32
32
  "evtd": "^0.2.4",
33
33
  "vue-demi": "^0.14.10",
34
- "vueuc": "^0.4.64",
35
34
  "@king-one/utils": "^1.0.12"
36
35
  },
37
36
  "custom": {
@@ -1,44 +0,0 @@
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);
20
- }
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"]);
40
- }
41
- });
42
- export {
43
- M as default
44
- };
@@ -1 +0,0 @@
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;