fix:修复 char-bar 显示阈值的问题
This commit is contained in:
@@ -410,7 +410,7 @@
|
||||
</transition>
|
||||
|
||||
<!--thresholdConfig-->
|
||||
<div class="form__sub-title">
|
||||
<div class="form__sub-title" v-if="isThresholdConfig(chartConfig.type)">
|
||||
<span>{{$t('dashboard.panel.chartForm.threshold')}}</span>
|
||||
<el-switch
|
||||
v-model="chartConfig.param.enable.thresholds"
|
||||
@@ -419,7 +419,7 @@
|
||||
></el-switch>
|
||||
</div>
|
||||
<transition name="el-zoom-in-top">
|
||||
<el-row v-if="chartConfig.param.enable.thresholds">
|
||||
<el-row v-if="chartConfig.param.enable.thresholds && isThresholdConfig(chartConfig.type)">
|
||||
<el-form-item
|
||||
v-for="(item,index) in chartConfig.param.thresholds"
|
||||
:key="index"
|
||||
|
||||
@@ -93,6 +93,23 @@ export default {
|
||||
default: return false
|
||||
}
|
||||
},
|
||||
isThresholdConfig(type) {
|
||||
switch (type) {
|
||||
case 'line':
|
||||
case 'area':
|
||||
case 'point':
|
||||
return true
|
||||
case 'table':
|
||||
case 'stat':
|
||||
case 'hexagon':
|
||||
case 'gauge':
|
||||
case 'treemap':
|
||||
case 'pie':
|
||||
case 'bar':
|
||||
return false
|
||||
default: return false
|
||||
}
|
||||
},
|
||||
isShowLegendVlaues (type) {
|
||||
switch (type) {
|
||||
case 'line':
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
</transition>
|
||||
|
||||
<!--thresholdConfig-->
|
||||
<div class="form__sub-title">
|
||||
<div class="form__sub-title" v-if="isThresholdConfig(chartConfig.type)">
|
||||
<span>{{$t('dashboard.panel.chartForm.threshold')}}</span>
|
||||
<el-switch
|
||||
v-model="chartConfig.param.enable.thresholds"
|
||||
@@ -383,7 +383,7 @@
|
||||
></el-switch>
|
||||
</div>
|
||||
<transition name="el-zoom-in-top">
|
||||
<el-row v-if="chartConfig.param.enable.thresholds">
|
||||
<el-row v-if="chartConfig.param.enable.thresholds && isThresholdConfig(chartConfig.type)">
|
||||
<el-form-item
|
||||
v-for="(item,index) in chartConfig.param.thresholds"
|
||||
:key="index"
|
||||
|
||||
Reference in New Issue
Block a user