fix(admin): 收敛环境配置和认证页
This commit is contained in:
parent
99aa4a1fe7
commit
7cacedecc0
6
.gitignore
vendored
6
.gitignore
vendored
@ -24,6 +24,12 @@ package-lock.json
|
||||
**/backend-mock/data
|
||||
|
||||
# local env files
|
||||
.env
|
||||
.env.*
|
||||
apps/*/.env
|
||||
apps/*/.env.*
|
||||
!.env.example
|
||||
!apps/*/.env.example
|
||||
.env.local
|
||||
.env.*.local
|
||||
.eslintcache
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
# 应用标题
|
||||
VITE_APP_TITLE=Vben Admin Antdv Next
|
||||
|
||||
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
||||
VITE_APP_NAMESPACE=vben-web-antdv-next
|
||||
|
||||
# 对store进行加密的密钥,在将store持久化到localStorage时会使用该密钥进行加密
|
||||
VITE_APP_STORE_SECURE_KEY=please-replace-me-with-your-own-key
|
||||
@ -1,7 +0,0 @@
|
||||
# public path
|
||||
VITE_BASE=/
|
||||
|
||||
# Basic interface address SPA
|
||||
VITE_GLOB_API_URL=/api
|
||||
|
||||
VITE_VISUALIZER=true
|
||||
@ -1,17 +0,0 @@
|
||||
# 端口号
|
||||
VITE_PORT=5999
|
||||
|
||||
VITE_BASE=/
|
||||
VITE_ROUTER_HISTORY=hash
|
||||
|
||||
# 接口地址
|
||||
VITE_GLOB_API_URL=/api
|
||||
|
||||
# 是否开启 Nitro Mock服务,true 为开启,false 为关闭
|
||||
VITE_NITRO_MOCK=false
|
||||
|
||||
# 是否打开 devtools,true 为打开,false 为关闭
|
||||
VITE_DEVTOOLS=false
|
||||
|
||||
# 是否注入全局loading
|
||||
VITE_INJECT_APP_LOADING=true
|
||||
41
apps/web-antdv-next/.env.example
Normal file
41
apps/web-antdv-next/.env.example
Normal file
@ -0,0 +1,41 @@
|
||||
# 应用标题
|
||||
VITE_APP_TITLE=Vben Admin Antdv Next
|
||||
|
||||
# 应用命名空间,用于缓存、store 等功能的前缀,确保隔离
|
||||
VITE_APP_NAMESPACE=vben-web-antdv-next
|
||||
|
||||
# 本地开发端口
|
||||
VITE_PORT=5999
|
||||
|
||||
# 基础路径
|
||||
VITE_BASE=/
|
||||
|
||||
# 后端 API 前缀
|
||||
VITE_GLOB_API_URL=/api
|
||||
|
||||
# vue-router 模式,可选 hash / html5
|
||||
VITE_ROUTER_HISTORY=hash
|
||||
|
||||
# 是否开启 Nitro Mock 服务
|
||||
VITE_NITRO_MOCK=false
|
||||
|
||||
# 是否打开 devtools
|
||||
VITE_DEVTOOLS=false
|
||||
|
||||
# 是否注入全局 loading
|
||||
VITE_INJECT_APP_LOADING=true
|
||||
|
||||
# 是否开启压缩,可以设置为 none, brotli, gzip
|
||||
VITE_COMPRESS=none
|
||||
|
||||
# 是否开启 PWA
|
||||
VITE_PWA=false
|
||||
|
||||
# 打包后是否生成 dist.zip
|
||||
VITE_ARCHIVER=true
|
||||
|
||||
# 构建分析开关
|
||||
VITE_VISUALIZER=false
|
||||
|
||||
# store 持久化加密密钥;真实值仅写入本地 .env,不提交仓库
|
||||
VITE_APP_STORE_SECURE_KEY=
|
||||
@ -1,19 +0,0 @@
|
||||
VITE_BASE=/
|
||||
|
||||
# 接口地址
|
||||
VITE_GLOB_API_URL=/api
|
||||
|
||||
# 是否开启压缩,可以设置为 none, brotli, gzip
|
||||
VITE_COMPRESS=none
|
||||
|
||||
# 是否开启 PWA
|
||||
VITE_PWA=false
|
||||
|
||||
# vue-router 的模式
|
||||
VITE_ROUTER_HISTORY=hash
|
||||
|
||||
# 是否注入全局loading
|
||||
VITE_INJECT_APP_LOADING=true
|
||||
|
||||
# 打包后是否生成dist.zip
|
||||
VITE_ARCHIVER=true
|
||||
@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { VbenFormSchema } from '@vben/common-ui';
|
||||
import type { Recordable } from '@vben/types';
|
||||
|
||||
import { computed, ref, useTemplateRef } from 'vue';
|
||||
|
||||
@ -91,11 +90,10 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||
/**
|
||||
* 异步处理登录操作
|
||||
* Asynchronously handle the login process
|
||||
* @param values 登录表单数据
|
||||
*/
|
||||
async function handleLogin(values: Recordable<any>) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(values);
|
||||
async function handleLogin() {
|
||||
loading.value = true;
|
||||
loading.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -27,9 +27,9 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||
];
|
||||
});
|
||||
|
||||
function handleSubmit(value: Record<string, any>) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('reset email:', value);
|
||||
function handleSubmit() {
|
||||
loading.value = true;
|
||||
loading.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -32,23 +32,6 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||
return [
|
||||
{
|
||||
component: 'VbenSelect',
|
||||
// componentProps(_values, form) {
|
||||
// return {
|
||||
// 'onUpdate:modelValue': (value: string) => {
|
||||
// const findItem = MOCK_USER_OPTIONS.find(
|
||||
// (item) => item.value === value,
|
||||
// );
|
||||
// if (findItem) {
|
||||
// form.setValues({
|
||||
// password: '123456',
|
||||
// username: findItem.label,
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// options: MOCK_USER_OPTIONS,
|
||||
// placeholder: $t('authentication.selectAccount'),
|
||||
// };
|
||||
// },
|
||||
componentProps: {
|
||||
options: MOCK_USER_OPTIONS,
|
||||
placeholder: $t('authentication.selectAccount'),
|
||||
@ -74,7 +57,6 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||
);
|
||||
if (findUser) {
|
||||
form.setValues({
|
||||
password: '123456',
|
||||
username: findUser.value,
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { VbenFormSchema } from '@vben/common-ui';
|
||||
import type { Recordable } from '@vben/types';
|
||||
|
||||
import { computed, h, ref } from 'vue';
|
||||
|
||||
@ -81,9 +80,9 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||
];
|
||||
});
|
||||
|
||||
function handleSubmit(value: Recordable<any>) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('register submit:', value);
|
||||
function handleSubmit() {
|
||||
loading.value = true;
|
||||
loading.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user