import{d as R,ac as z,r as c,e as y,aM as j,q,o as p,x as w,w as s,a,H,f as r,c as N,v as M,F as O,bq as A,R as B,C,bv as S,A as X,B as E,_ as G,__tla as J}from"./index-8dc1e40a.js";import{_ as K,__tla as L}from"./UploadImgs-c9e344db.js";import{h as Q,d as T}from"./tree-0af4953a.js";import{g as W,__tla as Y}from"./category-e7433506.js";import{g as Z,__tla as $}from"./brand-c4a32907.js";import{u as aa,__tla as ea}from"./useMessage-7a27dd80.js";import{r as i,__tla as la}from"./formRules-467f9efe.js";import{__tla as ta}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-c25ae3d0.js";import{__tla as ra}from"./el-image-viewer-3b8905e6.js";let h,oa=Promise.all([(()=>{try{return J}catch{}})(),(()=>{try{return L}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=G(R({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:z.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:V,emit:v}){const _=u,I=aa(),n=c(),l=y({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0}),U=y({name:[i],categoryId:[i],keyword:[i],introduction:[i],sliderPicUrls:[i],brandId:[i]});j(()=>_.propFormData,o=>{var e;o&&(A(l,o),l.sliderPicUrls=(e=o.sliderPicUrls)==null?void 0:e.map(m=>({url:m})))},{immediate:!0});const x=v;V({validate:async()=>{var o;if(n)try{await((o=a(n))==null?void 0:o.validate()),Object.assign(_.propFormData,l)}catch(e){throw I.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),x("update:activeName","info"),e}}});const f=c([]),b=c([]);return q(async()=>{const o=await W({});b.value=Q(o,"id"),f.value=await Z()}),(o,e)=>{const m=B,d=C,g=S,P=X,k=E,D=K,F=H;return p(),w(F,{ref_key:"formRef",ref:n,model:a(l),rules:a(U),"label-width":"120px",disabled:u.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(T),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(k,{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),N(O,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(D,{modelValue:a(l).sliderPicUrls,"onUpdate:modelValue":e[5]||(e[5]=t=>a(l).sliderPicUrls=t),disabled:u.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1},8,["model","rules","disabled"])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/InfoForm.vue"]])});export{oa as __tla,h as default};
