InfoForm-c044b48f.js 4.0 KB

1
  1. import{d as R,p as z,r as c,f as y,aP as j,B as H,o as p,l as w,w as s,a,K as N,i as r,c as O,k as B,F as G,dI as K,U as S,H as X,b_ as q,D as A,G as C,_ as E,__tla as J}from"./index-b2b3c6c4.js";import{_ as L,__tla as M}from"./UploadImgs-5ed43a7f.js";import{h as Q,d as T}from"./tree-0af4953a.js";import{g as W,__tla as Y}from"./category-39c7fbf6.js";import{g as Z,__tla as $}from"./brand-1965037f.js";import{u as aa,__tla as ea}from"./useMessage-a5edbb0f.js";import{r as i,__tla as la}from"./formRules-6084ed5c.js";import{__tla as ta}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-0ec352e2.js";import{__tla as ra}from"./el-image-viewer-b5664270.js";let h,oa=Promise.all([(()=>{try{return J}catch{}})(),(()=>{try{return M}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=E(R({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:z.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:V,emit:U}){const _=u,I=aa(),n=c(),l=y({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0}),v=y({name:[i],categoryId:[i],keyword:[i],introduction:[i],sliderPicUrls:[i],brandId:[i]});j(()=>_.propFormData,o=>{var e;o&&(K(l,o),l.sliderPicUrls=(e=o.sliderPicUrls)==null?void 0:e.map(m=>({url:m})))},{immediate:!0});const g=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 I.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),g("update:activeName","info"),e}}});const f=c([]),b=c([]);return H(async()=>{const o=await W({});b.value=Q(o,"id"),f.value=await Z()}),(o,e)=>{const m=S,d=X,x=q,P=A,k=C,D=L,F=N;return p(),w(F,{ref_key:"formRef",ref:n,model:a(l),rules:a(v),"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(x,{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),O(G,null,B(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};