1 |
- import{d as x,ag as u,Y as H,K as L,r as _,e as M,L as f,o,v as l,w as d,a as e,Z as N,D as j,f as V,g as O,b9 as P,A as R,_ as T,__tla as U}from"./index-11e4820e.js";import{_ as z,__tla as A}from"./Editor-0f5cadc2.js";import{u as I,__tla as K}from"./useMessage-06ddf735.js";import{r as X,__tla as Y}from"./formRules-a3633e47.js";let v,Z=Promise.all([(()=>{try{return U}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return Y}catch{}})()]).then(async()=>{let p;p=["innerHTML"],v=T(x({name:"ProductDescriptionForm",__name:"DescriptionForm",props:{propFormData:{type:Object,default:()=>{}},activeName:u.string.def(""),isDetail:u.bool.def(!1)},emits:["update:activeName"],setup(r,{expose:y,emit:D}){const b=H(),c=L(()=>b.getMobile),w=I(),n=r,i=_(),a=_({description:""}),h=M({description:[X]});f(()=>a.value.description,t=>{t==="<p><br></p>"&&(a.value.description="")},{deep:!0,immediate:!0}),f(()=>n.propFormData,t=>{t&&P(a.value,t)},{immediate:!0});const F=D;return y({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 w.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=R,g=j;return o(),l(g,{ref_key:"formRef",ref:i,model:e(a),rules:e(h),disabled:r.isDetail,class:N({view:r.isDetail,"mobile-card":e(c)})},{default:d(()=>[e(c)||r.isDetail?(o(),l(m,{key:1,prop:"description"},{default:d(()=>[O("div",{innerHTML:e(a).description,class:"editor-view"},null,8,p)]),_:1})):(o(),l(m,{key:0,prop:"description"},{default:d(()=>[V(e(z),{modelValue:e(a).description,"onUpdate:modelValue":s[0]||(s[0]=k=>e(a).description=k)},null,8,["modelValue"])]),_:1}))]),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-4783d9de"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/DescriptionForm.vue"]])});export{Z as __tla,v as default};
|