From 97187b246b94dd58cb585ebaed7e8644d2f00119 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 03 四月 2023 00:26:04 +0800
Subject: [PATCH] update 调整代码格式

---
 src/views/monitor/cache/index.vue |  129 +++++++++++++++++++++---------------------
 1 files changed, 65 insertions(+), 64 deletions(-)

diff --git a/src/views/monitor/cache/index.vue b/src/views/monitor/cache/index.vue
index 9af7d50..8fd3bde 100644
--- a/src/views/monitor/cache/index.vue
+++ b/src/views/monitor/cache/index.vue
@@ -1,67 +1,3 @@
-<script setup name="Cache" lang="ts">
-import { getCache } from '@/api/monitor/cache';
-import * as echarts from 'echarts';
-import { ComponentInternalInstance } from "vue";
-
-const cache = ref<any>({});
-const commandstats = ref();
-const usedmemory = ref();
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-
-const getList = async () => {
-  proxy?.$modal.loading("姝e湪鍔犺浇缂撳瓨鐩戞帶鏁版嵁锛岃绋嶅�欙紒");
-  const res = await getCache();
-  proxy?.$modal.closeLoading();
-  cache.value = res.data;
-  const commandstatsIntance = echarts.init(commandstats.value, "macarons");
-  commandstatsIntance.setOption({
-    tooltip: {
-      trigger: "item",
-      formatter: "{a} <br/>{b} : {c} ({d}%)"
-    },
-    series: [
-      {
-        name: "鍛戒护",
-        type: "pie",
-        roseType: "radius",
-        radius: [15, 95],
-        center: ["50%", "38%"],
-        data: res.data.commandStats,
-        animationEasing: "cubicInOut",
-        animationDuration: 1000
-      }
-    ]
-  });
-
-  const usedmemoryInstance = echarts.init(usedmemory.value, "macarons");
-  usedmemoryInstance.setOption({
-    tooltip: {
-      formatter: "{b} <br/>{a} : " + cache.value.info.used_memory_human
-    },
-    series: [
-      {
-        name: "宄板��",
-        type: "gauge",
-        min: 0,
-        max: 1000,
-        detail: {
-          formatter: cache.value.info.used_memory_human
-        },
-        data: [
-          {
-            value: parseFloat(cache.value.info.used_memory_human),
-            name: "鍐呭瓨娑堣��"
-          }
-        ]
-      }
-    ]
-  })
-}
-
-onMounted(() => {
-  getList();
-})
-</script>
 <template>
   <div class="p-2">
     <el-row>
@@ -186,3 +122,68 @@
     </el-row>
   </div>
 </template>
+
+<script setup name="Cache" lang="ts">
+import { getCache } from '@/api/monitor/cache';
+import * as echarts from 'echarts';
+import { ComponentInternalInstance } from "vue";
+
+const cache = ref<any>({});
+const commandstats = ref();
+const usedmemory = ref();
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+const getList = async () => {
+    proxy?.$modal.loading("姝e湪鍔犺浇缂撳瓨鐩戞帶鏁版嵁锛岃绋嶅�欙紒");
+    const res = await getCache();
+    proxy?.$modal.closeLoading();
+    cache.value = res.data;
+    const commandstatsIntance = echarts.init(commandstats.value, "macarons");
+    commandstatsIntance.setOption({
+        tooltip: {
+            trigger: "item",
+            formatter: "{a} <br/>{b} : {c} ({d}%)"
+        },
+        series: [
+            {
+                name: "鍛戒护",
+                type: "pie",
+                roseType: "radius",
+                radius: [15, 95],
+                center: ["50%", "38%"],
+                data: res.data.commandStats,
+                animationEasing: "cubicInOut",
+                animationDuration: 1000
+            }
+        ]
+    });
+
+    const usedmemoryInstance = echarts.init(usedmemory.value, "macarons");
+    usedmemoryInstance.setOption({
+        tooltip: {
+            formatter: "{b} <br/>{a} : " + cache.value.info.used_memory_human
+        },
+        series: [
+            {
+                name: "宄板��",
+                type: "gauge",
+                min: 0,
+                max: 1000,
+                detail: {
+                    formatter: cache.value.info.used_memory_human
+                },
+                data: [
+                    {
+                        value: parseFloat(cache.value.info.used_memory_human),
+                        name: "鍐呭瓨娑堣��"
+                    }
+                ]
+            }
+        ]
+    })
+}
+
+onMounted(() => {
+    getList();
+})
+</script>
\ No newline at end of file

--
Gitblit v1.9.3