refactor: 环境编辑添加取消按钮
This commit is contained in:
parent
82cc66dbcd
commit
042b97b838
|
@ -3,7 +3,7 @@
|
|||
<el-container v-loading="result.loading">
|
||||
<ms-aside-item :title="$t('api_test.environment.environment_list')" :data="environments" :item-operators="environmentOperators" :add-fuc="addEnvironment"
|
||||
:delete-fuc="deleteEnvironment" @itemSelected="environmentSelected" ref="environmentItems"/>
|
||||
<environment-edit :environment="currentEnvironment" ref="environmentEdit"/>
|
||||
<environment-edit :environment="currentEnvironment" ref="environmentEdit" @close="close"/>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -96,6 +96,7 @@
|
|||
},
|
||||
close() {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
<ms-api-key-value :items="environment.headers"/>
|
||||
|
||||
<div class="environment-footer">
|
||||
<el-button type="primary" @click="save">{{this.$t('commons.save')}}</el-button>
|
||||
<ms-dialog-footer
|
||||
@cancel="cancel"
|
||||
@confirm="save()"/>
|
||||
<!-- <el-button type="primary" @click="save">{{this.$t('commons.save')}}</el-button>-->
|
||||
</div>
|
||||
|
||||
</el-form>
|
||||
|
@ -38,10 +41,11 @@
|
|||
<script>
|
||||
import MsApiScenarioVariables from "../ApiScenarioVariables";
|
||||
import MsApiKeyValue from "../ApiKeyValue";
|
||||
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
|
||||
|
||||
export default {
|
||||
name: "EnvironmentEdit",
|
||||
components: {MsApiKeyValue, MsApiScenarioVariables},
|
||||
components: {MsDialogFooter, MsApiKeyValue, MsApiScenarioVariables},
|
||||
props: {
|
||||
environment: {
|
||||
type: Object,
|
||||
|
@ -127,8 +131,11 @@
|
|||
return true
|
||||
}
|
||||
return false;
|
||||
},
|
||||
cancel() {
|
||||
this.$emit('close');
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue