mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-18 14:45:25 +00:00
fix unit
This commit is contained in:
parent
a17cf4b6be
commit
139c5ac8f5
@ -23,7 +23,7 @@ limitations under the License. -->
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ singleVal.toFixed(2) }}
|
{{ singleVal.toFixed(2) }}
|
||||||
<span class="unit" v-show="config.showUnit">
|
<span class="unit" v-show="config.showUnit && unit">
|
||||||
{{ decodeURIComponent(unit) }}
|
{{ decodeURIComponent(unit) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -55,7 +55,9 @@ const metricConfig = computed(() => props.config.metricConfig || []);
|
|||||||
const key = computed(() => Object.keys(props.data)[0]);
|
const key = computed(() => Object.keys(props.data)[0]);
|
||||||
const singleVal = computed(() => Number(props.data[key.value]));
|
const singleVal = computed(() => Number(props.data[key.value]));
|
||||||
const unit = computed(
|
const unit = computed(
|
||||||
() => metricConfig.value[0] && encodeURIComponent(metricConfig.value[0].unit)
|
() =>
|
||||||
|
metricConfig.value[0] &&
|
||||||
|
encodeURIComponent(metricConfig.value[0].unit || "")
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user