物业代码生成
This commit is contained in:
19
packages/constants/README.md
Normal file
19
packages/constants/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# @vben/constants
|
||||
|
||||
用于多个 `app` 公用的常量,继承了 `@vben-core/shared/constants` 的所有能力。业务上有通用常量可以放在这里。
|
||||
|
||||
## 用法
|
||||
|
||||
### 添加依赖
|
||||
|
||||
```bash
|
||||
# 进入目标应用目录,例如 apps/xxxx-app
|
||||
# cd apps/xxxx-app
|
||||
pnpm add @vben/constants
|
||||
```
|
||||
|
||||
### 使用
|
||||
|
||||
```ts
|
||||
import { LOGIN_PATH } from '@vben/constants';
|
||||
```
|
25
packages/constants/package.json
Normal file
25
packages/constants/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "@vben/constants",
|
||||
"version": "5.5.6",
|
||||
"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/constants"
|
||||
},
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"sideEffects": [
|
||||
"**/*.css"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@vben-core/shared": "workspace:*"
|
||||
}
|
||||
}
|
28
packages/constants/src/core.ts
Normal file
28
packages/constants/src/core.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @zh_CN 登录页面 url 地址
|
||||
*/
|
||||
export const LOGIN_PATH = '/auth/login';
|
||||
|
||||
export interface LanguageOption {
|
||||
label: string;
|
||||
value: 'en-US' | 'zh-CN';
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported languages
|
||||
*/
|
||||
export const SUPPORT_LANGUAGES: LanguageOption[] = [
|
||||
{
|
||||
label: '简体中文',
|
||||
value: 'zh-CN',
|
||||
},
|
||||
{
|
||||
label: 'English',
|
||||
value: 'en-US',
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* 默认租户ID
|
||||
*/
|
||||
export const DEFAULT_TENANT_ID = '000000';
|
2
packages/constants/src/index.ts
Normal file
2
packages/constants/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './core';
|
||||
export * from '@vben-core/shared/constants';
|
6
packages/constants/tsconfig.json
Normal file
6
packages/constants/tsconfig.json
Normal file
@@ -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