import{d as k,ah as _,Z as L,K as M,r as u,e as N,L as f,o,v as l,w as d,a as e,$ as j,D as V,f as z,g as H,b9 as O,A as P,_ as T,__tla as A}from"./index-04f8d540.js";import{_ as I,__tla as K}from"./Editor-02b0cc9a.js";import{u as R,__tla as U}from"./useMessage-9c37e840.js";import{r as Z,__tla as $}from"./formRules-ba5d484c.js";let v,q=Promise.all([(()=>{try{return A}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return U}catch{}})(),(()=>{try{return $}catch{}})()]).then(async()=>{let p;p=["innerHTML"],v=T(k({name:"ProductDescriptionForm",__name:"DescriptionForm",props:{propFormData:{type:Object,default:()=>{}},activeName:_.string.def(""),isDetail:_.bool.def(!1)},emits:["update:activeName"],setup(r,{expose:D,emit:y}){const b=L(),c=M(()=>b.getMobile),h=R(),n=r,i=u(),a=u({description:""}),w=N({description:[Z]});f(()=>a.value.description,t=>{t==="<p><br></p>"&&(a.value.description="")},{deep:!0,immediate:!0}),f(()=>n.propFormData,t=>{t&&O(a.value,t)},{immediate:!0});const F=y;return D({validate:async()=>{var t;if(i)try{await((t=e(i))==null?void 0:t.validate()),Object.assign(n.propFormData,a.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,g=V;return o(),l(g,{ref_key:"formRef",ref:i,model:e(a),rules:e(w),disabled:r.isDetail,class:j({view:r.isDetail,"mobile-card":e(c)})},{default:d(()=>[e(c)||r.isDetail?(o(),l(m,{key:1,prop:"description"},{default:d(()=>[H("div",{innerHTML:e(a).description,class:"editor-view"},null,8,p)]),_:1})):(o(),l(m,{key:0,prop:"description"},{default:d(()=>[z(e(I),{modelValue:e(a).description,"onUpdate:modelValue":s[0]||(s[0]=x=>e(a).description=x)},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{q as __tla,v as default};
