InfoForm-5466244e.js 4.5 KB

1
  1. import{d as z,p as j,r as n,f as y,aS as H,B as N,o as p,l as h,w as d,a,K as O,i as r,c as S,k as X,F as B,dI as G,U as K,H as q,c1 as A,D as C,G as E,_ as J,__tla as L}from"./index-af173888.js";import{_ as M,__tla as Q}from"./UploadImgs-8cdc0566.js";import{_ as T,__tla as W}from"./UploadImg-adf73e38.js";import{h as Y,d as Z}from"./tree-02f455f9.js";import{g as $,__tla as aa}from"./category-8ca28490.js";import{g as ea,__tla as la}from"./brand-121a30c3.js";import{u as ta,__tla as ra}from"./useMessage-170c1b43.js";import{r as i,__tla as oa}from"./formRules-515a78c5.js";import{__tla as da}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-9154d28f.js";import{__tla as sa}from"./el-image-viewer-0d82b94c.js";import{__tla as ia}from"./index-4db4ba8b.js";let w,ma=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ia}catch{}})()]).then(async()=>{w=J(z({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:j.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:U,emit:V}){const _=u,I=ta(),c=n(),l=y({name:"",categoryId:void 0,keyword:"",picUrl:"",sliderPicUrls:[],introduction:"",brandId:void 0}),v=y({name:[i],categoryId:[i],keyword:[i],introduction:[i],picUrl:[i],sliderPicUrls:[i],brandId:[i]});H(()=>_.propFormData,o=>{var e;o&&(G(l,o),l.sliderPicUrls=(e=o.sliderPicUrls)==null?void 0:e.map(m=>({url:m})))},{immediate:!0});const g=V;U({validate:async()=>{var o;if(c)try{await((o=a(c))==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=n([]),b=n([]);return N(async()=>{const o=await $({});b.value=Y(o,"id"),f.value=await ea()}),(o,e)=>{const m=K,s=q,x=A,k=C,D=E,P=T,F=M,R=O;return p(),h(R,{ref_key:"formRef",ref:c,model:a(l),rules:a(v),"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(x,{modelValue:a(l).categoryId,"onUpdate:modelValue":e[1]||(e[1]=t=>a(l).categoryId=t),options:a(b),props:a(Z),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(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:d(()=>[(p(!0),S(B,null,X(a(f),t=>(p(),h(k,{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\u5C01\u9762\u56FE",prop:"picUrl"},{default:d(()=>[r(P,{modelValue:a(l).picUrl,"onUpdate:modelValue":e[5]||(e[5]=t=>a(l).picUrl=t),height:"80px",disabled:u.isDetail},null,8,["modelValue","disabled"])]),_:1}),r(s,{label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"sliderPicUrls"},{default:d(()=>[r(F,{modelValue:a(l).sliderPicUrls,"onUpdate:modelValue":e[6]||(e[6]=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{ma as __tla,w as default};