import{_ as v}from"./index-M_JNBppB.js";/* empty css               *//* empty css                  *//* empty css                     *//* empty css                  */import{d as x}from"./debounce-Xd493GvO.js";import{r as b}from"./request-CEvu378m.js";import{ax as q,r as d,c as h,w as m,j as S,X as k,B as y,z as s,y as g,F as w,M as z,a7 as j,W as V}from"./vue-BJk78QHK.js";import{e as B,d as O}from"./element-3_pOinej.js";import"./threejs-BafxXW5-.js";import"./utils-YI6ye1sf.js";import"./vxe-Dx3zSILm.js";const E=Object.assign({name:"Select"},{__name:"Select",props:{propValue:{type:Object,default:()=>({})},request:{type:Object,default:()=>({})},element:{type:Object,default:()=>({})}},setup(l){const e=l,a=q(),i=d(0),r=d(null);h(()=>{const o=a.state.globalKey.findIndex(t=>t.globalKey===e.propValue.globalKey);if(o>-1)return a.state.globalKey[o].globalValue}),m(()=>e.propValue.size,x(o=>{i.value++},1e3),{deep:!0}),m(()=>e.propValue.value,o=>{const t=a.state.globalKey.findIndex(u=>u.globalKey===e.propValue.globalKey);t>-1&&(a.state.globalKey[t].globalValue=o)}),S(()=>{var o,t;e.request&&(r.value=b(e.request,e.element.propValue,"option","")),e.propValue.global&&e.propValue.globalKey&&e.propValue.globalName&&(a.state.globalKey.some(u=>u.globalKey===e.propValue.globalKey)||a.commit("addGlobalKey",{globalKey:e.propValue.globalKey,globalName:e.propValue.globalName,globalValue:e.propValue.value})),((t=(o=e.request)==null?void 0:o.global)==null?void 0:t.length)>0&&m(()=>a.state.globalKey,()=>{const u=[];e.request.global.forEach(p=>{const n=a.state.globalKey.findIndex(K=>K.globalKey===p);n>-1&&u.push([a.state.globalKey[n].globalKey,a.state.globalKey[n].globalValue])});const c=e.request.data.concat(u);e.request.data=c,r.value&&r.value(),r.value=b(e.request,e.element.propValue,"option","")},{deep:!0})}),k(()=>{e.request&&r.value&&r.value()});function f(){i.value++}return(o,t)=>{const u=B,c=O;return s(),y("div",{class:"box",key:i.value},[(s(),g(c,{key:l.propValue.multiple,onChange:f,style:V([l.propValue.selectStyle,{width:"100%"}]),multiple:l.propValue.multiple,"multiple-limit":l.propValue.multiple?l.propValue.multipleLimit:null,size:l.propValue.size,clearable:l.propValue.clearable,modelValue:l.propValue.value,"onUpdate:modelValue":t[0]||(t[0]=p=>l.propValue.value=p),filterable:l.propValue.filterable,placeholder:l.propValue.placeholder},{default:w(()=>[(s(!0),y(z,null,j(l.propValue.option,(p,n)=>(s(),g(u,{style:V({color:l.propValue.selectStyle.color}),key:n,label:p.label,value:p.value},null,8,["style","label","value"]))),128))]),_:1},8,["style","multiple","multiple-limit","size","clearable","modelValue","filterable","placeholder"]))])}}}),A=v(E,[["__scopeId","data-v-4e2540c7"]]);export{A as default};
