@soei/flyweight 0.3.9 → 0.3.10
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/Flyweight.cjs +1 -1
- package/Flyweight.js +20 -20
- package/package.json +1 -1
- package/style.css +1 -1
- package/vue2/index.cjs +1 -1
- package/vue2/index.js +1 -1
- package/vue2/style.css +1 -1
package/Flyweight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@soei/util"),r=require("vue"),p=require("@soei/tools"),ne=require("@soei/picker");let oe=/(\d+|[+\-\*/]|%)/g,I={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,i)=>parseFloat(e)/100*i},V=(e,t)=>{let i;if(i=a.runer("match",e,oe)){let l=i.length,o,n=0,s,c=[];for(;l--;)n=i.shift(),n in I?(o&&c.push(o),n==="%"&&(c.length=2),s=n):+n&&c.push(+n),c.length==2&&(c.push(t),o=I[s].apply(null,c),c.length=0);+o||(o=+c.pop()),e=o>>0}return e},j={},S=(e,t)=>(e+"").replace(/\w+\((.*)\)/g,"$1").replace(j[t]||(j[t]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");const C=(e,t)=>{const i=e.__vccOpts||e;for(const[l,o]of t)i[l]=o;return i};let D=e=>e==null||e==null,he=(...e)=>{console.info("::::FLYWEIGHT",...e)};const ae={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:[String,Number],default:0},height:{type:[String,Number],default:100},w:{type:[Number,String]},h:{type:[Number,String]},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>({id:0})},index:{type:Number,default:0},top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null},padding:{type:Boolean,default:!1}},computed:{flyweight(){return this.$refs.flyweight||""},style(){var e=this.w,t=this.h,i=this.Size,l={};return a.merge(l,{"--width":S(this.realW),"--height":S(this.realH),"--flyweight-content":S(i)},t&&{"--flyweight-h":S(t)},e&&l,{"--flyweight-w":S(e)},"mix"),l}},data(){return{flyweights:[],actice:!1,Size:null,column:1,row:1,expand:10,count:0,task:[],realW:0,realH:0}},watch:{flys(e){this.count=e.length,this.rebuild();let t=this.task.shift();t&&this.$nextTick(()=>{this.setview(t)})},view:{handler(e){this.setview(e)},immediate:!0,deep:!0},index(e){this.setindex(e)},top(e){this.flyweight.scrollTop=e},left(e){this.flyweight.scrollLeft=e}},mounted(){this.flyweights=[],this.$set||(this.$set=(e,t,i)=>{e[t]=i}),this.setindex(this.index);try{new ResizeObserver(()=>{this.rebuild(),this.$emit("resize")}).observe(this.flyweight)}catch(e){he(e)}this.scrollx=a.runer("hasAttribute",this.flyweight,"scroll-x"),this.BoxRule="clientHeight=>height,clientWidth=>width",this.direction=this.scrollx?"scrollLeft":"scrollTop"},methods:{exec:S,trigger(e,t){a.isArray(e)||(e=e&&t?[[e,t]]:[]),e.length&&this.lazyrun(()=>{a.each(e,(i,l)=>{this.$emit(l[0],D(l[1])?!0:l[1])})})},cheackflys(e){if(!this.flys.length)return e&&this.task.push(e),!0},setview(e){a.runer([this.cheackflys,t=>{t=t||{};let i=t.index||a.each(this.flys,(l,o,n,s)=>{if(o[n]==s)return l},t.picker,t.id);D(i)||this.setindex(i)}],this,e)},setindex(e){a.runer([this.cheackflys,({index:t})=>{this.selectIndex=t,this.$nextTick(()=>{let i=t/this.column>>0,l=this.expand;(this.flyweight[this.direction]/l>>0)+this.row-i-1>0||(this.flyweight[this.direction]=i*l,this.scroll())})}],this,{index:e})},lazyrun(e,t){clearTimeout(this.time),this.time=setTimeout(()=>{a.runer(e)},t||this.lazy)},run(e){let t=[],i=a.runer(this.direction,e.target),l={offset:i,top:i,width:this.realW,height:this.realH,index:i/this.expand>>0};a.merge(l,this.space),e.from||t.push(["onscroll",l]);let o=!1;a.each(this.flyweights,(n,s,c,h,f,d,g,y,u)=>{if(c=n/f>>0,y=c+h*(+(c<d%h)+(d/h>>0)),u=y*f+n%f,u>=this.count){o||(t.push(["onend"]),o=!0);return}s.index=y,s.i=u,s.data=this.flys[u];let v=[y*this.expand+s.x,s.space];g&&v.reverse(),s.top=v[0],s.left=v[1]},null,this.row,this.column,l.index,this.scrollx),this.trigger(t),t=null},scroll(e){this.run(e||{target:this.flyweight,from:"space"})},rebuild(){let e=this.count||this.flys.length,t=this.flyweights;if(!e)return t.length=e;this.count=e;let i=this.scrollx,l=this.flyweight,o=a.picker(l,this.BoxRule);this.$nextTick(()=>{let n=/true/.test(this.auto),[s,c]=this.offset,h=o.width,f=o.height,d=(V(this.width,h)||h)+s,g=V(this.height,f)+c,y=[h/d>>0||1,f/g>>0||1];i&&y.reverse();let[u,v]=y,x=this.padding,T,k=0,m,w;i?(m=d,d-=s,w=b=>b*(g-c)+(b+1)*c):(n?(d=(h-s*(u+2*x-1))/u,T=!x*s,k=x*s):(T=0,k=(h%d+s*u)/(u+1)>>0,d-=s),w=b=>b*(d+T)+(b+1)*k,m=g),this.row=v+2,this.column=u,this.realH=g-c,this.realW=d,this.expand=m,this.Size=Math.ceil(e/u)*m;let $=Math.min(e,u*this.row),_=$-1,z;for(;$-- >0;)z=_-$,this.$set(t,z,{x:s,y:c,width:d,height:g-c,space:w(z%u),data:{}});t.length=_+1;let N=[];f/m>_/u&&N.push(["onend"]),this.flyweight&&(this.flyweight[this.direction]=0),this.$nextTick(()=>{this.setindex(this.selectIndex||0),this.scroll()}),N.push(["update:space",{row:(_/u>>0)+1,column:u,showrow:this.row,showcolumn:this.column}]),this.trigger(N)})}}},ce={class:"flyweight-all"};function ue(e,t,i,l,o,n){return r.openBlock(),r.createElementBlock("div",{ref:"flyweight",class:r.normalizeClass(["flyweight",{"flyweight-active":o.actice}]),style:r.normalizeStyle(n.style),onScroll:t[0]||(t[0]=(...s)=>n.scroll&&n.scroll(...s))},[r.createElementVNode("div",ce,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.flyweights,(s,c)=>(r.openBlock(),r.createElementBlock("div",{key:c,style:r.normalizeStyle({top:s.top+"px",left:s.left+"px"})},[r.renderSlot(e.$slots,"default",r.mergeProps({ref_for:!0},s),void 0,!0)],4))),128))]),o.flyweights.length?r.renderSlot(e.$slots,"end",{key:0},void 0,!0):r.createCommentVNode("",!0)],38)}const Y=C(ae,[["render",ue],["__scopeId","data-v-35b94e9b"]]);function A(e,t){return t&&(e=e.replace(/[a-z]/g,"")),e.toLowerCase()}let J={close:{handler(e){this.change(e)},deep:!0},offset:{handler(e){this.margin(e)},deep:!0}},de=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],K={};a.each(de,(e,t,i)=>{e=A(t),K["--"+A(t,!0)]=e,i[e]=function(){this.trigger++}},J);const fe={name:"Card",props:{offset:{type:[String,Array],default:()=>[0,0,0,0]},background:{type:String,default:""},border:{type:String,default:"1px"},height:{type:String,default:"100%"},width:{type:String,default:"100%"},show:{type:String,default:""},close:{type:Object,default:null},title:{type:String,default:""}},data(){return{closecss:{},trigger:0,default:{top:"0px",right:"0px",bottom:"0px",left:"0px",height:"100%",width:"100%",background:"",border:"1px"}}},computed:{style(){return this.tr()}},watch:J,methods:{exec:S,isEmpty:a.isEmpty,isSimplyType:a.isSimplyType,tr(){let e={};return this.margin(this.offset),a.each(K,(t,i)=>{this.css(e,t,i)}),e},tolower:A,css(e,t,i){let l=this[i]||this.default[i];!l||this.default[i]==l||(e[t]=S(l))},change(e){a.isSimplyType(e)||(this.closecss=a.picker(e,"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"))},margin(e){a.merge(this,a.picker(a.isString(e)?e.split(/\s*(?:,|\s+)\s*/):e,"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",!0),!0)}},mounted(){this.change(this.close)}},pe={class:"card-title"},ge=["title"],ye={class:"card-content"};function me(e,t,i,l,o,n){return r.openBlock(),r.createElementBlock("div",{class:"card",key:o.trigger,style:r.normalizeStyle(n.isEmpty(n.style)?n.tr():n.style)},[r.renderSlot(e.$slots,"default",{},()=>[r.renderSlot(e.$slots,"title",{},()=>{var s;return[r.createElementVNode("div",pe,[r.createTextVNode(r.toDisplayString(i.show||i.title)+" ",1),r.createElementVNode("div",{class:r.normalizeClass(["card-close",{hide:n.isSimplyType(i.close)?!i.close:!1}]),style:r.normalizeStyle(o.closecss),onClick:t[0]||(t[0]=c=>e.$emit("close")),title:(s=i.close)==null?void 0:s.tips},null,14,ge)])]},!0),r.renderSlot(e.$slots,"content",{},()=>[r.createElementVNode("div",ye,[r.renderSlot(e.$slots,"inner",{},void 0,!0)])],!0)],!0)],4)}const Q=C(fe,[["render",me],["__scopeId","data-v-2008eeb3"]]),we={name:"Stream",computed:{column(){let{columns:e,T:t}=this,i=e||t;return a.isEmpty(i)?[]:a.isArray(i)?i:[i]}},props:{bridge:{type:String,default:"slot"},type:{type:String,default:"div"},data:{type:Array,default:()=>[]},columns:{type:[Object,Array],default:()=>null},T:{type:[Array,Object],default:()=>null}},methods:{trigger(e){let t=e[this.bridge]||e.type;return(this.$slots||this.$scopedSlots)[t]?t:"default"}}};function _e(e,t,i,l,o,n){return r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.type),r.normalizeProps(r.guardReactiveProps(e.$attrs)),{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.column,s=>r.renderSlot(e.$slots,n.trigger(s),r.mergeProps({key:s.type},{ref_for:!0},s))),128))]),_:3},16)}const Z=C(we,[["render",_e]]),q=/(?:\,|\|{2})/,L="px",G="";let ee=document.documentElement,U,X=["s-left","s-top","s-right","s-bottom"],be={left:0,top:1,right:2,bottom:3};const W=[];var Se=ne(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let O={},te=null;Se(O,"delay",{get(){return this._delay},set(e){te=ve(()=>{p.runer(W)},e),this._delay=e}});O.delay=60;function ve(e,t){let i=0;return function(){const l=Date.now();l-i>=t&&(i=l,p.runer(e,this,arguments))}}const P=()=>{te()};function xe(e){W.push(e)}const E=new ResizeObserver(P);E.observe(ee);function ie(e){e.onresize||(W.push([ie,null,e]),e.onresize=!0);var t=ee,i=t.clientHeight,l=e.offset||15,o=e.target,n=e.room,s=e.index,c=e.position,h=o.getBoundingClientRect(),f=n.offsetHeight+l,d=n.offsetWidth+l,g="3,0,2,1".split(q),y,u=(h.height==U?h.bottom-h.top:h.height)>>0,v=(h.width==U?h.right-h.left:h.width)>>0,x=t.clientWidth-d,T=i-f,k=[h.left-d,h.top-f,x-h.right,T-h.bottom];c&&(p.each(c.split(q),function(se,M,H,le){le.push(H[M])},be,y=[]),g.unshift.apply(g,y)),s=p.each(g,function(se,M,H){if(H[M]>0)return M},k);var m=0,w=0,$=0;if(s!=null){var _=s==0||s==2,z=s==3||s==1;m=z?Math.min(h.left,x):s==2?h.right+l:k[0],f-=l*+_;var N=Math.max(h.top,0),b=Math.min(h.bottom,i),R=(b-f+Math.min(i-f,N))/2;w=Math.max(_?R:s==3?h.top+u+l:Math.min(R,k[1]),0),z&&h.left>x&&($=h.left-m-l+v/2)}let F=n.classList,B=e.css;F.remove(...X),F.add(X[s]),e.index=s,B.left=m+L,B.top=w+L,B["--tips-position-top"]=_?Math.max(l,Math.min((Math.min(w+f,b)+Math.max(w,N))/2-w+l/2,f-.5*l))+L:G,B["--tips-position-left"]=$?Math.min($,d-3*l)+L:G}const ke={name:"Tips",props:{visible:{type:[Boolean,String,Number],default:!0},content:{type:String,default:""},title:{type:[String,Number],default:""},position:{type:String,default:"top"},offset:{type:[String,Number],default:void 0},fontSize:{type:[String,Number],default:void 0},border:{type:[String,Number],default:void 0},color:{type:[String,Number],default:void 0},background:{type:[String,Number],default:void 0},static:{type:Boolean,default:!1},delay:{type:[String,Number],default:10}},watch:{visible:function(e){e&&this.$nextTick(()=>{this.init()})}},data(){return{css:{}}},methods:{parent(e){let t=this.$el,i;for(;t&&(t=t.parentNode,t&&t.nodeType==1||(t=window,i=!0),p.runer(e,null,t,i),!i););},attr(e,t,i){return p.runer(e[i===void 0?"getAttribute":"setAttribute"],e,t,i)},init(){this.$el.nodeName!="#comment"&&ie({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset})},scrollListener(){this.static||this.parent((e,t,i)=>{t?p.runer(e.addEventListener,e,"scroll",P):(p.runer(E.observe,E,e),(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&(i=this.attr(e,"-tips-scroll"),i||(p.runer(e.addEventListener,e,"scroll",P),this.attr(e,"-tips-scroll","true"))))})}},mounted(){a.merge(this.css,a.picker(this.$props,"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size")),this.init(),O.delay=+this.delay,xe(e=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(e,t){p.runer(e.removeEventListener,e,"scroll",P),p.runer(e.removeAttribute,e,"-tips-scroll",void 0),t||p.runer(E.unobserve,E,e)})}},$e=["static"],ze={class:"tips-title"};function Ne(e,t,i,l,o,n){return i.visible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"tips",style:i.static?null:o.css,static:i.static?"":null},e.$attrs),[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",ze,r.toDisplayString(i.title),1)],!0),r.renderSlot(e.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(i.content),1)],!0)],16,$e)):r.createCommentVNode("",!0)}const re=C(ke,[["render",Ne],["__scopeId","data-v-660ad090"]]),Te=[Y,Q,Z,re],Ee={install(e){Te.forEach(t=>{e.component("S"+t.name,t),e.component(t.name+"S",t)})}};exports.Card=Q;exports.Flyweight=Y;exports.Stream=Z;exports.Tips=re;exports.default=Ee;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@soei/util"),r=require("vue"),p=require("@soei/tools"),ne=require("@soei/picker");let oe=/(\d+|[+\-\*/]|%)/g,I={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,i)=>parseFloat(e)/100*i},V=(e,t)=>{let i;if(i=a.runer("match",e,oe)){let l=i.length,o,n=0,s,c=[];for(;l--;)n=i.shift(),n in I?(o&&c.push(o),n==="%"&&(c.length=2),s=n):+n&&c.push(+n),c.length==2&&(c.push(t),o=I[s].apply(null,c),c.length=0);+o||(o=+c.pop()),e=o>>0}return e},j={},S=(e,t)=>(e+"").replace(/\w+\((.*)\)/g,"$1").replace(j[t]||(j[t]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");const C=(e,t)=>{const i=e.__vccOpts||e;for(const[l,o]of t)i[l]=o;return i};let D=e=>e==null||e==null,he=(...e)=>{console.info("::::FLYWEIGHT",...e)};const ae={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:[String,Number],default:0},height:{type:[String,Number],default:100},w:{type:[Number,String]},h:{type:[Number,String]},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>({id:0})},index:{type:Number,default:0},top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null},padding:{type:Boolean,default:!1}},computed:{flyweight(){return this.$refs.flyweight||""},style(){var e=this.w,t=this.h,i=this.Size,l={};return a.merge(l,{"--width":S(this.realW),"--height":S(this.realH),"--flyweight-content":S(i)},t&&{"--flyweight-h":S(t)},e&&l,{"--flyweight-w":S(e)},"mix"),l}},data(){return{flyweights:[],actice:!1,Size:null,column:1,row:1,expand:10,count:0,task:[],realW:0,realH:0}},watch:{flys(e){this.count=e.length,this.rebuild();let t=this.task.shift();t&&this.$nextTick(()=>{this.setview(t)})},view:{handler(e){this.setview(e)},immediate:!0,deep:!0},index(e){this.setindex(e)},top(e){this.flyweight.scrollTop=e},left(e){this.flyweight.scrollLeft=e}},mounted(){this.flyweights=[],this.$set||(this.$set=(e,t,i)=>{e[t]=i}),this.setindex(this.index);try{new ResizeObserver(()=>{this.rebuild(),this.$emit("resize")}).observe(this.flyweight)}catch(e){he(e)}this.scrollx=a.runer("hasAttribute",this.flyweight,"scroll-x"),this.BoxRule="clientHeight=>height,clientWidth=>width",this.direction=this.scrollx?"scrollLeft":"scrollTop"},methods:{exec:S,trigger(e,t){a.isArray(e)||(e=e&&t?[[e,t]]:[]),e.length&&this.lazyrun(()=>{a.each(e,(i,l)=>{this.$emit(l[0],D(l[1])?!0:l[1])})})},cheackflys(e){if(!this.flys.length)return e&&this.task.push(e),!0},setview(e){a.runer([this.cheackflys,t=>{t=t||{};let i=t.index||a.each(this.flys,(l,o,n,s)=>{if(o[n]==s)return l},t.picker,t.id);D(i)||this.setindex(i)}],this,e)},setindex(e){a.runer([this.cheackflys,({index:t})=>{this.selectIndex=t,this.$nextTick(()=>{let i=t/this.column>>0,l=this.expand;(this.flyweight[this.direction]/l>>0)+this.row-i-1>0||(this.flyweight[this.direction]=i*l,this.scroll())})}],this,{index:e})},lazyrun(e,t){clearTimeout(this.time),this.time=setTimeout(()=>{a.runer(e)},t||this.lazy)},run(e){let t=[],i=a.runer(this.direction,e.target),l={offset:i,top:i,width:this.realW,height:this.realH,index:i/this.expand>>0};a.merge(l,this.space),e.from||t.push(["onscroll",l]);let o=!1;a.each(this.flyweights,(n,s,c,h,f,d,g,y,u)=>{if(c=n/f>>0,y=c+h*(+(c<d%h)+(d/h>>0)),u=y*f+n%f,u>=this.count){o||(t.push(["onend"]),o=!0);return}s.index=y,s.i=u,s.data=this.flys[u];let v=[y*this.expand+s.x,s.space];g&&v.reverse(),s.top=v[0],s.left=v[1]},null,this.row,this.column,l.index,this.scrollx),this.trigger(t),t=null},scroll(e){this.run(e||{target:this.flyweight,from:"space"})},rebuild(){let e=this.count||this.flys.length,t=this.flyweights;if(!e)return t.length=e;this.count=e;let i=this.scrollx,l=this.flyweight,o=a.picker(l,this.BoxRule);this.$nextTick(()=>{let n=/true/.test(this.auto),[s,c]=this.offset,h=o.width,f=o.height,d=(V(this.width,h)||h)+s,g=V(this.height,f)+c,y=[h/d>>0||1,f/g>>0||1];i&&y.reverse();let[u,v]=y,x=this.padding,T,k=0,m,w;i?(m=d,d-=s,w=_=>_*(g-c)+(_+1)*c):(n?(d=(h-s*(u+2*x-1))/u,T=!x*s,k=x*s):(T=0,k=(h%d+s*u)/(u+1)>>0,d-=s),w=_=>_*(d+T)+(_+1)*k,m=g),this.row=v+2,this.column=u,this.realH=g-c,this.realW=d,this.expand=m,this.Size=Math.ceil(e/u)*m;let $=Math.min(e,u*this.row),b=$-1,z;for(;$-- >0;)z=b-$,this.$set(t,z,{x:s,y:c,width:d,height:g-c,space:w(z%u),data:{}});t.length=b+1;let N=[];f/m>b/u&&N.push(["onend"]),this.flyweight&&(this.flyweight[this.direction]=0),this.$nextTick(()=>{this.setindex(this.selectIndex||0),this.scroll()}),N.push(["update:space",{row:(b/u>>0)+1,column:u,showrow:this.row,showcolumn:this.column}]),this.trigger(N)})}}},ce={class:"flyweight-all"};function ue(e,t,i,l,o,n){return r.openBlock(),r.createElementBlock("div",{ref:"flyweight",class:r.normalizeClass(["flyweight",{"flyweight-active":o.actice}]),style:r.normalizeStyle(n.style),onScroll:t[0]||(t[0]=(...s)=>n.scroll&&n.scroll(...s))},[r.createElementVNode("div",ce,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.flyweights,(s,c)=>(r.openBlock(),r.createElementBlock("div",{key:c,style:r.normalizeStyle({top:s.top+"px",left:s.left+"px"})},[r.renderSlot(e.$slots,"default",r.mergeProps({ref_for:!0},s),void 0,!0)],4))),128))]),o.flyweights.length?r.renderSlot(e.$slots,"end",{key:0},void 0,!0):r.createCommentVNode("",!0)],38)}const Y=C(ae,[["render",ue],["__scopeId","data-v-35b94e9b"]]);function A(e,t){return t&&(e=e.replace(/[a-z]/g,"")),e.toLowerCase()}let J={close:{handler(e){this.change(e)},deep:!0},offset:{handler(e){this.margin(e)},deep:!0}},de=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],K={};a.each(de,(e,t,i)=>{e=A(t),K["--"+A(t,!0)]=e,i[e]=function(){this.trigger++}},J);const fe={name:"Card",props:{offset:{type:[String,Array],default:()=>[0,0,0,0]},background:{type:String,default:""},border:{type:String,default:"1px"},height:{type:String,default:"100%"},width:{type:String,default:"100%"},show:{type:String,default:""},close:{type:Object,default:null},title:{type:String,default:""}},data(){return{closecss:{},trigger:0,default:{top:"0px",right:"0px",bottom:"0px",left:"0px",height:"100%",width:"100%",background:"",border:"1px"}}},computed:{style(){return this.tr()}},watch:J,methods:{exec:S,isEmpty:a.isEmpty,isSimplyType:a.isSimplyType,tr(){let e={};return this.margin(this.offset),a.each(K,(t,i)=>{this.css(e,t,i)}),e},tolower:A,css(e,t,i){let l=this[i]||this.default[i];!l||this.default[i]==l||(e[t]=S(l))},change(e){a.isSimplyType(e)||(this.closecss=a.picker(e,"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"))},margin(e){a.merge(this,a.picker(a.isString(e)?e.split(/\s*(?:,|\s+)\s*/):e,"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",!0),!0)}},mounted(){this.change(this.close)}},pe={class:"card-title"},ge=["title"],ye={class:"card-content"};function me(e,t,i,l,o,n){return r.openBlock(),r.createElementBlock("div",{class:"card",key:o.trigger,style:r.normalizeStyle(n.isEmpty(n.style)?n.tr():n.style)},[r.renderSlot(e.$slots,"default",{},()=>[r.renderSlot(e.$slots,"title",{},()=>{var s;return[r.createElementVNode("div",pe,[r.createTextVNode(r.toDisplayString(i.show||i.title)+" ",1),r.createElementVNode("div",{class:r.normalizeClass(["card-close",{hide:n.isSimplyType(i.close)?!i.close:!1}]),style:r.normalizeStyle(o.closecss),onClick:t[0]||(t[0]=c=>e.$emit("close")),title:(s=i.close)==null?void 0:s.tips},null,14,ge)])]},!0),r.renderSlot(e.$slots,"content",{},()=>[r.createElementVNode("div",ye,[r.renderSlot(e.$slots,"inner",{},void 0,!0)])],!0)],!0)],4)}const Q=C(fe,[["render",me],["__scopeId","data-v-2008eeb3"]]),we={name:"Stream",computed:{column(){let{columns:e,T:t}=this,i=e||t;return a.isEmpty(i)?[]:a.isArray(i)?i:[i]}},props:{bridge:{type:String,default:"slot"},type:{type:String,default:"div"},data:{type:Array,default:()=>[]},columns:{type:[Object,Array],default:()=>null},T:{type:[Array,Object],default:()=>null}},methods:{trigger(e){let t=e[this.bridge]||e.type;return(this.$slots||this.$scopedSlots)[t]?t:"default"}}};function be(e,t,i,l,o,n){return r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.type),r.normalizeProps(r.guardReactiveProps(e.$attrs)),{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.column,s=>r.renderSlot(e.$slots,n.trigger(s),r.mergeProps({key:s.type},{ref_for:!0},s))),128))]),_:3},16)}const Z=C(we,[["render",be]]),q=/(?:\,|\|{2})/,L="px",G="";let ee=document.documentElement,U,X=["s-left","s-top","s-right","s-bottom"],_e={left:0,top:1,right:2,bottom:3};const W=[];var Se=ne(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let O={},te=null;Se(O,"delay",{get(){return this._delay},set(e){te=ve(()=>{p.runer(W)},e),this._delay=e}});O.delay=60;function ve(e,t){let i=0;return function(){const l=Date.now();l-i>=t&&(i=l,p.runer(e,this,arguments))}}const P=()=>{te()};function xe(e){W.push(e)}const E=new ResizeObserver(P);E.observe(ee);function ie(e){e.onresize||(W.push([ie,null,e]),e.onresize=!0);var t=ee,i=t.clientHeight,l=e.offset||15,o=e.target,n=e.room,s=e.index,c=e.position,h=o.getBoundingClientRect(),f=n.offsetHeight+l,d=n.offsetWidth+l,g="3,0,2,1".split(q),y,u=(h.height==U?h.bottom-h.top:h.height)>>0,v=(h.width==U?h.right-h.left:h.width)>>0,x=t.clientWidth-d,T=i-f,k=[h.left-d,h.top-f,x-h.right,T-h.bottom];c&&(p.each(c.split(q),function(se,M,H,le){le.push(H[M])},_e,y=[]),g.unshift.apply(g,y)),s=p.each(g,function(se,M,H){if(H[M]>0)return M},k);var m=0,w=0,$=0;if(s!=null){var b=s==0||s==2,z=s==3||s==1;m=z?Math.min(h.left,x):s==2?h.right+l:k[0],f-=l*+b;var N=Math.max(h.top,0),_=Math.min(h.bottom,i),R=(_-f+Math.min(i-f,N))/2;w=Math.max(b?R:s==3?h.top+u+l:Math.min(R,k[1]),0),z&&h.left>x&&($=h.left-m-l+v/2)}let F=n.classList,B=e.css;F.remove(...X),F.add(X[s]),e.index=s,B.left=m+L,B.top=w+L,B["--tips-position-top"]=b?Math.max(l,Math.min((Math.min(w+f,_)+Math.max(w,N))/2-w+l/2,f-.5*l))+L:G,B["--tips-position-left"]=$?Math.min($,d-3*l)+L:G}const ke={name:"Tips",props:{visible:{type:[Boolean,String,Number],default:!0},content:{type:String,default:""},title:{type:[String,Number],default:""},position:{type:String,default:"top"},offset:{type:[String,Number],default:void 0},fontSize:{type:[String,Number],default:void 0},border:{type:[String,Number],default:void 0},color:{type:[String,Number],default:void 0},background:{type:[String,Number],default:void 0},static:{type:Boolean,default:!1},delay:{type:[String,Number],default:10}},watch:{visible:function(e){e&&this.$nextTick(()=>{this.init()})}},data(){return{css:{}}},methods:{parent(e){let t=this.$el,i;for(;t&&(t=t.parentNode,t&&t.nodeType==1||(t=window,i=!0),p.runer(e,null,t,i),!i););},attr(e,t,i){return p.runer(e[i===void 0?"getAttribute":"setAttribute"],e,t,i)},init(){this.$el.nodeName!="#comment"&&ie({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset})},scrollListener(){this.static||this.parent((e,t,i)=>{t?p.runer(e.addEventListener,e,"scroll",P):(p.runer(E.observe,E,e),(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&(i=this.attr(e,"-tips-scroll"),i||(p.runer(e.addEventListener,e,"scroll",P),this.attr(e,"-tips-scroll","true"))))})}},mounted(){a.merge(this.css,a.picker(this.$props,"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size")),this.init(),O.delay=+this.delay,xe(e=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(e,t){p.runer(e.removeEventListener,e,"scroll",P),p.runer(e.removeAttribute,e,"-tips-scroll",void 0),t||p.runer(E.unobserve,E,e)})}},$e=["static"],ze={class:"tips-title"};function Ne(e,t,i,l,o,n){return i.visible?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:"tips",style:i.static?null:o.css,static:i.static?"":null},e.$attrs),[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",ze,r.toDisplayString(i.title),1)],!0),r.renderSlot(e.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(i.content),1)],!0)],16,$e)):r.createCommentVNode("",!0)}const re=C(ke,[["render",Ne],["__scopeId","data-v-b1c3381c"]]),Te=[Y,Q,Z,re],Ee={install(e){Te.forEach(t=>{e.component("S"+t.name,t),e.component(t.name+"S",t)})}};exports.Card=Q;exports.Flyweight=Y;exports.Stream=Z;exports.Tips=re;exports.default=Ee;
|
package/Flyweight.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runer as T, merge as B, isArray as nt, each as H, picker as O, isEmpty as ot, isSimplyType as J, isString as
|
|
1
|
+
import { runer as T, merge as B, isArray as nt, each as H, picker as O, isEmpty as ot, isSimplyType as J, isString as _t } from "@soei/util";
|
|
2
2
|
import { openBlock as z, createElementBlock as M, normalizeClass as ht, normalizeStyle as I, createElementVNode as P, Fragment as at, renderList as ct, renderSlot as m, mergeProps as U, createCommentVNode as ut, createTextVNode as dt, toDisplayString as D, createBlock as xt, resolveDynamicComponent as vt, normalizeProps as St, guardReactiveProps as $t, withCtx as zt } from "vue";
|
|
3
3
|
import { runer as p, each as K } from "@soei/tools";
|
|
4
4
|
import kt from "@soei/picker";
|
|
@@ -17,7 +17,7 @@ let Nt = /(\d+|[+\-\*/]|%)/g, Q = {
|
|
|
17
17
|
+n || (n = +h.pop()), t = n >> 0;
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
|
-
}, tt = {},
|
|
20
|
+
}, tt = {}, _ = (t, e) => (t + "").replace(
|
|
21
21
|
/\w+\((.*)\)/g,
|
|
22
22
|
"$1"
|
|
23
23
|
).replace(
|
|
@@ -98,13 +98,13 @@ const Mt = {
|
|
|
98
98
|
style() {
|
|
99
99
|
var t = this.w, e = this.h, i = this.Size, r = {};
|
|
100
100
|
return B(r, {
|
|
101
|
-
"--width":
|
|
102
|
-
"--height":
|
|
103
|
-
"--flyweight-content":
|
|
101
|
+
"--width": _(this.realW),
|
|
102
|
+
"--height": _(this.realH),
|
|
103
|
+
"--flyweight-content": _(i)
|
|
104
104
|
}, e && {
|
|
105
|
-
"--flyweight-h":
|
|
105
|
+
"--flyweight-h": _(e)
|
|
106
106
|
}, t && r, {
|
|
107
|
-
"--flyweight-w":
|
|
107
|
+
"--flyweight-w": _(t)
|
|
108
108
|
}, "mix"), r;
|
|
109
109
|
}
|
|
110
110
|
},
|
|
@@ -162,7 +162,7 @@ const Mt = {
|
|
|
162
162
|
"clientHeight=>height,clientWidth=>width", this.direction = this.scrollx ? "scrollLeft" : "scrollTop";
|
|
163
163
|
},
|
|
164
164
|
methods: {
|
|
165
|
-
exec:
|
|
165
|
+
exec: _,
|
|
166
166
|
trigger(t, e) {
|
|
167
167
|
nt(t) || (t = t && e ? [[t, e]] : []), t.length && this.lazyrun(() => {
|
|
168
168
|
H(t, (i, r) => {
|
|
@@ -247,10 +247,10 @@ const Mt = {
|
|
|
247
247
|
let l = /true/.test(this.auto), [s, h] = this.offset, o = n.width, u = n.height, c = (Z(this.width, o) || o) + s, d = Z(this.height, u) + h, f = [o / c >> 0 || 1, u / d >> 0 || 1];
|
|
248
248
|
i && f.reverse();
|
|
249
249
|
let [a, x] = f, v = this.padding, L, S = 0, g, y;
|
|
250
|
-
i ? (g = c, c -= s, y = (
|
|
250
|
+
i ? (g = c, c -= s, y = (b) => (
|
|
251
251
|
/* 计算top偏移量 */
|
|
252
|
-
|
|
253
|
-
)) : (l ? (c = (o - s * (a + 2 * v - 1)) / a, L = !v * s, S = v * s) : (L = 0, S = (o % c + s * a) / (a + 1) >> 0, c -= s), y = (
|
|
252
|
+
b * (d - h) + (b + 1) * h
|
|
253
|
+
)) : (l ? (c = (o - s * (a + 2 * v - 1)) / a, L = !v * s, S = v * s) : (L = 0, S = (o % c + s * a) / (a + 1) >> 0, c -= s), y = (b) => b * (c + L) + (b + 1) * S, g = d), this.row = x + 2, this.column = a, this.realH = d - h, this.realW = c, this.expand = g, this.Size = Math.ceil(t / a) * g;
|
|
254
254
|
let $ = Math.min(t, a * this.row), w = $ - 1, k;
|
|
255
255
|
for (; $-- > 0; )
|
|
256
256
|
k = w - $, this.$set(e, k, {
|
|
@@ -395,7 +395,7 @@ const Wt = {
|
|
|
395
395
|
},
|
|
396
396
|
watch: ft,
|
|
397
397
|
methods: {
|
|
398
|
-
exec:
|
|
398
|
+
exec: _,
|
|
399
399
|
isEmpty: ot,
|
|
400
400
|
isSimplyType: J,
|
|
401
401
|
tr() {
|
|
@@ -407,7 +407,7 @@ const Wt = {
|
|
|
407
407
|
tolower: G,
|
|
408
408
|
css(t, e, i) {
|
|
409
409
|
let r = this[i] || this.default[i];
|
|
410
|
-
!r || this.default[i] == r || (t[e] =
|
|
410
|
+
!r || this.default[i] == r || (t[e] = _(r));
|
|
411
411
|
},
|
|
412
412
|
change(t) {
|
|
413
413
|
J(t) || (this.closecss = O(
|
|
@@ -419,7 +419,7 @@ const Wt = {
|
|
|
419
419
|
B(
|
|
420
420
|
this,
|
|
421
421
|
O(
|
|
422
|
-
|
|
422
|
+
_t(t) ? t.split(/\s*(?:,|\s+)\s*/) : t,
|
|
423
423
|
"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",
|
|
424
424
|
!0
|
|
425
425
|
),
|
|
@@ -560,8 +560,8 @@ function mt(t) {
|
|
|
560
560
|
];
|
|
561
561
|
h && (K(
|
|
562
562
|
h.split(it),
|
|
563
|
-
function(wt, A, F,
|
|
564
|
-
|
|
563
|
+
function(wt, A, F, bt) {
|
|
564
|
+
bt.push(F[A]);
|
|
565
565
|
},
|
|
566
566
|
Dt,
|
|
567
567
|
f = []
|
|
@@ -577,10 +577,10 @@ function mt(t) {
|
|
|
577
577
|
if (s != null) {
|
|
578
578
|
var w = s == 0 || s == 2, k = s == 3 || s == 1;
|
|
579
579
|
g = k ? Math.min(o.left, v) : s == 2 ? o.right + r : S[0], u -= r * +w;
|
|
580
|
-
var N = Math.max(o.top, 0),
|
|
580
|
+
var N = Math.max(o.top, 0), b = Math.min(
|
|
581
581
|
o.bottom,
|
|
582
582
|
i
|
|
583
|
-
), Y = (
|
|
583
|
+
), Y = (b - u + Math.min(i - u, N)) / 2;
|
|
584
584
|
y = Math.max(
|
|
585
585
|
w ? Y : s == 3 ? o.top + a + r : Math.min(Y, S[1]),
|
|
586
586
|
0
|
|
@@ -591,7 +591,7 @@ function mt(t) {
|
|
|
591
591
|
r,
|
|
592
592
|
Math.min(
|
|
593
593
|
/* 底边距 */
|
|
594
|
-
(Math.min(y + u,
|
|
594
|
+
(Math.min(y + u, b) + Math.max(y, N)) / 2 - y + r / 2,
|
|
595
595
|
/* 容器高度 - offset / 2 */
|
|
596
596
|
u - 0.5 * r
|
|
597
597
|
)
|
|
@@ -735,7 +735,7 @@ function Jt(t, e, i, r, n, l) {
|
|
|
735
735
|
], !0)
|
|
736
736
|
], 16, Yt)) : ut("", !0);
|
|
737
737
|
}
|
|
738
|
-
const Kt = /* @__PURE__ */ j(Xt, [["render", Jt], ["__scopeId", "data-v-
|
|
738
|
+
const Kt = /* @__PURE__ */ j(Xt, [["render", Jt], ["__scopeId", "data-v-b1c3381c"]]), Qt = [Ht, Ot, Ft, Kt], se = {
|
|
739
739
|
install(t) {
|
|
740
740
|
Qt.forEach((e) => {
|
|
741
741
|
t.component("S" + e.name, e), t.component(e.name + "S", e);
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.flyweight[data-v-35b94e9b]{height:var(--flyweight-h, 100%);width:var(--flyweight-w, 100%);overflow:auto;position:relative}.flyweight[hover-scroll][data-v-35b94e9b]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-35b94e9b]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.flyweight[hover-scroll][data-v-35b94e9b]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.flyweight[hover-scroll][data-v-35b94e9b]:hover::-webkit-scrollbar-thumb:hover,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.flyweight[hover-scroll][data-v-35b94e9b]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-35b94e9b]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all[data-v-35b94e9b]+*{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-35b94e9b]{height:var(--flyweight-content)}.flyweight .flyweight-all[data-v-35b94e9b]>*{width:calc(var(--width));height:var(--height);position:absolute}@media screen and (-apple-system: Macintosh){.flyweight .flyweight-all[data-v-35b94e9b]{background-color:red!important}}.card[data-v-2008eeb3]{--t: 0px;--r: 0px;--b: 0px;--l: 0px;--h: 100%;--w: 100%;--br: 1px}.card[hover-scroll][data-v-2008eeb3]::-webkit-scrollbar-track,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-track{border-radius:10px}.card[hover-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.card[hover-scroll][data-v-2008eeb3]::-webkit-scrollbar,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.card[hover-scroll][data-v-2008eeb3]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.card[hover-scroll][data-v-2008eeb3]:hover::-webkit-scrollbar-thumb:hover,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.card[hover-scroll][data-v-2008eeb3]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.card[data-v-2008eeb3]{position:relative;background-color:var(--bg, var(--card-background-color, #fff));padding:var(--card-padding, 10px);border-radius:var(--card-border-radius, 10px);box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);border-width:var(--br);justify-content:flex-start;margin:var(--t) var(--r) var(--b) var(--l);height:calc(var(--h) - var(--t) - var(--b));width:calc(var(--w) - var(--l) - var(--r));overflow:auto}.card[simply][data-v-2008eeb3],.card [simply][data-v-2008eeb3]{background-color:inherit;border:0!important}.card[flex][data-v-2008eeb3],.card [flex][data-v-2008eeb3]{display:flex}.card[column][data-v-2008eeb3],.card [column][data-v-2008eeb3]{flex-direction:column}.card[row][data-v-2008eeb3],.card [row][data-v-2008eeb3]{flex-direction:row}.card[center][data-v-2008eeb3],.card [center][data-v-2008eeb3]{justify-content:center}.card[vcenter][data-v-2008eeb3],.card [vcenter][data-v-2008eeb3]{align-items:center}.card .card-title[data-v-2008eeb3]{max-height:40px}.card .card-close.hide[data-v-2008eeb3]{display:none}.card .card-close[data-v-2008eeb3]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent)}.card .card-close[data-v-2008eeb3]:before,.card .card-close[data-v-2008eeb3]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-2008eeb3]{transition:all .3s ease}.card .card-close[data-v-2008eeb3]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-2008eeb3]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-2008eeb3]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-2008eeb3]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-2008eeb3]{overflow:auto;height:100%}.card .card-content[data-v-2008eeb3]:before{background:linear-gradient(90deg,transparent,var(--card-line-color, transparent),var(--card-line-color, transparent),transparent);content:"";display:block;position:sticky;top:0;width:100%;height:1px;z-index:10;transition:opacity .5s ease-in-out}:root{--tips-background-color: #4caf50;--tips-color: #ffffff;--tips-
|
|
1
|
+
@charset "UTF-8";.flyweight[data-v-35b94e9b]{height:var(--flyweight-h, 100%);width:var(--flyweight-w, 100%);overflow:auto;position:relative}.flyweight[hover-scroll][data-v-35b94e9b]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-35b94e9b]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.flyweight[hover-scroll][data-v-35b94e9b]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.flyweight[hover-scroll][data-v-35b94e9b]:hover::-webkit-scrollbar-thumb:hover,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.flyweight[hover-scroll][data-v-35b94e9b]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-35b94e9b]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-35b94e9b]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all[data-v-35b94e9b]+*{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-35b94e9b]{height:var(--flyweight-content)}.flyweight .flyweight-all[data-v-35b94e9b]>*{width:calc(var(--width));height:var(--height);position:absolute}@media screen and (-apple-system: Macintosh){.flyweight .flyweight-all[data-v-35b94e9b]{background-color:red!important}}.card[data-v-2008eeb3]{--t: 0px;--r: 0px;--b: 0px;--l: 0px;--h: 100%;--w: 100%;--br: 1px}.card[hover-scroll][data-v-2008eeb3]::-webkit-scrollbar-track,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-track{border-radius:10px}.card[hover-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.card[hover-scroll][data-v-2008eeb3]::-webkit-scrollbar,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.card[hover-scroll][data-v-2008eeb3]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.card[hover-scroll][data-v-2008eeb3]:hover::-webkit-scrollbar-thumb:hover,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.card[hover-scroll][data-v-2008eeb3]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-2008eeb3]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.card[data-v-2008eeb3]{position:relative;background-color:var(--bg, var(--card-background-color, #fff));padding:var(--card-padding, 10px);border-radius:var(--card-border-radius, 10px);box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);border-width:var(--br);justify-content:flex-start;margin:var(--t) var(--r) var(--b) var(--l);height:calc(var(--h) - var(--t) - var(--b));width:calc(var(--w) - var(--l) - var(--r));overflow:auto}.card[simply][data-v-2008eeb3],.card [simply][data-v-2008eeb3]{background-color:inherit;border:0!important}.card[flex][data-v-2008eeb3],.card [flex][data-v-2008eeb3]{display:flex}.card[column][data-v-2008eeb3],.card [column][data-v-2008eeb3]{flex-direction:column}.card[row][data-v-2008eeb3],.card [row][data-v-2008eeb3]{flex-direction:row}.card[center][data-v-2008eeb3],.card [center][data-v-2008eeb3]{justify-content:center}.card[vcenter][data-v-2008eeb3],.card [vcenter][data-v-2008eeb3]{align-items:center}.card .card-title[data-v-2008eeb3]{max-height:40px}.card .card-close.hide[data-v-2008eeb3]{display:none}.card .card-close[data-v-2008eeb3]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent)}.card .card-close[data-v-2008eeb3]:before,.card .card-close[data-v-2008eeb3]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-2008eeb3]{transition:all .3s ease}.card .card-close[data-v-2008eeb3]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-2008eeb3]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-2008eeb3]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-2008eeb3]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-2008eeb3]{overflow:auto;height:100%}.card .card-content[data-v-2008eeb3]:before{background:linear-gradient(90deg,transparent,var(--card-line-color, transparent),var(--card-line-color, transparent),transparent);content:"";display:block;position:sticky;top:0;width:100%;height:1px;z-index:10;transition:opacity .5s ease-in-out}:root{--tips-background-color: #4caf50;--tips-color: #ffffff;--tips-font-size: 8px;--tips-border-radius: 30px;--tips-border-width: 3;--tips-offset: 4}.tips[data-v-b1c3381c]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:var(--tips-border-radius);padding:2px 6px;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);font-weight:700;box-shadow:#0000001f -2px 2px 6px;font-size:var(--tips-font-size)}.tips[animate][data-v-b1c3381c]{transition:all .3s}.tips-title[data-v-b1c3381c]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips[static][data-v-b1c3381c]{position:static!important}.tips[arrow][data-v-b1c3381c]:before,.tips[arrow][data-v-b1c3381c]:after{content:"";position:absolute;border:calc(var(--tips-border-width) * 2) solid transparent;height:0;width:0;overflow:hidden}.tips[arrow=top][data-v-b1c3381c]{top:-20px;right:-10px}.tips[arrow=top][data-v-b1c3381c]:before{border-top-color:var(--tips-border-color);bottom:calc(var(--tips-border-width) * -5);left:50%}.tips[arrow=top][data-v-b1c3381c]:after{border-top-color:var(--tips-background-color);bottom:calc(var(--tips-border-width) * -3.5);left:50%}.tips[arrow=bottom][data-v-b1c3381c]{bottom:-30px;right:-10px}.tips[arrow=bottom][data-v-b1c3381c]:before{border-bottom-color:var(--tips-border-color);top:calc(var(--tips-border-width) * -5);left:50%}.tips[arrow=bottom][data-v-b1c3381c]:after{border-bottom-color:var(--tips-background-color);top:calc(var(--tips-border-width) * -3.5);left:50%}
|
package/vue2/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@soei/util"),g=require("@soei/tools"),nt=require("@soei/picker");let lt=/(\d+|[+\-\*/]|%)/g,B={"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e,i)=>parseFloat(t)/100*i},j=(t,e)=>{let i;if(i=o.runer("match",t,lt)){let s=i.length,l,u=0,n,h=[];for(;s--;)u=i.shift(),u in B?(l&&h.push(l),u==="%"&&(h.length=2),n=u):+u&&h.push(+u),h.length==2&&(h.push(e),l=B[n].apply(null,h),h.length=0);+l||(l=+h.pop()),t=l>>0}return t},I={},w=(t,e)=>(t+"").replace(/\w+\((.*)\)/g,"$1").replace(I[e]||(I[e]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");function H(t,e,i,s,l,u,n,h){var r=typeof t=="function"?t.options:t;e&&(r.render=e,r.staticRenderFns=i,r._compiled=!0),s&&(r.functional=!0),u&&(r._scopeId="data-v-"+u);var a;if(n?(a=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),l&&l.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(n)},r._ssrRegister=a):l&&(a=h?function(){l.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:l),a)if(r.functional){r._injectStyles=a;var d=r.render;r.render=function(f,_){return a.call(_),d(f,_)}}else{var p=r.beforeCreate;r.beforeCreate=p?[].concat(p,a):[a]}return{exports:t,options:r}}let U=t=>t==null||t==null,ot=(...t)=>{console.info("::::FLYWEIGHT",...t)};const ht={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:[String,Number],default:0},height:{type:[String,Number],default:100},w:{type:[Number,String]},h:{type:[Number,String]},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>({id:0})},index:{type:Number,default:0},top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null},padding:{type:Boolean,default:!1}},computed:{flyweight(){return this.$refs.flyweight||""},style(){var t=this.w,e=this.h,i=this.Size,s={};return o.merge(s,{"--width":w(this.realW),"--height":w(this.realH),"--flyweight-content":w(i)},e&&{"--flyweight-h":w(e)},t&&s,{"--flyweight-w":w(t)},"mix"),s}},data(){return{flyweights:[],actice:!1,Size:null,column:1,row:1,expand:10,count:0,task:[],realW:0,realH:0}},watch:{flys(t){this.count=t.length,this.rebuild();let e=this.task.shift();e&&this.$nextTick(()=>{this.setview(e)})},view:{handler(t){this.setview(t)},immediate:!0,deep:!0},index(t){this.setindex(t)},top(t){this.flyweight.scrollTop=t},left(t){this.flyweight.scrollLeft=t}},mounted(){this.flyweights=[],this.$set||(this.$set=(t,e,i)=>{t[e]=i}),this.setindex(this.index);try{new ResizeObserver(()=>{this.rebuild(),this.$emit("resize")}).observe(this.flyweight)}catch(t){ot(t)}this.scrollx=o.runer("hasAttribute",this.flyweight,"scroll-x"),this.BoxRule="clientHeight=>height,clientWidth=>width",this.direction=this.scrollx?"scrollLeft":"scrollTop"},methods:{exec:w,trigger(t,e){o.isArray(t)||(t=t&&e?[[t,e]]:[]),t.length&&this.lazyrun(()=>{o.each(t,(i,s)=>{this.$emit(s[0],U(s[1])?!0:s[1])})})},cheackflys(t){if(!this.flys.length)return t&&this.task.push(t),!0},setview(t){o.runer([this.cheackflys,e=>{e=e||{};let i=e.index||o.each(this.flys,(s,l,u,n)=>{if(l[u]==n)return s},e.picker,e.id);U(i)||this.setindex(i)}],this,t)},setindex(t){o.runer([this.cheackflys,({index:e})=>{this.selectIndex=e,this.$nextTick(()=>{let i=e/this.column>>0,s=this.expand;(this.flyweight[this.direction]/s>>0)+this.row-i-1>0||(this.flyweight[this.direction]=i*s,this.scroll())})}],this,{index:t})},lazyrun(t,e){clearTimeout(this.time),this.time=setTimeout(()=>{o.runer(t)},e||this.lazy)},run(t){let e=[],i=o.runer(this.direction,t.target),s={offset:i,top:i,width:this.realW,height:this.realH,index:i/this.expand>>0};o.merge(s,this.space),t.from||e.push(["onscroll",s]);let l=!1;o.each(this.flyweights,(u,n,h,r,a,d,p,c,f)=>{if(h=u/a>>0,c=h+r*(+(h<d%r)+(d/r>>0)),f=c*a+u%a,f>=this.count){l||(e.push(["onend"]),l=!0);return}n.index=c,n.i=f,n.data=this.flys[f];let _=[c*this.expand+n.x,n.space];p&&_.reverse(),n.top=_[0],n.left=_[1]},null,this.row,this.column,s.index,this.scrollx),this.trigger(e),e=null},scroll(t){this.run(t||{target:this.flyweight,from:"space"})},rebuild(){let t=this.count||this.flys.length,e=this.flyweights;if(!t)return e.length=t;this.count=t;let i=this.scrollx,s=this.flyweight,l=o.picker(s,this.BoxRule);this.$nextTick(()=>{let u=/true/.test(this.auto),[n,h]=this.offset,r=l.width,a=l.height,d=(j(this.width,r)||r)+n,p=j(this.height,a)+h,c=[r/d>>0||1,a/p>>0||1];i&&c.reverse();let[f,_]=c,x=this.padding,C,S=0,y,m;i?(y=d,d-=n,m=b=>b*(p-h)+(b+1)*h):(u?(d=(r-n*(f+2*x-1))/f,C=!x*n,S=x*n):(C=0,S=(r%d+n*f)/(f+1)>>0,d-=n),m=b=>b*(d+C)+(b+1)*S,y=p),this.row=_+2,this.column=f,this.realH=p-h,this.realW=d,this.expand=y,this.Size=Math.ceil(t/f)*y;let $=Math.min(t,f*this.row),v=$-1,T;for(;$-- >0;)T=v-$,this.$set(e,T,{x:n,y:h,width:d,height:p-h,space:m(T%f),data:{}});e.length=v+1;let z=[];a/y>v/f&&z.push(["onend"]),this.flyweight&&(this.flyweight[this.direction]=0),this.$nextTick(()=>{this.setindex(this.selectIndex||0),this.scroll()}),z.push(["update:space",{row:(v/f>>0)+1,column:f,showrow:this.row,showcolumn:this.column}]),this.trigger(z)})}}};var at=function(){var e=this,i=e._self._c;return i("div",{ref:"flyweight",staticClass:"flyweight",class:{"flyweight-active":e.actice},style:e.style,on:{scroll:e.scroll}},[i("div",{staticClass:"flyweight-all"},e._l(e.flyweights,function(s,l){return i("div",{key:l,style:{top:s.top+"px",left:s.left+"px"}},[e._t("default",null,null,s)],2)}),0),e.flyweights.length?e._t("end"):e._e()],2)},ut=[],ct=H(ht,at,ut,!1,null,"d5f1cd63",null,null);const V=ct.exports;function W(t,e){return e&&(t=t.replace(/[a-z]/g,"")),t.toLowerCase()}let Y={close:{handler(t){this.change(t)},deep:!0},offset:{handler(t){this.margin(t)},deep:!0}},ft=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],J={};o.each(ft,(t,e,i)=>{t=W(e),J["--"+W(e,!0)]=t,i[t]=function(){this.trigger++}},Y);const dt={name:"Card",props:{offset:{type:[String,Array],default:()=>[0,0,0,0]},background:{type:String,default:""},border:{type:String,default:"1px"},height:{type:String,default:"100%"},width:{type:String,default:"100%"},show:{type:String,default:""},close:{type:Object,default:null},title:{type:String,default:""}},data(){return{closecss:{},trigger:0,default:{top:"0px",right:"0px",bottom:"0px",left:"0px",height:"100%",width:"100%",background:"",border:"1px"}}},computed:{style(){return this.tr()}},watch:Y,methods:{exec:w,isEmpty:o.isEmpty,isSimplyType:o.isSimplyType,tr(){let t={};return this.margin(this.offset),o.each(J,(e,i)=>{this.css(t,e,i)}),t},tolower:W,css(t,e,i){let s=this[i]||this.default[i];!s||this.default[i]==s||(t[e]=w(s))},change(t){o.isSimplyType(t)||(this.closecss=o.picker(t,"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"))},margin(t){o.merge(this,o.picker(o.isString(t)?t.split(/\s*(?:,|\s+)\s*/):t,"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",!0),!0)}},mounted(){this.change(this.close)}};var pt=function(){var e=this,i=e._self._c;return i("div",{key:e.trigger,staticClass:"card",style:e.isEmpty(e.style)?e.tr():e.style},[e._t("default",function(){return[e._t("title",function(){var s;return[i("div",{staticClass:"card-title"},[e._v(" "+e._s(e.show||e.title)+" "),i("div",{staticClass:"card-close",class:{hide:e.isSimplyType(e.close)?!e.close:!1},style:e.closecss,attrs:{title:(s=e.close)==null?void 0:s.tips},on:{click:function(l){return e.$emit("close")}}})])]}),e._t("content",function(){return[i("div",{staticClass:"card-content"},[e._t("inner")],2)]})]})],2)},gt=[],_t=H(dt,pt,gt,!1,null,"ec96bb2a",null,null);const K=_t.exports,yt={name:"Stream",computed:{column(){let{columns:t,T:e}=this,i=t||e;return o.isEmpty(i)?[]:o.isArray(i)?i:[i]}},props:{bridge:{type:String,default:"slot"},type:{type:String,default:"div"},data:{type:Array,default:()=>[]},columns:{type:[Object,Array],default:()=>null},T:{type:[Array,Object],default:()=>null}},methods:{trigger(t){let e=t[this.bridge]||t.type;return(this.$slots||this.$scopedSlots)[e]?e:"default"}}};var mt=function(){var e=this,i=e._self._c;return i(e.type,e._b({tag:"component"},"component",e.$attrs,!1),[e._l(e.column,function(s){return e._t(e.trigger(s),null,null,s)})],2)},vt=[],bt=H(yt,mt,vt,!1,null,null,null,null);const Q=bt.exports,q=/(?:\,|\|{2})/,M="px",X="";let Z=document.documentElement,G,D=["s-left","s-top","s-right","s-bottom"],wt={left:0,top:1,right:2,bottom:3};const A=[];var xt=nt(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let O={},tt=null;xt(O,"delay",{get(){return this._delay},set(t){tt=St(()=>{g.runer(A)},t),this._delay=t}});O.delay=60;function St(t,e){let i=0;return function(){const s=Date.now();s-i>=e&&(i=s,g.runer(t,this,arguments))}}const E=()=>{tt()};function $t(t){A.push(t)}const N=new ResizeObserver(E);N.observe(Z);function et(t){t.onresize||(A.push([et,null,t]),t.onresize=!0);var e=Z,i=e.clientHeight,s=t.offset||15,l=t.target,u=t.room,n=t.index,h=t.position,r=l.getBoundingClientRect(),a=u.offsetHeight+s,d=u.offsetWidth+s,p="3,0,2,1".split(q),c,f=(r.height==G?r.bottom-r.top:r.height)>>0,_=(r.width==G?r.right-r.left:r.width)>>0,x=e.clientWidth-d,C=i-a,S=[r.left-d,r.top-a,x-r.right,C-r.bottom];h&&(g.each(h.split(q),function(st,R,L,rt){rt.push(L[R])},wt,c=[]),p.unshift.apply(p,c)),n=g.each(p,function(st,R,L){if(L[R]>0)return R},S);var y=0,m=0,$=0;if(n!=null){var v=n==0||n==2,T=n==3||n==1;y=T?Math.min(r.left,x):n==2?r.right+s:S[0],a-=s*+v;var z=Math.max(r.top,0),b=Math.min(r.bottom,i),F=(b-a+Math.min(i-a,z))/2;m=Math.max(v?F:n==3?r.top+f+s:Math.min(F,S[1]),0),T&&r.left>x&&($=r.left-y-s+_/2)}let P=u.classList,k=t.css;P.remove(...D),P.add(D[n]),t.index=n,k.left=y+M,k.top=m+M,k["--tips-position-top"]=v?Math.max(s,Math.min((Math.min(m+a,b)+Math.max(m,z))/2-m+s/2,a-.5*s))+M:X,k["--tips-position-left"]=$?Math.min($,d-3*s)+M:X}const Tt={name:"Tips",props:{visible:{type:[Boolean,String,Number],default:!0},content:{type:String,default:""},title:{type:[String,Number],default:""},position:{type:String,default:"top"},offset:{type:[String,Number],default:void 0},fontSize:{type:[String,Number],default:void 0},border:{type:[String,Number],default:void 0},color:{type:[String,Number],default:void 0},background:{type:[String,Number],default:void 0},static:{type:Boolean,default:!1},delay:{type:[String,Number],default:10}},watch:{visible:function(t){t&&this.$nextTick(()=>{this.init()})}},data(){return{css:{}}},methods:{parent(t){let e=this.$el,i;for(;e&&(e=e.parentNode,e&&e.nodeType==1||(e=window,i=!0),g.runer(t,null,e,i),!i););},attr(t,e,i){return g.runer(t[i===void 0?"getAttribute":"setAttribute"],t,e,i)},init(){this.$el.nodeName!="#comment"&&et({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset})},scrollListener(){this.static||this.parent((t,e,i)=>{e?g.runer(t.addEventListener,t,"scroll",E):(g.runer(N.observe,N,t),(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&(i=this.attr(t,"-tips-scroll"),i||(g.runer(t.addEventListener,t,"scroll",E),this.attr(t,"-tips-scroll","true"))))})}},mounted(){o.merge(this.css,o.picker(this.$props,"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size")),this.init(),O.delay=+this.delay,$t(t=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(t,e){g.runer(t.removeEventListener,t,"scroll",E),g.runer(t.removeAttribute,t,"-tips-scroll",void 0),e||g.runer(N.unobserve,N,t)})}};var zt=function(){var e=this,i=e._self._c;return e.visible?i("div",e._b({staticClass:"tips",style:e.static?null:e.css,attrs:{static:e.static?"":null}},"div",e.$attrs,!1),[e._t("title",function(){return[i("div",{staticClass:"tips-title"},[e._v(e._s(e.title))])]}),e._t("content",function(){return[e._v(e._s(e.content))]})],2):e._e()},Ct=[],Nt=H(Tt,zt,Ct,!1,null,"053dbb37",null,null);const it=Nt.exports,kt=[V,K,Q,it],Rt={install(t){kt.forEach(e=>{t.component("S"+e.name,e),t.component(e.name+"S",e)})}};exports.Card=K;exports.Flyweight=V;exports.Stream=Q;exports.Tips=it;exports.default=Rt;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@soei/util"),g=require("@soei/tools"),nt=require("@soei/picker");let lt=/(\d+|[+\-\*/]|%)/g,B={"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e,i)=>parseFloat(t)/100*i},j=(t,e)=>{let i;if(i=o.runer("match",t,lt)){let s=i.length,l,u=0,n,h=[];for(;s--;)u=i.shift(),u in B?(l&&h.push(l),u==="%"&&(h.length=2),n=u):+u&&h.push(+u),h.length==2&&(h.push(e),l=B[n].apply(null,h),h.length=0);+l||(l=+h.pop()),t=l>>0}return t},I={},b=(t,e)=>(t+"").replace(/\w+\((.*)\)/g,"$1").replace(I[e]||(I[e]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");function H(t,e,i,s,l,u,n,h){var r=typeof t=="function"?t.options:t;e&&(r.render=e,r.staticRenderFns=i,r._compiled=!0),s&&(r.functional=!0),u&&(r._scopeId="data-v-"+u);var a;if(n?(a=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),l&&l.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(n)},r._ssrRegister=a):l&&(a=h?function(){l.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:l),a)if(r.functional){r._injectStyles=a;var d=r.render;r.render=function(f,_){return a.call(_),d(f,_)}}else{var p=r.beforeCreate;r.beforeCreate=p?[].concat(p,a):[a]}return{exports:t,options:r}}let U=t=>t==null||t==null,ot=(...t)=>{console.info("::::FLYWEIGHT",...t)};const ht={name:"Flyweight",props:{flys:{type:Array,default:()=>[]},width:{type:[String,Number],default:0},height:{type:[String,Number],default:100},w:{type:[Number,String]},h:{type:[Number,String]},offset:{type:Array,default:()=>[0,0]},lazy:{type:Number,default:100},view:{type:Object,default:()=>({id:0})},index:{type:Number,default:0},top:{type:[String,Number],default:0},left:{type:[String,Number],default:0},auto:{type:[Boolean,String],default:!1},space:{type:Object,default:()=>null},padding:{type:Boolean,default:!1}},computed:{flyweight(){return this.$refs.flyweight||""},style(){var t=this.w,e=this.h,i=this.Size,s={};return o.merge(s,{"--width":b(this.realW),"--height":b(this.realH),"--flyweight-content":b(i)},e&&{"--flyweight-h":b(e)},t&&s,{"--flyweight-w":b(t)},"mix"),s}},data(){return{flyweights:[],actice:!1,Size:null,column:1,row:1,expand:10,count:0,task:[],realW:0,realH:0}},watch:{flys(t){this.count=t.length,this.rebuild();let e=this.task.shift();e&&this.$nextTick(()=>{this.setview(e)})},view:{handler(t){this.setview(t)},immediate:!0,deep:!0},index(t){this.setindex(t)},top(t){this.flyweight.scrollTop=t},left(t){this.flyweight.scrollLeft=t}},mounted(){this.flyweights=[],this.$set||(this.$set=(t,e,i)=>{t[e]=i}),this.setindex(this.index);try{new ResizeObserver(()=>{this.rebuild(),this.$emit("resize")}).observe(this.flyweight)}catch(t){ot(t)}this.scrollx=o.runer("hasAttribute",this.flyweight,"scroll-x"),this.BoxRule="clientHeight=>height,clientWidth=>width",this.direction=this.scrollx?"scrollLeft":"scrollTop"},methods:{exec:b,trigger(t,e){o.isArray(t)||(t=t&&e?[[t,e]]:[]),t.length&&this.lazyrun(()=>{o.each(t,(i,s)=>{this.$emit(s[0],U(s[1])?!0:s[1])})})},cheackflys(t){if(!this.flys.length)return t&&this.task.push(t),!0},setview(t){o.runer([this.cheackflys,e=>{e=e||{};let i=e.index||o.each(this.flys,(s,l,u,n)=>{if(l[u]==n)return s},e.picker,e.id);U(i)||this.setindex(i)}],this,t)},setindex(t){o.runer([this.cheackflys,({index:e})=>{this.selectIndex=e,this.$nextTick(()=>{let i=e/this.column>>0,s=this.expand;(this.flyweight[this.direction]/s>>0)+this.row-i-1>0||(this.flyweight[this.direction]=i*s,this.scroll())})}],this,{index:t})},lazyrun(t,e){clearTimeout(this.time),this.time=setTimeout(()=>{o.runer(t)},e||this.lazy)},run(t){let e=[],i=o.runer(this.direction,t.target),s={offset:i,top:i,width:this.realW,height:this.realH,index:i/this.expand>>0};o.merge(s,this.space),t.from||e.push(["onscroll",s]);let l=!1;o.each(this.flyweights,(u,n,h,r,a,d,p,c,f)=>{if(h=u/a>>0,c=h+r*(+(h<d%r)+(d/r>>0)),f=c*a+u%a,f>=this.count){l||(e.push(["onend"]),l=!0);return}n.index=c,n.i=f,n.data=this.flys[f];let _=[c*this.expand+n.x,n.space];p&&_.reverse(),n.top=_[0],n.left=_[1]},null,this.row,this.column,s.index,this.scrollx),this.trigger(e),e=null},scroll(t){this.run(t||{target:this.flyweight,from:"space"})},rebuild(){let t=this.count||this.flys.length,e=this.flyweights;if(!t)return e.length=t;this.count=t;let i=this.scrollx,s=this.flyweight,l=o.picker(s,this.BoxRule);this.$nextTick(()=>{let u=/true/.test(this.auto),[n,h]=this.offset,r=l.width,a=l.height,d=(j(this.width,r)||r)+n,p=j(this.height,a)+h,c=[r/d>>0||1,a/p>>0||1];i&&c.reverse();let[f,_]=c,x=this.padding,C,S=0,y,m;i?(y=d,d-=n,m=w=>w*(p-h)+(w+1)*h):(u?(d=(r-n*(f+2*x-1))/f,C=!x*n,S=x*n):(C=0,S=(r%d+n*f)/(f+1)>>0,d-=n),m=w=>w*(d+C)+(w+1)*S,y=p),this.row=_+2,this.column=f,this.realH=p-h,this.realW=d,this.expand=y,this.Size=Math.ceil(t/f)*y;let $=Math.min(t,f*this.row),v=$-1,T;for(;$-- >0;)T=v-$,this.$set(e,T,{x:n,y:h,width:d,height:p-h,space:m(T%f),data:{}});e.length=v+1;let z=[];a/y>v/f&&z.push(["onend"]),this.flyweight&&(this.flyweight[this.direction]=0),this.$nextTick(()=>{this.setindex(this.selectIndex||0),this.scroll()}),z.push(["update:space",{row:(v/f>>0)+1,column:f,showrow:this.row,showcolumn:this.column}]),this.trigger(z)})}}};var at=function(){var e=this,i=e._self._c;return i("div",{ref:"flyweight",staticClass:"flyweight",class:{"flyweight-active":e.actice},style:e.style,on:{scroll:e.scroll}},[i("div",{staticClass:"flyweight-all"},e._l(e.flyweights,function(s,l){return i("div",{key:l,style:{top:s.top+"px",left:s.left+"px"}},[e._t("default",null,null,s)],2)}),0),e.flyweights.length?e._t("end"):e._e()],2)},ut=[],ct=H(ht,at,ut,!1,null,"d5f1cd63",null,null);const V=ct.exports;function W(t,e){return e&&(t=t.replace(/[a-z]/g,"")),t.toLowerCase()}let Y={close:{handler(t){this.change(t)},deep:!0},offset:{handler(t){this.margin(t)},deep:!0}},ft=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],J={};o.each(ft,(t,e,i)=>{t=W(e),J["--"+W(e,!0)]=t,i[t]=function(){this.trigger++}},Y);const dt={name:"Card",props:{offset:{type:[String,Array],default:()=>[0,0,0,0]},background:{type:String,default:""},border:{type:String,default:"1px"},height:{type:String,default:"100%"},width:{type:String,default:"100%"},show:{type:String,default:""},close:{type:Object,default:null},title:{type:String,default:""}},data(){return{closecss:{},trigger:0,default:{top:"0px",right:"0px",bottom:"0px",left:"0px",height:"100%",width:"100%",background:"",border:"1px"}}},computed:{style(){return this.tr()}},watch:Y,methods:{exec:b,isEmpty:o.isEmpty,isSimplyType:o.isSimplyType,tr(){let t={};return this.margin(this.offset),o.each(J,(e,i)=>{this.css(t,e,i)}),t},tolower:W,css(t,e,i){let s=this[i]||this.default[i];!s||this.default[i]==s||(t[e]=b(s))},change(t){o.isSimplyType(t)||(this.closecss=o.picker(t,"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"))},margin(t){o.merge(this,o.picker(o.isString(t)?t.split(/\s*(?:,|\s+)\s*/):t,"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",!0),!0)}},mounted(){this.change(this.close)}};var pt=function(){var e=this,i=e._self._c;return i("div",{key:e.trigger,staticClass:"card",style:e.isEmpty(e.style)?e.tr():e.style},[e._t("default",function(){return[e._t("title",function(){var s;return[i("div",{staticClass:"card-title"},[e._v(" "+e._s(e.show||e.title)+" "),i("div",{staticClass:"card-close",class:{hide:e.isSimplyType(e.close)?!e.close:!1},style:e.closecss,attrs:{title:(s=e.close)==null?void 0:s.tips},on:{click:function(l){return e.$emit("close")}}})])]}),e._t("content",function(){return[i("div",{staticClass:"card-content"},[e._t("inner")],2)]})]})],2)},gt=[],_t=H(dt,pt,gt,!1,null,"ec96bb2a",null,null);const K=_t.exports,yt={name:"Stream",computed:{column(){let{columns:t,T:e}=this,i=t||e;return o.isEmpty(i)?[]:o.isArray(i)?i:[i]}},props:{bridge:{type:String,default:"slot"},type:{type:String,default:"div"},data:{type:Array,default:()=>[]},columns:{type:[Object,Array],default:()=>null},T:{type:[Array,Object],default:()=>null}},methods:{trigger(t){let e=t[this.bridge]||t.type;return(this.$slots||this.$scopedSlots)[e]?e:"default"}}};var mt=function(){var e=this,i=e._self._c;return i(e.type,e._b({tag:"component"},"component",e.$attrs,!1),[e._l(e.column,function(s){return e._t(e.trigger(s),null,null,s)})],2)},vt=[],wt=H(yt,mt,vt,!1,null,null,null,null);const Q=wt.exports,q=/(?:\,|\|{2})/,M="px",X="";let Z=document.documentElement,G,D=["s-left","s-top","s-right","s-bottom"],bt={left:0,top:1,right:2,bottom:3};const A=[];var xt=nt(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let O={},tt=null;xt(O,"delay",{get(){return this._delay},set(t){tt=St(()=>{g.runer(A)},t),this._delay=t}});O.delay=60;function St(t,e){let i=0;return function(){const s=Date.now();s-i>=e&&(i=s,g.runer(t,this,arguments))}}const E=()=>{tt()};function $t(t){A.push(t)}const N=new ResizeObserver(E);N.observe(Z);function et(t){t.onresize||(A.push([et,null,t]),t.onresize=!0);var e=Z,i=e.clientHeight,s=t.offset||15,l=t.target,u=t.room,n=t.index,h=t.position,r=l.getBoundingClientRect(),a=u.offsetHeight+s,d=u.offsetWidth+s,p="3,0,2,1".split(q),c,f=(r.height==G?r.bottom-r.top:r.height)>>0,_=(r.width==G?r.right-r.left:r.width)>>0,x=e.clientWidth-d,C=i-a,S=[r.left-d,r.top-a,x-r.right,C-r.bottom];h&&(g.each(h.split(q),function(st,R,L,rt){rt.push(L[R])},bt,c=[]),p.unshift.apply(p,c)),n=g.each(p,function(st,R,L){if(L[R]>0)return R},S);var y=0,m=0,$=0;if(n!=null){var v=n==0||n==2,T=n==3||n==1;y=T?Math.min(r.left,x):n==2?r.right+s:S[0],a-=s*+v;var z=Math.max(r.top,0),w=Math.min(r.bottom,i),F=(w-a+Math.min(i-a,z))/2;m=Math.max(v?F:n==3?r.top+f+s:Math.min(F,S[1]),0),T&&r.left>x&&($=r.left-y-s+_/2)}let P=u.classList,k=t.css;P.remove(...D),P.add(D[n]),t.index=n,k.left=y+M,k.top=m+M,k["--tips-position-top"]=v?Math.max(s,Math.min((Math.min(m+a,w)+Math.max(m,z))/2-m+s/2,a-.5*s))+M:X,k["--tips-position-left"]=$?Math.min($,d-3*s)+M:X}const Tt={name:"Tips",props:{visible:{type:[Boolean,String,Number],default:!0},content:{type:String,default:""},title:{type:[String,Number],default:""},position:{type:String,default:"top"},offset:{type:[String,Number],default:void 0},fontSize:{type:[String,Number],default:void 0},border:{type:[String,Number],default:void 0},color:{type:[String,Number],default:void 0},background:{type:[String,Number],default:void 0},static:{type:Boolean,default:!1},delay:{type:[String,Number],default:10}},watch:{visible:function(t){t&&this.$nextTick(()=>{this.init()})}},data(){return{css:{}}},methods:{parent(t){let e=this.$el,i;for(;e&&(e=e.parentNode,e&&e.nodeType==1||(e=window,i=!0),g.runer(t,null,e,i),!i););},attr(t,e,i){return g.runer(t[i===void 0?"getAttribute":"setAttribute"],t,e,i)},init(){this.$el.nodeName!="#comment"&&et({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset})},scrollListener(){this.static||this.parent((t,e,i)=>{e?g.runer(t.addEventListener,t,"scroll",E):(g.runer(N.observe,N,t),(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&(i=this.attr(t,"-tips-scroll"),i||(g.runer(t.addEventListener,t,"scroll",E),this.attr(t,"-tips-scroll","true"))))})}},mounted(){o.merge(this.css,o.picker(this.$props,"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size")),this.init(),O.delay=+this.delay,$t(t=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(t,e){g.runer(t.removeEventListener,t,"scroll",E),g.runer(t.removeAttribute,t,"-tips-scroll",void 0),e||g.runer(N.unobserve,N,t)})}};var zt=function(){var e=this,i=e._self._c;return e.visible?i("div",e._b({staticClass:"tips",style:e.static?null:e.css,attrs:{static:e.static?"":null}},"div",e.$attrs,!1),[e._t("title",function(){return[i("div",{staticClass:"tips-title"},[e._v(e._s(e.title))])]}),e._t("content",function(){return[e._v(e._s(e.content))]})],2):e._e()},Ct=[],Nt=H(Tt,zt,Ct,!1,null,"f3c84b5f",null,null);const it=Nt.exports,kt=[V,K,Q,it],Rt={install(t){kt.forEach(e=>{t.component("S"+e.name,e),t.component(e.name+"S",e)})}};exports.Card=K;exports.Flyweight=V;exports.Stream=Q;exports.Tips=it;exports.default=Rt;
|
package/vue2/index.js
CHANGED
package/vue2/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.flyweight[data-v-d5f1cd63]{height:var(--flyweight-h, 100%);width:var(--flyweight-w, 100%);overflow:auto;position:relative}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb:hover,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-d5f1cd63]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all+*[data-v-d5f1cd63]{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-d5f1cd63]{height:var(--flyweight-content)}.flyweight .flyweight-all>*[data-v-d5f1cd63]{width:calc(var(--width));height:var(--height);position:absolute}@media screen and (-apple-system: Macintosh){.flyweight .flyweight-all[data-v-d5f1cd63]{background-color:red!important}}.card[data-v-ec96bb2a]{--t: 0px;--r: 0px;--b: 0px;--l: 0px;--h: 100%;--w: 100%;--br: 1px;position:relative;background-color:var(--bg, var(--card-background-color, #fff));padding:var(--card-padding, 10px);border-radius:var(--card-border-radius, 10px);box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);border-width:var(--br);justify-content:flex-start;margin:var(--t) var(--r) var(--b) var(--l);height:calc(var(--h) - var(--t) - var(--b));width:calc(var(--w) - var(--l) - var(--r));overflow:auto}.card[hover-scroll][data-v-ec96bb2a]::-webkit-scrollbar-track,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-track{border-radius:10px}.card[hover-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.card[hover-scroll][data-v-ec96bb2a]::-webkit-scrollbar,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.card[hover-scroll][data-v-ec96bb2a]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.card[hover-scroll][data-v-ec96bb2a]:hover::-webkit-scrollbar-thumb:hover,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.card[hover-scroll][data-v-ec96bb2a]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.card[simply][data-v-ec96bb2a],.card [simply][data-v-ec96bb2a]{background-color:inherit;border:0!important}.card[flex][data-v-ec96bb2a],.card [flex][data-v-ec96bb2a]{display:flex}.card[column][data-v-ec96bb2a],.card [column][data-v-ec96bb2a]{flex-direction:column}.card[row][data-v-ec96bb2a],.card [row][data-v-ec96bb2a]{flex-direction:row}.card[center][data-v-ec96bb2a],.card [center][data-v-ec96bb2a]{justify-content:center}.card[vcenter][data-v-ec96bb2a],.card [vcenter][data-v-ec96bb2a]{align-items:center}.card .card-title[data-v-ec96bb2a]{max-height:40px}.card .card-close[data-v-ec96bb2a]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent);transition:all .3s ease}.card .card-close.hide[data-v-ec96bb2a]{display:none}.card .card-close[data-v-ec96bb2a]:before,.card .card-close[data-v-ec96bb2a]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-ec96bb2a]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-ec96bb2a]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-ec96bb2a]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-ec96bb2a]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-ec96bb2a]{overflow:auto;height:100%}.card .card-content[data-v-ec96bb2a]:before{background:linear-gradient(90deg,transparent,var(--card-line-color, transparent),var(--card-line-color, transparent),transparent);content:"";display:block;position:sticky;top:0;width:100%;height:1px;z-index:10;transition:opacity .5s ease-in-out}:root{--tips-background-color: #4caf50;--tips-color: #ffffff;--tips-
|
|
1
|
+
@charset "UTF-8";.flyweight[data-v-d5f1cd63]{height:var(--flyweight-h, 100%);width:var(--flyweight-w, 100%);overflow:auto;position:relative}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-track{border-radius:10px}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.flyweight[hover-scroll][data-v-d5f1cd63]::-webkit-scrollbar,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb:hover,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.flyweight[hover-scroll][data-v-d5f1cd63]:hover::-webkit-scrollbar-thumb,.flyweight[auto-scroll][data-v-d5f1cd63]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.flyweight[scroll-x] .flyweight-all[data-v-d5f1cd63]{width:var(--flyweight-content);height:auto;min-height:100%}.flyweight[scroll-x] .flyweight-all+*[data-v-d5f1cd63]{left:var(--flyweight-content);position:absolute;top:0;height:100%}.flyweight .flyweight-all[data-v-d5f1cd63]{height:var(--flyweight-content)}.flyweight .flyweight-all>*[data-v-d5f1cd63]{width:calc(var(--width));height:var(--height);position:absolute}@media screen and (-apple-system: Macintosh){.flyweight .flyweight-all[data-v-d5f1cd63]{background-color:red!important}}.card[data-v-ec96bb2a]{--t: 0px;--r: 0px;--b: 0px;--l: 0px;--h: 100%;--w: 100%;--br: 1px;position:relative;background-color:var(--bg, var(--card-background-color, #fff));padding:var(--card-padding, 10px);border-radius:var(--card-border-radius, 10px);box-sizing:border-box;border-style:solid;border-color:var(--card-border-color, #555);border-width:var(--br);justify-content:flex-start;margin:var(--t) var(--r) var(--b) var(--l);height:calc(var(--h) - var(--t) - var(--b));width:calc(var(--w) - var(--l) - var(--r));overflow:auto}.card[hover-scroll][data-v-ec96bb2a]::-webkit-scrollbar-track,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-track{border-radius:10px}.card[hover-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb{border-radius:10px;background-color:transparent}.card[hover-scroll][data-v-ec96bb2a]::-webkit-scrollbar,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar{border-radius:10px;width:var(--scrollbar-width, 8px);height:var(--scrollbar-width, 8px)}.card[hover-scroll][data-v-ec96bb2a]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb{border-style:dashed;border-color:transparent;border-width:2px;background-clip:padding-box;cursor:pointer}.card[hover-scroll][data-v-ec96bb2a]:hover::-webkit-scrollbar-thumb:hover,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-color, #101010)}.card[hover-scroll][data-v-ec96bb2a]:hover::-webkit-scrollbar-thumb,.card[auto-scroll][data-v-ec96bb2a]::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color, #101010)}.card[simply][data-v-ec96bb2a],.card [simply][data-v-ec96bb2a]{background-color:inherit;border:0!important}.card[flex][data-v-ec96bb2a],.card [flex][data-v-ec96bb2a]{display:flex}.card[column][data-v-ec96bb2a],.card [column][data-v-ec96bb2a]{flex-direction:column}.card[row][data-v-ec96bb2a],.card [row][data-v-ec96bb2a]{flex-direction:row}.card[center][data-v-ec96bb2a],.card [center][data-v-ec96bb2a]{justify-content:center}.card[vcenter][data-v-ec96bb2a],.card [vcenter][data-v-ec96bb2a]{align-items:center}.card .card-title[data-v-ec96bb2a]{max-height:40px}.card .card-close[data-v-ec96bb2a]{position:absolute;width:20px;height:20px;right:10px;top:10px;border-radius:10px;z-index:1;--s-transform: 45deg;--s-hover-transform: 35deg;--s-close-width: 11px;--s-close-height: 2px;cursor:pointer;background-color:var(--s-card-close-background-color, transparent);transition:all .3s ease}.card .card-close.hide[data-v-ec96bb2a]{display:none}.card .card-close[data-v-ec96bb2a]:before,.card .card-close[data-v-ec96bb2a]:after{content:"";width:var(--s-close-width, 11px);height:var(--s-close-height, 2px);background-color:var(--s-card-close-color, #555);transform-origin:center;position:inherit;border-radius:10px;top:calc(50% - var(--s-close-height, 2px) / 2);left:calc(50% - var(--s-close-width, 11px) / 2)}.card .card-close[data-v-ec96bb2a]:before{transform:rotate(var(--s-transform, 45deg))}.card .card-close[data-v-ec96bb2a]:after{transform:rotate(calc(0deg - var(--s-transform, 45deg)))}.card .card-close[data-v-ec96bb2a]:hover:before{transform:rotate(var(--s-hover-transform, 45deg))}.card .card-close[data-v-ec96bb2a]:hover:after{transform:rotate(calc(0deg - var(--s-hover-transform, 45deg)))}.card .card-content[data-v-ec96bb2a]{overflow:auto;height:100%}.card .card-content[data-v-ec96bb2a]:before{background:linear-gradient(90deg,transparent,var(--card-line-color, transparent),var(--card-line-color, transparent),transparent);content:"";display:block;position:sticky;top:0;width:100%;height:1px;z-index:10;transition:opacity .5s ease-in-out}:root{--tips-background-color: #4caf50;--tips-color: #ffffff;--tips-font-size: 8px;--tips-border-radius: 30px;--tips-border-width: 3;--tips-offset: 4}.tips[data-v-f3c84b5f]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:var(--tips-border-radius);padding:2px 6px;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);font-weight:700;box-shadow:#0000001f -2px 2px 6px;font-size:var(--tips-font-size)}.tips[animate][data-v-f3c84b5f]{transition:all .3s}.tips-title[data-v-f3c84b5f]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips[static][data-v-f3c84b5f]{position:static!important}.tips[arrow][data-v-f3c84b5f]:before,.tips[arrow][data-v-f3c84b5f]:after{content:"";position:absolute;border:calc(var(--tips-border-width) * 2) solid transparent;height:0;width:0;overflow:hidden}.tips[arrow=top][data-v-f3c84b5f]{top:-20px;right:-10px}.tips[arrow=top][data-v-f3c84b5f]:before{border-top-color:var(--tips-border-color);bottom:calc(var(--tips-border-width) * -5);left:50%}.tips[arrow=top][data-v-f3c84b5f]:after{border-top-color:var(--tips-background-color);bottom:calc(var(--tips-border-width) * -3.5);left:50%}.tips[arrow=bottom][data-v-f3c84b5f]{bottom:-30px;right:-10px}.tips[arrow=bottom][data-v-f3c84b5f]:before{border-bottom-color:var(--tips-border-color);top:calc(var(--tips-border-width) * -5);left:50%}.tips[arrow=bottom][data-v-f3c84b5f]:after{border-bottom-color:var(--tips-background-color);top:calc(var(--tips-border-width) * -3.5);left:50%}
|