From f1b55bc6a4f6a59fce07d8f4fffc0f09c3a13817 Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Fri, 20 Oct 2023 14:56:33 +0800 Subject: [PATCH] 删除添加loading,提示词颜色 --- src/views/standard/test/index.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/standard/test/index.vue b/src/views/standard/test/index.vue index ced0d0a..d45e635 100644 --- a/src/views/standard/test/index.vue +++ b/src/views/standard/test/index.vue @@ -122,9 +122,7 @@ style="margin-bottom: 20px" >
@@ -376,6 +374,7 @@ circle size="mini" icon="el-icon-delete" + :loading="scoped.row.loading" > @@ -861,10 +860,11 @@ export default { }, //删除即时测考试 async removeReport(obj, index) { + this.tableData[index].loading = true; const { data, status, info } = await this.$request.deleteReport({ id: obj.id, }); - if (status == 200) { + if (status === 0) { this.$message.success("删除成功!"); this.tableData.splice(index, 1); } else { @@ -1103,7 +1103,11 @@ export default { }); this.loading = false; if (status === 0) { - this.tableData = (data?.list && [...data?.list]) || []; + this.tableData = + data?.list.map((item) => { + item.loading = false; + return item; + }) || []; this.total = data?.count || 0; if (!query.classId) { //多班级 -- libgit2 0.21.4