@kengic/vue 0.2.1-beta.0 → 0.2.1-beta.2
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 +3483 -1918
- package/dist/src/apis/WMS/models.d.ts +54 -2
- package/dist/src/components/KgButton/KgButton.Copy.d.ts +30 -0
- package/dist/src/components/KgButton/KgButton.Create.d.ts +25 -5
- package/dist/src/components/KgButton/KgButton.Delete.d.ts +27 -8
- package/dist/src/components/KgButton/KgButton.Export.d.ts +30 -0
- package/dist/src/components/KgButton/KgButton.Import.d.ts +30 -0
- package/dist/src/components/KgButton/KgButton.Other.d.ts +30 -0
- package/dist/src/components/KgButton/KgButton.Update.d.ts +25 -5
- package/dist/src/components/KgButton/KgButton.d.ts +28 -8
- package/dist/src/components/KgButton/KgButtons.d.ts +21 -0
- package/dist/src/components/KgButton/index.d.ts +1 -0
- package/dist/src/components/KgButton/index.vm.d.ts +16 -3
- package/dist/src/components/KgControl/KgControl.Date.d.ts +2 -2
- package/dist/src/components/KgControl/KgControl.Input.d.ts +2 -2
- package/dist/src/components/KgControl/KgControl.Select.d.ts +2 -4
- package/dist/src/components/KgControl/KgControl.Switch.d.ts +2 -2
- package/dist/src/components/KgControl/KgControl.d.ts +3 -5
- package/dist/src/components/KgControl/index.vm.d.ts +5 -5
- package/dist/src/components/KgSearch/index.store.d.ts +7 -21
- package/dist/src/components/KgTable/KgTable.data.d.ts +4 -1
- package/dist/src/components/KgTable/index.store.d.ts +5 -8
- package/dist/src/components/KgVar/index.hook.d.ts +12 -38
- package/dist/src/components/KgVar/index.store.d.ts +8 -1
- package/dist/src/consts/i18n/en.d.ts +1 -0
- package/dist/src/consts/i18n/index.d.ts +2 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -0
- package/dist/src/consts/index.d.ts +17 -13
- package/dist/src/utils/app.util.d.ts +4 -4
- package/dist/src/utils/logger.util.d.ts +1 -1
- package/package.json +3 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
|
+
import { StoreDefinition } from 'pinia';
|
|
1
2
|
import { IKgTableRow } from './index.vm';
|
|
2
3
|
export interface KgTableState {
|
|
3
4
|
/** 勾选的行. */
|
|
4
5
|
selectedRowsMap: Map<string, Array<IKgTableRow>>;
|
|
5
6
|
}
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
* 根据 formID 获取勾选的行.
|
|
9
|
-
* @param state
|
|
10
|
-
*/
|
|
11
|
-
getSelectedRows(state: {
|
|
12
|
-
selectedRowsMap: Map<string, Array<IKgTableRow>>;
|
|
13
|
-
} & import("pinia").PiniaCustomStateProperties<KgTableState>): (formID?: string | null) => Array<IKgTableRow> | null;
|
|
7
|
+
export declare type KgTableStoreDefinition = StoreDefinition<'KgTable', KgTableState, {
|
|
8
|
+
getSelectedRows(): (formID?: string | null) => Array<IKgTableRow> | null;
|
|
14
9
|
}, {
|
|
15
10
|
setSelectedRows(formID: string, selectedRows: Array<IKgTableRow>): void;
|
|
16
11
|
}>;
|
|
12
|
+
export declare type KgTableStore = ReturnType<KgTableStoreDefinition>;
|
|
13
|
+
export declare const useKgTableStore: () => KgTableStoreDefinition;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { IKgVarStore } from './index.store';
|
|
3
|
+
import { VarButton, VarGridConfig } from '../../apis/WMS/models';
|
|
4
|
+
export declare type IUseKgVar = {
|
|
5
|
+
formID: string;
|
|
6
|
+
kgVarStore: IKgVarStore;
|
|
7
|
+
varButtons: Ref<Array<VarButton> | null>;
|
|
8
|
+
varGridConfig: Ref<VarGridConfig | null>;
|
|
9
|
+
t1: (varName?: string | null) => Ref<string>;
|
|
10
|
+
t2: (varName?: string | null) => string;
|
|
11
|
+
};
|
|
2
12
|
/**
|
|
3
13
|
* 启用变量.
|
|
4
14
|
* 在子组件中调用时, 可以不传该参数, 此时会通过依赖注入获取.
|
|
@@ -6,40 +16,4 @@ import { ComputedRef, Ref } from 'vue';
|
|
|
6
16
|
* 在组件外调用时, 必须传界面标识.
|
|
7
17
|
* @param formID 界面标识.
|
|
8
18
|
*/
|
|
9
|
-
export declare function useKgVar(formID?: string):
|
|
10
|
-
formID: string;
|
|
11
|
-
kgVarStore: import("pinia").Store<"KgVar", import("./index.store").KgVarState, {
|
|
12
|
-
getTopFormID(): string | null;
|
|
13
|
-
getVarCatalogs(): (formID?: string | null | undefined) => import("../..").VarCatalog[] | null;
|
|
14
|
-
getVarCatalog(): (formID?: string | null | undefined, varName?: string | null | undefined) => import("../..").VarCatalog | null;
|
|
15
|
-
getVarLookup(): (formID?: string | null | undefined, varName?: string | null | undefined) => import("../..").VarLookup | null;
|
|
16
|
-
getVarGridMasters(): (formID?: string | null | undefined) => import("../..").VarGridMasterDTO[] | null;
|
|
17
|
-
getVarGridMaster(): (formID?: string | null | undefined) => import("../..").VarGridMasterDTO | null;
|
|
18
|
-
getVarGridDetails(): (formID?: string | null | undefined) => import("../..").VarGridDetail[] | null;
|
|
19
|
-
}, {
|
|
20
|
-
leave(formID: string): void;
|
|
21
|
-
deleteAll(formID: string): void;
|
|
22
|
-
retrieveAll(formID?: string | null | undefined): Promise<void>;
|
|
23
|
-
enter(formID: string): Promise<void>;
|
|
24
|
-
}>;
|
|
25
|
-
t1: (varName?: string | null) => ComputedRef<string>;
|
|
26
|
-
t2: (varName?: string | null) => string;
|
|
27
|
-
} | {
|
|
28
|
-
formID: string;
|
|
29
|
-
kgVarStore: import("pinia").Store<"KgVar", import("./index.store").KgVarState, {
|
|
30
|
-
getTopFormID(): string | null;
|
|
31
|
-
getVarCatalogs(): (formID?: string | null | undefined) => import("../..").VarCatalog[] | null;
|
|
32
|
-
getVarCatalog(): (formID?: string | null | undefined, varName?: string | null | undefined) => import("../..").VarCatalog | null;
|
|
33
|
-
getVarLookup(): (formID?: string | null | undefined, varName?: string | null | undefined) => import("../..").VarLookup | null;
|
|
34
|
-
getVarGridMasters(): (formID?: string | null | undefined) => import("../..").VarGridMasterDTO[] | null;
|
|
35
|
-
getVarGridMaster(): (formID?: string | null | undefined) => import("../..").VarGridMasterDTO | null;
|
|
36
|
-
getVarGridDetails(): (formID?: string | null | undefined) => import("../..").VarGridDetail[] | null;
|
|
37
|
-
}, {
|
|
38
|
-
leave(formID: string): void;
|
|
39
|
-
deleteAll(formID: string): void;
|
|
40
|
-
retrieveAll(formID?: string | null | undefined): Promise<void>;
|
|
41
|
-
enter(formID: string): Promise<void>;
|
|
42
|
-
}>;
|
|
43
|
-
t1: (varName?: string | null) => Ref<string>;
|
|
44
|
-
t2: (varName?: string | null) => string;
|
|
45
|
-
};
|
|
19
|
+
export declare function useKgVar(formID?: string): IUseKgVar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type StoreDefinition } from 'pinia';
|
|
2
|
-
import { VarCatalog, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup } from '../../apis/WMS/models';
|
|
2
|
+
import { VarButton, VarCatalog, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup } from '../../apis/WMS/models';
|
|
3
3
|
export interface KgVarState {
|
|
4
4
|
/**
|
|
5
5
|
* 当前可能打开了多个界面, 需要按照先后顺序记录下来, 当打开变量配置弹窗时, 打开的是最近那个页面的变量配置.
|
|
@@ -9,6 +9,10 @@ export interface KgVarState {
|
|
|
9
9
|
varCatalogsMap: Map<string, Array<VarCatalog>>;
|
|
10
10
|
/** 变量查找. */
|
|
11
11
|
varLookupsMap: Map<string, Array<VarLookup>>;
|
|
12
|
+
/** 按钮. */
|
|
13
|
+
varButtonsMap: Map<string, Array<VarButton>>;
|
|
14
|
+
/** 表格配置. */
|
|
15
|
+
varGridConfigMap: Map<string, VarGridConfig | null>;
|
|
12
16
|
/** 表格. */
|
|
13
17
|
varGridMap: Map<string, {
|
|
14
18
|
varGrid: VarGridDTO | null;
|
|
@@ -21,6 +25,8 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', KgVarState,
|
|
|
21
25
|
getVarCatalogs(): (formID?: string | null) => Array<VarCatalog> | null;
|
|
22
26
|
getVarCatalog(): (formID?: string | null, varName?: string | null) => VarCatalog | null;
|
|
23
27
|
getVarLookup(): (formID?: string | null, varName?: string | null) => VarLookup | null;
|
|
28
|
+
getVarButtons(): (formID?: string | null) => Array<VarButton> | null;
|
|
29
|
+
getVarGridConfig(): (formID?: string | null) => VarGridConfig | null;
|
|
24
30
|
getVarGridMasters(): (formID?: string | null) => Array<VarGridMasterDTO> | null;
|
|
25
31
|
getVarGridMaster(): (formID?: string | null) => VarGridMasterDTO | null;
|
|
26
32
|
getVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
|
|
@@ -30,4 +36,5 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', KgVarState,
|
|
|
30
36
|
retrieveAll(formID?: string | null): Promise<void>;
|
|
31
37
|
enter(formID: string): Promise<void>;
|
|
32
38
|
}>;
|
|
39
|
+
export declare type IKgVarStore = ReturnType<IKgVarStoreDefinition>;
|
|
33
40
|
export declare const useKgVarStore: () => IKgVarStoreDefinition;
|
|
@@ -19,6 +19,7 @@ export declare const KG_I18N: {
|
|
|
19
19
|
cancel: string;
|
|
20
20
|
confirm: string;
|
|
21
21
|
lookup: string;
|
|
22
|
+
button: string;
|
|
22
23
|
confirmDelete: string;
|
|
23
24
|
KgSearch: {
|
|
24
25
|
title: string;
|
|
@@ -45,6 +46,7 @@ export declare const KG_I18N: {
|
|
|
45
46
|
cancel: string;
|
|
46
47
|
confirm: string;
|
|
47
48
|
lookup: string;
|
|
49
|
+
button: string;
|
|
48
50
|
confirmDelete: string;
|
|
49
51
|
KgSearch: {
|
|
50
52
|
title: string;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export * from './i18n';
|
|
2
2
|
export * from './injection-keys.const';
|
|
3
3
|
/** 所有模块. */
|
|
4
|
-
export declare const enum
|
|
4
|
+
export declare const enum KG_APP {
|
|
5
5
|
DATA_MANAGER = "data-manager",
|
|
6
6
|
BUSINESS_MANAGER = "business-manager",
|
|
7
7
|
SYS = "sys"
|
|
8
8
|
}
|
|
9
9
|
/** 模块路径前缀. */
|
|
10
|
-
export declare const enum
|
|
10
|
+
export declare const enum KG_APPS_PREFIX {
|
|
11
11
|
DATA_MANAGER = "/wms/data-manager",
|
|
12
12
|
BUSINESS_MANAGER = "/wms/business-manager",
|
|
13
13
|
SYS = "/sys"
|
|
14
14
|
}
|
|
15
15
|
/** 表单控件类型. */
|
|
16
|
-
export declare const enum
|
|
16
|
+
export declare const enum KG_CONTROL_TYPE {
|
|
17
17
|
/** 文本. */
|
|
18
18
|
INPUT = "Input_Basic",
|
|
19
19
|
/** 密码. */
|
|
@@ -43,25 +43,29 @@ export declare const enum KG_CONTROL_TYPES_ENUM {
|
|
|
43
43
|
FILE_UPLOAD_BUTTON = "FileUpload_Button"
|
|
44
44
|
}
|
|
45
45
|
/** 所有模块. */
|
|
46
|
-
export declare const KG_APPS: Array<
|
|
46
|
+
export declare const KG_APPS: Array<KG_APP>;
|
|
47
47
|
/** 按钮类型. */
|
|
48
|
-
export declare const enum
|
|
48
|
+
export declare const enum KG_BUTTON_TYPE {
|
|
49
49
|
/** 创建. */
|
|
50
|
-
CREATE = "
|
|
50
|
+
CREATE = "CREATE",
|
|
51
51
|
/** 创建. */
|
|
52
|
-
UPDATE = "
|
|
52
|
+
UPDATE = "UPDATE",
|
|
53
53
|
/** 复制. */
|
|
54
|
-
COPY = "
|
|
54
|
+
COPY = "COPY",
|
|
55
55
|
/** 删除. */
|
|
56
|
-
DELETE = "
|
|
56
|
+
DELETE = "DELETE",
|
|
57
|
+
/** 导出. */
|
|
58
|
+
IMPORT = "IMPORT",
|
|
59
|
+
/** 导出. */
|
|
60
|
+
EXPORT = "EXPORT",
|
|
57
61
|
/** 查询. */
|
|
58
|
-
SEARCH = "
|
|
62
|
+
SEARCH = "SEARCH",
|
|
59
63
|
/** 清空查询条件. */
|
|
60
|
-
CLEAR = "
|
|
64
|
+
CLEAR = "CLEAR",
|
|
61
65
|
/** 刷新. */
|
|
62
|
-
REFRESH = "
|
|
66
|
+
REFRESH = "REFRESH",
|
|
63
67
|
/** 其他. */
|
|
64
|
-
OTHER = "
|
|
68
|
+
OTHER = "OTHER"
|
|
65
69
|
}
|
|
66
70
|
/** 定制级别. */
|
|
67
71
|
export declare const enum KG_CUSTOM_LEVEL {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KG_APP } from '../consts';
|
|
2
2
|
/**
|
|
3
3
|
* 判断某个路径是否属于某个模块.
|
|
4
4
|
* @param path 路径.
|
|
5
5
|
* @param app 模块.
|
|
6
6
|
*/
|
|
7
|
-
export declare function isPathInApp(path: string | undefined | null, app:
|
|
7
|
+
export declare function isPathInApp(path: string | undefined | null, app: KG_APP): boolean;
|
|
8
8
|
/**
|
|
9
9
|
* 根据地址获取模块.
|
|
10
10
|
* @param path 地址.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getAppByPath(path: string):
|
|
12
|
+
export declare function getAppByPath(path: string): KG_APP;
|
|
13
13
|
/**
|
|
14
14
|
* 获取模块首页地址.
|
|
15
15
|
* @param app 模块.
|
|
16
16
|
*/
|
|
17
|
-
export declare function getAppIndexPath(app:
|
|
17
|
+
export declare function getAppIndexPath(app: KG_APP): string;
|
|
@@ -27,7 +27,7 @@ declare class Logger {
|
|
|
27
27
|
* @param collapsed 是否折叠.
|
|
28
28
|
* @param style 提示消息样式.
|
|
29
29
|
*/
|
|
30
|
-
static log(level: "error" | "
|
|
30
|
+
static log(level: "error" | "warn" | "info" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string): void;
|
|
31
31
|
/**
|
|
32
32
|
* 打印警告日志.
|
|
33
33
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kengic/vue",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.2",
|
|
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
|
+
"build:dev && copy-to:luotao.wms-vue3": "npm run build:dev && npm run copy-to:luotao.wms-vue3",
|
|
13
14
|
"gen:apis:WMS": "kengic-pont generate-apis --config kg.config.ts --origin WMS",
|
|
14
15
|
"--------------------": "",
|
|
15
16
|
"bump-version:beta": "tsx scripts/bump.ts beta",
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@ant-design/icons-vue": "6.1.0",
|
|
28
|
+
"@iconify/vue": "4.1.1",
|
|
27
29
|
"ant-design-vue": "3.2.14",
|
|
28
30
|
"axios": "0.26.1",
|
|
29
31
|
"dayjs": "1.11.6",
|