PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / trunk
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler vtrunk
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
fluent-cart / assets / chunks / Product.js

Product.js in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler trunk, at assets/chunks/Product.js

2 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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.6.6";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};
2