fix: 环境配置变量名过长显示问题
This commit is contained in:
parent
4eeede9322
commit
1f94c6181c
|
@ -6,7 +6,7 @@
|
||||||
<div class="kv-row" v-for="(item, index) in items" :key="index">
|
<div class="kv-row" v-for="(item, index) in items" :key="index">
|
||||||
<el-row type="flex" :gutter="20" justify="space-between" align="middle">
|
<el-row type="flex" :gutter="20" justify="space-between" align="middle">
|
||||||
<el-col>
|
<el-col>
|
||||||
<ms-api-variable-input :is-read-only="isReadOnly" v-model="item.name" size="small" maxlength="100" @change="change"
|
<ms-api-variable-input :show-variable="showVariable" :is-read-only="isReadOnly" v-model="item.name" size="small" maxlength="100" @change="change"
|
||||||
:placeholder="$t('api_test.variable_name')" show-word-limit/>
|
:placeholder="$t('api_test.variable_name')" show-word-limit/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
|
@ -35,7 +35,11 @@
|
||||||
isReadOnly: {
|
isReadOnly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
|
showVariable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="variable-input">
|
<div class="variable-input">
|
||||||
<el-input :disabled="isReadOnly" :value="value" v-bind="$attrs" :size="size" @change="change" @input="input"/>
|
<el-input :disabled="isReadOnly" :value="value" v-bind="$attrs" :size="size" @change="change" @input="input"/>
|
||||||
<div class="variable-combine" v-if="value">
|
<div :class="{'hidden': !showVariable}" class="variable-combine" v-if="value">
|
||||||
<div class="variable">{{variable}}</div>
|
<div class="variable">{{variable}}</div>
|
||||||
<el-tooltip :content="$t('api_test.copied')" manual v-model="visible" placement="top" :visible-arrow="false">
|
<el-tooltip :content="$t('api_test.copied')" manual v-model="visible" placement="top" :visible-arrow="false">
|
||||||
<i class="el-icon-copy-document copy" @click="copy"/>
|
<i class="el-icon-copy-document copy" @click="copy"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
@ -20,7 +20,11 @@
|
||||||
isReadOnly: {
|
isReadOnly: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
|
showVariable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
@ -93,4 +97,9 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #1E90FF;
|
color: #1E90FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<span>{{$t('api_test.environment.globalVariable')}}</span>
|
<span>{{$t('api_test.environment.globalVariable')}}</span>
|
||||||
<ms-api-scenario-variables :items="environment.variables"/>
|
<ms-api-scenario-variables :show-variable="false" :items="environment.variables"/>
|
||||||
|
|
||||||
<span>{{$t('api_test.request.headers')}}</span>
|
<span>{{$t('api_test.request.headers')}}</span>
|
||||||
<ms-api-key-value :items="environment.headers" :suggestions="headerSuggestions"/>
|
<ms-api-key-value :items="environment.headers" :suggestions="headerSuggestions"/>
|
||||||
|
|
Loading…
Reference in New Issue