ReplyForm-14be0132.js 2.0 KB

1
  1. import{d as z,i as D,r as i,f as P,o as _,x as c,w as r,g as d,a,q as p,y as R,X as U,Q as j,B,G,D as J,J as Q,_ as S,__tla as X}from"./index-0e5354ef.js";import{_ as A,__tla as E}from"./Dialog-88268667.js";import{r as H,__tla as I}from"./comment-bb571e86.js";import{u as K,__tla as L}from"./useMessage-a8a21011.js";let y,M=Promise.all([(()=>{try{return X}catch{}})(),(()=>{try{return E}catch{}})(),(()=>{try{return I}catch{}})(),(()=>{try{return L}catch{}})()]).then(async()=>{y=S(z({name:"ProductComment",__name:"ReplyForm",emits:["success"],setup(N,{expose:f,emit:v}){const C=K(),{t:x}=D(),l=i(!1),u=i(!1),t=i({id:void 0,replyContent:void 0}),g=P({replyContent:[{required:!0,message:"\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),o=i();f({open:async e=>{w(),t.value.id=e,l.value=!0}});const h=v,b=async()=>{var e;if(await((e=o==null?void 0:o.value)==null?void 0:e.validate())){u.value=!0;try{await H(t.value),C.success(x("common.createSuccess")),l.value=!1,h("success")}finally{u.value=!1}}},w=()=>{var e;t.value={id:void 0,replyContent:void 0},(e=o.value)==null||e.resetFields()};return(e,s)=>{const V=B,k=G,m=J,F=A,q=Q;return _(),c(F,{title:"\u56DE\u590D",modelValue:a(l),"onUpdate:modelValue":s[2]||(s[2]=n=>j(l)?l.value=n:null)},{footer:r(()=>[d(m,{onClick:b,type:"primary",disabled:a(u)},{default:r(()=>[p("\u786E \u5B9A ")]),_:1},8,["disabled"]),d(m,{onClick:s[1]||(s[1]=n=>l.value=!1)},{default:r(()=>[p("\u53D6 \u6D88")]),_:1})]),default:r(()=>[R((_(),c(k,{ref_key:"formRef",ref:o,model:a(t),rules:a(g),"label-width":"100px"},{default:r(()=>[d(V,{label:"\u56DE\u590D\u5185\u5BB9",prop:"replyContent"},{default:r(()=>[d(a(U),{type:"textarea",modelValue:a(t).replyContent,"onUpdate:modelValue":s[0]||(s[0]=n=>a(t).replyContent=n)},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[q,a(u)]])]),_:1},8,["modelValue"])}}}),[["__file","D:/zhongxing/mall-newfeifan-zx-business/src/views/mall/product/comment/ReplyForm.vue"]])});export{M as __tla,y as default};