1 |
- !function(){var t=document.createElement("style");t.innerHTML="._sticky_1yjvp_1{position:sticky;top:0;z-index:99}._white_1yjvp_6{background-color:#fff}._white_1yjvp_6>div{padding-top:.4rem;box-shadow:0 0 .26667rem rgba(216,216,216,.5)}._animationStyle_1yjvp_13{transition:all .2s}\n",document.head.appendChild(t),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.bbc2b10e.js"],(function(t){"use strict";var e,i,o,n,s,a,c;return{setters:[function(t){e=t.d,i=t.S,o=t.U,n=t.V,s=t.a3,a=t.j},function(t){c=t.u}],execute:function(){var f="_sticky_1yjvp_1",r="_animationStyle_1yjvp_13";t("T",e({name:"m-sticky",props:{position:{type:String,default:"top"},mode:{type:String,default:"fixed"},offsetTop:{type:String,default:"0px"},offsetBottom:{default:"0px"},varName:{type:String,default:"--header-height"}},emits:["barHeight"],setup:function(t,e){var d=e.slots,u=e.emit,y=i({divStyle:{},heightV:0,sectionStyle:{width:"100%",height:"auto",minHeight:"auto",left:"0"}}),l=o(),p=o();return n((function(){"top"===t.position?y.divStyle.top=t.offsetTop||"0px":y.divStyle.bottom=t.offsetBottom||"0px";try{c(p.value,(function(e){var i=e[0].contentRect.height;Math.abs(i-y.heightV)>1&&setTimeout((function(){!function(e){y.sectionStyle.height="".concat(e,"px"),y.sectionStyle.minHeight="".concat(e,"px"),y.heightV=e,document.documentElement.style.setProperty(t.varName,"".concat(e,"px")),u("barHeight",e)}(i)}),10)}))}catch(e){}})),s((function(){return t.offsetTop}),(function(){y.divStyle.top=t.offsetTop})),s((function(){return t.offsetBottom}),(function(){y.divStyle.bottom=t.offsetBottom})),function(){return a("div",{style:[y.sectionStyle],class:"sticky"===t.mode&&f},[a("div",{ref:l,class:["van-sticky","fixed"===t.mode?"van-sticky--fixed":"",r],style:[y.divStyle,y.sectionStyle]},[a("div",{ref:p,style:{position:"relative"}},[d.default&&d.default()])])])}}}))}}}))}();
|