init: 项目初始化提交
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled

This commit is contained in:
2025-05-27 18:35:06 +08:00
commit d3609c21c0
1430 changed files with 122218 additions and 0 deletions

20
packages/types/README.md Normal file
View File

@@ -0,0 +1,20 @@
# @vben/types
用于多个 `app` 公用的工具类型,继承了 `@vben-core/typings` 的所有能力。业务上有通用的类型定义可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/types
```
### 使用
```ts
// 推荐加上 type
import type { SelectOption } from '@vben/types';
```

22
packages/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,22 @@
import type { RouteMeta as IRouteMeta } from '@vben-core/typings';
import 'vue-router';
declare module 'vue-router' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
interface RouteMeta extends IRouteMeta {}
}
export interface VbenAdminProAppConfigRaw {
VITE_GLOB_API_URL: string;
}
export interface ApplicationConfig {
apiURL: string;
}
declare global {
interface Window {
_VBEN_ADMIN_PRO_APP_CONF_: VbenAdminProAppConfigRaw;
}
}

View File

@@ -0,0 +1,27 @@
{
"name": "@vben/types",
"version": "5.5.4",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {
"type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "packages/types"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
},
"./global": {
"types": "./global.d.ts"
}
},
"dependencies": {
"@vben-core/typings": "workspace:*",
"vue": "catalog:",
"vue-router": "catalog:"
}
}

View File

@@ -0,0 +1,2 @@
export type * from './user';
export type * from '@vben-core/typings';

View File

@@ -0,0 +1,20 @@
import type { BasicUserInfo } from '@vben-core/typings';
/** 用户信息 */
interface UserInfo extends BasicUserInfo {
/**
* 用户描述
*/
desc: string;
/**
* 首页地址
*/
homePath: string;
/**
* accessToken
*/
token: string;
}
export type { UserInfo };

View File

@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/web.json",
"include": ["src"],
"exclude": ["node_modules"]
}