From 4b43bfb3f6f499f480712dd29bef52275466afd6 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 30 七月 2021 22:10:59 +0800 Subject: [PATCH] change all --- src/pages/vindicate/index/App.vue | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pages/vindicate/index/App.vue b/src/pages/vindicate/index/App.vue index d6af057..6336082 100644 --- a/src/pages/vindicate/index/App.vue +++ b/src/pages/vindicate/index/App.vue @@ -12,7 +12,7 @@ <span class="card-text">{{ item.name }}</span> </div> </div> - <systemClean v-if="activePage == 1" style="width: 100%" :percent="storagePercent"></systemClean> + <systemClean v-if="activePage == 1" style="width: 100%" :free="free" :full="full" @refreshPercent="getLeftPer"></systemClean> <updateSettings v-if="activePage == 0" style="width: 100%"></updateSettings> <back-up v-if="activePage == 3" style="width: 100%"></back-up> <restartSettings v-if="activePage == 2" style="width: 100%"></restartSettings> @@ -40,16 +40,18 @@ data() { return { menuArr: [ - { name: "鏇存柊璁剧疆" ,icon:"\ue60f" }, + { name: "鏇存柊璁剧疆" ,icon:"\ue6fa" }, // { name: "澶囦唤杩樺師",icon:"" }, - { name: "绯荤粺娓呯悊" ,icon:"\ue6e0" }, - { name: "閲嶅惎璁剧疆" ,icon:"" }, + { name: "绯荤粺娓呯悊" ,icon:"\uea3b" }, + { name: "閲嶅惎璁剧疆" ,icon:"\ue709" }, ], activePage: 0, - storagePercent: 0, + free: 0, + full: 0, }; }, mounted() { + this.getLeftPer() }, methods: { @@ -58,7 +60,8 @@ }, getLeftPer(){ freedisk().then((res) => { - this.storagePercent = Math.round(res.data.free/ res.data.all *100) + this.free = res.data.free + this.full = res.data.all }) }, }, -- Gitblit v1.8.0