Merge remote-tracking branch 'origin/master'

This commit is contained in:
q4speed 2020-09-25 17:25:49 +08:00
commit d082d8b4e9
5 changed files with 32 additions and 6 deletions

View File

@ -90,6 +90,10 @@ export default {
methods: {
registerEvents() {
ApiEvent.$on(LIST_CHANGE, () => {
// todo refs
if (!this.$refs.projectRecent) {
return;
}
this.$refs.projectRecent.recent();
this.$refs.testRecent.recent();
this.$refs.reportRecent.recent();

View File

@ -67,7 +67,7 @@
<script>
import MsApiScenarioConfig from "./components/ApiScenarioConfig";
import {Test, Scenario} from "./model/ScenarioModel"
import {Scenario, Test} from "./model/ScenarioModel"
import MsApiReportStatus from "../report/ApiReportStatus";
import MsApiReportDialog from "./ApiReportDialog";
import {checkoutTestManagerOrTestUser, downloadFile, getUUID} from "@/common/js/utils";
@ -368,11 +368,25 @@ export default {
this.debugReportId = response.data;
this.resetBodyFile();
});
},
handleEvent(event) {
if (event.keyCode === 83 && event.ctrlKey) {
console.log('拦截到 ctrl + s');//ctrl+s
this.saveTest();
event.preventDefault();
event.returnValue = false;
return false;
}
},
},
created() {
this.init();
//
document.addEventListener('keydown', this.handleEvent)
},
beforeDestroy() {
document.removeEventListener('keydown', this.handleEvent);
}
}
</script>

View File

@ -66,7 +66,7 @@
v-model="row.enable"
active-value="true"
inactive-value="false"
inactive-color="#ff4949"
inactive-color="#DCDFE6"
/>
</template>
</el-table-column>

View File

@ -98,6 +98,10 @@ export default {
methods: {
registerEvents() {
PerformanceEvent.$on(LIST_CHANGE, () => {
// todo refs
if (!this.$refs.projectRecent) {
return;
}
this.$refs.projectRecent.recent();
this.$refs.testRecent.recent();
this.$refs.reportRecent.recent();

View File

@ -150,6 +150,10 @@ export default {
},
registerEvents() {
TrackEvent.$on(LIST_CHANGE, () => {
// todo refs
if (!this.$refs.projectRecent) {
return;
}
this.$refs.projectRecent.recent();
this.$refs.planRecent.recent();
this.$refs.caseRecent.recent();