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