Skip to content

Commit

Permalink
fix(接口测试): mock期望设置中,请求体中的json-schema值输入框不提示mockJs的数据
Browse files Browse the repository at this point in the history
mock期望设置中,请求体中的json-schema值输入框不提示mockJs的数据
  • Loading branch information
Somebody-JIAN committed Mar 27, 2023
1 parent 41c64a9 commit 872c3fd
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<i slot="suffix" v-if="!disabled && needMock" class="el-input__icon el-icon-edit pointer" @click="advanced(mock)"></i>
</el-autocomplete>
<ms-api-variable-advance :show-mock-vars="showMockVars" :scenario-definition="scenarioDefinition" :current-item="mock" ref="variableAdvance"/>

</div>
</template>

Expand Down Expand Up @@ -74,9 +73,11 @@
methods: {
funcSearch(queryString, cb) {
let results = [];
if(!this.showMockVars){
let funcs = MOCKJS_FUNC.concat(JMETER_FUNC);
results = queryString ? funcs.filter(this.funcFilter(queryString)) : funcs;
if(!this.disabled && this.needMock){
if(!this.showMockVars){
let funcs = MOCKJS_FUNC.concat(JMETER_FUNC);
results = queryString ? funcs.filter(this.funcFilter(queryString)) : funcs;
}
}
// 调用 callback 返回建议列表的数据
cb(results);
Expand Down

0 comments on commit 872c3fd

Please sign in to comment.