You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/whisper-CD0RDnNY.js

2 lines
1.6 KiB

import{a0 as B,_ as b}from"./index-DxHQoSDp.js";import{S as z,I as C,T as N,e as U,B as V,_ as I}from"./naive-ui-BJojRuLw.js";import{d as R,r,t as S,w as n,k as l,q as o,G as _,z as p,j as T}from"./@vue-9sINKCPW.js";const W={class:"whisper-wrap"},$={class:"whisper-line"},j={class:"whisper-line send-wrap"},q=R({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(i,{emit:u}){const d=i,t=r(""),a=r(!1),m=u,c=()=>{m("success")},w=()=>{a.value=!0,B({user_id:d.user.id,content:t.value}).then(s=>{window.$message.success("发送成功"),a.value=!1,t.value="",c()}).catch(s=>{a.value=!1})};return(s,e)=>{const f=N,h=C,v=z,g=U,y=V,x=I;return T(),S(x,{show:s.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:n(()=>[l("div",W,[o(v,{"show-icon":!1},{default:n(()=>[e[1]||(e[1]=_(" 即将发送私信给: ")),o(h,{style:{"max-width":"100%"}},{default:n(()=>[o(f,{type:"success"},{default:n(()=>[_(p(s.user.nickname)+"@"+p(s.user.username),1)]),_:1})]),_:1})]),_:1}),l("div",$,[o(g,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:t.value,"onUpdate:value":e[0]||(e[0]=k=>t.value=k),maxlength:"200","show-count":""},null,8,["value"])]),l("div",j,[o(y,{strong:"",secondary:"",type:"primary",loading:a.value,onClick:w},{default:n(()=>e[2]||(e[2]=[_(" 发送 ")])),_:1},8,["loading"])])])]),_:1},8,["show"])}}}),A=b(q,[["__scopeId","data-v-0cbfe47c"]]);export{A as _};