@lazycatcloud/lzc-toolkit 0.0.65 → 0.0.67
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 +621 -585
- package/dist/index.umd.js +9 -9
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(S,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(S=typeof globalThis<"u"?globalThis:S||self,e(S.ui={},S.Vue))})(this,function(S,e){"use strict";var he;const Z=typeof window<"u";Z&&((he=window?.navigator)==null?void 0:he.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Y(t){return typeof t=="function"?t():e.unref(t)}function me(t,n){function l(...o){t(()=>n.apply(this,o),{fn:n,thisArg:this,args:o})}return l}function $e(t,n={}){let l,o;return i=>{const a=Y(t),f=Y(n.maxWait);if(l&&clearTimeout(l),a<=0||f!==void 0&&f<=0)return o&&(clearTimeout(o),o=null),i();f&&!o&&(o=setTimeout(()=>{l&&clearTimeout(l),o=null,i()},f)),l=setTimeout(()=>{o&&clearTimeout(o),o=null,i()},a)}}function Oe(t,n=!0,l=!0){let o=0,r,i=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return h=>{const c=Y(t),p=Date.now()-o;if(a(),c<=0)return o=Date.now(),h();p>c&&(l||!i)?(o=Date.now(),h()):n&&(r=setTimeout(()=>{o=Date.now(),i=!0,a(),h()},c)),!l&&!r&&(r=setTimeout(()=>i=!0,c)),i=!1}}function De(t){return t}function ge(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ve(t,n=200,l={}){return me($e(n,l),t)}function _e(t,n=200,l=!1,o=!0){return me(Oe(n,l,o),t)}function ye(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function Ee(t){var n;const l=Y(t);return(n=l?.$el)!=null?n:l}const Re=Z?window:void 0,Ie=Z?window.document:void 0;function ke(t,n=!1){const l=e.ref(),o=()=>l.value=Boolean(t());return o(),ye(o,n),l}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ee="__vueuse_ssr_handlers__";J[ee]=J[ee]||{},J[ee];var Se=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ae=(t,n)=>{var l={};for(var o in t)Pe.call(t,o)&&n.indexOf(o)<0&&(l[o]=t[o]);if(t!=null&&Se)for(var o of Se(t))n.indexOf(o)<0&&Me.call(t,o)&&(l[o]=t[o]);return l};function He(t,n,l={}){const o=l,{window:r=Re}=o,i=Ae(o,["window"]);let a;const f=ke(()=>r&&"ResizeObserver"in r),h=()=>{a&&(a.disconnect(),a=void 0)},c=e.watch(()=>Ee(t),d=>{h(),f.value&&r&&d&&(a=new ResizeObserver(n),a.observe(d,i))},{immediate:!0,flush:"post"}),p=()=>{h(),c()};return ge(p),{isSupported:f,stop:p}}function Fe(t,n={width:0,height:0},l={}){const{box:o="content-box"}=l,r=e.ref(n.width),i=e.ref(n.height);return He(t,([a])=>{const f=o==="border-box"?a.borderBoxSize:o==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;f?(r.value=f.reduce((h,{inlineSize:c})=>h+c,0),i.value=f.reduce((h,{blockSize:c})=>h+c,0)):(r.value=a.contentRect.width,i.value=a.contentRect.height)},l),e.watch(()=>Ee(t),a=>{r.value=a?n.width:0,i.value=a?n.height:0}),{width:r,height:i}}var we;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(we||(we={}));let Ve=0;function Ne(t,n={}){const l=e.ref(!1),{document:o=Ie,immediate:r=!0,manual:i=!1,id:a=`vueuse_styletag_${++Ve}`}=n,f=e.ref(t);let h=()=>{};const c=()=>{if(!o)return;const d=o.getElementById(a)||o.createElement("style");d.type="text/css",d.id=a,n.media&&(d.media=n.media),o.head.appendChild(d),!l.value&&(h=e.watch(f,u=>{d.innerText=u},{immediate:!0}),l.value=!0)},p=()=>{!o||!l.value||(h(),o.head.removeChild(o.getElementById(a)),l.value=!1)};return r&&!i&&ye(c),i||ge(p),{id:a,css:f,unload:p,load:c,isLoaded:e.readonly(l)}}var ze=Object.defineProperty,be=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,Ce=(t,n,l)=>n in t?ze(t,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[n]=l,We=(t,n)=>{for(var l in n||(n={}))je.call(n,l)&&Ce(t,l,n[l]);if(be)for(var l of be(n))Ke.call(n,l)&&Ce(t,l,n[l]);return t};We({linear:De},{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 Te(t,n){const{scrollEndHook:l,itemHeight:o,overscan:r=5}=n,i=e.ref(null),a=Fe(i),f=e.ref(!0),h=ve(L,100);let c;const p=e.shallowRef(t),d=e.ref(0),u=e.ref({start:0,end:10});let s=0;const w=e.ref([]),b=e.computed(()=>{let{sum:g,height:E}={sum:0,height:0};return p.value.map((R,D)=>(typeof o=="number"?E=o:E=o(D),g+=E,{height:E,sum:g}))}),_=e.computed(()=>N(u.value.start)),y=e.computed(()=>typeof o=="number"?b.value.length*o:b.value[b.value.length-1]?.sum||0),T=e.computed(()=>{let g=w.value.length-r,E=Math.max(g-s,0);return w.value.slice(E,g)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(c)),e.watch([a.width,a.height,p],([g,E])=>{(g||E)&&F()},{deep:!0}),e.watch(d,()=>{B(),h()});function B(){f.value=!1}function L(){f.value=!0,l?.()}function F(){cancelAnimationFrame(c),c=requestAnimationFrame(V)}function V(){if(i.value){d.value=i.value.scrollTop,s=A();let g=k(d.value),E=g+s+r;g=g-r,g=g<0?0:g,E=E>p.value.length?p.value.length:E,u.value={start:g,end:E},w.value=p.value.slice(g,E).map((R,D)=>({data:R,index:D+g}))}}function k(g){let E=0,R=b.value.length-1,D=-1;for(;E<=R;){const $=Math.floor((E+R)/2);b.value[$].sum>=g?(D=$,R=$-1):E=$+1}return Math.max(0,D)}function A(){let g=0,E=0,R=I();for(let D=R;D<b.value.length&&(g++,E+=b.value[D].height,!(E>=a.height.value));D++);return g}function N(g){if(typeof o=="number")return g*o;let E=b.value[g];return E?E.sum-E.height:0}function z(g){return b.value[g]||{sum:0,height:0}}function I(){let g=u.value.start;return g>=r&&(g+=r),g}function K(g){if(i.value){const E=z(g);i.value.scrollTop=E.sum-E.height,V()}}const Q=e.computed(()=>({style:{width:"100%",height:`${y.value}px`,pointerEvents:f.value?void 0:"none"}})),j=e.computed(()=>({style:{transform:`translate3d(0, ${_.value}px, 0)`,"will-change":"transform"}})),W={overflowY:"auto"};return{list:w,visiableList:T,getItemHeightData:z,getoffsetTopIndex:k,totalHeight:y,clientHeight:a.height,scrollTo:K,scrollTop:d,isScrollEnd:f,containerProps:{ref:i,onScroll:()=>{F()},style:W},wrapperProps:Q,innerProps:j}}const te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol(),se=Symbol(),ie=Symbol(),ce=Symbol();function qe(){const{voidFn:t,boolFn:n,boolRef:l,arrayRef:o}={voidFn:s=>{},boolFn:s=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(le,o),i=e.inject(oe,n),a=e.inject(ie,l),f=e.inject(ne,t),h=e.inject(te,t),c=e.inject(re,t),p=e.inject(ae,t),d=e.inject(se,t),u=e.inject(ce,t);return{selected:r,isSelected:i,isAllSelected:a,toggle:f,toggleAll:h,select:c,selectAll:p,unselect:d,unselectAll:u}}function Ue(t,n){const l=e.ref({}),o=e.computed(()=>t.value.filter(u=>l.value[u[n]])),r=e.computed(()=>o.value.length!=0&&Object.keys(l.value).length==t.value.length);function i(){t.value.forEach(u=>{l.value[u[n]]=!0})}function a(){l.value={}}function f(u){u.forEach(s=>{l.value[s[n]]||(l.value[s[n]]=!0)})}function h(u){u.forEach(s=>{l.value[s[n]]&&delete l.value[s[n]]})}function c(u){return!!l.value[u[n]]}function p(u){u.forEach(s=>{c(s)?delete l.value[s[n]]:l.value[s[n]]=!0})}function d(){r.value?a():i()}return e.provide(te,d),e.provide(ne,p),e.provide(oe,c),e.provide(le,o),e.provide(re,f),e.provide(ae,i),e.provide(se,h),e.provide(ie,r),e.provide(ce,a),{selected:o,select:f,selectAll:i,unselect:h,unselectAll:a,toggle:p,toggleAll:d,isSelected:c,isAllSelected:r}}function ue(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function de({attribute:t,selectWay:n="colum",scrollOptions:l={},getSelectMap:o=()=>({})}){const{select:r=ue("\u9009\u62E9"),unselect:i=ue("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=ue("\u53D6\u6D88\u5168\u9009")}=o();let f={};const h=e.computed(()=>_e(n==="colum"?H:G,50)),c=new Set,p=e.ref(!0),d=e.ref(),u=e.ref(!1),s=e.ref({x:0,y:0}),w=e.ref({x:0,y:0,scrollTop:0}),b=new ResizeObserver(m=>_.value=m[0].target.getBoundingClientRect()),_=e.ref({}),y=e.ref({top:0,height:0,sync(m=!1){y.value.top=d.value?.scrollTop||0,m&&(y.value.height=d.value?.scrollHeight||0)}}),T=e.computed(()=>u.value?{left:Math.min(s.value.x,w.value.x)-_.value.left,top:Math.min(s.value.y,w.value.y)-_.value.top,width:Math.abs(s.value.x-w.value.x),height:Math.abs(s.value.y-w.value.y)}:{left:0,top:0,width:0,height:0}),{margin:B=50,startSpeed:L=30,maxSpeed:F=30}=l;let V;const k=B,A=L,N=F,z=m=>m**1;let I=0;function K(m){if(cancelAnimationFrame(V),I=Q(m),I=Math.max(Math.min(I,N),-N),I!==0){const v=d.value;if(!v||!u.value)return;const O=y.value.height-_.value.height;let C=y.value.top+Number(I);C=Math.min(Math.max(0,C),O),v.scrollTop=C,W(),V=requestAnimationFrame(()=>K(m))}}function Q(m){if(d.value){const O=_.value,C=O.bottom-m;if(C<k)return A*z(1-C/k);const P=m-O.top;if(P<k)return-A*z(1-P/k)}return 0}function j(m){const v={...T.value,right:0,bottom:0};return v.left+=_.value.left,v.top+=_.value.top-y.value.top,v.right=v.width+v.left,v.bottom=v.height+v.top,v.left<m.right&&v.right>m.left&&v.top<m.bottom&&v.bottom>m.top}function W(){y.value.sync();const{top:m,height:v}=y.value;w.value.y=Math.min(v+_.value.top,w.value.y+m-w.value.scrollTop),w.value.scrollTop=m}function g(m,v,O="dynamic-styles"){let C=document.getElementById(O);C||(C=document.createElement("style"),C.id=O,document.head.appendChild(C));const P=C.sheet.cssRules,U=P.length,Ft=`${m} { ${v} }`;for(let pe=0;pe<U;pe++){const xe=P[pe];if(xe.selectorText===m&&xe.style.cssText===v)return}C.sheet.insertRule(Ft,U)}function E(m,v){p.value=!0,u.value=!0,y.value.height?y.value.sync():y.value.sync(!0),s.value.x=m,s.value.y=v+y.value.top,w.value.x=s.value.x,w.value.y=s.value.y,d.value?.classList.add("disable-scroll-behavior"),c.clear()}function R(m,v,O){!u.value||(p.value&&n==="colum"&&!x()&&(a(),p.value=!1),O?.(),K(v),w.value.x=Math.max(m,_.value.left),w.value.y=Math.min(v+y.value.top,y.value.height+_.value.top),w.value.scrollTop=y.value.top,h.value())}function D(){u.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function $(){!u.value||(I||W(),h.value())}function x(){if(!u.value)return!1;const{width:m,height:v}=T.value;return!(Math.max(m,v)>5)}function q(){x()&&a()}function H(){x()||d.value?.querySelectorAll(`[${t}]`).forEach(m=>{f[`${t}`]=m.getAttribute(`${t}`),j(m.getBoundingClientRect())?r([f]):i([f])})}function G(){const m=[];let v=null,O=0;d.value?.querySelectorAll(`[${t}]`).forEach((C,P)=>{const U=C.getAttribute(`${t}`);m.push(U),j(C.getBoundingClientRect())?(v===null&&(v=P),v=Math.min(v,P),O=Math.max(O,P)):(f[`${t}`]=U,c.has(U)&&i([f]))});for(let C=v;C<O+1;C++)f[`${t}`]=m[C],r([f]),c.add(m[C])}function X(m){return!m?.value||(d.value=m.value,!d?.value)?!1:(b.observe(d.value),g(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:X,dragStart:E,dragMove:R,dragEnd:D,onScroll:$,isSingleClick:x,cancelSelectAllBySingleClick:q,selectFn:h,selectRange:T,isPressing:u,containerEl:d,observer:b}}function Qe(t){const n=de(t),{observer:l,selectRange:o}=n,{onScroll:r,dragStart:i,dragMove:a,dragEnd:f,cancelSelectAllBySingleClick:h}=n,c=e.computed(()=>({left:`${o.value.left}px`,top:`${o.value.top}px`,width:`${o.value.width}px`,height:`${o.value.height}px`})),p=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"absolute z-50 bg-blue-200 opacity-50",style:c.value})}});function d(_){_.button===0&&i(_.x,_.y)}function u(_){a(_.x,_.y)}function s(_){_.composedPath().some(T=>T?.getAttribute?.(t.attribute))||h(),f()}function w(_){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(p),n.containerEl.value),n.containerEl.value?.addEventListener("scroll",r),n.containerEl.value?.addEventListener("mousedown",d),window.addEventListener("mousemove",u),window.addEventListener("mouseup",s)}catch(y){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",y)}}function b(){l.disconnect(),n.containerEl.value?.removeEventListener("scroll",r),n.containerEl.value?.removeEventListener("mousedown",d),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",s)}return{init:w,unMount:b}}function Ye(t,n,l=600){const o=de({...t,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=o,{onScroll:i,dragStart:a,dragMove:f,dragEnd:h}=o;let c;function p(){clearTimeout(c)}function d(_){p(),_.composedPath().some(T=>!!T?.getAttribute?.(t.attribute))&&(c=setTimeout(()=>{const{clientX:T,clientY:B}=_.targetTouches[0];a(T,B),n?.(),f(T,B,()=>_.preventDefault()),_.preventDefault()},l))}function u(_){p();const{clientX:y,clientY:T}=_.targetTouches[0];f(y,T,()=>_.preventDefault())}function s(){p(),h()}function w(_){try{if(!o.init(_))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!o.containerEl?.value)return!1;o.containerEl.value?.addEventListener("scroll",i),o.containerEl.value?.addEventListener("touchstart",d),o.containerEl.value?.addEventListener("touchmove",u),window.addEventListener("touchcancel",s),window.addEventListener("touchend",s)}catch(y){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",y)}}function b(){r.disconnect(),o.containerEl.value?.removeEventListener("scroll",i),o.containerEl.value?.removeEventListener("touchstart",d),o.containerEl.value?.removeEventListener("touchmove",u),window.removeEventListener("touchcancel",s),window.removeEventListener("touchEnd",s)}return{init:w,unMount:b}}const Be=Symbol(),Ge=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 l=t,o=()=>{l.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(Be,()=>n("update:visiable",!1)),(r,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:o,class:"lzc-modal"},[e.createElementVNode("div",{onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",t.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],2)])):e.createCommentVNode("",!0)]),_:3}))}}),Nt="",M=(t,n)=>{const l=t.__vccOpts||t;for(const[o,r]of n)l[o]=r;return l},Xe=M(Ge,[["__scopeId","data-v-e171c24d"]]);function Ze(t){function n(l,o){const r=document.createElement("div"),i={setup(){return()=>e.h(Xe,{visiable:!0,"onUpdate:visiable":()=>{r?.remove()},...t},{default:()=>e.h(l,o)})}};return document.body.appendChild(r),e.render(e.h(i),r),{close:()=>r?.remove()}}return{create:n}}function Je({component:t,componentProps:n,delay:l=300}){const o=`${l}ms`,r=e.ref(!1),{load:i}=Ne(`@keyframes delayLoad {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
.delay-load {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}`),a=e.defineComponent({setup(){const c=e.h(t,n);return e.onMounted(()=>{i(),c.el&&c.el.classList.add("delay-load")}),()=>r.value&&c}});function f(){r.value=!0}function h(){r.value=!1}return{LoadingComp:a,loading:r,load:f,unload:h}}const zt="",et={},tt={class:"wrapper"},nt=[e.createElementVNode("div",{class:"loading"},null,-1)];function ot(t,n){return e.openBlock(),e.createElementBlock("div",tt,nt)}const lt=M(et,[["render",ot]]),Kt="",rt={},at=[(t=>(e.pushScopeId("data-v-9d3ce674"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))];function st(t,n){return e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(t.$attrs)),at,16)}const it=M(rt,[["render",st],["__scopeId","data-v-9d3ce674"]]),ct=e.defineComponent({__name:"Toast",props:{message:null,position:null},setup(t){const n=t,l=e.ref(),o=e.ref(),r=e.ref(),i=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(${i.value}% - ${r.value}px)`,left:`calc(50% - ${o.value}px)`})),f=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));return e.nextTick(()=>{o.value=l.value.offsetWidth/2,r.value=l.value.offsetHeight/2}),(h,c)=>(e.openBlock(),e.createElementBlock("div",{id:"toastWrapper",ref_key:"toastWrapper",ref:l,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(f))},[e.createElementVNode("span",null,e.toDisplayString(t.message),1)],4)],4))}}),Ut="",ut=M(ct,[["__scopeId","data-v-15ab4094"]]),Le={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500};class dt{options;container;constructor(n){this.options=n,this.container=document.createElement("div")}present(){const n=e.h(e.h(ut),{...Le,...this.options});e.render(n,this.container),document.body.insertBefore(this.container,document.body.firstChild);const l=this.options.duration||Le.duration;setTimeout(()=>{this.dismiss()},l)}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,l=e.computed(()=>`#${n.prefix}-${n.name}`),o=e.computed(()=>({width:`${n.width??n.height}px`,height:`${n.height??n.width}px`,aspectRatio:n.width&&n.height?void 0:"1/1"}));return(r,i)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(o))},[e.createElementVNode("use",{"xlink:href":e.unref(l),fill:t.color,color:t.color},null,8,ft)],4))}});function ht(t){const{containerEl:n,sliderEl:l,autoHeight:o,performance:r={},maxHeightRatio:i=.9}=t,a=e.ref(!0),f=ve(N,100);let h,c="";const p=e.ref(0),d=e.ref(0),u=e.ref(0),s=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),w=e.ref({clientHeight:0}),b=e.computed(()=>!!d.value),_=e.computed(()=>s.value.scrollHeight>s.value.clientHeight),y=e.computed(()=>s.value.clientHeight-w.value.clientHeight),T=e.computed(()=>s.value.scrollHeight-s.value.clientHeight),B=e.computed(()=>Math.max(s.value.clientHeight/s.value.scrollHeight,.05)),L=e.computed(()=>B.value>i?0:B.value*s.value.clientHeight),F=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${u.value}px,0)`,height:o?`${L.value}px`:void 0}));function V($){A(),d.value=$.clientY-l.value.getBoundingClientRect().top||1,c=getComputedStyle(n.value).scrollBehavior,c==="smooth"&&(n.value.style.scrollBehavior="unset")}function k(){n.value.style.scrollBehavior=c,d.value=0,f()}function A(){a.value=!1}function N(){b.value||(a.value=!0)}function z($){if(!b.value)return;let x=$.clientY-s.value.top-d.value;x<0?u.value=0:x>=y.value?u.value=y.value:u.value=x,n.value.scrollTo({top:u.value/y.value*T.value})}function I(){b.value||K()}function K(){cancelAnimationFrame(h),h=requestAnimationFrame(Q)}function Q(){n.value&&(p.value=r.scrollTop?.value??n.value.scrollTop,u.value=p.value/T.value*y.value)}function j($){let x="addEventListener";$==="add"?x="addEventListener":x="removeEventListener",l.value?.[x]("pointerdown",V,{passive:!0}),window[x]("pointermove",z,{passive:!0}),window[x]("pointerup",k,{passive:!0})}const W=new MutationObserver($=>{$.map(q=>q.oldValue).join().includes("height")&&g()});function g(){s.value.top=n.value?.getBoundingClientRect().top??0,s.value.scrollHeight=n.value?.scrollHeight??0,s.value.clientHeight=n.value?.clientHeight??0}function E(){A(),setTimeout(()=>{w.value.clientHeight=l.value?.clientHeight??0,N()},150)}function R($,x,q="dynamic-styles"){let H=document.getElementById(q);H||(H=document.createElement("style"),H.id=q,document.head.appendChild(H));const G=H.sheet.cssRules,X=G.length,m=`${$} { ${x} }`;for(let v=0;v<X;v++){const O=G[v];if(O.selectorText===$&&O.style.cssText===x)return}H.sheet.insertRule(m,X)}function D(){n.value&&l.value?(R(".hide-scrollbar","scrollbar-width: none; -ms-overflow-style: none;"),R(".hide-scrollbar::-webkit-scrollbar","display: none"),n.value.classList.add("hide-scrollbar"),n.value.addEventListener("scroll",I,{passive:!0}),j("add"),W.observe(n.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{g()},100),E()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:n,sliderEl:l})}return e.watch(p,()=>{A(),f()}),{isScrollEnd:a,isDragSlider:b,offsetTop:u,scrollTop:p,scrollable:_,sliderPos:F,init:D,modifySliderEventListener:j}}const mt=(t=>(e.pushScopeId("data-v-edec7292"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),gt=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(t,{expose:n}){const l=t,o=!!e.useSlots().default,r=e.ref(null),i=e.computed(()=>l.containerEl),a=ht({containerEl:i,sliderEl:r,autoHeight:o?l.autoHeight:!0,performance:l.performance}),{scrollable:f,isScrollEnd:h,sliderPos:c}=a,p=e.ref(!1),d=l.autoHide?e.computed(()=>p.value||!h.value):e.computed(()=>f.value);e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function u(){p.value=!0}function s(){p.value=!1}return n({uScrollBarReturn:a}),(w,b)=>(e.openBlock(),e.createBlock(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"sliderRef",ref:r,class:"slider-wrapper",onMouseenter:u,onMouseleave:s,style:e.normalizeStyle(e.unref(c))},[e.renderSlot(w.$slots,"default",{},()=>[mt],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),Yt="",vt=M(gt,[["__scopeId","data-v-edec7292"]]),_t=t=>(e.pushScopeId("data-v-09f2db7d"),t=t(),e.popScopeId(),t),yt={class:"pull-refresh"},Et={key:0,class:"pull-arrow-circle"},St={key:0,class:"box-load"},wt={class:"left-load"},bt={class:"right-load"},Ct=_t(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),Tt={class:"pull-arrow"},Bt={key:1},Lt=e.defineComponent({__name:"PullRefresh",props:{refresh:null,refreshOff:{type:Boolean,default:!1},scrollTop:null,pullRefreshContainer:null},setup(t){const n=t,l="#2EC1CC",o=e.ref(-999),r=e.ref(1),i=e.ref(0),a=e.ref(.3),f=e.ref(!1),h=e.ref(0),c=e.ref(0),p=e.ref(0),d=e.ref(0),u=e.ref(0),s=e.ref(),w=e.computed(()=>n.scrollTop),b=e.computed(()=>({transition:`${d.value}ms`,transform:`translate3d(0,${o.value}px, 0) scale(${r.value})`})),_=e.computed(()=>({borderColor:l,transition:d.value,transform:`rotate(${100+i.value}deg)`,opacity:a.value}));e.watch(u,L=>{L===0&&(o.value=-50,a.value=.3)}),e.watch(c,L=>{u.value!==2&&(L===0&&(o.value=-50),L<=50&&L>0&&(o.value=L-45,i.value=Math.pow(L,1.5),L>15?f.value=!0:f.value=!1),L>50&&(o.value=5,a.value=1,u.value))});const y=L=>{n.refreshOff||!n?.refresh||u.value!==2&&w.value===0&&(h.value===0&&(h.value=L.touches[0].pageY),p.value=0,B.value.style.transition=`${p.value}ms`,d.value=0,c.value=L.touches[0].pageY-h.value,B.value.style.transform=`translate3d(0, ${c.value}px, 0)`)},T=()=>{n.refreshOff||!n?.refresh||u.value!==2&&(h.value=0,p.value=300,B.value.style.transition=`${p.value}ms`,c.value>50?(u.value=2,c.value=36,B.value.style.transform=`translate3d(0, ${c.value}px, 0)`,d.value=300,n?.refresh&&n?.refresh().then(()=>{s.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{s.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{u.value=0,c.value=0,B.value.style.transform=`translate3d(0, ${c.value}px, 0)`,setTimeout(()=>{s.value=void 0},d.value)},600)})):(c.value=0,B.value.style.transform=`translate3d(0, ${c.value}px, 0)`))},B=e.ref(null);return e.onMounted(()=>{B.value=document.querySelector(n.pullRefreshContainer),B.value.addEventListener("touchmove",y),B.value.addEventListener("touchend",T)}),(L,F)=>(e.openBlock(),e.createElementBlock("div",yt,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(b))},[s.value?(e.openBlock(),e.createElementBlock("div",Bt,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("div",Et,[u.value==2?(e.openBlock(),e.createElementBlock("div",St,[e.createElementVNode("div",wt,[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",Tt,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:f.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),Gt="",xt=M(Lt,[["__scopeId","data-v-09f2db7d"]]),$t={class:"virtualListWrapper"},Ot={inheritAttrs:!1},Dt=e.defineComponent({...Ot,__name:"VirtualList",props:{data:null,itemHeight:null,overscan:{default:10},refresh:null,refreshOff:{type:Boolean,default:!1}},emits:["scrollEnd"],setup(t,{expose:n,emit:l}){const o=t,r=Te(e.toRef(o,"data"),{itemHeight:d=>o.itemHeight(o.data[d]),overscan:o.overscan,scrollEndHook:()=>{l("scrollEnd")}}),{list:i,containerProps:a,wrapperProps:f,innerProps:h,getItemHeightData:c,scrollTop:p}=r;return n({vListReturn:r}),(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(xt,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(p),pullRefreshContainer:".virtualListWrapper"},null,8,["refresh","refreshOff","scrollTop"]),e.createElementVNode("div",$t,[e.createElementVNode("div",e.mergeProps({onScrollPassive:u[0]||(u[0]=(...s)=>e.unref(a).onScroll&&e.unref(a).onScroll(...s)),ref:e.unref(a).ref,class:"virtualList"},d.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(f))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(h))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),({index:s,data:w})=>(e.openBlock(),e.createElementBlock("div",{key:s,style:e.normalizeStyle({height:`${e.unref(c)(s).height}px`,display:"flex"})},[e.renderSlot(d.$slots,"default",{data:w,index:s},void 0,!0)],4))),128))],16)],16)],16)])],64))}}),Xt="",Rt=M(Dt,[["__scopeId","data-v-259e2930"]]),fe=t=>(e.pushScopeId("data-v-40e00f20"),t=t(),e.popScopeId(),t),It={style:{position:"absolute"}},kt=fe(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),Pt=["width","height"],Mt=[fe(()=>e.createElementVNode("title",null,"logo",-1)),fe(()=>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))],At=e.defineComponent({__name:"Loading",props:{width:{default:"90"},height:{default:"90"},duration:{default:1300}},setup(t){const n=t;e.useCssVars(o=>({"703ef503":l}));const l=`${n.duration}ms`;return(o,r)=>(e.openBlock(),e.createElementBlock("div",It,[kt,(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"},Mt,8,Pt))]))}}),en="",Ht=M(At,[["__scopeId","data-v-40e00f20"]]);S.BackgroundLoading=lt,S.DefaultLoading=it,S.Loading=Ht,S.ScrollBar=vt,S.SvgIcon=pt,S.ToastCreator=dt,S.VirtualList=Rt,S.allSelectedKey=le,S.closeDialogKey=Be,S.dialogController=Ze,S.isAllSelectedKey=ie,S.isSelectedKey=oe,S.selectAllKey=ae,S.selectKey=re,S.toggleAllKey=te,S.toggleKey=ne,S.unselectAllKey=ce,S.unselectKey=se,S.useDelayLoad=Je,S.useDragSelect=de,S.useDragSelectByMobile=Ye,S.useDragSelectByPc=Qe,S.useSelectable=Ue,S.useSelectableInjectors=qe,S.useVirtualList=Te,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E.ui={},E.Vue))})(this,function(E,e){"use strict";var he;const Z=typeof window<"u",me=t=>typeof t=="function";Z&&((he=window?.navigator)==null?void 0:he.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Y(t){return typeof t=="function"?t():e.unref(t)}function ge(t,n){function o(...l){t(()=>n.apply(this,l),{fn:n,thisArg:this,args:l})}return o}function De(t,n={}){let o,l;return s=>{const a=Y(t),u=Y(n.maxWait);if(o&&clearTimeout(o),a<=0||u!==void 0&&u<=0)return l&&(clearTimeout(l),l=null),s();u&&!l&&(l=setTimeout(()=>{o&&clearTimeout(o),l=null,s()},u)),o=setTimeout(()=>{l&&clearTimeout(l),l=null,s()},a)}}function Re(t,n=!0,o=!0){let l=0,r,s=!0;const a=()=>{r&&(clearTimeout(r),r=void 0)};return h=>{const f=Y(t),p=Date.now()-l;if(a(),f<=0)return l=Date.now(),h();p>f&&(o||!s)?(l=Date.now(),h()):n&&(r=setTimeout(()=>{l=Date.now(),s=!0,a(),h()},f)),!o&&!r&&(r=setTimeout(()=>s=!0,f)),s=!1}}function Ie(t){return t}function ke(t,n){let o,l,r;const s=e.ref(!0),a=()=>{s.value=!0,r()};e.watch(t,a,{flush:"sync"});const u=me(n)?n:n.get,h=me(n)?void 0:n.set,f=e.customRef((p,d)=>(l=p,r=d,{get(){return s.value&&(o=u(),s.value=!1),l(),o},set(c){h?.(c)}}));return Object.isExtensible(f)&&(f.trigger=a),f}function ve(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function _e(t,n=200,o={}){return ge(De(n,o),t)}function ye(t,n=200,o=!1,l=!0){return ge(Re(n,o,l),t)}function Ee(t,n=!0){e.getCurrentInstance()?e.onMounted(t):n?t():e.nextTick(t)}function Se(t){var n;const o=Y(t);return(n=o?.$el)!=null?n:o}const Me=Z?window:void 0,Pe=Z?window.document:void 0;function Ae(t,n=!1){const o=e.ref(),l=()=>o.value=Boolean(t());return l(),Ee(l,n),o}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ee="__vueuse_ssr_handlers__";J[ee]=J[ee]||{},J[ee];function He(){const t=e.getCurrentInstance(),n=ke(()=>null,()=>t.proxy.$el);return e.onUpdated(n.trigger),e.onMounted(n.trigger),n}var we=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,Ne=(t,n)=>{var o={};for(var l in t)Fe.call(t,l)&&n.indexOf(l)<0&&(o[l]=t[l]);if(t!=null&&we)for(var l of we(t))n.indexOf(l)<0&&Ve.call(t,l)&&(o[l]=t[l]);return o};function ze(t,n,o={}){const l=o,{window:r=Me}=l,s=Ne(l,["window"]);let a;const u=Ae(()=>r&&"ResizeObserver"in r),h=()=>{a&&(a.disconnect(),a=void 0)},f=e.watch(()=>Se(t),d=>{h(),u.value&&r&&d&&(a=new ResizeObserver(n),a.observe(d,s))},{immediate:!0,flush:"post"}),p=()=>{h(),f()};return ve(p),{isSupported:u,stop:p}}function je(t,n={width:0,height:0},o={}){const{box:l="content-box"}=o,r=e.ref(n.width),s=e.ref(n.height);return ze(t,([a])=>{const u=l==="border-box"?a.borderBoxSize:l==="content-box"?a.contentBoxSize:a.devicePixelContentBoxSize;u?(r.value=u.reduce((h,{inlineSize:f})=>h+f,0),s.value=u.reduce((h,{blockSize:f})=>h+f,0)):(r.value=a.contentRect.width,s.value=a.contentRect.height)},o),e.watch(()=>Se(t),a=>{r.value=a?n.width:0,s.value=a?n.height:0}),{width:r,height:s}}var be;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(be||(be={}));let Ke=0;function We(t,n={}){const o=e.ref(!1),{document:l=Pe,immediate:r=!0,manual:s=!1,id:a=`vueuse_styletag_${++Ke}`}=n,u=e.ref(t);let h=()=>{};const f=()=>{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&&(h=e.watch(u,c=>{d.innerText=c},{immediate:!0}),o.value=!0)},p=()=>{!l||!o.value||(h(),l.head.removeChild(l.getElementById(a)),o.value=!1)};return r&&!s&&Ee(f),s||ve(p),{id:a,css:u,unload:p,load:f,isLoaded:e.readonly(o)}}var Ue=Object.defineProperty,Ce=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Te=(t,n,o)=>n in t?Ue(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,Ye=(t,n)=>{for(var o in n||(n={}))qe.call(n,o)&&Te(t,o,n[o]);if(Ce)for(var o of Ce(n))Qe.call(n,o)&&Te(t,o,n[o]);return t};Ye({linear:Ie},{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 Be(t,n){const{scrollEndHook:o,itemHeight:l,overscan:r=5}=n,s=e.ref(null),a=je(s),u=e.ref(!0),h=_e(D,100);let f;const p=e.shallowRef(t),d=e.ref(0),c=e.ref({start:0,end:10});let i=0;const g=e.ref([]),b=e.computed(()=>{let{sum:v,height:w}={sum:0,height:0};return p.value.map((I,R)=>(typeof l=="number"?w=l:w=l(R),v+=w,{height:w,sum:v}))}),y=e.computed(()=>N(c.value.start)),S=e.computed(()=>typeof l=="number"?b.value.length*l:b.value[b.value.length-1]?.sum||0),T=e.computed(()=>{let v=g.value.length-r,w=Math.max(v-i,0);return g.value.slice(w,v)});e.onMounted(()=>{}),e.onUnmounted(()=>cancelAnimationFrame(f)),e.watch([a.width,a.height,p],([v,w])=>{(v||w)&&x()},{deep:!0}),e.watch(d,()=>{k(),h()});function k(){u.value=!1}function D(){u.value=!0,o?.()}function x(){cancelAnimationFrame(f),f=requestAnimationFrame($)}function $(){if(s.value){d.value=s.value.scrollTop,i=F();let v=P(d.value),w=v+i+r;v=v-r,v=v<0?0:v,w=w>p.value.length?p.value.length:w,c.value={start:v,end:w},g.value=p.value.slice(v,w).map((I,R)=>({data:I,index:R+v}))}}function P(v){let w=0,I=b.value.length-1,R=-1;for(;w<=I;){const L=Math.floor((w+I)/2);b.value[L].sum>=v?(R=L,I=L-1):w=L+1}return Math.max(0,R)}function F(){let v=0,w=0,I=M();for(let R=I;R<b.value.length&&(v++,w+=b.value[R].height,!(w>=a.height.value));R++);return v}function N(v){if(typeof l=="number")return v*l;let w=b.value[v];return w?w.sum-w.height:0}function z(v){return b.value[v]||{sum:0,height:0}}function M(){let v=c.value.start;return v>=r&&(v+=r),v}function K(v){if(s.value){const w=z(v);s.value.scrollTop=w.sum-w.height,$()}}const Q=e.computed(()=>({style:{width:"100%",height:`${S.value}px`,pointerEvents:u.value?void 0:"none"}})),j=e.computed(()=>({style:{transform:`translate3d(0, ${y.value}px, 0)`,"will-change":"transform"}})),W={overflowY:"auto"};return{list:g,visiableList:T,getItemHeightData:z,getoffsetTopIndex:P,totalHeight:S,clientHeight:a.height,scrollTo:K,scrollTop:d,isScrollEnd:u,containerProps:{ref:s,onScroll:()=>{x()},style:W},wrapperProps:Q,innerProps:j}}const te=Symbol(),ne=Symbol(),oe=Symbol(),le=Symbol(),re=Symbol(),ae=Symbol(),se=Symbol(),ie=Symbol(),ce=Symbol();function Ge(){const{voidFn:t,boolFn:n,boolRef:o,arrayRef:l}={voidFn:i=>{},boolFn:i=>!1,boolRef:e.computed(()=>!1),arrayRef:e.computed(()=>[])},r=e.inject(le,l),s=e.inject(oe,n),a=e.inject(ie,o),u=e.inject(ne,t),h=e.inject(te,t),f=e.inject(re,t),p=e.inject(ae,t),d=e.inject(se,t),c=e.inject(ce,t);return{selected:r,isSelected:s,isAllSelected:a,toggle:u,toggleAll:h,select:f,selectAll:p,unselect:d,unselectAll:c}}function Xe(t,n){const o=e.ref({}),l=e.computed(()=>t.value.filter(c=>o.value[c[n]])),r=e.computed(()=>l.value.length!=0&&Object.keys(o.value).length==t.value.length);function s(){t.value.forEach(c=>{o.value[c[n]]=!0})}function a(){o.value={}}function u(c){c.forEach(i=>{o.value[i[n]]||(o.value[i[n]]=!0)})}function h(c){c.forEach(i=>{o.value[i[n]]&&delete o.value[i[n]]})}function f(c){return!!o.value[c[n]]}function p(c){c.forEach(i=>{f(i)?delete o.value[i[n]]:o.value[i[n]]=!0})}function d(){r.value?a():s()}return e.provide(te,d),e.provide(ne,p),e.provide(oe,f),e.provide(le,l),e.provide(re,u),e.provide(ae,s),e.provide(se,h),e.provide(ie,r),e.provide(ce,a),{selected:l,select:u,selectAll:s,unselect:h,unselectAll:a,toggle:p,toggleAll:d,isSelected:f,isAllSelected:r}}function ue(t){return()=>{console.debug(`\u9ED8\u8BA4${t}\u65B9\u6CD5,\u9700\u8981\u81EA\u5B9A\u4E49\u751F\u6548`)}}function de({attribute:t,selectWay:n="colum",scrollOptions:o={},getSelectMap:l=()=>({})}){const{select:r=ue("\u9009\u62E9"),unselect:s=ue("\u53D6\u6D88\u9009\u62E9"),unselectAll:a=ue("\u53D6\u6D88\u5168\u9009")}=l();let u={};const h=e.computed(()=>ye(n==="colum"?V:G,50)),f=new Set,p=e.ref(!0),d=e.ref(),c=e.ref(!1),i=e.ref({x:0,y:0}),g=e.ref({x:0,y:0,scrollTop:0}),b=new ResizeObserver(m=>y.value=m[0].target.getBoundingClientRect()),y=e.ref({}),S=e.ref({top:0,height:0,sync(m=!1){S.value.top=d.value?.scrollTop||0,m&&(S.value.height=d.value?.scrollHeight||0)}}),T=e.computed(()=>c.value?{left:Math.min(i.value.x,g.value.x)-y.value.left,top:Math.min(i.value.y,g.value.y)-y.value.top,width:Math.abs(i.value.x-g.value.x),height:Math.abs(i.value.y-g.value.y)}:{left:0,top:0,width:0,height:0}),{margin:k=50,startSpeed:D=30,maxSpeed:x=30}=o;let $;const P=k,F=D,N=x,z=m=>m**1;let M=0;function K(m){if(cancelAnimationFrame($),M=Q(m),M=Math.max(Math.min(M,N),-N),M!==0){const _=d.value;if(!_||!c.value)return;const O=S.value.height-y.value.height;let C=S.value.top+Number(M);C=Math.min(Math.max(0,C),O),_.scrollTop=C,W(),$=requestAnimationFrame(()=>K(m))}}function Q(m){if(d.value){const O=y.value,C=O.bottom-m;if(C<P)return F*z(1-C/P);const A=m-O.top;if(A<P)return-F*z(1-A/P)}return 0}function j(m){const _={...T.value,right:0,bottom:0};return _.left+=y.value.left,_.top+=y.value.top-S.value.top,_.right=_.width+_.left,_.bottom=_.height+_.top,_.left<m.right&&_.right>m.left&&_.top<m.bottom&&_.bottom>m.top}function W(){S.value.sync();const{top:m,height:_}=S.value;g.value.y=Math.min(_+y.value.top,g.value.y+m-g.value.scrollTop),g.value.scrollTop=m}function v(m,_,O="dynamic-styles"){let C=document.getElementById(O);C||(C=document.createElement("style"),C.id=O,document.head.appendChild(C));const A=C.sheet.cssRules,q=A.length,Nt=`${m} { ${_} }`;for(let pe=0;pe<q;pe++){const Oe=A[pe];if(Oe.selectorText===m&&Oe.style.cssText===_)return}C.sheet.insertRule(Nt,q)}function w(m,_){p.value=!0,c.value=!0,S.value.height?S.value.sync():S.value.sync(!0),i.value.x=m,i.value.y=_+S.value.top,g.value.x=i.value.x,g.value.y=i.value.y,d.value?.classList.add("disable-scroll-behavior"),f.clear()}function I(m,_,O){!c.value||(p.value&&n==="colum"&&!B()&&(a(),p.value=!1),O?.(),K(_),g.value.x=Math.max(m,y.value.left),g.value.y=Math.min(_+S.value.top,S.value.height+y.value.top),g.value.scrollTop=S.value.top,h.value())}function R(){c.value=!1,d.value?.classList.remove("disable-scroll-behavior")}function L(){!c.value||(M||W(),h.value())}function B(){if(!c.value)return!1;const{width:m,height:_}=T.value;return!(Math.max(m,_)>5)}function U(){B()&&a()}function V(){B()||d.value?.querySelectorAll(`[${t}]`).forEach(m=>{u[`${t}`]=m.getAttribute(`${t}`),j(m.getBoundingClientRect())?r([u]):s([u])})}function G(){const m=[];let _=null,O=0;d.value?.querySelectorAll(`[${t}]`).forEach((C,A)=>{const q=C.getAttribute(`${t}`);m.push(q),j(C.getBoundingClientRect())?(_===null&&(_=A),_=Math.min(_,A),O=Math.max(O,A)):(u[`${t}`]=q,f.has(q)&&s([u]))});for(let C=_;C<O+1;C++)u[`${t}`]=m[C],r([u]),f.add(m[C])}function X(m){return!m?.value||(d.value=m.value,!d?.value)?!1:(b.observe(d.value),v(".disable-scroll-behavior","scroll-behavior: unset !important;"),!0)}return{init:X,dragStart:w,dragMove:I,dragEnd:R,onScroll:L,isSingleClick:B,cancelSelectAllBySingleClick:U,selectFn:h,selectRange:T,isPressing:c,containerEl:d,observer:b}}function Ze(t){const n=de(t),{observer:o,selectRange:l}=n,{onScroll:r,dragStart:s,dragMove:a,dragEnd:u,cancelSelectAllBySingleClick:h}=n,f=e.computed(()=>({left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`})),p=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"absolute z-50 bg-blue-200 opacity-50",style:f.value})}});function d(y){y.button===0&&s(y.x,y.y)}function c(y){a(y.x,y.y)}function i(y){y.composedPath().some(T=>T?.getAttribute?.(t.attribute))||h(),u()}function g(y){try{if(!n.init(y))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!n.containerEl?.value)return!1;e.render(e.h(p),n.containerEl.value),n.containerEl.value?.addEventListener("scroll",r),n.containerEl.value?.addEventListener("mousedown",d),window.addEventListener("mousemove",c),window.addEventListener("mouseup",i)}catch(S){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",S)}}function b(){o.disconnect(),n.containerEl.value?.removeEventListener("scroll",r),n.containerEl.value?.removeEventListener("mousedown",d),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",i)}return{init:g,unMount:b}}function Je(t,n,o=600){const l=de({...t,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:r}=l,{onScroll:s,dragStart:a,dragMove:u,dragEnd:h}=l;let f;function p(){clearTimeout(f)}function d(y){p(),y.composedPath().some(T=>!!T?.getAttribute?.(t.attribute))&&(f=setTimeout(()=>{const{clientX:T,clientY:k}=y.targetTouches[0];a(T,k),n?.(),u(T,k,()=>y.preventDefault()),y.preventDefault()},o))}function c(y){p();const{clientX:S,clientY:T}=y.targetTouches[0];u(S,T,()=>y.preventDefault())}function i(){p(),h()}function g(y){try{if(!l.init(y))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",c),window.addEventListener("touchcancel",i),window.addEventListener("touchend",i)}catch(S){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",S)}}function b(){r.disconnect(),l.containerEl.value?.removeEventListener("scroll",s),l.containerEl.value?.removeEventListener("touchstart",d),l.containerEl.value?.removeEventListener("touchmove",c),window.removeEventListener("touchcancel",i),window.removeEventListener("touchEnd",i)}return{init:g,unMount:b}}const Le=Symbol(),et=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(Le,()=>n("update:visiable",!1)),(r,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l,class:"lzc-modal"},[e.createElementVNode("div",{onClick:s[0]||(s[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",t.dialogClass])},[e.renderSlot(r.$slots,"default",{},void 0,!0)],2)])):e.createCommentVNode("",!0)]),_:3}))}}),jt="",H=(t,n)=>{const o=t.__vccOpts||t;for(const[l,r]of n)o[l]=r;return o},tt=H(et,[["__scopeId","data-v-e171c24d"]]);function nt(t){function n(o,l){const r=document.createElement("div"),s={setup(){return()=>e.h(tt,{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 ot({component:t,componentProps:n,delay:o=300}){const l=`${o}ms`,r=e.ref(!1),{load:s}=We(`@keyframes delayLoad {
|
|
2
|
+
to {
|
|
3
|
+
opacity: 1;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
.delay-load {
|
|
7
|
+
opacity: 0;
|
|
8
|
+
animation: delayLoad 0s ${l} forwards;
|
|
9
|
+
}`),a=e.defineComponent({setup(){const f=He();return e.onMounted(()=>{s(),f.value.classList.add("delay-load")}),()=>r.value&&e.h(t,n)}});function u(){r.value=!0}function h(){r.value=!1}return{LoadingComp:a,loading:r,load:u,unload:h}}const Kt="",lt={},rt={class:"wrapper"},at=[e.createElementVNode("div",{class:"loading"},null,-1)];function st(t,n){return e.openBlock(),e.createElementBlock("div",rt,at)}const it=H(lt,[["render",st]]),Ut="",ct={},ut=[(t=>(e.pushScopeId("data-v-9d3ce674"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"ldio-mm5gwljcryb"},[e.createElementVNode("div")],-1))];function dt(t,n){return e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(t.$attrs)),ut,16)}const ft=H(ct,[["render",dt],["__scopeId","data-v-9d3ce674"]]),pt=e.defineComponent({__name:"Toast",props:{message:null,position: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)`})),u=e.computed(()=>({width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",color:"white",fontSize:"14px"}));return e.nextTick(()=>{l.value=o.value.offsetWidth/2,r.value=o.value.offsetHeight/2}),(h,f)=>(e.openBlock(),e.createElementBlock("div",{id:"toastWrapper",ref_key:"toastWrapper",ref:o,class:"toastWrapper",style:e.normalizeStyle([e.unref(a),{zIndex:9999}])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(u))},[e.createElementVNode("span",null,e.toDisplayString(t.message),1)],4)],4))}}),Yt="",ht=H(pt,[["__scopeId","data-v-15ab4094"]]),xe={message:"\u61D2\u732B\u4E91 Yes!!!",position:"middle",duration:1500};class mt{options;container;constructor(n){this.options=n,this.container=document.createElement("div")}present(){const n=e.h(e.h(ht),{...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 gt=["xlink:href","fill","color"],vt=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"}));return(r,s)=>(e.openBlock(),e.createElementBlock("svg",{"aria-hidden":"",style:e.normalizeStyle(e.unref(l))},[e.createElementVNode("use",{"xlink:href":e.unref(o),fill:t.color,color:t.color},null,8,gt)],4))}});function _t(t){const{containerEl:n,sliderEl:o,autoHeight:l,performance:r={},maxHeightRatio:s=.9}=t,a=e.ref(!0),u=_e(N,100);let h,f="";const p=e.ref(0),d=e.ref(0),c=e.ref(0),i=e.ref({top:0,scrollTop:0,scrollHeight:0,clientHeight:0}),g=e.ref({clientHeight:0}),b=e.computed(()=>!!d.value),y=e.computed(()=>i.value.scrollHeight>i.value.clientHeight),S=e.computed(()=>i.value.clientHeight-g.value.clientHeight),T=e.computed(()=>i.value.scrollHeight-i.value.clientHeight),k=e.computed(()=>Math.max(i.value.clientHeight/i.value.scrollHeight,.05)),D=e.computed(()=>k.value>s?0:k.value*i.value.clientHeight),x=e.computed(()=>({willChange:"transform",transform:`translate3d(0,${c.value}px,0)`,height:l?`${D.value}px`:void 0}));function $(L){F(),d.value=L.clientY-o.value.getBoundingClientRect().top||1,f=getComputedStyle(n.value).scrollBehavior,f==="smooth"&&(n.value.style.scrollBehavior="unset")}function P(){n.value.style.scrollBehavior=f,d.value=0,u()}function F(){a.value=!1}function N(){b.value||(a.value=!0)}function z(L){if(!b.value)return;let B=L.clientY-i.value.top-d.value;B<0?c.value=0:B>=S.value?c.value=S.value:c.value=B,n.value.scrollTo({top:c.value/S.value*T.value})}function M(){b.value||K()}function K(){cancelAnimationFrame(h),h=requestAnimationFrame(Q)}function Q(){n.value&&(p.value=r.scrollTop?.value??n.value.scrollTop,c.value=p.value/T.value*S.value)}function j(L){let B="addEventListener";L==="add"?B="addEventListener":B="removeEventListener",o.value?.[B]("pointerdown",$,{passive:!0}),window[B]("pointermove",z,{passive:!0}),window[B]("pointerup",P,{passive:!0})}const W=new MutationObserver(L=>{L.map(U=>U.oldValue).join().includes("height")&&v()});function v(){i.value.top=n.value?.getBoundingClientRect().top??0,i.value.scrollHeight=n.value?.scrollHeight??0,i.value.clientHeight=n.value?.clientHeight??0}function w(){F(),setTimeout(()=>{g.value.clientHeight=o.value?.clientHeight??0,N()},150)}function I(L,B,U="dynamic-styles"){let V=document.getElementById(U);V||(V=document.createElement("style"),V.id=U,document.head.appendChild(V));const G=V.sheet.cssRules,X=G.length,m=`${L} { ${B} }`;for(let _=0;_<X;_++){const O=G[_];if(O.selectorText===L&&O.style.cssText===B)return}V.sheet.insertRule(m,X)}function R(){n.value&&o.value?(I(".hide-scrollbar","scrollbar-width: none; -ms-overflow-style: none;"),I(".hide-scrollbar::-webkit-scrollbar","display: none"),n.value.classList.add("hide-scrollbar"),n.value.addEventListener("scroll",M,{passive:!0}),j("add"),W.observe(n.value,{subtree:!0,attributeOldValue:!0,attributeFilter:["style"]}),setTimeout(()=>{v()},100),w()):console.error("useScrollBar:","\u521D\u59CB\u5316\u5931\u8D25!",{containerEl:n,sliderEl:o})}return e.watch(p,()=>{F(),u()}),{isScrollEnd:a,isDragSlider:b,offsetTop:c,scrollTop:p,scrollable:y,sliderPos:x,init:R,modifySliderEventListener:j}}const yt=(t=>(e.pushScopeId("data-v-edec7292"),t=t(),e.popScopeId(),t))(()=>e.createElementVNode("div",{class:"default-slider"},null,-1)),Et=e.defineComponent({__name:"ScrollBar",props:{containerEl:null,autoHide:{type:Boolean},autoHeight:{type:Boolean},performance:null},setup(t,{expose:n}){const o=t,l=!!e.useSlots().default,r=e.ref(null),s=e.computed(()=>o.containerEl),a=_t({containerEl:s,sliderEl:r,autoHeight:l?o.autoHeight:!0,performance:o.performance}),{scrollable:u,isScrollEnd:h,sliderPos:f}=a,p=e.ref(!1),d=o.autoHide?e.computed(()=>p.value||!h.value):e.computed(()=>u.value);e.onMounted(()=>{e.nextTick(()=>{a.init()})}),e.onUnmounted(()=>{a.modifySliderEventListener("remove")});function c(){p.value=!0}function i(){p.value=!1}return n({uScrollBarReturn:a}),(g,b)=>(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:i,style:e.normalizeStyle(e.unref(f))},[e.renderSlot(g.$slots,"default",{},()=>[yt],!0)],36),[[e.vShow,e.unref(d)]])]),_:3}))}}),Xt="",St=H(Et,[["__scopeId","data-v-edec7292"]]),wt=t=>(e.pushScopeId("data-v-9bfa9cae"),t=t(),e.popScopeId(),t),bt={class:"pull-refresh"},Ct={key:0,class:"pull-arrow-circle"},Tt={key:0,class:"box-load"},Bt={class:"left-load"},Lt={class:"right-load"},xt=wt(()=>e.createElementVNode("div",{class:"among-load"},null,-1)),$t={class:"pull-arrow"},Ot={key:1},Dt=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),u=e.ref(.3),h=e.ref(!1),f=e.ref(0),p=e.ref(0),d=e.ref(0),c=e.ref(0),i=e.ref(0),g=e.ref(),b=e.computed(()=>n.scrollTop),y=e.computed(()=>({transition:`${c.value}ms`,transform:`translate3d(0,${r.value}px, 0) scale(${s.value})`})),S=e.computed(()=>({borderColor:l,transition:c.value,transform:`rotate(${100+a.value}deg)`,opacity:u.value}));e.watch(i,x=>{x===0&&(r.value=-50,u.value=.3)}),e.watch(p,x=>{if(i.value===2)return;const $=Math.pow(x,o);$===0&&(r.value=-50),$<=50&&$>0&&(r.value=$-45,a.value=Math.pow($,1.5),$>15?h.value=!0:h.value=!1),$>50&&(r.value=5,u.value=1,i.value)});const T=x=>{n.refreshOff||!n?.refresh||i.value!==2&&b.value===0&&(f.value===0&&(f.value=x.touches[0].pageY),d.value=0,D.value.style.transition=`${d.value}ms`,c.value=0,p.value=x.touches[0].pageY-f.value,D.value.style.transform=`translate3d(0, ${Math.pow(p.value,o)}px, 0)`)},k=()=>{if(n.refreshOff||!n?.refresh||i.value===2)return;f.value=0,d.value=300;const x=Math.pow(p.value,o);D.value.style.transition=`${d.value}ms`,x>50?(i.value=2,p.value=Math.pow(50,1/o),D.value.style.transform=`translate3d(0, ${Math.pow(p.value,o)}px, 0)`,c.value=300,n?.refresh&&n?.refresh().then(()=>{g.value="\u5237\u65B0\u6210\u529F"}).catch(()=>{g.value="\u5237\u65B0\u5931\u8D25"}).finally(()=>{setTimeout(()=>{i.value=0,p.value=0,D.value.style.transform=`translate3d(0, ${Math.pow(p.value,o)}px, 0)`,setTimeout(()=>{g.value=void 0},c.value)},600)})):(p.value=0,D.value.style.transform=`translate3d(0, ${Math.pow(p.value,o)}px, 0)`)},D=e.ref(null);return e.onMounted(()=>{D.value=document.querySelector(n.pullRefreshContainer),D.value.addEventListener("touchmove",T),D.value.addEventListener("touchend",k)}),(x,$)=>(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("div",{class:"pull-refresh-box",style:e.normalizeStyle(e.unref(y))},[g.value?(e.openBlock(),e.createElementBlock("div",Ot,e.toDisplayString(g.value),1)):(e.openBlock(),e.createElementBlock("div",Ct,[i.value==2?(e.openBlock(),e.createElementBlock("div",Tt,[e.createElementVNode("div",Bt,[e.createElementVNode("div",{class:"left-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),e.createElementVNode("div",Lt,[e.createElementVNode("div",{class:"right-circle",style:e.normalizeStyle({backgroundColor:l})},null,4)]),xt])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"pull-circle-line",style:e.normalizeStyle(e.unref(S))},[e.createElementVNode("div",$t,[e.createElementVNode("div",{class:e.normalizeClass(["arrows",{opacity:h.value}]),style:e.normalizeStyle({borderBottomColor:l})},null,6)])],4))]))],4)]))}}),Zt="",$e=H(Dt,[["__scopeId","data-v-9bfa9cae"]]),Rt={inheritAttrs:!1},It=e.defineComponent({...Rt,__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=Be(e.toRef(l,"data"),{itemHeight:c=>l.itemHeight(l.data[c]),overscan:l.overscan,scrollEndHook:()=>{o("scrollEnd")}}),{list:s,containerProps:a,wrapperProps:u,innerProps:h,getItemHeightData:f,scrollTop:p}=r;n({vListReturn:r});const d="virtualListWrapper"+new Date().getTime();return(c,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode($e,{refresh:t.refresh,refreshOff:t.refreshOff,scrollTop:e.unref(p),pullRefreshContainer:"#"+d},null,8,["refresh","refreshOff","scrollTop","pullRefreshContainer"]),e.createElementVNode("div",{class:"virtualListWrapper",id:d},[e.createElementVNode("div",e.mergeProps({onScrollPassive:i[0]||(i[0]=(...g)=>e.unref(a).onScroll&&e.unref(a).onScroll(...g)),ref:e.unref(a).ref,class:"virtualList"},c.$attrs),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(u))),[e.createElementVNode("div",e.normalizeProps(e.guardReactiveProps(e.unref(h))),[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),({index:g,data:b})=>(e.openBlock(),e.createElementBlock("div",{key:g,style:e.normalizeStyle({height:`${e.unref(f)(g).height}px`,display:"flex"})},[e.renderSlot(c.$slots,"default",{data:b,index:g},void 0,!0)],4))),128))],16)],16)],16)])],64))}}),Jt="",kt=H(It,[["__scopeId","data-v-e0fb787f"]]),fe=t=>(e.pushScopeId("data-v-40e00f20"),t=t(),e.popScopeId(),t),Mt={style:{position:"absolute"}},Pt=fe(()=>e.createElementVNode("div",{class:"wrapper"},null,-1)),At=["width","height"],Ht=[fe(()=>e.createElementVNode("title",null,"logo",-1)),fe(()=>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(t){const n=t;e.useCssVars(l=>({"703ef503":o}));const o=`${n.duration}ms`;return(l,r)=>(e.openBlock(),e.createElementBlock("div",Mt,[Pt,(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"},Ht,8,At))]))}}),nn="",Vt=H(Ft,[["__scopeId","data-v-40e00f20"]]);E.BackgroundLoading=it,E.DefaultLoading=ft,E.Loading=Vt,E.PullRefresh=$e,E.ScrollBar=St,E.SvgIcon=vt,E.ToastCreator=mt,E.VirtualList=kt,E.allSelectedKey=le,E.closeDialogKey=Le,E.dialogController=nt,E.isAllSelectedKey=ie,E.isSelectedKey=oe,E.selectAllKey=ae,E.selectKey=re,E.toggleAllKey=te,E.toggleKey=ne,E.unselectAllKey=ce,E.unselectKey=se,E.useDelayLoad=ot,E.useDragSelect=de,E.useDragSelectByMobile=Je,E.useDragSelectByPc=Ze,E.useSelectable=Xe,E.useSelectableInjectors=Ge,E.useVirtualList=Be,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.lzc-modal[data-v-e171c24d]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.lzc-dialog[data-v-e171c24d]{margin:auto;display:flex;flex-direction:column}.wrapper{width:84px;height:72px;position:absolute;top:calc(50% - 36px);left:calc(50% - 42px);z-index:999999999;background-color:rgba(0,0,0,0,8);border-radius:8px;display:flex;justify-content:center;align-items:center}.loading{width:32px;height:32px;border-radius:50%;display:inline-block;border-top:3px solid #909090;border-right:3px solid transparent;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ldio-mm5gwljcryb[data-v-9d3ce674]{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.ldio-mm5gwljcryb div[data-v-9d3ce674]{box-sizing:content-box;position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);width:24px;height:24px;border:4px solid #ddd;border-top-color:transparent;border-radius:50%;animation:ldio-mm5gwljcryb-9d3ce674 1s linear infinite}@keyframes ldio-mm5gwljcryb-9d3ce674{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.loadingio-spinner-rolling-5kajof80q6w[data-v-9d3ce674]{width:100%;height:100%;display:inline-block;overflow:hidden;background:#ffffff}@keyframes slide-15ab4094{0%{opacity:1}to{opacity:0}}.animate-toastAnimation[data-v-15ab4094]{animation:slide-15ab4094 .3s linear}.v-leave-active[data-v-edec7292]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-edec7292]{opacity:0}.slider-wrapper[data-v-edec7292]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-edec7292]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.pull-refresh[data-v-
|
|
1
|
+
.lzc-modal[data-v-e171c24d]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.lzc-dialog[data-v-e171c24d]{margin:auto;display:flex;flex-direction:column}.wrapper{width:84px;height:72px;position:absolute;top:calc(50% - 36px);left:calc(50% - 42px);z-index:999999999;background-color:rgba(0,0,0,0,8);border-radius:8px;display:flex;justify-content:center;align-items:center}.loading{width:32px;height:32px;border-radius:50%;display:inline-block;border-top:3px solid #909090;border-right:3px solid transparent;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ldio-mm5gwljcryb[data-v-9d3ce674]{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.ldio-mm5gwljcryb div[data-v-9d3ce674]{box-sizing:content-box;position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);width:24px;height:24px;border:4px solid #ddd;border-top-color:transparent;border-radius:50%;animation:ldio-mm5gwljcryb-9d3ce674 1s linear infinite}@keyframes ldio-mm5gwljcryb-9d3ce674{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.loadingio-spinner-rolling-5kajof80q6w[data-v-9d3ce674]{width:100%;height:100%;display:inline-block;overflow:hidden;background:#ffffff}@keyframes slide-15ab4094{0%{opacity:1}to{opacity:0}}.animate-toastAnimation[data-v-15ab4094]{animation:slide-15ab4094 .3s linear}.v-leave-active[data-v-edec7292]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-edec7292]{opacity:0}.slider-wrapper[data-v-edec7292]{z-index:100;position:absolute;right:0;touch-action:none}.default-slider[data-v-edec7292]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.pull-refresh[data-v-9bfa9cae]{position:relative}.pull-refresh-box[data-v-9bfa9cae]{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-9bfa9cae]{position:relative;width:30px;height:30px;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center}.box-load[data-v-9bfa9cae]{position:relative;width:18px;height:18px;border-radius:50%;overflow:hidden;animation:boxs-9bfa9cae 3s infinite linear forwards}@keyframes boxs-9bfa9cae{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.left-load[data-v-9bfa9cae]{position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.left-circle[data-v-9bfa9cae]{position:absolute;width:9px;height:18px;border-radius:18px 0 0 18px;transform:rotate(-180deg);transform-origin:9px 9px;animation:pr1A-9bfa9cae 3s infinite linear forwards}@keyframes pr1A-9bfa9cae{0%{transform:rotate(-180deg)}25%{transform:rotate(-180deg)}50%{transform:rotate(0)}75%{transform:rotate(0)}to{transform:rotate(180deg)}}.right-load[data-v-9bfa9cae]{left:9px;position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.right-circle[data-v-9bfa9cae]{position:absolute;width:9px;height:18px;border-radius:0 18px 18px 0;transform:rotate(-180deg);transform-origin:0px 9px;animation:pr2A-9bfa9cae 3s infinite linear forwards}@keyframes pr2A-9bfa9cae{0%{transform:rotate(-180deg)}25%{transform:rotate(0)}50%{transform:rotate(0)}75%{transform:rotate(180deg)}to{transform:rotate(180deg)}}.among-load[data-v-9bfa9cae]{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-9bfa9cae]{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-9bfa9cae]{position:absolute;left:-3px;transform:rotate(120deg);background-color:#fff;width:4px;height:6px}.arrows[data-v-9bfa9cae]{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-9bfa9cae]{opacity:1}.left-item[data-v-9bfa9cae]{text-align:center;height:100px;line-height:100px;color:#333}.left-item-active[data-v-9bfa9cae]{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-40e00f20{to{transform:rotate(360deg);-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg)}}.wrapper[data-v-40e00f20]{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-40e00f20 var(--703ef503) linear infinite}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export { default as SvgIcon } from "./svgIcon/SvgIcon.vue";
|
|
|
9
9
|
export { default as ScrollBar } from "./scroll-bar";
|
|
10
10
|
export { default as VirtualList } from "./useVirtualList/VirtualList.vue";
|
|
11
11
|
export { default as Loading } from "./components/Loading.vue";
|
|
12
|
+
export { default as PullRefresh } from "./useVirtualList/PullRefresh.vue";
|