fix(登录): 🐛 自动登录导致登录错误问题

This commit is contained in:
猿小天
2023-04-28 17:34:05 +08:00
parent c9fddbd4a7
commit 111ca9554c
2 changed files with 12 additions and 5 deletions

View File

@@ -12,7 +12,6 @@
:type="isShowPassword ? 'text' : 'password'"
:placeholder="$t('message.account.accountPlaceholder2')"
v-model="ruleForm.password"
autocomplete="off"
>
<template #prefix>
<el-icon class="el-input__icon"><ele-Unlock /></el-icon>
@@ -50,7 +49,7 @@
</el-col>
</el-form-item>
<el-form-item class="login-animation4">
<el-button type="primary" class="login-content-submit" round @click="loginClick" :loading="loading.signIn">
<el-button type="primary" class="login-content-submit" round @click.enter="loginClick" :loading="loading.signIn">
<span>{{ $t('message.account.accountBtnText') }}</span>
</el-button>
</el-form-item>
@@ -182,10 +181,10 @@ export default defineComponent({
getCaptcha();
//获取系统配置
SystemConfigStore().getSystemConfigs();
window.addEventListener('keyup', enterClickLogin, false);
// window.addEventListener('keyup', enterClickLogin, false);
});
onUnmounted(() => {
window.removeEventListener('keyup', enterClickLogin, false);
// window.removeEventListener('keyup', enterClickLogin, false);
});
return {

View File

@@ -21,7 +21,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
};
//权限判定
const hasPermissions = inject('$hasPermissions');
const hasPermissions:any = inject('$hasPermissions');
return {
crudOptions: {
@@ -36,6 +36,14 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
editRequest,
delRequest,
},
actionbar: {
buttons: {
add: {
show: hasPermissions('user:Create')
// show:true
}
}
},
rowHandle: {
//固定右侧
fixed: 'right',