1 |
- import{d as g,ar as _,y as k,e as M,r as u,x as N,w as f,o,A as l,B as d,a,ac as j,W as H,f as L,C as O,dy as P,V as T,__tla as A}from"./index-e8bff8cb.js";import{_ as B,__tla as C}from"./style.css_vue_type_style_index_0_src_true_lang-d66aa64c.js";import{u as I,__tla as R}from"./useMessage-de42a595.js";import{r as U,__tla as W}from"./formRules-b7b841a2.js";import{_ as q}from"./_plugin-vue_export-helper-1b428a4d.js";let v,z=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=q(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=k(),c=M(()=>D.getMobile),h=I(),n=r,i=u(),e=u({description:""}),w=N({description:[U]});f(()=>e.value.description,t=>{t==="<p><br></p>"&&(e.value.description="")},{deep:!0,immediate:!0}),f(()=>n.propFormData,t=>{t&&P(e.value,t)},{immediate:!0});const F=b;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"),F("update:activeName","description"),s}}}),(t,s)=>{const m=T,x=H;return o(),l(x,{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(()=>[O("div",{innerHTML:a(e).description,class:"editor-view"},null,8,p)]),_:1})):(o(),l(m,{key:0,prop:"description"},{default:d(()=>[L(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-41db4dd7"]])});export{z as __tla,v as default};
|