mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 03:09:19 +08:00
初始化项目
This commit is contained in:
@@ -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';
|
||||
```
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
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;
|
||||
VITE_GLOB_AUTH_DINGDING_CLIENT_ID: string;
|
||||
VITE_GLOB_AUTH_DINGDING_CORP_ID: string;
|
||||
}
|
||||
|
||||
interface AuthConfig {
|
||||
dingding?: {
|
||||
clientId: string;
|
||||
corpId: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApplicationConfig {
|
||||
apiURL: string;
|
||||
auth: AuthConfig;
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
_VBEN_ADMIN_PRO_APP_CONF_: VbenAdminProAppConfigRaw;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@vben/types",
|
||||
"version": "5.5.9",
|
||||
"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:"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export type * from './user';
|
||||
export type * from '@vben-core/typings';
|
||||
@@ -0,0 +1,107 @@
|
||||
import type { BasicUserInfo } from '@vben-core/typings';
|
||||
|
||||
/** 用户信息 */
|
||||
interface UserInfo extends BasicUserInfo {
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId?: number;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
departmentId?: number;
|
||||
/**
|
||||
* 岗位id
|
||||
*/
|
||||
positionId?: number;
|
||||
/**
|
||||
* 登录账号
|
||||
*/
|
||||
loginCode: string;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
realName: string;
|
||||
/**
|
||||
* 头像路径
|
||||
*/
|
||||
avatar?: string;
|
||||
/**
|
||||
* 关联角色(user-普通账户 company-公司账户 super-超管账户)
|
||||
*/
|
||||
role: string;
|
||||
/**
|
||||
* 密码安全级别(0-初始 1-很弱 2-弱 3-安全 4-很安全)
|
||||
*/
|
||||
pwdSecurityLevel?: number;
|
||||
/**
|
||||
* 密码最后更新时间
|
||||
*/
|
||||
pwdUpdateTime?: string;
|
||||
/**
|
||||
* 最后登录ip
|
||||
*/
|
||||
lastLoginIp?: string;
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
lastLoginDate?: string;
|
||||
/**
|
||||
* 冻结时间
|
||||
*/
|
||||
freezeDate?: string;
|
||||
/**
|
||||
* 冻结原因
|
||||
*/
|
||||
freezeCause?: string;
|
||||
/**
|
||||
* 状态(0-正常 1-删除 2-停用 3-冻结)
|
||||
*/
|
||||
status: number;
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime: string;
|
||||
/**
|
||||
* 用户描述
|
||||
*/
|
||||
desc?: string;
|
||||
/**
|
||||
* 首页地址
|
||||
*/
|
||||
homePath?: string;
|
||||
/**
|
||||
* accessToken
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
* 用户角色列表
|
||||
*/
|
||||
roles?: string[];
|
||||
/**
|
||||
* 用户id(兼容性字段)
|
||||
*/
|
||||
userId?: string;
|
||||
/**
|
||||
* 用户名(兼容性字段)
|
||||
*/
|
||||
username?: string;
|
||||
}
|
||||
|
||||
export type { UserInfo };
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "@vben/tsconfig/web.json",
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user