ReplyForm-61b7c668.js 2.0 KB

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