@lazycatcloud/lzc-toolkit 0.0.181 → 0.0.182
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/dist/index.es.js +14 -15
- package/dist/index.umd.js +1 -1
- package/dist/types/useSelectable/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -508,26 +508,25 @@ function en(e, t) {
|
|
|
508
508
|
const yt = Symbol(), Xe = Symbol(), Ze = Symbol(), Ve = Symbol(), Ke = Symbol(), Ge = Symbol(), qe = Symbol(), Je = Symbol(), et = Symbol(), pe = Symbol(), tt = Symbol();
|
|
509
509
|
function Eo() {
|
|
510
510
|
const { voidFn: e, boolFn: t, boolRef: n, numberRef: o, arrayRef: l } = {
|
|
511
|
-
voidFn: (
|
|
511
|
+
voidFn: (h) => {
|
|
512
512
|
},
|
|
513
|
-
boolFn: (
|
|
513
|
+
boolFn: (h) => !1,
|
|
514
514
|
boolRef: I(() => !1),
|
|
515
515
|
numberRef: I(() => 0),
|
|
516
516
|
arrayRef: I(() => [])
|
|
517
|
-
};
|
|
518
|
-
ee(yt, "id");
|
|
519
|
-
const s = ee(Ke, l), a = ee(Ve, t), c = ee(et, n), u = ee(Ze, e), d = ee(Xe, e), v = ee(Ge, e), r = ee(qe, e), M = ee(Je, e), f = ee(pe, e), i = ee(tt, o);
|
|
517
|
+
}, s = ee(yt, "id"), a = ee(Ke, l), c = ee(Ve, t), u = ee(et, n), d = ee(Ze, e), v = ee(Xe, e), r = ee(Ge, e), M = ee(qe, e), f = ee(Je, e), i = ee(pe, e), p = ee(tt, o);
|
|
520
518
|
return {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
519
|
+
itemKey: s,
|
|
520
|
+
selected: a,
|
|
521
|
+
isSelected: c,
|
|
522
|
+
isAllSelected: u,
|
|
523
|
+
toggle: d,
|
|
524
|
+
toggleAll: v,
|
|
525
|
+
select: r,
|
|
526
|
+
selectAll: M,
|
|
527
|
+
unselect: f,
|
|
528
|
+
unselectAll: i,
|
|
529
|
+
selectedCount: p
|
|
531
530
|
};
|
|
532
531
|
}
|
|
533
532
|
function Io(e, t, n = { deep: !0 }) {
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(I,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(I=typeof globalThis<"u"?globalThis:I||self,e(I.ui={},I.Vue))})(this,function(I,e){"use strict";const Le={created(t,n){let o,l;function s(i){i.button==0&&(o=i.clientX,l=i.clientY)}function a(i){if(i.button!=0||o===void 0)return;const d=i.clientX,c=i.clientY,f=Math.abs(d-o),g=Math.abs(c-l);f>5||g>5||n.value&&n.value(i)}t.__mouse_down__=s,t.__mouse_up__=a,t.addEventListener("mousedown",s),t.addEventListener("mouseup",a)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},Xe={created(t,n){const{fn:o,ms:l=1500}=n.value;let s=null;function a(i){s||(o(i),s=setTimeout(()=>{s=null},l))}t.addEventListener("click",a)}};function Ze(t,n){var o;const l=e.shallowRef();return e.watchEffect(()=>{l.value=t()},{...n,flush:(o=n?.flush)!=null?o:"sync"}),e.readonly(l)}function Ke(t,n){let o,l,s;const a=e.ref(!0),i=()=>{a.value=!0,s()};e.watch(t,i,{flush:"sync"});const d=typeof n=="function"?n:n.get,c=typeof n=="function"?void 0:n.set,f=e.customRef((g,u)=>(l=g,s=u,{get(){return a.value&&(o=d(),a.value=!1),l(),o},set(m){c?.(m)}}));return Object.isExtensible(f)&&(f.trigger=i),f}function me(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function V(t){return typeof t=="function"?t():e.unref(t)}const je=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ge=Object.prototype.toString,qe=t=>Ge.call(t)==="[object Object]",q=()=>{};function Ce(t,n){function o(...l){return new Promise((s,a)=>{Promise.resolve(t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(s).catch(a)})}return o}function Je(t,n={}){let o,l,s=q;const a=d=>{clearTimeout(d),s(),s=q};return d=>{const c=V(t),f=V(n.maxWait);return o&&a(o),c<=0||f!==void 0&&f<=0?(l&&(a(l),l=null),Promise.resolve(d())):new Promise((g,u)=>{s=n.rejectOnCancel?u:g,f&&!l&&(l=setTimeout(()=>{o&&a(o),l=null,g(d())},f)),o=setTimeout(()=>{l&&a(l),l=null,g(d())},c)})}}function et(...t){let n=0,o,l=!0,s=q,a,i,d,c,f;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:i,trailing:d=!0,leading:c=!0,rejectOnCancel:f=!1}=t[0]:[i,d=!0,c=!0,f=!1]=t;const g=()=>{o&&(clearTimeout(o),o=void 0,s(),s=q)};return m=>{const M=V(i),r=Date.now()-n,D=()=>a=m();return g(),M<=0?(n=Date.now(),D()):(r>M&&(c||!l)?(n=Date.now(),D()):d&&(a=new Promise((p,h)=>{s=f?h:p,o=setTimeout(()=>{n=Date.now(),l=!0,p(D()),g()},Math.max(0,M-r))})),!c&&!o&&(o=setTimeout(()=>l=!0,M)),l=!1,a)}}function tt(t){return t||e.getCurrentInstance()}function ne(t,n=200,o={}){return Ce(Je(n,o),t)}function he(t,n=200,o=!1,l=!0,s=!1){return Ce(et(n,o,l,s),t)}function pe(t,n=!0,o){tt()?e.onMounted(t,o):n?t():e.nextTick(t)}function X(t){var n;const o=V(t);return(n=o?.$el)!=null?n:o}const oe=je?window:void 0,nt=je?window.document:void 0;function le(...t){let n,o,l,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,l,s]=t,n=oe):[n,o,l,s]=t,!n)return q;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const a=[],i=()=>{a.forEach(g=>g()),a.length=0},d=(g,u,m,M)=>(g.addEventListener(u,m,M),()=>g.removeEventListener(u,m,M)),c=e.watch(()=>[X(n),V(s)],([g,u])=>{if(i(),!g)return;const m=qe(u)?{...u}:u;a.push(...o.flatMap(M=>l.map(r=>d(g,M,r,m))))},{immediate:!0,flush:"post"}),f=()=>{c(),i()};return me(f),f}function ot(){const t=e.ref(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function lt(t){const n=ot();return e.computed(()=>(n.value,Boolean(t())))}function st(t){const n=e.getCurrentInstance(),o=Ke(()=>null,()=>t?X(t):n.proxy.$el);return e.onUpdated(o.trigger),e.onMounted(o.trigger),o}function ye(t,n,o={}){const{window:l=oe,...s}=o;let a;const i=lt(()=>l&&"ResizeObserver"in l),d=()=>{a&&(a.disconnect(),a=void 0)},c=e.computed(()=>Array.isArray(t)?t.map(u=>X(u)):[X(t)]),f=e.watch(c,u=>{if(d(),i.value&&l){a=new ResizeObserver(n);for(const m of u)m&&a.observe(m,s)}},{immediate:!0,flush:"post"}),g=()=>{d(),f()};return me(g),{isSupported:i,stop:g}}function at(t,n={width:0,height:0},o={}){const{window:l=oe,box:s="content-box"}=o,a=e.computed(()=>{var u,m;return(m=(u=X(t))==null?void 0:u.namespaceURI)==null?void 0:m.includes("svg")}),i=e.ref(n.width),d=e.ref(n.height),{stop:c}=ye(t,([u])=>{const m=s==="border-box"?u.borderBoxSize:s==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(l&&a.value){const M=X(t);if(M){const r=l.getComputedStyle(M);i.value=Number.parseFloat(r.width),d.value=Number.parseFloat(r.height)}}else if(m){const M=Array.isArray(m)?m:[m];i.value=M.reduce((r,{inlineSize:D})=>r+D,0),d.value=M.reduce((r,{blockSize:D})=>r+D,0)}else i.value=u.contentRect.width,d.value=u.contentRect.height},o);pe(()=>{const u=X(t);u&&(i.value="offsetWidth"in u?u.offsetWidth:n.width,d.value="offsetHeight"in u?u.offsetHeight:n.height)});const f=e.watch(()=>X(t),u=>{i.value=u?n.width:0,d.value=u?n.height:0});function g(){c(),f()}return{width:i,height:d,stop:g}}const Se=1;function it(t,n={}){const{throttle:o=0,idle:l=200,onStop:s=q,onScroll:a=q,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:d={capture:!1,passive:!0},behavior:c="auto",window:f=oe,onError:g=T=>{console.error(T)}}=n,u=e.ref(0),m=e.ref(0),M=e.computed({get(){return u.value},set(T){D(T,void 0)}}),r=e.computed({get(){return m.value},set(T){D(void 0,T)}});function D(T,A){var Q,$,y;if(!f)return;const v=V(t);!v||(y=v instanceof Document?f.document.body:v)==null||y.scrollTo({top:(Q=V(A))!=null?Q:r.value,left:($=V(T))!=null?$:M.value,behavior:V(c)})}const p=e.ref(!1),h=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),N=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),w=T=>{!p.value||(p.value=!1,N.left=!1,N.right=!1,N.top=!1,N.bottom=!1,s(T))},j=ne(w,o+l),B=T=>{var A;if(!f)return;const Q=((A=T?.document)==null?void 0:A.documentElement)||T?.documentElement||X(T),{display:$,flexDirection:y}=getComputedStyle(Q),v=Q.scrollLeft;N.left=v<u.value,N.right=v>u.value;const C=Math.abs(v)<=(i.left||0),b=Math.abs(v)+Q.clientWidth>=Q.scrollWidth-(i.right||0)-Se;$==="flex"&&y==="row-reverse"?(h.left=b,h.right=C):(h.left=C,h.right=b),u.value=v;let _=Q.scrollTop;T===f.document&&!_&&(_=f.document.body.scrollTop),N.top=_<m.value,N.bottom=_>m.value;const E=Math.abs(_)<=(i.top||0),z=Math.abs(_)+Q.clientHeight>=Q.scrollHeight-(i.bottom||0)-Se;$==="flex"&&y==="column-reverse"?(h.top=z,h.bottom=E):(h.top=E,h.bottom=z),m.value=_},S=T=>{var A;if(!f)return;const Q=(A=T.target.documentElement)!=null?A:T.target;B(Q),p.value=!0,j(T),a(T)};return le(t,"scroll",o?he(S,o,!0,!1):S,d),pe(()=>{try{const T=V(t);if(!T)return;B(T)}catch(T){g(T)}}),le(t,"scrollend",w,d),{x:M,y:r,isScrolling:p,arrivedState:h,directions:N,measure(){const T=V(t);f&&T&&B(T)}}}let rt=0;function De(t,n={}){const o=e.ref(!1),{document:l=nt,immediate:s=!0,manual:a=!1,id:i=`vueuse_styletag_${++rt}`}=n,d=e.ref(t);let c=()=>{};const f=()=>{if(!l)return;const u=l.getElementById(i)||l.createElement("style");u.isConnected||(u.id=i,n.media&&(u.media=n.media),l.head.appendChild(u)),!o.value&&(c=e.watch(d,m=>{u.textContent=m},{immediate:!0}),o.value=!0)},g=()=>{!l||!o.value||(c(),l.head.removeChild(l.getElementById(i)),o.value=!1)};return s&&!a&&pe(f),a||me(g),{id:i,css:d,unload:g,load:f,isLoaded:e.readonly(o)}}function ct(t,n,o){const l=t.style[n];return l!=o&&(t.style[n]=o),{reset(){l!=o&&(t.style[n]=l)}}}function xe(t,n){const{scrollEndHook:o,itemHeight:l,overscan:s=5}=n,a=e.ref(null),i=at(a),d=e.ref(!0),c=ne(B,100);let f;const g=e.shallowRef(t),u=e.ref(0),m=e.ref({start:0,end:10}),M=e.ref({start:0,end:s});let r=0;const D=e.ref([]),p=e.computed(()=>{let{sum:E,height:z}={sum:0,height:0};return g.value.map((k,Y)=>(typeof l=="number"?z=l:z=l(Y),E+=z,{height:z,sum:E}))}),h=e.computed(()=>$(m.value.start)),N=e.computed(()=>typeof l=="number"?p.value.length*l:p.value[p.value.length-1]?.sum||0),w=e.computed(()=>{const{start:E,end:z}=M.value;return D.value.slice(E,z)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(f)),e.watch(g,()=>{(i.width.value||i.height.value)&&S()},{deep:!0}),e.watch([i.width,i.height],([E,z])=>{(E||z)&&S()},{deep:!0}),e.watch(u,()=>{j(),c()});function j(){d.value=!1}function B(){d.value=!0,o?.()}function S(){cancelAnimationFrame(f),f=requestAnimationFrame(T)}function T(){if(a.value){u.value=a.value.scrollTop;let E=A(u.value);r=Q(E);let z=Math.max(0,E-s),k=Math.min(E+r+s,g.value.length);m.value={start:z,end:k},D.value=g.value.slice(z,k).map((Y,O)=>({data:Y,index:O+z})),M.value.start=E-z,M.value.end=M.value.start+r}}function A(E){let z=0,k=p.value.length-1,Y=-1;for(;z<=k;){const O=Math.floor((z+k)/2);p.value[O].sum>=E?(Y=O,k=O-1):z=O+1}return Math.max(0,Y)}function Q(E){let z=0,k=0;for(let Y=E;Y<p.value.length&&(z++,k+=p.value[Y].height,!(k>=i.height.value));Y++);return z}function $(E){if(typeof l=="number")return E*l;let z=p.value[E];return z?z.sum-z.height:0}function y(E){return p.value[E]||{sum:0,height:0}}function v(E,z="smooth"){if(a.value){const{reset:k}=ct(a.value,"scrollBehavior",z),Y=y(E);a.value.scrollTop=Y.sum-Y.height,T(),k()}if(a.value){const k=y(E);a.value.scrollTop=k.sum-k.height,T()}}const C=e.computed(()=>({style:{width:"100%",height:`${N.value}px`,pointerEvents:d.value?void 0:"none"}})),b=e.computed(()=>({style:{transform:`translate3d(0, ${h.value}px, 0)`,"will-change":"transform"}})),_={overflowY:"auto"};return{list:D,visiableList:w,getItemHeightData:y,getoffsetTopIndex:A,totalHeight:N,clientHeight:i.height,scrollTo:v,scrollTop:u,isScrollEnd:d,containerProps:{ref:a,onScroll:()=>{S()},style:_},wrapperProps:C,innerProps:b}}const Te=Symbol(),se=Symbol(),ae=Symbol(),ie=Symbol(),re=Symbol(),ce=Symbol(),ue=Symbol(),de=Symbol(),fe=Symbol(),J=Symbol(),Me=Symbol();function ut(){const{voidFn:t,boolFn:n,boolRef:o,numberRef:l,arrayRef:s}={voidFn:D=>{},boolFn:D=>!1,boolRef:e.computed(()=>!1),numberRef:e.computed(()=>0),arrayRef:e.computed(()=>[])};e.inject(Te,"id");const a=e.inject(re,s),i=e.inject(ie,n),d=e.inject(fe,o),c=e.inject(ae,t),f=e.inject(se,t),g=e.inject(ce,t),u=e.inject(ue,t),m=e.inject(de,t),M=e.inject(J,t),r=e.inject(Me,l);return{selected:a,isSelected:i,isAllSelected:d,toggle:c,toggleAll:f,select:g,selectAll:u,unselect:m,unselectAll:M,selectedCount:r}}function dt(t,n,o={deep:!0}){const l=e.ref(!1),s=e.ref(new Set),a=e.ref(new Map);e.watch(t,h=>{a.value=h.reduce((N,w)=>(N.set(w[n],w),N),new Map)},{deep:o.deep,immediate:!0});const i=e.computed(()=>{let h=[];if(l.value!=null)l.value&&(h=Array.from(a.value.values()));else if(s.value.size){let N;s.value.forEach(w=>{N=a.value.get(w),N&&h.push(N)})}return h}),d=e.computed(()=>{let h=0;return l.value!=null?l.value&&(h=a.value.size):h=s.value.size,h}),c=e.computed(()=>{let h;if(l.value!=null)h=l.value;else{const N=s.value.size,w=a.value.size;h=N==w}return h});function f(){l.value=!0}function g(){l.value=!1}function u(h){r(()=>{h.forEach(N=>{s.value.add(N[n])})})}function m(h){r(()=>{h.forEach(N=>{s.value.delete(N[n])})})}function M(h){return l.value!=null?l.value:s.value.has(h[n])}function r(h){l.value!=null&&(l.value?s.value=new Set(Array.from(a.value.keys())):s.value=new Set),h(),s.value.size==0?l.value=!1:s.value.size==a.value.size?l.value=!0:l.value=null}function D(h){r(()=>{h.forEach(N=>{M(N)?s.value.delete(N[n]):s.value.add(N[n])})})}function p(){const{value:h}=c;h?g():f()}return e.provide(Te,n),e.provide(se,p),e.provide(ae,D),e.provide(ie,M),e.provide(re,i),e.provide(ce,u),e.provide(ue,f),e.provide(de,m),e.provide(fe,c),e.provide(J,g),e.provide(J,g),e.provide(Me,d),{selected:i,select:u,selectAll:f,unselect:m,unselectAll:g,toggle:D,toggleAll:p,isSelected:M,isAllSelected:c,selectedCount:d}}function ft(t){const n=e.ref(!1),o=e.ref(new Set),l=e.computed(()=>{let r=[];return n.value!=null?n.value&&(r=t.value):o.value.size&&(r=Array.from(o.value.values())),r}),s=e.computed(()=>{let r=0;return n.value!=null?n.value&&(r=t.value.length):r=o.value.size,r}),a=e.computed(()=>{let r;if(n.value!=null)r=n.value;else{const D=o.value.size,p=t.value.length;r=D==p}return r});function i(){n.value=!0}function d(){n.value=!1}function c(r){u(()=>{r.forEach(D=>{o.value.add(D)})})}function f(r){u(()=>{r.forEach(D=>{o.value.delete(D)})})}function g(r){return n.value!=null?n.value:o.value.has(r)}function u(r){n.value!=null&&(n.value?o.value=new Set(Array.from(t.value)):o.value=new Set),r(),o.value.size==0?n.value=!1:o.value.size==t.value.length?n.value=!0:n.value=null}function m(r){u(()=>{r.forEach(D=>{g(D)?o.value.delete(D):o.value.add(D)})})}function M(){const{value:r}=a;r?d():i()}return e.provide(se,M),e.provide(ae,m),e.provide(ie,g),e.provide(re,l),e.provide(ce,c),e.provide(ue,i),e.provide(de,f),e.provide(fe,a),e.provide(J,d),e.provide(J,d),e.provide(Me,s),{selected:l,select:c,selectAll:i,unselect:f,unselectAll:d,toggle:m,toggleAll:M,isSelected:g,isAllSelected:a,selectedCount:s}}function Ne(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function we({attribute:t,selectWay:n="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:s=Ne("\u9009\u62E9"),unselect:a=Ne("\u53D6\u6D88\u9009\u62E9"),unselectAll:i=Ne("\u53D6\u6D88\u5168\u9009")}=l();let d={};const c=e.computed(()=>he(n==="colum"?H:K,50)),f=new Set,g=e.ref(!0),u=e.ref(),m=e.ref(!1),M=e.ref({x:0,y:0}),r=e.ref({x:0,y:0,scrollTop:0}),D=new ResizeObserver(L=>p.value=L[0].target.getBoundingClientRect()),p=e.ref({}),h=e.ref({top:0,height:0,sync(L=!1){h.value.top=u.value?.scrollTop||0,L&&(h.value.height=u.value?.scrollHeight||0)}}),N=e.computed(()=>m.value?{left:Math.min(M.value.x,r.value.x)-p.value.left,top:Math.min(M.value.y,r.value.y)-p.value.top,width:Math.abs(M.value.x-r.value.x),height:Math.abs(M.value.y-r.value.y)}:{left:0,top:0,width:0,height:0}),{margin:w=50,startSpeed:j=30,maxSpeed:B=30}=o;let S;const T=w,A=j,Q=B,$=L=>L**1;let y=0;function v(L){if(cancelAnimationFrame(S),y=C(L),y=Math.max(Math.min(y,Q),-Q),y!==0){const x=u.value;if(!x||!m.value)return;const P=h.value.height-p.value.height;let R=h.value.top+Number(y);R=Math.min(Math.max(0,R),P),x.scrollTop=R,_(),S=requestAnimationFrame(()=>v(L))}}function C(L){if(u.value){const P=p.value,R=P.bottom-L;if(R<T)return A*$(1-R/T);const G=L-P.top;if(G<T)return-A*$(1-G/T)}return 0}function b(L){const x={...N.value,right:0,bottom:0};return x.left+=p.value.left,x.top+=p.value.top-h.value.top,x.right=x.width+x.left,x.bottom=x.height+x.top,x.left<L.right&&x.right>L.left&&x.top<L.bottom&&x.bottom>L.top}function _(){h.value.sync();const{top:L,height:x}=h.value;r.value.y=Math.min(x+p.value.top,r.value.y+L-r.value.scrollTop),r.value.scrollTop=L}function E(L,x,P="dynamic-styles"){let R=document.getElementById(P);R||(R=document.createElement("style"),R.id=P,document.head.appendChild(R));const G=R.sheet.cssRules,ee=G.length,Yn=`${L} { ${x} }`;for(let Ae=0;Ae<ee;Ae++){const We=G[Ae];if(We.selectorText===L&&We.style.cssText===x)return}R.sheet.insertRule(Yn,ee)}function z(L,x){g.value=!0,m.value=!0,h.value.sync(!0);const P=x+h.value.top;M.value.x=L,M.value.y=P,r.value.x=L,r.value.y=P,u.value?.classList.add("disable-scroll-behavior"),f.clear()}function k(L,x,P){!m.value||(g.value&&n==="colum"&&!U()&&(i(),g.value=!1),P?.(),v(x),r.value.x=Math.max(L,p.value.left),r.value.y=Math.min(x+h.value.top,h.value.height+p.value.top),r.value.scrollTop=h.value.top,c.value())}function Y(){m.value=!1,u.value?.classList.remove("disable-scroll-behavior")}function O(){!m.value||(y||_(),c.value())}function U(){if(!m.value)return!1;const{width:L,height:x}=N.value;return!(Math.max(L,x)>5)}function F(){U()&&i()}function H(){U()||u.value?.querySelectorAll(`[${t}]`).forEach(L=>{d[`${t}`]=L.getAttribute(`${t}`),b(L.getBoundingClientRect())?s([d]):a([d])})}function K(){const L=[];let x=null,P=0;u.value?.querySelectorAll(`[${t}]`).forEach((R,G)=>{const ee=R.getAttribute(`${t}`);L.push(ee),b(R.getBoundingClientRect())?(x===null&&(x=G),x=Math.min(x,G),P=Math.max(P,G)):(d[`${t}`]=ee,f.has(ee)&&a([d]))});for(let R=x;R<P+1;R++)d[`${t}`]=L[R],s([d]),f.add(L[R])}function Qn(L){return!L?.value||(u.value=L.value,!u?.value)?!1:(D.observe(u.value),E(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Qn,dragStart:z,dragMove:k,dragEnd:Y,onScroll:O,isSingleClick:U,cancelSelectAllBySingleClick:F,selectFn:c,selectRange:N,isPressing:m,containerEl:u,observer:D}}function Mt(t){const n=we(t),{observer:o,selectRange:l}=n,{onScroll:s,dragStart:a,dragMove:i,dragEnd:d,cancelSelectAllBySingleClick:c}=n,f=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),{load:g}=De(`.drag-select-box {
|
|
1
|
+
(function(I,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(I=typeof globalThis<"u"?globalThis:I||self,e(I.ui={},I.Vue))})(this,function(I,e){"use strict";const Le={created(t,n){let o,l;function s(i){i.button==0&&(o=i.clientX,l=i.clientY)}function a(i){if(i.button!=0||o===void 0)return;const d=i.clientX,c=i.clientY,f=Math.abs(d-o),g=Math.abs(c-l);f>5||g>5||n.value&&n.value(i)}t.__mouse_down__=s,t.__mouse_up__=a,t.addEventListener("mousedown",s),t.addEventListener("mouseup",a)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},Xe={created(t,n){const{fn:o,ms:l=1500}=n.value;let s=null;function a(i){s||(o(i),s=setTimeout(()=>{s=null},l))}t.addEventListener("click",a)}};function Ze(t,n){var o;const l=e.shallowRef();return e.watchEffect(()=>{l.value=t()},{...n,flush:(o=n?.flush)!=null?o:"sync"}),e.readonly(l)}function Ke(t,n){let o,l,s;const a=e.ref(!0),i=()=>{a.value=!0,s()};e.watch(t,i,{flush:"sync"});const d=typeof n=="function"?n:n.get,c=typeof n=="function"?void 0:n.set,f=e.customRef((g,u)=>(l=g,s=u,{get(){return a.value&&(o=d(),a.value=!1),l(),o},set(m){c?.(m)}}));return Object.isExtensible(f)&&(f.trigger=i),f}function me(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function V(t){return typeof t=="function"?t():e.unref(t)}const je=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ge=Object.prototype.toString,qe=t=>Ge.call(t)==="[object Object]",q=()=>{};function Ce(t,n){function o(...l){return new Promise((s,a)=>{Promise.resolve(t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})).then(s).catch(a)})}return o}function Je(t,n={}){let o,l,s=q;const a=d=>{clearTimeout(d),s(),s=q};return d=>{const c=V(t),f=V(n.maxWait);return o&&a(o),c<=0||f!==void 0&&f<=0?(l&&(a(l),l=null),Promise.resolve(d())):new Promise((g,u)=>{s=n.rejectOnCancel?u:g,f&&!l&&(l=setTimeout(()=>{o&&a(o),l=null,g(d())},f)),o=setTimeout(()=>{l&&a(l),l=null,g(d())},c)})}}function et(...t){let n=0,o,l=!0,s=q,a,i,d,c,f;!e.isRef(t[0])&&typeof t[0]=="object"?{delay:i,trailing:d=!0,leading:c=!0,rejectOnCancel:f=!1}=t[0]:[i,d=!0,c=!0,f=!1]=t;const g=()=>{o&&(clearTimeout(o),o=void 0,s(),s=q)};return m=>{const M=V(i),r=Date.now()-n,D=()=>a=m();return g(),M<=0?(n=Date.now(),D()):(r>M&&(c||!l)?(n=Date.now(),D()):d&&(a=new Promise((p,h)=>{s=f?h:p,o=setTimeout(()=>{n=Date.now(),l=!0,p(D()),g()},Math.max(0,M-r))})),!c&&!o&&(o=setTimeout(()=>l=!0,M)),l=!1,a)}}function tt(t){return t||e.getCurrentInstance()}function ne(t,n=200,o={}){return Ce(Je(n,o),t)}function he(t,n=200,o=!1,l=!0,s=!1){return Ce(et(n,o,l,s),t)}function pe(t,n=!0,o){tt()?e.onMounted(t,o):n?t():e.nextTick(t)}function X(t){var n;const o=V(t);return(n=o?.$el)!=null?n:o}const oe=je?window:void 0,nt=je?window.document:void 0;function le(...t){let n,o,l,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,l,s]=t,n=oe):[n,o,l,s]=t,!n)return q;Array.isArray(o)||(o=[o]),Array.isArray(l)||(l=[l]);const a=[],i=()=>{a.forEach(g=>g()),a.length=0},d=(g,u,m,M)=>(g.addEventListener(u,m,M),()=>g.removeEventListener(u,m,M)),c=e.watch(()=>[X(n),V(s)],([g,u])=>{if(i(),!g)return;const m=qe(u)?{...u}:u;a.push(...o.flatMap(M=>l.map(r=>d(g,M,r,m))))},{immediate:!0,flush:"post"}),f=()=>{c(),i()};return me(f),f}function ot(){const t=e.ref(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function lt(t){const n=ot();return e.computed(()=>(n.value,Boolean(t())))}function st(t){const n=e.getCurrentInstance(),o=Ke(()=>null,()=>t?X(t):n.proxy.$el);return e.onUpdated(o.trigger),e.onMounted(o.trigger),o}function ye(t,n,o={}){const{window:l=oe,...s}=o;let a;const i=lt(()=>l&&"ResizeObserver"in l),d=()=>{a&&(a.disconnect(),a=void 0)},c=e.computed(()=>Array.isArray(t)?t.map(u=>X(u)):[X(t)]),f=e.watch(c,u=>{if(d(),i.value&&l){a=new ResizeObserver(n);for(const m of u)m&&a.observe(m,s)}},{immediate:!0,flush:"post"}),g=()=>{d(),f()};return me(g),{isSupported:i,stop:g}}function at(t,n={width:0,height:0},o={}){const{window:l=oe,box:s="content-box"}=o,a=e.computed(()=>{var u,m;return(m=(u=X(t))==null?void 0:u.namespaceURI)==null?void 0:m.includes("svg")}),i=e.ref(n.width),d=e.ref(n.height),{stop:c}=ye(t,([u])=>{const m=s==="border-box"?u.borderBoxSize:s==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(l&&a.value){const M=X(t);if(M){const r=l.getComputedStyle(M);i.value=Number.parseFloat(r.width),d.value=Number.parseFloat(r.height)}}else if(m){const M=Array.isArray(m)?m:[m];i.value=M.reduce((r,{inlineSize:D})=>r+D,0),d.value=M.reduce((r,{blockSize:D})=>r+D,0)}else i.value=u.contentRect.width,d.value=u.contentRect.height},o);pe(()=>{const u=X(t);u&&(i.value="offsetWidth"in u?u.offsetWidth:n.width,d.value="offsetHeight"in u?u.offsetHeight:n.height)});const f=e.watch(()=>X(t),u=>{i.value=u?n.width:0,d.value=u?n.height:0});function g(){c(),f()}return{width:i,height:d,stop:g}}const Se=1;function it(t,n={}){const{throttle:o=0,idle:l=200,onStop:s=q,onScroll:a=q,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:d={capture:!1,passive:!0},behavior:c="auto",window:f=oe,onError:g=T=>{console.error(T)}}=n,u=e.ref(0),m=e.ref(0),M=e.computed({get(){return u.value},set(T){D(T,void 0)}}),r=e.computed({get(){return m.value},set(T){D(void 0,T)}});function D(T,A){var Q,$,y;if(!f)return;const v=V(t);!v||(y=v instanceof Document?f.document.body:v)==null||y.scrollTo({top:(Q=V(A))!=null?Q:r.value,left:($=V(T))!=null?$:M.value,behavior:V(c)})}const p=e.ref(!1),h=e.reactive({left:!0,right:!1,top:!0,bottom:!1}),N=e.reactive({left:!1,right:!1,top:!1,bottom:!1}),w=T=>{!p.value||(p.value=!1,N.left=!1,N.right=!1,N.top=!1,N.bottom=!1,s(T))},j=ne(w,o+l),B=T=>{var A;if(!f)return;const Q=((A=T?.document)==null?void 0:A.documentElement)||T?.documentElement||X(T),{display:$,flexDirection:y}=getComputedStyle(Q),v=Q.scrollLeft;N.left=v<u.value,N.right=v>u.value;const C=Math.abs(v)<=(i.left||0),b=Math.abs(v)+Q.clientWidth>=Q.scrollWidth-(i.right||0)-Se;$==="flex"&&y==="row-reverse"?(h.left=b,h.right=C):(h.left=C,h.right=b),u.value=v;let _=Q.scrollTop;T===f.document&&!_&&(_=f.document.body.scrollTop),N.top=_<m.value,N.bottom=_>m.value;const E=Math.abs(_)<=(i.top||0),z=Math.abs(_)+Q.clientHeight>=Q.scrollHeight-(i.bottom||0)-Se;$==="flex"&&y==="column-reverse"?(h.top=z,h.bottom=E):(h.top=E,h.bottom=z),m.value=_},S=T=>{var A;if(!f)return;const Q=(A=T.target.documentElement)!=null?A:T.target;B(Q),p.value=!0,j(T),a(T)};return le(t,"scroll",o?he(S,o,!0,!1):S,d),pe(()=>{try{const T=V(t);if(!T)return;B(T)}catch(T){g(T)}}),le(t,"scrollend",w,d),{x:M,y:r,isScrolling:p,arrivedState:h,directions:N,measure(){const T=V(t);f&&T&&B(T)}}}let rt=0;function De(t,n={}){const o=e.ref(!1),{document:l=nt,immediate:s=!0,manual:a=!1,id:i=`vueuse_styletag_${++rt}`}=n,d=e.ref(t);let c=()=>{};const f=()=>{if(!l)return;const u=l.getElementById(i)||l.createElement("style");u.isConnected||(u.id=i,n.media&&(u.media=n.media),l.head.appendChild(u)),!o.value&&(c=e.watch(d,m=>{u.textContent=m},{immediate:!0}),o.value=!0)},g=()=>{!l||!o.value||(c(),l.head.removeChild(l.getElementById(i)),o.value=!1)};return s&&!a&&pe(f),a||me(g),{id:i,css:d,unload:g,load:f,isLoaded:e.readonly(o)}}function ct(t,n,o){const l=t.style[n];return l!=o&&(t.style[n]=o),{reset(){l!=o&&(t.style[n]=l)}}}function xe(t,n){const{scrollEndHook:o,itemHeight:l,overscan:s=5}=n,a=e.ref(null),i=at(a),d=e.ref(!0),c=ne(B,100);let f;const g=e.shallowRef(t),u=e.ref(0),m=e.ref({start:0,end:10}),M=e.ref({start:0,end:s});let r=0;const D=e.ref([]),p=e.computed(()=>{let{sum:E,height:z}={sum:0,height:0};return g.value.map((k,Y)=>(typeof l=="number"?z=l:z=l(Y),E+=z,{height:z,sum:E}))}),h=e.computed(()=>$(m.value.start)),N=e.computed(()=>typeof l=="number"?p.value.length*l:p.value[p.value.length-1]?.sum||0),w=e.computed(()=>{const{start:E,end:z}=M.value;return D.value.slice(E,z)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(f)),e.watch(g,()=>{(i.width.value||i.height.value)&&S()},{deep:!0}),e.watch([i.width,i.height],([E,z])=>{(E||z)&&S()},{deep:!0}),e.watch(u,()=>{j(),c()});function j(){d.value=!1}function B(){d.value=!0,o?.()}function S(){cancelAnimationFrame(f),f=requestAnimationFrame(T)}function T(){if(a.value){u.value=a.value.scrollTop;let E=A(u.value);r=Q(E);let z=Math.max(0,E-s),k=Math.min(E+r+s,g.value.length);m.value={start:z,end:k},D.value=g.value.slice(z,k).map((Y,O)=>({data:Y,index:O+z})),M.value.start=E-z,M.value.end=M.value.start+r}}function A(E){let z=0,k=p.value.length-1,Y=-1;for(;z<=k;){const O=Math.floor((z+k)/2);p.value[O].sum>=E?(Y=O,k=O-1):z=O+1}return Math.max(0,Y)}function Q(E){let z=0,k=0;for(let Y=E;Y<p.value.length&&(z++,k+=p.value[Y].height,!(k>=i.height.value));Y++);return z}function $(E){if(typeof l=="number")return E*l;let z=p.value[E];return z?z.sum-z.height:0}function y(E){return p.value[E]||{sum:0,height:0}}function v(E,z="smooth"){if(a.value){const{reset:k}=ct(a.value,"scrollBehavior",z),Y=y(E);a.value.scrollTop=Y.sum-Y.height,T(),k()}if(a.value){const k=y(E);a.value.scrollTop=k.sum-k.height,T()}}const C=e.computed(()=>({style:{width:"100%",height:`${N.value}px`,pointerEvents:d.value?void 0:"none"}})),b=e.computed(()=>({style:{transform:`translate3d(0, ${h.value}px, 0)`,"will-change":"transform"}})),_={overflowY:"auto"};return{list:D,visiableList:w,getItemHeightData:y,getoffsetTopIndex:A,totalHeight:N,clientHeight:i.height,scrollTo:v,scrollTop:u,isScrollEnd:d,containerProps:{ref:a,onScroll:()=>{S()},style:_},wrapperProps:C,innerProps:b}}const Te=Symbol(),se=Symbol(),ae=Symbol(),ie=Symbol(),re=Symbol(),ce=Symbol(),ue=Symbol(),de=Symbol(),fe=Symbol(),J=Symbol(),Me=Symbol();function ut(){const{voidFn:t,boolFn:n,boolRef:o,numberRef:l,arrayRef:s}={voidFn:p=>{},boolFn:p=>!1,boolRef:e.computed(()=>!1),numberRef:e.computed(()=>0),arrayRef:e.computed(()=>[])},a=e.inject(Te,"id"),i=e.inject(re,s),d=e.inject(ie,n),c=e.inject(fe,o),f=e.inject(ae,t),g=e.inject(se,t),u=e.inject(ce,t),m=e.inject(ue,t),M=e.inject(de,t),r=e.inject(J,t),D=e.inject(Me,l);return{itemKey:a,selected:i,isSelected:d,isAllSelected:c,toggle:f,toggleAll:g,select:u,selectAll:m,unselect:M,unselectAll:r,selectedCount:D}}function dt(t,n,o={deep:!0}){const l=e.ref(!1),s=e.ref(new Set),a=e.ref(new Map);e.watch(t,h=>{a.value=h.reduce((N,w)=>(N.set(w[n],w),N),new Map)},{deep:o.deep,immediate:!0});const i=e.computed(()=>{let h=[];if(l.value!=null)l.value&&(h=Array.from(a.value.values()));else if(s.value.size){let N;s.value.forEach(w=>{N=a.value.get(w),N&&h.push(N)})}return h}),d=e.computed(()=>{let h=0;return l.value!=null?l.value&&(h=a.value.size):h=s.value.size,h}),c=e.computed(()=>{let h;if(l.value!=null)h=l.value;else{const N=s.value.size,w=a.value.size;h=N==w}return h});function f(){l.value=!0}function g(){l.value=!1}function u(h){r(()=>{h.forEach(N=>{s.value.add(N[n])})})}function m(h){r(()=>{h.forEach(N=>{s.value.delete(N[n])})})}function M(h){return l.value!=null?l.value:s.value.has(h[n])}function r(h){l.value!=null&&(l.value?s.value=new Set(Array.from(a.value.keys())):s.value=new Set),h(),s.value.size==0?l.value=!1:s.value.size==a.value.size?l.value=!0:l.value=null}function D(h){r(()=>{h.forEach(N=>{M(N)?s.value.delete(N[n]):s.value.add(N[n])})})}function p(){const{value:h}=c;h?g():f()}return e.provide(Te,n),e.provide(se,p),e.provide(ae,D),e.provide(ie,M),e.provide(re,i),e.provide(ce,u),e.provide(ue,f),e.provide(de,m),e.provide(fe,c),e.provide(J,g),e.provide(J,g),e.provide(Me,d),{selected:i,select:u,selectAll:f,unselect:m,unselectAll:g,toggle:D,toggleAll:p,isSelected:M,isAllSelected:c,selectedCount:d}}function ft(t){const n=e.ref(!1),o=e.ref(new Set),l=e.computed(()=>{let r=[];return n.value!=null?n.value&&(r=t.value):o.value.size&&(r=Array.from(o.value.values())),r}),s=e.computed(()=>{let r=0;return n.value!=null?n.value&&(r=t.value.length):r=o.value.size,r}),a=e.computed(()=>{let r;if(n.value!=null)r=n.value;else{const D=o.value.size,p=t.value.length;r=D==p}return r});function i(){n.value=!0}function d(){n.value=!1}function c(r){u(()=>{r.forEach(D=>{o.value.add(D)})})}function f(r){u(()=>{r.forEach(D=>{o.value.delete(D)})})}function g(r){return n.value!=null?n.value:o.value.has(r)}function u(r){n.value!=null&&(n.value?o.value=new Set(Array.from(t.value)):o.value=new Set),r(),o.value.size==0?n.value=!1:o.value.size==t.value.length?n.value=!0:n.value=null}function m(r){u(()=>{r.forEach(D=>{g(D)?o.value.delete(D):o.value.add(D)})})}function M(){const{value:r}=a;r?d():i()}return e.provide(se,M),e.provide(ae,m),e.provide(ie,g),e.provide(re,l),e.provide(ce,c),e.provide(ue,i),e.provide(de,f),e.provide(fe,a),e.provide(J,d),e.provide(J,d),e.provide(Me,s),{selected:l,select:c,selectAll:i,unselect:f,unselectAll:d,toggle:m,toggleAll:M,isSelected:g,isAllSelected:a,selectedCount:s}}function Ne(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function we({attribute:t,selectWay:n="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:s=Ne("\u9009\u62E9"),unselect:a=Ne("\u53D6\u6D88\u9009\u62E9"),unselectAll:i=Ne("\u53D6\u6D88\u5168\u9009")}=l();let d={};const c=e.computed(()=>he(n==="colum"?H:K,50)),f=new Set,g=e.ref(!0),u=e.ref(),m=e.ref(!1),M=e.ref({x:0,y:0}),r=e.ref({x:0,y:0,scrollTop:0}),D=new ResizeObserver(L=>p.value=L[0].target.getBoundingClientRect()),p=e.ref({}),h=e.ref({top:0,height:0,sync(L=!1){h.value.top=u.value?.scrollTop||0,L&&(h.value.height=u.value?.scrollHeight||0)}}),N=e.computed(()=>m.value?{left:Math.min(M.value.x,r.value.x)-p.value.left,top:Math.min(M.value.y,r.value.y)-p.value.top,width:Math.abs(M.value.x-r.value.x),height:Math.abs(M.value.y-r.value.y)}:{left:0,top:0,width:0,height:0}),{margin:w=50,startSpeed:j=30,maxSpeed:B=30}=o;let S;const T=w,A=j,Q=B,$=L=>L**1;let y=0;function v(L){if(cancelAnimationFrame(S),y=C(L),y=Math.max(Math.min(y,Q),-Q),y!==0){const x=u.value;if(!x||!m.value)return;const P=h.value.height-p.value.height;let R=h.value.top+Number(y);R=Math.min(Math.max(0,R),P),x.scrollTop=R,_(),S=requestAnimationFrame(()=>v(L))}}function C(L){if(u.value){const P=p.value,R=P.bottom-L;if(R<T)return A*$(1-R/T);const G=L-P.top;if(G<T)return-A*$(1-G/T)}return 0}function b(L){const x={...N.value,right:0,bottom:0};return x.left+=p.value.left,x.top+=p.value.top-h.value.top,x.right=x.width+x.left,x.bottom=x.height+x.top,x.left<L.right&&x.right>L.left&&x.top<L.bottom&&x.bottom>L.top}function _(){h.value.sync();const{top:L,height:x}=h.value;r.value.y=Math.min(x+p.value.top,r.value.y+L-r.value.scrollTop),r.value.scrollTop=L}function E(L,x,P="dynamic-styles"){let R=document.getElementById(P);R||(R=document.createElement("style"),R.id=P,document.head.appendChild(R));const G=R.sheet.cssRules,ee=G.length,Yn=`${L} { ${x} }`;for(let Ae=0;Ae<ee;Ae++){const We=G[Ae];if(We.selectorText===L&&We.style.cssText===x)return}R.sheet.insertRule(Yn,ee)}function z(L,x){g.value=!0,m.value=!0,h.value.sync(!0);const P=x+h.value.top;M.value.x=L,M.value.y=P,r.value.x=L,r.value.y=P,u.value?.classList.add("disable-scroll-behavior"),f.clear()}function k(L,x,P){!m.value||(g.value&&n==="colum"&&!U()&&(i(),g.value=!1),P?.(),v(x),r.value.x=Math.max(L,p.value.left),r.value.y=Math.min(x+h.value.top,h.value.height+p.value.top),r.value.scrollTop=h.value.top,c.value())}function Y(){m.value=!1,u.value?.classList.remove("disable-scroll-behavior")}function O(){!m.value||(y||_(),c.value())}function U(){if(!m.value)return!1;const{width:L,height:x}=N.value;return!(Math.max(L,x)>5)}function F(){U()&&i()}function H(){U()||u.value?.querySelectorAll(`[${t}]`).forEach(L=>{d[`${t}`]=L.getAttribute(`${t}`),b(L.getBoundingClientRect())?s([d]):a([d])})}function K(){const L=[];let x=null,P=0;u.value?.querySelectorAll(`[${t}]`).forEach((R,G)=>{const ee=R.getAttribute(`${t}`);L.push(ee),b(R.getBoundingClientRect())?(x===null&&(x=G),x=Math.min(x,G),P=Math.max(P,G)):(d[`${t}`]=ee,f.has(ee)&&a([d]))});for(let R=x;R<P+1;R++)d[`${t}`]=L[R],s([d]),f.add(L[R])}function Qn(L){return!L?.value||(u.value=L.value,!u?.value)?!1:(D.observe(u.value),E(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Qn,dragStart:z,dragMove:k,dragEnd:Y,onScroll:O,isSingleClick:U,cancelSelectAllBySingleClick:F,selectFn:c,selectRange:N,isPressing:m,containerEl:u,observer:D}}function Mt(t){const n=we(t),{observer:o,selectRange:l}=n,{onScroll:s,dragStart:a,dragMove:i,dragEnd:d,cancelSelectAllBySingleClick:c}=n,f=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),{load:g}=De(`.drag-select-box {
|
|
2
2
|
position: absolute;
|
|
3
3
|
z-index: 99999;
|
|
4
4
|
background-color: rgb(191 219 254);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
2
|
export * from "./keys";
|
|
3
3
|
export declare function useSelectableInjectors<T = any>(): {
|
|
4
|
+
itemKey: string | number | symbol;
|
|
4
5
|
selected: import("vue").ComputedRef<any[]>;
|
|
5
6
|
isSelected: (_?: T) => boolean;
|
|
6
7
|
isAllSelected: import("vue").ComputedRef<boolean>;
|