fix: show error messages and update style for no data (#279)

This commit is contained in:
Fine0830 2023-06-09 21:03:51 +08:00 committed by GitHub
parent 9b1a5f7a74
commit 7738695601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -93,11 +93,14 @@ limitations under the License. -->
/>
<Icon class="cp" iconName="remove_circle_outline" size="middle" @click="deleteMetric(index)" />
</span>
<div v-if="(errors || states.tips)[index] && isExpression" class="ml-10 red sm">
{{ (errors || states.tips)[index] }}
<div v-if="(states.tips || [])[index] && isExpression" class="ml-10 red sm">
{{ states.tips[index] }}
</div>
<div v-if="(subErrors || states.tips)[index] && isExpression" class="ml-10 red sm">
{{ (subErrors || states.tips)[index] }}
<div v-if="(errors || [])[index] && isExpression" class="ml-10 red sm">
{{ (errors || [])[index] }}
</div>
<div v-if="(subErrors || [])[index] && isExpression" class="ml-10 red sm">
{{ (subErrors || [])[index] }}
</div>
</div>
<div>{{ t("visualization") }}</div>

View File

@ -15,7 +15,7 @@ limitations under the License. -->
<template>
<div
v-if="!isNaN(singleVal)"
v-if="singleVal !== null && !isNaN(singleVal)"
class="chart-card"
:style="{
fontSize: `${config.fontSize}px`,