1 |
- !function(){function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var a,r,o=[],i=!0,l=!1;try{for(t=t.call(e);!(i=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);i=!0);}catch(c){l=!0,r=c}finally{try{i||null==t.return||t.return()}finally{if(l)throw r}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}var t=document.createElement("style");t.innerHTML=":root{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-danger-color);--van-tabs-line-height: 1.17333rem;--van-tabs-card-height: .8rem;--van-tabs-nav-background-color: var(--van-background-color-light);--van-tabs-bottom-bar-width: 1.06667rem;--van-tabs-bottom-bar-height: .08rem;--van-tabs-bottom-bar-color: var(--van-danger-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-weight-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width-base) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background-color);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:.4rem}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width-base) solid var(--van-tabs-default-color);border-radius:var(--van-border-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:.4rem;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}.van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}\n",document.head.appendChild(t),System.register(["./index-legacy.f8641610.js","./use-id-legacy.30c2e9af.js","./use-tab-status-legacy.5d29085f.js","./index-legacy.00d337cc.js","./use-refs-legacy.e503281e.js","./index-legacy.4ddb0119.js"],(function(n){"use strict";var t,a,r,o,i,l,c,d,s,u,v,b,f,h,p,g,m,y,x,w,_,k,S,I,C,B,z,A,j,R,T,L,M,O,W,$,Z,E,H,N,F,V,X,D,U,G,J,K,P,Y,q,Q;return{setters:[function(e){t=e.au,a=e.ah,r=e.av,o=e.E,i=e.d,l=e.G,c=e.H,d=e.W,s=e.i,u=e.M,v=e.aw,b=e.ax,f=e.U,h=e.a3,p=e.V,g=e.a0,m=e.ab,y=e.ac,x=e.aj,w=e.S,_=e.ad,k=e.al,S=e.X,I=e.ak,C=e.ao,B=e.ap,z=e.aa,A=e.af,j=e.ag,R=e.a2,T=e.ay,L=e.az,M=e.aA,O=e.a8,W=e.aB,$=e.Y,Z=e.aC,E=e.aD,H=e.J,N=e.K,F=e.I,V=e.at,X=e.aE,D=e.a6,U=e.aF,G=e.O},function(e){J=e.u},function(e){K=e.T},function(e){P=e.S,Y=e.a},function(e){q=e.u},function(e){Q=e.S}],execute:function(){function ee(e,n,o,i){var l=a(e),c=l<n,d=0===o?1:Math.round(1e3*o/16),s=(n-l)/d;!function a(){l+=s,(c&&l>n||!c&&l<n)&&(l=n),r(e,l),c&&l<n||!c&&l>n?t(a):i&&t(i)}()}var ne=e(o("tab"),2),te=ne[0],ae=ne[1],re=i({name:te,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:l,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:c},setup:function(e,n){var t=n.slots,a=d((function(){var n={},t=e.type,a=e.color,r=e.disabled,o=e.isActive,i=e.activeColor,l=e.inactiveColor;a&&"card"===t&&(n.borderColor=a,r||(o?n.backgroundColor=a:n.color=a));var c=o?i:l;return c&&(n.color=c),n}));return function(){return s("div",{id:e.id,role:"tab",class:[ae([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:a.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[(n=s("span",{class:ae("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]),e.dot||u(e.badge)&&""!==e.badge?s(v,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:function(){return[n]}}):n)]);var n}}}),oe=e(o("tabs"),2),ie=oe[0],le=oe[1],ce=i({name:ie,props:{count:b(Number),inited:Boolean,animated:Boolean,duration:b(l),swipeable:Boolean,lazyRender:Boolean,currentIndex:b(Number)},emits:["change"],setup:function(e,n){var t=n.emit,a=n.slots,r=f(),o=function(e){return t("change",e)},i=function(n){var t=r.value;t&&t.state.active!==n&&t.swipeTo(n,{immediate:!e.inited})};return h((function(){return e.currentIndex}),i),p((function(){i(e.currentIndex)})),function(){return s("div",{class:le("content",{animated:e.animated||e.swipeable})},[(t=null==(n=a.default)?void 0:n.call(a),e.animated||e.swipeable?s(P,{ref:r,loop:!1,class:le("track"),duration:1e3*+e.duration,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:o},{default:function(){return[t]}}):t)]);var n,t}}}),de=e(o("tabs"),2),se=de[0],ue=de[1],ve={type:g("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:m(0),duration:m(.3),animated:Boolean,ellipsis:c,swipeable:Boolean,scrollspy:Boolean,offsetTop:m(0),background:String,lazyRender:c,lineWidth:l,lineHeight:l,beforeChange:Function,swipeThreshold:m(5),titleActiveColor:String,titleInactiveColor:String},be=Symbol(se),fe=i({name:se,props:ve,emits:["click","change","scroll","disabled","rendered","click-tab","update:active"],setup:function(n,a){var r,o,i,l=a.emit,c=a.slots,v=f(),b=f(),p=f(),g=J(),m=y(v),H=e(q(),2),N=H[0],F=H[1],V=x(be),X=V.children,D=V.linkChildren,U=w({inited:!1,position:"",lineStyle:{},currentIndex:-1}),G=d((function(){return X.length>n.swipeThreshold||!n.ellipsis||n.shrink})),K=d((function(){return{borderColor:n.color,background:n.background}})),P=function(e,n){var t;return null!=(t=e.name)?t:n},Y=d((function(){var e=X[U.currentIndex];if(e)return P(e,U.currentIndex)})),ne=d((function(){return _(n.offsetTop)})),te=d((function(){return n.sticky?ne.value+r:0})),ae=function(e){var a=b.value,r=N.value;if(G.value&&a&&r&&r[U.currentIndex]){var o=r[U.currentIndex].$el;!function(e,n,a){var r=0,o=e.scrollLeft,i=0===a?1:Math.round(1e3*a/16);!function a(){e.scrollLeft+=(n-o)/i,++r<i&&t(a)}()}(a,o.offsetLeft-(a.offsetWidth-o.offsetWidth)/2,e?0:+n.duration)}},oe=function(){var e=U.inited;S((function(){var t=N.value;if(t&&t[U.currentIndex]&&"line"===n.type&&!j(v.value)){var a=t[U.currentIndex].$el,r=n.lineWidth,o=n.lineHeight,i=a.offsetLeft+a.offsetWidth/2,l={width:R(r),backgroundColor:n.color,transform:"translateX(".concat(i,"px) translateX(-50%)")};if(e&&(l.transitionDuration="".concat(n.duration,"s")),u(o)){var c=R(o);l.height=c,l.borderRadius=c}U.lineStyle=l}}))},ie=function(e){var t=function(e){for(var n=e<U.currentIndex?-1:1;e>=0&&e<X.length;){if(!X[e].disabled)return e;e+=n}}(e);if(u(t)){var a=X[t],r=P(a,t),o=null!==U.currentIndex;U.currentIndex=t,r!==n.active&&(l("update:active",r),o&&l("change",r,a.title))}},le=function(e){var n=X.find((function(n,t){return P(n,t)===e})),t=n?X.indexOf(n):0;ie(t)},de=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(n.scrollspy){var t=X[U.currentIndex].$el;if(t&&m.value){var a=M(t,m.value)-te.value;o=!0,ee(m.value,a,e?0:+n.duration,(function(){o=!1}))}}},se=function(e){i=e.isFixed,l("scroll",e)},ve=function(){return X.map((function(e,t){return s(re,O({id:"".concat(g,"-").concat(t),ref:F(t),type:n.type,color:n.color,style:e.titleStyle,class:e.titleClass,shrink:n.shrink,isActive:t===U.currentIndex,controls:e.id,scrollable:G.value,activeColor:n.titleActiveColor,inactiveColor:n.titleInactiveColor,onClick:function(a){return function(e,t,a){var r=X[t],o=r.title,i=r.disabled,c=P(X[t],t);i?l("disabled",c,o):(Z(n.beforeChange,{args:[c],done:function(){ie(t),de()}}),l("click",c,o),E(e)),l("click-tab",{name:c,title:o,event:a,disabled:i})}(e,t,a)}},W(e,["dot","badge","title","disabled","showZeroBadge"])),{title:e.$slots.title})}))},fe=function(){if("line"===n.type&&X.length)return s("div",{class:ue("line"),style:U.lineStyle},null)},he=function(){var e,t,a,r,o,i=n.type,l=n.border;return s("div",{ref:p,class:[ue("wrap"),(a={},r=T,o="line"===i&&l,r in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a)]},[s("div",{ref:b,role:"tablist",class:ue("nav",[i,{shrink:n.shrink,complete:G.value}]),style:K.value,"aria-orientation":"horizontal"},[null==(e=c["nav-left"])?void 0:e.call(c),ve(),fe(),null==(t=c["nav-right"])?void 0:t.call(c)])])};h([function(){return n.color},k],oe),h((function(){return n.active}),(function(e){e!==Y.value&&le(e)})),h((function(){return X.length}),(function(){U.inited&&(le(n.active),oe(),S((function(){ae(!0)})))})),h((function(){return U.currentIndex}),(function(){ae(),oe(),i&&!n.scrollspy&&L(Math.ceil(M(v.value)-ne.value))}));return I({resize:oe,scrollTo:function(e){S((function(){le(e),de(!0)}))}}),C(oe),B(oe),z((function(){le(n.active),S((function(){U.inited=!0,p.value&&(r=$(p.value).height),ae(!0)}))})),A("scroll",(function(){if(n.scrollspy&&!o){var e=function(){for(var e=0;e<X.length;e++)if($(X[e].$el).top>te.value)return 0===e?0:e-1;return X.length-1}();ie(e)}}),{target:m}),D({id:g,props:n,setLine:oe,onRendered:function(e,n){return l("rendered",e,n)},currentName:Y,scrollIntoView:ae}),function(){var e;return s("div",{ref:v,class:ue([n.type])},[n.sticky?s(Q,{container:v.value,offsetTop:ne.value,onScroll:se},{default:function(){var e;return[he(),null==(e=c["nav-bottom"])?void 0:e.call(c)]}}):[he(),null==(e=c["nav-bottom"])?void 0:e.call(c)],s(ce,{count:X.length,inited:U.inited,animated:n.animated,duration:n.duration,swipeable:n.swipeable,lazyRender:n.lazyRender,currentIndex:U.currentIndex,onChange:ie},{default:function(){var e;return[null==(e=c.default)?void 0:e.call(c)]}})])}}}),he=e(o("tab"),2),pe=he[0],ge=he[1],me=H({},N,{dot:Boolean,name:l,badge:l,title:String,disabled:Boolean,titleClass:F,titleStyle:[String,Object],showZeroBadge:c}),ye=i({name:pe,props:me,setup:function(e,n){var t=n.slots,a=J(),r=f(!1),o=V(be),i=o.parent,l=o.index;if(i){var c=function(){var n;return null!=(n=e.name)?n:l.value},u=d((function(){var n=c()===i.currentName.value;return n&&!r.value&&(r.value=!0,i.props.lazyRender&&S((function(){i.onRendered(c(),e.title)}))),n}));return h((function(){return e.title}),(function(){i.setLine(),i.scrollIntoView()})),X(K,u),function(){var e,n="".concat(i.id,"-").concat(l.value),o=i.props,c=o.animated,d=o.swipeable,v=o.scrollspy,b=o.lazyRender;if(t.default||c){var f=v||u.value;if(c||d)return s(Y,{id:a,role:"tabpanel",class:ge("panel-wrapper",{inactive:!u.value}),tabindex:u.value?0:-1,"aria-hidden":!u.value,"aria-labelledby":n},{default:function(){var e;return[s("div",{class:ge("panel")},[null==(e=t.default)?void 0:e.call(t)])]}});var h=r.value||v||!b?null==(e=t.default)?void 0:e.call(t):null;return I({id:a}),D(s("div",{id:a,role:"tabpanel",class:ge("panel"),tabindex:f?0:-1,"aria-labelledby":n},[h]),[[U,f]])}}}}});n("a",G(ye)),n("T",G(fe))}}}))}();
|