refactor: 优化代码
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
wxg0103 2024-10-16 18:56:54 +08:00
parent 5a9c92b915
commit 735b7c7a22

View File

@ -5,7 +5,7 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form label-position="top" ref="limitFormRef" :model="form">
<el-form label-position="top" ref="limitFormRef" :model="form" :rules="rules">
<!-- <el-form-item
:label="$t('views.applicationOverview.appInfo.LimitDialog.showSourceLabel')"
@click.prevent
@ -35,6 +35,7 @@
<el-switch size="small" v-model="form.authentication"></el-switch>
</el-form-item>
<el-form-item
prop="authentication_value"
v-if="form.authentication"
:label="$t('views.applicationOverview.appInfo.LimitDialog.authenticationValue')"
v-hasPermission="new ComplexPermission([], ['x-pack'], 'OR')"
@ -103,6 +104,15 @@ const form = ref<any>({
authentication_value: '',
authentication: false
})
const rules: FormRules = {
authentication_value: [
{
required: true,
message: '身份验证值不能为空',
trigger: 'blur'
}
]
}
const dialogVisible = ref<boolean>(false)
const loading = ref(false)