import{i as h,c as v}from"./index-0f3e2c06-1779868775780v=1.0.0.js";import{l as y,a as u,e as C,d as g,ah as B,m as S,p as b,U as k,u as o,B as x}from"./vendor-98154105-1779868775780v=1.0.0.js";import{_ as I}from"./_plugin-vue_export-helper-8c5478df-1779868775780v=1.0.0.js";const V={class:"city-box"},A=y({__name:"Cascader",props:{multiple:{type:Boolean,default:!0},checkStrictly:{type:Boolean,default:!1},placeholder:{type:String,required:!0},value:{type:Array,default:()=>[]},api:{type:Function,default:h}},emits:["update:value","change"],setup(n,{emit:d}){const p=v(),a=n,s=d,t=u({multiple:a.multiple,checkStrictly:a.checkStrictly,label:"name",value:"code",children:"children"}),c=u([]),l=C({get(){return a.value},set(e){s("update:value",e)}}),i=e=>{s("change",e)},m=async()=>{let e=await a.api(p.userInfo.accountId);c.value=e.data,t.value.label="name",t.value.value="areaId",t.value.children="children"};return g(()=>{m()}),(e,r)=>{const _=B("el-cascader");return S(),b("div",V,[k(_,{placeholder:n.placeholder,options:o(c),props:o(t),"show-all-levels":!0,clearable:!0,filterable:"",onChange:i,modelValue:o(l),"onUpdate:modelValue":r[0]||(r[0]=f=>x(l)?l.value=f:null)},null,8,["placeholder","options","props","modelValue"])])}}});const q=I(A,[["__scopeId","data-v-efe2d071"]]);export{q as C};
