@soei/flyweight 0.3.11 → 0.3.12
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 +107 -105
- package/README.md +8 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/vue2/index.cjs +1 -1
- package/vue2/index.js +50 -48
- 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"),he=require("@soei/picker");let ae=/(\d+|[+\-\*/]|%)/g,V={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,i)=>parseFloat(e)/100*i},j=(e,t)=>{let i;if(i=a.runer("match",e,ae)){let l=i.length,o,n=0,s,c=[];for(;l--;)n=i.shift(),n in V?(o&&c.push(o),n==="%"&&(c.length=2),s=n):+n&&c.push(+n),c.length==2&&(c.push(t),o=V[s].apply(null,c),c.length=0);+o||(o=+c.pop()),e=o>>0}return e},q={},S=(e,t)=>(e+"").replace(/\w+\((.*)\)/g,"$1").replace(q[t]||(q[t]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");const P=(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,ce=(...e)=>{console.info("::::FLYWEIGHT",...e)};const ue={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){ce(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,d,f,g,y,u)=>{if(c=n/d>>0,y=c+h*(+(c<f%h)+(f/h>>0)),u=y*d+n%d,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,d=o.height,f=(j(this.width,h)||h)+s,g=j(this.height,d)+c,y=[h/f>>0||1,d/g>>0||1];i&&y.reverse();let[u,v]=y,x=this.padding,T,k=0,m,b;i?(m=f,f-=s,b=$=>$*(g-c)+($+1)*c):(n?(f=(h-s*(u+2*x-1))/u,T=!x*s,k=x*s):(T=0,k=(h%f+s*u)/(u+1)>>0,f-=s),b=$=>$*(f+T)+($+1)*k,m=g),this.row=v+2,this.column=u,this.realH=g-c,this.realW=f,this.expand=m,this.Size=Math.ceil(e/u)*m;let _=Math.min(e,u*this.row),w=_-1,N;for(;_-- >0;)N=w-_,this.$set(t,N,{x:s,y:c,width:f,height:g-c,space:b(N%u),data:{}});t.length=w+1;let z=[];d/m>w/u&&z.push(["onend"]),this.flyweight&&(this.flyweight[this.direction]=0),this.$nextTick(()=>{this.setindex(this.selectIndex||0),this.scroll()}),z.push(["update:space",{row:(w/u>>0)+1,column:u,showrow:this.row,showcolumn:this.column}]),this.trigger(z)})}}},de={class:"flyweight-all"};function fe(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",de,[(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 K=P(ue,[["render",fe],["__scopeId","data-v-35b94e9b"]]);function H(e,t){return t&&(e=e.replace(/[a-z]/g,"")),e.toLowerCase()}let Q={close:{handler(e){this.change(e)},deep:!0},offset:{handler(e){this.margin(e)},deep:!0}},pe=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],Z={};a.each(pe,(e,t,i)=>{e=H(t),Z["--"+H(t,!0)]=e,i[e]=function(){this.trigger++}},Q);const ge={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:Q,methods:{exec:S,isEmpty:a.isEmpty,isSimplyType:a.isSimplyType,tr(){let e={};return this.margin(this.offset),a.each(Z,(t,i)=>{this.css(e,t,i)}),e},tolower:H,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)}},ye={class:"card-title"},me=["title"],we={class:"card-content"};function be(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",ye,[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,me)])]},!0),r.renderSlot(e.$slots,"content",{},()=>[r.createElementVNode("div",we,[r.renderSlot(e.$slots,"inner",{},void 0,!0)])],!0)],!0)],4)}const ee=P(ge,[["render",be],["__scopeId","data-v-2008eeb3"]]),_e={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 Se(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 te=P(_e,[["render",Se]]),G=/(?:\,|\|{2})/,U="px",X="";let ie=document.documentElement,Y,J=["s-left","s-top","s-right","s-bottom"],ve={left:0,top:1,right:2,bottom:3};const A=[];var xe=he(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let R={},re=null;xe(R,"delay",{get(){return this._delay},set(e){re=ke(()=>{p.runer(A)},e),this._delay=e}});R.delay=60;function ke(e,t){let i=0;return function(){const l=Date.now();l-i>=t&&(i=l,p.runer(e,this,arguments))}}const L=()=>{re()};function $e(e){A.push(e)}const B=new ResizeObserver(L);B.observe(ie);function se(e){e.onresize||(A.push([se,null,e]),e.onresize=!0);var t=ie,i=t.clientHeight,l=p.isNil(e.offset)?15:e.offset,o=e.target,n=e.room,s=e.index,c=e.position,h=o.getBoundingClientRect(),d=n.offsetHeight+l,f=n.offsetWidth+l,g="3,0,2,1".split(G),y,u=(h.height==Y?h.bottom-h.top:h.height)>>0,v=(h.width==Y?h.right-h.left:h.width)>>0,x=t.clientWidth-f,T=i-d,k=[h.left-f,h.top-d,x-h.right,T-h.bottom];c&&(p.each(c.split(G),function(ne,M,C,oe){oe.push(C[M])},ve,y=[]),g.unshift.apply(g,y)),s=p.each(g,function(ne,M,C){if(C[M]>0)return M},k);var m=0,b=0,_=0;if(s!=null){var w=s==0||s==2,N=s==3||s==1;m=N?Math.min(h.left,x):s==2?h.right+l:k[0],d-=l*+w;var z=Math.max(h.top,0),$=Math.min(h.bottom,i),W=($-d+Math.min(i-d,z))/2;b=Math.max(w?W:s==3?h.top+u+l:Math.min(W,k[1]),0),N&&h.left>x&&(_=h.left-m-l+v/2)}let O=n.classList,E=e.css;O.remove(...J),O.add(J[s]),e.index=s,E.left=m+U,E.top=b+U;let F=E["--tips-arrow-top"]=w?Math.min(Math.max(b,z)-b,d-l):X,I=f-3*l;E["--tips-arrow"]=_>I-10||w&&(F+(d>50?15:0)>d||!F)?"hidden":"visible",E["--tips-arrow-left"]=_?Math.min(_,I):X}const Ne={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},borderRadius:{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"&&se({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset>>0})},scrollListener(){this.static||this.parent((e,t,i)=>{t?p.runer(e.addEventListener,e,"scroll",L):(p.runer(B.observe,B,e),(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&(i=this.attr(e,"-tips-scroll"),i||(p.runer(e.addEventListener,e,"scroll",L),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,borderRadius=>--tips-border-radius")),this.css["--arrow-size"]=Math.sqrt(2*Math.pow((this.border||3)*2+2,2))/2>>0,this.init(),R.delay=+this.delay,$e(e=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(e,t){p.runer(e.removeEventListener,e,"scroll",L),p.runer(e.removeAttribute,e,"-tips-scroll",void 0),t||p.runer(B.unobserve,B,e)})}},ze=["static"],Te={class:"tips-title"};function Ee(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,"default",{},()=>[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",Te,r.toDisplayString(i.title),1)],!0),r.renderSlot(e.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(i.content),1)],!0)],!0)],16,ze)):r.createCommentVNode("",!0)}const le=P(Ne,[["render",Ee],["__scopeId","data-v-8c83dee3"]]),Be=[K,ee,te,le],Me={install(e){Be.forEach(t=>{e.component("S"+t.name,t),e.component(t.name+"S",t)})}};exports.Card=ee;exports.Flyweight=K;exports.Stream=te;exports.Tips=le;exports.default=Me;
|
|
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"),he=require("@soei/picker");let ae=/(\d+|[+\-\*/]|%)/g,V={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t,i)=>parseFloat(e)/100*i},j=(e,t)=>{let i;if(i=a.runer("match",e,ae)){let l=i.length,o,n=0,s,c=[];for(;l--;)n=i.shift(),n in V?(o&&c.push(o),n==="%"&&(c.length=2),s=n):+n&&c.push(+n),c.length==2&&(c.push(t),o=V[s].apply(null,c),c.length=0);+o||(o=+c.pop()),e=o>>0}return e},q={},S=(e,t)=>(e+"").replace(/\w+\((.*)\)/g,"$1").replace(q[t]||(q[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,ce=(...e)=>{console.info("::::FLYWEIGHT",...e)};const ue={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){ce(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,d,f,g,y,u)=>{if(c=n/d>>0,y=c+h*(+(c<f%h)+(f/h>>0)),u=y*d+n%d,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,d=o.height,f=(j(this.width,h)||h)+s,g=j(this.height,d)+c,y=[h/f>>0||1,d/g>>0||1];i&&y.reverse();let[u,v]=y,x=this.padding,T,k=0,m,b;i?(m=f,f-=s,b=$=>$*(g-c)+($+1)*c):(n?(f=(h-s*(u+2*x-1))/u,T=!x*s,k=x*s):(T=0,k=(h%f+s*u)/(u+1)>>0,f-=s),b=$=>$*(f+T)+($+1)*k,m=g),this.row=v+2,this.column=u,this.realH=g-c,this.realW=f,this.expand=m,this.Size=Math.ceil(e/u)*m;let _=Math.min(e,u*this.row),w=_-1,N;for(;_-- >0;)N=w-_,this.$set(t,N,{x:s,y:c,width:f,height:g-c,space:b(N%u),data:{}});t.length=w+1;let z=[];d/m>w/u&&z.push(["onend"]),this.flyweight&&(this.flyweight[this.direction]=0),this.$nextTick(()=>{this.setindex(this.selectIndex||0),this.scroll()}),z.push(["update:space",{row:(w/u>>0)+1,column:u,showrow:this.row,showcolumn:this.column}]),this.trigger(z)})}}},de={class:"flyweight-all"};function fe(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",de,[(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 K=C(ue,[["render",fe],["__scopeId","data-v-35b94e9b"]]);function P(e,t){return t&&(e=e.replace(/[a-z]/g,"")),e.toLowerCase()}let Q={close:{handler(e){this.change(e)},deep:!0},offset:{handler(e){this.margin(e)},deep:!0}},pe=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],Z={};a.each(pe,(e,t,i)=>{e=P(t),Z["--"+P(t,!0)]=e,i[e]=function(){this.trigger++}},Q);const ge={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:Q,methods:{exec:S,isEmpty:a.isEmpty,isSimplyType:a.isSimplyType,tr(){let e={};return this.margin(this.offset),a.each(Z,(t,i)=>{this.css(e,t,i)}),e},tolower:P,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)}},ye={class:"card-title"},me=["title"],we={class:"card-content"};function be(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",ye,[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,me)])]},!0),r.renderSlot(e.$slots,"content",{},()=>[r.createElementVNode("div",we,[r.renderSlot(e.$slots,"inner",{},void 0,!0)])],!0)],!0)],4)}const ee=C(ge,[["render",be],["__scopeId","data-v-2008eeb3"]]),_e={name:"Stream",computed:{component(){return this.$refs.component},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"},columns:{type:[Object,Array],default:()=>null},T:{type:[Array,Object],default:()=>null}},mounted(){this.$.vnode.ref&&a.merge(this,{...this.component})},methods:{__trigger(e){let t=e[this.bridge]||e.type;return(this.$slots||this.$scopedSlots)[t]?t:"default"}}};function Se(e,t,i,l,o,n){return r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.type),r.mergeProps({ref:"component"},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 te=C(_e,[["render",Se]]),G=/(?:\,|\|{2})/,U="px",X="";let ie=document.documentElement,Y,J=["s-left","s-top","s-right","s-bottom"],ve={left:0,top:1,right:2,bottom:3};const W=[];var xe=he(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let A={},re=null;xe(A,"delay",{get(){return this._delay},set(e){re=ke(()=>{p.runer(W)},e),this._delay=e}});A.delay=60;function ke(e,t){let i=0;return function(){const l=Date.now();l-i>=t&&(i=l,p.runer(e,this,arguments))}}const L=()=>{re()};function $e(e){W.push(e)}const B=new ResizeObserver(L);B.observe(ie);function se(e){e.onresize||(W.push([se,null,e]),e.onresize=!0);var t=ie,i=t.clientHeight,l=p.isNil(e.offset)?15:e.offset,o=e.target,n=e.room,s=e.index,c=e.position,h=o.getBoundingClientRect(),d=n.offsetHeight+l,f=n.offsetWidth+l,g="3,0,2,1".split(G),y,u=(h.height==Y?h.bottom-h.top:h.height)>>0,v=(h.width==Y?h.right-h.left:h.width)>>0,x=t.clientWidth-f,T=i-d,k=[h.left-f,h.top-d,x-h.right,T-h.bottom];c&&(p.each(c.split(G),function(ne,M,H,oe){oe.push(H[M])},ve,y=[]),g.unshift.apply(g,y)),s=p.each(g,function(ne,M,H){if(H[M]>0)return M},k);var m=0,b=0,_=0;if(s!=null){var w=s==0||s==2,N=s==3||s==1;m=N?Math.min(h.left,x):s==2?h.right+l:k[0],d-=l*+w;var z=Math.max(h.top,0),$=Math.min(h.bottom,i),O=($-d+Math.min(i-d,z))/2;b=Math.max(w?O:s==3?h.top+u+l:Math.min(O,k[1]),0),N&&h.left>x&&(_=h.left-m-l+v/2)}let R=n.classList,E=e.css;R.remove(...J),R.add(J[s]),e.index=s,E.left=m+U,E.top=b+U;let F=E["--tips-arrow-top"]=w?Math.min(Math.max(b,z)-b,d-l):X,I=f-3*l;E["--tips-arrow"]=_>I-10||w&&(F+(d>50?15:0)>d||!F)?"hidden":"visible",E["--tips-arrow-left"]=_?Math.min(_,I):X}const Ne={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},borderRadius:{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"&&se({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset>>0})},scrollListener(){this.static||this.parent((e,t,i)=>{t?p.runer(e.addEventListener,e,"scroll",L):(p.runer(B.observe,B,e),(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&(i=this.attr(e,"-tips-scroll"),i||(p.runer(e.addEventListener,e,"scroll",L),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,borderRadius=>--tips-border-radius")),this.css["--arrow-size"]=Math.sqrt(2*Math.pow((this.border||3)*2+2,2))/2>>0,this.init(),A.delay=+this.delay,$e(e=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(e,t){p.runer(e.removeEventListener,e,"scroll",L),p.runer(e.removeAttribute,e,"-tips-scroll",void 0),t||p.runer(B.unobserve,B,e)})}},ze=["static"],Te={class:"tips-title"};function Ee(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,"default",{},()=>[r.renderSlot(e.$slots,"title",{},()=>[r.createElementVNode("div",Te,r.toDisplayString(i.title),1)],!0),r.renderSlot(e.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(i.content),1)],!0)],!0)],16,ze)):r.createCommentVNode("",!0)}const le=C(Ne,[["render",Ee],["__scopeId","data-v-8c83dee3"]]),Be=[K,ee,te,le],Me={install(e){Be.forEach(t=>{e.component("S"+t.name,t),e.component(t.name+"S",t)})}};exports.Card=ee;exports.Flyweight=K;exports.Stream=te;exports.Tips=le;exports.default=Me;
|
package/Flyweight.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { runer as T, merge as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import { runer as p, isNil as
|
|
4
|
-
import
|
|
5
|
-
let
|
|
1
|
+
import { runer as T, merge as C, isArray as ht, each as W, picker as O, isEmpty as at, isSimplyType as K, isString as xt } from "@soei/util";
|
|
2
|
+
import { openBlock as N, createElementBlock as M, normalizeClass as dt, normalizeStyle as P, createElementVNode as B, Fragment as ct, renderList as ut, renderSlot as g, mergeProps as I, createCommentVNode as ft, createTextVNode as pt, toDisplayString as D, createBlock as St, resolveDynamicComponent as $t, withCtx as Nt } from "vue";
|
|
3
|
+
import { runer as p, isNil as zt, each as Q } from "@soei/tools";
|
|
4
|
+
import kt from "@soei/picker";
|
|
5
|
+
let Tt = /(\d+|[+\-\*/]|%)/g, Z = {
|
|
6
6
|
"+": (t, e) => t + e,
|
|
7
7
|
"-": (t, e) => t - e,
|
|
8
8
|
"*": (t, e) => t * e,
|
|
@@ -10,7 +10,7 @@ let Et = /(\d+|[+\-\*/]|%)/g, Z = {
|
|
|
10
10
|
"%": (t, e, i) => parseFloat(t) / 100 * i
|
|
11
11
|
}, tt = (t, e) => {
|
|
12
12
|
let i;
|
|
13
|
-
if (i = T("match", t,
|
|
13
|
+
if (i = T("match", t, Tt)) {
|
|
14
14
|
let r = i.length, n, l = 0, s, h = [];
|
|
15
15
|
for (; r--; )
|
|
16
16
|
l = i.shift(), l in Z ? (n && h.push(n), l === "%" && (h.length = 2), s = l) : +l && h.push(+l), h.length == 2 && (h.push(e), n = Z[s].apply(null, h), h.length = 0);
|
|
@@ -24,16 +24,16 @@ let Et = /(\d+|[+\-\*/]|%)/g, Z = {
|
|
|
24
24
|
et[e] || (et[e] = new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)", "g")),
|
|
25
25
|
"$1px"
|
|
26
26
|
);
|
|
27
|
-
const
|
|
27
|
+
const j = (t, e) => {
|
|
28
28
|
const i = t.__vccOpts || t;
|
|
29
29
|
for (const [r, n] of e)
|
|
30
30
|
i[r] = n;
|
|
31
31
|
return i;
|
|
32
32
|
};
|
|
33
|
-
let it = (t) => t == null || t == null,
|
|
33
|
+
let it = (t) => t == null || t == null, Mt = (...t) => {
|
|
34
34
|
console.info("::::FLYWEIGHT", ...t);
|
|
35
35
|
};
|
|
36
|
-
const
|
|
36
|
+
const Et = {
|
|
37
37
|
name: "Flyweight",
|
|
38
38
|
props: {
|
|
39
39
|
flys: {
|
|
@@ -97,7 +97,7 @@ const Lt = {
|
|
|
97
97
|
},
|
|
98
98
|
style() {
|
|
99
99
|
var t = this.w, e = this.h, i = this.Size, r = {};
|
|
100
|
-
return
|
|
100
|
+
return C(r, {
|
|
101
101
|
"--width": _(this.realW),
|
|
102
102
|
"--height": _(this.realH),
|
|
103
103
|
"--flyweight-content": _(i)
|
|
@@ -156,7 +156,7 @@ const Lt = {
|
|
|
156
156
|
this.rebuild(), this.$emit("resize");
|
|
157
157
|
}).observe(this.flyweight);
|
|
158
158
|
} catch (t) {
|
|
159
|
-
|
|
159
|
+
Mt(t);
|
|
160
160
|
}
|
|
161
161
|
this.scrollx = T("hasAttribute", this.flyweight, "scroll-x"), this.BoxRule = /* this.scrollx ? 'clientHeight=>width,clientWidth=>height' : */
|
|
162
162
|
"clientHeight=>height,clientWidth=>width", this.direction = this.scrollx ? "scrollLeft" : "scrollTop";
|
|
@@ -165,7 +165,7 @@ const Lt = {
|
|
|
165
165
|
exec: _,
|
|
166
166
|
trigger(t, e) {
|
|
167
167
|
ht(t) || (t = t && e ? [[t, e]] : []), t.length && this.lazyrun(() => {
|
|
168
|
-
|
|
168
|
+
W(t, (i, r) => {
|
|
169
169
|
this.$emit(r[0], it(r[1]) ? !0 : r[1]);
|
|
170
170
|
});
|
|
171
171
|
});
|
|
@@ -177,7 +177,7 @@ const Lt = {
|
|
|
177
177
|
setview(t) {
|
|
178
178
|
T([this.cheackflys, (e) => {
|
|
179
179
|
e = e || {};
|
|
180
|
-
let i = e.index ||
|
|
180
|
+
let i = e.index || W(this.flys, (r, n, l, s) => {
|
|
181
181
|
if (n[l] == s)
|
|
182
182
|
return r;
|
|
183
183
|
}, e.picker, e.id);
|
|
@@ -207,13 +207,13 @@ const Lt = {
|
|
|
207
207
|
/* 显示区域第一行的索引 */
|
|
208
208
|
index: i / this.expand >> 0
|
|
209
209
|
};
|
|
210
|
-
|
|
210
|
+
C(r, this.space), t.from || e.push(["onscroll", r]);
|
|
211
211
|
let n = !1;
|
|
212
|
-
|
|
212
|
+
W(
|
|
213
213
|
this.flyweights,
|
|
214
|
-
(l, s, h, o, d,
|
|
214
|
+
(l, s, h, o, d, c, u, f, a) => {
|
|
215
215
|
if (h = l / d >> 0, f = h + o * /* 偏移量, 如果超出顶部 + 1轮,排列到列队后, 否则保持在当前*/
|
|
216
|
-
(+(h <
|
|
216
|
+
(+(h < c % o) + (c / o >> 0)), a = f * d + l % d, a >= this.count) {
|
|
217
217
|
n || (e.push(["onend"]), n = !0);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
@@ -224,7 +224,7 @@ const Lt = {
|
|
|
224
224
|
/* left */
|
|
225
225
|
s.space
|
|
226
226
|
];
|
|
227
|
-
|
|
227
|
+
u && v.reverse(), s.top = v[0], s.left = v[1];
|
|
228
228
|
},
|
|
229
229
|
null,
|
|
230
230
|
this.row,
|
|
@@ -242,23 +242,23 @@ const Lt = {
|
|
|
242
242
|
if (!t)
|
|
243
243
|
return e.length = t;
|
|
244
244
|
this.count = t;
|
|
245
|
-
let i = this.scrollx, r = this.flyweight, n =
|
|
245
|
+
let i = this.scrollx, r = this.flyweight, n = O(r, this.BoxRule);
|
|
246
246
|
this.$nextTick(() => {
|
|
247
|
-
let l = /true/.test(this.auto), [s, h] = this.offset, o = n.width, d = n.height,
|
|
247
|
+
let l = /true/.test(this.auto), [s, h] = this.offset, o = n.width, d = n.height, c = (tt(this.width, o) || o) + s, u = tt(this.height, d) + h, f = [o / c >> 0 || 1, d / u >> 0 || 1];
|
|
248
248
|
i && f.reverse();
|
|
249
249
|
let [a, v] = f, x = this.padding, E, S = 0, y, w;
|
|
250
|
-
i ? (y =
|
|
250
|
+
i ? (y = c, c -= s, w = ($) => (
|
|
251
251
|
/* 计算top偏移量 */
|
|
252
|
-
$ * (
|
|
253
|
-
)) : (l ? (
|
|
254
|
-
let b = Math.min(t, a * this.row), m = b - 1,
|
|
252
|
+
$ * (u - h) + ($ + 1) * h
|
|
253
|
+
)) : (l ? (c = (o - s * (a + 2 * x - 1)) / a, E = !x * s, S = x * s) : (E = 0, S = (o % c + s * a) / (a + 1) >> 0, c -= s), w = ($) => $ * (c + E) + ($ + 1) * S, y = u), this.row = v + 2, this.column = a, this.realH = u - h, this.realW = c, this.expand = y, this.Size = Math.ceil(t / a) * y;
|
|
254
|
+
let b = Math.min(t, a * this.row), m = b - 1, z;
|
|
255
255
|
for (; b-- > 0; )
|
|
256
|
-
|
|
256
|
+
z = m - b, this.$set(e, z, {
|
|
257
257
|
x: s,
|
|
258
258
|
y: h,
|
|
259
|
-
width:
|
|
260
|
-
height:
|
|
261
|
-
space: w(
|
|
259
|
+
width: c,
|
|
260
|
+
height: u - h,
|
|
261
|
+
space: w(z % a),
|
|
262
262
|
data: {}
|
|
263
263
|
});
|
|
264
264
|
e.length = m + 1;
|
|
@@ -274,32 +274,32 @@ const Lt = {
|
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
},
|
|
278
|
-
function
|
|
279
|
-
return
|
|
277
|
+
}, Ht = { class: "flyweight-all" };
|
|
278
|
+
function Lt(t, e, i, r, n, l) {
|
|
279
|
+
return N(), M("div", {
|
|
280
280
|
ref: "flyweight",
|
|
281
281
|
class: dt(["flyweight", {
|
|
282
282
|
"flyweight-active": n.actice
|
|
283
283
|
}]),
|
|
284
|
-
style:
|
|
284
|
+
style: P(l.style),
|
|
285
285
|
onScroll: e[0] || (e[0] = (...s) => l.scroll && l.scroll(...s))
|
|
286
286
|
}, [
|
|
287
|
-
|
|
288
|
-
(
|
|
287
|
+
B("div", Ht, [
|
|
288
|
+
(N(!0), M(ct, null, ut(n.flyweights, (s, h) => (N(), M("div", {
|
|
289
289
|
key: h,
|
|
290
|
-
style:
|
|
290
|
+
style: P({
|
|
291
291
|
top: s.top + "px",
|
|
292
292
|
left: s.left + "px"
|
|
293
293
|
})
|
|
294
294
|
}, [
|
|
295
|
-
g(t.$slots, "default",
|
|
295
|
+
g(t.$slots, "default", I({ ref_for: !0 }, s), void 0, !0)
|
|
296
296
|
], 4))), 128))
|
|
297
297
|
]),
|
|
298
298
|
n.flyweights.length ? g(t.$slots, "end", { key: 0 }, void 0, !0) : ft("", !0)
|
|
299
299
|
], 38);
|
|
300
300
|
}
|
|
301
|
-
const Wt = /* @__PURE__ */
|
|
302
|
-
function
|
|
301
|
+
const Wt = /* @__PURE__ */ j(Et, [["render", Lt], ["__scopeId", "data-v-35b94e9b"]]);
|
|
302
|
+
function G(t, e) {
|
|
303
303
|
return e && (t = t.replace(/[a-z]/g, "")), t.toLowerCase();
|
|
304
304
|
}
|
|
305
305
|
let gt = {
|
|
@@ -315,7 +315,7 @@ let gt = {
|
|
|
315
315
|
},
|
|
316
316
|
deep: !0
|
|
317
317
|
}
|
|
318
|
-
},
|
|
318
|
+
}, Bt = [
|
|
319
319
|
"BackGround",
|
|
320
320
|
"BordeR",
|
|
321
321
|
"Height",
|
|
@@ -325,16 +325,16 @@ let gt = {
|
|
|
325
325
|
"Bottom",
|
|
326
326
|
"Left"
|
|
327
327
|
], yt = {};
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
W(
|
|
329
|
+
Bt,
|
|
330
330
|
(t, e, i) => {
|
|
331
|
-
t =
|
|
331
|
+
t = G(e), yt["--" + G(e, !0)] = t, i[t] = function() {
|
|
332
332
|
this.trigger++;
|
|
333
333
|
};
|
|
334
334
|
},
|
|
335
335
|
gt
|
|
336
336
|
);
|
|
337
|
-
const
|
|
337
|
+
const Ct = {
|
|
338
338
|
name: "Card",
|
|
339
339
|
// inheritAttrs: false,
|
|
340
340
|
props: {
|
|
@@ -400,25 +400,25 @@ const Bt = {
|
|
|
400
400
|
isSimplyType: K,
|
|
401
401
|
tr() {
|
|
402
402
|
let t = {};
|
|
403
|
-
return this.margin(this.offset),
|
|
403
|
+
return this.margin(this.offset), W(yt, (e, i) => {
|
|
404
404
|
this.css(t, e, i);
|
|
405
405
|
}), t;
|
|
406
406
|
},
|
|
407
|
-
tolower:
|
|
407
|
+
tolower: G,
|
|
408
408
|
css(t, e, i) {
|
|
409
409
|
let r = this[i] || this.default[i];
|
|
410
410
|
!r || this.default[i] == r || (t[e] = _(r));
|
|
411
411
|
},
|
|
412
412
|
change(t) {
|
|
413
|
-
K(t) || (this.closecss =
|
|
413
|
+
K(t) || (this.closecss = O(
|
|
414
414
|
t,
|
|
415
415
|
"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"
|
|
416
416
|
));
|
|
417
417
|
},
|
|
418
418
|
margin(t) {
|
|
419
|
-
|
|
419
|
+
C(
|
|
420
420
|
this,
|
|
421
|
-
|
|
421
|
+
O(
|
|
422
422
|
xt(t) ? t.split(/\s*(?:,|\s+)\s*/) : t,
|
|
423
423
|
"0=>top,1|0=>right,2|0=>bottom,3|1|0=>left",
|
|
424
424
|
!0
|
|
@@ -430,39 +430,42 @@ const Bt = {
|
|
|
430
430
|
mounted() {
|
|
431
431
|
this.change(this.close);
|
|
432
432
|
}
|
|
433
|
-
},
|
|
434
|
-
function
|
|
435
|
-
return
|
|
433
|
+
}, Rt = { class: "card-title" }, At = ["title"], Ot = { class: "card-content" };
|
|
434
|
+
function Pt(t, e, i, r, n, l) {
|
|
435
|
+
return N(), M("div", {
|
|
436
436
|
class: "card",
|
|
437
437
|
key: n.trigger,
|
|
438
|
-
style:
|
|
438
|
+
style: P(l.isEmpty(l.style) ? l.tr() : l.style)
|
|
439
439
|
}, [
|
|
440
440
|
g(t.$slots, "default", {}, () => [
|
|
441
441
|
g(t.$slots, "title", {}, () => {
|
|
442
442
|
var s;
|
|
443
443
|
return [
|
|
444
|
-
|
|
445
|
-
pt(
|
|
446
|
-
|
|
444
|
+
B("div", Rt, [
|
|
445
|
+
pt(D(i.show || i.title) + " ", 1),
|
|
446
|
+
B("div", {
|
|
447
447
|
class: dt(["card-close", { hide: l.isSimplyType(i.close) ? !i.close : !1 }]),
|
|
448
|
-
style:
|
|
448
|
+
style: P(n.closecss),
|
|
449
449
|
onClick: e[0] || (e[0] = (h) => t.$emit("close")),
|
|
450
450
|
title: (s = i.close) == null ? void 0 : s.tips
|
|
451
|
-
}, null, 14,
|
|
451
|
+
}, null, 14, At)
|
|
452
452
|
])
|
|
453
453
|
];
|
|
454
454
|
}, !0),
|
|
455
455
|
g(t.$slots, "content", {}, () => [
|
|
456
|
-
|
|
456
|
+
B("div", Ot, [
|
|
457
457
|
g(t.$slots, "inner", {}, void 0, !0)
|
|
458
458
|
])
|
|
459
459
|
], !0)
|
|
460
460
|
], !0)
|
|
461
461
|
], 4);
|
|
462
462
|
}
|
|
463
|
-
const
|
|
463
|
+
const It = /* @__PURE__ */ j(Ct, [["render", Pt], ["__scopeId", "data-v-2008eeb3"]]), jt = {
|
|
464
464
|
name: "Stream",
|
|
465
465
|
computed: {
|
|
466
|
+
component() {
|
|
467
|
+
return this.$refs.component;
|
|
468
|
+
},
|
|
466
469
|
column() {
|
|
467
470
|
let { columns: t, T: e } = this, i = t || e;
|
|
468
471
|
return at(i) ? [] : ht(i) ? i : [i];
|
|
@@ -478,10 +481,6 @@ const Ft = /* @__PURE__ */ I(Bt, [["render", jt], ["__scopeId", "data-v-2008eeb3
|
|
|
478
481
|
type: String,
|
|
479
482
|
default: "div"
|
|
480
483
|
},
|
|
481
|
-
data: {
|
|
482
|
-
type: Array,
|
|
483
|
-
default: () => []
|
|
484
|
-
},
|
|
485
484
|
columns: {
|
|
486
485
|
type: [Object, Array],
|
|
487
486
|
default: () => null
|
|
@@ -491,32 +490,35 @@ const Ft = /* @__PURE__ */ I(Bt, [["render", jt], ["__scopeId", "data-v-2008eeb3
|
|
|
491
490
|
default: () => null
|
|
492
491
|
}
|
|
493
492
|
},
|
|
493
|
+
mounted() {
|
|
494
|
+
this.$.vnode.ref && C(this, { ...this.component });
|
|
495
|
+
},
|
|
494
496
|
methods: {
|
|
495
|
-
|
|
497
|
+
__trigger(t) {
|
|
496
498
|
let e = t[this.bridge] || t.type;
|
|
497
499
|
return (this.$slots || this.$scopedSlots)[e] ? e : "default";
|
|
498
500
|
}
|
|
499
501
|
}
|
|
500
502
|
};
|
|
501
|
-
function
|
|
502
|
-
return
|
|
503
|
-
default:
|
|
504
|
-
(
|
|
503
|
+
function Ft(t, e, i, r, n, l) {
|
|
504
|
+
return N(), St($t(i.type), I({ ref: "component" }, t.$attrs), {
|
|
505
|
+
default: Nt(() => [
|
|
506
|
+
(N(!0), M(ct, null, ut(l.column, (s) => g(t.$slots, l.__trigger(s), I({
|
|
505
507
|
key: s.type
|
|
506
508
|
}, { ref_for: !0 }, s))), 128))
|
|
507
509
|
]),
|
|
508
510
|
_: 3
|
|
509
511
|
}, 16);
|
|
510
512
|
}
|
|
511
|
-
const
|
|
512
|
-
let mt = document.documentElement, nt, ot = ["s-left", "s-top", "s-right", "s-bottom"],
|
|
513
|
+
const Dt = /* @__PURE__ */ j(jt, [["render", Ft]]), st = /(?:\,|\|{2})/, rt = "px", lt = "";
|
|
514
|
+
let mt = document.documentElement, nt, ot = ["s-left", "s-top", "s-right", "s-bottom"], Gt = { left: 0, top: 1, right: 2, bottom: 3 };
|
|
513
515
|
const U = [];
|
|
514
|
-
var
|
|
516
|
+
var Ut = kt(
|
|
515
517
|
window,
|
|
516
518
|
"Reflect.defineProperty|Object.defineProperty=>Proxy"
|
|
517
519
|
).Proxy;
|
|
518
520
|
let V = {}, wt = null;
|
|
519
|
-
|
|
521
|
+
Ut(V, "delay", {
|
|
520
522
|
/**
|
|
521
523
|
* 获取延迟时间值
|
|
522
524
|
* @returns {number} 返回当前实例的延迟时间属性值
|
|
@@ -525,13 +527,13 @@ qt(V, "delay", {
|
|
|
525
527
|
return this._delay;
|
|
526
528
|
},
|
|
527
529
|
set(t) {
|
|
528
|
-
wt =
|
|
530
|
+
wt = Vt(() => {
|
|
529
531
|
p(U);
|
|
530
532
|
}, t), this._delay = t;
|
|
531
533
|
}
|
|
532
534
|
});
|
|
533
535
|
V.delay = 60;
|
|
534
|
-
function
|
|
536
|
+
function Vt(t, e) {
|
|
535
537
|
let i = 0;
|
|
536
538
|
return function() {
|
|
537
539
|
const r = Date.now();
|
|
@@ -541,16 +543,16 @@ function Xt(t, e) {
|
|
|
541
543
|
const A = () => {
|
|
542
544
|
wt();
|
|
543
545
|
};
|
|
544
|
-
function
|
|
546
|
+
function qt(t) {
|
|
545
547
|
U.push(t);
|
|
546
548
|
}
|
|
547
549
|
const L = new ResizeObserver(A);
|
|
548
550
|
L.observe(mt);
|
|
549
551
|
function bt(t) {
|
|
550
552
|
t.onresize || (U.push([bt, null, t]), t.onresize = !0);
|
|
551
|
-
var e = mt, i = e.clientHeight, r =
|
|
553
|
+
var e = mt, i = e.clientHeight, r = zt(t.offset) ? 15 : t.offset, n = t.target, l = t.room, s = t.index, h = t.position, o = n.getBoundingClientRect(), d = l.offsetHeight + r, c = l.offsetWidth + r, u = "3,0,2,1".split(st), f, a = (o.height == nt ? o.bottom - o.top : o.height) >> 0, v = (o.width == nt ? o.right - o.left : o.width) >> 0, x = e.clientWidth - c, E = i - d, S = [
|
|
552
554
|
/* left: 0 */
|
|
553
|
-
o.left -
|
|
555
|
+
o.left - c,
|
|
554
556
|
/* top: 1 */
|
|
555
557
|
o.top - d,
|
|
556
558
|
/* right: 2 */
|
|
@@ -560,23 +562,23 @@ function bt(t) {
|
|
|
560
562
|
];
|
|
561
563
|
h && (Q(
|
|
562
564
|
h.split(st),
|
|
563
|
-
function(_t,
|
|
564
|
-
vt.push(
|
|
565
|
+
function(_t, R, F, vt) {
|
|
566
|
+
vt.push(F[R]);
|
|
565
567
|
},
|
|
566
|
-
|
|
568
|
+
Gt,
|
|
567
569
|
f = []
|
|
568
|
-
),
|
|
569
|
-
|
|
570
|
-
function(_t,
|
|
571
|
-
if (
|
|
572
|
-
return
|
|
570
|
+
), u.unshift.apply(u, f)), s = Q(
|
|
571
|
+
u,
|
|
572
|
+
function(_t, R, F) {
|
|
573
|
+
if (F[R] > 0)
|
|
574
|
+
return R;
|
|
573
575
|
},
|
|
574
576
|
S
|
|
575
577
|
);
|
|
576
578
|
var y = 0, w = 0, b = 0;
|
|
577
579
|
if (s != null) {
|
|
578
|
-
var m = s == 0 || s == 2,
|
|
579
|
-
y =
|
|
580
|
+
var m = s == 0 || s == 2, z = s == 3 || s == 1;
|
|
581
|
+
y = z ? Math.min(o.left, x) : s == 2 ? o.right + r : S[0], d -= r * +m;
|
|
580
582
|
var k = Math.max(o.top, 0), $ = Math.min(
|
|
581
583
|
o.bottom,
|
|
582
584
|
i
|
|
@@ -584,7 +586,7 @@ function bt(t) {
|
|
|
584
586
|
w = Math.max(
|
|
585
587
|
m ? q : s == 3 ? o.top + a + r : Math.min(q, S[1]),
|
|
586
588
|
0
|
|
587
|
-
),
|
|
589
|
+
), z && o.left > x && (b = o.left - y - r + v / 2);
|
|
588
590
|
}
|
|
589
591
|
let X = l.classList, H = t.css;
|
|
590
592
|
X.remove(...ot), X.add(ot[s]), t.index = s, H.left = y + rt, H.top = w + rt;
|
|
@@ -592,10 +594,10 @@ function bt(t) {
|
|
|
592
594
|
/* 底边距 */
|
|
593
595
|
Math.max(w, k) - w,
|
|
594
596
|
d - r
|
|
595
|
-
) : lt, J =
|
|
597
|
+
) : lt, J = c - 3 * r;
|
|
596
598
|
H["--tips-arrow"] = b > J - 10 || m && (Y + (d > 50 ? 15 : 0) > d || !Y) ? "hidden" : "visible", H["--tips-arrow-left"] = b ? Math.min(b, J) : lt;
|
|
597
599
|
}
|
|
598
|
-
const
|
|
600
|
+
const Xt = {
|
|
599
601
|
name: "Tips",
|
|
600
602
|
props: {
|
|
601
603
|
/* 是否显示 */
|
|
@@ -707,13 +709,13 @@ const Jt = {
|
|
|
707
709
|
}
|
|
708
710
|
},
|
|
709
711
|
mounted() {
|
|
710
|
-
|
|
712
|
+
C(
|
|
711
713
|
this.css,
|
|
712
|
-
|
|
714
|
+
O(
|
|
713
715
|
this.$props,
|
|
714
716
|
"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size,borderRadius=>--tips-border-radius"
|
|
715
717
|
)
|
|
716
|
-
), this.css["--arrow-size"] = Math.sqrt(2 * Math.pow((this.border || 3) * 2 + 2, 2)) / 2 >> 0, this.init(), V.delay = +this.delay,
|
|
718
|
+
), this.css["--arrow-size"] = Math.sqrt(2 * Math.pow((this.border || 3) * 2 + 2, 2)) / 2 >> 0, this.init(), V.delay = +this.delay, qt((t) => {
|
|
717
719
|
this.scrollListener();
|
|
718
720
|
}), this.scrollListener();
|
|
719
721
|
},
|
|
@@ -722,9 +724,9 @@ const Jt = {
|
|
|
722
724
|
p(t.removeEventListener, t, "scroll", A), p(t.removeAttribute, t, "-tips-scroll", void 0), e || p(L.unobserve, L, t);
|
|
723
725
|
});
|
|
724
726
|
}
|
|
725
|
-
},
|
|
726
|
-
function
|
|
727
|
-
return i.visible ? (
|
|
727
|
+
}, Yt = ["static"], Jt = { class: "tips-title" };
|
|
728
|
+
function Kt(t, e, i, r, n, l) {
|
|
729
|
+
return i.visible ? (N(), M("div", I({
|
|
728
730
|
key: 0,
|
|
729
731
|
class: "tips",
|
|
730
732
|
style: i.static ? null : n.css,
|
|
@@ -732,25 +734,25 @@ function Zt(t, e, i, r, n, l) {
|
|
|
732
734
|
}, t.$attrs), [
|
|
733
735
|
g(t.$slots, "default", {}, () => [
|
|
734
736
|
g(t.$slots, "title", {}, () => [
|
|
735
|
-
|
|
737
|
+
B("div", Jt, D(i.title), 1)
|
|
736
738
|
], !0),
|
|
737
739
|
g(t.$slots, "content", {}, () => [
|
|
738
|
-
pt(
|
|
740
|
+
pt(D(i.content), 1)
|
|
739
741
|
], !0)
|
|
740
742
|
], !0)
|
|
741
|
-
], 16,
|
|
743
|
+
], 16, Yt)) : ft("", !0);
|
|
742
744
|
}
|
|
743
|
-
const
|
|
745
|
+
const Qt = /* @__PURE__ */ j(Xt, [["render", Kt], ["__scopeId", "data-v-8c83dee3"]]), Zt = [Wt, It, Dt, Qt], re = {
|
|
744
746
|
install(t) {
|
|
745
|
-
|
|
747
|
+
Zt.forEach((e) => {
|
|
746
748
|
t.component("S" + e.name, e), t.component(e.name + "S", e);
|
|
747
749
|
});
|
|
748
750
|
}
|
|
749
751
|
};
|
|
750
752
|
export {
|
|
751
|
-
|
|
753
|
+
It as Card,
|
|
752
754
|
Wt as Flyweight,
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
755
|
+
Dt as Stream,
|
|
756
|
+
Qt as Tips,
|
|
757
|
+
re as default
|
|
756
758
|
};
|
package/README.md
CHANGED
|
@@ -7,7 +7,14 @@
|
|
|
7
7
|
[](https://npmjs.com/package/@soei/flyweight)
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<!-- 版本 0.3.
|
|
10
|
+
<!-- 版本 0.3.12 优化 和 部分代码优化-->
|
|
11
|
+
<Card [space|space="around|evenly"|nothing]
|
|
12
|
+
...
|
|
13
|
+
/>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<!-- 版本 0.3.11 新增属Tips -->
|
|
11
18
|
<!-- arrow: 显示箭头 -->
|
|
12
19
|
<!-- [notice|warn|simply]: 内置样式, 不喜欢可以background="..." color="..." -->
|
|
13
20
|
<Tips
|
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-font-size: 8px;--tips-border-radius: 10;--tips-border-width: 3;--tips-offset: 4}.tips.warning[data-v-8c83dee3],.tips.warn[data-v-8c83dee3]{--tips-background-color: #f44336}.tips.notice[data-v-8c83dee3]{--tips-background-color: #ff9800}.tips.simply[data-v-8c83dee3]{--tips-background-color: #00BCD4}.tips[data-v-8c83dee3]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:calc(var(--tips-border-radius) * 1px);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-8c83dee3]{transition:all .3s}.tips-title[data-v-8c83dee3]:empty{display:none}.tips-title[data-v-8c83dee3]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips[static][data-v-8c83dee3]{position:static!important}.tips.arrow[data-v-8c83dee3]{--deg: 45deg}.tips.arrow[data-v-8c83dee3]:before{transition:all .3s;content:"";visibility:var(--tips-arrow);position:absolute;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);background-color:var(--tips-background-color);height:calc(var(--tips-border-width) * 2px + 2px);width:calc(var(--tips-border-width) * 2px + 2px);transform:rotate(var(--deg));transform-origin:50% 50%;border-left:0;border-top:0;z-index:-1;border-radius:3px}.tips.s-left[data-v-8c83dee3]:before{--deg: -45deg;right:calc(var(--arrow-size) * -1px - 1px)}.tips.s-right[data-v-8c83dee3]:before{--deg: 135deg;left:calc(var(--arrow-size) * -1px - 1px)}.tips.s-left[data-v-8c83dee3]:before,.tips.s-right[data-v-8c83dee3]:before{top:calc(var(--tips-arrow-top) * 1px)}.tips.s-top[data-v-8c83dee3]:before{bottom:calc(var(--arrow-size) * -1px - 1px)}.tips.s-bottom[data-v-8c83dee3]:before{--deg: -135deg;top:calc(var(--arrow-size) * -1px - 1px)}.tips.s-top[data-v-8c83dee3]:before,.tips.s-bottom[data-v-8c83dee3]:before{left:calc(var(--tips-arrow-left) * 1px)}
|
|
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[nothing][data-v-2008eeb3],.card [nothing][data-v-2008eeb3]{margin:0!important;padding:0!important;border:0!important}.card[flex][data-v-2008eeb3],.card[space][data-v-2008eeb3],.card[row][data-v-2008eeb3],.card[column][data-v-2008eeb3],.card [flex][data-v-2008eeb3],.card [space][data-v-2008eeb3],.card [row][data-v-2008eeb3],.card [column][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[space][data-v-2008eeb3],.card [space][data-v-2008eeb3]{justify-content:space-between}.card[space=around][data-v-2008eeb3],.card [space=around][data-v-2008eeb3]{justify-content:space-around}.card[space=evenly][data-v-2008eeb3],.card [space=evenly][data-v-2008eeb3]{justify-content:space-evenly}.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: 10;--tips-border-width: 3;--tips-offset: 4}.tips.warning[data-v-8c83dee3],.tips.warn[data-v-8c83dee3]{--tips-background-color: #f44336}.tips.notice[data-v-8c83dee3]{--tips-background-color: #ff9800}.tips.simply[data-v-8c83dee3]{--tips-background-color: #00BCD4}.tips[data-v-8c83dee3]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:calc(var(--tips-border-radius) * 1px);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-8c83dee3]{transition:all .3s}.tips-title[data-v-8c83dee3]:empty{display:none}.tips-title[data-v-8c83dee3]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips[static][data-v-8c83dee3]{position:static!important}.tips.arrow[data-v-8c83dee3]{--deg: 45deg}.tips.arrow[data-v-8c83dee3]:before{transition:all .3s;content:"";visibility:var(--tips-arrow);position:absolute;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);background-color:var(--tips-background-color);height:calc(var(--tips-border-width) * 2px + 2px);width:calc(var(--tips-border-width) * 2px + 2px);transform:rotate(var(--deg));transform-origin:50% 50%;border-left:0;border-top:0;z-index:-1;border-radius:3px}.tips.s-left[data-v-8c83dee3]:before{--deg: -45deg;right:calc(var(--arrow-size) * -1px - 1px)}.tips.s-right[data-v-8c83dee3]:before{--deg: 135deg;left:calc(var(--arrow-size) * -1px - 1px)}.tips.s-left[data-v-8c83dee3]:before,.tips.s-right[data-v-8c83dee3]:before{top:calc(var(--tips-arrow-top) * 1px)}.tips.s-top[data-v-8c83dee3]:before{bottom:calc(var(--arrow-size) * -1px - 1px)}.tips.s-bottom[data-v-8c83dee3]:before{--deg: -135deg;top:calc(var(--arrow-size) * -1px - 1px)}.tips.s-top[data-v-8c83dee3]:before,.tips.s-bottom[data-v-8c83dee3]:before{left:calc(var(--tips-arrow-left) * 1px)}
|
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"),ot=require("@soei/picker");let ht=/(\d+|[+\-\*/]|%)/g,j={"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e,i)=>parseFloat(t)/100*i},I=(t,e)=>{let i;if(i=o.runer("match",t,ht)){let s=i.length,l,u=0,n,a=[];for(;s--;)u=i.shift(),u in j?(l&&a.push(l),u==="%"&&(a.length=2),n=u):+u&&a.push(+u),a.length==2&&(a.push(e),l=j[n].apply(null,a),a.length=0);+l||(l=+a.pop()),t=l>>0}return t},q={},b=(t,e)=>(t+"").replace(/\w+\((.*)\)/g,"$1").replace(q[e]||(q[e]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");function E(t,e,i,s,l,u,n,a){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 h;if(n?(h=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=h):l&&(h=a?function(){l.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:l),h)if(r.functional){r._injectStyles=h;var d=r.render;r.render=function(f,_){return h.call(_),d(f,_)}}else{var p=r.beforeCreate;r.beforeCreate=p?[].concat(p,h):[h]}return{exports:t,options:r}}let U=t=>t==null||t==null,at=(...t)=>{console.info("::::FLYWEIGHT",...t)};const ut={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){at(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,a,r,h,d,p,c,f)=>{if(a=u/h>>0,c=a+r*(+(a<d%r)+(d/r>>0)),f=c*h+u%h,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,a]=this.offset,r=l.width,h=l.height,d=(I(this.width,r)||r)+n,p=I(this.height,h)+a,c=[r/d>>0||1,h/p>>0||1];i&&c.reverse();let[f,_]=c,x=this.padding,N,S=0,y,v;i?(y=d,d-=n,v=$=>$*(p-a)+($+1)*a):(u?(d=(r-n*(f+2*x-1))/f,N=!x*n,S=x*n):(N=0,S=(r%d+n*f)/(f+1)>>0,d-=n),v=$=>$*(d+N)+($+1)*S,y=p),this.row=_+2,this.column=f,this.realH=p-a,this.realW=d,this.expand=y,this.Size=Math.ceil(t/f)*y;let w=Math.min(t,f*this.row),m=w-1,T;for(;w-- >0;)T=m-w,this.$set(e,T,{x:n,y:a,width:d,height:p-a,space:v(T%f),data:{}});e.length=m+1;let z=[];h/y>m/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:(m/f>>0)+1,column:f,showrow:this.row,showcolumn:this.column}]),this.trigger(z)})}}};var ct=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)},ft=[],dt=E(ut,ct,ft,!1,null,"d5f1cd63",null,null);const J=dt.exports;function L(t,e){return e&&(t=t.replace(/[a-z]/g,"")),t.toLowerCase()}let K={close:{handler(t){this.change(t)},deep:!0},offset:{handler(t){this.margin(t)},deep:!0}},pt=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],Q={};o.each(pt,(t,e,i)=>{t=L(e),Q["--"+L(e,!0)]=t,i[t]=function(){this.trigger++}},K);const gt={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:K,methods:{exec:b,isEmpty:o.isEmpty,isSimplyType:o.isSimplyType,tr(){let t={};return this.margin(this.offset),o.each(Q,(e,i)=>{this.css(t,e,i)}),t},tolower:L,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 _t=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)},yt=[],mt=E(gt,_t,yt,!1,null,"ec96bb2a",null,null);const Z=mt.exports,vt={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 wt=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)},bt=[],xt=E(vt,wt,bt,!1,null,null,null,null);const tt=xt.exports,X=/(?:\,|\|{2})/,G="px",D="";let et=document.documentElement,V,Y=["s-left","s-top","s-right","s-bottom"],St={left:0,top:1,right:2,bottom:3};const W=[];var $t=ot(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let A={},it=null;$t(A,"delay",{get(){return this._delay},set(t){it=Tt(()=>{g.runer(W)},t),this._delay=t}});A.delay=60;function Tt(t,e){let i=0;return function(){const s=Date.now();s-i>=e&&(i=s,g.runer(t,this,arguments))}}const M=()=>{it()};function zt(t){W.push(t)}const k=new ResizeObserver(M);k.observe(et);function st(t){t.onresize||(W.push([st,null,t]),t.onresize=!0);var e=et,i=e.clientHeight,s=g.isNil(t.offset)?15:t.offset,l=t.target,u=t.room,n=t.index,a=t.position,r=l.getBoundingClientRect(),h=u.offsetHeight+s,d=u.offsetWidth+s,p="3,0,2,1".split(X),c,f=(r.height==V?r.bottom-r.top:r.height)>>0,_=(r.width==V?r.right-r.left:r.width)>>0,x=e.clientWidth-d,N=i-h,S=[r.left-d,r.top-h,x-r.right,N-r.bottom];a&&(g.each(a.split(X),function(nt,R,H,lt){lt.push(H[R])},St,c=[]),p.unshift.apply(p,c)),n=g.each(p,function(nt,R,H){if(H[R]>0)return R},S);var y=0,v=0,w=0;if(n!=null){var m=n==0||n==2,T=n==3||n==1;y=T?Math.min(r.left,x):n==2?r.right+s:S[0],h-=s*+m;var z=Math.max(r.top,0),$=Math.min(r.bottom,i),O=($-h+Math.min(i-h,z))/2;v=Math.max(m?O:n==3?r.top+f+s:Math.min(O,S[1]),0),T&&r.left>x&&(w=r.left-y-s+_/2)}let F=u.classList,C=t.css;F.remove(...Y),F.add(Y[n]),t.index=n,C.left=y+G,C.top=v+G;let P=C["--tips-arrow-top"]=m?Math.min(Math.max(v,z)-v,h-s):D,B=d-3*s;C["--tips-arrow"]=w>B-10||m&&(P+(h>50?15:0)>h||!P)?"hidden":"visible",C["--tips-arrow-left"]=w?Math.min(w,B):D}const Nt={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},borderRadius:{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"&&st({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset>>0})},scrollListener(){this.static||this.parent((t,e,i)=>{e?g.runer(t.addEventListener,t,"scroll",M):(g.runer(k.observe,k,t),(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&(i=this.attr(t,"-tips-scroll"),i||(g.runer(t.addEventListener,t,"scroll",M),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,borderRadius=>--tips-border-radius")),this.css["--arrow-size"]=Math.sqrt(2*Math.pow((this.border||3)*2+2,2))/2>>0,this.init(),A.delay=+this.delay,zt(t=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(t,e){g.runer(t.removeEventListener,t,"scroll",M),g.runer(t.removeAttribute,t,"-tips-scroll",void 0),e||g.runer(k.unobserve,k,t)})}};var Ct=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("default",function(){return[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()},kt=[],Rt=E(Nt,Ct,kt,!1,null,"72d69fdc",null,null);const rt=Rt.exports,Mt=[J,Z,tt,rt],Et={install(t){Mt.forEach(e=>{t.component("S"+e.name,e),t.component(e.name+"S",e)})}};exports.Card=Z;exports.Flyweight=J;exports.Stream=tt;exports.Tips=rt;exports.default=Et;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@soei/util"),g=require("@soei/tools"),ot=require("@soei/picker");let ht=/(\d+|[+\-\*/]|%)/g,j={"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e,i)=>parseFloat(t)/100*i},I=(t,e)=>{let i;if(i=l.runer("match",t,ht)){let s=i.length,o,u=0,n,a=[];for(;s--;)u=i.shift(),u in j?(o&&a.push(o),u==="%"&&(a.length=2),n=u):+u&&a.push(+u),a.length==2&&(a.push(e),o=j[n].apply(null,a),a.length=0);+o||(o=+a.pop()),t=o>>0}return t},q={},b=(t,e)=>(t+"").replace(/\w+\((.*)\)/g,"$1").replace(q[e]||(q[e]=new RegExp("(?=\\s+|^)(\\d+)(?:\\.\\d{1,})?(?!(?:\\.)*\\d|%|\\w)","g")),"$1px");function E(t,e,i,s,o,u,n,a){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 h;if(n?(h=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__),o&&o.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(n)},r._ssrRegister=h):o&&(h=a?function(){o.call(this,(r.functional?this.parent:this).$root.$options.shadowRoot)}:o),h)if(r.functional){r._injectStyles=h;var d=r.render;r.render=function(f,_){return h.call(_),d(f,_)}}else{var p=r.beforeCreate;r.beforeCreate=p?[].concat(p,h):[h]}return{exports:t,options:r}}let U=t=>t==null||t==null,at=(...t)=>{console.info("::::FLYWEIGHT",...t)};const ut={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 l.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){at(t)}this.scrollx=l.runer("hasAttribute",this.flyweight,"scroll-x"),this.BoxRule="clientHeight=>height,clientWidth=>width",this.direction=this.scrollx?"scrollLeft":"scrollTop"},methods:{exec:b,trigger(t,e){l.isArray(t)||(t=t&&e?[[t,e]]:[]),t.length&&this.lazyrun(()=>{l.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){l.runer([this.cheackflys,e=>{e=e||{};let i=e.index||l.each(this.flys,(s,o,u,n)=>{if(o[u]==n)return s},e.picker,e.id);U(i)||this.setindex(i)}],this,t)},setindex(t){l.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(()=>{l.runer(t)},e||this.lazy)},run(t){let e=[],i=l.runer(this.direction,t.target),s={offset:i,top:i,width:this.realW,height:this.realH,index:i/this.expand>>0};l.merge(s,this.space),t.from||e.push(["onscroll",s]);let o=!1;l.each(this.flyweights,(u,n,a,r,h,d,p,c,f)=>{if(a=u/h>>0,c=a+r*(+(a<d%r)+(d/r>>0)),f=c*h+u%h,f>=this.count){o||(e.push(["onend"]),o=!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,o=l.picker(s,this.BoxRule);this.$nextTick(()=>{let u=/true/.test(this.auto),[n,a]=this.offset,r=o.width,h=o.height,d=(I(this.width,r)||r)+n,p=I(this.height,h)+a,c=[r/d>>0||1,h/p>>0||1];i&&c.reverse();let[f,_]=c,x=this.padding,N,S=0,y,v;i?(y=d,d-=n,v=$=>$*(p-a)+($+1)*a):(u?(d=(r-n*(f+2*x-1))/f,N=!x*n,S=x*n):(N=0,S=(r%d+n*f)/(f+1)>>0,d-=n),v=$=>$*(d+N)+($+1)*S,y=p),this.row=_+2,this.column=f,this.realH=p-a,this.realW=d,this.expand=y,this.Size=Math.ceil(t/f)*y;let w=Math.min(t,f*this.row),m=w-1,T;for(;w-- >0;)T=m-w,this.$set(e,T,{x:n,y:a,width:d,height:p-a,space:v(T%f),data:{}});e.length=m+1;let z=[];h/y>m/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:(m/f>>0)+1,column:f,showrow:this.row,showcolumn:this.column}]),this.trigger(z)})}}};var ct=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,o){return i("div",{key:o,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)},ft=[],dt=E(ut,ct,ft,!1,null,"d5f1cd63",null,null);const J=dt.exports;function L(t,e){return e&&(t=t.replace(/[a-z]/g,"")),t.toLowerCase()}let K={close:{handler(t){this.change(t)},deep:!0},offset:{handler(t){this.margin(t)},deep:!0}},pt=["BackGround","BordeR","Height","Width","Top","Right","Bottom","Left"],Q={};l.each(pt,(t,e,i)=>{t=L(e),Q["--"+L(e,!0)]=t,i[t]=function(){this.trigger++}},K);const gt={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:K,methods:{exec:b,isEmpty:l.isEmpty,isSimplyType:l.isSimplyType,tr(){let t={};return this.margin(this.offset),l.each(Q,(e,i)=>{this.css(t,e,i)}),t},tolower:L,css(t,e,i){let s=this[i]||this.default[i];!s||this.default[i]==s||(t[e]=b(s))},change(t){l.isSimplyType(t)||(this.closecss=l.picker(t,"color=>--s-card-close-color,size=>--s-close-width,bold=>--s-close-height,*"))},margin(t){l.merge(this,l.picker(l.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 _t=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(o){return e.$emit("close")}}})])]}),e._t("content",function(){return[i("div",{staticClass:"card-content"},[e._t("inner")],2)]})]})],2)},yt=[],mt=E(gt,_t,yt,!1,null,"ec96bb2a",null,null);const Z=mt.exports,vt={name:"Stream",computed:{component(){return this.$refs.component},column(){let{columns:t,T:e}=this,i=t||e;return l.isEmpty(i)?[]:l.isArray(i)?i:[i]}},props:{bridge:{type:String,default:"slot"},type:{type:String,default:"div"},columns:{type:[Object,Array],default:()=>null},T:{type:[Array,Object],default:()=>null}},mounted(){this.$.vnode.ref&&l.merge(this,{...this.component})},methods:{__trigger(t){let e=t[this.bridge]||t.type;return(this.$slots||this.$scopedSlots)[e]?e:"default"}}};var wt=function(){var e=this,i=e._self._c;return i(e.type,e._b({ref:"component",tag:"component"},"component",e.$attrs,!1),[e._l(e.column,function(s){return e._t(e.__trigger(s),null,null,s)})],2)},bt=[],xt=E(vt,wt,bt,!1,null,null,null,null);const tt=xt.exports,X=/(?:\,|\|{2})/,G="px",D="";let et=document.documentElement,V,Y=["s-left","s-top","s-right","s-bottom"],St={left:0,top:1,right:2,bottom:3};const W=[];var $t=ot(window,"Reflect.defineProperty|Object.defineProperty=>Proxy").Proxy;let O={},it=null;$t(O,"delay",{get(){return this._delay},set(t){it=Tt(()=>{g.runer(W)},t),this._delay=t}});O.delay=60;function Tt(t,e){let i=0;return function(){const s=Date.now();s-i>=e&&(i=s,g.runer(t,this,arguments))}}const M=()=>{it()};function zt(t){W.push(t)}const k=new ResizeObserver(M);k.observe(et);function st(t){t.onresize||(W.push([st,null,t]),t.onresize=!0);var e=et,i=e.clientHeight,s=g.isNil(t.offset)?15:t.offset,o=t.target,u=t.room,n=t.index,a=t.position,r=o.getBoundingClientRect(),h=u.offsetHeight+s,d=u.offsetWidth+s,p="3,0,2,1".split(X),c,f=(r.height==V?r.bottom-r.top:r.height)>>0,_=(r.width==V?r.right-r.left:r.width)>>0,x=e.clientWidth-d,N=i-h,S=[r.left-d,r.top-h,x-r.right,N-r.bottom];a&&(g.each(a.split(X),function(nt,R,H,lt){lt.push(H[R])},St,c=[]),p.unshift.apply(p,c)),n=g.each(p,function(nt,R,H){if(H[R]>0)return R},S);var y=0,v=0,w=0;if(n!=null){var m=n==0||n==2,T=n==3||n==1;y=T?Math.min(r.left,x):n==2?r.right+s:S[0],h-=s*+m;var z=Math.max(r.top,0),$=Math.min(r.bottom,i),A=($-h+Math.min(i-h,z))/2;v=Math.max(m?A:n==3?r.top+f+s:Math.min(A,S[1]),0),T&&r.left>x&&(w=r.left-y-s+_/2)}let F=u.classList,C=t.css;F.remove(...Y),F.add(Y[n]),t.index=n,C.left=y+G,C.top=v+G;let P=C["--tips-arrow-top"]=m?Math.min(Math.max(v,z)-v,h-s):D,B=d-3*s;C["--tips-arrow"]=w>B-10||m&&(P+(h>50?15:0)>h||!P)?"hidden":"visible",C["--tips-arrow-left"]=w?Math.min(w,B):D}const Nt={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},borderRadius:{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"&&st({onresize:!1,target:this.$el.parentNode,room:this.$el,position:this.position,css:this.css,offset:+this.offset>>0})},scrollListener(){this.static||this.parent((t,e,i)=>{e?g.runer(t.addEventListener,t,"scroll",M):(g.runer(k.observe,k,t),(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&(i=this.attr(t,"-tips-scroll"),i||(g.runer(t.addEventListener,t,"scroll",M),this.attr(t,"-tips-scroll","true"))))})}},mounted(){l.merge(this.css,l.picker(this.$props,"color=>--tips-color,background=>--tips-background-color,border=>--tips-border-width,fontSize=>--tips-font-size,borderRadius=>--tips-border-radius")),this.css["--arrow-size"]=Math.sqrt(2*Math.pow((this.border||3)*2+2,2))/2>>0,this.init(),O.delay=+this.delay,zt(t=>{this.scrollListener()}),this.scrollListener()},unmounted(){this.parent(function(t,e){g.runer(t.removeEventListener,t,"scroll",M),g.runer(t.removeAttribute,t,"-tips-scroll",void 0),e||g.runer(k.unobserve,k,t)})}};var Ct=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("default",function(){return[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()},kt=[],Rt=E(Nt,Ct,kt,!1,null,"72d69fdc",null,null);const rt=Rt.exports,Mt=[J,Z,tt,rt],Et={install(t){Mt.forEach(e=>{t.component("S"+e.name,e),t.component(e.name+"S",e)})}};exports.Card=Z;exports.Flyweight=J;exports.Stream=tt;exports.Tips=rt;exports.default=Et;
|
package/vue2/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runer as z, merge as
|
|
1
|
+
import { runer as z, merge as M, isArray as et, each as k, picker as L, isEmpty as it, isSimplyType as X, isString as ct } from "@soei/util";
|
|
2
2
|
import { runer as g, isNil as ft, each as G } from "@soei/tools";
|
|
3
3
|
import ut from "@soei/picker";
|
|
4
4
|
let dt = /(\d+|[+\-\*/]|%)/g, q = {
|
|
@@ -119,7 +119,7 @@ const gt = {
|
|
|
119
119
|
},
|
|
120
120
|
style() {
|
|
121
121
|
var t = this.w, e = this.h, i = this.Size, s = {};
|
|
122
|
-
return
|
|
122
|
+
return M(s, {
|
|
123
123
|
"--width": w(this.realW),
|
|
124
124
|
"--height": w(this.realH),
|
|
125
125
|
"--flyweight-content": w(i)
|
|
@@ -229,7 +229,7 @@ const gt = {
|
|
|
229
229
|
/* 显示区域第一行的索引 */
|
|
230
230
|
index: i / this.expand >> 0
|
|
231
231
|
};
|
|
232
|
-
|
|
232
|
+
M(s, this.space), t.from || e.push(["onscroll", s]);
|
|
233
233
|
let l = !1;
|
|
234
234
|
k(
|
|
235
235
|
this.flyweights,
|
|
@@ -268,27 +268,27 @@ const gt = {
|
|
|
268
268
|
this.$nextTick(() => {
|
|
269
269
|
let a = /true/.test(this.auto), [n, h] = this.offset, r = l.width, o = l.height, u = (D(this.width, r) || r) + n, d = D(this.height, o) + h, c = [r / u >> 0 || 1, o / d >> 0 || 1];
|
|
270
270
|
i && c.reverse();
|
|
271
|
-
let [f, p] = c, b = this.padding, T, x = 0, _,
|
|
272
|
-
i ? (_ = u, u -= n,
|
|
271
|
+
let [f, p] = c, b = this.padding, T, x = 0, _, y;
|
|
272
|
+
i ? (_ = u, u -= n, y = (S) => (
|
|
273
273
|
/* 计算top偏移量 */
|
|
274
274
|
S * (d - h) + (S + 1) * h
|
|
275
|
-
)) : (a ? (u = (r - n * (f + 2 * b - 1)) / f, T = !b * n, x = b * n) : (T = 0, x = (r % u + n * f) / (f + 1) >> 0, u -= n),
|
|
276
|
-
let v = Math.min(t, f * this.row),
|
|
275
|
+
)) : (a ? (u = (r - n * (f + 2 * b - 1)) / f, T = !b * n, x = b * n) : (T = 0, x = (r % u + n * f) / (f + 1) >> 0, u -= n), y = (S) => S * (u + T) + (S + 1) * x, _ = d), this.row = p + 2, this.column = f, this.realH = d - h, this.realW = u, this.expand = _, this.Size = Math.ceil(t / f) * _;
|
|
276
|
+
let v = Math.min(t, f * this.row), m = v - 1, $;
|
|
277
277
|
for (; v-- > 0; )
|
|
278
|
-
$ =
|
|
278
|
+
$ = m - v, this.$set(e, $, {
|
|
279
279
|
x: n,
|
|
280
280
|
y: h,
|
|
281
281
|
width: u,
|
|
282
282
|
height: d - h,
|
|
283
|
-
space:
|
|
283
|
+
space: y($ % f),
|
|
284
284
|
data: {}
|
|
285
285
|
});
|
|
286
|
-
e.length =
|
|
286
|
+
e.length = m + 1;
|
|
287
287
|
let N = [];
|
|
288
|
-
o / _ >
|
|
288
|
+
o / _ > m / f && N.push(["onend"]), this.flyweight && (this.flyweight[this.direction] = 0), this.$nextTick(() => {
|
|
289
289
|
this.setindex(this.selectIndex || 0), this.scroll();
|
|
290
290
|
}), N.push(["update:space", {
|
|
291
|
-
row: (
|
|
291
|
+
row: (m / f >> 0) + 1,
|
|
292
292
|
column: f,
|
|
293
293
|
showrow: this.row,
|
|
294
294
|
showcolumn: this.column
|
|
@@ -307,18 +307,18 @@ var _t = function() {
|
|
|
307
307
|
left: s.left + "px"
|
|
308
308
|
} }, [e._t("default", null, null, s)], 2);
|
|
309
309
|
}), 0), e.flyweights.length ? e._t("end") : e._e()], 2);
|
|
310
|
-
},
|
|
310
|
+
}, mt = [], yt = /* @__PURE__ */ W(
|
|
311
311
|
gt,
|
|
312
312
|
_t,
|
|
313
|
-
|
|
313
|
+
mt,
|
|
314
314
|
!1,
|
|
315
315
|
null,
|
|
316
316
|
"d5f1cd63",
|
|
317
317
|
null,
|
|
318
318
|
null
|
|
319
319
|
);
|
|
320
|
-
const vt =
|
|
321
|
-
function
|
|
320
|
+
const vt = yt.exports;
|
|
321
|
+
function A(t, e) {
|
|
322
322
|
return e && (t = t.replace(/[a-z]/g, "")), t.toLowerCase();
|
|
323
323
|
}
|
|
324
324
|
let st = {
|
|
@@ -347,7 +347,7 @@ let st = {
|
|
|
347
347
|
k(
|
|
348
348
|
wt,
|
|
349
349
|
(t, e, i) => {
|
|
350
|
-
t =
|
|
350
|
+
t = A(e), rt["--" + A(e, !0)] = t, i[t] = function() {
|
|
351
351
|
this.trigger++;
|
|
352
352
|
};
|
|
353
353
|
},
|
|
@@ -423,7 +423,7 @@ const bt = {
|
|
|
423
423
|
this.css(t, e, i);
|
|
424
424
|
}), t;
|
|
425
425
|
},
|
|
426
|
-
tolower:
|
|
426
|
+
tolower: A,
|
|
427
427
|
css(t, e, i) {
|
|
428
428
|
let s = this[i] || this.default[i];
|
|
429
429
|
!s || this.default[i] == s || (t[e] = w(s));
|
|
@@ -435,7 +435,7 @@ const bt = {
|
|
|
435
435
|
));
|
|
436
436
|
},
|
|
437
437
|
margin(t) {
|
|
438
|
-
|
|
438
|
+
M(
|
|
439
439
|
this,
|
|
440
440
|
L(
|
|
441
441
|
ct(t) ? t.split(/\s*(?:,|\s+)\s*/) : t,
|
|
@@ -475,6 +475,9 @@ var xt = function() {
|
|
|
475
475
|
const Nt = $t.exports, zt = {
|
|
476
476
|
name: "Stream",
|
|
477
477
|
computed: {
|
|
478
|
+
component() {
|
|
479
|
+
return this.$refs.component;
|
|
480
|
+
},
|
|
478
481
|
column() {
|
|
479
482
|
let { columns: t, T: e } = this, i = t || e;
|
|
480
483
|
return it(i) ? [] : et(i) ? i : [i];
|
|
@@ -490,10 +493,6 @@ const Nt = $t.exports, zt = {
|
|
|
490
493
|
type: String,
|
|
491
494
|
default: "div"
|
|
492
495
|
},
|
|
493
|
-
data: {
|
|
494
|
-
type: Array,
|
|
495
|
-
default: () => []
|
|
496
|
-
},
|
|
497
496
|
columns: {
|
|
498
497
|
type: [Object, Array],
|
|
499
498
|
default: () => null
|
|
@@ -503,8 +502,11 @@ const Nt = $t.exports, zt = {
|
|
|
503
502
|
default: () => null
|
|
504
503
|
}
|
|
505
504
|
},
|
|
505
|
+
mounted() {
|
|
506
|
+
this.$.vnode.ref && M(this, { ...this.component });
|
|
507
|
+
},
|
|
506
508
|
methods: {
|
|
507
|
-
|
|
509
|
+
__trigger(t) {
|
|
508
510
|
let e = t[this.bridge] || t.type;
|
|
509
511
|
return (this.$slots || this.$scopedSlots)[e] ? e : "default";
|
|
510
512
|
}
|
|
@@ -512,8 +514,8 @@ const Nt = $t.exports, zt = {
|
|
|
512
514
|
};
|
|
513
515
|
var Tt = function() {
|
|
514
516
|
var e = this, i = e._self._c;
|
|
515
|
-
return i(e.type, e._b({ tag: "component" }, "component", e.$attrs, !1), [e._l(e.column, function(s) {
|
|
516
|
-
return e._t(e.
|
|
517
|
+
return i(e.type, e._b({ ref: "component", tag: "component" }, "component", e.$attrs, !1), [e._l(e.column, function(s) {
|
|
518
|
+
return e._t(e.__trigger(s), null, null, s);
|
|
517
519
|
})], 2);
|
|
518
520
|
}, Ct = [], Rt = /* @__PURE__ */ W(
|
|
519
521
|
zt,
|
|
@@ -555,13 +557,13 @@ function Et(t, e) {
|
|
|
555
557
|
s - i >= e && (i = s, g(t, this, arguments));
|
|
556
558
|
};
|
|
557
559
|
}
|
|
558
|
-
const
|
|
560
|
+
const E = () => {
|
|
559
561
|
lt();
|
|
560
562
|
};
|
|
561
563
|
function Lt(t) {
|
|
562
564
|
F.push(t);
|
|
563
565
|
}
|
|
564
|
-
const R = new ResizeObserver(
|
|
566
|
+
const R = new ResizeObserver(E);
|
|
565
567
|
R.observe(nt);
|
|
566
568
|
function ot(t) {
|
|
567
569
|
t.onresize || (F.push([ot, null, t]), t.onresize = !0);
|
|
@@ -577,40 +579,40 @@ function ot(t) {
|
|
|
577
579
|
];
|
|
578
580
|
h && (G(
|
|
579
581
|
h.split(J),
|
|
580
|
-
function(ht,
|
|
581
|
-
at.push(
|
|
582
|
+
function(ht, H, O, at) {
|
|
583
|
+
at.push(O[H]);
|
|
582
584
|
},
|
|
583
585
|
Mt,
|
|
584
586
|
c = []
|
|
585
587
|
), d.unshift.apply(d, c)), n = G(
|
|
586
588
|
d,
|
|
587
|
-
function(ht,
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
589
|
+
function(ht, H, O) {
|
|
590
|
+
if (O[H] > 0)
|
|
591
|
+
return H;
|
|
590
592
|
},
|
|
591
593
|
x
|
|
592
594
|
);
|
|
593
|
-
var _ = 0,
|
|
595
|
+
var _ = 0, y = 0, v = 0;
|
|
594
596
|
if (n != null) {
|
|
595
|
-
var
|
|
596
|
-
_ = $ ? Math.min(r.left, b) : n == 2 ? r.right + s : x[0], o -= s * +
|
|
597
|
+
var m = n == 0 || n == 2, $ = n == 3 || n == 1;
|
|
598
|
+
_ = $ ? Math.min(r.left, b) : n == 2 ? r.right + s : x[0], o -= s * +m;
|
|
597
599
|
var N = Math.max(r.top, 0), S = Math.min(
|
|
598
600
|
r.bottom,
|
|
599
601
|
i
|
|
600
602
|
), B = (S - o + Math.min(i - o, N)) / 2;
|
|
601
|
-
|
|
602
|
-
|
|
603
|
+
y = Math.max(
|
|
604
|
+
m ? B : n == 3 ? r.top + f + s : Math.min(B, x[1]),
|
|
603
605
|
0
|
|
604
606
|
), $ && r.left > b && (v = r.left - _ - s + p / 2);
|
|
605
607
|
}
|
|
606
608
|
let I = a.classList, C = t.css;
|
|
607
|
-
I.remove(...tt), I.add(tt[n]), t.index = n, C.left = _ + K, C.top =
|
|
608
|
-
let j = C["--tips-arrow-top"] =
|
|
609
|
+
I.remove(...tt), I.add(tt[n]), t.index = n, C.left = _ + K, C.top = y + K;
|
|
610
|
+
let j = C["--tips-arrow-top"] = m ? Math.min(
|
|
609
611
|
/* 底边距 */
|
|
610
|
-
Math.max(
|
|
612
|
+
Math.max(y, N) - y,
|
|
611
613
|
o - s
|
|
612
614
|
) : Q, U = u - 3 * s;
|
|
613
|
-
C["--tips-arrow"] = v > U - 10 ||
|
|
615
|
+
C["--tips-arrow"] = v > U - 10 || m && (j + (o > 50 ? 15 : 0) > o || !j) ? "hidden" : "visible", C["--tips-arrow-left"] = v ? Math.min(v, U) : Q;
|
|
614
616
|
}
|
|
615
617
|
const Wt = {
|
|
616
618
|
name: "Tips",
|
|
@@ -719,12 +721,12 @@ const Wt = {
|
|
|
719
721
|
},
|
|
720
722
|
scrollListener() {
|
|
721
723
|
this.static || this.parent((t, e, i) => {
|
|
722
|
-
e ? g(t.addEventListener, t, "scroll",
|
|
724
|
+
e ? g(t.addEventListener, t, "scroll", E) : (g(R.observe, R, t), (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && (i = this.attr(t, "-tips-scroll"), i || (g(t.addEventListener, t, "scroll", E), this.attr(t, "-tips-scroll", "true"))));
|
|
723
725
|
});
|
|
724
726
|
}
|
|
725
727
|
},
|
|
726
728
|
mounted() {
|
|
727
|
-
|
|
729
|
+
M(
|
|
728
730
|
this.css,
|
|
729
731
|
L(
|
|
730
732
|
this.$props,
|
|
@@ -736,11 +738,11 @@ const Wt = {
|
|
|
736
738
|
},
|
|
737
739
|
unmounted() {
|
|
738
740
|
this.parent(function(t, e) {
|
|
739
|
-
g(t.removeEventListener, t, "scroll",
|
|
741
|
+
g(t.removeEventListener, t, "scroll", E), g(t.removeAttribute, t, "-tips-scroll", void 0), e || g(R.unobserve, R, t);
|
|
740
742
|
});
|
|
741
743
|
}
|
|
742
744
|
};
|
|
743
|
-
var
|
|
745
|
+
var Ot = function() {
|
|
744
746
|
var e = this, i = e._self._c;
|
|
745
747
|
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("default", function() {
|
|
746
748
|
return [e._t("title", function() {
|
|
@@ -749,10 +751,10 @@ var At = function() {
|
|
|
749
751
|
return [e._v(e._s(e.content))];
|
|
750
752
|
})];
|
|
751
753
|
})], 2) : e._e();
|
|
752
|
-
},
|
|
754
|
+
}, At = [], Ft = /* @__PURE__ */ W(
|
|
753
755
|
Wt,
|
|
754
|
-
At,
|
|
755
756
|
Ot,
|
|
757
|
+
At,
|
|
756
758
|
!1,
|
|
757
759
|
null,
|
|
758
760
|
"72d69fdc",
|
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-font-size: 8px;--tips-border-radius: 10;--tips-border-width: 3;--tips-offset: 4}.tips[data-v-72d69fdc]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:calc(var(--tips-border-radius) * 1px);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.warning[data-v-72d69fdc],.tips.warn[data-v-72d69fdc]{--tips-background-color: #f44336}.tips.notice[data-v-72d69fdc]{--tips-background-color: #ff9800}.tips.simply[data-v-72d69fdc]{--tips-background-color: #00BCD4}.tips.animate[data-v-72d69fdc]{transition:all .3s}.tips-title[data-v-72d69fdc]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips-title[data-v-72d69fdc]:empty{display:none}.tips[static][data-v-72d69fdc]{position:static!important}.tips.arrow[data-v-72d69fdc]{--deg: 45deg}.tips.arrow[data-v-72d69fdc]:before{transition:all .3s;content:"";visibility:var(--tips-arrow);position:absolute;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);background-color:var(--tips-background-color);height:calc(var(--tips-border-width) * 2px + 2px);width:calc(var(--tips-border-width) * 2px + 2px);transform:rotate(var(--deg));transform-origin:50% 50%;border-left:0;border-top:0;z-index:-1;border-radius:3px}.tips.s-left[data-v-72d69fdc]:before{--deg: -45deg;right:calc(var(--arrow-size) * -1px - 1px)}.tips.s-right[data-v-72d69fdc]:before{--deg: 135deg;left:calc(var(--arrow-size) * -1px - 1px)}.tips.s-left[data-v-72d69fdc]:before,.tips.s-right[data-v-72d69fdc]:before{top:calc(var(--tips-arrow-top) * 1px)}.tips.s-top[data-v-72d69fdc]:before{bottom:calc(var(--arrow-size) * -1px - 1px)}.tips.s-bottom[data-v-72d69fdc]:before{--deg: -135deg;top:calc(var(--arrow-size) * -1px - 1px)}.tips.s-top[data-v-72d69fdc]:before,.tips.s-bottom[data-v-72d69fdc]:before{left:calc(var(--tips-arrow-left) * 1px)}
|
|
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[nothing][data-v-ec96bb2a],.card [nothing][data-v-ec96bb2a]{margin:0!important;padding:0!important;border:0!important}.card[flex][data-v-ec96bb2a],.card[space][data-v-ec96bb2a],.card[row][data-v-ec96bb2a],.card[column][data-v-ec96bb2a],.card [flex][data-v-ec96bb2a],.card [space][data-v-ec96bb2a],.card [row][data-v-ec96bb2a],.card [column][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[space][data-v-ec96bb2a],.card [space][data-v-ec96bb2a]{justify-content:space-between}.card[space=around][data-v-ec96bb2a],.card [space=around][data-v-ec96bb2a]{justify-content:space-around}.card[space=evenly][data-v-ec96bb2a],.card [space=evenly][data-v-ec96bb2a]{justify-content:space-evenly}.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: 10;--tips-border-width: 3;--tips-offset: 4}.tips[data-v-72d69fdc]{display:flex;align-items:center;position:fixed;z-index:10;background-color:var(--tips-background-color);color:var(--tips-color);border-radius:calc(var(--tips-border-radius) * 1px);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.warning[data-v-72d69fdc],.tips.warn[data-v-72d69fdc]{--tips-background-color: #f44336}.tips.notice[data-v-72d69fdc]{--tips-background-color: #ff9800}.tips.simply[data-v-72d69fdc]{--tips-background-color: #00BCD4}.tips.animate[data-v-72d69fdc]{transition:all .3s}.tips-title[data-v-72d69fdc]{font-size:calc(var(--tips-font-size) + var(--tips-offset) * 1px);padding-right:3px}.tips-title[data-v-72d69fdc]:empty{display:none}.tips[static][data-v-72d69fdc]{position:static!important}.tips.arrow[data-v-72d69fdc]{--deg: 45deg}.tips.arrow[data-v-72d69fdc]:before{transition:all .3s;content:"";visibility:var(--tips-arrow);position:absolute;border:calc(var(--tips-border-width) * 1px) solid var(--tips-color);background-color:var(--tips-background-color);height:calc(var(--tips-border-width) * 2px + 2px);width:calc(var(--tips-border-width) * 2px + 2px);transform:rotate(var(--deg));transform-origin:50% 50%;border-left:0;border-top:0;z-index:-1;border-radius:3px}.tips.s-left[data-v-72d69fdc]:before{--deg: -45deg;right:calc(var(--arrow-size) * -1px - 1px)}.tips.s-right[data-v-72d69fdc]:before{--deg: 135deg;left:calc(var(--arrow-size) * -1px - 1px)}.tips.s-left[data-v-72d69fdc]:before,.tips.s-right[data-v-72d69fdc]:before{top:calc(var(--tips-arrow-top) * 1px)}.tips.s-top[data-v-72d69fdc]:before{bottom:calc(var(--arrow-size) * -1px - 1px)}.tips.s-bottom[data-v-72d69fdc]:before{--deg: -135deg;top:calc(var(--arrow-size) * -1px - 1px)}.tips.s-top[data-v-72d69fdc]:before,.tips.s-bottom[data-v-72d69fdc]:before{left:calc(var(--tips-arrow-left) * 1px)}
|