@kengic/vue 0.5.38 → 0.6.1-beta.0
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 +9445 -9011
- package/dist/src/apis/WMS/models.d.ts +3 -1
- package/dist/src/components/KgAppSelect/KgAppSelect.d.ts +47 -0
- package/dist/src/components/KgAppSelect/index.d.ts +3 -0
- package/dist/src/components/KgAppSelect/index.hooks.d.ts +11 -0
- package/dist/src/components/KgAppSelect/index.store.d.ts +51 -0
- package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +0 -2
- package/dist/src/components/KgButton/components/KgButton.Create.d.ts +6 -6
- package/dist/src/components/KgForm/KgForm.d.ts +24 -24
- package/dist/src/components/KgForm/index.d.ts +48 -48
- package/dist/src/components/KgForm/index.vm.d.ts +12 -12
- package/dist/src/components/KgModal/KgModal.d.ts +6 -6
- package/dist/src/components/KgModal/index.vm.d.ts +1 -1
- package/dist/src/components/KgResizable/KgResizable.d.ts +4 -4
- package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +0 -4
- package/dist/src/components/KgSubmit/index.hooks.d.ts +9 -3
- package/dist/src/components/KgSubmit/index.store.d.ts +7 -0
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +1 -4
- package/dist/src/components/KgTable/index.hooks.d.ts +17 -1
- package/dist/src/components/KgTable/index.vm.d.ts +9 -2
- package/dist/src/components/KgVar/index.hooks.d.ts +5 -0
- package/dist/src/components/KgYesOrNo/KgYesOrNo.d.ts +29 -4
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/config/index.store.d.ts +12 -1
- package/dist/src/config/setup.d.ts +2 -2
- package/dist/src/consts/i18n/en.d.ts +6 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +6 -0
- package/dist/src/consts/index.d.ts +14 -8
- package/dist/src/helpers/ant-design-vue.d.ts +13 -13
- package/dist/src/utils/dom.util.d.ts +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/kg.util.d.ts +3 -3
- package/dist/src/utils/route.util.d.ts +17 -1
- package/package.json +2 -2
- package/dist/src/utils/app.util.d.ts +0 -17
@@ -1,5 +1,7 @@
|
|
1
|
+
import { RuleObject } from 'ant-design-vue/es/form';
|
2
|
+
import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
1
3
|
import { Ref } from 'vue';
|
2
|
-
import { IRemoveEventListenerHandler } from '../../consts';
|
4
|
+
import { IRemoveEventListenerHandler, KG_VAR_SUBMIT__DISPLAY_TYPE } from '../../consts';
|
3
5
|
import { IKgSubmitAfterValidateCb, IKgSubmitBeforeOkCb, IKgSubmitBeforeRequestCb, IKgSubmitCloseCb, IKgSubmitOkCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
|
4
6
|
export declare type IUseKgSubmit = {
|
5
7
|
formID: string;
|
@@ -7,10 +9,12 @@ export declare type IUseKgSubmit = {
|
|
7
9
|
store: IKgSubmitStore;
|
8
10
|
/** 表单数据对象. */
|
9
11
|
model: Ref<Record<string, any>>;
|
12
|
+
formRef: Ref<FormInstance | null>;
|
13
|
+
rules: Ref<Record<string, Array<RuleObject>>>;
|
14
|
+
/** 显示方式. */
|
15
|
+
displayType: Ref<KG_VAR_SUBMIT__DISPLAY_TYPE>;
|
10
16
|
/** 监听事件: 打开抽屉. */
|
11
17
|
onOpen(cb: IKgSubmitOpenCb): IRemoveEventListenerHandler;
|
12
|
-
/** 监听事件: 关闭抽屉. 点击取消或者点击确定并且成功之后, 都会触发 */
|
13
|
-
onClose(cb: IKgSubmitCloseCb): IRemoveEventListenerHandler;
|
14
18
|
/** 监听事件: 点击保存按钮之后, 执行默认逻辑之前. 可以在此时修改表单的值; 可以在此时对表单的值进行验证, 如果返回 true 表示表单验证失败, 不会再执行后面的代码. */
|
15
19
|
onBeforeOk(cb: IKgSubmitBeforeOkCb): IRemoveEventListenerHandler;
|
16
20
|
/** 监听事件: 点击保存按钮之后, 表单验证成功. 如果返回 true, 不会再执行后面的代码. */
|
@@ -19,6 +23,8 @@ export declare type IUseKgSubmit = {
|
|
19
23
|
onBeforeRequest(cb: IKgSubmitBeforeRequestCb): IRemoveEventListenerHandler;
|
20
24
|
/** 监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 即将关闭抽屉. */
|
21
25
|
onOk(cb: IKgSubmitOkCb): IRemoveEventListenerHandler;
|
26
|
+
/** 监听事件: 关闭抽屉. 点击取消或者点击确定并且成功之后, 都会触发 */
|
27
|
+
onClose(cb: IKgSubmitCloseCb): IRemoveEventListenerHandler;
|
22
28
|
};
|
23
29
|
/**
|
24
30
|
* @param formID 界面标识.
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { RuleObject } from 'ant-design-vue/es/form';
|
2
|
+
import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
2
3
|
import { StoreDefinition } from 'pinia';
|
3
4
|
import { Ref } from 'vue';
|
4
5
|
import { IKgTableRow } from '../KgTable';
|
@@ -72,11 +73,17 @@ export interface IKgSubmitState {
|
|
72
73
|
isLoadingMap: Map<string, boolean>;
|
73
74
|
/** 表单数据对象. */
|
74
75
|
modelMap: Map<string, Record<string, any>>;
|
76
|
+
/** 表单对象. */
|
77
|
+
formRefMap: Map<string, Ref<FormInstance | null>>;
|
78
|
+
/** 表单验证规则. 在 beforeOk 事件中会将该对象传给调用者, 调用者可以修改该对象, 从而添加自定义的验证规则. */
|
79
|
+
rulesMap: Map<string, Ref<Record<string, Array<RuleObject>>>>;
|
75
80
|
}
|
76
81
|
export declare type IKgSubmitStoreDefinition = StoreDefinition<'KgSubmit', IKgSubmitState, {
|
77
82
|
/** 是否处于加载状态. */
|
78
83
|
isLoading(): (formID?: string | null) => boolean;
|
79
84
|
getModel(): (formID?: string | null) => Record<string, any> | null;
|
85
|
+
getFormRef(): (formID?: string | null) => Ref<FormInstance | null>;
|
86
|
+
getRules(): (formID?: string | null) => Ref<Record<string, Array<RuleObject>>>;
|
80
87
|
}, {
|
81
88
|
dispose(formID?: string | null): void;
|
82
89
|
addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitCb): void;
|
@@ -1,6 +1,3 @@
|
|
1
1
|
import './KgTable.Setting.less';
|
2
|
-
|
3
|
-
declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
|
4
|
-
[x: string]: any;
|
5
|
-
}>;
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
6
3
|
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ComputedRef } from 'vue';
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
2
2
|
import { IRemoveEventListenerHandler } from '../../consts';
|
3
3
|
import { IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
|
4
4
|
export declare type IUseKgTable = {
|
@@ -11,6 +11,22 @@ export declare type IUseKgTable = {
|
|
11
11
|
selectedRow: ComputedRef<ReturnType<IKgTableStore['getSelectedRow']>>;
|
12
12
|
/** 当前勾选的所有行. */
|
13
13
|
selectedRows: ComputedRef<ReturnType<IKgTableStore['getSelectedRows']>>;
|
14
|
+
/** 是否支持多选. */
|
15
|
+
isMultiSelect: Ref<boolean>;
|
16
|
+
/** 是否自动查询. */
|
17
|
+
isReadAutomatically: Ref<boolean>;
|
18
|
+
/** 是否显示底部左侧. */
|
19
|
+
isShowBottomLeft: Ref<boolean>;
|
20
|
+
/** 是否显示底部右侧. */
|
21
|
+
isShowBottomRight: Ref<boolean>;
|
22
|
+
/** 主键字段. */
|
23
|
+
id: Ref<string>;
|
24
|
+
/** 所有分页选项. */
|
25
|
+
pageSizeOptions: Ref<Array<number>>;
|
26
|
+
/** 当前分页选项. */
|
27
|
+
pageSizeOption: Ref<number>;
|
28
|
+
/** 查询条件的界面标识. */
|
29
|
+
profileFormID: Ref<string>;
|
14
30
|
/** 监听事件: 双击某行. */
|
15
31
|
onRowDoubleClick(cb: IKgTableRowDoubleClickCb): IRemoveEventListenerHandler;
|
16
32
|
/** 监听事件: 查询数据成功. */
|
@@ -26,12 +26,17 @@ export interface IKgTableCellDisplayTypeProperties {
|
|
26
26
|
* 显示为'是'的值.
|
27
27
|
* @default 1
|
28
28
|
*/
|
29
|
-
yValue
|
29
|
+
yValue?: any;
|
30
30
|
/**
|
31
31
|
* 显示为'否'的值.
|
32
32
|
* @default 0
|
33
33
|
*/
|
34
|
-
nValue
|
34
|
+
nValue?: any;
|
35
|
+
/**
|
36
|
+
* 是否将 null/undefined 当成 false.
|
37
|
+
* @default false
|
38
|
+
*/
|
39
|
+
nilAsFalse?: boolean;
|
35
40
|
};
|
36
41
|
ENUM: Array<{
|
37
42
|
/** 变量名称. */
|
@@ -88,3 +93,5 @@ export declare const KG_TABLE_TD_MAX_WIDTH = 1920;
|
|
88
93
|
export declare const KG_TABLE_TD_CHECK_WIDTH = 32;
|
89
94
|
/** 序号列的宽度. */
|
90
95
|
export declare const KG_TABLE_TD_INDEX_WIDTH = 40;
|
96
|
+
/** 在表格内创建时, 空白行的临时主键. */
|
97
|
+
export declare const ID_CREATE = "_ID_CREATE";
|
@@ -25,6 +25,11 @@ export declare type IUseKgVar = {
|
|
25
25
|
isOtherRequesting: ComputedRef<ReturnType<IKgVarStore['isOtherRequesting']>>;
|
26
26
|
/** 所有的 VarButton 列表. */
|
27
27
|
varButtons: ComputedRef<ReturnType<IKgVarStore['getVarButtons']>>;
|
28
|
+
varButtonSearch: ComputedRef<ReturnType<IKgVarStore['getVarButtonSearch']>>;
|
29
|
+
varButtonCreate: ComputedRef<ReturnType<IKgVarStore['getVarButtonCreate']>>;
|
30
|
+
varButtonUpdate: ComputedRef<ReturnType<IKgVarStore['getVarButtonUpdate']>>;
|
31
|
+
varButtonCopy: ComputedRef<ReturnType<IKgVarStore['getVarButtonCopy']>>;
|
32
|
+
varButtonDelete: ComputedRef<ReturnType<IKgVarStore['getVarButtonDelete']>>;
|
28
33
|
/** 所有的 VarProfileMaster 列表. */
|
29
34
|
varProfileMasters: ComputedRef<ReturnType<IKgVarStore['getVarProfileMasters']>>;
|
30
35
|
/** 当前的 VarProfileMaster. */
|
@@ -3,9 +3,17 @@ import './KgYesOrNo.less';
|
|
3
3
|
export declare const getProps: () => {
|
4
4
|
/**
|
5
5
|
* 布尔数据.
|
6
|
-
* @default
|
6
|
+
* @default undefined
|
7
7
|
*/
|
8
8
|
kgValue: {
|
9
|
+
type: PropType<boolean>;
|
10
|
+
default: undefined;
|
11
|
+
};
|
12
|
+
/**
|
13
|
+
* 是否将 null/undefined 当成 false.
|
14
|
+
* @default false
|
15
|
+
*/
|
16
|
+
kgNilAsFalse: {
|
9
17
|
type: PropType<boolean>;
|
10
18
|
default: boolean;
|
11
19
|
};
|
@@ -14,22 +22,39 @@ export declare type IKgYesOrNoProps = Partial<ExtractPropTypes<ReturnType<typeof
|
|
14
22
|
declare const _default: import("vue").DefineComponent<{
|
15
23
|
/**
|
16
24
|
* 布尔数据.
|
17
|
-
* @default
|
25
|
+
* @default undefined
|
18
26
|
*/
|
19
27
|
kgValue: {
|
28
|
+
type: PropType<boolean>;
|
29
|
+
default: undefined;
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* 是否将 null/undefined 当成 false.
|
33
|
+
* @default false
|
34
|
+
*/
|
35
|
+
kgNilAsFalse: {
|
20
36
|
type: PropType<boolean>;
|
21
37
|
default: boolean;
|
22
38
|
};
|
23
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
39
|
+
}, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
24
40
|
/**
|
25
41
|
* 布尔数据.
|
26
|
-
* @default
|
42
|
+
* @default undefined
|
27
43
|
*/
|
28
44
|
kgValue: {
|
45
|
+
type: PropType<boolean>;
|
46
|
+
default: undefined;
|
47
|
+
};
|
48
|
+
/**
|
49
|
+
* 是否将 null/undefined 当成 false.
|
50
|
+
* @default false
|
51
|
+
*/
|
52
|
+
kgNilAsFalse: {
|
29
53
|
type: PropType<boolean>;
|
30
54
|
default: boolean;
|
31
55
|
};
|
32
56
|
}>>, {
|
33
57
|
kgValue: boolean;
|
58
|
+
kgNilAsFalse: boolean;
|
34
59
|
}>;
|
35
60
|
export default _default;
|
@@ -1,8 +1,19 @@
|
|
1
1
|
import { Pinia, StoreDefinition } from 'pinia';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { Router } from 'vue-router';
|
4
|
-
import { IKgLocale } from '../consts';
|
4
|
+
import { IKgLocale, KG_APP } from '../consts';
|
5
5
|
export declare type IKgStateOption = {
|
6
|
+
/** 模块首页. */
|
7
|
+
appIndex?: {
|
8
|
+
/** 默认为 '/wms/data-manager/index'. */
|
9
|
+
[KG_APP.WMS_DATA_MANAGER]?: string;
|
10
|
+
/** 默认为 '/wms/business-manager/index'. */
|
11
|
+
[KG_APP.WMS_BUSINESS_MANAGER]?: string;
|
12
|
+
/** 默认为 '/wcs/index'. */
|
13
|
+
[KG_APP.WCS]?: string;
|
14
|
+
/** 默认为 '/sys/index'. */
|
15
|
+
[KG_APP.SYS]?: string;
|
16
|
+
};
|
6
17
|
/** 仓库选择. */
|
7
18
|
KgWarehouse?: {
|
8
19
|
/** 是否启用. */
|
@@ -15,14 +15,14 @@ export declare function pinia(): Pinia | null;
|
|
15
15
|
export declare type IKgOptions = {
|
16
16
|
app: App;
|
17
17
|
pinia: Pinia;
|
18
|
-
/**
|
18
|
+
/** 当前语言. */
|
19
19
|
locale: ComputedRef<IKgLocale>;
|
20
20
|
/**
|
21
21
|
* import { createI18n } from 'vue-i18n';
|
22
22
|
* ReturnType<typeof createI18n>
|
23
23
|
*/
|
24
24
|
i18n: any;
|
25
|
-
/**
|
25
|
+
/** 权限方法, 用来判断是否具有某个(某些)权限. */
|
26
26
|
pFunction: P;
|
27
27
|
router: Router;
|
28
28
|
/** 配置参数. */
|
@@ -3,16 +3,18 @@ export * from './index.vm';
|
|
3
3
|
export * from './injection-keys.const';
|
4
4
|
/** 模块. */
|
5
5
|
export declare const enum KG_APP {
|
6
|
-
|
7
|
-
|
6
|
+
WMS_DATA_MANAGER = "data-manager",
|
7
|
+
WMS_BUSINESS_MANAGER = "business-manager",
|
8
|
+
WCS = "wcs",
|
8
9
|
SYS = "sys"
|
9
10
|
}
|
10
11
|
/** 所有模块. */
|
11
12
|
export declare const KG_APPS: Array<KG_APP>;
|
12
13
|
/** 模块路径前缀. */
|
13
14
|
export declare const enum KG_APP_PREFIX {
|
14
|
-
|
15
|
-
|
15
|
+
WMS_DATA_MANAGER = "/wms/data-manager",
|
16
|
+
WMS_BUSINESS_MANAGER = "/wms/business-manager",
|
17
|
+
WCS = "/wcs",
|
16
18
|
SYS = "/sys"
|
17
19
|
}
|
18
20
|
/** 所有模块路径前缀. */
|
@@ -55,8 +57,10 @@ export declare const enum KG_FORM_ITEM_TYPE {
|
|
55
57
|
export declare const enum KG_FORM_CONTEXT {
|
56
58
|
/** 位于查询条件. */
|
57
59
|
SEARCH = "SEARCH",
|
58
|
-
/**
|
59
|
-
SUBMIT = "SUBMIT"
|
60
|
+
/** 位于表单. */
|
61
|
+
SUBMIT = "SUBMIT",
|
62
|
+
/** 位于表格. */
|
63
|
+
TABLE = "TABLE"
|
60
64
|
}
|
61
65
|
/**
|
62
66
|
* 表格单元格的显示类型.
|
@@ -74,7 +78,7 @@ export declare const enum KG_TABLE_CELL_DISPLAY_TYPE {
|
|
74
78
|
FILE_SIZE = "FILE_SIZE",
|
75
79
|
/** 显示为超链接, 点击打开更新弹窗. */
|
76
80
|
UPDATE_LINK = "UPDATE_LINK",
|
77
|
-
/** 显示为超链接,
|
81
|
+
/** 显示为超链接, 点击跳转到其他路由. */
|
78
82
|
ROUTE_LINK = "ROUTE_LINK"
|
79
83
|
}
|
80
84
|
/** 按钮类型. */
|
@@ -119,7 +123,9 @@ export declare const enum KG_VAR_SUBMIT__DISPLAY_TYPE {
|
|
119
123
|
/** 弹窗. */
|
120
124
|
MODAL = "MODAL",
|
121
125
|
/** 抽屉. */
|
122
|
-
DRAWER = "DRAWER"
|
126
|
+
DRAWER = "DRAWER",
|
127
|
+
/** 在表格内. */
|
128
|
+
TABLE = "TABLE"
|
123
129
|
}
|
124
130
|
/** 表单布局方式. */
|
125
131
|
export declare const enum KG_VAR_SUBMIT__LAYOUT {
|
@@ -9,11 +9,11 @@ export declare const formProps: () => {
|
|
9
9
|
layout: PropType<"horizontal" | "inline" | "vertical">;
|
10
10
|
labelCol: {
|
11
11
|
type: PropType<Partial<ExtractPropTypes<{
|
12
|
-
span: (
|
13
|
-
order: (
|
14
|
-
offset: (
|
15
|
-
push: (
|
16
|
-
pull: (
|
12
|
+
span: (NumberConstructor | StringConstructor)[];
|
13
|
+
order: (NumberConstructor | StringConstructor)[];
|
14
|
+
offset: (NumberConstructor | StringConstructor)[];
|
15
|
+
push: (NumberConstructor | StringConstructor)[];
|
16
|
+
pull: (NumberConstructor | StringConstructor)[];
|
17
17
|
xs: {
|
18
18
|
type: PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
19
19
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -43,16 +43,16 @@ export declare const formProps: () => {
|
|
43
43
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
44
44
|
};
|
45
45
|
prefixCls: StringConstructor;
|
46
|
-
flex: (
|
46
|
+
flex: (NumberConstructor | StringConstructor)[];
|
47
47
|
}>> & HTMLAttributes>;
|
48
48
|
};
|
49
49
|
wrapperCol: {
|
50
50
|
type: PropType<Partial<ExtractPropTypes<{
|
51
|
-
span: (
|
52
|
-
order: (
|
53
|
-
offset: (
|
54
|
-
push: (
|
55
|
-
pull: (
|
51
|
+
span: (NumberConstructor | StringConstructor)[];
|
52
|
+
order: (NumberConstructor | StringConstructor)[];
|
53
|
+
offset: (NumberConstructor | StringConstructor)[];
|
54
|
+
push: (NumberConstructor | StringConstructor)[];
|
55
|
+
pull: (NumberConstructor | StringConstructor)[];
|
56
56
|
xs: {
|
57
57
|
type: PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
58
58
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
@@ -82,7 +82,7 @@ export declare const formProps: () => {
|
|
82
82
|
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
83
83
|
};
|
84
84
|
prefixCls: StringConstructor;
|
85
|
-
flex: (
|
85
|
+
flex: (NumberConstructor | StringConstructor)[];
|
86
86
|
}>> & HTMLAttributes>;
|
87
87
|
};
|
88
88
|
colon: {
|
@@ -166,7 +166,7 @@ export declare const modalProps: () => {
|
|
166
166
|
type: BooleanConstructor;
|
167
167
|
default: undefined;
|
168
168
|
};
|
169
|
-
width: (
|
169
|
+
width: (NumberConstructor | StringConstructor)[];
|
170
170
|
footer: PropType<any>;
|
171
171
|
okText: PropType<any>;
|
172
172
|
okType: PropType<LegacyButtonType>;
|
@@ -24,7 +24,7 @@ export declare class KgUtil {
|
|
24
24
|
*/
|
25
25
|
static downloadFile(data: string | BlobPart, fileName: string, contentType?: string): void;
|
26
26
|
/**
|
27
|
-
*
|
27
|
+
* 处理请求参数.
|
28
28
|
* 1. 填充通用参数的值
|
29
29
|
* a. 仓库: '{WAREHOUSE}'
|
30
30
|
* @param params 请求参数.
|
@@ -33,12 +33,12 @@ export declare class KgUtil {
|
|
33
33
|
*/
|
34
34
|
static parseParams(params?: Record<string, any> | null, formID?: string, $dayjs?: typeof dayjs): any;
|
35
35
|
/**
|
36
|
-
*
|
36
|
+
* 处理请求参数: 解析字符串类型的参数值.
|
37
37
|
* @param value 参数的原始值.
|
38
38
|
*/
|
39
39
|
private static parseParamFromString;
|
40
40
|
/**
|
41
|
-
*
|
41
|
+
* 处理请求参数: 解析 DayJS 类型的参数值.
|
42
42
|
* @param key 属性名.
|
43
43
|
* @param value 参数的原始值.
|
44
44
|
* @param formID 界面标识.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Menu } from '../consts';
|
1
|
+
import { KG_APP, Menu } from '../consts';
|
2
2
|
export declare class KgRouteUtil {
|
3
3
|
/**
|
4
4
|
* 给所有模块都添加在线表单的路由.
|
@@ -18,4 +18,20 @@ export declare class KgRouteUtil {
|
|
18
18
|
* @param titleKey 标题的属性名, 即要将哪个属性作为菜单的标题.
|
19
19
|
*/
|
20
20
|
static translateMenus(menus?: Array<Menu> | null, titleKey?: string): Array<Menu>;
|
21
|
+
/**
|
22
|
+
* 判断某个路径是否属于某个模块.
|
23
|
+
* @param path 路径.
|
24
|
+
* @param app 模块.
|
25
|
+
*/
|
26
|
+
static isPathInApp(path: string | undefined | null, app: KG_APP | null): boolean;
|
27
|
+
/**
|
28
|
+
* 根据地址获取模块.
|
29
|
+
* @param path 地址.
|
30
|
+
*/
|
31
|
+
static getAppByPath(path: string): KG_APP;
|
32
|
+
/**
|
33
|
+
* 根据模块获取该模块的首页地址.
|
34
|
+
* @param app 模块.
|
35
|
+
*/
|
36
|
+
static getAppIndexPath(app: KG_APP): string;
|
21
37
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.6.1-beta.0",
|
4
4
|
"scripts": {
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "rimraf dist && vue-tsc && vite build --mode development",
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"vue-router": "4.1.6"
|
47
47
|
},
|
48
48
|
"devDependencies": {
|
49
|
-
"@kengic/pont": "1.2.10-beta.
|
49
|
+
"@kengic/pont": "1.2.10-beta.42",
|
50
50
|
"@types/lodash-es": "~4.17.7",
|
51
51
|
"@types/node": "~18.14.6",
|
52
52
|
"@types/semver": "~7.3.13",
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { KG_APP } from '../consts';
|
2
|
-
/**
|
3
|
-
* 判断某个路径是否属于某个模块.
|
4
|
-
* @param path 路径.
|
5
|
-
* @param app 模块.
|
6
|
-
*/
|
7
|
-
export declare function isPathInApp(path: string | undefined | null, app: KG_APP): boolean;
|
8
|
-
/**
|
9
|
-
* 根据地址获取模块.
|
10
|
-
* @param path 地址.
|
11
|
-
*/
|
12
|
-
export declare function getAppByPath(path: string): KG_APP;
|
13
|
-
/**
|
14
|
-
* 根据模块获取首页地址.
|
15
|
-
* @param app 模块.
|
16
|
-
*/
|
17
|
-
export declare function getAppIndexPath(app: KG_APP): string;
|