refactor(project): re-adjust the overall folder

This commit is contained in:
vince
2024-07-23 00:03:59 +08:00
parent a1a566cb2f
commit 14538f7ed5
281 changed files with 1365 additions and 1659 deletions

View File

@@ -4,6 +4,7 @@ import type { LoginCodeParams } from '@vben/common-ui';
import { ref } from 'vue';
import { AuthenticationCodeLogin } from '@vben/common-ui';
import { LOGIN_PATH } from '@vben/constants';
defineOptions({ name: 'CodeLogin' });
@@ -21,5 +22,9 @@ async function handleLogin(values: LoginCodeParams) {
</script>
<template>
<AuthenticationCodeLogin :loading="loading" @submit="handleLogin" />
<AuthenticationCodeLogin
:loading="loading"
:login-path="LOGIN_PATH"
@submit="handleLogin"
/>
</template>

View File

@@ -2,6 +2,7 @@
import { ref } from 'vue';
import { AuthenticationForgetPassword } from '@vben/common-ui';
import { LOGIN_PATH } from '@vben/constants';
defineOptions({ name: 'ForgetPassword' });
@@ -14,5 +15,9 @@ function handleSubmit(value: string) {
</script>
<template>
<AuthenticationForgetPassword :loading="loading" @submit="handleSubmit" />
<AuthenticationForgetPassword
:loading="loading"
:login-path="LOGIN_PATH"
@submit="handleSubmit"
/>
</template>

View File

@@ -1,9 +1,10 @@
<script lang="ts" setup>
import { AuthenticationQrCodeLogin } from '@vben/common-ui';
import { LOGIN_PATH } from '@vben/constants';
defineOptions({ name: 'QrCodeLogin' });
</script>
<template>
<AuthenticationQrCodeLogin />
<AuthenticationQrCodeLogin :login-path="LOGIN_PATH" />
</template>

View File

@@ -4,6 +4,7 @@ import type { LoginAndRegisterParams } from '@vben/common-ui';
import { ref } from 'vue';
import { AuthenticationRegister } from '@vben/common-ui';
import { LOGIN_PATH } from '@vben/constants';
defineOptions({ name: 'Register' });
@@ -16,5 +17,9 @@ function handleSubmit(value: LoginAndRegisterParams) {
</script>
<template>
<AuthenticationRegister :loading="loading" @submit="handleSubmit" />
<AuthenticationRegister
:loading="loading"
:login-path="LOGIN_PATH"
@submit="handleSubmit"
/>
</template>

View File

@@ -16,7 +16,7 @@ import {
WorkbenchTodo,
WorkbenchTrends,
} from '@vben/common-ui';
import { preferences } from '@vben-core/preferences';
import { preferences } from '@vben/preferences';
import { useAccessStore } from '#/store';

View File

@@ -7,7 +7,7 @@ import { AccessControl, useAccess } from '@vben/access';
import { Button } from 'ant-design-vue';
import { useAccessStore, useAppStore } from '#/store';
import { resetAllStores, useAccessStore } from '#/store';
defineOptions({ name: 'AccessButtonControl' });
@@ -28,7 +28,6 @@ const accounts: Record<string, LoginAndRegisterParams> = {
const { accessMode, hasAccessByCodes } = useAccess();
const accessStore = useAccessStore();
const appStore = useAppStore();
const router = useRouter();
function roleButtonType(role: string) {
@@ -41,7 +40,7 @@ async function changeAccount(role: string) {
}
const account = accounts[role];
appStore.resetAppState();
resetAllStores();
await accessStore.authLogin(account, async () => {
router.go(0);
});

View File

@@ -7,7 +7,7 @@ import { useAccess } from '@vben/access';
import { Button } from 'ant-design-vue';
import { useAccessStore, useAppStore } from '#/store';
import { resetAllStores, useAccessStore } from '#/store';
defineOptions({ name: 'Access' });
@@ -28,7 +28,6 @@ const accounts: Record<string, LoginAndRegisterParams> = {
const { accessMode, toggleAccessMode } = useAccess();
const accessStore = useAccessStore();
const appStore = useAppStore();
const router = useRouter();
function roleButtonType(role: string) {
@@ -41,7 +40,7 @@ async function changeAccount(role: string) {
}
const account = accounts[role];
appStore.resetAppState();
resetAllStores();
await accessStore.authLogin(account, async () => {
router.go(0);
});
@@ -49,7 +48,8 @@ async function changeAccount(role: string) {
async function handleToggleAccessMode() {
await toggleAccessMode();
appStore.resetAppState();
resetAllStores();
await accessStore.authLogin(accounts.super, async () => {
router.go(0);
});

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup>
import type { LoginExpiredModeType } from '@vben/types';
import { preferences, updatePreferences } from '@vben-core/preferences';
import { preferences, updatePreferences } from '@vben/preferences';
import { Button } from 'ant-design-vue';