fix: 修复Expression metric-input不正确

This commit is contained in:
@changcode
2021-05-28 11:28:33 +08:00
parent 5cc00375ff
commit ccf8013050
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@
:index="0"
:plugins="['metric-selector','metric-input']"
:required="true"
:styleType="2"
:styleType="3"
@change="metricChange"
></promql-input>
</el-row>

View File

@@ -39,7 +39,7 @@
</div>
</template>
<!--right-box里的样式-->
<template v-if="styleType == 2">
<template v-if="styleType === 2 || styleType === 3">
<el-row v-if="plugins.indexOf('metric-input') > -1 || plugins.indexOf('metric-selector') > -1"
style="width: 100%;">
<el-col
@@ -68,7 +68,7 @@
:style="{'width':plugins.indexOf('metric-selector') > -1 ? 'calc(100% - 160px)':'100%',height: '100%',}">
<div class="input-box" @click="dropDownVisible=false" v-if="plugins.indexOf('metric-input') > -1">
<!--<editor :styleType="styleType" :metric-list="metricStore" :historyParam="historyParam" v-model="expressionList[index]" ref="editor" @on-enter="expressionChange" @on-blur="expressionChange" ></editor>-->
<el-input maxlength="4096" show-word-limit v-model="expressionList[index]" @input="metricKeyDown" type="textarea"
<el-input v-model="expressionList[index]" @input="metricKeyDown" type="textarea" :maxlength="styleType === 3 ? 512 : 4096" show-word-limit
:autosize="{ minRows: 1, maxRows: 6}" class="not-fixed-height no-resize" ref="elInput"></el-input>
<div class="append-msg error" v-if="errorMsg"><span>{{errorMsg}}</span></div>
<div class="append-msg error" v-if="appendMsg"><span>{{appendMsg}}</span></div>