@kengic/vue 0.0.2-beta.59 → 0.0.2-beta.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +1600 -1102
- package/dist/src/apis/WMS/Controllers/VarController/GetAll.d.ts +21 -0
- package/dist/src/apis/WMS/Controllers/VarController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/index.d.ts +1 -0
- package/dist/src/apis/WMS/index.d.ts +2 -0
- package/dist/src/apis/WMS/models.d.ts +62 -0
- package/dist/src/apis/api.d.ts +1 -0
- package/dist/src/apis/def.d.ts +1 -0
- package/dist/src/apis/index.d.ts +2 -0
- package/dist/src/components/{kg-control → KgControl}/index.d.ts +2 -2
- package/dist/src/components/KgVar/hooks/index.d.ts +12 -0
- package/dist/src/components/KgVar/index.d.ts +2 -0
- package/dist/src/components/KgVar/store/index.d.ts +31 -0
- package/dist/src/components/KgVar/store/index.data.d.ts +9 -0
- package/dist/src/components/index.d.ts +6 -5
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/injection-keys.const.d.ts +13 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/services/http-client.d.ts +8 -3
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/kg.util.d.ts +38 -0
- package/dist/src/utils/logger.util.d.ts +1 -1
- package/kg.config.ts +23 -0
- package/package.json +5 -2
- package/dist/src/utils/file.util.d.ts +0 -19
- /package/dist/src/components/{kg-control/KgControlInput.d.ts → KgControl/KgControl.Input.d.ts} +0 -0
- /package/dist/src/components/{kg-control/KgControlSelect.d.ts → KgControl/KgControl.Select.d.ts} +0 -0
- /package/dist/src/components/{kg-control → KgControl}/KgControl.d.ts +0 -0
- /package/dist/src/components/{kg-control → KgControl}/index.vm.d.ts +0 -0
- /package/dist/src/components/{kg-page → KgPage}/KgPage.d.ts +0 -0
- /package/dist/src/components/{kg-progress-a → KgProgressA}/KgProgressA.d.ts +0 -0
- /package/dist/src/components/{kg-search → KgSearch}/KgSearch.d.ts +0 -0
- /package/dist/src/components/{kg-yes-or-no → KgYesOrNo}/KgYesOrNo.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IRequestConfig, IRequestOptions } from '../../../../services';
|
|
2
|
+
import * as DEF from '../../../def';
|
|
3
|
+
/** 请求参数. */
|
|
4
|
+
export declare class GetAllQuery {
|
|
5
|
+
/** 界面标识. */
|
|
6
|
+
frmId?: string | null;
|
|
7
|
+
/** 语言. */
|
|
8
|
+
localeId?: string | null;
|
|
9
|
+
constructor(obj?: GetAllQuery);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 查询所有变量配置.
|
|
13
|
+
*
|
|
14
|
+
* @param config 请求配置.
|
|
15
|
+
* @param option 请求选项.
|
|
16
|
+
*/
|
|
17
|
+
export declare function GetAll(config?: IRequestConfig<GetAllQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.VarDTO>;
|
|
18
|
+
export declare namespace GetAll {
|
|
19
|
+
var method: "GET";
|
|
20
|
+
var url: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetAll, GetAllQuery } from './GetAll';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as VarController from './VarController';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare class IPage<T0> {
|
|
2
|
+
/** Current. */
|
|
3
|
+
current?: number | null;
|
|
4
|
+
/** Pages. */
|
|
5
|
+
pages?: number | null;
|
|
6
|
+
/** Records. */
|
|
7
|
+
records?: Array<T0> | null;
|
|
8
|
+
/** Size. */
|
|
9
|
+
size?: number | null;
|
|
10
|
+
/** Total. */
|
|
11
|
+
total?: number | null;
|
|
12
|
+
constructor(obj?: IPage<T0>);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 变量别名
|
|
16
|
+
*/
|
|
17
|
+
export declare class VarCatalog {
|
|
18
|
+
/** 定制级别. */
|
|
19
|
+
custLvl?: string | null;
|
|
20
|
+
/** 界面标识. */
|
|
21
|
+
frmId?: string | null;
|
|
22
|
+
/** 分组. */
|
|
23
|
+
grpNam?: string | null;
|
|
24
|
+
/** 主键. */
|
|
25
|
+
id?: string | null;
|
|
26
|
+
/** 语言. */
|
|
27
|
+
localeId?: string | null;
|
|
28
|
+
/** 变量名称. */
|
|
29
|
+
varNam?: string | null;
|
|
30
|
+
/** 显示文本. */
|
|
31
|
+
varText?: string | null;
|
|
32
|
+
constructor(obj?: VarCatalog);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 变量
|
|
36
|
+
*/
|
|
37
|
+
export declare class VarContext {
|
|
38
|
+
/** 界面标识. */
|
|
39
|
+
frmId?: string | null;
|
|
40
|
+
/** 界面名称. */
|
|
41
|
+
frmNam?: string | null;
|
|
42
|
+
/** 分组. */
|
|
43
|
+
grpNam?: string | null;
|
|
44
|
+
/** 主键. */
|
|
45
|
+
id?: string | null;
|
|
46
|
+
/** 变量名称. */
|
|
47
|
+
varNam?: string | null;
|
|
48
|
+
constructor(obj?: VarContext);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 变量配置.
|
|
52
|
+
*/
|
|
53
|
+
export declare class VarDTO {
|
|
54
|
+
/** 变量别名. */
|
|
55
|
+
varCatalogs?: Array<VarCatalog> | null;
|
|
56
|
+
constructor(obj?: VarDTO);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 获取对象的属性名数组.
|
|
60
|
+
* @param obj 对象.
|
|
61
|
+
*/
|
|
62
|
+
export declare function keys<C extends object>(obj: C): Array<keyof C>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WMSAPI as WMS } from './WMS';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WMSDEF as WMS } from './WMS';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import KgControlSelect from './
|
|
2
|
-
import KgControlInput from './
|
|
1
|
+
import KgControlSelect from './KgControl.Select';
|
|
2
|
+
import KgControlInput from './KgControl.Input';
|
|
3
3
|
import { type KgControlProps } from './index.vm';
|
|
4
4
|
export { KgControlSelect, KgControlInput, type KgControlProps };
|
|
5
5
|
declare const _default: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 启用变量.
|
|
4
|
+
* @param formID 界面标识.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useKgVar(formID: string): {
|
|
7
|
+
t1: (varName: string) => ComputedRef<string>;
|
|
8
|
+
t2: (varName: string) => string;
|
|
9
|
+
} | {
|
|
10
|
+
t1: (varName: string) => Ref<string>;
|
|
11
|
+
t2: (varName: string) => string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { KgVarState } from './index.data';
|
|
2
|
+
import { VarCatalog } from '../../../apis/WMS/models';
|
|
3
|
+
export declare const useKgVarStore: import("pinia").StoreDefinition<"KgVar", KgVarState, {
|
|
4
|
+
getVarCatalogs(): Map<string, Array<VarCatalog>>;
|
|
5
|
+
/** 获取最顶层的界面标识. */
|
|
6
|
+
getTopFormID(): string | null;
|
|
7
|
+
}, {
|
|
8
|
+
/**
|
|
9
|
+
* 进入一个界面.
|
|
10
|
+
* 多个界面可以共用一个界面标识, 因此进入该界面时, 该界面标识可能已经存在了;
|
|
11
|
+
* 如果该界面标识尚不存在, 则加载它的变量配置.
|
|
12
|
+
* @param formID 界面标识.
|
|
13
|
+
*/
|
|
14
|
+
enter(formID: string): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* 离开一个界面.
|
|
17
|
+
* 如果该界面标识对应的所有页面都离开了, 则删除它的变量配置.
|
|
18
|
+
* @param formID 界面标识.
|
|
19
|
+
*/
|
|
20
|
+
leave(formID: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* 查询所有变量配置.
|
|
23
|
+
* @param formID 界面标识.
|
|
24
|
+
*/
|
|
25
|
+
retrieveAll(formID?: string | null): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* 清空所有变量配置.
|
|
28
|
+
* @param formID 界面标识.
|
|
29
|
+
*/
|
|
30
|
+
deleteAll(formID: string): void;
|
|
31
|
+
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { default as KgControl, KgControlInput, KgControlSelect, type KgControlProps } from './
|
|
2
|
-
import KgPage from './
|
|
3
|
-
import KgSearch from './
|
|
4
|
-
import KgProgressA from './
|
|
5
|
-
import KgYesOrNo from './
|
|
1
|
+
export { default as KgControl, KgControlInput, KgControlSelect, type KgControlProps } from './KgControl';
|
|
2
|
+
import KgPage from './KgPage/KgPage';
|
|
3
|
+
import KgSearch from './KgSearch/KgSearch';
|
|
4
|
+
import KgProgressA from './KgProgressA/KgProgressA';
|
|
5
|
+
import KgYesOrNo from './KgYesOrNo/KgYesOrNo';
|
|
6
6
|
export { KgPage, KgSearch, KgProgressA, KgYesOrNo };
|
|
7
|
+
export * from './KgVar';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
/** 界面标识. */
|
|
3
|
+
export declare const KG_DI_FORM_ID: InjectionKey<string>;
|
|
4
|
+
export declare type T = {
|
|
5
|
+
(key: string): string;
|
|
6
|
+
(key: string, locale: string): string;
|
|
7
|
+
(key: string, locale: string, list: unknown[]): string;
|
|
8
|
+
(key: string, locale: string, named: Record<string, unknown>): string;
|
|
9
|
+
(key: string, list: unknown[]): string;
|
|
10
|
+
(key: string, named: Record<string, unknown>): string;
|
|
11
|
+
};
|
|
12
|
+
/** 语言. */
|
|
13
|
+
export declare const KG_DI_LOCALE: InjectionKey<ComputedRef<"zh_CN" | "en">>;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AxiosRequestConfig } from 'axios';
|
|
2
2
|
interface IHttpClient {
|
|
3
|
-
request<T = any>(config:
|
|
3
|
+
request<T = any>(config: IRequestConfig, options?: IRequestOptions): Promise<T>;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* 设置 httpClient 实例.
|
|
@@ -9,7 +9,10 @@ declare function setupHttpClient(httpClient: IHttpClient | null): void;
|
|
|
9
9
|
/**
|
|
10
10
|
* 获取 httpClient 实例.
|
|
11
11
|
*/
|
|
12
|
-
declare function httpClient(): IHttpClient
|
|
12
|
+
declare function httpClient(): IHttpClient;
|
|
13
|
+
interface IRequestConfig<TQ = {}, TB = {}> extends AxiosRequestConfig<TB> {
|
|
14
|
+
params?: TQ;
|
|
15
|
+
}
|
|
13
16
|
interface IRequestOptions {
|
|
14
17
|
joinParamsToUrl?: boolean;
|
|
15
18
|
formatDate?: boolean;
|
|
@@ -23,5 +26,7 @@ interface IRequestOptions {
|
|
|
23
26
|
joinTime?: boolean;
|
|
24
27
|
ignoreCancelToken?: boolean;
|
|
25
28
|
withToken?: boolean;
|
|
29
|
+
/** 是否使用模拟数据. */
|
|
30
|
+
mock?: boolean;
|
|
26
31
|
}
|
|
27
|
-
export { setupHttpClient, httpClient };
|
|
32
|
+
export { setupHttpClient, httpClient, type IRequestConfig, type IRequestOptions };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用工具.
|
|
3
|
+
*/
|
|
4
|
+
export declare class KgUtil {
|
|
5
|
+
/**
|
|
6
|
+
* 根据'文件大小数值'获取'文件大小文本'.
|
|
7
|
+
* @param size 文件大小数值.
|
|
8
|
+
*/
|
|
9
|
+
static getFileSize(size: any): string;
|
|
10
|
+
/**
|
|
11
|
+
* BASE64 转换为 BLOB.
|
|
12
|
+
* @param base64 base64 字符串.
|
|
13
|
+
* @param contentType 文件类型.
|
|
14
|
+
* @param sliceSize 分块大小.
|
|
15
|
+
*/
|
|
16
|
+
static base64toBlob(base64: string, contentType: string, sliceSize?: number): Blob;
|
|
17
|
+
/**
|
|
18
|
+
* 下载文件.
|
|
19
|
+
* @param data 文件数据.
|
|
20
|
+
* @param fileName 文件名称, 包含后缀.
|
|
21
|
+
* @param contentType 文件类型.
|
|
22
|
+
*/
|
|
23
|
+
static downloadFile(data: string | BlobPart, fileName: string, contentType: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* 解析请求参数.
|
|
26
|
+
* 1. 填充通用参数的值
|
|
27
|
+
* a. 仓库: '{WAREHOUSE}'
|
|
28
|
+
* @param params 请求参数.
|
|
29
|
+
* @param warehouseID 仓库编号.
|
|
30
|
+
*/
|
|
31
|
+
static parseParams(params?: Record<string, any> | null, warehouseID?: string | null): any;
|
|
32
|
+
/**
|
|
33
|
+
* 解析请求参数: 解析字符串类型的参数值.
|
|
34
|
+
* @param value 参数的原始值.
|
|
35
|
+
* @param warehouseID 仓库编号.
|
|
36
|
+
*/
|
|
37
|
+
private static parseParamFromString;
|
|
38
|
+
}
|
|
@@ -27,7 +27,7 @@ declare class Logger {
|
|
|
27
27
|
* @param collapsed 是否折叠.
|
|
28
28
|
* @param style 提示消息样式.
|
|
29
29
|
*/
|
|
30
|
-
static log(level: "
|
|
30
|
+
static log(level: "error" | "info" | "warn" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string): void;
|
|
31
31
|
/**
|
|
32
32
|
* 打印警告日志.
|
|
33
33
|
*
|
package/kg.config.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IPontConfig } from '@kengic/pont';
|
|
2
|
+
|
|
3
|
+
const config: IPontConfig = {
|
|
4
|
+
pont: {
|
|
5
|
+
origins: [
|
|
6
|
+
{
|
|
7
|
+
name: 'WMS',
|
|
8
|
+
originUrl: 'http://localhost:8080/kengic-boot/v2/api-docs',
|
|
9
|
+
originType: 'SwaggerV2',
|
|
10
|
+
responseClassName: 'Result',
|
|
11
|
+
includeControllers: {
|
|
12
|
+
VarController: ['GetAll'],
|
|
13
|
+
},
|
|
14
|
+
includeClasses: ['IPage', 'VarCatalog', 'VarContext', 'VarDTO'],
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
publicPath: '/kengic-boot',
|
|
18
|
+
httpClientPath: "'../../../../services'",
|
|
19
|
+
outDir: './src/apis',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { config };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kengic/vue",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.61",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"build:dev": "rimraf dist && vue-tsc && vite build --mode development",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"publish:all:major": "npm run bump-version:major && npm run publish:all",
|
|
11
11
|
"bump-to:luotao.wms-vue3": "tsx scripts/bump-to.luotao.wms-vue3.ts",
|
|
12
12
|
"copy-to:luotao.wms-vue3": "tsx scripts/copy-to.luotao.wms-vue3.ts",
|
|
13
|
+
"gen:apis:WMS": "kengic-pont generate-apis --config kg.config.ts --origin WMS",
|
|
13
14
|
"--------------------": "",
|
|
14
15
|
"bump-version:beta": "tsx scripts/bump.ts beta",
|
|
15
16
|
"bump-version:major": "tsx scripts/bump.ts major",
|
|
@@ -26,9 +27,11 @@
|
|
|
26
27
|
"ant-design-vue": "3.2.14",
|
|
27
28
|
"axios": "0.26.1",
|
|
28
29
|
"filesize": "10.0.6",
|
|
29
|
-
"lodash-es": "4.17.21"
|
|
30
|
+
"lodash-es": "4.17.21",
|
|
31
|
+
"pinia": "2.0.12"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
34
|
+
"@kengic/pont": "1.2.10-beta.23",
|
|
32
35
|
"@types/lodash-es": "~4.17.7",
|
|
33
36
|
"@types/node": "~18.14.6",
|
|
34
37
|
"@types/semver": "~7.3.13",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 根据'文件大小数值'获取'文件大小文本'.
|
|
3
|
-
* @param size 文件大小数值.
|
|
4
|
-
*/
|
|
5
|
-
export declare function getFileSize(size: any): string;
|
|
6
|
-
/**
|
|
7
|
-
* base64 转换为 blob.
|
|
8
|
-
* @param base64 base64 字符串.
|
|
9
|
-
* @param contentType 文件类型.
|
|
10
|
-
* @param sliceSize 分块大小.
|
|
11
|
-
*/
|
|
12
|
-
export declare function base64toBlob(base64: string, contentType: string, sliceSize?: number): Blob;
|
|
13
|
-
/**
|
|
14
|
-
* 下载文件.
|
|
15
|
-
* @param data 文件数据.
|
|
16
|
-
* @param fileName 文件名称, 包含后缀.
|
|
17
|
-
* @param contentType 文件类型.
|
|
18
|
-
*/
|
|
19
|
-
export declare function downloadFile(data: string | BlobPart, fileName: string, contentType: string): void;
|
/package/dist/src/components/{kg-control/KgControlInput.d.ts → KgControl/KgControl.Input.d.ts}
RENAMED
|
File without changes
|
/package/dist/src/components/{kg-control/KgControlSelect.d.ts → KgControl/KgControl.Select.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|