OtherForm-edc6fcda.js 2.2 KB

1
  1. import{d as V,p as y,r as c,f as D,aS as F,o as I,l as S,w as s,a as e,K as C,i as r,dI as O,c0 as x,H as U,_ as j,__tla as k}from"./index-af173888.js";import{u as H,__tla as N}from"./useMessage-170c1b43.js";import{r as d,__tla as P}from"./formRules-515a78c5.js";let _,R=Promise.all([(()=>{try{return k}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return P}catch{}})()]).then(async()=>{_=j(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=H(),p=n,u=c(),a=c({sort:0,giveIntegral:0,virtualSalesCount:0}),g=D({sort:[d],giveIntegral:[d],virtualSalesCount:[d]});F(()=>p.propFormData,l=>{l&&O(a.value,l)},{immediate:!0});const b=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"),b("update:activeName","other"),t}}}),(l,t)=>{const i=x,m=U,w=C;return I(),S(w,{ref_key:"formRef",ref:u,model:e(a),rules:e(g),"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,_ as default};