feat: login dialog (#37)

* chore: login-dialog demo

* Merge branch 'main' into login-dialog

* chore: update dialog

* Merge branch 'main' into login-dialog

* chore: accept login params

* chore: redirect to login or show login dialog
This commit is contained in:
Li Kui
2024-07-11 11:05:01 +08:00
committed by GitHub
parent 0f246f7e9e
commit 8e6c1abf19
13 changed files with 174 additions and 73 deletions

View File

@@ -1,6 +1,4 @@
<script setup lang="ts">
import type { LoginEmits } from './typings';
import { computed, reactive } from 'vue';
import { useRouter } from 'vue-router';
@@ -14,68 +12,9 @@ import {
import Title from './auth-title.vue';
import ThirdPartyLogin from './third-party-login.vue';
import { AuthenticationProps, LoginEmits } from './typings';
interface Props {
/**
* @zh_CN 验证码登录路径
*/
codeLoginPath?: string;
/**
* @zh_CN 忘记密码路径
*/
forgetPasswordPath?: string;
/**
* @zh_CN 是否处于加载处理状态
*/
loading?: boolean;
/**
* @zh_CN 密码占位符
*/
passwordPlaceholder?: string;
/**
* @zh_CN 二维码登录路径
*/
qrCodeLoginPath?: string;
/**
* @zh_CN 注册路径
*/
registerPath?: string;
/**
* @zh_CN 是否显示验证码登录
*/
showCodeLogin?: boolean;
/**
* @zh_CN 是否显示忘记密码
*/
showForgetPassword?: boolean;
/**
* @zh_CN 是否显示二维码登录
*/
showQrcodeLogin?: boolean;
/**
* @zh_CN 是否显示注册按钮
*/
showRegister?: boolean;
/**
* @zh_CN 是否显示第三方登录
*/
showThirdPartyLogin?: boolean;
/**
* @zh_CN 用户名占位符
*/
usernamePlaceholder?: string;
}
interface Props extends AuthenticationProps {}
defineOptions({
name: 'AuthenticationLogin',