@king-one/antdv 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/es/components/index.mjs +8 -8
- package/dist/es/components/pro-dialog/index.mjs +10 -9
- package/dist/es/components/pro-dialog/src/ProDialog.vue.mjs +4 -0
- package/dist/es/components/pro-dialog/src/ProDialog.vue2.mjs +33 -0
- package/dist/es/components/pro-dialog/style/index.mjs +2 -0
- package/dist/es/components/pro-title/index.mjs +11 -0
- package/dist/es/components/pro-title/src/ProTitle.vue.mjs +4 -0
- package/dist/es/components/pro-title/src/ProTitle.vue2.mjs +32 -0
- package/dist/es/components/pro-title/src/types.mjs +17 -0
- package/dist/es/components/pro-title/style/index.mjs +2 -0
- package/dist/es/components/scale-virtual-list/hooks/useVirtualList.mjs +1 -1
- package/dist/es/index.mjs +23 -23
- package/dist/es/installer.mjs +8 -9
- package/dist/lib/components/index.js +1 -0
- package/dist/lib/components/pro-dialog/index.js +1 -0
- package/dist/lib/components/pro-dialog/src/ProDialog.vue.js +1 -0
- package/dist/lib/components/pro-dialog/src/ProDialog.vue2.js +1 -0
- package/dist/lib/components/pro-dialog/style/index.js +1 -0
- package/dist/lib/components/pro-title/index.js +1 -0
- package/dist/lib/components/pro-title/src/ProTitle.vue.js +1 -0
- package/dist/lib/components/pro-title/src/ProTitle.vue2.js +1 -0
- package/dist/lib/components/pro-title/src/types.js +1 -0
- package/dist/lib/components/pro-title/style/index.js +1 -0
- package/dist/lib/components/scale-virtual-list/hooks/useVirtualList.js +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/installer.js +1 -0
- package/dist/theme-chalk/index.css +1 -1
- package/dist/theme-chalk/pro-title.css +1 -0
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/pro-dialog/index.d.ts +4 -0
- package/dist/types/components/pro-dialog/src/{pro-dialog.vue.d.ts → ProDialog.vue.d.ts} +4 -0
- package/dist/types/components/pro-title/index.d.ts +82 -0
- package/dist/types/components/pro-title/src/ProTitle.vue.d.ts +46 -0
- package/dist/types/components/pro-title/src/types.d.ts +17 -0
- package/package.json +2 -1
- package/dist/es/components/pro-dialog/src/pro-dialog.vue.mjs +0 -4
- package/dist/es/components/pro-dialog/src/pro-dialog.vue2.mjs +0 -21
- package/dist/es/components/virtual-list/index.mjs +0 -10
- package/dist/es/components/virtual-list/src/types.mjs +0 -30
- package/dist/es/components/virtual-list/src/virtual-list.vue.mjs +0 -4
- package/dist/es/components/virtual-list/src/virtual-list.vue2.mjs +0 -87
- package/dist/es/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.4.38/node_modules/@vueuse/shared/index.mjs +0 -1189
- package/dist/lib/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.4.38/node_modules/@vueuse/shared/index.js +0 -1
- package/dist/lib/packages/antdv/components/index.js +0 -1
- package/dist/lib/packages/antdv/components/pro-dialog/index.js +0 -1
- package/dist/lib/packages/antdv/components/pro-dialog/src/pro-dialog.vue.js +0 -1
- package/dist/lib/packages/antdv/components/pro-dialog/src/pro-dialog.vue2.js +0 -1
- package/dist/lib/packages/antdv/components/scale-virtual-list/hooks/useVirtualList.js +0 -1
- package/dist/lib/packages/antdv/components/virtual-list/index.js +0 -1
- package/dist/lib/packages/antdv/components/virtual-list/src/types.js +0 -1
- package/dist/lib/packages/antdv/components/virtual-list/src/virtual-list.vue.js +0 -1
- package/dist/lib/packages/antdv/components/virtual-list/src/virtual-list.vue2.js +0 -1
- package/dist/lib/packages/antdv/index.js +0 -1
- package/dist/lib/packages/antdv/installer.js +0 -1
- package/dist/types/components/virtual-list/index.d.ts +0 -163
- package/dist/types/components/virtual-list/src/types.d.ts +0 -39
- package/dist/types/components/virtual-list/src/virtual-list.vue.d.ts +0 -364
- /package/dist/lib/{packages/antdv/components → components}/base/style/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/hooks/use-collapse-transtion.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/src/collapse-transtion.vue.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/src/collapse-transtion.vue2.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/src/types.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/style/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/form/component/form.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/form/component/form.vue.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/form/component/form.vue2.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/form/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/pro-dialog/hooks/useProDialog.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/pro-dialog/src/types.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/component/scale-virtual-list.vue.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/component/scale-virtual-list.vue2.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/component/types.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/style/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scroll-bar/index.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scroll-bar/src/scroll-bar.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/scroll-bar/src/types.js +0 -0
- /package/dist/lib/{packages/antdv/components → components}/utils/install.js +0 -0
- /package/dist/lib/{packages/antdv/hooks → hooks}/use-namespace/index.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { KForm as t } from "./form/index.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { KScrollBar as
|
|
2
|
+
import { KCollapseTranstion as l } from "./collapse-transtion/index.mjs";
|
|
3
|
+
import { KProDialog as p } from "./pro-dialog/index.mjs";
|
|
4
|
+
import { KProTitle as f } from "./pro-title/index.mjs";
|
|
5
|
+
import { KScrollBar as K } from "./scroll-bar/index.mjs";
|
|
6
6
|
import { KScaleVirtualList as s } from "./scale-virtual-list/index.mjs";
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
l as KCollapseTranstion,
|
|
9
9
|
t as KForm,
|
|
10
|
-
|
|
10
|
+
p as KProDialog,
|
|
11
|
+
f as KProTitle,
|
|
11
12
|
s as KScaleVirtualList,
|
|
12
|
-
|
|
13
|
-
l as KVirtualList
|
|
13
|
+
K as KScrollBar
|
|
14
14
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { withInstall as o } from "../utils/install.mjs";
|
|
2
|
-
import "./src/
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
2
|
+
import "./src/ProDialog.vue.mjs";
|
|
3
|
+
import "./style/index.mjs";
|
|
4
|
+
import { useProDialog as e, useProDialogInit as f } from "./hooks/useProDialog.mjs";
|
|
5
|
+
import { proDialogProps as n } from "./src/types.mjs";
|
|
6
|
+
import r from "./src/ProDialog.vue2.mjs";
|
|
7
|
+
const a = o(r);
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
a as KProDialog,
|
|
10
|
+
n as proDialogProps,
|
|
11
|
+
e as useProDialog,
|
|
12
|
+
f as useProDialogInit
|
|
12
13
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent as c, mergeModels as r, useModel as d, computed as f, openBlock as C, createBlock as g, unref as P, mergeProps as k } from "vue";
|
|
2
|
+
import { Modal as M } from "ant-design-vue";
|
|
3
|
+
import { useNamespace as v } from "../../../hooks/use-namespace/index.mjs";
|
|
4
|
+
import { proDialogProps as B } from "./types.mjs";
|
|
5
|
+
const b = /* @__PURE__ */ c({
|
|
6
|
+
name: "ProDialog",
|
|
7
|
+
__name: "ProDialog",
|
|
8
|
+
props: /* @__PURE__ */ r(B, {
|
|
9
|
+
modelValue: { required: !0, type: Boolean },
|
|
10
|
+
modelModifiers: {}
|
|
11
|
+
}),
|
|
12
|
+
emits: /* @__PURE__ */ r(["onConfirm", "onCancel"], ["update:modelValue"]),
|
|
13
|
+
setup(a, { emit: l }) {
|
|
14
|
+
const e = l, o = d(a, "modelValue"), { b: m } = v("pro-dialog"), t = f(() => m());
|
|
15
|
+
function p() {
|
|
16
|
+
e("onConfirm");
|
|
17
|
+
}
|
|
18
|
+
function i() {
|
|
19
|
+
e("onCancel");
|
|
20
|
+
}
|
|
21
|
+
return (s, n) => (C(), g(P(M), k({
|
|
22
|
+
open: o.value,
|
|
23
|
+
"onUpdate:open": n[0] || (n[0] = (u) => o.value = u)
|
|
24
|
+
}, s.dialogProps, {
|
|
25
|
+
"wrap-class-name": t.value,
|
|
26
|
+
onOk: p,
|
|
27
|
+
onCancel: i
|
|
28
|
+
}), null, 16, ["open", "wrap-class-name"]));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
b as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { withInstall as o } from "../utils/install.mjs";
|
|
2
|
+
import "./src/ProTitle.vue.mjs";
|
|
3
|
+
import "./style/index.mjs";
|
|
4
|
+
import { TitleProps as s } from "./src/types.mjs";
|
|
5
|
+
import t from "./src/ProTitle.vue2.mjs";
|
|
6
|
+
const e = o(t);
|
|
7
|
+
export {
|
|
8
|
+
e as KProTitle,
|
|
9
|
+
s as TitleProps,
|
|
10
|
+
e as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as s, computed as a, openBlock as p, createElementBlock as m, normalizeClass as i, createElementVNode as c, toDisplayString as u, renderSlot as d } from "vue";
|
|
2
|
+
import { useNamespace as f } from "../../../hooks/use-namespace/index.mjs";
|
|
3
|
+
import { TitleProps as _ } from "./types.mjs";
|
|
4
|
+
const k = /* @__PURE__ */ s({
|
|
5
|
+
name: "ProTitle",
|
|
6
|
+
__name: "ProTitle",
|
|
7
|
+
props: _,
|
|
8
|
+
setup(t) {
|
|
9
|
+
const o = t, { b: e, m: n } = f("pro-title"), l = a(() => o.unBorder ? [e(), n("unborder")] : [e()]);
|
|
10
|
+
return (r, B) => (p(), m(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
class: i(l.value)
|
|
14
|
+
},
|
|
15
|
+
[
|
|
16
|
+
c(
|
|
17
|
+
"span",
|
|
18
|
+
null,
|
|
19
|
+
u(r.title),
|
|
20
|
+
1
|
|
21
|
+
/* TEXT */
|
|
22
|
+
),
|
|
23
|
+
d(r.$slots, "default")
|
|
24
|
+
],
|
|
25
|
+
2
|
|
26
|
+
/* CLASS */
|
|
27
|
+
));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
k as default
|
|
32
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEventHook as $ } from "
|
|
1
|
+
import { createEventHook as $ } from "@vueuse/shared";
|
|
2
2
|
import { ref as z, shallowRef as F, watch as M, computed as y } from "vue-demi";
|
|
3
3
|
import { useElementSize as K } from "@vueuse/core";
|
|
4
4
|
function I(r, t) {
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import r from "./installer.mjs";
|
|
2
2
|
import "./components/index.mjs";
|
|
3
3
|
import { formType as l } from "./components/form/component/form.mjs";
|
|
4
|
-
import { KForm as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { scrollbarProps as
|
|
13
|
-
import { KScrollBar as
|
|
14
|
-
import { KScaleVirtualList as
|
|
4
|
+
import { KForm as f } from "./components/form/index.mjs";
|
|
5
|
+
import { collapseProps as i } from "./components/collapse-transtion/src/types.mjs";
|
|
6
|
+
import { KCollapseTranstion as s } from "./components/collapse-transtion/index.mjs";
|
|
7
|
+
import { useProDialog as K, useProDialogInit as g } from "./components/pro-dialog/hooks/useProDialog.mjs";
|
|
8
|
+
import { proDialogProps as c } from "./components/pro-dialog/src/types.mjs";
|
|
9
|
+
import { KProDialog as D } from "./components/pro-dialog/index.mjs";
|
|
10
|
+
import { TitleProps as S } from "./components/pro-title/src/types.mjs";
|
|
11
|
+
import { KProTitle as d } from "./components/pro-title/index.mjs";
|
|
12
|
+
import { scrollbarProps as B } from "./components/scroll-bar/src/types.mjs";
|
|
13
|
+
import { KScrollBar as F } from "./components/scroll-bar/index.mjs";
|
|
14
|
+
import { KScaleVirtualList as L } from "./components/scale-virtual-list/index.mjs";
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
s as KCollapseTranstion,
|
|
17
|
+
f as KForm,
|
|
18
|
+
D as KProDialog,
|
|
19
|
+
d as KProTitle,
|
|
20
|
+
L as KScaleVirtualList,
|
|
21
|
+
F as KScrollBar,
|
|
22
|
+
S as TitleProps,
|
|
23
|
+
i as collapseProps,
|
|
23
24
|
r as default,
|
|
24
25
|
l as formType,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
i as virtualListProps
|
|
26
|
+
c as proDialogProps,
|
|
27
|
+
B as scrollbarProps,
|
|
28
|
+
K as useProDialog,
|
|
29
|
+
g as useProDialogInit
|
|
30
30
|
};
|
package/dist/es/installer.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import "./components/index.mjs";
|
|
2
|
-
import { KForm as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
n.forEach((t) => o.use(t));
|
|
2
|
+
import { KForm as n } from "./components/form/index.mjs";
|
|
3
|
+
const r = [n];
|
|
4
|
+
function c(o) {
|
|
5
|
+
r.forEach((t) => o.use(t));
|
|
7
6
|
}
|
|
8
|
-
const
|
|
9
|
-
install:
|
|
7
|
+
const p = {
|
|
8
|
+
install: c
|
|
10
9
|
};
|
|
11
10
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
p as default,
|
|
12
|
+
c as install
|
|
14
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./form/index.js"),r=require("./collapse-transtion/index.js"),i=require("./pro-dialog/index.js"),o=require("./pro-title/index.js"),t=require("./scroll-bar/index.js"),l=require("./scale-virtual-list/index.js");exports.KForm=e.KForm;exports.KCollapseTranstion=r.KCollapseTranstion;exports.KProDialog=i.KProDialog;exports.KProTitle=o.KProTitle;exports.KScrollBar=t.KScrollBar;exports.KScaleVirtualList=l.KScaleVirtualList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../utils/install.js");require("./src/ProDialog.vue.js");require("./style/index.js");const e=require("./hooks/useProDialog.js"),r=require("./src/types.js"),i=require("./src/ProDialog.vue2.js"),t=o.withInstall(i.default);exports.useProDialog=e.useProDialog;exports.useProDialogInit=e.useProDialogInit;exports.proDialogProps=r.proDialogProps;exports.KProDialog=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProDialog.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"),p=require("ant-design-vue"),m=require("../../../hooks/use-namespace/index.js"),g=require("./types.js"),f=e.defineComponent({name:"ProDialog",__name:"ProDialog",props:e.mergeModels(g.proDialogProps,{modelValue:{required:!0,type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["onConfirm","onCancel"],["update:modelValue"]),setup(l,{emit:a}){const o=a,n=e.useModel(l,"modelValue"),{b:t}=m.useNamespace("pro-dialog"),u=e.computed(()=>t());function s(){o("onConfirm")}function i(){o("onCancel")}return(c,r)=>(e.openBlock(),e.createBlock(e.unref(p.Modal),e.mergeProps({open:n.value,"onUpdate:open":r[0]||(r[0]=d=>n.value=d)},c.dialogProps,{"wrap-class-name":u.value,onOk:s,onCancel:i}),null,16,["open","wrap-class-name"]))}});exports.default=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("../../base/style/index.js");require("@king-one/antdv/dist/theme-chalk/pro-dialog.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../utils/install.js");require("./src/ProTitle.vue.js");require("./style/index.js");const r=require("./src/types.js"),i=require("./src/ProTitle.vue2.js"),e=t.withInstall(i.default);exports.TitleProps=r.TitleProps;exports.KProTitle=e;exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ProTitle.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"),u=require("../../../hooks/use-namespace/index.js"),i=require("./types.js"),a=e.defineComponent({name:"ProTitle",__name:"ProTitle",props:i.TitleProps,setup(o){const n=o,{b:t,m:s}=u.useNamespace("pro-title"),l=e.computed(()=>n.unBorder?[t(),s("unborder")]:[t()]);return(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value)},[e.createElementVNode("span",null,e.toDisplayString(r.title),1),e.renderSlot(r.$slots,"default")],2))}});exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={unBorder:{type:Boolean,default:!1},title:{type:String,required:!0},size:{type:String,default:"14px"}};exports.TitleProps=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("../../base/style/index.js");require("@king-one/antdv/dist/theme-chalk/pro-title.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@vueuse/shared"),f=require("vue-demi"),M=require("@vueuse/core");function S(r,t){const{containerStyle:a,wrapperProps:o,scrollTo:c,calculateRange:e,currentList:n,containerRef:l,scaleTo:u,state:s,onUpdate:v}="itemHeight"in t?F(t,r):_(t,r);return{onUpdate:v,state:s,scaleTo:u,list:n,scrollTo:c,containerProps:{ref:l,onScroll:()=>{e()},style:a},wrapperProps:o}}function $(r){const t=f.ref(null),a=M.useElementSize(t),o=f.ref([]),c=f.shallowRef(r);return{state:f.ref({start:0,end:10,current:0,scale:1}),source:c,currentList:o,size:a,containerRef:t}}function x(r,t,a){return o=>{const{start:c=0,scale:e=1}=r.value;if(typeof a=="number")return Math.ceil(o/(a*e));let n=0,l=0;for(let u=c;u<t.value.length;u++){const s=a(u)*e;if(n+=s,l=u,n>o)break}return l-c}}function P(r,t,a){return o=>{const{scale:c=1}=a.value;if(typeof t=="number")return Math.floor(o/(t*c))+1;let e=0,n=0;for(let l=0;l<r.value.length;l++){const u=t(l)*c;if(e+=u,e>=o){n=l;break}}return n+1}}function k(r,t,a,o,{containerRef:c,state:e,currentList:n,source:l},u){return()=>{const s=c.value;if(s){const v=a(r==="vertical"?s.scrollTop:s.scrollLeft),i=o(r==="vertical"?s.clientHeight:s.clientWidth),g=v-t,h=v+i+t;e.value={start:g<0?0:g,end:h>l.value.length?l.value.length:h,current:v,scale:e.value.scale},n.value=l.value.slice(e.value.start,e.value.end).map((d,p)=>({data:d,index:p+e.value.start})),u(e.value)}}}function D(r,t,a){return o=>{const{scale:c=1}=a.value;return typeof r=="number"?o*(r*c):t.value.slice(0,o).reduce((n,l,u)=>n+r(u)*c,0)}}function E(r,t,a,o){f.watch([r.width,r.height,t,a],()=>{o()})}function W(r,t,a){return f.computed(()=>{const{scale:o=1}=a.value;return typeof r=="number"?t.value.length*r*o:t.value.reduce((c,e,n)=>c+r(n)*o,0)})}const U={horizontal:"scrollLeft",vertical:"scrollTop"};function q(r,t,a,o){return c=>{o.value&&(o.value[U[r]]=a(c),t())}}function _(r,t){const{on:a,trigger:o}=O.createEventHook(),c=$(t),{state:e,source:n,currentList:l,size:u,containerRef:s}=c,v={overflowX:"auto"},{itemWidth:i,overscan:g=5}=r,h=x(e,n,i),d=P(n,i,e),p=k("horizontal",g,d,h,c,o),m=D(i,n,e),y=f.computed(()=>m(e.value.start)),b=W(i,n,e);E(u,t,s,p);const R=q("horizontal",p,m,s),V=T=>{e.value.scale=T},H=f.computed(()=>({style:{height:"100%",width:`${b.value-y.value}px`,marginLeft:`${y.value}px`,display:"flex",transform:`scale(${e.value.scale})`,transformOrigin:"50% 0%"}}));return{onUpdate:a,state:e,scaleTo:V,scrollTo:R,calculateRange:p,wrapperProps:H,containerStyle:v,currentList:l,containerRef:s}}function F(r,t){const{on:a,trigger:o}=O.createEventHook(),c=$(t),{state:e,source:n,currentList:l,size:u,containerRef:s}=c,v={overflowY:"auto"},{itemHeight:i,overscan:g=5}=r,h=x(e,n,i),d=P(n,i,e),p=k("vertical",g,d,h,c,o),m=D(i,n,e),y=f.computed(()=>m(e.value.start)),b=W(i,n,e);E(u,t,s,p);const R=q("vertical",p,m,s),V=T=>{const L=s.value;if(L){const{current:z}=e.value;let w=0;typeof i=="number"?w=z*(T*i-e.value.scale*i):w=n.value.slice(0,z).reduce((G,j,C)=>G+T*i(C)-e.value.scale*i(C),0),L.scrollTop=L.scrollTop+w>=0?L.scrollTop+w:0,e.value.scale=T}},H=f.computed(()=>({style:{height:`${b.value-y.value}px`,marginTop:`${y.value}px`,transform:`scale(${e.value.scale})`,transformOrigin:"50% 0%"}}));return{onUpdate:a,state:e,scaleTo:V,calculateRange:p,scrollTo:R,containerStyle:v,wrapperProps:H,currentList:l,containerRef:s}}exports.useVirtualList=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./installer.js");require("./components/index.js");const o=require("./components/form/component/form.js"),i=require("./components/form/index.js"),s=require("./components/collapse-transtion/src/types.js"),l=require("./components/collapse-transtion/index.js"),e=require("./components/pro-dialog/hooks/useProDialog.js"),t=require("./components/pro-dialog/src/types.js"),a=require("./components/pro-dialog/index.js"),u=require("./components/pro-title/src/types.js"),n=require("./components/pro-title/index.js"),c=require("./components/scroll-bar/src/types.js"),p=require("./components/scroll-bar/index.js"),P=require("./components/scale-virtual-list/index.js");exports.default=r.default;exports.formType=o.formType;exports.KForm=i.KForm;exports.collapseProps=s.collapseProps;exports.KCollapseTranstion=l.KCollapseTranstion;exports.useProDialog=e.useProDialog;exports.useProDialogInit=e.useProDialogInit;exports.proDialogProps=t.proDialogProps;exports.KProDialog=a.KProDialog;exports.TitleProps=u.TitleProps;exports.KProTitle=n.KProTitle;exports.scrollbarProps=c.scrollbarProps;exports.KScrollBar=p.KScrollBar;exports.KScaleVirtualList=P.KScaleVirtualList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./components/index.js");const o=require("./components/form/index.js"),u=[o.KForm];function e(t){u.forEach(n=>t.use(n))}const i={install:e};exports.default=i;exports.install=e;
|
|
@@ -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}
|
|
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;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-dialog .ant-modal-content{padding:0}.king-pro-dialog .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-dialog .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-dialog .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.king-pro-title{border-bottom:1px solid #ccc;position:relative;padding-left:10px}.king-pro-title::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}.king-pro-title--unborder{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}
|
|
@@ -12,6 +12,8 @@ export declare const KProDialog: SFCWithInstall<DefineComponent<{
|
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
|
+
onCancel: (...args: any[]) => void;
|
|
16
|
+
onConfirm: (...args: any[]) => void;
|
|
15
17
|
"update:modelValue": (modelValue: boolean) => void;
|
|
16
18
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
17
19
|
dialogProps: {
|
|
@@ -22,5 +24,7 @@ export declare const KProDialog: SFCWithInstall<DefineComponent<{
|
|
|
22
24
|
required: true;
|
|
23
25
|
};
|
|
24
26
|
}>> & {
|
|
27
|
+
onOnCancel?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
onOnConfirm?: ((...args: any[]) => any) | undefined;
|
|
25
29
|
"onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
|
|
26
30
|
}, {}, {}>>;
|
|
@@ -9,6 +9,8 @@ declare const _default: DefineComponent<{
|
|
|
9
9
|
required: true;
|
|
10
10
|
};
|
|
11
11
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
12
|
+
onCancel: (...args: any[]) => void;
|
|
13
|
+
onConfirm: (...args: any[]) => void;
|
|
12
14
|
"update:modelValue": (modelValue: boolean) => void;
|
|
13
15
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
14
16
|
dialogProps: {
|
|
@@ -19,6 +21,8 @@ declare const _default: DefineComponent<{
|
|
|
19
21
|
required: true;
|
|
20
22
|
};
|
|
21
23
|
}>> & {
|
|
24
|
+
onOnCancel?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
onOnConfirm?: ((...args: any[]) => any) | undefined;
|
|
22
26
|
"onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
|
|
23
27
|
}, {}, {}>;
|
|
24
28
|
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { SFCWithInstall } from '../utils/install';
|
|
2
|
+
import { CreateComponentPublicInstance, ExtractPropTypes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase } from 'vue';
|
|
3
|
+
export * from './src/types';
|
|
4
|
+
export declare const KProTitle: SFCWithInstall<{
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
|
|
6
|
+
readonly unBorder: {
|
|
7
|
+
readonly type: BooleanConstructor;
|
|
8
|
+
readonly default: false;
|
|
9
|
+
};
|
|
10
|
+
readonly title: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly required: true;
|
|
13
|
+
};
|
|
14
|
+
readonly size: {
|
|
15
|
+
readonly type: StringConstructor;
|
|
16
|
+
readonly default: "14px";
|
|
17
|
+
};
|
|
18
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
19
|
+
readonly unBorder: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: false;
|
|
22
|
+
};
|
|
23
|
+
readonly title: {
|
|
24
|
+
readonly type: StringConstructor;
|
|
25
|
+
readonly required: true;
|
|
26
|
+
};
|
|
27
|
+
readonly size: {
|
|
28
|
+
readonly type: StringConstructor;
|
|
29
|
+
readonly default: "14px";
|
|
30
|
+
};
|
|
31
|
+
}>>, {
|
|
32
|
+
readonly size: string;
|
|
33
|
+
readonly unBorder: boolean;
|
|
34
|
+
}, true, {}, {}, {
|
|
35
|
+
P: {};
|
|
36
|
+
B: {};
|
|
37
|
+
D: {};
|
|
38
|
+
C: {};
|
|
39
|
+
M: {};
|
|
40
|
+
Defaults: {};
|
|
41
|
+
}, Readonly< ExtractPropTypes<{
|
|
42
|
+
readonly unBorder: {
|
|
43
|
+
readonly type: BooleanConstructor;
|
|
44
|
+
readonly default: false;
|
|
45
|
+
};
|
|
46
|
+
readonly title: {
|
|
47
|
+
readonly type: StringConstructor;
|
|
48
|
+
readonly required: true;
|
|
49
|
+
};
|
|
50
|
+
readonly size: {
|
|
51
|
+
readonly type: StringConstructor;
|
|
52
|
+
readonly default: "14px";
|
|
53
|
+
};
|
|
54
|
+
}>>, {}, {}, {}, {}, {
|
|
55
|
+
readonly size: string;
|
|
56
|
+
readonly unBorder: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
__isFragment?: never;
|
|
59
|
+
__isTeleport?: never;
|
|
60
|
+
__isSuspense?: never;
|
|
61
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
62
|
+
readonly unBorder: {
|
|
63
|
+
readonly type: BooleanConstructor;
|
|
64
|
+
readonly default: false;
|
|
65
|
+
};
|
|
66
|
+
readonly title: {
|
|
67
|
+
readonly type: StringConstructor;
|
|
68
|
+
readonly required: true;
|
|
69
|
+
};
|
|
70
|
+
readonly size: {
|
|
71
|
+
readonly type: StringConstructor;
|
|
72
|
+
readonly default: "14px";
|
|
73
|
+
};
|
|
74
|
+
}>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
75
|
+
readonly size: string;
|
|
76
|
+
readonly unBorder: boolean;
|
|
77
|
+
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
78
|
+
$slots: {
|
|
79
|
+
default?(_: {}): any;
|
|
80
|
+
};
|
|
81
|
+
})>;
|
|
82
|
+
export default KProTitle;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: DefineComponent<{
|
|
11
|
+
readonly unBorder: {
|
|
12
|
+
readonly type: BooleanConstructor;
|
|
13
|
+
readonly default: false;
|
|
14
|
+
};
|
|
15
|
+
readonly title: {
|
|
16
|
+
readonly type: StringConstructor;
|
|
17
|
+
readonly required: true;
|
|
18
|
+
};
|
|
19
|
+
readonly size: {
|
|
20
|
+
readonly type: StringConstructor;
|
|
21
|
+
readonly default: "14px";
|
|
22
|
+
};
|
|
23
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
24
|
+
readonly unBorder: {
|
|
25
|
+
readonly type: BooleanConstructor;
|
|
26
|
+
readonly default: false;
|
|
27
|
+
};
|
|
28
|
+
readonly title: {
|
|
29
|
+
readonly type: StringConstructor;
|
|
30
|
+
readonly required: true;
|
|
31
|
+
};
|
|
32
|
+
readonly size: {
|
|
33
|
+
readonly type: StringConstructor;
|
|
34
|
+
readonly default: "14px";
|
|
35
|
+
};
|
|
36
|
+
}>>, {
|
|
37
|
+
readonly size: string;
|
|
38
|
+
readonly unBorder: boolean;
|
|
39
|
+
}, {}>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
export declare const TitleProps: {
|
|
3
|
+
readonly unBorder: {
|
|
4
|
+
readonly type: BooleanConstructor;
|
|
5
|
+
readonly default: false;
|
|
6
|
+
};
|
|
7
|
+
readonly title: {
|
|
8
|
+
readonly type: StringConstructor;
|
|
9
|
+
readonly required: true;
|
|
10
|
+
};
|
|
11
|
+
readonly size: {
|
|
12
|
+
readonly type: StringConstructor;
|
|
13
|
+
readonly default: "14px";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type TitlePropsTypes = ExtractPropTypes<typeof TitleProps>;
|
|
17
|
+
export type OutTitlePropsTypes = ExtractPublicPropTypes<typeof TitleProps>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-one/antdv",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.31",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "ISC",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@vueuse/core": "^10.11.0",
|
|
29
|
+
"@vueuse/shared": "^11.0.0",
|
|
29
30
|
"evtd": "^0.2.4",
|
|
30
31
|
"vue-demi": "^0.14.10",
|
|
31
32
|
"vueuc": "^0.4.64",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, mergeModels as t, useModel as a, openBlock as m, createBlock as d, unref as u, mergeProps as s } from "vue";
|
|
2
|
-
import { Modal as i } from "ant-design-vue";
|
|
3
|
-
import { proDialogProps as f } from "./types.mjs";
|
|
4
|
-
const B = /* @__PURE__ */ n({
|
|
5
|
-
__name: "pro-dialog",
|
|
6
|
-
props: /* @__PURE__ */ t(f, {
|
|
7
|
-
modelValue: { required: !0, type: Boolean },
|
|
8
|
-
modelModifiers: {}
|
|
9
|
-
}),
|
|
10
|
-
emits: ["update:modelValue"],
|
|
11
|
-
setup(r) {
|
|
12
|
-
const e = a(r, "modelValue");
|
|
13
|
-
return (l, o) => (m(), d(u(i), s({
|
|
14
|
-
open: e.value,
|
|
15
|
-
"onUpdate:open": o[0] || (o[0] = (p) => e.value = p)
|
|
16
|
-
}, l.dialogProps), null, 16, ["open"]));
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
B as default
|
|
21
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { withInstall as t } from "../utils/install.mjs";
|
|
2
|
-
import "./src/virtual-list.vue.mjs";
|
|
3
|
-
import { virtualListProps as f } from "./src/types.mjs";
|
|
4
|
-
import r from "./src/virtual-list.vue2.mjs";
|
|
5
|
-
const s = t(r);
|
|
6
|
-
export {
|
|
7
|
-
s as KVirtualList,
|
|
8
|
-
s as default,
|
|
9
|
-
f as virtualListProps
|
|
10
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const e = {
|
|
2
|
-
items: {
|
|
3
|
-
type: Array,
|
|
4
|
-
default: () => []
|
|
5
|
-
},
|
|
6
|
-
itemSize: {
|
|
7
|
-
type: Number,
|
|
8
|
-
required: !0
|
|
9
|
-
},
|
|
10
|
-
itemResizable: Boolean,
|
|
11
|
-
paddingTop: {
|
|
12
|
-
type: [Number, String],
|
|
13
|
-
default: 0
|
|
14
|
-
},
|
|
15
|
-
paddingBottom: {
|
|
16
|
-
type: [Number, String],
|
|
17
|
-
default: 0
|
|
18
|
-
},
|
|
19
|
-
keyField: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "key"
|
|
22
|
-
},
|
|
23
|
-
xScrollable: Boolean,
|
|
24
|
-
onScroll: Function,
|
|
25
|
-
onWheel: Function,
|
|
26
|
-
onResize: Function
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
e as virtualListProps
|
|
30
|
-
};
|