mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
fix: Fix the issue of incorrect display of prompts on the English language login page (#7376)
This commit is contained in:
parent
40604c7880
commit
16f47f8664
@ -205,11 +205,25 @@ const loginForm = reactive({
|
||||
});
|
||||
|
||||
const loginRules = reactive({
|
||||
name: [{ required: true, message: i18n.t('commons.rule.username'), trigger: 'blur' }],
|
||||
password: [{ required: true, message: i18n.t('commons.rule.password'), trigger: 'blur' }],
|
||||
name: [{ required: true, validator: checkUsername, trigger: 'blur' }],
|
||||
password: [{ required: true, validator: checkPassword, trigger: 'blur' }],
|
||||
agreeLicense: [Rules.requiredSelect, { type: 'array', validator: checkAgreeLicense, trigger: 'blur' }],
|
||||
});
|
||||
|
||||
function checkUsername(rule: any, value: any, callback: any) {
|
||||
if (value === '') {
|
||||
return callback(new Error(i18n.t('commons.rule.username')));
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
function checkPassword(rule: any, value: any, callback: any) {
|
||||
if (value === '') {
|
||||
return callback(new Error(i18n.t('commons.rule.password')));
|
||||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
function checkAgreeLicense(rule: any, value: any, callback: any) {
|
||||
if (!value && !_isMobile()) {
|
||||
return callback(new Error(i18n.t('commons.login.errorAgree')));
|
||||
|
@ -146,7 +146,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<fu-table-operations
|
||||
width="200px"
|
||||
width="300px"
|
||||
:buttons="buttons"
|
||||
:ellipsis="10"
|
||||
:label="$t('commons.table.operate')"
|
||||
|
Loading…
x
Reference in New Issue
Block a user