From c4b24fa657c3d62bff3064f8007d2ea5e66cbef2 Mon Sep 17 00:00:00 2001 From: zhangxiaolong Date: Fri, 8 Apr 2022 19:07:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E8=A7=A3=E5=86=B3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E6=9C=89=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/table/settings/backupsTable.vue | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/nezha-fronted/src/components/common/table/settings/backupsTable.vue b/nezha-fronted/src/components/common/table/settings/backupsTable.vue index 6c7aba32a..16871c840 100644 --- a/nezha-fronted/src/components/common/table/settings/backupsTable.vue +++ b/nezha-fronted/src/components/common/table/settings/backupsTable.vue @@ -29,7 +29,7 @@ {{ scope.row.time ? scope.row.time : "" }} - {{ scope.row.size ? scope.row.size : "" }} + {{ scope.row.size ? getNum(scope.row.size) : "" }} {{ scope.row.fileName }} @@ -129,6 +129,9 @@ export default { }, methods: { + getNum(item){ + return bus.getNumStr(item) + }, async getTableData (item) { if(!item){ await get('/sys/backup').then((res) => { @@ -146,16 +149,8 @@ export default { await post('/sys/backup/list').then((res) => { if (res.code === 200) { if (res.data) { - // res.data.forEach((e,i)=>{ - // this.tableData2[i].fileName = e.fileName - // this.tableData2[i].size = bus.getNumStr(e.size) - // this.tableData2[i].time = e.time - // }) - for (const i in res.data) { - this.tableData2[i].fileName = res.data[i].fileName - this.tableData2[i].size = bus.getNumStr(res.data[i].size) - this.tableData2[i].time = res.data[i].time - } + this.tableData2 = res.data + } } })