forked from vbenjs/vue-vben-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: merge main * feat: update docs * feat: remove coze-assistant * feat: add watermark plugin * feat: update preferences * feat: update docs --------- Co-authored-by: vince <[email protected]>
- Loading branch information
1 parent
14538f7
commit 376fd17
Showing
225 changed files
with
7,737 additions
and
1,790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,5 +45,5 @@ jobs: | |
|
||
- name: Test and Build | ||
run: | | ||
pnpm run test | ||
pnpm run test:unit | ||
pnpm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ jobs: | |
# run: git config --global user.email "[email protected]" && git config --global user.name "Your Name" | ||
|
||
- name: Vitest tests | ||
run: pnpm run test | ||
run: pnpm run test:unit | ||
|
||
# - name: Upload coverage | ||
# uses: codecov/codecov-action@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export default defineEventHandler((event) => { | ||
// setResponseHeaders(event, { | ||
// 'Access-Control-Allow-Credentials': 'true', | ||
// 'Access-Control-Allow-Headers': '*', | ||
// 'Access-Control-Allow-Methods': 'GET,HEAD,PUT,PATCH,POST,DELETE', | ||
// 'Access-Control-Allow-Origin': '*', | ||
// 'Access-Control-Expose-Headers': '*', | ||
// }); | ||
if (event.method === 'OPTIONS') { | ||
event.node.res.statusCode = 204; | ||
event.node.res.statusMessage = 'No Content.'; | ||
return 'OK'; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
VITE_PORT = 5555 | ||
# 应用标题 | ||
VITE_GLOB_APP_TITLE=Vben Admin | ||
|
||
# spa-title | ||
VITE_GLOB_APP_TITLE = Vben Admin | ||
|
||
VITE_APP_NAMESPACE = web-antd | ||
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离 | ||
VITE_APP_NAMESPACE=vben-web-antd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
|
||
# public path | ||
VITE_PUBLIC_PATH = / | ||
VITE_BASE=/ | ||
|
||
# Basic interface address SPA | ||
VITE_GLOB_API_URL=/api | ||
|
||
VITE_VISUALIZER = true | ||
VITE_VISUALIZER=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
VITE_PUBLIC_PATH = / | ||
# 端口号 | ||
VITE_PORT=5555 | ||
|
||
VITE_BASE=/ | ||
|
||
# 接口地址 | ||
VITE_GLOB_API_URL=/api | ||
|
||
VITE_NITRO_MOCK = true | ||
# 是否开启 Nitro Mock服务,true 为开启,false 为关闭 | ||
VITE_NITRO_MOCK=true | ||
|
||
# 是否打开 devtools,true 为打开,false 为关闭 | ||
VITE_DEVTOOLS=false | ||
|
||
# 是否注入全局loading | ||
VITE_INJECT_APP_LOADING=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
# public path | ||
VITE_PUBLIC_PATH = / | ||
VITE_BASE=/ | ||
|
||
# Basic interface address SPA | ||
VITE_GLOB_API_URL = https://mock-napi.vben.pro/api | ||
# 接口地址 | ||
VITE_GLOB_API_URL=https://mock-napi.vben.pro/api | ||
|
||
VITE_COMPRESS = gzip | ||
# 是否开启压缩,可以设置为 none, brotli, gzip | ||
VITE_COMPRESS=gzip | ||
|
||
VITE_PWA = false | ||
# 是否开启 PWA | ||
VITE_PWA=false | ||
|
||
# vue-router 的模式 | ||
VITE_ROUTER_HISTORY=hash | ||
|
||
# 是否注入全局loading | ||
VITE_INJECT_APP_LOADING=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { requestClient } from '#/api/request'; | ||
|
||
export namespace AuthApi { | ||
/** 登录接口参数 */ | ||
export interface LoginParams { | ||
password: string; | ||
username: string; | ||
} | ||
|
||
/** 登录接口返回值 */ | ||
export interface LoginResult { | ||
accessToken: string; | ||
desc: string; | ||
realName: string; | ||
refreshToken: string; | ||
userId: string; | ||
username: string; | ||
} | ||
} | ||
|
||
/** | ||
* 登录 | ||
*/ | ||
export async function login(data: AuthApi.LoginParams) { | ||
return requestClient.post<AuthApi.LoginResult>('/auth/login', data); | ||
} | ||
|
||
/** | ||
* 获取用户权限码 | ||
*/ | ||
export async function getAccessCodes() { | ||
return requestClient.get<string[]>('/auth/codes'); | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
apps/web-antd/src/apis/core/menu.ts → apps/web-antd/src/api/core/menu.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/web-antd/src/apis/core/user.ts → apps/web-antd/src/api/core/user.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
apps/web-antd/src/apis/demos/status.ts → apps/web-antd/src/api/demos/status.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { requestClient } from '#/apis/request'; | ||
import { requestClient } from '#/api/request'; | ||
|
||
/** | ||
* 模拟任意状态码 | ||
|
1 change: 0 additions & 1 deletion
1
apps/web-antd/src/apis/index.ts → apps/web-antd/src/api/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './core'; | ||
export * from './demos'; | ||
export type * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.