1 |
- import{d as g,ah as _,b as j,e as M,r as u,f as N,O as f,o,j as l,w as d,a,a0 as x,J as O,i as H,k as I,aV as L,I as P,__tla as T}from"./index-1e808f2e.js";import{_ as J,__tla as R}from"./style.css_vue_type_style_index_0_src_true_lang-507ff6a6.js";import{u as U,__tla as q}from"./useMessage-5f9e8917.js";import{r as z,__tla as A}from"./formRules-83fad61e.js";import{_ as B}from"./_plugin-vue_export-helper-1b428a4d.js";let v,C=Promise.all([(()=>{try{return T}catch{}})(),(()=>{try{return R}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return A}catch{}})()]).then(async()=>{let p;p=["innerHTML"],v=B(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:b}){const D=j(),c=M(()=>D.getMobile),h=U(),n=r,s=u(),e=u({description:""}),w=N({description:[z]});f(()=>e.value.description,t=>{t==="<p><br></p>"&&(e.value.description="")},{deep:!0,immediate:!0}),f(()=>n.propFormData,t=>{t&&L(e.value,t)},{immediate:!0});const F=b;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 h.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,k=O;return o(),l(k,{ref_key:"formRef",ref:s,model:a(e),rules:a(w),disabled:r.isDetail,class:x({view:r.isDetail,"mobile-card":a(c)})},{default:d(()=>[a(c)||r.isDetail?(o(),l(m,{key:1,prop:"description"},{default:d(()=>[I("div",{innerHTML:a(e).description,class:"editor-view"},null,8,p)]),_:1})):(o(),l(m,{key:0,prop:"description"},{default:d(()=>[H(a(J),{modelValue:a(e).description,"onUpdate:modelValue":i[0]||(i[0]=V=>a(e).description=V)},null,8,["modelValue"])]),_:1}))]),_:1},8,["model","rules","disabled","class"])}}}),[["__scopeId","data-v-41db4dd7"]])});export{C as __tla,v as default};
|