feat(auth): 添加用户认证模块与登录页面
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 4m9s
CI/CD Pipeline / build-and-deploy (push) Successful in 4m38s

This commit is contained in:
严浩
2025-11-03 13:46:47 +08:00
parent b669889bb0
commit b4fcde324d
15 changed files with 293 additions and 61 deletions

View File

@@ -5,12 +5,15 @@ type UserPlugin = (ctx: UserPluginContext) => void;
type AutoInstallModule = { [K: string]: unknown; install?: UserPlugin };
type UserPluginContext = { app: import('vue').App<Element> };
const autoInstallModules: AutoInstallModule = import.meta.glob('./!(index).ts', {
eager: true /* true 为同步false 为异步 */,
});
const autoInstallModules: AutoInstallModule = import.meta.glob(
['./*.ts', '!./**/*.types.ts', '!./index.ts'],
{
eager: true /* true 为同步false 为异步 */,
},
);
export function setupPlugins(app: import('vue').App) {
console.group('🔌 Plugins');
console.group(`🔌 Installing ${Object.keys(autoInstallModules).length} plugins`);
for (const path in autoInstallModules) {
const module = autoInstallModules[path] as AutoInstallModule;
if (module.install) {