| 1 |
import{K as g,f as s,g as h,y as u,j as d,v as n,A as r,G as x,x as m,F as B,C as V,k as b}from"./vue.esm-bundler.js?ver=1.7.0";const k={class:"fct-multiple-select-group"},_={class:"input-append"},K={__name:"GetProducts",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(l){const f=g().ctx,c=s([]),a=s(""),i=s(null),v=o=>{if(o==="")return!1;a.value=!0,clearTimeout(i.value),i.value=setTimeout(()=>{f.$get("products/searchVariantByName",{name:o}).then(e=>{c.value=e.products}).catch(e=>{}).finally(()=>{a.value=!1})},500)};return h(()=>{}),(o,e)=>{const p=u("el-option"),y=u("el-select");return n(),d("div",k,[r("div",_,[x(y,{modelValue:l.value[l.fieldKey],"onUpdate:modelValue":e[0]||(e[0]=t=>l.value[l.fieldKey]=t),multiple:"",placeholder:l.field.placeholder,filterable:"",remote:"","reserve-keyword":!1,"remote-method":v,loading:a.value},{loading:m(()=>e[1]||(e[1]=[r("svg",{class:"circular",viewBox:"0 0 50 50"},[r("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})],-1)])),default:m(()=>[(n(!0),d(B,null,V(c.value,t=>(n(),b(p,{key:t.id,label:t.variation_title,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"])])])}}};export{K as default}; |