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

2 lines
16 KiB
JavaScript

/*! For license information please see 8971.01494972.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["8971"],{59999:function(t,e,r){"use strict";r.r(e);var n=r("19690");r("42837");let o=n.Z;e.default=o},19690:function(t,e,r){"use strict";var n=r("80681"),o=r("11848"),i=r("57122"),a=r("1829"),l=r("88102"),c=r("99497"),u=r("54369"),s=r("24647");e.Z=(0,n.aZ)({__name:"index",setup(t){var e=(0,u.q)({"zh-CN":{title:"\u5546\u54C1\u540D\u79F0",discountInfo:"\u8425\u9500\u4FE1\u606F",customContent:"\u81EA\u5B9A\u4E49\u5185\u5BB9"},"en-US":{discountInfo:"Discount Info",customContent:"Custom Content"}}),r=(0,s.RQ)("ipad.jpeg");return(t,u)=>{var s=(0,n.up)("demo-block");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(s,{title:(0,o.SU)(e)("basicUsage")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,o.SU)(a.ZP),{num:"2",price:"2.00",desc:(0,o.SU)(e)("desc"),title:(0,o.SU)(e)("title"),thumb:(0,o.SU)(r)},null,8,["desc","title","thumb"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,o.SU)(e)("discountInfo")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,o.SU)(a.ZP),{num:"2",price:"2.00","origin-price":"10.00",tag:(0,o.SU)(e)("tag"),desc:(0,o.SU)(e)("desc"),title:(0,o.SU)(e)("title"),thumb:(0,o.SU)(r)},null,8,["tag","desc","title","thumb"])]),_:1},8,["title"]),(0,n.Wm)(s,{title:(0,o.SU)(e)("customContent")},{default:(0,n.w5)(()=>[(0,n.Wm)((0,o.SU)(a.ZP),{num:"2",price:"2.00",desc:(0,o.SU)(e)("desc"),title:(0,o.SU)(e)("title"),thumb:(0,o.SU)(r)},{tags:(0,n.w5)(()=>[(0,n.Wm)((0,o.SU)(l.ZP),{plain:"",type:"primary",style:{"margin-right":"5px"}},{default:(0,n.w5)(()=>[(0,n.Uk)((0,i.zw)((0,o.SU)(e)("tag")),1)]),_:1}),(0,n.Wm)((0,o.SU)(l.ZP),{plain:"",type:"primary"},{default:(0,n.w5)(()=>[(0,n.Uk)((0,i.zw)((0,o.SU)(e)("tag")),1)]),_:1})]),footer:(0,n.w5)(()=>[(0,n.Wm)((0,o.SU)(c.ZP),{round:"",size:"mini"},{default:(0,n.w5)(()=>[(0,n.Uk)((0,i.zw)((0,o.SU)(e)("button")),1)]),_:1}),(0,n.Wm)((0,o.SU)(c.ZP),{round:"",size:"mini"},{default:(0,n.w5)(()=>[(0,n.Uk)((0,i.zw)((0,o.SU)(e)("button")),1)]),_:1})]),_:1},8,["desc","title","thumb"])]),_:1},8,["title"])],64)}}})},24647:function(t,e,r){"use strict";r.d(e,{RQ:function(){return n}});var n=t=>"https://fastly.jsdelivr.net/npm/@vant/assets/".concat(t)},72555:function(t,e,r){"use strict";r.d(e,{Ct:function(){return i}});var n=r("63112"),o=r("63022"),i=(0,n.n)(o.Z);e.ZP=i},99497:function(t,e,r){"use strict";r.d(e,{zx:function(){return i}});var n=r("63112"),o=r("14314"),i=(0,n.n)(o.Z);e.ZP=i},1829:function(t,e,r){"use strict";var n=r("63112"),o=r("71368"),i=(0,n.n)(o.Z);e.ZP=i},14517:function(t,e,r){"use strict";r.d(e,{H:function(){return i},t:function(){return o}});var n=2e3,o=()=>++n,i=t=>{n=t}},6149:function(t,e,r){"use strict";r.d(e,{BC:function(){return i},g2:function(){return o},yj:function(){return a}}),r("56115"),r("59644");var n=r("80681"),o={to:[String,Object],url:String,replace:Boolean};function i(t){var{to:e,url:r,replace:n,$router:o}=t;e&&o?o[n?"replace":"push"](e):r&&(n?location.replace(r):location.href=r)}function a(){var t=(0,n.FN)().proxy;return()=>i(t)}},96528:function(t,e,r){"use strict";r.d(e,{JO:function(){return i}});var n=r("63112"),o=r("28779"),i=(0,n.n)(o.Z);e.ZP=i},7197:function(t,e,r){"use strict";r.d(e,{Ee:function(){return i}});var n=r("63112"),o=r("46858"),i=(0,n.n)(o.Z);e.ZP=i},95786:function(t,e,r){"use strict";r.d(e,{gb:function(){return i}});var n=r("63112"),o=r("2309"),i=(0,n.n)(o.Z);e.ZP=i},88102:function(t,e,r){"use strict";r.d(e,{Vp:function(){return i}});var n=r("63112"),o=r("8291"),i=(0,n.n)(o.Z);e.ZP=i},8051:function(t,e,r){"use strict";r.d(e,{Cp:function(){return m},T5:function(){return n},WN:function(){return f},_K:function(){return c},a8:function(){return i},dt:function(){return a},e9:function(){return d},k7:function(){return o},mH:function(){return v},pj:function(){return s},r5:function(){return u},xe:function(){return l}}),r("86795");var n="van-hairline",o="".concat(n,"--top"),i="".concat(n,"--left"),a="".concat(n,"--right"),l="".concat(n,"--bottom"),c="".concat(n,"--surround"),u="".concat(n,"--top-bottom"),s="".concat(n,"-unset--top-bottom"),d="van-haptics-feedback",f=Symbol("van-form"),m=500,v=5},78335:function(t,e,r){"use strict";r.d(e,{Ce:function(){return l},J5:function(){return i},Or:function(){return o},SI:function(){return u},SQ:function(){return s},Vg:function(){return n},ir:function(){return a},qM:function(){return c}});var n=null,o=[Number,String],i={type:Boolean,default:!0},a=t=>({type:t,required:!0}),l=()=>({type:Array,default:()=>[]}),c=t=>({type:Number,default:t}),u=t=>({type:o,default:t}),s=t=>({type:String,default:t})},63112:function(t,e,r){"use strict";r.d(e,{n:function(){return o}});var n=r("20358");function o(t){return t.install=e=>{var{name:r}=t;r&&(e.component(r,t),e.component((0,n._A)("-".concat(r)),t))},t}},63022:function(t,e,r){"use strict";r("82116"),r("17989"),r("56115"),r("59644"),r("89176");var n=r("80681"),o=r("62568"),i=r("78335"),a=r("12308"),l=r("20358"),[c,u]=(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,n.aZ)({name:c,props:s,setup(t,e){var{slots:r}=e,o=()=>{if(r.content)return!0;var{content:e,showZero:n}=t;return(0,a.Xq)(e)&&""!==e&&(n||0!==e&&"0"!==e)},i=()=>{var{dot:e,max:n,content:i}=t;if(!e&&o())return r.content?r.content():(0,a.Xq)(n)&&(0,a.kE)(i)&&+i>+n?"".concat(n,"+"):i},c=t=>t.startsWith("-")?t.replace("-",""):"-".concat(t),s=(0,n.Fl)(()=>{var e={background:t.color};if(t.offset){var[n,o]=t.offset,{position:i}=t,[a,u]=i.split("-");r.default?("number"==typeof o?e[a]=(0,l.Nn)("top"===a?o:-o):e[a]="top"===a?(0,l.Nn)(o):c(o),"number"==typeof n?e[u]=(0,l.Nn)("left"===u?n:-n):e[u]="left"===u?(0,l.Nn)(n):c(n)):(e.marginTop=(0,l.Nn)(o),e.marginLeft=(0,l.Nn)(n))}return e}),d=()=>{if(o()||t.dot)return(0,n.Wm)("div",{class:u([t.position,{dot:t.dot,fixed:!!r.default}]),style:s.value},[i()])};return()=>{if(r.default){var{tag:e}=t;return(0,n.Wm)(e,{class:u("wrapper")},{default:()=>[r.default(),d()]})}return d()}}})},14314:function(t,e,r){"use strict";r("82116"),r("17989"),r("24660");var n=r("80681"),o=r("62568"),i=r("12308"),a=r("78335"),l=r("82210"),c=r("8051"),u=r("6149"),s=r("96528"),d=r("95786"),[f,m]=(0,o.do)("button"),v=(0,i.l7)({},u.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,n.aZ)({name:f,props:v,emits:["click"],setup(t,e){var{emit:r,slots:o}=e,i=(0,u.yj)(),a=()=>o.loading?o.loading():(0,n.Wm)(d.gb,{size:t.loadingSize,type:t.loadingType,class:m("loading")},null),f=()=>t.loading?a():o.icon?(0,n.Wm)("div",{class:m("icon")},[o.icon()]):t.icon?(0,n.Wm)(s.JO,{name:t.icon,class:m("icon"),classPrefix:t.iconPrefix},null):void 0,v=()=>{var e;if(e=t.loading?t.loadingText:o.default?o.default():t.text)return(0,n.Wm)("span",{class:m("text")},[e])},p=()=>{var{color:e,plain:r}=t;if(e){var n={color:r?e:"white"};return!r&&(n.background=e),e.includes("gradient")?n.border=0:n.borderColor=e,n}},g=e=>{t.loading?(0,l.PF)(e):!t.disabled&&(r("click",e),i())};return()=>{var{tag:e,type:r,size:o,block:i,round:a,plain:l,square:u,loading:s,disabled:d,hairline:S,nativeType:h,iconPosition:b}=t,y=[m([r,o,{plain:l,block:i,round:a,square:u,loading:s,disabled:d,hairline:S}]),{[c._K]:S}];return(0,n.Wm)(e,{type:h,class:y,style:p(),disabled:d,onClick:g},{default:()=>[(0,n.Wm)("div",{class:m("content")},["left"===b&&f(),v(),"right"===b&&f()])]})}}})},71368:function(t,e,r){"use strict";r("82116"),r("17989"),r("89176"),r("59644");var n=r("80681"),o=r("62568"),i=r("78335"),a=r("12308"),l=r("88102"),c=r("7197"),[u,s]=(0,o.do)("card"),d={tag:String,num:i.Or,desc:String,thumb:String,title:String,price:i.Or,centered:Boolean,lazyLoad:Boolean,currency:(0,i.SQ)("\xa5"),thumbLink:String,originPrice:i.Or};e.Z=(0,n.aZ)({name:u,props:d,emits:["clickThumb"],setup(t,e){var{slots:r,emit:o}=e,i=()=>r.title?r.title():t.title?(0,n.Wm)("div",{class:[s("title"),"van-multi-ellipsis--l2"]},[t.title]):void 0,u=()=>{if(r.tag||t.tag)return(0,n.Wm)("div",{class:s("tag")},[r.tag?r.tag():(0,n.Wm)(l.Vp,{mark:!0,type:"primary"},{default:()=>[t.tag]})])},d=()=>r.thumb?r.thumb():(0,n.Wm)(c.Ee,{src:t.thumb,fit:"cover",width:"100%",height:"100%",lazyLoad:t.lazyLoad},null),f=()=>{if(r.thumb||t.thumb)return(0,n.Wm)("a",{href:t.thumbLink,class:s("thumb"),onClick:t=>o("clickThumb",t)},[d(),u()])},m=()=>r.desc?r.desc():t.desc?(0,n.Wm)("div",{class:[s("desc"),"van-ellipsis"]},[t.desc]):void 0,v=()=>{var e=t.price.toString().split(".");return(0,n.Wm)("div",null,[(0,n.Wm)("span",{class:s("price-currency")},[t.currency]),(0,n.Wm)("span",{class:s("price-integer")},[e[0]]),(0,n.Uk)("."),(0,n.Wm)("span",{class:s("price-decimal")},[e[1]])])};return()=>{var e,o,l,c=r.num||(0,a.Xq)(t.num),u=r.price||(0,a.Xq)(t.price),d=r["origin-price"]||(0,a.Xq)(t.originPrice),p=c||u||d||r.bottom,g=u&&(0,n.Wm)("div",{class:s("price")},[r.price?r.price():v()]),S=d&&(0,n.Wm)("div",{class:s("origin-price")},[r["origin-price"]?r["origin-price"]():"".concat(t.currency," ").concat(t.originPrice)]),h=c&&(0,n.Wm)("div",{class:s("num")},[r.num?r.num():"x".concat(t.num)]),b=r.footer&&(0,n.Wm)("div",{class:s("footer")},[r.footer()]),y=p&&(0,n.Wm)("div",{class:s("bottom")},[null===(e=r["price-top"])||void 0===e?void 0:e.call(r),g,S,h,null===(o=r.bottom)||void 0===o?void 0:o.call(r)]);return(0,n.Wm)("div",{class:s()},[(0,n.Wm)("div",{class:s("header")},[f(),(0,n.Wm)("div",{class:s("content",{centered:t.centered})},[(0,n.Wm)("div",null,[i(),m(),null===(l=r.tags)||void 0===l?void 0:l.call(r)]),y])]),b])}}})},53419:function(t,e,r){"use strict";r.d(e,{q9:function(){return d}}),r("82116"),r("17989"),r("86795"),r("56115"),r("59644"),r("31564"),r("8649"),r("70629");var n=r("80681"),o=r("62568"),i=r("78335"),a=r("20358"),l=r("12308"),c=r("14517"),[u,s]=(0,o.do)("config-provider"),d=Symbol(u),f={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 m(){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(r=>{t[r]!==e[r]&&document.documentElement.style.setProperty(r,t[r])}),Object.keys(e).forEach(e=>{!t[e]&&document.documentElement.style.removeProperty(e)})}e.ZP=(0,n.aZ)({name:u,props:f,setup(t,e){var{slots:r}=e,o=(0,n.Fl)(()=>{var e,r;return e=(0,l.l7)({},t.themeVars,"dark"===t.theme?t.themeVarsDark:t.themeVarsLight),r={},Object.keys(e).forEach(t=>{var n=(0,a.GL)(t).replace(/([a-zA-Z])(\d)/g,"$1-$2");r["--van-".concat(n)]=e[t]}),r});if(l._f){var i=()=>{document.documentElement.classList.add("van-theme-".concat(t.theme))},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.theme;document.documentElement.classList.remove("van-theme-".concat(e))};(0,n.YP)(()=>t.theme,(t,e)=>{e&&u(e),i()},{immediate:!0}),(0,n.dl)(i),(0,n.se)(u),(0,n.Jd)(u),(0,n.YP)(o,(e,r)=>{"global"===t.themeVarsScope&&m(e,r)}),(0,n.YP)(()=>t.themeVarsScope,(t,e)=>{"global"===e&&m({},o.value),"global"===t&&m(o.value,{})}),"global"===t.themeVarsScope&&m(o.value,{})}return(0,n.JJ)(d,t),(0,n.m0)(()=>{void 0!==t.zIndex&&(0,c.H)(t.zIndex)}),()=>(0,n.Wm)(t.tag,{class:s(),style:"local"===t.themeVarsScope?o.value:void 0},{default:()=>{var t;return[null===(t=r.default)||void 0===t?void 0:t.call(r)]}})}})},28779:function(t,e,r){"use strict";r("82116"),r("17989"),r("24660");var n=r("80681"),o=r("62568"),i=r("78335"),a=r("20358"),l=r("72555"),c=r("53419"),[u,s]=(0,o.do)("icon"),d=t=>null==t?void 0:t.includes("/"),f={dot:Boolean,tag:(0,i.SQ)("i"),name:String,size:i.Or,badge:i.Or,color:String,badgeProps:Object,classPrefix:String};e.Z=(0,n.aZ)({name:u,props:f,setup(t,e){var{slots:r}=e,o=(0,n.f3)(c.q9,null),i=(0,n.Fl)(()=>t.classPrefix||(null==o?void 0:o.iconPrefix)||s());return()=>{var{tag:e,dot:o,name:c,size:u,badge:f,color:m}=t,v=d(c);return(0,n.Wm)(l.Ct,(0,n.dG)({dot:o,tag:e,class:[i.value,v?"":"".concat(i.value,"-").concat(c)],style:{color:m,fontSize:(0,a.Nn)(u)},content:f},t.badgeProps),{default:()=>{var t;return[null===(t=r.default)||void 0===t?void 0:t.call(r),v&&(0,n.Wm)("img",{class:s("image"),src:c},null)]}})}}})},46858:function(t,e,r){"use strict";r("82116"),r("17989");var n=r("80681"),o=r("11848"),i=r("62568"),a=r("78335"),l=r("20358"),c=r("12308"),u=r("96528"),[s,d]=(0,i.do)("image"),f={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:a.Or,height:a.Or,radius:a.Or,lazyLoad:Boolean,iconSize:a.Or,showError:a.J5,errorIcon:(0,a.SQ)("photo-fail"),iconPrefix:String,showLoading:a.J5,loadingIcon:(0,a.SQ)("photo"),crossorigin:String,referrerpolicy:String};e.Z=(0,n.aZ)({name:s,props:f,emits:["load","error"],setup(t,e){var{emit:r,slots:i}=e,a=(0,o.iH)(!1),s=(0,o.iH)(!0),f=(0,o.iH)(),{$Lazyload:m}=(0,n.FN)().proxy,v=(0,n.Fl)(()=>{var e={width:(0,l.Nn)(t.width),height:(0,l.Nn)(t.height)};return(0,c.Xq)(t.radius)&&(e.overflow="hidden",e.borderRadius=(0,l.Nn)(t.radius)),e});(0,n.YP)(()=>t.src,()=>{a.value=!1,s.value=!0});var p=t=>{s.value&&(s.value=!1,r("load",t))},g=()=>{var t=new Event("load");Object.defineProperty(t,"target",{value:f.value,enumerable:!0}),p(t)},S=t=>{a.value=!0,s.value=!1,r("error",t)},h=(e,r,o)=>o?o():(0,n.Wm)(u.JO,{name:e,size:t.iconSize,class:r,classPrefix:t.iconPrefix},null),b=()=>s.value&&t.showLoading?(0,n.Wm)("div",{class:d("loading")},[h(t.loadingIcon,d("loading-icon"),i.loading)]):a.value&&t.showError?(0,n.Wm)("div",{class:d("error")},[h(t.errorIcon,d("error-icon"),i.error)]):void 0,y=()=>{if(!a.value&&t.src){var e={alt:t.alt,class:d("img"),style:{objectFit:t.fit,objectPosition:t.position},crossorigin:t.crossorigin,referrerpolicy:t.referrerpolicy};return t.lazyLoad?(0,n.wy)((0,n.Wm)("img",(0,n.dG)({ref:f},e),null),[[(0,n.Q2)("lazy"),t.src]]):(0,n.Wm)("img",(0,n.dG)({ref:f,src:t.src,onLoad:p,onError:S},e),null)}},W=t=>{var{el:e}=t,r=()=>{e===f.value&&s.value&&g()};f.value?r():(0,n.Y3)(r)},Z=t=>{var{el:e}=t;e===f.value&&!a.value&&S()};return m&&c._f&&(m.$on("loaded",W),m.$on("error",Z),(0,n.Jd)(()=>{m.$off("loaded",W),m.$off("error",Z)})),(0,n.bv)(()=>{(0,n.Y3)(()=>{var e;(null===(e=f.value)||void 0===e?void 0:e.complete)&&!t.lazyLoad&&g()})}),()=>{var e;return(0,n.Wm)("div",{class:d({round:t.round,block:t.block}),style:v.value},[y(),b(),null===(e=i.default)||void 0===e?void 0:e.call(i)])}}})},2309:function(t,e,r){"use strict";r("82116"),r("17989"),r("66786"),r("14529");var n=r("80681"),o=r("62568"),i=r("78335"),a=r("12308"),l=r("20358"),[c,u]=(0,o.do)("loading"),s=Array(12).fill(null).map((t,e)=>(0,n.Wm)("i",{class:u("line",String(e+1))},null)),d=(0,n.Wm)("svg",{class:u("circular"),viewBox:"25 25 50 50"},[(0,n.Wm)("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),f={size:i.Or,type:(0,i.SQ)("circular"),color:String,vertical:Boolean,textSize:i.Or,textColor:String};e.Z=(0,n.aZ)({name:c,props:f,setup(t,e){var{slots:r}=e,o=(0,n.Fl)(()=>(0,a.l7)({color:t.color},(0,l.Xn)(t.size))),i=()=>{var e="spinner"===t.type?s:d;return(0,n.Wm)("span",{class:u("spinner",t.type),style:o.value},[r.icon?r.icon():e])},c=()=>{if(r.default){var e;return(0,n.Wm)("span",{class:u("text"),style:{fontSize:(0,l.Nn)(t.textSize),color:null!==(e=t.textColor)&&void 0!==e?e:t.color}},[r.default()])}};return()=>{var{type:e,vertical:r}=t;return(0,n.Wm)("div",{class:u([e,{vertical:r}]),"aria-live":"polite","aria-busy":!0},[i(),c()])}}})},8291:function(t,e,r){"use strict";r("82116"),r("17989");var n=r("80681"),o=r("39594"),i=r("62568"),a=r("78335"),l=r("8051"),c=r("96528"),[u,s]=(0,i.do)("tag"),d={size:String,mark:Boolean,show:a.J5,type:(0,a.SQ)("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean};e.Z=(0,n.aZ)({name:u,props:d,emits:["close"],setup(t,e){var{slots:r,emit:i}=e,a=t=>{t.stopPropagation(),i("close",t)},u=()=>t.plain?{color:t.textColor||t.color,borderColor:t.color}:{color:t.textColor,background:t.color},d=()=>{var e,{type:o,mark:i,plain:d,round:f,size:m,closeable:v}=t,p={mark:i,plain:d,round:f};m&&(p[m]=m);var g=v&&(0,n.Wm)(c.JO,{name:"cross",class:[s("close"),l.e9],onClick:a},null);return(0,n.Wm)("span",{style:u(),class:s([p,o])},[null===(e=r.default)||void 0===e?void 0:e.call(r),g])};return()=>(0,n.Wm)(o.uT,{name:t.closeable?"van-fade":void 0},{default:()=>[t.show?d():null]})}})},42837:function(t,e,r){"use strict";r.r(t.exports={})},34235:function(t,e,r){"use strict";r.r(t.exports={})}}]);