@king-one/antdv 1.0.28 → 1.0.30

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 (69) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/es/components/index.mjs +8 -8
  3. package/dist/es/components/pro-title/index.mjs +11 -0
  4. package/dist/es/components/pro-title/src/ProTitle.vue.mjs +4 -0
  5. package/dist/es/components/pro-title/src/ProTitle.vue2.mjs +31 -0
  6. package/dist/es/components/pro-title/src/types.mjs +17 -0
  7. package/dist/es/components/pro-title/style/index.mjs +2 -0
  8. package/dist/es/components/scale-virtual-list/hooks/useVirtualList.mjs +2 -2
  9. package/dist/es/index.mjs +23 -23
  10. package/dist/es/installer.mjs +8 -9
  11. package/dist/lib/components/index.js +1 -0
  12. package/dist/lib/components/pro-title/index.js +1 -0
  13. package/dist/lib/components/pro-title/src/ProTitle.vue.js +1 -0
  14. package/dist/lib/components/pro-title/src/ProTitle.vue2.js +1 -0
  15. package/dist/lib/components/pro-title/src/types.js +1 -0
  16. package/dist/lib/components/pro-title/style/index.js +1 -0
  17. package/dist/lib/components/scale-virtual-list/hooks/useVirtualList.js +1 -0
  18. package/dist/lib/index.js +1 -0
  19. package/dist/lib/installer.js +1 -0
  20. package/dist/theme-chalk/index.css +1 -1
  21. package/dist/theme-chalk/pro-title.css +1 -0
  22. package/dist/types/components/index.d.ts +1 -1
  23. package/dist/types/components/pro-title/index.d.ts +82 -0
  24. package/dist/types/components/pro-title/src/ProTitle.vue.d.ts +46 -0
  25. package/dist/types/components/pro-title/src/types.d.ts +17 -0
  26. package/package.json +2 -1
  27. package/dist/es/components/virtual-list/index.mjs +0 -10
  28. package/dist/es/components/virtual-list/src/types.mjs +0 -30
  29. package/dist/es/components/virtual-list/src/virtual-list.vue.mjs +0 -4
  30. package/dist/es/components/virtual-list/src/virtual-list.vue2.mjs +0 -87
  31. package/dist/es/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.4.38/node_modules/@vueuse/shared/index.mjs +0 -1189
  32. package/dist/lib/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.4.38/node_modules/@vueuse/shared/index.js +0 -1
  33. package/dist/lib/packages/antdv/components/index.js +0 -1
  34. package/dist/lib/packages/antdv/components/scale-virtual-list/hooks/useVirtualList.js +0 -1
  35. package/dist/lib/packages/antdv/components/virtual-list/index.js +0 -1
  36. package/dist/lib/packages/antdv/components/virtual-list/src/types.js +0 -1
  37. package/dist/lib/packages/antdv/components/virtual-list/src/virtual-list.vue.js +0 -1
  38. package/dist/lib/packages/antdv/components/virtual-list/src/virtual-list.vue2.js +0 -1
  39. package/dist/lib/packages/antdv/index.js +0 -1
  40. package/dist/lib/packages/antdv/installer.js +0 -1
  41. package/dist/types/components/virtual-list/index.d.ts +0 -163
  42. package/dist/types/components/virtual-list/src/types.d.ts +0 -39
  43. package/dist/types/components/virtual-list/src/virtual-list.vue.d.ts +0 -364
  44. /package/dist/lib/{packages/antdv/components → components}/base/style/index.js +0 -0
  45. /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/hooks/use-collapse-transtion.js +0 -0
  46. /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/index.js +0 -0
  47. /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/src/collapse-transtion.vue.js +0 -0
  48. /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/src/collapse-transtion.vue2.js +0 -0
  49. /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/src/types.js +0 -0
  50. /package/dist/lib/{packages/antdv/components → components}/collapse-transtion/style/index.js +0 -0
  51. /package/dist/lib/{packages/antdv/components → components}/form/component/form.js +0 -0
  52. /package/dist/lib/{packages/antdv/components → components}/form/component/form.vue.js +0 -0
  53. /package/dist/lib/{packages/antdv/components → components}/form/component/form.vue2.js +0 -0
  54. /package/dist/lib/{packages/antdv/components → components}/form/index.js +0 -0
  55. /package/dist/lib/{packages/antdv/components → components}/pro-dialog/hooks/useProDialog.js +0 -0
  56. /package/dist/lib/{packages/antdv/components → components}/pro-dialog/index.js +0 -0
  57. /package/dist/lib/{packages/antdv/components → components}/pro-dialog/src/pro-dialog.vue.js +0 -0
  58. /package/dist/lib/{packages/antdv/components → components}/pro-dialog/src/pro-dialog.vue2.js +0 -0
  59. /package/dist/lib/{packages/antdv/components → components}/pro-dialog/src/types.js +0 -0
  60. /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/component/scale-virtual-list.vue.js +0 -0
  61. /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/component/scale-virtual-list.vue2.js +0 -0
  62. /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/component/types.js +0 -0
  63. /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/index.js +0 -0
  64. /package/dist/lib/{packages/antdv/components → components}/scale-virtual-list/style/index.js +0 -0
  65. /package/dist/lib/{packages/antdv/components → components}/scroll-bar/index.js +0 -0
  66. /package/dist/lib/{packages/antdv/components → components}/scroll-bar/src/scroll-bar.js +0 -0
  67. /package/dist/lib/{packages/antdv/components → components}/scroll-bar/src/types.js +0 -0
  68. /package/dist/lib/{packages/antdv/components → components}/utils/install.js +0 -0
  69. /package/dist/lib/{packages/antdv/hooks → hooks}/use-namespace/index.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @king-one/antdv
