fix(接口测试): 接口自动化中场景SQL添加变量,采用mock加函数保存不了,控制台报错
【场景变量添加常量及SQL添加变量,采用mock加函数保存不了,控制台报错】https://www.tapd.cn/33805590/bugtrace/bugs/view?bug_id=1133805590001008481
This commit is contained in:
parent
cb6f8f716c
commit
ebdf1a34f6
|
@ -30,7 +30,7 @@
|
||||||
:placeholder="$t('api_test.value')"
|
:placeholder="$t('api_test.value')"
|
||||||
value-key="name"
|
value-key="name"
|
||||||
highlight-first-item style="width: 100%">
|
highlight-first-item style="width: 100%">
|
||||||
<i slot="suffix" class="el-input__icon el-icon-edit pointer" @click="advanced"></i>
|
<i slot="suffix" class="el-input__icon el-icon-edit pointer" @click="advanced(item)"></i>
|
||||||
</el-autocomplete>
|
</el-autocomplete>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<ms-api-variable-advance ref="variableAdvance"/>
|
<ms-api-variable-advance ref="variableAdvance" :current-item="currentItem" @advancedRefresh="reload"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -78,7 +78,9 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
currentItem: null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
remove: function (index) {
|
remove: function (index) {
|
||||||
|
@ -115,8 +117,10 @@ export default {
|
||||||
isDisable: function (index) {
|
isDisable: function (index) {
|
||||||
return this.items.length - 1 === index;
|
return this.items.length - 1 === index;
|
||||||
},
|
},
|
||||||
advanced() {
|
advanced(item) {
|
||||||
|
this.currentItem = item;
|
||||||
this.$refs.variableAdvance.open();
|
this.$refs.variableAdvance.open();
|
||||||
|
|
||||||
},
|
},
|
||||||
createFilter(queryString) {
|
createFilter(queryString) {
|
||||||
return (variable) => {
|
return (variable) => {
|
||||||
|
@ -134,6 +138,12 @@ export default {
|
||||||
// 调用 callback 返回建议列表的数据
|
// 调用 callback 返回建议列表的数据
|
||||||
cb(results);
|
cb(results);
|
||||||
},
|
},
|
||||||
|
reload() {
|
||||||
|
this.isActive = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.isActive = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -167,7 +167,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.itemValueVisible = true;
|
this.itemValueVisible = true;
|
||||||
this.itemValue = this.currentItem.value;
|
|
||||||
},
|
},
|
||||||
prepareData() {
|
prepareData() {
|
||||||
if (this.scenario) {
|
if (this.scenario) {
|
||||||
|
|
Loading…
Reference in New Issue