OtherForm-c951703f.js 2.3 KB

1
  1. import{d as D,ah as x,Z as F,L as I,r as c,f as C,M as O,o as S,x as j,w as s,a,$ as U,G as z,g as r,aW as B,aY as M,B as N,_ as P,__tla as k}from"./index-b362e1d5.js";import{u as G,__tla as L}from"./useMessage-7c1dd10e.js";import{r as n,__tla as R}from"./formRules-c26349aa.js";let _,W=Promise.all([(()=>{try{return k}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return R}catch{}})()]).then(async()=>{_=P(D({name:"ProductOtherForm",__name:"OtherForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:x.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:f,emit:v}){const h=F(),g=I(()=>h.getMobile),b=G(),p=u,i=c(),e=c({sort:0,giveIntegral:0,virtualSalesCount:0}),w=C({sort:[n],giveIntegral:[n],virtualSalesCount:[n]});O(()=>p.propFormData,t=>{t&&B(e.value,t)},{immediate:!0});const V=v;return f({validate:async()=>{var t;if(i)try{await((t=a(i))==null?void 0:t.validate()),Object.assign(p.propFormData,e.value)}catch(l){throw b.error("\u3010\u5176\u5B83\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),V("update:activeName","other"),l}}}),(t,l)=>{const d=M,m=N,y=z;return S(),j(y,{ref_key:"formRef",ref:i,model:a(e),rules:a(w),class:U([{view:u.isDetail,"mobile-card":a(g)},"noBorder"]),"label-width":"120px",disabled:u.isDetail},{default:s(()=>[r(m,{label:"\u5546\u54C1\u6392\u5E8F",prop:"sort"},{default:s(()=>[r(d,{modelValue:a(e).sort,"onUpdate:modelValue":l[0]||(l[0]=o=>a(e).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(d,{modelValue:a(e).giveIntegral,"onUpdate:modelValue":l[1]||(l[1]=o=>a(e).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(d,{modelValue:a(e).virtualSalesCount,"onUpdate:modelValue":l[2]||(l[2]=o=>a(e).virtualSalesCount=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u865A\u62DF\u9500\u91CF",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules","class","disabled"])}}}),[["__scopeId","data-v-5c945c3e"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/OtherForm.vue"]])});export{W as __tla,_ as default};