2
2
 
3
+ ## 1.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - feat:增加 proTitle 组件
8
+
9
+ ## 1.0.29
10
+
11
+ ### Patch Changes
12
+
13
+ - feat:修改虚拟列表页码错误
14
+
3
15
  ## 1.0.28
4
16
 
5
17
  ### Patch Changes
@@ -1,14 +1,14 @@
1
1
  import { KForm as t } from "./form/index.mjs";
2
- import { KVirtualList as l } from "./virtual-list/index.mjs";
3
- import { KCollapseTranstion as m } from "./collapse-transtion/index.mjs";
4
- import { KProDialog as f } from "./pro-dialog/index.mjs";
5
- import { KScrollBar as x } from "./scroll-bar/index.mjs";
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
- m as KCollapseTranstion,
8
+ l as KCollapseTranstion,
9
9
  t as KForm,
10
- f as KProDialog,
10
+ p as KProDialog,
11
+ f as KProTitle,
11
12
  s as KScaleVirtualList,
12
- x as KScrollBar,
13
- l as KVirtualList
13
+ K as KScrollBar
14
14
  };
@@ -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,4 @@
1
+ import f from "./ProTitle.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,31 @@
1
+ import { defineComponent as l, computed as p, openBlock as a, createElementBlock as m, normalizeClass as c, createElementVNode as i, 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 C = /* @__PURE__ */ l({
5
+ __name: "ProTitle",
6
+ props: _,
7
+ setup(t) {
8
+ const o = t, { b: e, m: n } = f("pro-title"), s = p(() => o.unBorder ? [e(), n("unborder")] : [e()]);
9
+ return (r, B) => (a(), m(
10
+ "div",
11
+ {
12
+ class: c(s.value)
13
+ },
14
+ [
15
+ i(
16
+ "span",
17
+ null,
18
+ u(r.title),
19
+ 1
20
+ /* TEXT */
21
+ ),
22
+ d(r.$slots, "default")
23
+ ],
24
+ 2
25
+ /* CLASS */
26
+ ));
27
+ }
28
+ });
29
+ export {
30
+ C as default
31
+ };
@@ -0,0 +1,17 @@
1
+ const e = {
2
+ unBorder: {
3
+ type: Boolean,
4
+ default: !1
5
+ },
6
+ title: {
7
+ type: String,
8
+ required: !0
9
+ },
10
+ size: {
11
+ type: String,
12
+ default: "14px"
13
+ }
14
+ };
15
+ export {
16
+ e as TitleProps
17
+ };
@@ -0,0 +1,2 @@
1
+ import "../../base/style/index.mjs";
2
+ import "@king-one/antdv/dist/theme-chalk/pro-title.css";
@@ -1,4 +1,4 @@
1
- import { createEventHook as $ } from "../../../node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.4.38/node_modules/@vueuse/shared/index.mjs";
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) {
@@ -61,7 +61,7 @@ function k(r, t, a, o, { containerRef: c, state: e, currentList: n, source: l },
61
61
  e.value = {
62
62
  start: p < 0 ? 0 : p,
63
63
  end: g > l.value.length ? l.value.length : g,
64
- current: f - 1,
64
+ current: f,
65
65
  scale: e.value.scale
66
66
  }, n.value = l.value.slice(e.value.start, e.value.end).map((h, v) => ({
67
67
  data: h,
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 a } from "./components/form/index.mjs";
5
- import { virtualListProps as i } from "./components/virtual-list/src/types.mjs";
6
- import { KVirtualList as x } from "./components/virtual-list/index.mjs";
7
- import { collapseProps as P } from "./components/collapse-transtion/src/types.mjs";
8
- import { KCollapseTranstion as g } from "./components/collapse-transtion/index.mjs";
9
- import { useProDialog as n, useProDialogInit as D } from "./components/pro-dialog/hooks/useProDialog.mjs";
10
- import { proDialogProps as S } from "./components/pro-dialog/src/types.mjs";
11
- import { KProDialog as V } from "./components/pro-dialog/index.mjs";
12
- import { scrollbarProps as d } from "./components/scroll-bar/src/types.mjs";
13
- import { KScrollBar as y } from "./components/scroll-bar/index.mjs";
14
- import { KScaleVirtualList as C } from "./components/scale-virtual-list/index.mjs";
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
- g as KCollapseTranstion,
17
- a as KForm,
18
- V as KProDialog,
19
- C as KScaleVirtualList,
20
- y as KScrollBar,
21
- x as KVirtualList,
22
- P as collapseProps,
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
- S as proDialogProps,
26
- d as scrollbarProps,
27
- n as useProDialog,
28
- D as useProDialogInit,
29
- i as virtualListProps
26
+ c as proDialogProps,
27
+ B as scrollbarProps,
28
+ K as useProDialog,
29
+ g as useProDialogInit
30
30
  };
@@ -1,14 +1,13 @@
1
1
  import "./components/index.mjs";
2
- import { KForm as r } from "./components/form/index.mjs";
3
- import { KVirtualList as i } from "./components/virtual-list/index.mjs";
4
- const n = [r, i];
5
- function m(o) {
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 c = {
9
- install: m
7
+ const p = {
8
+ install: c
10
9
  };
11
10
  export {
12
- c as default,
13
- m as install
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.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"),c=require("./types.js"),i=e.defineComponent({__name:"ProTitle",props:c.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,a)=>(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=i;
@@ -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::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}
@@ -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::before{content:"";position:absolute;width:3px;height:16px;background:#517cfc;left:0;top:3px}
@@ -1,6 +1,6 @@
1
1
  export * from './form';
2
- export * from './virtual-list';
3
2
  export * from './collapse-transtion';
4
3
  export * from './pro-dialog';
4
+ export * from './pro-title';
5
5
  export * from './scroll-bar';
6
6
  export * from './scale-virtual-list';
@@ -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.28",
4
+ "version": "1.0.30",
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,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
- };
@@ -1,4 +0,0 @@
1
- import f from "./virtual-list.vue2.mjs";
2
- export {
3
- f as default
4
- };
@@ -1,87 +0,0 @@
1
- import { defineComponent as h, ref as u, toRaw as S, onMounted as z, openBlock as y, createBlock as I, unref as f, withCtx as m, createVNode as T, renderSlot as w } from "vue";
2
- import { VVirtualList as L } from "vueuc";
3
- import { debounce as k } from "lodash-es";
4
- import { KScrollBar as B } from "../../scroll-bar/index.mjs";
5
- import { virtualListProps as C } from "./types.mjs";
6
- const M = /* @__PURE__ */ h({
7
- __name: "virtual-list",
8
- props: C,
9
- setup(p, { expose: d }) {
10
- const n = p, t = u(null), s = u(null);
11
- function a() {
12
- var e;
13
- return (e = t.value) == null ? void 0 : e.listElRef;
14
- }
15
- function c() {
16
- var e;
17
- return (e = t.value) == null ? void 0 : e.itemsElRef;
18
- }
19
- const i = () => {
20
- var e;
21
- return (e = s.value) == null ? void 0 : e.sync();
22
- }, b = k(() => {
23
- var e;
24
- if (t.value) {
25
- const r = t.value.listElRef.scrollTop, o = t.value.viewportItems.map((l) => S(l));
26
- (e = n.onScroll) == null || e.call(n, { viewportItems: o, scrollTop: r });
27
- }
28
- }, 100);
29
- function v() {
30
- b(), i();
31
- }
32
- z(() => {
33
- setTimeout(() => {
34
- i();
35
- }, 100);
36
- });
37
- function g() {
38
- i();
39
- }
40
- function R(e, r) {
41
- var o, l;
42
- typeof e == "number" ? (o = t.value) == null || o.scrollTo(e, r ?? 0) : (l = t.value) == null || l.scrollTo(e);
43
- }
44
- return d({
45
- getScrollContainer: a,
46
- getScrollContent: c,
47
- scrollTo: R
48
- }), (e, r) => (y(), I(f(B), {
49
- ref_key: "scrollbarInstRef",
50
- ref: s,
51
- style: { "max-height": "300px" },
52
- "x-scrollable": e.xScrollable,
53
- container: a,
54
- content: c
55
- }, {
56
- default: m(() => [
57
- T(f(L), {
58
- ref_key: "virtualListInstRef",
59
- ref: t,
60
- items: e.items,
61
- style: { height: "100%" },
62
- "item-size": e.itemSize,
63
- "item-resizable": e.itemResizable,
64
- "show-scrollbar": !1,
65
- "padding-bottom": e.paddingBottom,
66
- "padding-top": e.paddingTop,
67
- "on-scroll": v,
68
- "on-resize": g
69
- }, {
70
- default: m(({ item: o, index: l }) => [
71
- w(e.$slots, "default", {
72
- item: o,
73
- index: l
74
- })
75
- ]),
76
- _: 3
77
- /* FORWARDED */
78
- }, 8, ["items", "item-size", "item-resizable", "padding-bottom", "padding-top"])
79
- ]),
80
- _: 3
81
- /* FORWARDED */
82
- }, 8, ["x-scrollable"]));
83
- }
84
- });
85
- export {
86
- M as default
87
- };