
vue聊天功能模块(八)撤回消息实现
??????????????????? ??????????????????ID???ID? ????????????? ?????????????????? ????????????
?????????v-for????????? ????????????? ????? ???????????? ???????
????? ???????
??????????????? ?????????????????? ????????????????????????????
发布日期:2021-05-08 00:22:19
浏览次数:29
分类:精选文章
本文共 1873 字,大约阅读时间需要 6 分钟。
???????
??
- ??????????????
- ??????????
- ????????????
- ??????????????????????????????HTTP???
??????????????????
@contextmenu.prevent
?????rightMessageClick
?rightMessageClick(msgId, uid) { this.withdrawMessageSmgId = msgId; if (uid === this.user.userId) { this.setMsg(msgId); } else { return; }}
handelBackEvent(e, msgId) { let thisId = e.target.id; switch (thisId) { case 'delMsg': this.delMsg(msgId); break; case 'withdrawMessage': this.withdrawMessage(msgId); break; case 'cancelBack': $('#backMsg').remove(); console.log('cancelBack'); break; }}
setMsg(num) { $('#backMsg').remove(); const backMsgHtml = ``; $('#msg' + num).append(backMsgHtml);}??????
?????????
let rspOBJ = DispatchmessageCtrl.backMsg(MsgIndex, TargetType, TargetInfo);
if (rspOBJ === 0) { // ?????? const htmld = ``; $('#msg' + msgId).append(htmld); // ???? this.showMesDatas = this.showMesDatas.filter(item => item.mid !== msgId); this.withdrawMessageShow = false; $('#backMsg').remove();} else { // ???? this.withdrawMessageShow = false; this.$message.warning('????'); $('#backMsg').remove();}${msgInfo.una}???????
??????
????????
- ??
location.reload()
??????????????
????????
- ??
showMesDatas
????????this.showMesDatas = this.showMesDatas.map(item => { if (item.mid === msgId) { return { ...item, isBack: true }; } return item;});
????
发表评论
最新留言
做的很好,不错不错
[***.243.131.199]2025年05月12日 01时55分20秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
laravel mix
2023-01-30
laravel on duplicate key update
2023-01-30
Laravel Passport
2023-01-30
Laravel RESTful API 开发框架指南
2023-01-30
laravel 之 Eloquent 模型修改器和序列化
2023-01-30
Laravel 使用 - artisan schedule使用
2023-01-30
Laravel 使用rdkafka
2023-01-30
Laravel 多环境配置
2023-01-30
laravel 学习之第一章
2023-01-30
laravel 学习之第二章
2023-01-30
Laravel 安装上传代码不完整的解决方法
2023-01-30
laravel 安装添加多站点
2023-01-30
Laravel 开源项目 『 糖果盒子 - Web 开发者的书签导航 』
2023-01-30
Laravel 模型
2023-01-30
Laravel 深入理解路由和URL生成
2023-01-30
laravel 生命周期与框架精髓
2023-01-30
laravel 表单验证
2023-01-30
laravel 调试sql
2023-01-30
laravel 路由缓存
2023-01-30
Laravel 连接(Join)
2023-01-30