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

2 lines
11 KiB
JavaScript

/*! For license information please see 5827.78fc6267.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([["5827"],{55418:function(t,n,e){"use strict";e.r(n);let r=e("73897").Z;n.default=r},73897:function(t,n,e){"use strict";var r=e("80681"),i=e("11848"),a=e("20665"),u=e("90872"),l=e("21847"),o=e("54369");n.Z=(0,r.aZ)({__name:"index",setup(t){var n=(0,o.q)({"zh-CN":{title2:"\u63A7\u5236\u9009\u4E2D\u9879",title3:"\u914D\u7F6E\u663E\u793A\u5217",title4:"\u914D\u7F6E\u5217\u5360\u4F4D\u63D0\u793A\u6587\u5B57",columnsPlaceholder:["\u8BF7\u9009\u62E9","\u8BF7\u9009\u62E9","\u8BF7\u9009\u62E9"],areaList:u.H},"en-US":{title2:"Model Value",title3:"Columns Number",title4:"Columns Placeholder",columnsPlaceholder:["Choose","Choose","Choose"],areaList:l.T}}),e=(0,i.iH)("330302");return(t,u)=>{var l=(0,r.up)("demo-block");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(l,{card:"",title:(0,i.SU)(n)("basicUsage")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.ZP),{title:(0,i.SU)(n)("title"),"area-list":(0,i.SU)(n)("areaList")},null,8,["title","area-list"])]),_:1},8,["title"]),(0,r.Wm)(l,{card:"",title:(0,i.SU)(n)("title2")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.ZP),{modelValue:e.value,"onUpdate:modelValue":u[0]||(u[0]=t=>e.value=t),title:(0,i.SU)(n)("title"),"area-list":(0,i.SU)(n)("areaList")},null,8,["modelValue","title","area-list"])]),_:1},8,["title"]),(0,r.Wm)(l,{card:"",title:(0,i.SU)(n)("title3")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.ZP),{title:(0,i.SU)(n)("title"),"area-list":(0,i.SU)(n)("areaList"),"columns-num":2},null,8,["title","area-list"])]),_:1},8,["title"]),(0,r.Wm)(l,{card:"",title:(0,i.SU)(n)("title4")},{default:(0,r.w5)(()=>[(0,r.Wm)((0,i.SU)(a.ZP),{title:(0,i.SU)(n)("title"),"area-list":(0,i.SU)(n)("areaList"),"columns-placeholder":(0,i.SU)(n)("columnsPlaceholder")},null,8,["title","area-list","columns-placeholder"])]),_:1},8,["title"])],64)}}})},21847:function(t,n,e){"use strict";e.d(n,{T:function(){return r}});var r={province_list:{11e4:"Beijing",33e4:"Zhejiang",81e4:"Hong Kong"},city_list:{110100:"Beijing City",330100:"Hangzhou",330200:"Ningbo",330300:"Wenzhou",330400:"Jiaxin",331100:"Lishui",810100:"Hong Kong Island",810200:"Kowloon",810300:"New Territories"},county_list:{110101:"Dongcheng",110102:"Xicheng",110105:"Chaoyang",110106:"Fengtai",110108:"Haidian",110111:"Fangshan",110112:"Tongzhou",110113:"Shunyi",110114:"Changping",110115:"Daxing",330105:"Gongshu",330106:"Xihu",330108:"Binjiang",330109:"Xiaoshan",330110:"Yuhang",330111:"Fuyang",330127:"Chunan",330182:"Jiande",330185:"Linan",330206:"Beilun",330211:"Zhenhai",330225:"Xiangshan",330226:"Ninghai",330281:"Yuyao",330282:"Cixi",330302:"Lucheng",330328:"Wencheng",330329:"Shuntai",330381:"Ruian",330382:"Yueqing",330402:"Nanhu",330421:"Jiashan",330424:"Haiyan",330481:"Haining",330482:"Pinghu",330483:"Tongxiang",331102:"Liandu District",331121:"Qingtian County",331125:"Yunhe County",331181:"Longquan County",810101:"Central",810102:"Wan Chai",810202:"Mong Kok",810203:"Sham Shui Po",810204:"Chuk Un",810205:"Kwun Tong",810303:"Sha Tin",810305:"Yuen Long",810306:"Tuen Mun",810307:"Tsuen Wan",810309:"Lantau Island"}}},20665:function(t,n,e){"use strict";e.d(n,{uN:function(){return a}});var r=e("63112"),i=e("74868"),a=(0,r.n)(i.Z);n.ZP=a},77830:function(t,n,e){"use strict";e.d(n,{If:function(){return l},NC:function(){return a},eW:function(){return i},h5:function(){return r}}),e("24836"),e("41712"),e("80855"),e("10502"),e("7978"),e("66746"),e("17530"),e("87604"),e("57024"),e("22175"),e("85322"),e("47897"),e("48943"),e("43356"),e("82116"),e("17989"),e("31564"),e("8649"),e("70629"),e("61557"),e("51185");var r="000000",i=["title","cancel","confirm","toolbar","columns-top","columns-bottom"],a=["title","loading","readonly","optionHeight","swipeDuration","visibleOptionNum","cancelButtonText","confirmButtonText"],u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return{text:t,value:n,children:e}};function l(t){var{areaList:n,columnsNum:e,columnsPlaceholder:i}=t,{city_list:a={},county_list:l={},province_list:o={}}=n,c=+e>1,s=+e>2,f=()=>{if(c)return i.length?[u(i[0],r,s?[]:void 0)]:[]},v=new Map;Object.keys(o).forEach(t=>{v.set(t.slice(0,2),u(o[t],t,f()))});var d=new Map;if(c){var h=()=>{if(s)return i.length?[u(i[1])]:[]};Object.keys(a).forEach(t=>{var n=u(a[t],t,h());d.set(t.slice(0,4),n);var e=v.get(t.slice(0,2));e&&e.children.push(n)})}s&&Object.keys(l).forEach(t=>{var n=d.get(t.slice(0,4));n&&n.children.push(u(l[t],t))});var m=Array.from(v.values());if(i.length){var g=s?[u(i[2])]:void 0,p=c?[u(i[1],r,g)]:void 0;m.unshift(u(i[0],r,p))}return m}},72555:function(t,n,e){"use strict";e.d(n,{Ct:function(){return a}});var r=e("63112"),i=e("63022"),a=(0,r.n)(i.Z);n.ZP=a},65170:function(t,n,e){"use strict";e.d(n,{S:function(){return i},h:function(){return a}}),e("86795");var r=e("80681"),i=Symbol();function a(t){var n=(0,r.f3)(i,null);n&&(0,r.YP)(n,n=>{n&&t()})}},10023:function(t,n,e){"use strict";e.d(n,{F:function(){return a}});var r=e("80681"),i=e("12308");function a(t){var n=(0,r.FN)();n&&(0,i.l7)(n.proxy,t)}},29609:function(t,n,e){"use strict";e.d(n,{o:function(){return a}});var r=e("11848"),i=e("8051");function a(){var t=(0,r.iH)(0),n=(0,r.iH)(0),e=(0,r.iH)(0),a=(0,r.iH)(0),u=(0,r.iH)(0),l=(0,r.iH)(0),o=(0,r.iH)(""),c=(0,r.iH)(!0),s=()=>{e.value=0,a.value=0,u.value=0,l.value=0,o.value="",c.value=!0};return{move:r=>{var s,f,v=r.touches[0];e.value=(v.clientX<0?0:v.clientX)-t.value,a.value=v.clientY-n.value,u.value=Math.abs(e.value),l.value=Math.abs(a.value);if(!o.value||u.value<10&&l.value<10){;o.value=(s=u.value,s>(f=l.value)?"horizontal":f>s?"vertical":"")}c.value&&(u.value>i.mH||l.value>i.mH)&&(c.value=!1)},start:e=>{s(),t.value=e.touches[0].clientX,n.value=e.touches[0].clientY},reset:s,startX:t,startY:n,deltaX:e,deltaY:a,offsetX:u,offsetY:l,direction:o,isVertical:()=>"vertical"===o.value,isHorizontal:()=>"horizontal"===o.value,isTap:c}}},95786:function(t,n,e){"use strict";e.d(n,{gb:function(){return a}});var r=e("63112"),i=e("2309"),a=(0,r.n)(i.Z);n.ZP=a},54854:function(t,n,e){"use strict";e.d(n,{cW:function(){return a}});var r=e("63112"),i=e("36809"),a=(0,r.n)(i.ZP);n.ZP=a},8051:function(t,n,e){"use strict";e.d(n,{Cp:function(){return d},T5:function(){return r},WN:function(){return v},_K:function(){return o},a8:function(){return a},dt:function(){return u},e9:function(){return f},k7:function(){return i},mH:function(){return h},pj:function(){return s},r5:function(){return c},xe:function(){return l}}),e("86795");var r="van-hairline",i="".concat(r,"--top"),a="".concat(r,"--left"),u="".concat(r,"--right"),l="".concat(r,"--bottom"),o="".concat(r,"--surround"),c="".concat(r,"--top-bottom"),s="".concat(r,"-unset--top-bottom"),f="van-haptics-feedback",v=Symbol("van-form"),d=500,h=5},55987:function(t,n,e){"use strict";e.d(n,{I:function(){return i}});var r=e("12308");function i(t,n){var{args:e=[],done:i,canceled:a,error:u}=n;if(t){var l=t.apply(null,e);(0,r.tI)(l)?l.then(t=>{t?i():a&&a()}).catch(u||r.ZT):l?i():a&&a()}else i()}},78335:function(t,n,e){"use strict";e.d(n,{Ce:function(){return l},J5:function(){return a},Or:function(){return i},SI:function(){return c},SQ:function(){return s},Vg:function(){return r},ir:function(){return u},qM:function(){return o}});var r=null,i=[Number,String],a={type:Boolean,default:!0},u=t=>({type:t,required:!0}),l=()=>({type:Array,default:()=>[]}),o=t=>({type:Number,default:t}),c=t=>({type:i,default:t}),s=t=>({type:String,default:t})},63112:function(t,n,e){"use strict";e.d(n,{n:function(){return i}});var r=e("20358");function i(t){return t.install=n=>{var{name:e}=t;e&&(n.component(e,t),n.component((0,r._A)("-".concat(e)),t))},t}},74868:function(t,n,e){"use strict";e("82116"),e("17989");var r=e("80681"),i=e("11848"),a=e("62568"),u=e("12308"),l=e("78335"),o=e("36809"),c=e("77830"),s=e("10023"),f=e("54854"),[v,d]=(0,a.do)("area"),h=(0,u.l7)({},(0,u.ei)(o.d4,c.NC),{modelValue:String,columnsNum:(0,l.SI)(3),columnsPlaceholder:(0,l.Ce)(),areaList:{type:Object,default:()=>({})}});n.Z=(0,r.aZ)({name:v,props:h,emits:["change","confirm","cancel","update:modelValue"],setup(t,n){var{emit:e,slots:a}=n,l=(0,i.iH)([]),o=(0,i.iH)(),v=(0,r.Fl)(()=>(0,c.If)(t)),h=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e("change",...n)},m=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e("cancel",...n)},g=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e("confirm",...n)};return(0,r.YP)(l,n=>{var r=n.length?n[n.length-1]:"";r&&r!==t.modelValue&&e("update:modelValue",r)},{deep:!0}),(0,r.YP)(()=>t.modelValue,n=>{n?n!==(l.value.length?l.value[l.value.length-1]:"")&&(l.value=["".concat(n.slice(0,2),"0000"),"".concat(n.slice(0,4),"00"),n].slice(0,+t.columnsNum)):l.value=[]},{immediate:!0}),(0,s.F)({confirm:()=>{var t;return null===(t=o.value)||void 0===t?void 0:t.confirm()},getSelectedOptions:()=>{var t;return(null===(t=o.value)||void 0===t?void 0:t.getSelectedOptions())||[]}}),()=>(0,r.Wm)(f.cW,(0,r.dG)({ref:o,modelValue:l.value,"onUpdate:modelValue":t=>l.value=t,class:d(),columns:v.value,onChange:h,onCancel:m,onConfirm:g},(0,u.ei)(t,c.NC)),(0,u.ei)(a,c.eW))}})},63022:function(t,n,e){"use strict";e("82116"),e("17989"),e("56115"),e("59644"),e("89176");var r=e("80681"),i=e("62568"),a=e("78335"),u=e("12308"),l=e("20358"),[o,c]=(0,i.do)("badge"),s={dot:Boolean,max:a.Or,tag:(0,a.SQ)("div"),color:String,offset:Array,content:a.Or,showZero:a.J5,position:(0,a.SQ)("top-right")};n.Z=(0,r.aZ)({name:o,props:s,setup(t,n){var{slots:e}=n,i=()=>{if(e.content)return!0;var{content:n,showZero:r}=t;return(0,u.Xq)(n)&&""!==n&&(r||0!==n&&"0"!==n)},a=()=>{var{dot:n,max:r,content:a}=t;if(!n&&i())return e.content?e.content():(0,u.Xq)(r)&&(0,u.kE)(a)&&+a>+r?"".concat(r,"+"):a},o=t=>t.startsWith("-")?t.replace("-",""):"-".concat(t),s=(0,r.Fl)(()=>{var n={background:t.color};if(t.offset){var[r,i]=t.offset,{position:a}=t,[u,c]=a.split("-");e.default?("number"==typeof i?n[u]=(0,l.Nn)("top"===u?i:-i):n[u]="top"===u?(0,l.Nn)(i):o(i),"number"==typeof r?n[c]=(0,l.Nn)("left"===c?r:-r):n[c]="left"===c?(0,l.Nn)(r):o(r)):(n.marginTop=(0,l.Nn)(i),n.marginLeft=(0,l.Nn)(r))}return n}),f=()=>{if(i()||t.dot)return(0,r.Wm)("div",{class:c([t.position,{dot:t.dot,fixed:!!e.default}]),style:s.value},[a()])};return()=>{if(e.default){var{tag:n}=t;return(0,r.Wm)(n,{class:c("wrapper")},{default:()=>[e.default(),f()]})}return f()}}})},2309:function(t,n,e){"use strict";e("82116"),e("17989"),e("66786"),e("14529");var r=e("80681"),i=e("62568"),a=e("78335"),u=e("12308"),l=e("20358"),[o,c]=(0,i.do)("loading"),s=Array(12).fill(null).map((t,n)=>(0,r.Wm)("i",{class:c("line",String(n+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)]),v={size:a.Or,type:(0,a.SQ)("circular"),color:String,vertical:Boolean,textSize:a.Or,textColor:String};n.Z=(0,r.aZ)({name:o,props:v,setup(t,n){var{slots:e}=n,i=(0,r.Fl)(()=>(0,u.l7)({color:t.color},(0,l.Xn)(t.size))),a=()=>{var n="spinner"===t.type?s:f;return(0,r.Wm)("span",{class:c("spinner",t.type),style:i.value},[e.icon?e.icon():n])},o=()=>{if(e.default){var n;return(0,r.Wm)("span",{class:c("text"),style:{fontSize:(0,l.Nn)(t.textSize),color:null!==(n=t.textColor)&&void 0!==n?n:t.color}},[e.default()])}};return()=>{var{type:n,vertical:e}=t;return(0,r.Wm)("div",{class:c([n,{vertical:e}]),"aria-live":"polite","aria-busy":!0},[a(),o()])}}})}}]);