This commit is contained in:
dap
2024-09-01 13:07:06 +08:00
77 changed files with 384 additions and 214 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/common-ui",
"version": "5.2.0",
"version": "5.2.1",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -162,14 +162,16 @@ defineExpose({ resetCaptcha });
<template>
<div @keydown.enter.prevent="handleSubmit">
<Title>
{{ title || `${$t('authentication.welcomeBack')} 👋🏻` }}
<template #desc>
<span class="text-muted-foreground">
{{ subTitle || $t('authentication.loginSubtitle') }}
</span>
</template>
</Title>
<slot name="title">
<Title>
{{ title || `${$t('authentication.welcomeBack')} 👋🏻` }}
<template #desc>
<span class="text-muted-foreground">
{{ subTitle || $t('authentication.loginSubtitle') }}
</span>
</template>
</Title>
</slot>
<!-- 租户 -->
<div v-if="useTenant" class="tenant-picker mb-6">
@@ -234,8 +236,11 @@ defineExpose({ resetCaptcha });
/>
</div>
<div class="mb-6 mt-4 flex justify-between">
<div v-if="showRememberMe" class="flex-center">
<div
v-if="showRememberMe || showForgetPassword"
class="mb-6 mt-4 flex justify-between"
>
<div class="flex-center">
<VbenCheckbox v-model:checked="formState.rememberMe" name="rememberMe">
{{ $t('authentication.rememberMe') }}
</VbenCheckbox>
@@ -253,7 +258,10 @@ defineExpose({ resetCaptcha });
{{ $t('common.login') }}
</VbenButton>
<div class="mb-2 mt-4 flex items-center justify-between">
<div
v-if="showCodeLogin || showQrcodeLogin"
class="mb-2 mt-4 flex items-center justify-between"
>
<VbenButton
v-if="showCodeLogin"
class="w-1/2"
@@ -273,20 +281,24 @@ defineExpose({ resetCaptcha });
</div>
<!-- 第三方登录 -->
<ThirdPartyLogin
v-if="showThirdPartyLogin"
@oauth-login="(e) => emit('oauthLogin', e)"
/>
<slot name="third-party-login">
<ThirdPartyLogin
v-if="showThirdPartyLogin"
@oauth-login="(e) => emit('oauthLogin', e)"
/>
</slot>
<div v-if="showRegister" class="text-center text-sm">
{{ $t('authentication.accountTip') }}
<span
class="text-primary hover:text-primary-hover active:text-primary-active cursor-pointer text-sm font-normal"
@click="handleGo(registerPath)"
>
{{ $t('authentication.createAccount') }}
</span>
</div>
<slot name="to-register">
<div v-if="showRegister" class="mt-3 text-center text-sm">
{{ $t('authentication.accountTip') }}
<span
class="text-primary hover:text-primary-hover active:text-primary-active cursor-pointer text-sm font-normal"
@click="handleGo(registerPath)"
>
{{ $t('authentication.createAccount') }}
</span>
</div>
</slot>
</div>
</template>