import{d as g,as as _,y as k,e as M,r as u,x as N,w as f,o,C as l,A as d,a,ad as j,W as z,f as H,B as L,dy as O,V as P,_ as T,__tla as A}from"./index-286756b9.js";import{_ as B,__tla as C}from"./Editor-514f76f8.js";import{u as I,__tla as R}from"./useMessage-084b1e70.js";import{r as U,__tla as W}from"./formRules-b40a428a.js";let v,q=Promise.all([(()=>{try{return A}catch{}})(),(()=>{try{return C}catch{}})(),(()=>{try{return R}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{let p;p=["innerHTML"],v=T(g({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=k(),c=M(()=>b.getMobile),h=I(),n=r,i=u(),e=u({description:""}),w=N({description:[U]});f(()=>e.value.description,t=>{t==="


"&&(e.value.description="")},{deep:!0,immediate:!0}),f(()=>n.propFormData,t=>{t&&O(e.value,t)},{immediate:!0});const x=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"),x("update:activeName","description"),s}}}),(t,s)=>{const m=P,F=z;return o(),l(F,{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(()=>[L("div",{innerHTML:a(e).description,class:"editor-view"},null,8,p)]),_:1})):(o(),l(m,{key:0,prop:"description"},{default:d(()=>[H(a(B),{modelValue:a(e).description,"onUpdate:modelValue":s[0]||(s[0]=V=>a(e).description=V)},null,8,["modelValue"])]),_:1}))]),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-4783d9de"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DescriptionForm.vue"]])});export{q as __tla,v as default};