OtherForm-fac462b2.js 2.2 KB

1
  1. import{d as V,p as y,r as _,f as D,aP as F,o as I,l as C,w as s,a as e,K as O,i as r,dI as S,bZ as x,H as U,_ as P,__tla as j}from"./index-afaf388d.js";import{u as k,__tla as H}from"./useMessage-a290df31.js";import{r as d,__tla as N}from"./formRules-2ee9e3cd.js";let c,R=Promise.all([(()=>{try{return j}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return N}catch{}})()]).then(async()=>{c=P(V({name:"ProductOtherForm",__name:"OtherForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:y.bool.def(!1)},emits:["update:activeName"],setup(n,{expose:f,emit:v}){const h=k(),p=n,u=_(),a=_({sort:0,giveIntegral:0,virtualSalesCount:0}),b=D({sort:[d],giveIntegral:[d],virtualSalesCount:[d]});F(()=>p.propFormData,l=>{l&&S(a.value,l)},{immediate:!0});const g=v;return f({validate:async()=>{var l;if(u)try{await((l=e(u))==null?void 0:l.validate()),Object.assign(p.propFormData,a.value)}catch(t){throw h.error("\u3010\u5176\u5B83\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),g("update:activeName","other"),t}}}),(l,t)=>{const i=x,m=U,w=O;return I(),C(w,{ref_key:"formRef",ref:u,model:e(a),rules:e(b),"label-width":"120px",disabled:n.isDetail},{default:s(()=>[r(m,{label:"\u5546\u54C1\u6392\u5E8F",prop:"sort"},{default:s(()=>[r(i,{modelValue:e(a).sort,"onUpdate:modelValue":t[0]||(t[0]=o=>e(a).sort=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6392\u5E8F",class:"w-80!"},null,8,["modelValue"])]),_:1}),r(m,{label:"\u8D60\u9001\u79EF\u5206",prop:"giveIntegral"},{default:s(()=>[r(i,{modelValue:e(a).giveIntegral,"onUpdate:modelValue":t[1]||(t[1]=o=>e(a).giveIntegral=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u8D60\u9001\u79EF\u5206",class:"w-80!"},null,8,["modelValue"])]),_:1}),r(m,{label:"\u865A\u62DF\u9500\u91CF",prop:"virtualSalesCount"},{default:s(()=>[r(i,{modelValue:e(a).virtualSalesCount,"onUpdate:modelValue":t[2]||(t[2]=o=>e(a).virtualSalesCount=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u865A\u62DF\u9500\u91CF",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules","disabled"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/OtherForm.vue"]])});export{R as __tla,c as default};