mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 08:17:33 +00:00
fix: card
This commit is contained in:
parent
d98110de85
commit
80fa07b8ca
@ -22,7 +22,7 @@ limitations under the License. -->
|
|||||||
justifyContent: config.textAlign || 'center',
|
justifyContent: config.textAlign || 'center',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ singleVal.toFixed(2) }}
|
{{ singleVal }}
|
||||||
<span class="unit" v-show="config.showUnit && unit">
|
<span class="unit" v-show="config.showUnit && unit">
|
||||||
{{ decodeURIComponent(unit) }}
|
{{ decodeURIComponent(unit) }}
|
||||||
</span>
|
</span>
|
||||||
@ -54,7 +54,7 @@ limitations under the License. -->
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const metricConfig = computed(() => props.config.metricConfig || []);
|
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(() => props.data[key.value]);
|
||||||
const unit = computed(() => metricConfig.value[0] && encodeURIComponent(metricConfig.value[0].unit || ""));
|
const unit = computed(() => 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