@kengic/vue 0.13.10 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +5401 -5369
- package/dist/src/apis/WMS/Controllers/WhController/ListVO.d.ts +2 -4
- package/dist/src/apis/WMS/models.d.ts +4 -8
- package/dist/src/components/KgAppSelect/index.store.d.ts +9 -1
- package/dist/src/components/KgForm/KgForm.d.ts +142 -5
- package/dist/src/components/KgForm/index.d.ts +1 -1
- package/dist/src/components/KgForm/index.vm.d.ts +1 -137
- package/dist/src/config/index.store.d.ts +58 -2
- package/dist/src/config/setup.d.ts +4 -2
- package/dist/src/utils/index.d.ts +5 -4
- package/dist/src/utils/kg-auth.util.d.ts +14 -0
- package/dist/src/utils/{route.util.d.ts → kg-route.util.d.ts} +1 -1
- package/package.json +1 -1
- /package/dist/src/utils/{dom.util.d.ts → kg-dom.util.d.ts} +0 -0
- /package/dist/src/utils/{logger.util.d.ts → kg-logger.util.d.ts} +0 -0
- /package/dist/src/utils/{var.util.d.ts → kg-var.util.d.ts} +0 -0
@@ -2,14 +2,12 @@ import { IRequestConfig, IRequestOptions } from '../../../../services';
|
|
2
2
|
import * as DEF from '../../../def';
|
3
3
|
/** 请求参数. */
|
4
4
|
export declare class ListVOQuery {
|
5
|
-
/**
|
5
|
+
/** 是否活动 */
|
6
6
|
activeFlg?: number | null;
|
7
7
|
/** 地址编号 */
|
8
8
|
adrId?: string | null;
|
9
|
-
/**
|
9
|
+
/** adrnam */
|
10
10
|
adrnam?: string | null;
|
11
|
-
/** 公司代码 */
|
12
|
-
comCod?: string | null;
|
13
11
|
/** 默认仓库 */
|
14
12
|
defWhFlg?: number | null;
|
15
13
|
/** 主键. */
|
@@ -101,8 +101,6 @@ export declare class VarButton {
|
|
101
101
|
modal_props?: string | null;
|
102
102
|
/** 权限码. */
|
103
103
|
permission_code?: string | null;
|
104
|
-
/** 权限策略. */
|
105
|
-
permission_type?: number | null;
|
106
104
|
/** 是否使用主要按钮样式(PrimaryFlag). */
|
107
105
|
primary_flg?: number | null;
|
108
106
|
/** 重新加载数据之后, 是否重新勾选之前勾选的行. */
|
@@ -391,6 +389,8 @@ export declare class VarProfileDetail {
|
|
391
389
|
dft_val?: string | null;
|
392
390
|
/** 是否启用(EnableFlag). */
|
393
391
|
ena_flg?: number | null;
|
392
|
+
/** 是否不拼接到 WHERE SQL 中. */
|
393
|
+
exclude_from_where_sql_flag?: number | null;
|
394
394
|
/** 界面标识(FormID). */
|
395
395
|
frm_id?: string | null;
|
396
396
|
/** 分组(GroupName). */
|
@@ -405,8 +405,6 @@ export declare class VarProfileDetail {
|
|
405
405
|
rqr_flg?: number | null;
|
406
406
|
/** 显示顺序(SortSequence). */
|
407
407
|
srtseq?: number | null;
|
408
|
-
/** 表的别名. */
|
409
|
-
table_alias?: string | null;
|
410
408
|
/** 高级查询时是否将字段转换为 underscore 命名方式. */
|
411
409
|
use_underscore_when_dynamic_query_flag?: number | null;
|
412
410
|
/** 变量名称(VariableName). */
|
@@ -671,14 +669,12 @@ export declare class VarVariableInput {
|
|
671
669
|
}
|
672
670
|
/** 仓库(Warehouse). */
|
673
671
|
export declare class WhDTO {
|
674
|
-
/**
|
672
|
+
/** 是否活动 */
|
675
673
|
activeFlg?: number | null;
|
676
674
|
/** 地址编号 */
|
677
675
|
adrId?: string | null;
|
678
|
-
/**
|
676
|
+
/** adrnam */
|
679
677
|
adrnam?: string | null;
|
680
|
-
/** 公司代码 */
|
681
|
-
comCod?: string | null;
|
682
678
|
/** 默认仓库 */
|
683
679
|
defWhFlg?: number | null;
|
684
680
|
/** 主键. */
|
@@ -40,11 +40,19 @@ export declare type IKgAppSelectStoreDefinition = StoreDefinition<'KgAppSelect',
|
|
40
40
|
gotoApp(app: KG_APP): Promise<void>;
|
41
41
|
/**
|
42
42
|
* 进入某个地址.
|
43
|
-
* 如果该地址不属于当前模块,
|
43
|
+
* 如果该地址不属于当前模块, 则先切换到对应的模块, 再进入该地址.
|
44
44
|
* @param path 要进入的地址.
|
45
45
|
*/
|
46
46
|
gotoPath(path: string): Promise<void>;
|
47
|
+
/**
|
48
|
+
* 判断某个菜单是否属于当前模块.
|
49
|
+
* @param menu 菜单.
|
50
|
+
*/
|
47
51
|
isMenuInCurrentApp(menu: Menu): boolean;
|
52
|
+
/**
|
53
|
+
* 初始化当前模块.
|
54
|
+
* 比如刷新页面时, 需要根据当前页面地址设置当前模块.
|
55
|
+
*/
|
48
56
|
init(): void;
|
49
57
|
}>;
|
50
58
|
export declare type IKgAppSelectStore = ReturnType<IKgAppSelectStoreDefinition>;
|
@@ -1,8 +1,145 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
1
2
|
import './KgForm.less';
|
3
|
+
export declare const getProps: () => {
|
4
|
+
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
5
|
+
labelCol: {
|
6
|
+
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
7
|
+
span: (StringConstructor | NumberConstructor)[];
|
8
|
+
order: (StringConstructor | NumberConstructor)[];
|
9
|
+
offset: (StringConstructor | NumberConstructor)[];
|
10
|
+
push: (StringConstructor | NumberConstructor)[];
|
11
|
+
pull: (StringConstructor | NumberConstructor)[];
|
12
|
+
xs: {
|
13
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
14
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
15
|
+
};
|
16
|
+
sm: {
|
17
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
18
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
19
|
+
};
|
20
|
+
md: {
|
21
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
22
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
23
|
+
};
|
24
|
+
lg: {
|
25
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
26
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
27
|
+
};
|
28
|
+
xl: {
|
29
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
30
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
31
|
+
};
|
32
|
+
xxl: {
|
33
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
34
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
35
|
+
};
|
36
|
+
xxxl: {
|
37
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
38
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
39
|
+
};
|
40
|
+
prefixCls: StringConstructor;
|
41
|
+
flex: (StringConstructor | NumberConstructor)[];
|
42
|
+
}>> & import("vue").HTMLAttributes>;
|
43
|
+
};
|
44
|
+
wrapperCol: {
|
45
|
+
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
46
|
+
span: (StringConstructor | NumberConstructor)[];
|
47
|
+
order: (StringConstructor | NumberConstructor)[];
|
48
|
+
offset: (StringConstructor | NumberConstructor)[];
|
49
|
+
push: (StringConstructor | NumberConstructor)[];
|
50
|
+
pull: (StringConstructor | NumberConstructor)[];
|
51
|
+
xs: {
|
52
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
53
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
54
|
+
};
|
55
|
+
sm: {
|
56
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
57
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
58
|
+
};
|
59
|
+
md: {
|
60
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
61
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
62
|
+
};
|
63
|
+
lg: {
|
64
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
65
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
66
|
+
};
|
67
|
+
xl: {
|
68
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
69
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
70
|
+
};
|
71
|
+
xxl: {
|
72
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
73
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
74
|
+
};
|
75
|
+
xxxl: {
|
76
|
+
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
77
|
+
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
78
|
+
};
|
79
|
+
prefixCls: StringConstructor;
|
80
|
+
flex: (StringConstructor | NumberConstructor)[];
|
81
|
+
}>> & import("vue").HTMLAttributes>;
|
82
|
+
};
|
83
|
+
colon: {
|
84
|
+
type: BooleanConstructor;
|
85
|
+
default: undefined;
|
86
|
+
};
|
87
|
+
labelAlign: import("vue").PropType<"left" | "right">;
|
88
|
+
labelWrap: {
|
89
|
+
type: BooleanConstructor;
|
90
|
+
default: undefined;
|
91
|
+
};
|
92
|
+
prefixCls: StringConstructor;
|
93
|
+
requiredMark: {
|
94
|
+
type: import("vue").PropType<"" | import("ant-design-vue/es/form/Form").RequiredMark>;
|
95
|
+
default: undefined;
|
96
|
+
};
|
97
|
+
model: import("vue").PropType<Object>;
|
98
|
+
rules: {
|
99
|
+
type: import("vue").PropType<{
|
100
|
+
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
101
|
+
}>;
|
102
|
+
};
|
103
|
+
validateMessages: {
|
104
|
+
type: import("vue").PropType<import("ant-design-vue/es/form/interface").ValidateMessages>;
|
105
|
+
default: undefined;
|
106
|
+
};
|
107
|
+
validateOnRuleChange: {
|
108
|
+
type: BooleanConstructor;
|
109
|
+
default: undefined;
|
110
|
+
};
|
111
|
+
scrollToFirstError: {
|
112
|
+
type: import("vue").PropType<any>;
|
113
|
+
};
|
114
|
+
onSubmit: import("vue").PropType<(e: Event) => void>;
|
115
|
+
name: StringConstructor;
|
116
|
+
validateTrigger: {
|
117
|
+
type: import("vue").PropType<string | string[]>;
|
118
|
+
};
|
119
|
+
size: {
|
120
|
+
type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
|
121
|
+
};
|
122
|
+
onValuesChange: {
|
123
|
+
type: import("vue").PropType<((changedValues: any, values: any) => void) | undefined>;
|
124
|
+
};
|
125
|
+
onFieldsChange: {
|
126
|
+
type: import("vue").PropType<((changedFields: import("ant-design-vue/es/form/interface").FieldData[], allFields: import("ant-design-vue/es/form/interface").FieldData[]) => void) | undefined>;
|
127
|
+
};
|
128
|
+
onFinish: {
|
129
|
+
type: import("vue").PropType<((values: any) => void) | undefined>;
|
130
|
+
};
|
131
|
+
onFinishFailed: {
|
132
|
+
type: import("vue").PropType<((errorInfo: import("ant-design-vue/es/form/interface").ValidateErrorEntity<any>) => void) | undefined>;
|
133
|
+
};
|
134
|
+
onValidate: {
|
135
|
+
type: import("vue").PropType<((name: string | number | string[] | number[], status: boolean, errors: string[] | null) => void) | undefined>;
|
136
|
+
};
|
137
|
+
};
|
138
|
+
export declare type IKgFormProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
2
139
|
declare const _default: import("vue").DefineComponent<{
|
3
140
|
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
4
141
|
labelCol: {
|
5
|
-
type: import("vue").PropType<Partial<
|
142
|
+
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
6
143
|
span: (StringConstructor | NumberConstructor)[];
|
7
144
|
order: (StringConstructor | NumberConstructor)[];
|
8
145
|
offset: (StringConstructor | NumberConstructor)[];
|
@@ -41,7 +178,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
41
178
|
}>> & import("vue").HTMLAttributes>;
|
42
179
|
};
|
43
180
|
wrapperCol: {
|
44
|
-
type: import("vue").PropType<Partial<
|
181
|
+
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
45
182
|
span: (StringConstructor | NumberConstructor)[];
|
46
183
|
order: (StringConstructor | NumberConstructor)[];
|
47
184
|
offset: (StringConstructor | NumberConstructor)[];
|
@@ -133,10 +270,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
133
270
|
onValidate: {
|
134
271
|
type: import("vue").PropType<((name: string | number | string[] | number[], status: boolean, errors: string[] | null) => void) | undefined>;
|
135
272
|
};
|
136
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<
|
273
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
137
274
|
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
138
275
|
labelCol: {
|
139
|
-
type: import("vue").PropType<Partial<
|
276
|
+
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
140
277
|
span: (StringConstructor | NumberConstructor)[];
|
141
278
|
order: (StringConstructor | NumberConstructor)[];
|
142
279
|
offset: (StringConstructor | NumberConstructor)[];
|
@@ -175,7 +312,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
175
312
|
}>> & import("vue").HTMLAttributes>;
|
176
313
|
};
|
177
314
|
wrapperCol: {
|
178
|
-
type: import("vue").PropType<Partial<
|
315
|
+
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
179
316
|
span: (StringConstructor | NumberConstructor)[];
|
180
317
|
order: (StringConstructor | NumberConstructor)[];
|
181
318
|
offset: (StringConstructor | NumberConstructor)[];
|
@@ -599,6 +599,6 @@ declare const _default: {
|
|
599
599
|
Item: typeof KgFormItem;
|
600
600
|
};
|
601
601
|
export default _default;
|
602
|
-
export { type IKgFormProps } from './
|
602
|
+
export { type IKgFormProps } from './KgForm';
|
603
603
|
export * from './index.hooks';
|
604
604
|
export * from './index.store';
|
@@ -1,141 +1,5 @@
|
|
1
|
-
import { ComputedRef, ExtractPropTypes, InjectionKey, Ref } from 'vue';
|
2
1
|
import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
3
|
-
|
4
|
-
layout: import("vue").PropType<"horizontal" | "inline" | "vertical">;
|
5
|
-
labelCol: {
|
6
|
-
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
7
|
-
span: (StringConstructor | NumberConstructor)[];
|
8
|
-
order: (StringConstructor | NumberConstructor)[];
|
9
|
-
offset: (StringConstructor | NumberConstructor)[];
|
10
|
-
push: (StringConstructor | NumberConstructor)[];
|
11
|
-
pull: (StringConstructor | NumberConstructor)[];
|
12
|
-
xs: {
|
13
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
14
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
15
|
-
};
|
16
|
-
sm: {
|
17
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
18
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
19
|
-
};
|
20
|
-
md: {
|
21
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
22
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
23
|
-
};
|
24
|
-
lg: {
|
25
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
26
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
27
|
-
};
|
28
|
-
xl: {
|
29
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
30
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
31
|
-
};
|
32
|
-
xxl: {
|
33
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
34
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
35
|
-
};
|
36
|
-
xxxl: {
|
37
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
38
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
39
|
-
};
|
40
|
-
prefixCls: StringConstructor;
|
41
|
-
flex: (StringConstructor | NumberConstructor)[];
|
42
|
-
}>> & import("vue").HTMLAttributes>;
|
43
|
-
};
|
44
|
-
wrapperCol: {
|
45
|
-
type: import("vue").PropType<Partial<ExtractPropTypes<{
|
46
|
-
span: (StringConstructor | NumberConstructor)[];
|
47
|
-
order: (StringConstructor | NumberConstructor)[];
|
48
|
-
offset: (StringConstructor | NumberConstructor)[];
|
49
|
-
push: (StringConstructor | NumberConstructor)[];
|
50
|
-
pull: (StringConstructor | NumberConstructor)[];
|
51
|
-
xs: {
|
52
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
53
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
54
|
-
};
|
55
|
-
sm: {
|
56
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
57
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
58
|
-
};
|
59
|
-
md: {
|
60
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
61
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
62
|
-
};
|
63
|
-
lg: {
|
64
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
65
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
66
|
-
};
|
67
|
-
xl: {
|
68
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
69
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
70
|
-
};
|
71
|
-
xxl: {
|
72
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
73
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
74
|
-
};
|
75
|
-
xxxl: {
|
76
|
-
type: import("vue").PropType<string | number | import("ant-design-vue/lib/grid").ColSize>;
|
77
|
-
default: string | number | import("ant-design-vue/lib/grid").ColSize;
|
78
|
-
};
|
79
|
-
prefixCls: StringConstructor;
|
80
|
-
flex: (StringConstructor | NumberConstructor)[];
|
81
|
-
}>> & import("vue").HTMLAttributes>;
|
82
|
-
};
|
83
|
-
colon: {
|
84
|
-
type: BooleanConstructor;
|
85
|
-
default: undefined;
|
86
|
-
};
|
87
|
-
labelAlign: import("vue").PropType<"left" | "right">;
|
88
|
-
labelWrap: {
|
89
|
-
type: BooleanConstructor;
|
90
|
-
default: undefined;
|
91
|
-
};
|
92
|
-
prefixCls: StringConstructor;
|
93
|
-
requiredMark: {
|
94
|
-
type: import("vue").PropType<"" | import("ant-design-vue/es/form/Form").RequiredMark>;
|
95
|
-
default: undefined;
|
96
|
-
};
|
97
|
-
model: import("vue").PropType<Object>;
|
98
|
-
rules: {
|
99
|
-
type: import("vue").PropType<{
|
100
|
-
[k: string]: import("ant-design-vue/es/form").RuleObject | import("ant-design-vue/es/form").RuleObject[];
|
101
|
-
}>;
|
102
|
-
};
|
103
|
-
validateMessages: {
|
104
|
-
type: import("vue").PropType<import("ant-design-vue/es/form/interface").ValidateMessages>;
|
105
|
-
default: undefined;
|
106
|
-
};
|
107
|
-
validateOnRuleChange: {
|
108
|
-
type: BooleanConstructor;
|
109
|
-
default: undefined;
|
110
|
-
};
|
111
|
-
scrollToFirstError: {
|
112
|
-
type: import("vue").PropType<any>;
|
113
|
-
};
|
114
|
-
onSubmit: import("vue").PropType<(e: Event) => void>;
|
115
|
-
name: StringConstructor;
|
116
|
-
validateTrigger: {
|
117
|
-
type: import("vue").PropType<string | string[]>;
|
118
|
-
};
|
119
|
-
size: {
|
120
|
-
type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
|
121
|
-
};
|
122
|
-
onValuesChange: {
|
123
|
-
type: import("vue").PropType<((changedValues: any, values: any) => void) | undefined>;
|
124
|
-
};
|
125
|
-
onFieldsChange: {
|
126
|
-
type: import("vue").PropType<((changedFields: import("ant-design-vue/es/form/interface").FieldData[], allFields: import("ant-design-vue/es/form/interface").FieldData[]) => void) | undefined>;
|
127
|
-
};
|
128
|
-
onFinish: {
|
129
|
-
type: import("vue").PropType<((values: any) => void) | undefined>;
|
130
|
-
};
|
131
|
-
onFinishFailed: {
|
132
|
-
type: import("vue").PropType<((errorInfo: import("ant-design-vue/es/form/interface").ValidateErrorEntity<any>) => void) | undefined>;
|
133
|
-
};
|
134
|
-
onValidate: {
|
135
|
-
type: import("vue").PropType<((name: string | number | string[] | number[], status: boolean, errors: string[] | null) => void) | undefined>;
|
136
|
-
};
|
137
|
-
};
|
138
|
-
export declare type IKgFormProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
2
|
+
import { ComputedRef, InjectionKey, Ref } from 'vue';
|
139
3
|
/**
|
140
4
|
* 依赖注入表单数据对象.
|
141
5
|
* 在表单组件(KgForm)的任何下级组件中, 都可以通过注入获取表单数据对象.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Pinia, StoreDefinition } from 'pinia';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { Router } from 'vue-router';
|
4
|
-
import { IKgLocale, KG_APP } from '../consts';
|
4
|
+
import { IKgLocale, KG_APP, Menu } from '../consts';
|
5
5
|
export declare type IKgStateOption = {
|
6
6
|
/** 模块首页. */
|
7
7
|
appIndex?: {
|
@@ -79,6 +79,48 @@ export declare type T = {
|
|
79
79
|
export declare type P = {
|
80
80
|
(permissionCode?: string | Array<string> | null): boolean;
|
81
81
|
};
|
82
|
+
export interface RoleInfo {
|
83
|
+
roleName: string;
|
84
|
+
value: string;
|
85
|
+
}
|
86
|
+
export interface UserInfo {
|
87
|
+
id: string | number;
|
88
|
+
userId: string | number;
|
89
|
+
username: string;
|
90
|
+
realname: string;
|
91
|
+
avatar: string;
|
92
|
+
desc?: string;
|
93
|
+
homePath?: string;
|
94
|
+
tenantid?: string | number;
|
95
|
+
roles: RoleInfo[];
|
96
|
+
orgCode?: string;
|
97
|
+
}
|
98
|
+
interface UserState {
|
99
|
+
userInfo: UserInfo | null;
|
100
|
+
token?: string;
|
101
|
+
roleList: any[];
|
102
|
+
sessionTimeout?: boolean;
|
103
|
+
}
|
104
|
+
interface AuthItem {
|
105
|
+
/** 权限编码. */
|
106
|
+
action: string;
|
107
|
+
/** 权限策略. 1:显示, 2:禁用. */
|
108
|
+
type: string | number;
|
109
|
+
/** 权限状态. 0:无效, 1:有效. */
|
110
|
+
status: string | number;
|
111
|
+
/** 权限名称. */
|
112
|
+
describe?: string;
|
113
|
+
}
|
114
|
+
interface PermissionState {
|
115
|
+
/** 当前登录用户所拥有的权限编码列表. */
|
116
|
+
permCodeList: string[] | number[];
|
117
|
+
/** 菜单列表. */
|
118
|
+
backMenuList: Menu[];
|
119
|
+
/** 当前登录用户所拥有的权限配置. */
|
120
|
+
authList: AuthItem[];
|
121
|
+
/** 全部权限配置. */
|
122
|
+
allAuthList: AuthItem[];
|
123
|
+
}
|
82
124
|
export interface IKgState {
|
83
125
|
/** 语言. */
|
84
126
|
locale: ComputedRef<IKgLocale> | null;
|
@@ -87,7 +129,10 @@ export interface IKgState {
|
|
87
129
|
/** 检查权限的方法. */
|
88
130
|
pFunction: P | null;
|
89
131
|
router: Router | null;
|
132
|
+
/** 用户数据. */
|
90
133
|
useUserStore: StoreDefinition | null;
|
134
|
+
/** 权限数据. */
|
135
|
+
usePermissionStore: StoreDefinition | null;
|
91
136
|
/** 配置参数. */
|
92
137
|
option: IKgStateOption;
|
93
138
|
}
|
@@ -95,13 +140,23 @@ export declare type IKgStoreDefinition = StoreDefinition<'Kg', IKgState, {
|
|
95
140
|
/** 获取配置参数. */
|
96
141
|
getLocale: ComputedRef<IKgLocale> | null;
|
97
142
|
getRouter: Router | null;
|
98
|
-
getUseUserStore(): StoreDefinition<
|
143
|
+
getUseUserStore(): StoreDefinition<string, UserState, {
|
144
|
+
getToken(): string;
|
145
|
+
getRoleList(): any[];
|
146
|
+
getSessionTimeout(): boolean;
|
147
|
+
getUserInfo(): UserInfo;
|
148
|
+
}, {}> | null;
|
149
|
+
getUsePermissionStore(): StoreDefinition<string, PermissionState, {
|
150
|
+
getPermCodeList(): string[] | number[];
|
151
|
+
getBackMenuList(): Menu[];
|
152
|
+
}> | null;
|
99
153
|
/** 获取配置参数. */
|
100
154
|
getOption: IKgStateOption;
|
101
155
|
}, {
|
102
156
|
setLocale(locale: ComputedRef<IKgLocale> | null): void;
|
103
157
|
setRouter(router: Router): void;
|
104
158
|
setUseUserStore(useUserStore: StoreDefinition<any, any, any, any>): void;
|
159
|
+
setUsePermissionStore(usePermissionStore: StoreDefinition<any, any, any, any>): void;
|
105
160
|
setT(i18n: any): void;
|
106
161
|
setP(fn: P): void;
|
107
162
|
setOption(option: IKgStateOption): void;
|
@@ -112,3 +167,4 @@ export declare type IKgStoreDefinition = StoreDefinition<'Kg', IKgState, {
|
|
112
167
|
}>;
|
113
168
|
export declare type IKgStore = ReturnType<IKgStoreDefinition>;
|
114
169
|
export declare const useKgStore: (_pinia?: Pinia) => IKgStoreDefinition;
|
170
|
+
export {};
|
@@ -21,11 +21,13 @@ export declare type IKgOptions = {
|
|
21
21
|
* ReturnType<typeof createI18n>
|
22
22
|
*/
|
23
23
|
i18n: any;
|
24
|
-
/** 权限方法, 用来判断是否具有某个(某些)权限. */
|
25
|
-
pFunction: P;
|
26
24
|
router: Router;
|
27
25
|
/** 状态数据: 用户. */
|
28
26
|
useUserStore: StoreDefinition<any, any, any, any>;
|
27
|
+
/** 状态数据: 权限. */
|
28
|
+
usePermissionStore: StoreDefinition<any, any, any, any>;
|
29
|
+
/** 权限方法, 用来判断是否具有某个(某些)权限. */
|
30
|
+
pFunction: P;
|
29
31
|
/** 配置参数. */
|
30
32
|
option?: IKgStateOption;
|
31
33
|
};
|
@@ -1,5 +1,6 @@
|
|
1
|
-
export * from './
|
1
|
+
export * from './kg-auth.util';
|
2
|
+
export * from './kg-dom.util';
|
2
3
|
export * from './kg.util';
|
3
|
-
export * from './logger.util';
|
4
|
-
export * from './route.util';
|
5
|
-
export * from './var.util';
|
4
|
+
export * from './kg-logger.util';
|
5
|
+
export * from './kg-route.util';
|
6
|
+
export * from './kg-var.util';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { KG_APP } from '../consts';
|
2
|
+
export declare class KgAuthUtil {
|
3
|
+
/**
|
4
|
+
* 判断某个「模块」是否具有访问权限.
|
5
|
+
* @param app 模块
|
6
|
+
*/
|
7
|
+
static isAppAuthenticated(app: KG_APP | null | undefined): boolean;
|
8
|
+
/**
|
9
|
+
* 根据「权限编码」获取「权限策略」.
|
10
|
+
* @param permissionCode 权限编码.
|
11
|
+
* @return 权限策略.
|
12
|
+
*/
|
13
|
+
static getPermissionType(permissionCode: string | null | undefined): number | null;
|
14
|
+
}
|
package/package.json
CHANGED
File without changes
|
File without changes
|
File without changes
|