@lazycatcloud/lzc-toolkit 0.0.95 → 0.0.97

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.umd.js CHANGED
@@ -1,20 +1,20 @@
1
- (function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.ui={},y.Vue))})(this,function(y,e){"use strict";const fe={created(t,n){let o,l;function r(a){o=a.clientX,l=a.clientY}function s(a){if(o===void 0)return;const i=a.clientX,m=a.clientY,p=Math.abs(i-o),u=Math.abs(m-l);p>5||u>5||n.value&&n.value(a)}t.__mouse_down__=r,t.__mouse_up__=s,t.addEventListener("mousedown",r),t.addEventListener("mouseup",s)},unmounted(t){t.removeEventListener("mousedown",t.__mouse_down__),t.removeEventListener("mouseup",t.__mouse_up__)}},$e={created(t,n){const{fn:o,ms:l=1500}=n.value;let r=null;function s(a){r||(o(a),r=setTimeout(()=>{r=null},l))}t.addEventListener("click",s)}};var pe;const Y=typeof window<"u",he=t=>typeof t=="function";Y&&((pe=window?.navigator)==null?void 0:pe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function q(t){return typeof t=="function"?t():e.unref(t)}function me(t,n){function o(...l){t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})}return o}function Ie(t,n={}){let o,l;return s=>{const a=q(t),i=q(n.maxWait);if(o&&clearTimeout(o),a<=0||i!==void 0&&i<=0)return l&&(clearTimeout(l),l=null),s();i&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,s()},i)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,s()},a)}}function Me(t,n=!0,o=!0){let l=0,r,s=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return m=>{const p=q(t),u=Date.now()-l;if(a(),p<=0)return l=Date.now(),m();u>p&&(o||!s)?(l=Date.now(),m()):n&&(r=setTimeout(()=>{l=Date.now(),s=!0,a(),m()},p)),!o&&!r&&(r=setTimeout(()=>s=!0,p)),s=!1}}function ke(t){return t}function Re(t,n){let o,l,r;const s=e.ref(!0),a=()=>{s.value=!0,r()};e.watch(t,a,{flush:"sync"});const i=he(n)?n:n.get,m=he(n)?void 0:n.set,p=e.customRef((u,d)=>(l=u,r=d,{get(){return s.value&&(o=i(),s.value=!1),l(),o},set(f){m?.(f)}}));return Object.isExtensible(p)&&(p.trigger=a),p}function ve(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ge(t,n=200,o={}){return me(Ie(n,o),t)}function _e(t,n=200,o=!1,l=!0){return me(Me(n,o,l),t)}function ye(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function we(t){var n;const o=q(t);return(n=o?.$el)!=null?n:o}const Pe=Y?window:void 0,Ae=Y?window.document:void 0;Y&&window.navigator,Y&&window.location;function He(t,n=!1){const o=e.ref(),l=()=>o.value=Boolean(t());return l(),ye(l,n),o}const Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},X="__vueuse_ssr_handlers__";Q[X]=Q[X]||{},Q[X];function Fe(){const t=e.getCurrentInstance(),n=Re(()=>null,()=>t.proxy.$el);return e.onUpdated(n.trigger),e.onMounted(n.trigger),n}var Ee=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,ze=(t,n)=>{var o={};for(var l in t)Ve.call(t,l)&&n.indexOf(l)<0&&(o[l]=t[l]);if(t!=null&&Ee)for(var l of Ee(t))n.indexOf(l)<0&&Ne.call(t,l)&&(o[l]=t[l]);return o};function je(t,n,o={}){const l=o,{window:r=Pe}=l,s=ze(l,["window"]);let a;const i=He(()=>r&&"ResizeObserver"in r),m=()=>{a&&(a.disconnect(),a=void 0)},p=e.watch(()=>we(t),d=>{m(),i.value&&r&&d&&(a=new ResizeObserver(n),a.observe(d,s))},{immediate:!0,flush:"post"}),u=()=>{m(),p()};return ve(u),{isSupported:i,stop:u}}function Ke(t,n={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(n.width),s=e.ref(n.height);return je(t,([a])=>{const i=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;i?(r.value=i.reduce((m,{inlineSize:p})=>m+p,0),s.value=i.reduce((m,{blockSize:p})=>m+p,0)):(r.value=a.contentRect.width,s.value=a.contentRect.height)},o),e.watch(()=>we(t),a=>{r.value=a?n.width:0,s.value=a?n.height:0}),{width:r,height:s}}var Se;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(Se||(Se={}));let We=0;function G(t,n={}){const o=e.ref(!1),{document:l=Ae,immediate:r=!0,manual:s=!1,id:a=`vueuse_styletag_${++We}`}=n,i=e.ref(t);let m=()=>{};const p=()=>{if(!l)return;const d=l.getElementById(a)||l.createElement("style");d.type="text/css",d.id=a,n.media&&(d.media=n.media),l.head.appendChild(d),!o.value&&(m=e.watch(i,f=>{d.innerText=f},{immediate:!0}),o.value=!0)},u=()=>{!l||!o.value||(m(),l.head.removeChild(l.getElementById(a)),o.value=!1)};return r&&!s&&ye(p),s||ve(u),{id:a,css:i,unload:u,load:p,isLoaded:e.readonly(o)}}var Ye=Object.defineProperty,be=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Ce=(t,n,o)=>n in t?Ye(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,Qe=(t,n)=>{for(var o in n||(n={}))Ue.call(n,o)&&Ce(t,o,n[o]);if(be)for(var o of be(n))qe.call(n,o)&&Ce(t,o,n[o]);return t};Qe({linear:ke},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function Le(t,n){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=n,s=e.ref(null),a=Ke(s),i=e.ref(!0),m=ge(H,100);let p;const u=e.shallowRef(t),d=e.ref(0),f=e.ref({start:0,end:10}),c=e.ref({start:0,end:r});let h=0;const B=e.ref([]),v=e.computed(()=>{let{sum:S,height:E}={sum:0,height:0};return u.value.map(($,I)=>(typeof l=="number"?E=l:E=l(I),S+=E,{height:E,sum:S}))}),_=e.computed(()=>N(f.value.start)),b=e.computed(()=>typeof l=="number"?v.value.length*l:v.value[v.value.length-1]?.sum||0),M=e.computed(()=>{const{start:S,end:E}=c.value;return B.value.slice(S,E)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(p)),e.watch(u,()=>{(a.width.value||a.height.value)&&x()},{deep:!0}),e.watch([a.width,a.height],([S,E])=>{(S||E)&&x()},{deep:!0}),e.watch(d,()=>{A(),m()});function A(){i.value=!1}function H(){i.value=!0,o?.()}function x(){cancelAnimationFrame(p),p=requestAnimationFrame(C)}function C(){if(s.value){d.value=s.value.scrollTop;let S=D(d.value);h=F(S);let E=Math.max(0,S-r),$=Math.min(S+h+r,u.value.length);f.value={start:E,end:$},B.value=u.value.slice(E,$).map((I,T)=>({data:I,index:T+E})),c.value.start=S-E,c.value.end=c.value.start+h}}function D(S){let E=0,$=v.value.length-1,I=-1;for(;E<=$;){const T=Math.floor((E+$)/2);v.value[T].sum>=S?(I=T,$=T-1):E=T+1}return Math.max(0,I)}function F(S){let E=0,$=0;for(let I=S;I<v.value.length&&(E++,$+=v.value[I].height,!($>=a.height.value));I++);return E}function N(S){if(typeof l=="number")return S*l;let E=v.value[S];return E?E.sum-E.height:0}function R(S){return v.value[S]||{sum:0,height:0}}function j(S){if(s.value){const E=R(S);s.value.scrollTop=E.sum-E.height,C()}}const U=e.computed(()=>({style:{width:"100%",height:`${b.value}px`,pointerEvents:i.value?void 0:"none"}})),K=e.computed(()=>({style:{transform:`translate3d(0, ${_.value}px, 0)`,"will-change":"transform"}})),z={overflowY:"auto"};return{list:B,visiableList:M,getItemHeightData:R,getoffsetTopIndex:D,totalHeight:b,clientHeight:a.height,scrollTo:j,scrollTop:d,isScrollEnd:i,containerProps:{ref:s,onScroll:()=>{x()},style:z},wrapperProps:U,innerProps:K}}const Z=Symbol(),J=Symbol(),ee=Symbol(),te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol();function Xe(){const{voidFn:t,boolFn:n,boolRef:o,arrayRef:l}={voidFn:c=>{},boolFn:c=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(te,l),s=e.inject(ee,n),a=e.inject(re,o),i=e.inject(J,t),m=e.inject(Z,t),p=e.inject(ne,t),u=e.inject(oe,t),d=e.inject(le,t),f=e.inject(ae,t);return{selected:r,isSelected:s,isAllSelected:a,toggle:i,toggleAll:m,select:p,selectAll:u,unselect:d,unselectAll:f}}function Ge(t,n){const o=e.ref({}),l=e.computed(()=>t.value.filter(f=>o.value[f[n]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==t.value.length);function s(){t.value.forEach(f=>{o.value[f[n]]=!0})}function a(){o.value={}}function i(f){f.forEach(c=>{o.value[c[n]]||(o.value[c[n]]=!0)})}function m(f){f.forEach(c=>{o.value[c[n]]&&delete o.value[c[n]]})}function p(f){return!!o.value[f[n]]}function u(f){f.forEach(c=>{p(c)?delete o.value[c[n]]:o.value[c[n]]=!0})}function d(){r.value?a():s()}return e.provide(Z,d),e.provide(J,u),e.provide(ee,p),e.provide(te,l),e.provide(ne,i),e.provide(oe,s),e.provide(le,m),e.provide(re,r),e.provide(ae,a),{selected:l,select:i,selectAll:s,unselect:m,unselectAll:a,toggle:u,toggleAll:d,isSelected:p,isAllSelected:r}}function se(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ie({attribute:t,selectWay:n="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=se("\u9009\u62E9"),unselect:s=se("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=se("\u53D6\u6D88\u5168\u9009")}=l();let i={};const m=e.computed(()=>_e(n==="colum"?At:Ht,50)),p=new Set,u=e.ref(!0),d=e.ref(),f=e.ref(!1),c=e.ref({x:0,y:0}),h=e.ref({x:0,y:0,scrollTop:0}),B=new ResizeObserver(g=>v.value=g[0].target.getBoundingClientRect()),v=e.ref({}),_=e.ref({top:0,height:0,sync(g=!1){_.value.top=d.value?.scrollTop||0,g&&(_.value.height=d.value?.scrollHeight||0)}}),b=e.computed(()=>f.value?{left:Math.min(c.value.x,h.value.x)-v.value.left,top:Math.min(c.value.y,h.value.y)-v.value.top,width:Math.abs(c.value.x-h.value.x),height:Math.abs(c.value.y-h.value.y)}:{left:0,top:0,width:0,height:0}),{margin:M=50,startSpeed:A=30,maxSpeed:H=30}=o;let x;const C=M,D=A,F=H,N=g=>g**1;let R=0;function j(g){if(cancelAnimationFrame(x),R=U(g),R=Math.max(Math.min(R,F),-F),R!==0){const w=d.value;if(!w||!f.value)return;const k=_.value.height-v.value.height;let L=_.value.top+Number(R);L=Math.min(Math.max(0,L),k),w.scrollTop=L,z(),x=requestAnimationFrame(()=>j(g))}}function U(g){if(d.value){const k=v.value,L=k.bottom-g;if(L<C)return D*N(1-L/C);const P=g-k.top;if(P<C)return-D*N(1-P/C)}return 0}function K(g){const w={...b.value,right:0,bottom:0};return w.left+=v.value.left,w.top+=v.value.top-_.value.top,w.right=w.width+w.left,w.bottom=w.height+w.top,w.left<g.right&&w.right>g.left&&w.top<g.bottom&&w.bottom>g.top}function z(){_.value.sync();const{top:g,height:w}=_.value;h.value.y=Math.min(w+v.value.top,h.value.y+g-h.value.scrollTop),h.value.scrollTop=g}function S(g,w,k="dynamic-styles"){let L=document.getElementById(k);L||(L=document.createElement("style"),L.id=k,document.head.appendChild(L));const P=L.sheet.cssRules,W=P.length,Vt=`${g} { ${w} }`;for(let de=0;de<W;de++){const Oe=P[de];if(Oe.selectorText===g&&Oe.style.cssText===w)return}L.sheet.insertRule(Vt,W)}function E(g,w){u.value=!0,f.value=!0,_.value.height?_.value.sync():_.value.sync(!0),c.value.x=g,c.value.y=w+_.value.top,h.value.x=c.value.x,h.value.y=c.value.y,d.value?.classList.add("disable-scroll-behavior"),p.clear()}function $(g,w,k){!f.value||(u.value&&n==="colum"&&!O()&&(a(),u.value=!1),k?.(),j(w),h.value.x=Math.max(g,v.value.left),h.value.y=Math.min(w+_.value.top,_.value.height+v.value.top),h.value.scrollTop=_.value.top,m.value())}function I(){f.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function T(){!f.value||(R||z(),m.value())}function O(){if(!f.value)return!1;const{width:g,height:w}=b.value;return!(Math.max(g,w)>5)}function ue(){O()&&a()}function At(){O()||d.value?.querySelectorAll(`[${t}]`).forEach(g=>{i[`${t}`]=g.getAttribute(`${t}`),K(g.getBoundingClientRect())?r([i]):s([i])})}function Ht(){const g=[];let w=null,k=0;d.value?.querySelectorAll(`[${t}]`).forEach((L,P)=>{const W=L.getAttribute(`${t}`);g.push(W),K(L.getBoundingClientRect())?(w===null&&(w=P),w=Math.min(w,P),k=Math.max(k,P)):(i[`${t}`]=W,p.has(W)&&s([i]))});for(let L=w;L<k+1;L++)i[`${t}`]=g[L],r([i]),p.add(g[L])}function Ft(g){return!g?.value||(d.value=g.value,!d?.value)?!1:(B.observe(d.value),S(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Ft,dragStart:E,dragMove:$,dragEnd:I,onScroll:T,isSingleClick:O,cancelSelectAllBySingleClick:ue,selectFn:m,selectRange:b,isPressing:f,containerEl:d,observer:B}}function Ze(t){const n=ie(t),{observer:o,selectRange:l}=n,{onScroll:r,dragStart:s,dragMove:a,dragEnd:i,cancelSelectAllBySingleClick:m}=n,p=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),{load:u}=G(`.drag-select-box {
1
+ (function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.ui={},y.Vue))})(this,function(y,e){"use strict";const fe={created(o,t){let n,l;function s(a){n=a.clientX,l=a.clientY}function i(a){if(n===void 0)return;const r=a.clientX,u=a.clientY,c=Math.abs(r-n),M=Math.abs(u-l);c>5||M>5||t.value&&t.value(a)}o.__mouse_down__=s,o.__mouse_up__=i,o.addEventListener("mousedown",s),o.addEventListener("mouseup",i)},unmounted(o){o.removeEventListener("mousedown",o.__mouse_down__),o.removeEventListener("mouseup",o.__mouse_up__)}},xe={created(o,t){const{fn:n,ms:l=1500}=t.value;let s=null;function i(a){s||(n(a),s=setTimeout(()=>{s=null},l))}o.addEventListener("click",i)}};var ge;const F=typeof window<"u",Ne=o=>typeof o=="function";F&&((ge=window?.navigator)==null?void 0:ge.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Z(o){return typeof o=="function"?o():e.unref(o)}function De(o,t){function n(...l){o(()=>t.apply(this,l),{fn:t,thisArg:this,args:l})}return n}function Se(o,t={}){let n,l;return i=>{const a=Z(o),r=Z(t.maxWait);if(n&&clearTimeout(n),a<=0||r!==void 0&&r<=0)return l&&(clearTimeout(l),l=null),i();r&&!l&&(l=setTimeout(()=>{n&&clearTimeout(n),l=null,i()},r)),n=setTimeout(()=>{l&&clearTimeout(l),l=null,i()},a)}}function _e(o,t=!0,n=!0){let l=0,s,i=!0;const a=()=>{s&&(clearTimeout(s),s=void 0)};return u=>{const c=Z(o),M=Date.now()-l;if(a(),c<=0)return l=Date.now(),u();M>c&&(n||!i)?(l=Date.now(),u()):t&&(s=setTimeout(()=>{l=Date.now(),i=!0,a(),u()},c)),!n&&!s&&(s=setTimeout(()=>i=!0,c)),i=!1}}function ke(o){return o}function be(o,t){let n,l,s;const i=e.ref(!0),a=()=>{i.value=!0,s()};e.watch(o,a,{flush:"sync"});const r=Ne(t)?t:t.get,u=Ne(t)?void 0:t.set,c=e.customRef((M,f)=>(l=M,s=f,{get(){return i.value&&(n=r(),i.value=!1),l(),n},set(g){u?.(g)}}));return Object.isExtensible(c)&&(c.trigger=a),c}function me(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function ye(o,t=200,n={}){return De(Se(t,n),o)}function he(o,t=200,n=!1,l=!0){return De(_e(t,n,l),o)}function Te(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function pe(o){var t;const n=Z(o);return(t=n?.$el)!=null?t:n}const Qe=F?window:void 0,Be=F?window.document:void 0;F&&window.navigator,F&&window.location;function Ue(o,t=!1){const n=e.ref(),l=()=>n.value=Boolean(o());return l(),Te(l,t),n}const G=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},X="__vueuse_ssr_handlers__";G[X]=G[X]||{},G[X];function Ye(){const o=e.getCurrentInstance(),t=be(()=>null,()=>o.proxy.$el);return e.onUpdated(t.trigger),e.onMounted(t.trigger),t}var we=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Re=(o,t)=>{var n={};for(var l in o)$e.call(o,l)&&t.indexOf(l)<0&&(n[l]=o[l]);if(o!=null&&we)for(var l of we(o))t.indexOf(l)<0&&Pe.call(o,l)&&(n[l]=o[l]);return n};function He(o,t,n={}){const l=n,{window:s=Qe}=l,i=Re(l,["window"]);let a;const r=Ue(()=>s&&"ResizeObserver"in s),u=()=>{a&&(a.disconnect(),a=void 0)},c=e.watch(()=>pe(o),f=>{u(),r.value&&s&&f&&(a=new ResizeObserver(t),a.observe(f,i))},{immediate:!0,flush:"post"}),M=()=>{u(),c()};return me(M),{isSupported:r,stop:M}}function Ve(o,t={width:0,height:0},n={}){const{box:l="content-box"}=n,s=e.ref(t.width),i=e.ref(t.height);return He(o,([a])=>{const r=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;r?(s.value=r.reduce((u,{inlineSize:c})=>u+c,0),i.value=r.reduce((u,{blockSize:c})=>u+c,0)):(s.value=a.contentRect.width,i.value=a.contentRect.height)},n),e.watch(()=>pe(o),a=>{s.value=a?t.width:0,i.value=a?t.height:0}),{width:s,height:i}}var Ee;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Ee||(Ee={}));let Fe=0;function J(o,t={}){const n=e.ref(!1),{document:l=Be,immediate:s=!0,manual:i=!1,id:a=`vueuse_styletag_${++Fe}`}=t,r=e.ref(o);let u=()=>{};const c=()=>{if(!l)return;const f=l.getElementById(a)||l.createElement("style");f.type="text/css",f.id=a,t.media&&(f.media=t.media),l.head.appendChild(f),!n.value&&(u=e.watch(r,g=>{f.innerText=g},{immediate:!0}),n.value=!0)},M=()=>{!l||!n.value||(u(),l.head.removeChild(l.getElementById(a)),n.value=!1)};return s&&!i&&Te(c),i||me(M),{id:a,css:r,unload:M,load:c,isLoaded:e.readonly(n)}}var We=Object.defineProperty,Ie=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,ze=(o,t,n)=>t in o?We(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,Ge=(o,t)=>{for(var n in t||(t={}))Ze.call(t,n)&&ze(o,n,t[n]);if(Ie)for(var n of Ie(t))Ke.call(t,n)&&ze(o,n,t[n]);return o};Ge({linear:ke},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function je(o,t){const{scrollEndHook:n,itemHeight:l,overscan:s=5}=t,i=e.ref(null),a=Ve(i),r=e.ref(!0),u=ye(U,100);let c;const M=e.shallowRef(o),f=e.ref(0),g=e.ref({start:0,end:10}),d=e.ref({start:0,end:s});let N=0;const C=e.ref([]),D=e.computed(()=>{let{sum:w,height:p}={sum:0,height:0};return M.value.map((A,x)=>(typeof l=="number"?p=l:p=l(x),w+=p,{height:p,sum:w}))}),h=e.computed(()=>$(g.value.start)),E=e.computed(()=>typeof l=="number"?D.value.length*l:D.value[D.value.length-1]?.sum||0),S=e.computed(()=>{const{start:w,end:p}=d.value;return C.value.slice(w,p)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(c)),e.watch(M,()=>{(a.width.value||a.height.value)&&L()},{deep:!0}),e.watch([a.width,a.height],([w,p])=>{(w||p)&&L()},{deep:!0}),e.watch(f,()=>{B(),u()});function B(){r.value=!1}function U(){r.value=!0,n?.()}function L(){cancelAnimationFrame(c),c=requestAnimationFrame(I)}function I(){if(i.value){f.value=i.value.scrollTop;let w=v(f.value);N=Y(w);let p=Math.max(0,w-s),A=Math.min(w+N+s,M.value.length);g.value={start:p,end:A},C.value=M.value.slice(p,A).map((x,j)=>({data:x,index:j+p})),d.value.start=w-p,d.value.end=d.value.start+N}}function v(w){let p=0,A=D.value.length-1,x=-1;for(;p<=A;){const j=Math.floor((p+A)/2);D.value[j].sum>=w?(x=j,A=j-1):p=j+1}return Math.max(0,x)}function Y(w){let p=0,A=0;for(let x=w;x<D.value.length&&(p++,A+=D.value[x].height,!(A>=a.height.value));x++);return p}function $(w){if(typeof l=="number")return w*l;let p=D.value[w];return p?p.sum-p.height:0}function k(w){return D.value[w]||{sum:0,height:0}}function R(w){if(i.value){const p=k(w);i.value.scrollTop=p.sum-p.height,I()}}const W=e.computed(()=>({style:{width:"100%",height:`${E.value}px`,pointerEvents:r.value?void 0:"none"}})),H=e.computed(()=>({style:{transform:`translate3d(0, ${h.value}px, 0)`,"will-change":"transform"}})),P={overflowY:"auto"};return{list:C,visiableList:S,getItemHeightData:k,getoffsetTopIndex:v,totalHeight:E,clientHeight:a.height,scrollTo:R,scrollTop:f,isScrollEnd:r,containerProps:{ref:i,onScroll:()=>{L()},style:P},wrapperProps:W,innerProps:H}}const q=Symbol(),ee=Symbol(),te=Symbol(),oe=Symbol(),ne=Symbol(),le=Symbol(),se=Symbol(),ae=Symbol(),ie=Symbol();function Xe(){const{voidFn:o,boolFn:t,boolRef:n,arrayRef:l}={voidFn:d=>{},boolFn:d=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},s=e.inject(oe,l),i=e.inject(te,t),a=e.inject(ae,n),r=e.inject(ee,o),u=e.inject(q,o),c=e.inject(ne,o),M=e.inject(le,o),f=e.inject(se,o),g=e.inject(ie,o);return{selected:s,isSelected:i,isAllSelected:a,toggle:r,toggleAll:u,select:c,selectAll:M,unselect:f,unselectAll:g}}function Je(o,t){const n=e.ref({}),l=e.computed(()=>o.value.filter(g=>n.value[g[t]])),s=e.computed(()=>l.value.length!=0&&Object.keys(n.value).length==o.value.length);function i(){o.value.forEach(g=>{n.value[g[t]]=!0})}function a(){n.value={}}function r(g){g.forEach(d=>{n.value[d[t]]||(n.value[d[t]]=!0)})}function u(g){g.forEach(d=>{n.value[d[t]]&&delete n.value[d[t]]})}function c(g){return!!n.value[g[t]]}function M(g){g.forEach(d=>{c(d)?delete n.value[d[t]]:n.value[d[t]]=!0})}function f(){s.value?a():i()}return e.provide(q,f),e.provide(ee,M),e.provide(te,c),e.provide(oe,l),e.provide(ne,r),e.provide(le,i),e.provide(se,u),e.provide(ae,s),e.provide(ie,a),{selected:l,select:r,selectAll:i,unselect:u,unselectAll:a,toggle:M,toggleAll:f,isSelected:c,isAllSelected:s}}function re(o){return()=>{console.debug(`\u9ED8\u8BA4${o}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function ce({attribute:o,selectWay:t="colum",scrollOptions:n={},getSelectMap:l=()=>({})}){const{select:s=re("\u9009\u62E9"),unselect:i=re("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=re("\u53D6\u6D88\u5168\u9009")}=l();let r={};const u=e.computed(()=>he(t==="colum"?Zt:Kt,50)),c=new Set,M=e.ref(!0),f=e.ref(),g=e.ref(!1),d=e.ref({x:0,y:0}),N=e.ref({x:0,y:0,scrollTop:0}),C=new ResizeObserver(m=>D.value=m[0].target.getBoundingClientRect()),D=e.ref({}),h=e.ref({top:0,height:0,sync(m=!1){h.value.top=f.value?.scrollTop||0,m&&(h.value.height=f.value?.scrollHeight||0)}}),E=e.computed(()=>g.value?{left:Math.min(d.value.x,N.value.x)-D.value.left,top:Math.min(d.value.y,N.value.y)-D.value.top,width:Math.abs(d.value.x-N.value.x),height:Math.abs(d.value.y-N.value.y)}:{left:0,top:0,width:0,height:0}),{margin:S=50,startSpeed:B=30,maxSpeed:U=30}=n;let L;const I=S,v=B,Y=U,$=m=>m**1;let k=0;function R(m){if(cancelAnimationFrame(L),k=W(m),k=Math.max(Math.min(k,Y),-Y),k!==0){const T=f.value;if(!T||!g.value)return;const _=h.value.height-D.value.height;let z=h.value.top+Number(k);z=Math.min(Math.max(0,z),_),T.scrollTop=z,P(),L=requestAnimationFrame(()=>R(m))}}function W(m){if(f.value){const _=D.value,z=_.bottom-m;if(z<I)return v*$(1-z/I);const b=m-_.top;if(b<I)return-v*$(1-b/I)}return 0}function H(m){const T={...E.value,right:0,bottom:0};return T.left+=D.value.left,T.top+=D.value.top-h.value.top,T.right=T.width+T.left,T.bottom=T.height+T.top,T.left<m.right&&T.right>m.left&&T.top<m.bottom&&T.bottom>m.top}function P(){h.value.sync();const{top:m,height:T}=h.value;N.value.y=Math.min(T+D.value.top,N.value.y+m-N.value.scrollTop),N.value.scrollTop=m}function w(m,T,_="dynamic-styles"){let z=document.getElementById(_);z||(z=document.createElement("style"),z.id=_,document.head.appendChild(z));const b=z.sheet.cssRules,V=b.length,Xt=`${m} { ${T} }`;for(let de=0;de<V;de++){const Ae=b[de];if(Ae.selectorText===m&&Ae.style.cssText===T)return}z.sheet.insertRule(Xt,V)}function p(m,T){M.value=!0,g.value=!0,h.value.height?h.value.sync():h.value.sync(!0),d.value.x=m,d.value.y=T+h.value.top,N.value.x=d.value.x,N.value.y=d.value.y,f.value?.classList.add("disable-scroll-behavior"),c.clear()}function A(m,T,_){!g.value||(M.value&&t==="colum"&&!O()&&(a(),M.value=!1),_?.(),R(T),N.value.x=Math.max(m,D.value.left),N.value.y=Math.min(T+h.value.top,h.value.height+D.value.top),N.value.scrollTop=h.value.top,u.value())}function x(){g.value=!1,f.value?.classList.remove("disable-scroll-behavior")}function j(){!g.value||(k||P(),u.value())}function O(){if(!g.value)return!1;const{width:m,height:T}=E.value;return!(Math.max(m,T)>5)}function Me(){O()&&a()}function Zt(){O()||f.value?.querySelectorAll(`[${o}]`).forEach(m=>{r[`${o}`]=m.getAttribute(`${o}`),H(m.getBoundingClientRect())?s([r]):i([r])})}function Kt(){const m=[];let T=null,_=0;f.value?.querySelectorAll(`[${o}]`).forEach((z,b)=>{const V=z.getAttribute(`${o}`);m.push(V),H(z.getBoundingClientRect())?(T===null&&(T=b),T=Math.min(T,b),_=Math.max(_,b)):(r[`${o}`]=V,c.has(V)&&i([r]))});for(let z=T;z<_+1;z++)r[`${o}`]=m[z],s([r]),c.add(m[z])}function Gt(m){return!m?.value||(f.value=m.value,!f?.value)?!1:(C.observe(f.value),w(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:Gt,dragStart:p,dragMove:A,dragEnd:x,onScroll:j,isSingleClick:O,cancelSelectAllBySingleClick:Me,selectFn:u,selectRange:E,isPressing:g,containerEl:f,observer:C}}function qe(o){const t=ce(o),{observer:n,selectRange:l}=t,{onScroll:s,dragStart:i,dragMove:a,dragEnd:r,cancelSelectAllBySingleClick:u}=t,c=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),{load:M}=J(`.drag-select-box {
2
2
  position: absolute;
3
3
  z-index: 99999;
4
4
  background-color: rgb(191 219 254);
5
5
  opacity: 0.5;
6
- }`,{id:"styletag_lzc_dragselect",manual:!0}),d=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"drag-select-box",style:p.value})}});function f(_){_.button===0&&s(_.x,_.y)}function c(_){a(_.x,_.y)}function h(_){_.composedPath().some(M=>M?.getAttribute?.(t.attribute))||m(),i()}function B(_){try{if(!n.init(_))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!n.containerEl?.value)return!1;e.render(e.h(d),n.containerEl.value),u(),n.containerEl.value?.addEventListener("scroll",r),n.containerEl.value?.addEventListener("mousedown",f),window.addEventListener("mousemove",c),window.addEventListener("mouseup",h)}catch(b){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",b)}}function v(){o.disconnect(),n.containerEl.value?.removeEventListener("scroll",r),n.containerEl.value?.removeEventListener("mousedown",f),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",h)}return{init:B,unMount:v}}function Je(t,n,o=600){const l=ie({...t,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:s,dragStart:a,dragMove:i,dragEnd:m}=l;let p;function u(){clearTimeout(p)}function d(v){u(),v.composedPath().some(b=>!!b?.getAttribute?.(t.attribute))&&(p=setTimeout(()=>{const{clientX:b,clientY:M}=v.targetTouches[0];a(b,M),n?.(),i(b,M,()=>v.preventDefault()),v.preventDefault()},o))}function f(v){u();const{clientX:_,clientY:b}=v.targetTouches[0];i(_,b,()=>v.preventDefault())}function c(){u(),m()}function h(v){try{if(!l.init(v))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",s),l.containerEl.value?.addEventListener("touchstart",d),l.containerEl.value?.addEventListener("touchmove",f),window.addEventListener("touchcancel",c),window.addEventListener("touchend",c)}catch(_){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",_)}}function B(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",s),l.containerEl.value?.removeEventListener("touchstart",d),l.containerEl.value?.removeEventListener("touchmove",f),window.removeEventListener("touchcancel",c),window.removeEventListener("touchEnd",c)}return{init:h,unMount:B}}const Te=Symbol(),et={key:0,class:"lzc-modal"},tt=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(t,{emit:n}){const o=t,l=()=>{o.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(Te,()=>n("update:visiable",!1)),(r,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?e.withDirectives((e.openBlock(),e.createElementBlock("div",et,[e.createElementVNode("div",{onMousedown:s[0]||(s[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",t.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],34)])),[[e.unref(fe),()=>l()]]):e.createCommentVNode("",!0)]),_:3}))}}),zt="",V=(t,n)=>{const o=t.__vccOpts||t;for(const[l,r]of n)o[l]=r;return o},nt=V(tt,[["__scopeId","data-v-4ff684af"]]);function ot(t){function n(o,l){const r=document.createElement("div"),s={setup(){return()=>e.h(nt,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...t},{default:()=>e.h(o,l)})}};return document.body.appendChild(r),e.render(e.h(s),r),{close:()=>r?.remove()}}return{create:n}}function Be({component:t,componentProps:n,delay:o=300}){const r=`lzc-delay-loading-${`${new Date().getTime()}`}`,s=`${o}ms`;return G(`@keyframes lzcDelayLoad {
6
+ }`,{id:"styletag_lzc_dragselect",manual:!0}),f=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"drag-select-box",style:c.value})}});function g(h){h.button===0&&i(h.x,h.y)}function d(h){a(h.x,h.y)}function N(h){h.composedPath().some(S=>S?.getAttribute?.(o.attribute))||u(),r()}function C(h){try{if(!t.init(h))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!t.containerEl?.value)return!1;e.render(e.h(f),t.containerEl.value),M(),t.containerEl.value?.addEventListener("scroll",s),t.containerEl.value?.addEventListener("mousedown",g),window.addEventListener("mousemove",d),window.addEventListener("mouseup",N)}catch(E){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",E)}}function D(){n.disconnect(),t.containerEl.value?.removeEventListener("scroll",s),t.containerEl.value?.removeEventListener("mousedown",g),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",N)}return{init:C,unMount:D}}function et(o,t,n=600){const l=ce({...o,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:s}=l,{onScroll:i,dragStart:a,dragMove:r,dragEnd:u}=l;let c;function M(){clearTimeout(c)}function f(D){M(),D.composedPath().some(E=>!!E?.getAttribute?.(o.attribute))&&(c=setTimeout(()=>{const{clientX:E,clientY:S}=D.targetTouches[0];a(E,S),t?.(),r(E,S,()=>D.preventDefault()),D.preventDefault()},n))}function g(D){M();const{clientX:h,clientY:E}=D.targetTouches[0];r(h,E,()=>D.preventDefault())}function d(){M(),u()}function N(D){try{if(!l.init(D))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!l.containerEl?.value)return!1;l.containerEl.value?.addEventListener("scroll",i),l.containerEl.value?.addEventListener("touchstart",f),l.containerEl.value?.addEventListener("touchmove",g),window.addEventListener("touchcancel",d),window.addEventListener("touchend",d)}catch(h){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",h)}}function C(){s.disconnect(),l.containerEl.value?.removeEventListener("scroll",i),l.containerEl.value?.removeEventListener("touchstart",f),l.containerEl.value?.removeEventListener("touchmove",g),window.removeEventListener("touchcancel",d),window.removeEventListener("touchEnd",d)}return{init:N,unMount:C}}const Ce=Symbol(),tt={key:0,class:"lzc-modal"},ot=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},dialogClass:{default:""}},emits:["update:visiable"],setup(o,{emit:t}){const n=o,l=()=>{n.closeOnClickOverlay&&t("update:visiable",!1)};return e.provide(Ce,()=>t("update:visiable",!1)),(s,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[o.visiable?e.withDirectives((e.openBlock(),e.createElementBlock("div",tt,[e.createElementVNode("div",{onMousedown:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",o.dialogClass])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],34)])),[[e.unref(fe),()=>l()]]):e.createCommentVNode("",!0)]),_:3}))}}),qt="",Q=(o,t)=>{const n=o.__vccOpts||o;for(const[l,s]of t)n[l]=s;return n},nt=Q(ot,[["__scopeId","data-v-4ff684af"]]);function lt(o){function t(n,l){const s=document.createElement("div"),i={setup(){return()=>e.h(nt,{visiable:!0,"onUpdate:visiable":()=>{s?.remove()},...o},{default:()=>e.h(n,l)})}};return document.body.appendChild(s),e.render(e.h(i),s),{close:()=>s?.remove()}}return{create:t}}function Le({component:o,componentProps:t,delay:n=300}){const s=`lzc-delay-loading-${`${new Date().getTime()}`}`,i=`${n}ms`;return J(`@keyframes lzcDelayLoad {
7
7
  to {
8
8
  opacity: 1;
9
9
  }
10
10
  }
11
- .${r} {
11
+ .${s} {
12
12
  opacity: 0;
13
- animation: lzcDelayLoad 0s ${s} forwards;
14
- }`),{LoadingComp:e.defineComponent({setup(){const i=Fe();return e.onMounted(()=>{i.value.classList.add(r)}),()=>e.h(t,n)}})}}function lt({component:t,componentProps:n,delay:o=300}){const{LoadingComp:l}=Be({component:t,componentProps:n,delay:o}),r=e.ref(!1);function s(){r.value=!0}function a(){r.value=!1}return{LoadingComp:l,loading:r,load:s,unload:a}}const rt=[(t=>(e.pushScopeId("data-v-d0ad7597"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))],at=e.defineComponent({__name:"DefaultLoading",props:{width:{default:24},height:{default:24}},setup(t){return e.useCssVars(n=>({d8dfa9f0:t.width+"px","2941c2e5":t.height+"px"})),(n,o)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(n.$attrs)),rt,16))}}),Wt="",st=V(at,[["__scopeId","data-v-d0ad7597"]]),it=["onClick"],ct=e.defineComponent({__name:"Toast",props:{message:null,position:null,buttonClickEvent:null},setup(t){const n=t,o=e.ref(),l=e.ref(),r=e.ref(),s=e.computed(()=>{switch(n.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${s.value}% - ${r.value}px)`,left:`calc(50% - ${l.value}px)`})),i=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));function m(){!n.buttonClickEvent||n.buttonClickEvent()}return e.nextTick(()=>{l.value=o.value.offsetWidth/2,r.value=o.value.offsetHeight/2}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(m,["stop"]),id:"toastWrapper",ref_key:"toastWrapper",ref:o,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(i))},[e.createElementVNode("span",null,e.toDisplayString(t.message),1)],4)],12,it))}}),Yt="",ut=V(ct,[["__scopeId","data-v-533e986b"]]),xe={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500,buttonClickEvent:()=>{}};class dt{options;container;constructor(n){this.options=n,this.container=document.createElement("div")}present(){const n=e.h(e.h(ut),{...xe,...this.options});e.render(n,this.container),document.body.insertBefore(this.container,document.body.firstChild);const o=this.options.duration||xe.duration;setTimeout(()=>{this.dismiss()},o)}dismiss(){if(this.container){const n=this.container.querySelector("#toastWrapper");n.style.opacity="0",n.style.transition="opacity 0.4s ease-in",setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500)}}}const ft=["xlink:href","fill","color"],pt=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(t){const n=t,o=e.computed(()=>`#${n.prefix}-${n.name}`),l=e.computed(()=>({width:`${n.width??n.height}px`,height:`${n.height??n.width}px`,aspectRatio:n.width&&n.height?void 0:"1/1"}));function r(s){return s?.style??{}}return(s,a)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle({...e.unref(l),...r(s.$attrs)})},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:t.color,color:t.color},null,8,ft)],4))}});function ht(t){const{containerEl:n,sliderEl:o,autoHeight:l,performance:r={},maxHeightRatio:s=.9,observeMethod:a="classList"}=t,i=e.ref(!0),m=ge(N,100);let p,u="";const d=e.ref(0),f=e.ref(0),c=e.ref(0),h=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),B=e.ref({clientHeight:0}),v=e.computed(()=>!!f.value),_=e.computed(()=>h.value.scrollHeight>h.value.clientHeight),b=e.computed(()=>l?h.value.clientHeight-H.value:h.value.clientHeight-B.value.clientHeight),M=e.computed(()=>h.value.scrollHeight-h.value.clientHeight),A=e.computed(()=>Math.max(h.value.clientHeight/h.value.scrollHeight,.05)),H=e.computed(()=>A.value>s?0:A.value*h.value.clientHeight),x=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:l?`${H.value}px`:void 0}));function C(T){F(),f.value=T.clientY-o.value.getBoundingClientRect().top||1,u=getComputedStyle(n.value).scrollBehavior,u==="smooth"&&(n.value.style.scrollBehavior="unset")}function D(){n.value.style.scrollBehavior=u,f.value=0,m()}function F(){i.value=!1}function N(){v.value||(i.value=!0)}function R(T){if(!v.value)return;let O=T.clientY-h.value.top-f.value;O<0?c.value=0:O>=b.value?c.value=b.value:c.value=O,n.value.scrollTo({top:c.value/b.value*M.value})}function j(){v.value||U()}function U(){cancelAnimationFrame(p),p=requestAnimationFrame(K)}function K(){n.value&&(d.value=r.scrollTop?.value??n.value.scrollTop,c.value=d.value/M.value*b.value)}function z(T){let O="addEventListener";T==="add"?O="addEventListener":O="removeEventListener",o.value?.[O]("pointerdown",C,{passive:!0}),window[O]("pointermove",R,{passive:!0}),window[O]("pointerup",D,{passive:!0})}const S=new MutationObserver(T=>{(a=="classList"||T.map(ue=>ue.oldValue).join().includes("height"))&&E()});function E(){h.value.top=n.value?.getBoundingClientRect().top??0,h.value.scrollHeight=n.value?.scrollHeight??0,h.value.clientHeight=n.value?.clientHeight??0}function $(){F(),setTimeout(()=>{B.value.clientHeight=o.value?.clientHeight??0,N()},150)}function I(){if(n.value&&o.value){n.value.classList.add("hide-scrollbar"),n.value.addEventListener("scroll",j,{passive:!0}),z("add");const T={};a==="classList"?Object.assign(T,{subtree:!0,childList:!0}):Object.assign(T,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),S.observe(n.value,T),setTimeout(()=>{E()},100),$()}else console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:n,sliderEl:o})}return e.watch(d,()=>{F(),m()}),{isScrollEnd:i,isDragSlider:v,offsetTop:c,scrollTop:d,scrollable:_,sliderPos:x,init:I,modifySliderEventListener:z}}const mt=(t=>(e.pushScopeId("data-v-efefe52c"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),vt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},observeMethod:null,performance:null},setup(t,{expose:n}){const o=t,l=!!e.useSlots().default,r=e.ref(null),s=e.computed(()=>o.containerEl),a=ht({containerEl:s,sliderEl:r,autoHeight:l?o.autoHeight:!0,performance:o.performance,observeMethod:o.observeMethod}),{scrollable:i,isScrollEnd:m,sliderPos:p}=a,u=e.ref(!1),d=o.autoHide?e.computed(()=>u.value||!m.value):e.computed(()=>i.value),{load:f}=G(`.hide-scrollbar {
13
+ animation: lzcDelayLoad 0s ${i} forwards;
14
+ }`),{LoadingComp:e.defineComponent({setup(){const r=Ye();return e.onMounted(()=>{r.value.classList.add(s)}),()=>e.h(o,t)}})}}function st({component:o,componentProps:t,delay:n=300}){const{LoadingComp:l}=Le({component:o,componentProps:t,delay:n}),s=e.ref(!1);function i(){s.value=!0}function a(){s.value=!1}return{LoadingComp:l,loading:s,load:i,unload:a}}const at=[(o=>(e.pushScopeId("data-v-d0ad7597"),o=o(),e.popScopeId(),o))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))],it=e.defineComponent({__name:"DefaultLoading",props:{width:{default:24},height:{default:24}},setup(o){return e.useCssVars(t=>({d8dfa9f0:o.width+"px","2941c2e5":o.height+"px"})),(t,n)=>(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(t.$attrs)),at,16))}}),oo="",rt=Q(it,[["__scopeId","data-v-d0ad7597"]]);async function ct(o){return new Promise(t=>setTimeout(()=>t(),o))}const ut="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMTAyLjAwMDAwMCwgLTQwNi4wMDAwMDApIiBmaWxsPSIjOTk5OTk5IiBmaWxsLXJ1bGU9Im5vbnplcm8iPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDc5MC4wMDAwMDAsIDM5MC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzEyLjAwMDAwMCwgMTYuMDAwMDAwKSI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLjU0NjQyODU3MiwwLjA5NjM0MjU1MTMgTDYuMDEsNS41NTUgTDExLjQ1MzU3MTQsMC4xMTc3NTIwMTEgQzExLjU4MjE0MjksLTAuMDEwNzA0NzIzNyAxMS43NzUsLTAuMDEwNzA0NzIzNyAxMS45MDM1NzE0LDAuMTE3NzUyMDExIEMxMi4wMzIxNDI5LDAuMjQ2MjA4NzQ2IDEyLjAzMjE0MjksMC40Mzg4OTM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LjgxMDQ2OTksMTQuODU4NTg5MyAxMi41Mzg4OTY2LDE0LjU4Njk2NTUgTDcuMjcyMTM3OTMsOS4zMjAyMDY5IEM3LjAwMDUxNDE0LDkuMDQ4NjMzNTYgNi44NDc5MTMyNCw4LjY4MDI3MDc5IDYuODQ3OTEzMjQsOC4yOTYxNzI0MSBDNi44NDc5MTMyNCw3LjkxMjA3NDA0IDcuMDAwNTE0MTQsNy41NDM3MTEyNyA3LjI3MjEzNzkzLDcuMjcyMTM3OTMgWiI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+",dt=["onClick"],ft=["onClick"],gt=["src"],Nt=["src"],Dt=e.defineComponent({__name:"index",props:{visible:null,message:{default:""},duration:{default:2e3},width:{default:void 0},maxWidth:{default:void 0},showIcon:{type:Boolean,default:!0},icon:{default:void 0},showClose:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!1},className:{default:""},overlayContentStyle:{default:void 0},captureEvent:{type:Boolean,default:!1}},emits:["close"],setup(o,{emit:t}){const n=o,l="lzc-loading-toast",s=e.computed(()=>{let u={};return n.captureEvent&&(u.pointerEvents="none"),u}),i=e.computed(()=>{let u={};return n.width&&(u.width=n.width),n.maxWidth&&(u.maxWidth=n.maxWidth),n.overlayContentStyle&&(u={...u,...n.overlayContentStyle}),u});function a(){n.closeOnClickOverlay&&t("close")}function r(){n.closeOnClick&&t("close")}return(u,c)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":"lzc-animate-fade-in lzc-animate-duration-300","leave-active-class":"lzc-animate-fade-out lzc-animate-duration-300"},{default:e.withCtx(()=>[e.createElementVNode("div",{id:l,style:e.normalizeStyle(e.unref(s))},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(`${l} ${o.className}`),onClick:e.withModifiers(a,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(`${l}-wrap`),onClick:e.withModifiers(r,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(`${l}-content`),style:e.normalizeStyle(e.unref(i))},[o.showClose?(e.openBlock(),e.createElementBlock("img",{key:0,onClick:c[0]||(c[0]=e.withModifiers(M=>t("close"),["stop"])),src:e.unref(ut),class:e.normalizeClass(`${l}-close`)},null,10,gt)):e.createCommentVNode("",!0),o.showIcon?(e.openBlock(),e.createElementBlock("img",{key:1,src:o.icon||e.unref(Mt),class:e.normalizeClass(`${l}-icon`)},null,10,Nt)):e.createCommentVNode("",!0),o.message?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(`${l}-message`)},e.toDisplayString(o.message),3)):e.createCommentVNode("",!0)],6)],10,ft)],10,dt),[[e.vShow,o.visible]])],4)]),_:1}))}}),no="",lo="",mt=Q(Dt,[["__scopeId","data-v-cb2e1a90"]]);class K{loadingToast;el;options;visible=e.ref(!1);animateDuration=300;constructor(t){this.options={...t,visible:this.visible},this.options.duration==null&&(this.options.duration=60*10*1e3),this.el=document.createElement("div"),this.loadingToast=mt}async show(){const t=this.options,l={...t,onClose:function(){K.close(),t?.onClose?.()}},s=e.createVNode(this.loadingToast,l);e.render(s,this.el),document.body.insertBefore(this.el,document.body.firstChild),this.visible.value=!0,t.duration!==0&&setTimeout(()=>{this.destory()},t.duration),await ct(t.duration+this.animateDuration)}async destory(){!this.visible.value||(this.visible.value=!1,await new Promise(t=>{setTimeout(()=>{if(!this.el){t();return}document.body.removeChild(this.el),t()},this.animateDuration-10)}))}static close(){document.querySelector("#lzc-loading-toast")?.remove()}}function yt(o,t){const n=t?.loading!==!1,l=t?.autoClose!==!1,s=t?.delay!=null?t.delay:200,i=e.ref(!1);let a=null;const r=new K({message:t?.message,duration:t?.duration,width:t?.width,maxWidth:t?.maxWidth,showIcon:t?.showIcon,icon:t?.icon,showClose:t?.showClose,closeOnClick:t?.closeOnClick,closeOnClickOverlay:t?.closeOnClickOverlay,className:t?.className,overlayContentStyle:t?.overlayContentStyle,captureEvent:t?.captureEvent,onClose:t?.onClose});async function u(){if(!i.value){i.value=!0,a=setTimeout(()=>{!n||!i.value||r.show()},s);try{await o(),await c(l)}catch(M){await c(l),await t?.onError?.(M)}}}async function c(M=!0){i.value=!1,a&&clearTimeout(a),a=null,M&&await r.destory()}return e.onBeforeUnmount(c),{processing:i,handler:u,close:c}}const ht=["onClick"],Tt=e.defineComponent({__name:"Toast",props:{message:null,position:null,buttonClickEvent:null},setup(o){const t=o,n=e.ref(),l=e.ref(),s=e.ref(),i=e.computed(()=>{switch(t.position){case"top":return 10;case"middle":return 50;case"bottom":return 85}}),a=e.computed(()=>({position:"absolute",borderRadius:"10px",backgroundColor:"rgba(0, 0, 0, 0.8)",padding:"14px 19px",top:`calc(${i.value}% - ${s.value}px)`,left:`calc(50% - ${l.value}px)`})),r=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));function u(){!t.buttonClickEvent||t.buttonClickEvent()}return e.nextTick(()=>{l.value=n.value.offsetWidth/2,s.value=n.value.offsetHeight/2}),(c,M)=>(e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(u,["stop"]),id:"toastWrapper",ref_key:"toastWrapper",ref:n,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(r))},[e.createElementVNode("span",null,e.toDisplayString(o.message),1)],4)],12,ht))}}),so="",pt=Q(Tt,[["__scopeId","data-v-533e986b"]]),ve={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500,buttonClickEvent:()=>{}};class wt{options;container;constructor(t){this.options=t,this.container=document.createElement("div")}present(){const t=e.h(e.h(pt),{...ve,...this.options});e.render(t,this.container),document.body.insertBefore(this.container,document.body.firstChild);const n=this.options.duration||ve.duration;setTimeout(()=>{this.dismiss()},n)}dismiss(){if(this.container){const t=this.container.querySelector("#toastWrapper");t.style.opacity="0",t.style.transition="opacity 0.4s ease-in",setTimeout(()=>{this.container&&(e.render(null,this.container),document.body.removeChild(this.container))},500)}}}const Et=["xlink:href","fill","color"],It=e.defineComponent({__name:"SvgIcon",props:{name:null,prefix:{default:"icon"},color:{default:"#FFF"},width:null,height:null},setup(o){const t=o,n=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>({width:`${t.width??t.height}px`,height:`${t.height??t.width}px`,aspectRatio:t.width&&t.height?void 0:"1/1"}));function s(i){const{style:a}=i;return typeof a=="object"?a:{}}return(i,a)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle({...e.unref(l),...s(i.$attrs)})},[e.createElementVNode("use",{"xlink:href":e.unref(n),fill:o.color,color:o.color},null,8,Et)],4))}});function zt(o){const{containerEl:t,sliderEl:n,autoHeight:l,performance:s={},maxHeightRatio:i=.9,observeMethod:a="classList"}=o,r=e.ref(!0),u=ye($,100);let c,M="";const f=e.ref(0),g=e.ref(0),d=e.ref(0),N=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),C=e.ref({clientHeight:0}),D=e.computed(()=>!!g.value),h=e.computed(()=>N.value.scrollHeight>N.value.clientHeight),E=e.computed(()=>l?N.value.clientHeight-U.value:N.value.clientHeight-C.value.clientHeight),S=e.computed(()=>N.value.scrollHeight-N.value.clientHeight),B=e.computed(()=>Math.max(N.value.clientHeight/N.value.scrollHeight,.05)),U=e.computed(()=>B.value>i?0:B.value*N.value.clientHeight),L=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${d.value}px,0)`,height:l?`${U.value}px`:void 0}));function I(j){Y(),g.value=j.clientY-n.value.getBoundingClientRect().top||1,M=getComputedStyle(t.value).scrollBehavior,M==="smooth"&&(t.value.style.scrollBehavior="unset")}function v(){t.value.style.scrollBehavior=M,g.value=0,u()}function Y(){r.value=!1}function $(){D.value||(r.value=!0)}function k(j){if(!D.value)return;let O=j.clientY-N.value.top-g.value;O<0?d.value=0:O>=E.value?d.value=E.value:d.value=O,t.value.scrollTo({top:d.value/E.value*S.value})}function R(){D.value||W()}function W(){cancelAnimationFrame(c),c=requestAnimationFrame(H)}function H(){t.value&&(f.value=s.scrollTop?.value??t.value.scrollTop,d.value=f.value/S.value*E.value)}function P(j){let O="addEventListener";j==="add"?O="addEventListener":O="removeEventListener",n.value?.[O]("pointerdown",I,{passive:!0}),window[O]("pointermove",k,{passive:!0}),window[O]("pointerup",v,{passive:!0})}const w=new MutationObserver(j=>{(a=="classList"||j.map(Me=>Me.oldValue).join().includes("height"))&&p()});function p(){N.value.top=t.value?.getBoundingClientRect().top??0,N.value.scrollHeight=t.value?.scrollHeight??0,N.value.clientHeight=t.value?.clientHeight??0}function A(){Y(),setTimeout(()=>{C.value.clientHeight=n.value?.clientHeight??0,$()},150)}function x(){if(t.value&&n.value){t.value.classList.add("hide-scrollbar"),t.value.addEventListener("scroll",R,{passive:!0}),P("add");const j={};a==="classList"?Object.assign(j,{subtree:!0,childList:!0}):Object.assign(j,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),w.observe(t.value,j),setTimeout(()=>{p()},100),A()}else console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:t,sliderEl:n})}return e.watch(f,()=>{Y(),u()}),{isScrollEnd:r,isDragSlider:D,offsetTop:d,scrollTop:f,scrollable:h,sliderPos:L,init:x,modifySliderEventListener:P}}const jt=(o=>(e.pushScopeId("data-v-efefe52c"),o=o(),e.popScopeId(),o))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),Ct=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},observeMethod:null,performance:null},setup(o,{expose:t}){const n=o,l=!!e.useSlots().default,s=e.ref(null),i=e.computed(()=>n.containerEl),a=zt({containerEl:i,sliderEl:s,autoHeight:l?n.autoHeight:!0,performance:n.performance,observeMethod:n.observeMethod}),{scrollable:r,isScrollEnd:u,sliderPos:c}=a,M=e.ref(!1),f=n.autoHide?e.computed(()=>M.value||!u.value):e.computed(()=>r.value),{load:g}=J(`.hide-scrollbar {
15
15
  scrollbar-width: none;
16
16
  -ms-overflow-style: none;
17
17
  }
18
18
  .hide-scrollbar::-webkit-scrollbar {
19
19
  display: none;
20
- }`,{id:"styletag_lzc_scrollbar",manual:!0});e.onMounted(()=>{f(),e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function c(){u.value=!0}function h(){u.value=!1}return n({uScrollBarReturn:a}),(B,v)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:c,onMouseleave:h,style:e.normalizeStyle(e.unref(p))},[e.renderSlot(B.$slots,"default",{},()=>[mt],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),qt="",gt=V(vt,[["__scopeId","data-v-efefe52c"]]),_t=t=>(e.pushScopeId("data-v-18377f18"),t=t(),e.popScopeId(),t),yt={class:"pull-refresh"},wt={key:0,class:"pull-arrow-circle"},Et={key:0,class:"box-load"},St={class:"left-load"},bt={class:"right-load"},Ct=_t(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),Lt={class:"pull-arrow"},Tt={key:1},Bt=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(t){const n=t,o=.7,l="#2EC1CC",r=e.ref(-999),s=e.ref(1),a=e.ref(0),i=e.ref(.3),m=e.ref(!1),p=e.ref(0),u=e.ref(0),d=e.ref(0),f=e.ref(0),c=e.ref(0),h=e.ref(),B=e.computed(()=>n.scrollTop),v=e.computed(()=>({transition:`${f.value}ms`,transform:`translate3d(0,${r.value}px, 0) scale(${s.value})`})),_=e.computed(()=>({borderColor:l,transition:f.value,transform:`rotate(${100+a.value}deg)`,opacity:i.value}));e.watch(c,C=>{C===0&&(r.value=-50,i.value=.3)}),e.watch(u,C=>{if(c.value===2)return;const D=Math.pow(C,o);D===0&&(r.value=-50),D<=50&&D>0&&(r.value=D-45,a.value=Math.pow(D,1.5),D>15?m.value=!0:m.value=!1),D>50&&(r.value=5,i.value=1,c.value)});const b=e.ref(0),M=C=>{b.value=C.touches[0].pageY},A=C=>{const D=C.touches[0].pageY-b.value;b.value=C.touches[0].pageY,!n.refreshOff&&(!n?.refresh||c.value!==2&&B.value===0&&(p.value===0&&(p.value=C.touches[0].pageY),d.value=0,x.value.style.transition=`${d.value}ms`,f.value=0,u.value=C.touches[0].pageY-p.value,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`,D>0&&C.preventDefault()))},H=()=>{if(n.refreshOff||!n?.refresh||c.value===2)return;p.value=0,d.value=300;const C=Math.pow(u.value,o);x.value.style.transition=`${d.value}ms`,C>50?(c.value=2,u.value=Math.pow(50,1/o),x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`,f.value=300,n?.refresh&&n?.refresh().then(()=>{h.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{h.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{c.value=0,u.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`,setTimeout(()=>{h.value=void 0},f.value)},600)})):(u.value=0,x.value.style.transform=`translate3d(0, ${Math.pow(u.value,o)}px, 0)`)},x=e.ref(null);return e.onMounted(()=>{n?.refreshOff||(x.value=document.querySelector(n.pullRefreshContainer),x.value?.addEventListener("touchstart",M),x.value?.addEventListener("touchmove",A),x.value?.addEventListener("touchend",H))}),(C,D)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(v))},[h.value?(e.openBlock(),e.createElementBlock("div",Tt,e.toDisplayString(h.value),1)):(e.openBlock(),e.createElementBlock("div",wt,[c.value==2?(e.openBlock(),e.createElementBlock("div",Et,[e.createElementVNode("div",St,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",bt,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),Ct])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(_))},[e.createElementVNode("div",Lt,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:m.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),Qt="",De=V(Bt,[["__scopeId","data-v-18377f18"]]),xt={inheritAttrs:!1},Dt=e.defineComponent({...xt,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(t,{expose:n,emit:o}){const l=t,r=Le(e.toRef(l,"data"),{itemHeight:f=>l.itemHeight(l.data[f]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:s,containerProps:a,wrapperProps:i,innerProps:m,getItemHeightData:p,scrollTop:u}=r;n({vListReturn:r});const d="virtualListWrapper"+new Date().getTime();return(f,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(De,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(u),pullRefreshContainer:"#"+d},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:d},[e.createElementVNode("div",e.mergeProps({onScrollPassive:c[0]||(c[0]=(...h)=>e.unref(a).onScroll&&e.unref(a).onScroll(...h)),ref:e.unref(a).ref,class:"virtualList"},f.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(i))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(m))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),({index:h,data:B})=>(e.openBlock(),e.createElementBlock("div",{key:h,style:e.normalizeStyle({height:`${e.unref(p)(h).height}px`,display:"flex"})},[e.renderSlot(f.$slots,"default",{data:B,index:h},void 0,!0)],4))),128))],16)],16)],16)])],64))}}),Xt="",Ot=V(Dt,[["__scopeId","data-v-e0fb787f"]]),ce=t=>(e.pushScopeId("data-v-c986249d"),t=t(),e.popScopeId(),t),$t={style:{position:"absolute"}},It=ce(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Mt=["width","height"],kt=[ce(()=>e.createElementVNode("title",null,"logo",-1)),ce(()=>e.createElementVNode("g",{id:"group-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{d:"M260,0 L260,260 L0,260 L0,0 L260,0 Z M173.523673,59.478426 L168.543315,62.4752911 C160.9116,67.0675753 153.089651,71.6349169 145.95806,75.5800674 C142.130471,77.697465 141.695584,77.8197038 137.842227,77.8197038 L123.620155,77.8194132 C120.16747,77.8127705 119.807362,77.673506 116.200006,75.5626777 L115.86045,75.3641139 C113.295911,73.8653877 110.281688,72.1255413 103.60737,68.2932221 C100.032855,66.2486474 96.3694634,64.1645054 92.8123362,62.1486494 L88.1098826,59.4837265 L86.4238232,64.6191026 C83.7525911,72.7551036 81.4062856,80.7653112 79.9222326,87.4417622 C78.9474243,91.8460343 78.2380884,93.2327734 74.2195073,98.9752733 C73.3694777,100.207223 72.630007,101.343155 72.0710109,102.283257 C67.5201215,110.313953 65.2975905,119.339776 65.6004928,128.457001 C66.1750084,143.318086 73.5375842,157.955758 85.6992798,168.473706 C96.9509724,178.204645 111.5737,183.826593 127.858154,184.209647 L130.088901,184.229303 C130.3376,186.684365 130.531293,189.982467 130.67329,193.770543 L130.951876,201.202421 L137.351863,197.414204 C154.766094,187.106546 169.345402,176.172255 180.160428,163.526119 C190.679421,151.226139 196.179795,138.745301 195.345608,125.762609 C194.727393,116.39373 192.289395,107.848059 187.082918,99.046007 C186.275378,97.7498121 185.738167,97.0056347 184.495395,95.37077 C181.975467,92.0558065 181.159964,90.5424149 180.493634,87.4039653 C178.713605,78.9218624 176.863265,71.4211865 175.088993,65.0761883 L173.523673,59.478426 Z M93.177,72.537 L93.8226224,72.9040486 C95.6240552,73.9292933 97.4266638,74.9575498 99.2051531,75.9748184 C106.15023,79.9626119 109.111289,81.6727026 111.728598,83.2042091 C116.752992,86.1442112 118.538634,86.6733184 123.964152,86.6733184 L137.842227,86.6733184 C143.264867,86.6733184 145.156143,86.1417146 150.243765,83.3272749 L153.915953,81.276117 C157.635687,79.179445 161.486156,76.9543599 165.360239,74.6740288 L168.062636,73.0710869 L168.527808,74.8705095 C169.630114,79.2468106 170.742831,84.0476913 171.830914,89.2325336 C172.820403,93.8931438 174.207097,96.4665356 177.447051,100.728693 C178.530829,102.154402 178.952253,102.738183 179.517404,103.643654 C183.925243,111.098001 185.980436,118.301862 186.51071,126.337939 C187.173867,136.658947 182.587388,147.066077 173.431821,157.771787 L171.503004,159.959402 C163.609627,168.649028 153.591728,176.617571 141.90907,184.187495 L139.123121,185.960576 L139.113767,185.819152 C139.047016,184.932364 138.975009,184.102769 138.897435,183.336992 C138.769034,182.069465 138.589718,180.629122 138.367155,179.053334 L137.795381,175.005053 L133.714496,175.253822 C132.500079,175.327852 131.274186,175.368647 130.037423,175.375838 C114.999567,175.463276 101.629066,170.545082 91.4908024,161.777083 C81.1421175,152.827103 74.9249947,140.466728 74.4483613,128.138982 C74.2004611,120.675327 76.0261036,113.26129 79.7275986,106.727863 C80.126032,106.059698 80.7615655,105.083428 81.4902403,104.02721 C86.0997527,97.4404488 87.2937074,95.1062887 88.5657754,89.358959 C89.6596645,84.4377825 91.2792852,78.6447463 93.1627518,72.6043699 L93.177,72.537 Z",id:"path-1",fill:"#FFF"})],-1))],Rt=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(t){const n=t;e.useCssVars(l=>({"5e400569":o}));const o=`${n.duration}ms`;return(l,r)=>(e.openBlock(),e.createElementBlock("div",$t,[It,(e.openBlock(),e.createElementBlock("svg",{style:{position:"relative"},width:t.width,height:t.height,viewBox:"0 0 260 260",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},kt,8,Mt))]))}}),Jt="",Pt=V(Rt,[["__scopeId","data-v-c986249d"]]);y.DefaultLoading=st,y.Loading=Pt,y.PullRefresh=De,y.ScrollBar=gt,y.SvgIcon=pt,y.ToastCreator=dt,y.VirtualList=Ot,y.allSelectedKey=te,y.closeDialogKey=Te,y.dialogController=ot,y.isAllSelectedKey=re,y.isSelectedKey=ee,y.selectAllKey=oe,y.selectKey=ne,y.toggleAllKey=Z,y.toggleKey=J,y.unselectAllKey=ae,y.unselectKey=le,y.useDelayLoad=lt,y.useDelayLoadComp=Be,y.useDragSelect=ie,y.useDragSelectByMobile=Je,y.useDragSelectByPc=Ze,y.useSelectable=Ge,y.useSelectableInjectors=Xe,y.useVirtualList=Le,y.vDebounceClick=$e,y.vSingleClick=fe,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
20
+ }`,{id:"styletag_lzc_scrollbar",manual:!0});e.onMounted(()=>{g(),e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function d(){M.value=!0}function N(){M.value=!1}return t({uScrollBarReturn:a}),(C,D)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:s,class:"slider-wrapper",onMouseenter:d,onMouseleave:N,style:e.normalizeStyle(e.unref(c))},[e.renderSlot(C.$slots,"default",{},()=>[jt],!0)],36),[[e.vShow,e.unref(f)]])]),_:3}))}}),io="",Lt=Q(Ct,[["__scopeId","data-v-efefe52c"]]),vt=o=>(e.pushScopeId("data-v-18377f18"),o=o(),e.popScopeId(),o),Ot={class:"pull-refresh"},At={key:0,class:"pull-arrow-circle"},xt={key:0,class:"box-load"},St={class:"left-load"},_t={class:"right-load"},kt=vt(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),bt={class:"pull-arrow"},Qt={key:1},Bt=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(o){const t=o,n=.7,l="#2EC1CC",s=e.ref(-999),i=e.ref(1),a=e.ref(0),r=e.ref(.3),u=e.ref(!1),c=e.ref(0),M=e.ref(0),f=e.ref(0),g=e.ref(0),d=e.ref(0),N=e.ref(),C=e.computed(()=>t.scrollTop),D=e.computed(()=>({transition:`${g.value}ms`,transform:`translate3d(0,${s.value}px, 0) scale(${i.value})`})),h=e.computed(()=>({borderColor:l,transition:g.value,transform:`rotate(${100+a.value}deg)`,opacity:r.value}));e.watch(d,I=>{I===0&&(s.value=-50,r.value=.3)}),e.watch(M,I=>{if(d.value===2)return;const v=Math.pow(I,n);v===0&&(s.value=-50),v<=50&&v>0&&(s.value=v-45,a.value=Math.pow(v,1.5),v>15?u.value=!0:u.value=!1),v>50&&(s.value=5,r.value=1,d.value)});const E=e.ref(0),S=I=>{E.value=I.touches[0].pageY},B=I=>{const v=I.touches[0].pageY-E.value;E.value=I.touches[0].pageY,!t.refreshOff&&(!t?.refresh||d.value!==2&&C.value===0&&(c.value===0&&(c.value=I.touches[0].pageY),f.value=0,L.value.style.transition=`${f.value}ms`,g.value=0,M.value=I.touches[0].pageY-c.value,L.value.style.transform=`translate3d(0, ${Math.pow(M.value,n)}px, 0)`,v>0&&I.preventDefault()))},U=()=>{if(t.refreshOff||!t?.refresh||d.value===2)return;c.value=0,f.value=300;const I=Math.pow(M.value,n);L.value.style.transition=`${f.value}ms`,I>50?(d.value=2,M.value=Math.pow(50,1/n),L.value.style.transform=`translate3d(0, ${Math.pow(M.value,n)}px, 0)`,g.value=300,t?.refresh&&t?.refresh().then(()=>{N.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{N.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{d.value=0,M.value=0,L.value.style.transform=`translate3d(0, ${Math.pow(M.value,n)}px, 0)`,setTimeout(()=>{N.value=void 0},g.value)},600)})):(M.value=0,L.value.style.transform=`translate3d(0, ${Math.pow(M.value,n)}px, 0)`)},L=e.ref(null);return e.onMounted(()=>{t?.refreshOff||(L.value=document.querySelector(t.pullRefreshContainer),L.value?.addEventListener("touchstart",S),L.value?.addEventListener("touchmove",B),L.value?.addEventListener("touchend",U))}),(I,v)=>(e.openBlock(),e.createElementBlock("div",Ot,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(D))},[N.value?(e.openBlock(),e.createElementBlock("div",Qt,e.toDisplayString(N.value),1)):(e.openBlock(),e.createElementBlock("div",At,[d.value==2?(e.openBlock(),e.createElementBlock("div",xt,[e.createElementVNode("div",St,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",_t,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),kt])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(h))},[e.createElementVNode("div",bt,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:u.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),ro="",Oe=Q(Bt,[["__scopeId","data-v-18377f18"]]),Ut={inheritAttrs:!1},Yt=e.defineComponent({...Ut,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(o,{expose:t,emit:n}){const l=o,s=je(e.toRef(l,"data"),{itemHeight:g=>l.itemHeight(l.data[g]),overscan:l.overscan,scrollEndHook:()=>{n("scrollEnd")}}),{list:i,containerProps:a,wrapperProps:r,innerProps:u,getItemHeightData:c,scrollTop:M}=s;t({vListReturn:s});const f="virtualListWrapper"+new Date().getTime();return(g,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Oe,{refresh:o.refresh,refreshOff:o.refreshOff,scrollTop:e.unref(M),pullRefreshContainer:"#"+f},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:f},[e.createElementVNode("div",e.mergeProps({onScrollPassive:d[0]||(d[0]=(...N)=>e.unref(a).onScroll&&e.unref(a).onScroll(...N)),ref:e.unref(a).ref,class:"virtualList"},g.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(r))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(u))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),({index:N,data:C})=>(e.openBlock(),e.createElementBlock("div",{key:N,style:e.normalizeStyle({height:`${e.unref(c)(N).height}px`,display:"flex"})},[e.renderSlot(g.$slots,"default",{data:C,index:N},void 0,!0)],4))),128))],16)],16)],16)])],64))}}),co="",$t=Q(Yt,[["__scopeId","data-v-e0fb787f"]]),ue=o=>(e.pushScopeId("data-v-c986249d"),o=o(),e.popScopeId(),o),Pt={style:{position:"absolute"}},Rt=ue(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Ht=["width","height"],Vt=[ue(()=>e.createElementVNode("title",null,"logo",-1)),ue(()=>e.createElementVNode("g",{id:"group-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{d:"M260,0 L260,260 L0,260 L0,0 L260,0 Z M173.523673,59.478426 L168.543315,62.4752911 C160.9116,67.0675753 153.089651,71.6349169 145.95806,75.5800674 C142.130471,77.697465 141.695584,77.8197038 137.842227,77.8197038 L123.620155,77.8194132 C120.16747,77.8127705 119.807362,77.673506 116.200006,75.5626777 L115.86045,75.3641139 C113.295911,73.8653877 110.281688,72.1255413 103.60737,68.2932221 C100.032855,66.2486474 96.3694634,64.1645054 92.8123362,62.1486494 L88.1098826,59.4837265 L86.4238232,64.6191026 C83.7525911,72.7551036 81.4062856,80.7653112 79.9222326,87.4417622 C78.9474243,91.8460343 78.2380884,93.2327734 74.2195073,98.9752733 C73.3694777,100.207223 72.630007,101.343155 72.0710109,102.283257 C67.5201215,110.313953 65.2975905,119.339776 65.6004928,128.457001 C66.1750084,143.318086 73.5375842,157.955758 85.6992798,168.473706 C96.9509724,178.204645 111.5737,183.826593 127.858154,184.209647 L130.088901,184.229303 C130.3376,186.684365 130.531293,189.982467 130.67329,193.770543 L130.951876,201.202421 L137.351863,197.414204 C154.766094,187.106546 169.345402,176.172255 180.160428,163.526119 C190.679421,151.226139 196.179795,138.745301 195.345608,125.762609 C194.727393,116.39373 192.289395,107.848059 187.082918,99.046007 C186.275378,97.7498121 185.738167,97.0056347 184.495395,95.37077 C181.975467,92.0558065 181.159964,90.5424149 180.493634,87.4039653 C178.713605,78.9218624 176.863265,71.4211865 175.088993,65.0761883 L173.523673,59.478426 Z M93.177,72.537 L93.8226224,72.9040486 C95.6240552,73.9292933 97.4266638,74.9575498 99.2051531,75.9748184 C106.15023,79.9626119 109.111289,81.6727026 111.728598,83.2042091 C116.752992,86.1442112 118.538634,86.6733184 123.964152,86.6733184 L137.842227,86.6733184 C143.264867,86.6733184 145.156143,86.1417146 150.243765,83.3272749 L153.915953,81.276117 C157.635687,79.179445 161.486156,76.9543599 165.360239,74.6740288 L168.062636,73.0710869 L168.527808,74.8705095 C169.630114,79.2468106 170.742831,84.0476913 171.830914,89.2325336 C172.820403,93.8931438 174.207097,96.4665356 177.447051,100.728693 C178.530829,102.154402 178.952253,102.738183 179.517404,103.643654 C183.925243,111.098001 185.980436,118.301862 186.51071,126.337939 C187.173867,136.658947 182.587388,147.066077 173.431821,157.771787 L171.503004,159.959402 C163.609627,168.649028 153.591728,176.617571 141.90907,184.187495 L139.123121,185.960576 L139.113767,185.819152 C139.047016,184.932364 138.975009,184.102769 138.897435,183.336992 C138.769034,182.069465 138.589718,180.629122 138.367155,179.053334 L137.795381,175.005053 L133.714496,175.253822 C132.500079,175.327852 131.274186,175.368647 130.037423,175.375838 C114.999567,175.463276 101.629066,170.545082 91.4908024,161.777083 C81.1421175,152.827103 74.9249947,140.466728 74.4483613,128.138982 C74.2004611,120.675327 76.0261036,113.26129 79.7275986,106.727863 C80.126032,106.059698 80.7615655,105.083428 81.4902403,104.02721 C86.0997527,97.4404488 87.2937074,95.1062887 88.5657754,89.358959 C89.6596645,84.4377825 91.2792852,78.6447463 93.1627518,72.6043699 L93.177,72.537 Z",id:"path-1",fill:"#FFF"})],-1))],Ft=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(o){const t=o;e.useCssVars(l=>({"5e400569":n}));const n=`${t.duration}ms`;return(l,s)=>(e.openBlock(),e.createElementBlock("div",Pt,[Rt,(e.openBlock(),e.createElementBlock("svg",{style:{position:"relative"},width:o.width,height:o.height,viewBox:"0 0 260 260",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Vt,8,Ht))]))}}),fo="",Wt=Q(Ft,[["__scopeId","data-v-c986249d"]]);y.DefaultLoading=rt,y.Loading=Wt,y.LoadingToast=K,y.PullRefresh=Oe,y.ScrollBar=Lt,y.SvgIcon=It,y.ToastCreator=wt,y.VirtualList=$t,y.allSelectedKey=oe,y.closeDialogKey=Ce,y.dialogController=lt,y.isAllSelectedKey=ae,y.isSelectedKey=te,y.selectAllKey=le,y.selectKey=ne,y.toggleAllKey=q,y.toggleKey=ee,y.unselectAllKey=ie,y.unselectKey=se,y.useDelayAsync=yt,y.useDelayLoad=st,y.useDelayLoadComp=Le,y.useDragSelect=ce,y.useDragSelectByMobile=et,y.useDragSelectByPc=qe,y.useSelectable=Je,y.useSelectableInjectors=Xe,y.useVirtualList=je,y.vDebounceClick=xe,y.vSingleClick=fe,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .lzc-modal[data-v-4ff684af]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.lzc-dialog[data-v-4ff684af]{margin:auto;display:flex;flex-direction:column}.ldio-mm5gwljcryb[data-v-d0ad7597]{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.ldio-mm5gwljcryb div[data-v-d0ad7597]{box-sizing:content-box;position:absolute;top:50%;left:50%;width:var(--d8dfa9f0);height:var(--2941c2e5);border:3px solid #dfdfdf;border-top-color:transparent;border-radius:50%;animation:ldio-mm5gwljcryb-d0ad7597 .7s linear infinite}@keyframes ldio-mm5gwljcryb-d0ad7597{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.loadingio-spinner-rolling-5kajof80q6w[data-v-d0ad7597]{width:100%;height:100%;display:inline-block;overflow:hidden;background:#ffffff}@keyframes slide-533e986b{0%{opacity:1}to{opacity:0}}.animate-toastAnimation[data-v-533e986b]{animation:slide-533e986b .3s linear}.v-leave-active[data-v-efefe52c]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-efefe52c]{opacity:0}.slider-wrapper[data-v-efefe52c]{position:absolute;right:0;touch-action:none}.default-slider[data-v-efefe52c]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.pull-refresh[data-v-18377f18]{position:relative}.pull-refresh-box[data-v-18377f18]{position:absolute;display:flex;justify-content:center;width:100%;font-size:14px;color:#85898b99;text-align:center;z-index:500}.pull-arrow-circle[data-v-18377f18]{position:relative;width:30px;height:30px;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center}.box-load[data-v-18377f18]{position:relative;width:18px;height:18px;border-radius:50%;overflow:hidden;animation:boxs-18377f18 3s infinite linear forwards}@keyframes boxs-18377f18{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.left-load[data-v-18377f18]{position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.left-circle[data-v-18377f18]{position:absolute;width:9px;height:18px;border-radius:18px 0 0 18px;transform:rotate(-180deg);transform-origin:9px 9px;animation:pr1A-18377f18 3s infinite linear forwards}@keyframes pr1A-18377f18{0%{transform:rotate(-180deg)}25%{transform:rotate(-180deg)}50%{transform:rotate(0)}75%{transform:rotate(0)}to{transform:rotate(180deg)}}.right-load[data-v-18377f18]{left:9px;position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.right-circle[data-v-18377f18]{position:absolute;width:9px;height:18px;border-radius:0 18px 18px 0;transform:rotate(-180deg);transform-origin:0px 9px;animation:pr2A-18377f18 3s infinite linear forwards}@keyframes pr2A-18377f18{0%{transform:rotate(-180deg)}25%{transform:rotate(0)}50%{transform:rotate(0)}75%{transform:rotate(180deg)}to{transform:rotate(180deg)}}.among-load[data-v-18377f18]{top:2px;left:2px;width:14px;height:14px;border-radius:50%;position:absolute;background:#fff;z-index:5;overflow:hidden}.pull-circle-line[data-v-18377f18]{position:relative;width:15px;height:15px;border-radius:50%;background-color:#fff;box-sizing:border-box;border-width:2px;border-style:solid;display:flex;align-items:center;justify-content:center}.pull-arrow[data-v-18377f18]{position:absolute;left:-3px;transform:rotate(120deg);background-color:#fff;width:4px;height:6px}.arrows[data-v-18377f18]{width:0;height:0;position:absolute;right:-4px;bottom:4px;transform:rotate(-30deg);border-bottom-width:6px;border-bottom-style:solid;border-right:6px solid transparent;transition:.5s;opacity:0}.opacity[data-v-18377f18]{opacity:1}.left-item[data-v-18377f18]{text-align:center;height:100px;line-height:100px;color:#333}.left-item-active[data-v-18377f18]{color:#e93b3d}.virtualList[data-v-e0fb787f]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-e0fb787f]{width:100%;height:100%;position:relative}@keyframes loading-rotate-c986249d{to{transform:rotate(360deg);-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg)}}.wrapper[data-v-c986249d]{width:100%;height:100%;border-radius:100%;background:conic-gradient(from .25turn at 50% 50%,rgba(255,255,255,0),240deg,#2ec1cc);position:absolute;top:0;animation:loading-rotate-c986249d var(--5e400569) linear infinite}
1
+ .lzc-modal[data-v-4ff684af]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.lzc-dialog[data-v-4ff684af]{margin:auto;display:flex;flex-direction:column}.ldio-mm5gwljcryb[data-v-d0ad7597]{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.ldio-mm5gwljcryb div[data-v-d0ad7597]{box-sizing:content-box;position:absolute;top:50%;left:50%;width:var(--d8dfa9f0);height:var(--2941c2e5);border:3px solid #dfdfdf;border-top-color:transparent;border-radius:50%;animation:ldio-mm5gwljcryb-d0ad7597 .7s linear infinite}@keyframes ldio-mm5gwljcryb-d0ad7597{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.loadingio-spinner-rolling-5kajof80q6w[data-v-d0ad7597]{width:100%;height:100%;display:inline-block;overflow:hidden;background:#ffffff}.lzc-loading-toast[data-v-cb2e1a90]{display:flex;position:fixed;width:100%;height:100%;z-index:2147483647;box-sizing:border-box}.lzc-loading-toast-wrap[data-v-cb2e1a90]{margin:auto;text-align:center;box-sizing:border-box}.lzc-loading-toast-content[data-v-cb2e1a90]{display:flex;flex-direction:column;border-radius:8px;position:relative;pointer-events:auto;background-color:#000c;padding:20px;box-sizing:border-box}.lzc-loading-toast-close[data-v-cb2e1a90]{height:10px;width:10px;position:absolute;right:12px;top:12px;cursor:pointer;box-sizing:border-box}.lzc-loading-toast-icon[data-v-cb2e1a90]{width:35px;height:35px;margin:0 auto;border-radius:9999px;animation:lzc-spin-cb2e1a90 1s linear infinite;box-sizing:border-box}.lzc-loading-toast-message[data-v-cb2e1a90]{display:flex;flex-wrap:wrap;font-size:16px;color:#fff;margin-left:auto;margin-right:auto;margin-top:4px;box-sizing:border-box;white-space:pre-wrap}@keyframes lzc-spin-cb2e1a90{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes lzc-fade-in{0%{opacity:0}to{opacity:1}}.lzc-animate-fade-in{animation:lzc-fade-in 1s linear 1}.lzc-animate-duration-300{animation-duration:.3s}@keyframes lzc-fade-out{0%{opacity:1}to{opacity:0}}.lzc-animate-fade-out{animation:lzc-fade-out 1s linear 1}@keyframes slide-533e986b{0%{opacity:1}to{opacity:0}}.animate-toastAnimation[data-v-533e986b]{animation:slide-533e986b .3s linear}.v-leave-active[data-v-efefe52c]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-efefe52c]{opacity:0}.slider-wrapper[data-v-efefe52c]{position:absolute;right:0;touch-action:none}.default-slider[data-v-efefe52c]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.pull-refresh[data-v-18377f18]{position:relative}.pull-refresh-box[data-v-18377f18]{position:absolute;display:flex;justify-content:center;width:100%;font-size:14px;color:#85898b99;text-align:center;z-index:500}.pull-arrow-circle[data-v-18377f18]{position:relative;width:30px;height:30px;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center}.box-load[data-v-18377f18]{position:relative;width:18px;height:18px;border-radius:50%;overflow:hidden;animation:boxs-18377f18 3s infinite linear forwards}@keyframes boxs-18377f18{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.left-load[data-v-18377f18]{position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.left-circle[data-v-18377f18]{position:absolute;width:9px;height:18px;border-radius:18px 0 0 18px;transform:rotate(-180deg);transform-origin:9px 9px;animation:pr1A-18377f18 3s infinite linear forwards}@keyframes pr1A-18377f18{0%{transform:rotate(-180deg)}25%{transform:rotate(-180deg)}50%{transform:rotate(0)}75%{transform:rotate(0)}to{transform:rotate(180deg)}}.right-load[data-v-18377f18]{left:9px;position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.right-circle[data-v-18377f18]{position:absolute;width:9px;height:18px;border-radius:0 18px 18px 0;transform:rotate(-180deg);transform-origin:0px 9px;animation:pr2A-18377f18 3s infinite linear forwards}@keyframes pr2A-18377f18{0%{transform:rotate(-180deg)}25%{transform:rotate(0)}50%{transform:rotate(0)}75%{transform:rotate(180deg)}to{transform:rotate(180deg)}}.among-load[data-v-18377f18]{top:2px;left:2px;width:14px;height:14px;border-radius:50%;position:absolute;background:#fff;z-index:5;overflow:hidden}.pull-circle-line[data-v-18377f18]{position:relative;width:15px;height:15px;border-radius:50%;background-color:#fff;box-sizing:border-box;border-width:2px;border-style:solid;display:flex;align-items:center;justify-content:center}.pull-arrow[data-v-18377f18]{position:absolute;left:-3px;transform:rotate(120deg);background-color:#fff;width:4px;height:6px}.arrows[data-v-18377f18]{width:0;height:0;position:absolute;right:-4px;bottom:4px;transform:rotate(-30deg);border-bottom-width:6px;border-bottom-style:solid;border-right:6px solid transparent;transition:.5s;opacity:0}.opacity[data-v-18377f18]{opacity:1}.left-item[data-v-18377f18]{text-align:center;height:100px;line-height:100px;color:#333}.left-item-active[data-v-18377f18]{color:#e93b3d}.virtualList[data-v-e0fb787f]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-e0fb787f]{width:100%;height:100%;position:relative}@keyframes loading-rotate-c986249d{to{transform:rotate(360deg);-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg)}}.wrapper[data-v-c986249d]{width:100%;height:100%;border-radius:100%;background:conic-gradient(from .25turn at 50% 50%,rgba(255,255,255,0),240deg,#2ec1cc);position:absolute;top:0;animation:loading-rotate-c986249d var(--5e400569) linear infinite}
@@ -5,7 +5,9 @@ export * from "./useDragSelect";
5
5
  export * from "./dialog";
6
6
  export * from "./useDelayLoad";
7
7
  export * from "./Loading/index";
8
+ export * from "./useDelayAsync";
8
9
  export { ToastCreator } from "./toast/ToastCreator";
10
+ export { LoadingToast } from "./loading-toast/index";
9
11
  export { default as SvgIcon } from "./svgIcon/SvgIcon.vue";
10
12
  export { default as ScrollBar } from "./scroll-bar";
11
13
  export { default as VirtualList } from "./useVirtualList/VirtualList.vue";
@@ -0,0 +1,42 @@
1
+ import { Component, Ref, CSSProperties } from "vue";
2
+ export interface LoadingToastOptions {
3
+ visible?: Ref<boolean>;
4
+ /** 文本内容,支持通过\n换行 */
5
+ message?: string;
6
+ /** 展示时长(ms),值为 0 时,toast 不会消失 */
7
+ duration?: number;
8
+ /** 展示宽度 */
9
+ width?: string;
10
+ /** 展示最大宽度 */
11
+ maxWidth?: string;
12
+ /** 是否显示icon */
13
+ showIcon?: boolean;
14
+ /** 自定义图标 */
15
+ icon?: string;
16
+ /** 是否显示关闭按钮 */
17
+ showClose?: boolean;
18
+ /** 是否在点击后关闭 */
19
+ closeOnClick?: boolean;
20
+ /** 是否在点击遮罩层后关闭 */
21
+ closeOnClickOverlay?: boolean;
22
+ /** 自定义类名 */
23
+ className?: string;
24
+ /** 自定义content样式 */
25
+ overlayContentStyle?: CSSProperties;
26
+ /** 是否允许时间捕获 */
27
+ captureEvent?: boolean;
28
+ /** 关闭后按钮触发的事件 */
29
+ onClose?: Function;
30
+ }
31
+ export declare class LoadingToast {
32
+ loadingToast: Component;
33
+ el: HTMLElement;
34
+ options: LoadingToastOptions;
35
+ visible: Ref<boolean>;
36
+ animateDuration: number;
37
+ constructor(options?: LoadingToastOptions);
38
+ show(): Promise<void>;
39
+ destory(): Promise<void>;
40
+ static close(): void;
41
+ }
42
+ export default LoadingToast;
@@ -0,0 +1,86 @@
1
+ import { CSSProperties, Ref } from "vue";
2
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
+ visible?: Ref<boolean> | undefined;
4
+ message?: string | undefined;
5
+ duration?: number | undefined;
6
+ width?: string | undefined;
7
+ maxWidth?: string | undefined;
8
+ showIcon?: boolean | undefined;
9
+ icon?: string | undefined;
10
+ showClose?: boolean | undefined;
11
+ closeOnClick?: boolean | undefined;
12
+ closeOnClickOverlay?: boolean | undefined;
13
+ className?: string | undefined;
14
+ overlayContentStyle?: CSSProperties | undefined;
15
+ captureEvent?: boolean | undefined;
16
+ }>, {
17
+ message: string;
18
+ duration: number;
19
+ width: undefined;
20
+ maxWidth: undefined;
21
+ showIcon: boolean;
22
+ icon: undefined;
23
+ showClose: boolean;
24
+ closeOnClick: boolean;
25
+ closeOnClickOverlay: boolean;
26
+ className: string;
27
+ overlayContentStyle: undefined;
28
+ captureEvent: boolean;
29
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
30
+ visible?: Ref<boolean> | undefined;
31
+ message?: string | undefined;
32
+ duration?: number | undefined;
33
+ width?: string | undefined;
34
+ maxWidth?: string | undefined;
35
+ showIcon?: boolean | undefined;
36
+ icon?: string | undefined;
37
+ showClose?: boolean | undefined;
38
+ closeOnClick?: boolean | undefined;
39
+ closeOnClickOverlay?: boolean | undefined;
40
+ className?: string | undefined;
41
+ overlayContentStyle?: CSSProperties | undefined;
42
+ captureEvent?: boolean | undefined;
43
+ }>, {
44
+ message: string;
45
+ duration: number;
46
+ width: undefined;
47
+ maxWidth: undefined;
48
+ showIcon: boolean;
49
+ icon: undefined;
50
+ showClose: boolean;
51
+ closeOnClick: boolean;
52
+ closeOnClickOverlay: boolean;
53
+ className: string;
54
+ overlayContentStyle: undefined;
55
+ captureEvent: boolean;
56
+ }>>> & {
57
+ onClose?: ((...args: any[]) => any) | undefined;
58
+ }, {
59
+ width: string;
60
+ duration: number;
61
+ closeOnClickOverlay: boolean;
62
+ message: string;
63
+ maxWidth: string;
64
+ showIcon: boolean;
65
+ icon: string;
66
+ showClose: boolean;
67
+ closeOnClick: boolean;
68
+ className: string;
69
+ overlayContentStyle: CSSProperties;
70
+ captureEvent: boolean;
71
+ }>;
72
+ export default _default;
73
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
74
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
75
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
76
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
77
+ } : {
78
+ type: import('vue').PropType<T[K]>;
79
+ required: true;
80
+ };
81
+ };
82
+ declare type __VLS_WithDefaults<P, D> = {
83
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
84
+ default: D[K];
85
+ } : P[K];
86
+ };
@@ -17,8 +17,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
17
17
  prefix: string;
18
18
  color: string;
19
19
  }>>>, {
20
- prefix: string;
21
20
  color: string;
21
+ prefix: string;
22
22
  }>;
23
23
  export default _default;
24
24
  declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,10 +1,10 @@
1
1
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
2
  message: string;
3
- position: "top" | "middle" | "bottom";
3
+ position: "bottom" | "top" | "middle";
4
4
  buttonClickEvent: (parms?: any) => any | null;
5
5
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
6
  message: string;
7
- position: "top" | "middle" | "bottom";
7
+ position: "bottom" | "top" | "middle";
8
8
  buttonClickEvent: (parms?: any) => any | null;
9
9
  }>>>, {}>;
10
10
  export default _default;
@@ -0,0 +1,24 @@
1
+ import { Ref } from "vue";
2
+ import { LoadingToastOptions } from "@/loading-toast";
3
+ export interface UseDelayAsyncOptions extends LoadingToastOptions {
4
+ /** 是否展示Loading */
5
+ loading?: boolean;
6
+ /** execute函数执行完后会自动清除Loading */
7
+ autoClose?: boolean;
8
+ /** 延迟加载Loading的时间(ms) */
9
+ delay?: number;
10
+ /** 处理错误情况函数,内部实现在传入的handler外层包裹了一层try catch,抛出捕获到的错误 */
11
+ onError?: (err: unknown) => void | Promise<void>;
12
+ }
13
+ export declare type UseDelayAsyncExpose = {
14
+ /** 是否在执行中 */
15
+ processing: Ref<boolean>;
16
+ /** 执行函数 */
17
+ handler: () => Promise<void>;
18
+ /** 清理Loading和内部定时器 */
19
+ close: () => Promise<void>;
20
+ };
21
+ /** 需要执行的函数 */
22
+ export declare type ExecuteFunction = () => void | Promise<void>;
23
+ export declare function useDelayAsync(execute: ExecuteFunction, options?: UseDelayAsyncOptions): UseDelayAsyncExpose;
24
+ export default useDelayAsync;
@@ -0,0 +1 @@
1
+ export declare function sleep(duration: number): Promise<unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-toolkit",
3
- "version": "0.0.95",
3
+ "version": "0.0.97",
4
4
  "description": "lazycat ui toolkits",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",