import{d as M,ah as _,Z as j,L as k,r as u,f as L,M as f,o,x as l,w as d,a,$ as N,G as V,g as z,h as H,aW as O,B as P,_ as T,__tla as B}from"./index-cf779a2f.js";import{_ as G,__tla as I}from"./Editor-fbe8cb81.js";import{u as R,__tla as U}from"./useMessage-71caa48d.js";import{r as W,__tla as Z}from"./formRules-427d81a9.js";let v,$=Promise.all([(()=>{try{return B}catch{}})(),(()=>{try{return I}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return Z}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 h=j(),c=k(()=>h.getMobile),b=R(),n=r,s=u(),e=u({description:""}),w=L({description:[W]});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 F=D;return y({validate:async()=>{var t;if(s)try{await((t=a(s))==null?void 0:t.validate()),Object.assign(n.propFormData,e.value)}catch(i){throw b.error("\u3010\u5546\u54C1\u8BE6\u60C5\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),F("update:activeName","description"),i}}}),(t,i)=>{const m=P,x=V;return o(),l(x,{ref_key:"formRef",ref:s,model:a(e),rules:a(w),disabled:r.isDetail,class:N({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":i[0]||(i[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-admin/src/views/mall/product/spu/form/DescriptionForm.vue"]])});export{$ as __tla,v as default};