From 27afcc11ac69d083819fa43eeba11dadce6174a6 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Tue, 8 Apr 2025 10:05:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(im=5Fchat=5Finfo):=20=E5=B0=86?= =?UTF-8?q?=E6=96=B0=E6=95=B0=E6=8D=AE=E6=8F=92=E5=85=A5=E5=88=B0=E6=95=B0?= =?UTF-8?q?=E7=BB=84=E5=A4=B4=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉使用 concat 方法将新数据追加到数组中的代码- 新增代码将新数据插入到数组头部,以实现倒序排列 --- pages/common/im_chat_info.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/common/im_chat_info.vue b/pages/common/im_chat_info.vue index 0d9f9a2..412573b 100644 --- a/pages/common/im_chat_info.vue +++ b/pages/common/im_chat_info.vue @@ -143,7 +143,8 @@ export default { return } - this.tableList = this.tableList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中 + // this.tableList = this.tableList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中 + this.tableList.unshift(...res.data.data); // 将新数据插入到数组头部 console.log('列表',this.tableList) this.filteredData.total = res.data.total