fix:保存时 必填项的选项卡的切换的问题

This commit is contained in:
zhangyu
2021-08-05 16:11:46 +08:00
parent d829cb432e
commit cea63d4743
7 changed files with 20 additions and 8 deletions

View File

@@ -229,7 +229,7 @@
</el-form-item>
<el-form-item v-if="authType === 1" :label='$t("project.endpoint.pin")' class="half-form-item" prop="configs.0.config.basic_auth.pin" :rules="[{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]">
<el-input id="module-box-input-password" v-model.number="editModule.configs[0].config.basic_auth.pin" placeholder='' size="small"></el-input>
<el-input id="module-box-input-password" v-model.number="editModule.configs[0].config.basic_auth.pin" type="password" autocomplete="new-password" placeholder='' size="small"></el-input>
</el-form-item>
<!--authtype 2-->
@@ -774,7 +774,14 @@ export default {
}
} else if (key.indexOf('configs.1') !== -1) {
const keyArr = key.split('.')
this.activeNameLogs[keyArr[3]] = keyArr[4].trim().toLowerCase().replace(keyArr[4][0], keyArr[4][0].toUpperCase())
const str = keyArr[4]
if (str === 'fileName' || str === 'unit' || str === 'listenAddress' || str === 'appName') {
this.activeNameLogs[keyArr[3]] = 'Basic'
} else if (str === 'labels') {
this.activeNameLogs[keyArr[3]] = 'Labels'
} else if (str === 'pipeline') {
this.activeNameLogs[keyArr[3]] = 'Pipeline'
}
this.activeNameLogs = [...this.activeNameLogs]
}
}