import{d as R,p as j,r as c,f as b,aP as O,B as z,o as p,l as w,w as d,a,K as G,i as r,c as H,k as N,F as A,dI as B,U as E,H as K,b_ as S,D as q,G as C,_ as J,__tla as L}from"./index-2c56227b.js";import{_ as M,__tla as Q}from"./UploadImgs-91d4d385.js";import{h as T,d as W}from"./tree-0af4953a.js";import{g as X,__tla as Y}from"./category-6b00ba40.js";import{g as Z,__tla as $}from"./brand-05d3a833.js";import{u as aa,__tla as ea}from"./useMessage-96878a4a.js";import{r as i,__tla as la}from"./formRules-5c913959.js";import{__tla as ta}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-e792c2fc.js";import{__tla as ra}from"./el-image-viewer-da1b6008.js";let h,oa=Promise.all([(()=>{try{return L}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:j.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:V,emit:U}){const _=u,v=aa(),n=c(),l=b({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0}),I=b({name:[i],categoryId:[i],keyword:[i],introduction:[i],sliderPicUrls:[i],brandId:[i]});O(()=>_.propFormData,o=>{var e;o&&(B(l,o),l.sliderPicUrls=(e=o.sliderPicUrls)==null?void 0:e.map(m=>({url:m})))},{immediate:!0});const P=U;V({validate:async()=>{var o;if(n)try{await((o=a(n))==null?void 0:o.validate()),Object.assign(_.propFormData,l)}catch(e){throw v.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),P("update:activeName","info"),e}}});const f=c([]),y=c([]);return z(async()=>{const o=await X({});y.value=T(o,"id"),f.value=await Z()}),(o,e)=>{const m=E,s=K,g=S,x=q,k=C,D=M,F=G;return p(),w(F,{ref_key:"formRef",ref:n,model:a(l),rules:a(I),"label-width":"120px",disabled:u.isDetail},{default:d(()=>[r(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:d(()=>[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(s,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:d(()=>[r(g,{modelValue:a(l).categoryId,"onUpdate:modelValue":e[1]||(e[1]=t=>a(l).categoryId=t),options:a(y),props:a(W),class:"w-80",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",filterable:""},null,8,["modelValue","options","props"])]),_:1}),r(s,{label:"\u5546\u54C1\u54C1\u724C",prop:"brandId"},{default:d(()=>[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:d(()=>[(p(!0),H(A,null,N(a(f),t=>(p(),w(x,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(s,{label:"\u5546\u54C1\u5173\u952E\u5B57",prop:"keyword"},{default:d(()=>[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(s,{label:"\u5546\u54C1\u7B80\u4ECB",prop:"introduction"},{default:d(()=>[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(s,{label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"sliderPicUrls"},{default:d(()=>[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","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/mall/product/spu/form/InfoForm.vue"]])});export{oa as __tla,h as default};
