vant/static/js/async/564.89fae79d.js
2024-04-20 08:49:23 +00:00

2 lines
13 KiB
JavaScript

/*! For license information please see 564.89fae79d.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["564"],{41631:function(t,e,n){"use strict";n.r(e);var r=n("19059");n("80930");let o=r.Z;e.default=o},19059:function(t,e,n){"use strict";var r=n("80681"),o=n("11848"),i=n("57122"),a=n("17472"),l=n("99497"),u=n("54369"),c=(0,r._)("div",{style:{height:"200px"}},null,-1);e.Z=(0,r.aZ)({__name:"index",setup(t){var e=(0,u.q)({"zh-CN":{offsetTop:"\u5438\u9876\u8DDD\u79BB",offsetBottom:"\u5438\u5E95\u8DDD\u79BB",setContainer:"\u6307\u5B9A\u5BB9\u5668"},"en-US":{offsetTop:"Offset Top",offsetBottom:"Offset Bottom",setContainer:"Set Container"}}),n=(0,o.iH)();return(t,u)=>{var s=(0,r.up)("demo-block");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(s,{title:(0,o.SU)(e)("basicUsage")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,o.SU)(a.ZP),null,{default:(0,r.w5)(()=>[(0,r.Wm)((0,o.SU)(l.ZP),{type:"primary",style:{"margin-left":"15px"}},{default:(0,r.w5)(()=>[(0,r.Uk)((0,i.zw)((0,o.SU)(e)("basicUsage")),1)]),_:1})]),_:1})]),_:1},8,["title"]),(0,r.Wm)(s,{title:(0,o.SU)(e)("offsetTop")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,o.SU)(a.ZP),{"offset-top":50},{default:(0,r.w5)(()=>[(0,r.Wm)((0,o.SU)(l.ZP),{type:"primary",style:{"margin-left":"115px"}},{default:(0,r.w5)(()=>[(0,r.Uk)((0,i.zw)((0,o.SU)(e)("offsetTop")),1)]),_:1})]),_:1})]),_:1},8,["title"]),(0,r.Wm)(s,{title:(0,o.SU)(e)("setContainer")},{default:(0,r.w5)(()=>[(0,r._)("div",{ref_key:"container",ref:n,style:{height:"150px","background-color":"var(--van-background-2)"}},[(0,r.Wm)((0,o.SU)(a.ZP),{container:n.value},{default:(0,r.w5)(()=>[(0,r.Wm)((0,o.SU)(l.ZP),{type:"warning",style:{"margin-left":"215px"}},{default:(0,r.w5)(()=>[(0,r.Uk)((0,i.zw)((0,o.SU)(e)("setContainer")),1)]),_:1})]),_:1},8,["container"])],512)]),_:1},8,["title"]),(0,r.Wm)(s,{title:(0,o.SU)(e)("offsetBottom")},{default:(0,r.w5)(()=>[c,(0,r.Wm)((0,o.SU)(a.ZP),{"offset-bottom":50,position:"bottom"},{default:(0,r.w5)(()=>[(0,r.Wm)((0,o.SU)(l.ZP),{type:"primary",style:{"margin-left":"15px"}},{default:(0,r.w5)(()=>[(0,r.Uk)((0,i.zw)((0,o.SU)(e)("offsetBottom")),1)]),_:1})]),_:1})]),_:1},8,["title"])],64)}}})},72555:function(t,e,n){"use strict";n.d(e,{Ct:function(){return i}});var r=n("63112"),o=n("63022"),i=(0,r.n)(o.Z);e.ZP=i},99497:function(t,e,n){"use strict";n.d(e,{zx:function(){return i}});var r=n("63112"),o=n("14314"),i=(0,r.n)(o.Z);e.ZP=i},14517:function(t,e,n){"use strict";n.d(e,{H:function(){return i},t:function(){return o}});var r=2e3,o=()=>++r,i=t=>{r=t}},6149:function(t,e,n){"use strict";n.d(e,{BC:function(){return i},g2:function(){return o},yj:function(){return a}}),n("56115"),n("59644");var r=n("80681"),o={to:[String,Object],url:String,replace:Boolean};function i(t){var{to:e,url:n,replace:r,$router:o}=t;e&&o?o[r?"replace":"push"](e):n&&(r?location.replace(n):location.href=n)}function a(){var t=(0,r.FN)().proxy;return()=>i(t)}},67984:function(t,e,n){"use strict";n.d(e,{o:function(){return a}});var r=n("12308"),o=n("80681"),i=n("22300");function a(t,e){if(r._f&&window.IntersectionObserver){var n=new IntersectionObserver(t=>{e(t[0].intersectionRatio>0)},{root:document.body}),a=()=>{t.value&&n.unobserve(t.value)};(0,o.se)(a),(0,o.Jd)(a),(0,i.Ib)(()=>{t.value&&n.observe(t.value)})}}},96528:function(t,e,n){"use strict";n.d(e,{JO:function(){return i}});var r=n("63112"),o=n("28779"),i=(0,r.n)(o.Z);e.ZP=i},95786:function(t,e,n){"use strict";n.d(e,{gb:function(){return i}});var r=n("63112"),o=n("2309"),i=(0,r.n)(o.Z);e.ZP=i},17472:function(t,e,n){"use strict";n.d(e,{Le:function(){return i}});var r=n("63112"),o=n("65581"),i=(0,r.n)(o.Z);e.ZP=i},8051:function(t,e,n){"use strict";n.d(e,{Cp:function(){return v},T5:function(){return r},WN:function(){return d},_K:function(){return u},a8:function(){return i},dt:function(){return a},e9:function(){return f},k7:function(){return o},mH:function(){return m},pj:function(){return s},r5:function(){return c},xe:function(){return l}}),n("86795");var r="van-hairline",o="".concat(r,"--top"),i="".concat(r,"--left"),a="".concat(r,"--right"),l="".concat(r,"--bottom"),u="".concat(r,"--surround"),c="".concat(r,"--top-bottom"),s="".concat(r,"-unset--top-bottom"),f="van-haptics-feedback",d=Symbol("van-form"),v=500,m=5},78335:function(t,e,n){"use strict";n.d(e,{Ce:function(){return l},J5:function(){return i},Or:function(){return o},SI:function(){return c},SQ:function(){return s},Vg:function(){return r},ir:function(){return a},qM:function(){return u}});var r=null,o=[Number,String],i={type:Boolean,default:!0},a=t=>({type:t,required:!0}),l=()=>({type:Array,default:()=>[]}),u=t=>({type:Number,default:t}),c=t=>({type:o,default:t}),s=t=>({type:String,default:t})},63112:function(t,e,n){"use strict";n.d(e,{n:function(){return o}});var r=n("20358");function o(t){return t.install=e=>{var{name:n}=t;n&&(e.component(n,t),e.component((0,r._A)("-".concat(n)),t))},t}},63022:function(t,e,n){"use strict";n("82116"),n("17989"),n("56115"),n("59644"),n("89176");var r=n("80681"),o=n("62568"),i=n("78335"),a=n("12308"),l=n("20358"),[u,c]=(0,o.do)("badge"),s={dot:Boolean,max:i.Or,tag:(0,i.SQ)("div"),color:String,offset:Array,content:i.Or,showZero:i.J5,position:(0,i.SQ)("top-right")};e.Z=(0,r.aZ)({name:u,props:s,setup(t,e){var{slots:n}=e,o=()=>{if(n.content)return!0;var{content:e,showZero:r}=t;return(0,a.Xq)(e)&&""!==e&&(r||0!==e&&"0"!==e)},i=()=>{var{dot:e,max:r,content:i}=t;if(!e&&o())return n.content?n.content():(0,a.Xq)(r)&&(0,a.kE)(i)&&+i>+r?"".concat(r,"+"):i},u=t=>t.startsWith("-")?t.replace("-",""):"-".concat(t),s=(0,r.Fl)(()=>{var e={background:t.color};if(t.offset){var[r,o]=t.offset,{position:i}=t,[a,c]=i.split("-");n.default?("number"==typeof o?e[a]=(0,l.Nn)("top"===a?o:-o):e[a]="top"===a?(0,l.Nn)(o):u(o),"number"==typeof r?e[c]=(0,l.Nn)("left"===c?r:-r):e[c]="left"===c?(0,l.Nn)(r):u(r)):(e.marginTop=(0,l.Nn)(o),e.marginLeft=(0,l.Nn)(r))}return e}),f=()=>{if(o()||t.dot)return(0,r.Wm)("div",{class:c([t.position,{dot:t.dot,fixed:!!n.default}]),style:s.value},[i()])};return()=>{if(n.default){var{tag:e}=t;return(0,r.Wm)(e,{class:c("wrapper")},{default:()=>[n.default(),f()]})}return f()}}})},14314:function(t,e,n){"use strict";n("82116"),n("17989"),n("24660");var r=n("80681"),o=n("62568"),i=n("12308"),a=n("78335"),l=n("82210"),u=n("8051"),c=n("6149"),s=n("96528"),f=n("95786"),[d,v]=(0,o.do)("button"),m=(0,i.l7)({},c.g2,{tag:(0,a.SQ)("button"),text:String,icon:String,type:(0,a.SQ)("default"),size:(0,a.SQ)("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:(0,a.SQ)("button"),loadingSize:a.Or,loadingText:String,loadingType:String,iconPosition:(0,a.SQ)("left")});e.Z=(0,r.aZ)({name:d,props:m,emits:["click"],setup(t,e){var{emit:n,slots:o}=e,i=(0,c.yj)(),a=()=>o.loading?o.loading():(0,r.Wm)(f.gb,{size:t.loadingSize,type:t.loadingType,class:v("loading")},null),d=()=>t.loading?a():o.icon?(0,r.Wm)("div",{class:v("icon")},[o.icon()]):t.icon?(0,r.Wm)(s.JO,{name:t.icon,class:v("icon"),classPrefix:t.iconPrefix},null):void 0,m=()=>{var e;if(e=t.loading?t.loadingText:o.default?o.default():t.text)return(0,r.Wm)("span",{class:v("text")},[e])},p=()=>{var{color:e,plain:n}=t;if(e){var r={color:n?e:"white"};return!n&&(r.background=e),e.includes("gradient")?r.border=0:r.borderColor=e,r}},g=e=>{t.loading?(0,l.PF)(e):!t.disabled&&(n("click",e),i())};return()=>{var{tag:e,type:n,size:o,block:i,round:a,plain:l,square:c,loading:s,disabled:f,hairline:h,nativeType:S,iconPosition:b}=t,x=[v([n,o,{plain:l,block:i,round:a,square:c,loading:s,disabled:f,hairline:h}]),{[u._K]:h}];return(0,r.Wm)(e,{type:S,class:x,style:p(),disabled:f,onClick:g},{default:()=>[(0,r.Wm)("div",{class:v("content")},["left"===b&&d(),m(),"right"===b&&d()])]})}}})},53419:function(t,e,n){"use strict";n.d(e,{q9:function(){return f}}),n("82116"),n("17989"),n("86795"),n("56115"),n("59644"),n("31564"),n("8649"),n("70629");var r=n("80681"),o=n("62568"),i=n("78335"),a=n("20358"),l=n("12308"),u=n("14517"),[c,s]=(0,o.do)("config-provider"),f=Symbol(c),d={tag:(0,i.SQ)("div"),theme:(0,i.SQ)("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:(0,i.SQ)("local"),iconPrefix:String};function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(n=>{t[n]!==e[n]&&document.documentElement.style.setProperty(n,t[n])}),Object.keys(e).forEach(e=>{!t[e]&&document.documentElement.style.removeProperty(e)})}e.ZP=(0,r.aZ)({name:c,props:d,setup(t,e){var{slots:n}=e,o=(0,r.Fl)(()=>{var e,n;return e=(0,l.l7)({},t.themeVars,"dark"===t.theme?t.themeVarsDark:t.themeVarsLight),n={},Object.keys(e).forEach(t=>{var r=(0,a.GL)(t).replace(/([a-zA-Z])(\d)/g,"$1-$2");n["--van-".concat(r)]=e[t]}),n});if(l._f){var i=()=>{document.documentElement.classList.add("van-theme-".concat(t.theme))},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme;document.documentElement.classList.remove("van-theme-".concat(e))};(0,r.YP)(()=>t.theme,(t,e)=>{e&&c(e),i()},{immediate:!0}),(0,r.dl)(i),(0,r.se)(c),(0,r.Jd)(c),(0,r.YP)(o,(e,n)=>{"global"===t.themeVarsScope&&v(e,n)}),(0,r.YP)(()=>t.themeVarsScope,(t,e)=>{"global"===e&&v({},o.value),"global"===t&&v(o.value,{})}),"global"===t.themeVarsScope&&v(o.value,{})}return(0,r.JJ)(f,t),(0,r.m0)(()=>{void 0!==t.zIndex&&(0,u.H)(t.zIndex)}),()=>(0,r.Wm)(t.tag,{class:s(),style:"local"===t.themeVarsScope?o.value:void 0},{default:()=>{var t;return[null===(t=n.default)||void 0===t?void 0:t.call(n)]}})}})},28779:function(t,e,n){"use strict";n("82116"),n("17989"),n("24660");var r=n("80681"),o=n("62568"),i=n("78335"),a=n("20358"),l=n("72555"),u=n("53419"),[c,s]=(0,o.do)("icon"),f=t=>null==t?void 0:t.includes("/"),d={dot:Boolean,tag:(0,i.SQ)("i"),name:String,size:i.Or,badge:i.Or,color:String,badgeProps:Object,classPrefix:String};e.Z=(0,r.aZ)({name:c,props:d,setup(t,e){var{slots:n}=e,o=(0,r.f3)(u.q9,null),i=(0,r.Fl)(()=>t.classPrefix||(null==o?void 0:o.iconPrefix)||s());return()=>{var{tag:e,dot:o,name:u,size:c,badge:d,color:v}=t,m=f(u);return(0,r.Wm)(l.Ct,(0,r.dG)({dot:o,tag:e,class:[i.value,m?"":"".concat(i.value,"-").concat(u)],style:{color:v,fontSize:(0,a.Nn)(c)},content:d},t.badgeProps),{default:()=>{var t;return[null===(t=n.default)||void 0===t?void 0:t.call(n),m&&(0,r.Wm)("img",{class:s("image"),src:u},null)]}})}}})},2309:function(t,e,n){"use strict";n("82116"),n("17989"),n("66786"),n("14529");var r=n("80681"),o=n("62568"),i=n("78335"),a=n("12308"),l=n("20358"),[u,c]=(0,o.do)("loading"),s=Array(12).fill(null).map((t,e)=>(0,r.Wm)("i",{class:c("line",String(e+1))},null)),f=(0,r.Wm)("svg",{class:c("circular"),viewBox:"25 25 50 50"},[(0,r.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),d={size:i.Or,type:(0,i.SQ)("circular"),color:String,vertical:Boolean,textSize:i.Or,textColor:String};e.Z=(0,r.aZ)({name:u,props:d,setup(t,e){var{slots:n}=e,o=(0,r.Fl)(()=>(0,a.l7)({color:t.color},(0,l.Xn)(t.size))),i=()=>{var e="spinner"===t.type?s:f;return(0,r.Wm)("span",{class:c("spinner",t.type),style:o.value},[n.icon?n.icon():e])},u=()=>{if(n.default){var e;return(0,r.Wm)("span",{class:c("text"),style:{fontSize:(0,l.Nn)(t.textSize),color:null!==(e=t.textColor)&&void 0!==e?e:t.color}},[n.default()])}};return()=>{var{type:e,vertical:n}=t;return(0,r.Wm)("div",{class:c([e,{vertical:n}]),"aria-live":"polite","aria-busy":!0},[i(),u()])}}})},65581:function(t,e,n){"use strict";n("82116"),n("17989");var r=n("80681"),o=n("11848"),i=n("62568"),a=n("78335"),l=n("20358"),u=n("12308"),c=n("82210"),s=n("22300"),f=n("67984"),[d,v]=(0,i.do)("sticky"),m={zIndex:a.Or,position:(0,a.SQ)("top"),container:Object,offsetTop:(0,a.SI)(0),offsetBottom:(0,a.SI)(0)};e.Z=(0,r.aZ)({name:d,props:m,emits:["scroll","change"],setup(t,e){var{emit:n,slots:i}=e,a=(0,o.iH)(),d=(0,s.eo)(a),m=(0,o.qj)({fixed:!1,width:0,height:0,transform:0}),p=(0,o.iH)(!1),g=(0,r.Fl)(()=>(0,l.LU)("top"===t.position?t.offsetTop:t.offsetBottom)),h=(0,r.Fl)(()=>{if(!p.value){var{fixed:t,height:e,width:n}=m;if(t)return{width:"".concat(n,"px"),height:"".concat(e,"px")}}}),S=(0,r.Fl)(()=>{if(m.fixed&&!p.value){var e=(0,u.l7)((0,l.As)(t.zIndex),{width:"".concat(m.width,"px"),height:"".concat(m.height,"px"),[t.position]:"".concat(g.value,"px")});return m.transform&&(e.transform="translate3d(0, ".concat(m.transform,"px, 0)")),e}}),b=t=>n("scroll",{scrollTop:t,isFixed:m.fixed}),x=()=>{if(!(!a.value||(0,c.xj)(a))){var{container:e,position:n}=t,r=(0,s.EL)(a),o=(0,c.cx)(window);if(m.width=r.width,m.height=r.height,"top"===n){if(e){var i=(0,s.EL)(e),l=i.bottom-g.value-m.height;m.fixed=g.value>r.top&&i.bottom>0,m.transform=l<0?l:0}else m.fixed=g.value>r.top}else{var{clientHeight:u}=document.documentElement;if(e){var f=(0,s.EL)(e),d=u-f.top-g.value-m.height;m.fixed=u-g.value<r.bottom&&u>f.top,m.transform=d<0?-d:0}else m.fixed=u-g.value<r.bottom}b(o)}};return(0,r.YP)(()=>m.fixed,t=>n("change",t)),(0,s.OR)("scroll",x,{target:d,passive:!0}),(0,f.o)(a,x),(0,r.YP)([c.bn,c.uK],()=>{!(!a.value||(0,c.xj)(a))&&m.fixed&&(p.value=!0,(0,r.Y3)(()=>{var t=(0,s.EL)(a);m.width=t.width,m.height=t.height,p.value=!1}))}),()=>{var t;return(0,r.Wm)("div",{ref:a,style:h.value},[(0,r.Wm)("div",{class:v({fixed:m.fixed&&!p.value}),style:S.value},[null===(t=i.default)||void 0===t?void 0:t.call(i)])])}}})},80930:function(t,e,n){"use strict";n.r(t.exports={})},4398:function(t,e,n){"use strict";n.r(t.exports={})}}]);