InfoForm-01970613.js 4.0 KB

1
  1. import{d as R,ac as z,r as c,e as y,aM as j,q as N,o as p,x as w,w as s,a,H as O,f as r,c as q,v as M,F as A,bu as B,R as C,C as H,bv as S,A as E,B as G,_ as J,__tla as K}from"./index-62b7dfb7.js";import{_ as L,__tla as Q}from"./UploadImgs-a77ae1fb.js";import{h as T,d as W}from"./tree-0af4953a.js";import{g as X,__tla as Y}from"./category-1f7cf8db.js";import{g as Z,__tla as $}from"./brand-985a2d0e.js";import{u as aa,__tla as ea}from"./useMessage-727ba3da.js";import{r as i,__tla as la}from"./formRules-271e79f6.js";import{__tla as ta}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-0e9051b2.js";import{__tla as ra}from"./el-image-viewer-5030a371.js";let h,oa=Promise.all([(()=>{try{return K}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})()]).then(async()=>{h=J(R({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:z.bool.def(!1)},emits:["update:activeName"],setup(n,{expose:V,emit:v}){const _=n,U=aa(),u=c(),l=y({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0}),x=y({name:[i],categoryId:[i],keyword:[i],introduction:[i],sliderPicUrls:[i],brandId:[i]});j(()=>_.propFormData,o=>{var e;o&&(B(l,o),l.sliderPicUrls=(e=o.sliderPicUrls)==null?void 0:e.map(m=>({url:m})))},{immediate:!0});const I=v;V({validate:async()=>{var o;if(u)try{await((o=a(u))==null?void 0:o.validate()),Object.assign(_.propFormData,l)}catch(e){throw U.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),I("update:activeName","info"),e}}});const f=c([]),b=c([]);return N(async()=>{const o=await X({});b.value=T(o,"id"),f.value=await Z()}),(o,e)=>{const m=C,d=H,g=S,P=E,D=G,k=L,F=O;return p(),w(F,{ref_key:"formRef",ref:u,model:a(l),rules:a(x),"label-width":"120px",disabled:n.isDetail},{default:s(()=>[r(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:s(()=>[r(m,{modelValue:a(l).name,"onUpdate:modelValue":e[0]||(e[0]=t=>a(l).name=t),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",type:"textarea",autosize:{minRows:2,maxRows:2},maxlength:"64","show-word-limit":!0,clearable:!0,class:"w-80!"},null,8,["modelValue"])]),_:1}),r(d,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:s(()=>[r(g,{modelValue:a(l).categoryId,"onUpdate:modelValue":e[1]||(e[1]=t=>a(l).categoryId=t),options:a(b),props:a(W),class:"w-80",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",filterable:""},null,8,["modelValue","options","props"])]),_:1}),r(d,{label:"\u5546\u54C1\u54C1\u724C",prop:"brandId"},{default:s(()=>[r(D,{modelValue:a(l).brandId,"onUpdate:modelValue":e[2]||(e[2]=t=>a(l).brandId=t),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u54C1\u724C",class:"w-80"},{default:s(()=>[(p(!0),q(A,null,M(a(f),t=>(p(),w(P,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(d,{label:"\u5546\u54C1\u5173\u952E\u5B57",prop:"keyword"},{default:s(()=>[r(m,{modelValue:a(l).keyword,"onUpdate:modelValue":e[3]||(e[3]=t=>a(l).keyword=t),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5173\u952E\u5B57",class:"w-80!"},null,8,["modelValue"])]),_:1}),r(d,{label:"\u5546\u54C1\u7B80\u4ECB",prop:"introduction"},{default:s(()=>[r(m,{modelValue:a(l).introduction,"onUpdate:modelValue":e[4]||(e[4]=t=>a(l).introduction=t),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",type:"textarea",autosize:{minRows:2,maxRows:2},maxlength:"128","show-word-limit":!0,clearable:!0,class:"w-80!"},null,8,["modelValue"])]),_:1}),r(d,{label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"sliderPicUrls"},{default:s(()=>[r(k,{modelValue:a(l).sliderPicUrls,"onUpdate:modelValue":e[5]||(e[5]=t=>a(l).sliderPicUrls=t),disabled:n.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["model","rules","disabled"])}}}),[["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/InfoForm.vue"]])});export{oa as __tla,h as default};