fix(接口测试): 场景折叠
This commit is contained in:
parent
5fd8a424d6
commit
f9e288550d
|
@ -75,7 +75,7 @@ import MsApiScenarioForm from "./ApiScenarioForm";
|
|||
import {Request, Scenario} from "../model/ScenarioModel";
|
||||
import draggable from 'vuedraggable';
|
||||
import MsApiScenarioSelect from "@/business/components/api/test/components/ApiScenarioSelect";
|
||||
import {compatibleWithEnvironment, Config, parseEnvironment} from "../model/EnvironmentModel";
|
||||
import {parseEnvironment} from "../model/EnvironmentModel";
|
||||
|
||||
export default {
|
||||
name: "MsApiScenarioConfig",
|
||||
|
|
|
@ -38,17 +38,16 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
setActiveNames(activeNames) {
|
||||
setActiveNames(activeNames, item) {
|
||||
activeNames = [].concat(activeNames);
|
||||
let value = this.accordion ? activeNames[0] : activeNames;
|
||||
this.activeNames = activeNames;
|
||||
this.$emit('input', value);
|
||||
this.$emit('change', value);
|
||||
this.$emit('input', item.name);
|
||||
this.$emit('change', item.name);
|
||||
},
|
||||
handleItemClick(item) {
|
||||
if (this.accordion) {
|
||||
this.setActiveNames(
|
||||
(this.activeNames[0] || this.activeNames[0] === 0) && item.name);
|
||||
(this.activeNames[0] || this.activeNames[0] === 0) && item.name, item);
|
||||
} else {
|
||||
let activeNames = this.activeNames.slice(0);
|
||||
let index = activeNames.indexOf(item.name);
|
||||
|
@ -58,7 +57,7 @@
|
|||
} else {
|
||||
activeNames.push(item.name);
|
||||
}
|
||||
this.setActiveNames(activeNames);
|
||||
this.setActiveNames(activeNames, item);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue