fix(接口自动化): 最大化cookie失效设置

This commit is contained in:
fit2-zhao 2021-03-16 18:19:00 +08:00
parent e88f467105
commit 271668a40e
2 changed files with 9 additions and 4 deletions

View File

@ -198,7 +198,7 @@
<ms-drawer :visible="drawer" :size="100" @close="close" direction="right" :show-full-screen="false" :is-show-close="false" style="overflow: hidden">
<template v-slot:header>
<scenario-header :currentScenario="currentScenario" :projectEnvMap="projectEnvMap" :projectIds="projectIds" :projectList="projectList" :scenarioDefinition="scenarioDefinition" :enableCookieShare="enableCookieShare"
@closePage="close" @showAllBtn="showAllBtn" @runDebug="runDebug" @setProjectEnvMap="setProjectEnvMap" @showScenarioParameters="showScenarioParameters" ref="maximizeHeader"/>
@closePage="close" @showAllBtn="showAllBtn" @runDebug="runDebug" @setProjectEnvMap="setProjectEnvMap" @showScenarioParameters="showScenarioParameters" @setCookieShare="setCookieShare" ref="maximizeHeader"/>
</template>
<maximize-scenario :scenario-definition="scenarioDefinition" :moduleOptions="moduleOptions" :currentScenario="currentScenario" :type="type" ref="maximizeScenario" @openScenario="openScenario"/>
@ -445,6 +445,9 @@
openScenario(data) {
this.$emit('openScenario', data);
},
setCookieShare(cookie) {
this.enableCookieShare = cookie;
},
showAllBtn() {
this.$refs.maximizeScenario.showAll();
},
@ -560,7 +563,6 @@
this.operatingElements = ELEMENTS.get("ALL");
this.selectedTreeNode = undefined;
}
//this.reload();
},
apiListImport() {
this.$refs.scenarioApiRelevance.open();

View File

@ -16,7 +16,7 @@
</el-row>
</div>
<div class="ms-header-right">
<el-checkbox v-model="cookieShare" class="ms-right">共享cookie</el-checkbox>
<el-checkbox v-model="cookieShare" class="ms-right" @change="setCookieShare">共享cookie</el-checkbox>
<env-popover :env-map="envMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
:project-list="projectList" ref="envPopover" class="ms-right"/>
<el-button :disabled="scenarioDefinition.length < 1" size="mini" type="primary" v-prevent-re-click @click="runDebug">{{$t('api_test.request.debug')}}</el-button>
@ -70,6 +70,9 @@
runDebug() {
this.$emit('runDebug');
},
setCookieShare(){
this.$emit('setCookieShare',this.cookieShare);
},
showScenarioParameters() {
this.$emit('showScenarioParameters');
},