feat: add @vben/hooks and @vben-core/constants
This commit is contained in:
3
apps/web-antd/src/views/_core/README.md
Normal file
3
apps/web-antd/src/views/_core/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# \_core
|
||||
|
||||
此目录包含应用程序正常运行所需的基本视图。这些视图是应用程序布局中使用的视图。
|
25
apps/web-antd/src/views/_core/authentication/code-login.vue
Normal file
25
apps/web-antd/src/views/_core/authentication/code-login.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<script lang="ts" setup>
|
||||
import type { LoginCodeParams } from '@vben/universal-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { AuthenticationCodeLogin } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'CodeLogin' });
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
/**
|
||||
* 异步处理登录操作
|
||||
* Asynchronously handle the login process
|
||||
* @param values 登录表单数据
|
||||
*/
|
||||
async function handleLogin(values: LoginCodeParams) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(values);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthenticationCodeLogin :loading="loading" @submit="handleLogin" />
|
||||
</template>
|
@@ -0,0 +1,18 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { AuthenticationForgetPassword } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'ForgetPassword' });
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
function handleSubmit(value: string) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('reset email:', value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthenticationForgetPassword :loading="loading" @submit="handleSubmit" />
|
||||
</template>
|
18
apps/web-antd/src/views/_core/authentication/login.vue
Normal file
18
apps/web-antd/src/views/_core/authentication/login.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script lang="ts" setup>
|
||||
import { AuthenticationLogin } from '@vben/universal-ui';
|
||||
|
||||
import { useAccessStore } from '#/store';
|
||||
|
||||
defineOptions({ name: 'Login' });
|
||||
|
||||
const accessStore = useAccessStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthenticationLogin
|
||||
:loading="accessStore.loading"
|
||||
password-placeholder="123456"
|
||||
username-placeholder="vben"
|
||||
@submit="accessStore.authLogin"
|
||||
/>
|
||||
</template>
|
@@ -0,0 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { AuthenticationQrCodeLogin } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'QrCodeLogin' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthenticationQrCodeLogin />
|
||||
</template>
|
20
apps/web-antd/src/views/_core/authentication/register.vue
Normal file
20
apps/web-antd/src/views/_core/authentication/register.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts" setup>
|
||||
import type { LoginAndRegisterParams } from '@vben/universal-ui';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { AuthenticationRegister } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'Register' });
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
function handleSubmit(value: LoginAndRegisterParams) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('register submit:', value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthenticationRegister :loading="loading" @submit="handleSubmit" />
|
||||
</template>
|
7
apps/web-antd/src/views/_core/fallback/coming-soon.vue
Normal file
7
apps/web-antd/src/views/_core/fallback/coming-soon.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fallback status="comming-soon" />
|
||||
</template>
|
7
apps/web-antd/src/views/_core/fallback/forbidden.vue
Normal file
7
apps/web-antd/src/views/_core/fallback/forbidden.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fallback status="403" />
|
||||
</template>
|
@@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fallback status="500" />
|
||||
</template>
|
7
apps/web-antd/src/views/_core/fallback/not-found.vue
Normal file
7
apps/web-antd/src/views/_core/fallback/not-found.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fallback status="404" />
|
||||
</template>
|
7
apps/web-antd/src/views/_core/fallback/offline.vue
Normal file
7
apps/web-antd/src/views/_core/fallback/offline.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fallback status="offline" />
|
||||
</template>
|
9
apps/web-antd/src/views/_core/vben/about/index.vue
Normal file
9
apps/web-antd/src/views/_core/vben/about/index.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { About } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'About' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<About />
|
||||
</template>
|
Reference in New Issue
Block a user