@kengic/vue 0.25.3-beta.0 → 0.25.4-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +15165 -9518
- package/dist/src/components/KgForm/KgForm.d.ts +3 -3
- package/dist/src/components/KgForm/index.d.ts +4 -4
- package/dist/src/config/index.d.ts +1 -1
- package/dist/src/config/index.hooks.d.ts +2 -1
- package/dist/src/config/index.store.d.ts +43 -39
- package/dist/src/config/setup.d.ts +13 -20
- package/dist/src/consts/i18n/es_ES.d.ts +265 -0
- package/dist/src/consts/i18n/fr_FR.d.ts +265 -0
- package/dist/src/consts/i18n/index.d.ts +2 -2
- package/dist/src/consts/i18n/km_KH.d.ts +265 -0
- package/dist/src/consts/i18n/ko_KR.d.ts +265 -0
- package/dist/src/consts/i18n/vi_VN.d.ts +265 -0
- package/dist/src/consts/index.vm.d.ts +0 -2
- package/dist/src/helpers/ant-design-vue.d.ts +1 -1
- package/dist/src/project/build/getConfigFileName.d.ts +5 -0
- package/dist/src/project/build/index.d.ts +1 -0
- package/dist/src/project/index.d.ts +1 -0
- package/dist/src/project/src/index.d.ts +9 -0
- package/dist/src/project/src/locales/helper.d.ts +5 -0
- package/dist/src/project/src/locales/index.d.ts +3 -0
- package/dist/src/project/src/locales/setupI18n.d.ts +3 -0
- package/dist/src/project/src/locales/useLocale.d.ts +10 -0
- package/dist/src/project/src/store/index.d.ts +1 -0
- package/dist/src/project/src/store/modules/index.d.ts +1 -0
- package/dist/src/project/src/store/modules/locale.d.ts +54 -0
- package/dist/src/project/src/utils/cache/index.d.ts +7 -0
- package/dist/src/project/src/utils/cache/memory.d.ts +20 -0
- package/dist/src/project/src/utils/cache/persistent.d.ts +33 -0
- package/dist/src/project/src/utils/cache/storageCache.d.ts +8 -0
- package/dist/src/project/src/utils/cipher.d.ts +19 -0
- package/dist/src/project/src/utils/env.d.ts +34 -0
- package/dist/src/project/types/config.d.ts +13 -1
- package/dist/src/utils/kg-logger.util.d.ts +1 -1
- package/package.json +6 -1
@@ -0,0 +1,20 @@
|
|
1
|
+
export interface Cache<V = any> {
|
2
|
+
value?: V;
|
3
|
+
timeoutId?: ReturnType<typeof setTimeout>;
|
4
|
+
time?: number;
|
5
|
+
alive?: number;
|
6
|
+
}
|
7
|
+
export declare class Memory<T = any, V = any> {
|
8
|
+
private cache;
|
9
|
+
private alive;
|
10
|
+
constructor(alive?: number);
|
11
|
+
get getCache(): { [key in keyof T]?: Cache<V> | undefined; };
|
12
|
+
setCache(cache: any): void;
|
13
|
+
get<K extends keyof T>(key: K): { [key in keyof T]?: Cache<V> | undefined; }[K];
|
14
|
+
set<K extends keyof T>(key: K, value: V, expires?: number): V;
|
15
|
+
remove<K extends keyof T>(key: K): V | undefined;
|
16
|
+
resetCache(cache: {
|
17
|
+
[K in keyof T]: Cache;
|
18
|
+
}): void;
|
19
|
+
clear(): void;
|
20
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import type { RouteLocationNormalized } from 'vue-router';
|
2
|
+
import { SysUserWarehouseDTO } from '../../../../apis/WMS/models';
|
3
|
+
import { LoginInfo, ProjectConfig, UserInfo } from '../../../types';
|
4
|
+
import { DB_DICT_DATA_KEY, LOCK_INFO_KEY, LOGIN_INFO_KEY, MULTIPLE_TABS_KEY, PROJ_CFG_KEY, ROLES_KEY, TENANT_ID, TOKEN_KEY, USER_INFO_KEY, USER_WAREHOUSE_KEY } from '../../enums';
|
5
|
+
interface BasicStore {
|
6
|
+
[TOKEN_KEY]: string | number | null | undefined;
|
7
|
+
[USER_INFO_KEY]: UserInfo;
|
8
|
+
[ROLES_KEY]: string[];
|
9
|
+
[USER_WAREHOUSE_KEY]: SysUserWarehouseDTO[];
|
10
|
+
[LOCK_INFO_KEY]: LockInfo;
|
11
|
+
[PROJ_CFG_KEY]: ProjectConfig;
|
12
|
+
[MULTIPLE_TABS_KEY]: RouteLocationNormalized[];
|
13
|
+
[DB_DICT_DATA_KEY]: string;
|
14
|
+
[TENANT_ID]: string;
|
15
|
+
[LOGIN_INFO_KEY]: LoginInfo;
|
16
|
+
}
|
17
|
+
declare type LocalStore = BasicStore;
|
18
|
+
declare type SessionStore = BasicStore;
|
19
|
+
export declare type BasicKeys = keyof BasicStore;
|
20
|
+
declare type LocalKeys = keyof LocalStore;
|
21
|
+
declare type SessionKeys = keyof SessionStore;
|
22
|
+
export declare class Persistent {
|
23
|
+
static getLocal<T>(key: LocalKeys): Nullable<T>;
|
24
|
+
static setLocal(key: LocalKeys, value: LocalStore[LocalKeys], immediate?: boolean): void;
|
25
|
+
static removeLocal(key: LocalKeys, immediate?: boolean): void;
|
26
|
+
static clearLocal(immediate?: boolean): void;
|
27
|
+
static getSession<T>(key: SessionKeys): Nullable<T>;
|
28
|
+
static setSession(key: SessionKeys, value: SessionStore[SessionKeys], immediate?: boolean): void;
|
29
|
+
static removeSession(key: SessionKeys, immediate?: boolean): void;
|
30
|
+
static clearSession(immediate?: boolean): void;
|
31
|
+
static clearAll(immediate?: boolean): void;
|
32
|
+
}
|
33
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export interface EncryptionParams {
|
2
|
+
key: string;
|
3
|
+
iv: string;
|
4
|
+
}
|
5
|
+
export declare class AesEncryption {
|
6
|
+
private key;
|
7
|
+
private iv;
|
8
|
+
constructor(opt?: Partial<EncryptionParams>);
|
9
|
+
get getOptions(): {
|
10
|
+
mode: any;
|
11
|
+
padding: any;
|
12
|
+
iv: any;
|
13
|
+
};
|
14
|
+
encryptByAES(cipherText: string): string;
|
15
|
+
decryptByAES(cipherText: string): string;
|
16
|
+
}
|
17
|
+
export declare function encryptByBase64(cipherText: string): string;
|
18
|
+
export declare function decodeByBase64(cipherText: string): string;
|
19
|
+
export declare function encryptByMd5(password: string): string;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
export declare function getCommonStoragePrefix(): string;
|
2
|
+
export declare function getStorageShortName(): string;
|
3
|
+
export declare function getAppEnvConfig(): {
|
4
|
+
VITE_GLOB_APP_TITLE: string;
|
5
|
+
VITE_GLOB_API_URL: string;
|
6
|
+
VITE_USE_MOCK: string;
|
7
|
+
VITE_GLOB_APP_SHORT_NAME: string;
|
8
|
+
VITE_GLOB_API_URL_PREFIX: string | undefined;
|
9
|
+
VITE_GLOB_APP_OPEN_SSO: string;
|
10
|
+
VITE_GLOB_APP_OPEN_QIANKUN: string;
|
11
|
+
VITE_GLOB_APP_CAS_BASE_URL: string;
|
12
|
+
VITE_GLOB_DOMAIN_URL: string;
|
13
|
+
VITE_GLOB_ONLINE_VIEW_URL: string | undefined;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* @description: Development mode
|
17
|
+
*/
|
18
|
+
export declare const devMode = "development";
|
19
|
+
/**
|
20
|
+
* @description: Production mode
|
21
|
+
*/
|
22
|
+
export declare const prodMode = "production";
|
23
|
+
/**
|
24
|
+
* @description: Is it a development mode
|
25
|
+
* @returns:
|
26
|
+
* @example:
|
27
|
+
*/
|
28
|
+
export declare function isDevMode(): boolean;
|
29
|
+
/**
|
30
|
+
* @description: Is it a production mode
|
31
|
+
* @returns:
|
32
|
+
* @example:
|
33
|
+
*/
|
34
|
+
export declare function isProdMode(): boolean;
|
@@ -1,7 +1,19 @@
|
|
1
1
|
import { ContentEnum, PermissionModeEnum, RouterTransitionEnum, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, ThemeEnum } from '../src/enums/appEnum';
|
2
2
|
import { CacheTypeEnum } from '../src/enums/cacheEnum';
|
3
3
|
import { MenuModeEnum, MenuTypeEnum, MixSidebarTriggerEnum, TriggerEnum } from '../src/enums/menuEnum';
|
4
|
-
|
4
|
+
/**
|
5
|
+
* <p>已支持的语言.</p>
|
6
|
+
* <ul>
|
7
|
+
* <li> en: 英语</li>
|
8
|
+
* <li>es_ES: 西班牙语_西班牙</li>
|
9
|
+
* <li>fr_FR: 法语_法国</li>
|
10
|
+
* <li>km_KH: 高棉语_柬埔寨</li>
|
11
|
+
* <li>ko_KR: 韩语_韩国</li>
|
12
|
+
* <li>vi_VN: 越南语_越南</li>
|
13
|
+
* <li>zh_CN: 汉语_中国</li>
|
14
|
+
* </ul>
|
15
|
+
*/
|
16
|
+
export declare type LocaleType = 'en' | 'es_ES' | 'fr_FR' | 'km_KH' | 'ko_KR' | 'vi_VN' | 'zh_CN';
|
5
17
|
export interface MenuSetting {
|
6
18
|
bgColor: string;
|
7
19
|
fixed: boolean;
|
@@ -35,7 +35,7 @@ declare class KgLogger {
|
|
35
35
|
* @param collapsed 是否折叠.
|
36
36
|
* @param style 样式.
|
37
37
|
*/
|
38
|
-
static log(level: "
|
38
|
+
static log(level: "error" | "warn" | "debug" | "info" | "deprecated" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string | null): void;
|
39
39
|
/**
|
40
40
|
* 打印警告日志.
|
41
41
|
*
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.25.
|
3
|
+
"version": "0.25.4-beta.0",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
|
@@ -24,10 +24,12 @@
|
|
24
24
|
"publish:npm": "npm run switch-node-version && npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public",
|
25
25
|
"------- ------------------------------------------": "",
|
26
26
|
"copy-to:luotao:smartfactory.product.wms.wms--dev-3.1": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.product.wms.wms--dev-3.1.ts",
|
27
|
+
"copy-to:luotao:smartfactory.product.wms.wms--dev-3.2": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.product.wms.wms--dev-3.2.ts",
|
27
28
|
"copy-to:luotao:smartfactory.product.wms.wms-vue3--focus": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts",
|
28
29
|
"copy-to:luotao:smartfactory.tyre.haohua.gantry.was-java--main": "npm run build:dev && tsx scripts/copy-to.luotao.smartfactory.tyre.haohua.gantry.was-java--main.ts",
|
29
30
|
"--- ----------------------------------------------": "",
|
30
31
|
"bump-to:luotao:smartfactory.product.wms.wms--dev-3.1": "npm run switch-node-version && tsx scripts/bump-to.luotao.smartfactory.product.wms.wms--dev-3.1.ts",
|
32
|
+
"bump-to:luotao:smartfactory.product.wms.wms--dev-3.2": "npm run switch-node-version && tsx scripts/bump-to.luotao.smartfactory.product.wms.wms--dev-3.2.ts",
|
31
33
|
"bump-to:luotao:smartfactory.product.wms.wms-vue3--focus": "npm run switch-node-version && tsx scripts/bump-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts"
|
32
34
|
},
|
33
35
|
"peerDependencies": {
|
@@ -45,6 +47,7 @@
|
|
45
47
|
"@iconify/vue": "4.1.1",
|
46
48
|
"@kengic/pont": "1.2.13",
|
47
49
|
"@rys-fe/vite-plugin-theme": "0.8.6",
|
50
|
+
"@types/crypto-js": "4.1.1",
|
48
51
|
"@types/fs-extra": "9.0.13",
|
49
52
|
"@types/inquirer": "8.2.5",
|
50
53
|
"@types/lodash-es": "4.17.9",
|
@@ -59,6 +62,7 @@
|
|
59
62
|
"ant-design-vue": "3.2.14",
|
60
63
|
"axios": "0.26.1",
|
61
64
|
"chalk": "4.1.2",
|
65
|
+
"crypto-js": "4.1.1",
|
62
66
|
"dayjs": "1.11.10",
|
63
67
|
"dotenv": "16.0.3",
|
64
68
|
"filesize": "10.1.0",
|
@@ -92,6 +96,7 @@
|
|
92
96
|
"vite-plugin-vue-setup-extend": "0.4.0",
|
93
97
|
"vite-plugin-windicss": "1.8.8",
|
94
98
|
"vue": "3.2.43",
|
99
|
+
"vue-i18n": "9.2.2",
|
95
100
|
"vue-router": "4.1.6",
|
96
101
|
"vue-tsc": "1.8.27"
|
97
102
|
},
|