import{d as M,ai as _,$ as V,L as k,r as u,f as L,M as f,o,x as l,w as d,a,a0 as j,G as N,g as z,h as H,aV as O,B as P,_ as T,__tla as B}from"./index-7d5b26d3.js";import{_ as G,__tla as I}from"./Editor-7cbdb87d.js";import{u as R,__tla as U}from"./useMessage-c81eaa5b.js";import{r as $,__tla as q}from"./formRules-24ef81cf.js";let v,A=Promise.all([(()=>{try{return B}catch{}})(),(()=>{try{return I}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return q}catch{}})()]).then(async()=>{let p;p=["innerHTML"],v=T(M({name:"ProductDescriptionForm",__name:"DescriptionForm",props:{propFormData:{type:Object,default:()=>{}},activeName:_.string.def(""),isDetail:_.bool.def(!1)},emits:["update:activeName"],setup(r,{expose:y,emit:D}){const b=V(),c=k(()=>b.getMobile),h=R(),n=r,i=u(),e=u({description:""}),w=L({description:[$]});f(()=>e.value.description,t=>{t==="<p><br></p>"&&(e.value.description="")},{deep:!0,immediate:!0}),f(()=>n.propFormData,t=>{t&&O(e.value,t)},{immediate:!0});const F=D;return y({validate:async()=>{var t;if(i)try{await((t=a(i))==null?void 0:t.validate()),Object.assign(n.propFormData,e.value)}catch(s){throw h.error("\u3010\u5546\u54C1\u8BE6\u60C5\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),F("update:activeName","description"),s}}}),(t,s)=>{const m=P,x=N;return o(),l(x,{ref_key:"formRef",ref:i,model:a(e),rules:a(w),disabled:r.isDetail,class:j({view:r.isDetail,"mobile-card":a(c)})},{default:d(()=>[a(c)||r.isDetail?(o(),l(m,{key:1,prop:"description"},{default:d(()=>[H("div",{innerHTML:a(e).description,class:"editor-view"},null,8,p)]),_:1})):(o(),l(m,{key:0,prop:"description"},{default:d(()=>[z(a(G),{modelValue:a(e).description,"onUpdate:modelValue":s[0]||(s[0]=g=>a(e).description=g)},null,8,["modelValue"])]),_:1}))]),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-4783d9de"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/product/spu/form/DescriptionForm.vue"]])});export{A as __tla,v as default};
