|
1
|
|
-import{k as N,h as u,i as _,r as h,e as p,o as t,d as o,a as f,w as n,c as i,F as y,g as x}from"./vue.esm-bundler.js?ver=1.3.21";const $={class:"fct-multiple-select-group"},C={class:"input-prepend"},E={class:"input-append"},O={__name:"Product",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(a){const V=N().ctx,k=a,s=u("include"),v=u([]),B=u([]),w=u([]),r=u(""),g=u(null),b=d=>{if(d==="")return!1;r.value=!0,clearTimeout(g.value),g.value=setTimeout(()=>{V.$get("products/searchVariantByName",{name:d}).then(e=>{v.value=e.products}).catch(e=>{}).finally(()=>{r.value=!1})},500)};return _(()=>{s.value=k.field.value.length>0?"include":"exclude"}),(d,e)=>{const c=h("el-option"),m=h("el-select");return t(),p("div",$,[o("div",C,[f(m,{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>s.value=l),placeholder:d.$t("Select")},{default:n(()=>[f(c,{disabled:B.value.length>0,label:d.$t("Include"),value:"include"},null,8,["disabled","label"]),f(c,{disabled:w.value.length>0,label:d.$t("Exclude"),value:"exclude"},null,8,["disabled","label"])]),_:1},8,["modelValue","placeholder"])]),o("div",E,[s.value==="exclude"?(t(),i(m,{key:0,modelValue:a.value.excluded_products,"onUpdate:modelValue":e[1]||(e[1]=l=>a.value.excluded_products=l),multiple:"",placeholder:a.field.placeholder,filterable:"",remote:"","reserve-keyword":!1,"remote-method":b,loading:r.value},{loading:n(()=>e[3]||(e[3]=[o("svg",{class:"circular",viewBox:"0 0 50 50"},[o("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})],-1)])),default:n(()=>[(t(!0),p(y,null,x(v.value,l=>(t(),i(c,{key:l.id,label:l.variation_title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"])):(t(),i(m,{key:1,modelValue:a.value.included_products,"onUpdate:modelValue":e[2]||(e[2]=l=>a.value.included_products=l),multiple:"",placeholder:a.field.placeholder,filterable:"",remote:"","remote-method":b,"reserve-keyword":!1,loading:r.value},{loading:n(()=>e[4]||(e[4]=[o("svg",{class:"circular",viewBox:"0 0 50 50"},[o("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})],-1)])),default:n(()=>[(t(!0),p(y,null,x(v.value,l=>(t(),i(c,{key:l.id,label:l.variation_title,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"]))])])}}};export{O as default}; |
|
1
|
+import{j as o,v as r,A as t}from"./vue.esm-bundler.js?ver=1.7.0";import{_ as s}from"./_plugin-vue_export-helper.js?ver=1.7.0";const n={},l={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.49 21.5"};function c(d,e){return r(),o("svg",l,e[0]||(e[0]=[t("g",null,[t("path",{d:"M10.24.75c-2.48,0-4.5,1.95-4.5,4.36v1.64",style:{fill:"none",stroke:"currentColor","stroke-width":"1.5px"}}),t("path",{d:"M19.53,17.36c-.31.8-.86,1.5-1.59,2-1.3.91-4.49,1.38-7.7,1.39-3.21-.01-6.4-.48-7.7-1.39-.73-.5-1.28-1.2-1.59-2-.51-1.31-.02-3,.95-6.37.79-2.75,1.81-4.01,3.84-4.49.74-.18,1.61-.25,2.65-.25h3.7c1.04,0,1.91.07,2.65.25,2.03.48,3.05,1.74,3.84,4.49.97,3.37,1.46,5.06.95,6.37Z",style:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5px"}}),t("path",{d:"M10.24.75c2.48,0,4.5,1.95,4.5,4.36v1.64",style:{fill:"none",stroke:"currentColor","stroke-width":"1.5px"}}),t("path",{d:"M12.77,9.47c-.11,1.19-1.21,2.11-2.53,2.11s-2.42-.92-2.53-2.11",style:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5px"}})],-1)]))}const a=s(n,[["render",c]]);export{a as default}; |