fix table

This commit is contained in:
Qiuxia Fan 2022-04-02 12:01:25 +08:00
parent 363745aa00
commit 7550179e4e
2 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,6 @@ import {
computed,
} from "vue";
import type { PropType } from "vue";
import _ from "lodash";
import { useECharts } from "@/hooks/useEcharts";
import { addResizeListener, removeResizeListener } from "@/utils/event";
@ -72,15 +71,15 @@ onMounted(async () => {
});
watch(
() => _.cloneDeepWith(props.option),
(data, old) => {
() => props.option,
(newVal, oldVal) => {
if (!available.value) {
return;
}
if (data === old) {
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
return;
}
setOptions(data);
setOptions(newVal);
}
);

View File

@ -48,6 +48,7 @@ limitations under the License. -->
getLabel(metric, index)
)} ${decodeURIComponent(getUnit(index))}`"
:key="metric + index"
min-width="120"
>
<template #default="scope">
<div class="chart">
@ -70,7 +71,7 @@ limitations under the License. -->
</div>
</template>
</el-table-column>
<el-table-column label="Attributes" :width="100">
<el-table-column label="Attributes">
<template #default="scope">
<el-popover placement="left" :width="400" trigger="click">
<template #reference>