1
0
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:
2024-12-16 17:40:10 +08:00 committed by GitHub
parent 40604c7880
commit 16f47f8664
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 3 deletions

View File

@ -205,11 +205,25 @@ const loginForm = reactive({
}); });
const loginRules = reactive({ const loginRules = reactive({
name: [{ required: true, message: i18n.t('commons.rule.username'), trigger: 'blur' }], name: [{ required: true, validator: checkUsername, trigger: 'blur' }],
password: [{ required: true, message: i18n.t('commons.rule.password'), trigger: 'blur' }], password: [{ required: true, validator: checkPassword, trigger: 'blur' }],
agreeLicense: [Rules.requiredSelect, { type: 'array', validator: checkAgreeLicense, 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) { function checkAgreeLicense(rule: any, value: any, callback: any) {
if (!value && !_isMobile()) { if (!value && !_isMobile()) {
return callback(new Error(i18n.t('commons.login.errorAgree'))); return callback(new Error(i18n.t('commons.login.errorAgree')));

View File

@ -146,7 +146,7 @@
</template> </template>
</el-table-column> </el-table-column>
<fu-table-operations <fu-table-operations
width="200px" width="300px"
:buttons="buttons" :buttons="buttons"
:ellipsis="10" :ellipsis="10"
:label="$t('commons.table.operate')" :label="$t('commons.table.operate')"