@king-one/antdv 1.0.56 → 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 +12 -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 +234 -139
  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 -31
  30. package/dist/lib/components/pro-modal/src/Modal.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @king-one/antdv
2
2
 
3
+ ## 1.0.58
4
+
5
+ ### Patch Changes
6
+
7
+ - feat:modal 增加拖拽功能
8
+
9
+ ## 1.0.57
10
+
11
+ ### Patch Changes
12
+
13
+ - fix:修复 tsx 组件构建错误
14
+
3
15
  ## 1.0.56
4
16
 
5
17
  ### 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,169 +1,264 @@
1
- import { defineComponent as ae, onMounted as ce, ref as a, computed as c } from "vue";
2
- import { VResizeObserver as j } from "vueuc";
3
- import { off as g, on as z } from "evtd";
4
- import { defaultNamespace as u } from "../../../hooks/use-namespace/index.mjs";
5
- import { scrollbarProps as ie } from "./types.mjs";
6
- const ve = ae({
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({
7
7
  name: "KScrollbar",
8
- props: ie,
8
+ props: de,
9
9
  inheritAttrs: !1,
10
- setup(l) {
11
- ce(() => {
12
- l.container || d();
10
+ setup(o) {
11
+ se(() => {
12
+ o.container || v();
13
13
  });
14
- const y = () => {
15
- d();
16
- }, M = () => {
17
- d();
18
- }, w = a(null), h = a(null), T = a(null), v = a(null), s = a(null), R = a(null), f = a(null), m = a(null), P = a(null), b = a(null), k = c(() => {
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(() => {
19
15
  var e;
20
- return ((e = l.content) == null ? void 0 : e.call(l)) || w.value;
21
- }), x = c(() => {
16
+ return ((e = o.content) == null ? void 0 : e.call(o)) || R.value;
17
+ }), g = r(() => {
22
18
  var e;
23
- return ((e = l.container) == null ? void 0 : e.call(l)) || h.value;
24
- }), X = a(0), Y = a(0), q = c(() => {
25
- const { value: e } = f, { value: t } = s;
26
- return e !== null && t !== null && t > e;
27
- }), C = c(() => {
28
- const { value: e } = f, { value: t } = s, { value: n } = P;
29
- return e === null || t === null || n === null ? 0 : Math.min(e, n * e / t + 5 * 1.5);
30
- }), F = c(() => `${C.value}px`), G = c(() => {
31
- const { value: e } = f, { value: t } = X, { value: n } = s, { value: r } = P;
32
- if (e === null || n === null || r === null)
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(() => {
27
+ const {
28
+ value: e
29
+ } = u, {
30
+ value: n
31
+ } = d;
32
+ return e !== null && n !== null && n > e;
33
+ }), w = l(!1), G = r(() => {
34
+ const {
35
+ trigger: e
36
+ } = o;
37
+ return e === "none" || w.value;
38
+ }), $ = r(() => {
39
+ const {
40
+ value: e
41
+ } = u, {
42
+ value: n
43
+ } = d, {
44
+ value: t
45
+ } = b;
46
+ return e === null || n === null || t === null ? 0 : Math.min(e, t * e / n + 5 * 1.5);
47
+ }), J = r(() => `${$.value}px`), Q = r(() => {
48
+ const {
49
+ value: e
50
+ } = u, {
51
+ value: n
52
+ } = H, {
53
+ value: t
54
+ } = d, {
55
+ value: c
56
+ } = b;
57
+ if (e === null || t === null || c === null)
33
58
  return 0;
34
59
  {
35
- const o = n - e;
36
- return o ? t / o * (r - C.value) : 0;
60
+ const a = t - e;
61
+ return a ? n / a * (c - $.value) : 0;
37
62
  }
38
- }), J = c(() => `${G.value}px`);
39
- let E = !1, D = 0, U = 0, B, p;
63
+ }), Z = r(() => `${Q.value}px`);
64
+ let p = !1, N = 0, U = 0, y, z;
40
65
  const _ = (e) => {
41
- if (!E)
42
- return;
43
- p !== void 0 && window.clearTimeout(p), B !== void 0 && window.clearTimeout(B);
44
- const { value: t } = f, { value: n } = s, { value: r } = C;
45
- if (t === null || n === null)
46
- return;
47
- const W = (e.clientY - U) * (n - t) / (t - r), $ = n - t;
48
- let i = D + W;
49
- i = Math.min($, i), i = Math.max(i, 0);
50
- const { value: S } = x;
51
- S && (S.scrollTop = i);
52
- }, N = (e) => {
53
- e.preventDefault(), e.stopPropagation(), g("mousemove", window, _, !0), g("mouseup", window, N, !0), E = !1, d();
54
- }, Q = (e) => {
55
- e.preventDefault(), e.stopPropagation(), z("mousemove", window, _, !0), z("mouseup", window, N, !0), D = X.value, U = e.clientY, E = !0;
66
+ if (!p) return;
67
+ z !== void 0 && window.clearTimeout(z), y !== void 0 && window.clearTimeout(y);
68
+ const {
69
+ value: n
70
+ } = u, {
71
+ value: t
72
+ } = d, {
73
+ value: c
74
+ } = $;
75
+ if (n === null || t === null) return;
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);
79
+ const {
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;
56
87
  };
57
- function Z(e) {
58
- const { onScroll: t } = l;
59
- t && t(e), O();
88
+ function ne(e) {
89
+ const {
90
+ onScroll: n
91
+ } = o;
92
+ n && n(e), j();
60
93
  }
61
- const ee = c(() => {
62
- const { value: e } = m, { value: t } = R;
63
- return e !== null && t !== null && t > e;
64
- }), H = c(() => {
65
- const { value: e } = m, { value: t } = R, { value: n } = b;
66
- return e === null || t === null || n === null ? 0 : n * e / t + 5 * 1.5;
67
- }), te = c(() => `${H.value}px`), ne = c(() => {
68
- const { value: e } = m, { value: t } = Y, { value: n } = R, { value: r } = b;
69
- if (e === null || n === null || r === null)
94
+ const te = r(() => {
95
+ const {
96
+ value: e
97
+ } = S, {
98
+ value: n
99
+ } = f;
100
+ return e !== null && n !== null && n > e;
101
+ }), B = l(!1), oe = r(() => {
102
+ const {
103
+ trigger: e
104
+ } = o;
105
+ return e === "none" || B.value;
106
+ }), D = r(() => {
107
+ const {
108
+ value: e
109
+ } = S, {
110
+ value: n
111
+ } = f, {
112
+ value: t
113
+ } = L;
114
+ return e === null || n === null || t === null ? 0 : t * e / n + 5 * 1.5;
115
+ }), le = r(() => `${D.value}px`), re = r(() => {
116
+ const {
117
+ value: e
118
+ } = S, {
119
+ value: n
120
+ } = W, {
121
+ value: t
122
+ } = f, {
123
+ value: c
124
+ } = L;
125
+ if (e === null || t === null || c === null)
70
126
  return 0;
71
127
  {
72
- const o = n - e;
73
- return o ? t / o * (r - H.value) : 0;
128
+ const a = t - e;
129
+ return a ? n / a * (c - D.value) : 0;
74
130
  }
75
- }), le = c(() => `${ne.value}px`);
76
- let L = !1, V = 0, I = 0;
77
- const A = (e) => {
78
- if (!L)
79
- return;
80
- p !== void 0 && window.clearTimeout(p), B !== void 0 && window.clearTimeout(B);
81
- const { value: t } = m, { value: n } = R, { value: r } = H;
82
- if (t === null || n === null)
83
- return;
84
- const W = (e.clientX - I) * (n - t) / (t - r), $ = n - t;
85
- let i = V + W;
86
- i = Math.min($, i), i = Math.max(i, 0);
87
- const { value: S } = x;
88
- S && (S.scrollLeft = i);
89
- }, K = (e) => {
90
- e.preventDefault(), e.stopPropagation(), g("mousemove", window, A, !0), g("mouseup", window, K, !0), L = !1, d();
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);
136
+ const {
137
+ value: n
138
+ } = S, {
139
+ value: t
140
+ } = f, {
141
+ value: c
142
+ } = D;
143
+ if (n === null || t === null) return;
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);
147
+ const {
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();
91
153
  };
92
- function oe(e) {
93
- e.preventDefault(), e.stopPropagation(), L = !0, z("mousemove", window, A, !0), z("mouseup", window, K, !0), V = Y.value, I = 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;
94
156
  }
95
- function O() {
96
- const { value: e } = x;
97
- e && (X.value = e.scrollTop, Y.value = e.scrollLeft);
157
+ function j() {
158
+ const {
159
+ value: e
160
+ } = g;
161
+ e && (H.value = e.scrollTop, W.value = e.scrollLeft);
98
162
  }
99
- const re = () => {
100
- const { value: e } = k;
163
+ const ie = () => {
164
+ const {
165
+ value: e
166
+ } = q;
101
167
  if (e) {
102
- const o = e.getBoundingClientRect();
103
- s.value = o.height, R.value = o.width;
168
+ const a = e.getBoundingClientRect();
169
+ d.value = a.height, f.value = a.width;
104
170
  }
105
- const { value: t } = x;
106
- if (t) {
107
- const o = t.getBoundingClientRect();
108
- f.value = o.height, m.value = o.width;
171
+ const {
172
+ value: n
173
+ } = g;
174
+ if (n) {
175
+ const a = n.getBoundingClientRect();
176
+ u.value = a.height, S.value = a.width;
109
177
  }
110
- const { value: n } = T;
111
- n && (P.value = n.offsetHeight);
112
- const { value: r } = v;
113
- r && (b.value = r.offsetWidth);
178
+ const {
179
+ value: t
180
+ } = x;
181
+ t && (b.value = t.offsetHeight);
182
+ const {
183
+ value: c
184
+ } = Y;
185
+ c && (L.value = c.offsetWidth);
114
186
  };
115
- function d() {
116
- re(), O();
187
+ function v() {
188
+ ie(), j();
117
189
  }
118
190
  return {
119
- sync: d,
120
- handleContentResize: y,
121
- handleContainerResize: M,
122
- contentRef: w,
123
- yRailRef: T,
124
- xRailRef: v,
125
- containerRef: h,
126
- contentHeightRef: s,
127
- containerHeightRef: f,
128
- needYBarRef: q,
129
- needXBarRef: ee,
130
- yBarSizePxRef: F,
131
- handleYScrollMouseDown: Q,
132
- handleXScrollMouseDown: oe,
133
- yBarTopPxRef: J,
134
- handleScroll: Z,
135
- xBarSizePxRef: te,
136
- xBarLeftPxRef: le
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,
208
+ needYBarRef: F,
209
+ needXBarRef: te,
210
+ yBarSizePxRef: J,
211
+ handleYScrollMouseDown: ee,
212
+ handleXScrollMouseDown: ce,
213
+ yBarTopPxRef: Z,
214
+ handleScroll: ne,
215
+ xBarSizePxRef: le,
216
+ xBarLeftPxRef: ae
137
217
  };
138
218
  },
139
219
  render() {
140
- const { $slots: l, xScrollable: y } = this, M = () => /* @__PURE__ */ React.createElement("div", { class: `${u}-scrollbar-rail ${u}-scrollbar-rail--horizontal`, ref: "xRailRef" }, this.needXBarRef && /* @__PURE__ */ React.createElement(
141
- "div",
142
- {
143
- class: `${u}-scrollbar-rail__scrollbar--horizontal`,
144
- style: {
145
- width: this.xBarSizePxRef,
146
- left: this.xBarLeftPxRef
147
- },
148
- onMousedown: this.handleXScrollMouseDown
149
- }
150
- )), w = () => /* @__PURE__ */ React.createElement("div", { class: `${u}-scrollbar-rail ${u}-scrollbar-rail--vertical`, ref: "yRailRef" }, this.needYBarRef && /* @__PURE__ */ React.createElement(
151
- "div",
152
- {
153
- class: `${u}-scrollbar-rail__scrollbar--vertical`,
154
- style: {
155
- height: this.yBarSizePxRef,
156
- top: this.yBarTopPxRef
157
- },
158
- onMousedown: this.handleYScrollMouseDown
159
- }
160
- )), h = () => {
161
- var v, s;
162
- return /* @__PURE__ */ React.createElement("div", { class: `${u}-scrollbar`, ...this.$attrs }, this.container ? (v = l.default) == null ? void 0 : v.call(l) : /* @__PURE__ */ React.createElement("div", { class: `${u}-scrollbar-container`, onScroll: this.handleScroll, ref: "containerRef" }, /* @__PURE__ */ React.createElement(j, { onResize: this.handleContentResize }, /* @__PURE__ */ React.createElement("div", { ref: "contentRef", class: `${u}-scrollbar-content` }, (s = l.default) == null ? void 0 : s.call(l)))), w(), y && M());
163
- };
164
- return this.container ? h() : /* @__PURE__ */ React.createElement(j, { onResize: this.handleContainerResize }, h());
220
+ const {
221
+ $slots: o,
222
+ xScrollable: R
223
+ } = this, m = () => h("div", {
224
+ class: `${s}-scrollbar-rail ${s}-scrollbar-rail--horizontal`,
225
+ ref: "xRailRef"
226
+ }, [this.needXBarRef && this.showXBarRef && h("div", {
227
+ class: `${s}-scrollbar-rail__scrollbar--horizontal`,
228
+ style: {
229
+ width: this.xBarSizePxRef,
230
+ left: this.xBarLeftPxRef
231
+ },
232
+ onMousedown: this.handleXScrollMouseDown
233
+ }, null, 44, ["onMousedown"])], 512), x = () => h("div", {
234
+ class: `${s}-scrollbar-rail ${s}-scrollbar-rail--vertical`,
235
+ ref: "yRailRef"
236
+ }, [this.needYBarRef && this.showYBarRef && h("div", {
237
+ class: `${s}-scrollbar-rail__scrollbar--vertical`,
238
+ style: {
239
+ height: this.yBarSizePxRef,
240
+ top: this.yBarTopPxRef
241
+ },
242
+ onMousedown: this.handleYScrollMouseDown
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`,
253
+ onScroll: this.handleScroll,
254
+ ref: "containerRef"
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
+ })();
165
260
  }
166
261
  });
167
262
  export {
168
- ve as default
263
+ Me as default
169
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 n=require("vue"),I=require("vueuc"),s=require("evtd"),u=require("../../../hooks/use-namespace/index.js"),oe=require("./types.js"),ae=n.defineComponent({name:"KScrollbar",props:oe.scrollbarProps,inheritAttrs:!1,setup(o){n.onMounted(()=>{o.container||d()});const g=()=>{d()},z=()=>{d()},S=n.ref(null),v=n.ref(null),y=n.ref(null),h=n.ref(null),i=n.ref(null),m=n.ref(null),f=n.ref(null),R=n.ref(null),M=n.ref(null),b=n.ref(null),j=n.computed(()=>{var e;return((e=o.content)==null?void 0:e.call(o))||S.value}),w=n.computed(()=>{var e;return((e=o.container)==null?void 0:e.call(o))||v.value}),T=n.ref(0),P=n.ref(0),A=n.computed(()=>{const{value:e}=f,{value:t}=i;return e!==null&&t!==null&&t>e}),X=n.computed(()=>{const{value:e}=f,{value:t}=i,{value:l}=M;return e===null||t===null||l===null?0:Math.min(e,l*e/t+5*1.5)}),K=n.computed(()=>`${X.value}px`),k=n.computed(()=>{const{value:e}=f,{value:t}=T,{value:l}=i,{value:r}=M;if(e===null||l===null||r===null)return 0;{const a=l-e;return a?t/a*(r-X.value):0}}),F=n.computed(()=>`${k.value}px`);let Y=!1,N=0,W=0,x,B;const $=e=>{if(!Y)return;B!==void 0&&window.clearTimeout(B),x!==void 0&&window.clearTimeout(x);const{value:t}=f,{value:l}=i,{value:r}=X;if(t===null||l===null)return;const H=(e.clientY-W)*(l-t)/(t-r),L=l-t;let c=N+H;c=Math.min(L,c),c=Math.max(c,0);const{value:p}=w;p&&(p.scrollTop=c)},D=e=>{e.preventDefault(),e.stopPropagation(),s.off("mousemove",window,$,!0),s.off("mouseup",window,D,!0),Y=!1,d()},G=e=>{e.preventDefault(),e.stopPropagation(),s.on("mousemove",window,$,!0),s.on("mouseup",window,D,!0),N=T.value,W=e.clientY,Y=!0};function J(e){const{onScroll:t}=o;t&&t(e),O()}const Q=n.computed(()=>{const{value:e}=R,{value:t}=m;return e!==null&&t!==null&&t>e}),C=n.computed(()=>{const{value:e}=R,{value:t}=m,{value:l}=b;return e===null||t===null||l===null?0:l*e/t+5*1.5}),Z=n.computed(()=>`${C.value}px`),ee=n.computed(()=>{const{value:e}=R,{value:t}=P,{value:l}=m,{value:r}=b;if(e===null||l===null||r===null)return 0;{const a=l-e;return a?t/a*(r-C.value):0}}),te=n.computed(()=>`${ee.value}px`);let E=!1,_=0,q=0;const U=e=>{if(!E)return;B!==void 0&&window.clearTimeout(B),x!==void 0&&window.clearTimeout(x);const{value:t}=R,{value:l}=m,{value:r}=C;if(t===null||l===null)return;const H=(e.clientX-q)*(l-t)/(t-r),L=l-t;let c=_+H;c=Math.min(L,c),c=Math.max(c,0);const{value:p}=w;p&&(p.scrollLeft=c)},V=e=>{e.preventDefault(),e.stopPropagation(),s.off("mousemove",window,U,!0),s.off("mouseup",window,V,!0),E=!1,d()};function ne(e){e.preventDefault(),e.stopPropagation(),E=!0,s.on("mousemove",window,U,!0),s.on("mouseup",window,V,!0),_=P.value,q=e.clientX}function O(){const{value:e}=w;e&&(T.value=e.scrollTop,P.value=e.scrollLeft)}const le=()=>{const{value:e}=j;if(e){const a=e.getBoundingClientRect();i.value=a.height,m.value=a.width}const{value:t}=w;if(t){const a=t.getBoundingClientRect();f.value=a.height,R.value=a.width}const{value:l}=y;l&&(M.value=l.offsetHeight);const{value:r}=h;r&&(b.value=r.offsetWidth)};function d(){le(),O()}return{sync:d,handleContentResize:g,handleContainerResize:z,contentRef:S,yRailRef:y,xRailRef:h,containerRef:v,contentHeightRef:i,containerHeightRef:f,needYBarRef:A,needXBarRef:Q,yBarSizePxRef:K,handleYScrollMouseDown:G,handleXScrollMouseDown:ne,yBarTopPxRef:F,handleScroll:J,xBarSizePxRef:Z,xBarLeftPxRef:te}},render(){const{$slots:o,xScrollable:g}=this,z=()=>React.createElement("div",{class:`${u.defaultNamespace}-scrollbar-rail ${u.defaultNamespace}-scrollbar-rail--horizontal`,ref:"xRailRef"},this.needXBarRef&&React.createElement("div",{class:`${u.defaultNamespace}-scrollbar-rail__scrollbar--horizontal`,style:{width:this.xBarSizePxRef,left:this.xBarLeftPxRef},onMousedown:this.handleXScrollMouseDown})),S=()=>React.createElement("div",{class:`${u.defaultNamespace}-scrollbar-rail ${u.defaultNamespace}-scrollbar-rail--vertical`,ref:"yRailRef"},this.needYBarRef&&React.createElement("div",{class:`${u.defaultNamespace}-scrollbar-rail__scrollbar--vertical`,style:{height:this.yBarSizePxRef,top:this.yBarTopPxRef},onMousedown:this.handleYScrollMouseDown})),v=()=>{var h,i;return React.createElement("div",{class:`${u.defaultNamespace}-scrollbar`,...this.$attrs},this.container?(h=o.default)==null?void 0:h.call(o):React.createElement("div",{class:`${u.defaultNamespace}-scrollbar-container`,onScroll:this.handleScroll,ref:"containerRef"},React.createElement(I.VResizeObserver,{onResize:this.handleContentResize},React.createElement("div",{ref:"contentRef",class:`${u.defaultNamespace}-scrollbar-content`},(i=o.default)==null?void 0:i.call(o)))),S(),g&&z())};return this.container?v():React.createElement(I.VResizeObserver,{onResize:this.handleContainerResize},v())}});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=47158) format("woff2"),url(fonts/iconfont.woff?t=75839) format("woff"),url(fonts/iconfont.ttf?t=46563) 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=55301) format("woff2"),url(fonts/iconfont.woff?t=45771) format("woff"),url(fonts/iconfont.ttf?t=13290) 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.56",
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,31 +0,0 @@
1
- import { defineComponent as p, computed as r } from "vue";
2
- import { Modal as u } from "ant-design-vue";
3
- import { useNamespace as f } from "../../../hooks/use-namespace/index.mjs";
4
- import { ProModalProps as s } from "./types.mjs";
5
- const M = p({
6
- props: s,
7
- emits: ["update:modelValue", "onCancel", "onConfirm"],
8
- setup(a, { slots: o, emit: n }) {
9
- const { b: l } = f("pro-modal"), t = r(() => l()), m = r({
10
- get() {
11
- return a.modelValue;
12
- },
13
- set(e) {
14
- n("update:modelValue", e);
15
- }
16
- }), d = () => {
17
- n("onConfirm");
18
- }, c = () => {
19
- n("onCancel");
20
- };
21
- return () => /* @__PURE__ */ React.createElement(u, { "v-model:open": m.value, ...a.modalProps, onOk: d, onCancel: c, "wrap-class-name": t.value }, {
22
- default: () => {
23
- var e;
24
- return (e = o.default) == null ? void 0 : e.call(o);
25
- }
26
- });
27
- }
28
- });
29
- export {
30
- M as default
31
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),s=require("ant-design-vue"),p=require("../../../hooks/use-namespace/index.js"),m=require("./types.js"),i=a.defineComponent({props:m.ProModalProps,emits:["update:modelValue","onCancel","onConfirm"],setup(t,{slots:n,emit:o}){const{b:u}=p.useNamespace("pro-modal"),r=a.computed(()=>u()),l=a.computed({get(){return t.modelValue},set(e){o("update:modelValue",e)}}),c=()=>{o("onConfirm")},d=()=>{o("onCancel")};return()=>React.createElement(s.Modal,{"v-model:open":l.value,...t.modalProps,onOk:c,onCancel:d,"wrap-class-name":r.value},{default:()=>{var e;return(e=n.default)==null?void 0:e.call(n)}})}});exports.default=i;