Loading src/views/messageCenter/messageNews/index.vue +16 −17 Original line number Diff line number Diff line Loading @@ -52,7 +52,11 @@ <van-button round type="info" @click="goConfirm(item)" >整改</van-button > <van-button round type="warning" @click="read(item)" v-if="item.status == '未读'" <van-button round type="warning" @click="read(item)" v-if="item.status == '未读'" >已读</van-button > </div> Loading Loading @@ -112,9 +116,7 @@ export default { }, // 搜索事件 onSearch(val) { console.log(val); }, onSearch(val) {}, // 封装全部 已读 和 未读的方法 selectCategory(data) { Loading @@ -129,7 +131,6 @@ export default { // 点击消息条目时的点击事件 变成已读 read(data) { console.log("触发了点击事件"); // 判断showIndex是否等于null 如果不等于则先将showIndex改为null this.showIndex = null; if (data.status == "未读") { Loading @@ -156,7 +157,7 @@ export default { // 向父组件发送消息条数 this.$emit("messageLength", res.total); // 给消息列表赋值 this.messageList = res.rows this.messageList = res.rows; } }); }, Loading Loading @@ -219,12 +220,10 @@ export default { // 详情 goDetail(data) { console.log(data); this.showIndex = null; }, // 整改 goConfirm(data) { console.log(123); this.showIndex = null; } } Loading Loading
src/views/messageCenter/messageNews/index.vue +16 −17 Original line number Diff line number Diff line Loading @@ -52,7 +52,11 @@ <van-button round type="info" @click="goConfirm(item)" >整改</van-button > <van-button round type="warning" @click="read(item)" v-if="item.status == '未读'" <van-button round type="warning" @click="read(item)" v-if="item.status == '未读'" >已读</van-button > </div> Loading Loading @@ -112,9 +116,7 @@ export default { }, // 搜索事件 onSearch(val) { console.log(val); }, onSearch(val) {}, // 封装全部 已读 和 未读的方法 selectCategory(data) { Loading @@ -129,7 +131,6 @@ export default { // 点击消息条目时的点击事件 变成已读 read(data) { console.log("触发了点击事件"); // 判断showIndex是否等于null 如果不等于则先将showIndex改为null this.showIndex = null; if (data.status == "未读") { Loading @@ -156,7 +157,7 @@ export default { // 向父组件发送消息条数 this.$emit("messageLength", res.total); // 给消息列表赋值 this.messageList = res.rows this.messageList = res.rows; } }); }, Loading Loading @@ -219,12 +220,10 @@ export default { // 详情 goDetail(data) { console.log(data); this.showIndex = null; }, // 整改 goConfirm(data) { console.log(123); this.showIndex = null; } } Loading