encode unit

This commit is contained in:
Qiuxia Fan 2022-03-31 15:56:32 +08:00
parent 94549c2aaa
commit 0437133917
3 changed files with 9 additions and 9 deletions

View File

@ -44,7 +44,7 @@ limitations under the License. -->
</el-table-column>
<el-table-column
v-for="(metric, index) in colMetrics"
:label="`${metric} ${getUnit(index)}`"
:label="`${metric} ${decodeURIComponent(getUnit(index))}`"
:key="metric + index"
>
<template #default="scope">
@ -188,9 +188,9 @@ function getUnit(index: number) {
props.config.metricConfig[index].unit) ||
"";
if (u) {
return `(${u})`;
return `(${encodeURIComponent(u)})`;
}
return u;
return encodeURIComponent("");
}
watch(
() => [props.config.metricTypes, props.config.metrics],

View File

@ -44,7 +44,7 @@ limitations under the License. -->
</el-table-column>
<el-table-column
v-for="(metric, index) in colMetrics"
:label="`${metric} ${getUnit(index)}`"
:label="`${metric} ${decodeURIComponent(getUnit(index))}`"
:key="metric + index"
>
<template #default="scope">
@ -239,9 +239,9 @@ function getUnit(index: number) {
props.config.metricConfig[index].unit) ||
"";
if (u) {
return `(${u})`;
return `(${encodeURIComponent(u)})`;
}
return u;
return encodeURIComponent("");
}
watch(

View File

@ -56,7 +56,7 @@ limitations under the License. -->
</el-table-column>
<el-table-column
v-for="(metric, index) in colMetrics"
:label="`${metric} ${getUnit(index)}`"
:label="`${metric} ${decodeURIComponent(getUnit(index))}`"
:key="metric + index"
>
<template #default="scope">
@ -281,9 +281,9 @@ function getUnit(index: number) {
props.config.metricConfig[index].unit) ||
"";
if (u) {
return `(${u})`;
return `(${encodeURIComponent(u)})`;
}
return u;
return encodeURIComponent("");
}
watch(
() => [props.config.metricTypes, props.config.metrics],