feat: 实现 stat 的自动排列

This commit is contained in:
zhangyu
2021-12-10 16:18:18 +08:00
parent 167c4498bb
commit 0faf028ceb
7 changed files with 119 additions and 49 deletions

View File

@@ -52,7 +52,7 @@
<div v-if="expressionsShow[index-1].error" class="el-form-item__error" style="top: 10px;left: 164px"> {{expressionsShow[index-1].error}}</div>
</span>
<span>
<span @click="()=>{addExpression()}" style="margin-right: 5px;padding-left: 10px" v-if="!isStat(chartConfig.type)">
<span @click="()=>{addExpression()}" style="margin-right: 5px;padding-left: 10px">
<i class="nz-icon nz-icon-create-square" style="font-weight: normal; font-size: 17px; cursor: pointer;"></i>
</span>
<span @click="copyExpression(index - 1)" style="margin-right: 5px">
@@ -770,12 +770,6 @@ export default {
case 'treemap':
case 'guage':
case 'pie':
if (type === 'stat') {
this.expressions = []
this.expressionName = []
this.chartConfig.elements = [this.chartConfig.elements[0]]
this.addExpression(this.chartConfig.elements[0])
}
if (this.oldType === 'stat' || this.oldType === 'bar' || this.oldType === 'treemap' || this.oldType === 'guage' || this.oldType === 'pie') {
break
}