1 |
- System.register(["./index-legacy-a314c7dd.js","./index-legacy-ec2eff9b.js"],(function(e,t){"use strict";var n,l,c,o,a,s,i,u,r,m,d,v,h,f,g;return{setters:[e=>{n=e.c,l=e.ac,c=e.ae,o=e.b,a=e.ab,s=e.d,i=e.r,u=e.e,r=e.w,m=e.Z,d=e.a,v=e.h,h=e.k},e=>{f=e.P,g=e.p}],execute:function(){const t="000000",p=["title","cancel","confirm","toolbar","columns-top","columns-bottom"],y=["title","loading","readonly","optionHeight","swipeDuration","visibleOptionNum","cancelButtonText","confirmButtonText"],b=(e="",n=t,l=void 0)=>({text:e,value:n,children:l});function O({areaList:e,columnsNum:n,columnsPlaceholder:l}){const{city_list:c={},county_list:o={},province_list:a={}}=e,s=+n>1,i=+n>2,u=new Map;Object.keys(a).forEach((e=>{u.set(e.slice(0,2),b(a[e],e,(()=>{if(s)return l.length?[b(l[0],t,i?[]:void 0)]:[]})()))}));const r=new Map;if(s){const e=()=>{if(i)return l.length?[b(l[1])]:[]};Object.keys(c).forEach((t=>{const n=b(c[t],t,e());r.set(t.slice(0,4),n);const l=u.get(t.slice(0,2));l&&l.children.push(n)}))}i&&Object.keys(o).forEach((e=>{const t=r.get(e.slice(0,4));t&&t.children.push(b(o[e],e))}));const m=Array.from(u.values());if(l.length){const e=i?[b(l[2])]:void 0,n=s?[b(l[1],t,e)]:void 0;m.unshift(b(l[0],t,n))}return m}const[V,j]=n("area"),x=l({},c(g,y),{modelValue:String,columnsNum:o(3),columnsPlaceholder:a(),areaList:{type:Object,default:()=>({})}});var k=s({name:V,props:x,emits:["change","confirm","cancel","update:modelValue"],setup(e,{emit:t,slots:n}){const l=i([]),o=i(),a=u((()=>O(e))),s=(...e)=>t("change",...e),h=(...e)=>t("cancel",...e),g=(...e)=>t("confirm",...e);return r(l,(n=>{const l=n.length?n[n.length-1]:"";l&&l!==e.modelValue&&t("update:modelValue",l)}),{deep:!0}),r((()=>e.modelValue),(t=>{t?t!==(l.value.length?l.value[l.value.length-1]:"")&&(l.value=[`${t.slice(0,2)}0000`,`${t.slice(0,4)}00`,t].slice(0,+e.columnsNum)):l.value=[]}),{immediate:!0}),m({confirm:()=>{var e;return null==(e=o.value)?void 0:e.confirm()},getSelectedOptions:()=>{var e;return(null==(e=o.value)?void 0:e.getSelectedOptions())||[]}}),()=>d(f,v({ref:o,modelValue:l.value,"onUpdate:modelValue":e=>l.value=e,class:j(),columns:a.value,onChange:s,onCancel:h,onConfirm:g},c(e,y)),c(n,p))}});e("A",h(k))}}}));
|