fix(项目设置): 修复全局断言脚本内容未及时刷新的缺陷

--bug=1024385 --user=王孝刚 github #22494更新已存在的全局断言脚本失败,更新内容无法同步到数据库
1.20和2.7.1 都存在都要改 https://www.tapd.cn/55049933/s/1349644
This commit is contained in:
wxg0103 2023-03-14 15:58:11 +08:00 committed by wxg0103
parent 96d88ba2de
commit 2c36fdaad8
2 changed files with 6 additions and 2 deletions

View File

@ -34,6 +34,7 @@
<el-dialog <el-dialog
:title="$t('api_test.request.assertions.script')" :title="$t('api_test.request.assertions.script')"
v-if="visible"
:visible.sync="visible" :visible.sync="visible"
width="900px" width="900px"
append-to-body append-to-body

View File

@ -29,7 +29,7 @@
</el-row> </el-row>
<el-dialog :title="$t('api_test.request.assertions.script')" :visible.sync="visible" width="900px" append-to-body <el-dialog :title="$t('api_test.request.assertions.script')" :visible.sync="visible" width="900px" append-to-body
:close-on-click-modal="false"> :close-on-click-modal="true" v-if="visible">
<el-row type="flex" justify="space-between" align="middle" class="quick-script-block"> <el-row type="flex" justify="space-between" align="middle" class="quick-script-block">
<div class="assertion-item input"> <div class="assertion-item input">
<el-input size="small" v-model="assertion.variable" <el-input size="small" v-model="assertion.variable"
@ -273,6 +273,7 @@ export default {
} }
}, },
detail() { detail() {
console.log(this.edit)
this.disabled = false; this.disabled = false;
this.visible = true; this.visible = true;
}, },
@ -293,7 +294,9 @@ export default {
this.close(); this.close();
} }
}, },
beforeDestroy() {
this.$emit('close', this.assertion);
},
computed: { computed: {
hasEmptyOperator() { hasEmptyOperator() {
return !!this.assertion.operator && this.assertion.operator.indexOf("empty") > 0; return !!this.assertion.operator && this.assertion.operator.indexOf("empty") > 0;