猜测是由于el-drawer添加destory-on-close属性,导致json-editor再次打开的时候又实例化了一遍,去除该属性即可,没有仔细确认是否上述原因导致。
@@ -174,7 +174,7 @@
v-model="showAPITestCreateModel"
width="600px"
:before-close="(done) => {$refs['createAPITestForm'].resetFields();done();}"
- destroy-on-close>
+ >
<template #title>创建测试任务</template>
<el-form
:model="createAPITestForm"
@@ -196,7 +196,7 @@
:height="'400px'"
v-model="createAPITestForm.params"
:show-btns="false"
- :mode="'code'"
+ mode="code"
:modes="['code']"
lang="zh"
@json-change="onJsonChange"