reactor:【infra 基础设施】redis 进一步统一代码风格
This commit is contained in:
@@ -15,7 +15,7 @@ const chartRef = ref<EchartsUIType>();
|
||||
const { renderEcharts } = useEcharts(chartRef);
|
||||
|
||||
/** 渲染命令统计图表 */
|
||||
const renderCommandStats = () => {
|
||||
function renderCommandStats() {
|
||||
if (!props.redisData?.commandStats) {
|
||||
return;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ const renderCommandStats = () => {
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/** 监听数据变化,重新渲染图表 */
|
||||
watch(
|
||||
@@ -97,7 +97,5 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<EchartsUI ref="chartRef" height="420px" />
|
||||
</div>
|
||||
<EchartsUI ref="chartRef" height="420px" />
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,7 @@ const chartRef = ref<EchartsUIType>();
|
||||
const { renderEcharts } = useEcharts(chartRef);
|
||||
|
||||
/** 解析内存值,移除单位,转为数字 */
|
||||
const parseMemoryValue = (memStr: string | undefined): number => {
|
||||
function parseMemoryValue(memStr: string | undefined): number {
|
||||
if (!memStr) {
|
||||
return 0;
|
||||
}
|
||||
@@ -27,10 +27,10 @@ const parseMemoryValue = (memStr: string | undefined): number => {
|
||||
} catch {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** 渲染内存使用图表 */
|
||||
const renderMemoryChart = () => {
|
||||
function renderMemoryChart() {
|
||||
if (!props.redisData?.info) {
|
||||
return;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ const renderMemoryChart = () => {
|
||||
},
|
||||
],
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/** 监听数据变化,重新渲染图表 */
|
||||
watch(
|
||||
@@ -131,7 +131,5 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<EchartsUI ref="chartRef" height="420px" />
|
||||
</div>
|
||||
<EchartsUI ref="chartRef" height="420px" />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user