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