@kengic/vue 0.1.1-beta.3 → 0.1.1-beta.7
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 +1406 -1191
- package/dist/src/apis/WMS/Controllers/VarCatalogController/ExportXls.d.ts +1 -1
- package/dist/src/apis/WMS/Controllers/VarCatalogController/List.d.ts +1 -1
- package/dist/src/apis/WMS/models.d.ts +31 -1
- package/dist/src/components/KgControl/KgControl.Date.d.ts +105 -0
- package/dist/src/components/KgControl/KgControl.Input.d.ts +49 -14
- package/dist/src/components/KgControl/KgControl.Select.d.ts +53 -15
- package/dist/src/components/KgControl/KgControl.Switch.d.ts +104 -0
- package/dist/src/components/KgControl/KgControl.d.ts +50 -14
- package/dist/src/components/KgControl/addon/KgControl.Addon.Lookup.Modal.d.ts +17 -0
- package/dist/src/components/KgControl/addon/KgControl.Addon.Lookup.d.ts +3 -0
- package/dist/src/components/KgControl/index.d.ts +3 -189
- package/dist/src/components/KgControl/index.vm.d.ts +42 -11
- package/dist/src/components/KgSearch/KgSearch.d.ts +2 -8
- package/dist/src/components/KgSearch/index.vm.d.ts +1 -4
- package/dist/src/components/KgVar/hooks/index.d.ts +6 -20
- package/dist/src/components/KgVar/store/index.d.ts +3 -1
- package/dist/src/components/KgVar/store/index.data.d.ts +3 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/config/index.d.ts +1 -0
- package/dist/src/config/setup.d.ts +43 -0
- package/dist/src/consts/i18n/en.d.ts +1 -0
- package/dist/src/consts/i18n/index.d.ts +2 -1
- package/dist/src/consts/i18n/zh_CN.d.ts +1 -0
- package/dist/src/consts/index.d.ts +14 -7
- package/dist/src/consts/injection-keys.const.d.ts +3 -6
- package/dist/src/index.d.ts +1 -0
- package/package.json +2 -1
- package/dist/src/consts/i18n/t.d.ts +0 -20
|
@@ -1,190 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import KgControlInput from './KgControl.Input';
|
|
1
|
+
import KgControl from './KgControl';
|
|
3
2
|
import { type KgControlProps } from './index.vm';
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
new (...args: any[]): {
|
|
7
|
-
$: import("vue").ComponentInternalInstance;
|
|
8
|
-
$data: {};
|
|
9
|
-
$props: Partial<{
|
|
10
|
-
kgGutter: number;
|
|
11
|
-
kgSpan: 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
12
|
-
kgValidateInfo: import("ant-design-vue/lib/form/useForm").ValidateInfo;
|
|
13
|
-
kgActionType: import("axios").Method;
|
|
14
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
kgVarName: {
|
|
16
|
-
type: import("vue").PropType<string>;
|
|
17
|
-
required: boolean;
|
|
18
|
-
};
|
|
19
|
-
kgGutter: {
|
|
20
|
-
type: import("vue").PropType<number>;
|
|
21
|
-
default: number;
|
|
22
|
-
};
|
|
23
|
-
kgSpan: {
|
|
24
|
-
type: import("vue").PropType<1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24>;
|
|
25
|
-
default: number;
|
|
26
|
-
};
|
|
27
|
-
kgType: import("vue").PropType<import("../..").KG_CONTROL_TYPES_ENUM>;
|
|
28
|
-
kgPlaceholder: import("vue").PropType<string>;
|
|
29
|
-
kgCodeColumn: import("vue").PropType<string>;
|
|
30
|
-
kgDescriptionColumn: import("vue").PropType<string>;
|
|
31
|
-
kgAction: import("vue").PropType<string>;
|
|
32
|
-
kgActionParameter: import("vue").PropType<string>;
|
|
33
|
-
kgValidateInfo: {
|
|
34
|
-
type: import("vue").PropType<import("ant-design-vue/lib/form/useForm").ValidateInfo>;
|
|
35
|
-
default: () => {};
|
|
36
|
-
};
|
|
37
|
-
kgActionType: {
|
|
38
|
-
type: import("vue").PropType<import("axios").Method>;
|
|
39
|
-
default: string;
|
|
40
|
-
};
|
|
41
|
-
value: import("vue").PropType<string | number | (string | number)[]>;
|
|
42
|
-
'onUpdate:value': import("vue").PropType<(value: any) => void>;
|
|
43
|
-
}>> & {
|
|
44
|
-
onKgSubmit?: ((...args: any[]) => any) | undefined;
|
|
45
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "kgGutter" | "kgSpan" | "kgValidateInfo" | "kgActionType">;
|
|
46
|
-
$attrs: {
|
|
47
|
-
[x: string]: unknown;
|
|
48
|
-
};
|
|
49
|
-
$refs: {
|
|
50
|
-
[x: string]: unknown;
|
|
51
|
-
};
|
|
52
|
-
$slots: Readonly<{
|
|
53
|
-
[name: string]: import("vue").Slot | undefined;
|
|
54
|
-
}>;
|
|
55
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
56
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
57
|
-
$emit: (event: "kgSubmit", ...args: any[]) => void;
|
|
58
|
-
$el: any;
|
|
59
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
60
|
-
kgVarName: {
|
|
61
|
-
type: import("vue").PropType<string>;
|
|
62
|
-
required: boolean;
|
|
63
|
-
};
|
|
64
|
-
kgGutter: {
|
|
65
|
-
type: import("vue").PropType<number>;
|
|
66
|
-
default: number;
|
|
67
|
-
};
|
|
68
|
-
kgSpan: {
|
|
69
|
-
type: import("vue").PropType<1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24>;
|
|
70
|
-
default: number;
|
|
71
|
-
};
|
|
72
|
-
kgType: import("vue").PropType<import("../..").KG_CONTROL_TYPES_ENUM>;
|
|
73
|
-
kgPlaceholder: import("vue").PropType<string>;
|
|
74
|
-
kgCodeColumn: import("vue").PropType<string>;
|
|
75
|
-
kgDescriptionColumn: import("vue").PropType<string>;
|
|
76
|
-
kgAction: import("vue").PropType<string>;
|
|
77
|
-
kgActionParameter: import("vue").PropType<string>;
|
|
78
|
-
kgValidateInfo: {
|
|
79
|
-
type: import("vue").PropType<import("ant-design-vue/lib/form/useForm").ValidateInfo>;
|
|
80
|
-
default: () => {};
|
|
81
|
-
};
|
|
82
|
-
kgActionType: {
|
|
83
|
-
type: import("vue").PropType<import("axios").Method>;
|
|
84
|
-
default: string;
|
|
85
|
-
};
|
|
86
|
-
value: import("vue").PropType<string | number | (string | number)[]>;
|
|
87
|
-
'onUpdate:value': import("vue").PropType<(value: any) => void>;
|
|
88
|
-
}>> & {
|
|
89
|
-
onKgSubmit?: ((...args: any[]) => any) | undefined;
|
|
90
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgSubmit"[], string, {
|
|
91
|
-
kgGutter: number;
|
|
92
|
-
kgSpan: 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
93
|
-
kgValidateInfo: import("ant-design-vue/lib/form/useForm").ValidateInfo;
|
|
94
|
-
kgActionType: import("axios").Method;
|
|
95
|
-
}, {}, string> & {
|
|
96
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
97
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
98
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
99
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
100
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
101
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
102
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
103
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
104
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
105
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
106
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
107
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
108
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
109
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
110
|
-
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
111
|
-
};
|
|
112
|
-
$forceUpdate: () => void;
|
|
113
|
-
$nextTick: typeof import("vue").nextTick;
|
|
114
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
115
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
116
|
-
kgVarName: {
|
|
117
|
-
type: import("vue").PropType<string>;
|
|
118
|
-
required: boolean;
|
|
119
|
-
};
|
|
120
|
-
kgGutter: {
|
|
121
|
-
type: import("vue").PropType<number>;
|
|
122
|
-
default: number;
|
|
123
|
-
};
|
|
124
|
-
kgSpan: {
|
|
125
|
-
type: import("vue").PropType<1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24>;
|
|
126
|
-
default: number;
|
|
127
|
-
};
|
|
128
|
-
kgType: import("vue").PropType<import("../..").KG_CONTROL_TYPES_ENUM>;
|
|
129
|
-
kgPlaceholder: import("vue").PropType<string>;
|
|
130
|
-
kgCodeColumn: import("vue").PropType<string>;
|
|
131
|
-
kgDescriptionColumn: import("vue").PropType<string>;
|
|
132
|
-
kgAction: import("vue").PropType<string>;
|
|
133
|
-
kgActionParameter: import("vue").PropType<string>;
|
|
134
|
-
kgValidateInfo: {
|
|
135
|
-
type: import("vue").PropType<import("ant-design-vue/lib/form/useForm").ValidateInfo>;
|
|
136
|
-
default: () => {};
|
|
137
|
-
};
|
|
138
|
-
kgActionType: {
|
|
139
|
-
type: import("vue").PropType<import("axios").Method>;
|
|
140
|
-
default: string;
|
|
141
|
-
};
|
|
142
|
-
value: import("vue").PropType<string | number | (string | number)[]>;
|
|
143
|
-
'onUpdate:value': import("vue").PropType<(value: any) => void>;
|
|
144
|
-
}>> & {
|
|
145
|
-
onKgSubmit?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
|
|
147
|
-
__isFragment?: undefined;
|
|
148
|
-
__isTeleport?: undefined;
|
|
149
|
-
__isSuspense?: undefined;
|
|
150
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
151
|
-
kgVarName: {
|
|
152
|
-
type: import("vue").PropType<string>;
|
|
153
|
-
required: boolean;
|
|
154
|
-
};
|
|
155
|
-
kgGutter: {
|
|
156
|
-
type: import("vue").PropType<number>;
|
|
157
|
-
default: number;
|
|
158
|
-
};
|
|
159
|
-
kgSpan: {
|
|
160
|
-
type: import("vue").PropType<1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24>;
|
|
161
|
-
default: number;
|
|
162
|
-
};
|
|
163
|
-
kgType: import("vue").PropType<import("../..").KG_CONTROL_TYPES_ENUM>;
|
|
164
|
-
kgPlaceholder: import("vue").PropType<string>;
|
|
165
|
-
kgCodeColumn: import("vue").PropType<string>;
|
|
166
|
-
kgDescriptionColumn: import("vue").PropType<string>;
|
|
167
|
-
kgAction: import("vue").PropType<string>;
|
|
168
|
-
kgActionParameter: import("vue").PropType<string>;
|
|
169
|
-
kgValidateInfo: {
|
|
170
|
-
type: import("vue").PropType<import("ant-design-vue/lib/form/useForm").ValidateInfo>;
|
|
171
|
-
default: () => {};
|
|
172
|
-
};
|
|
173
|
-
kgActionType: {
|
|
174
|
-
type: import("vue").PropType<import("axios").Method>;
|
|
175
|
-
default: string;
|
|
176
|
-
};
|
|
177
|
-
value: import("vue").PropType<string | number | (string | number)[]>;
|
|
178
|
-
'onUpdate:value': import("vue").PropType<(value: any) => void>;
|
|
179
|
-
}>> & {
|
|
180
|
-
onKgSubmit?: ((...args: any[]) => any) | undefined;
|
|
181
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgSubmit"[], "kgSubmit", {
|
|
182
|
-
kgGutter: number;
|
|
183
|
-
kgSpan: 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
184
|
-
kgValidateInfo: import("ant-design-vue/lib/form/useForm").ValidateInfo;
|
|
185
|
-
kgActionType: import("axios").Method;
|
|
186
|
-
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
187
|
-
readonly Input: typeof KgControlInput;
|
|
188
|
-
readonly Select: typeof KgControlSelect;
|
|
189
|
-
};
|
|
190
|
-
export default _default;
|
|
3
|
+
export { type KgControlProps };
|
|
4
|
+
export default KgControl;
|
|
@@ -2,6 +2,9 @@ import { ExtractPropTypes, PropType } from 'vue';
|
|
|
2
2
|
import { KG_CONTROL_TYPES_ENUM } from '../../consts';
|
|
3
3
|
import { Method } from 'axios';
|
|
4
4
|
import { ValidateInfo } from 'ant-design-vue/lib/form/useForm';
|
|
5
|
+
import { Dayjs } from 'dayjs';
|
|
6
|
+
import { SharedTimeProps } from 'ant-design-vue/es/vc-picker/panels/TimePanel';
|
|
7
|
+
export declare type KgControlValue = string | number | Array<string | number> | Dayjs;
|
|
5
8
|
export declare const getProps: () => {
|
|
6
9
|
/** 变量名称. */
|
|
7
10
|
kgVarName: {
|
|
@@ -21,43 +24,71 @@ export declare const getProps: () => {
|
|
|
21
24
|
* @default 6
|
|
22
25
|
*/
|
|
23
26
|
kgSpan: {
|
|
24
|
-
type: PropType<
|
|
27
|
+
type: PropType<number>;
|
|
25
28
|
default: number;
|
|
26
29
|
};
|
|
27
30
|
/**
|
|
28
31
|
* 控件类型.
|
|
29
|
-
* @default {@link KG_CONTROL_TYPES_ENUM.
|
|
32
|
+
* @default {@link KG_CONTROL_TYPES_ENUM.INPUT}
|
|
30
33
|
*/
|
|
31
34
|
kgType: PropType<KG_CONTROL_TYPES_ENUM>;
|
|
32
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @default ' '
|
|
37
|
+
*/
|
|
38
|
+
kgPlaceholder: {
|
|
39
|
+
type: PropType<string>;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
33
42
|
/**
|
|
34
43
|
* 数据列.
|
|
35
|
-
* {@link KG_CONTROL_TYPES_ENUM.
|
|
44
|
+
* {@link KG_CONTROL_TYPES_ENUM.SELECT} 和 {@link KG_CONTROL_TYPES_ENUM.SELECT_MULTIPLE} 适用.
|
|
45
|
+
* @default 'codval'
|
|
36
46
|
*/
|
|
37
|
-
kgCodeColumn:
|
|
47
|
+
kgCodeColumn: {
|
|
48
|
+
type: PropType<string>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
38
51
|
/**
|
|
39
52
|
* 显示列.
|
|
40
|
-
* {@link KG_CONTROL_TYPES_ENUM.
|
|
53
|
+
* {@link KG_CONTROL_TYPES_ENUM.SELECT} 和 {@link KG_CONTROL_TYPES_ENUM.SELECT_MULTIPLE} 适用.
|
|
54
|
+
* @default 'shortDsc'
|
|
41
55
|
*/
|
|
42
|
-
kgDescriptionColumn:
|
|
56
|
+
kgDescriptionColumn: {
|
|
57
|
+
type: PropType<string>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
43
60
|
/** 接口地址. */
|
|
44
61
|
kgAction: PropType<string>;
|
|
45
62
|
/** 接口参数. */
|
|
46
63
|
kgActionParameter: PropType<string>;
|
|
47
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* 表单验证信息.
|
|
66
|
+
* @default {}
|
|
67
|
+
*/
|
|
48
68
|
kgValidateInfo: {
|
|
49
69
|
type: PropType<ValidateInfo>;
|
|
50
70
|
default: () => {};
|
|
51
71
|
};
|
|
52
72
|
/**
|
|
53
73
|
* 接口方法.
|
|
54
|
-
* @default GET
|
|
74
|
+
* @default 'GET'
|
|
55
75
|
*/
|
|
56
76
|
kgActionType: {
|
|
57
77
|
type: PropType<Method>;
|
|
58
78
|
default: string;
|
|
59
79
|
};
|
|
60
|
-
|
|
61
|
-
|
|
80
|
+
/**
|
|
81
|
+
* 时间配置.
|
|
82
|
+
* https://www.antdv.com/components/date-picker#DatePicker
|
|
83
|
+
* @default undefined
|
|
84
|
+
*/
|
|
85
|
+
kgShowTime: {
|
|
86
|
+
type: PropType<boolean | SharedTimeProps<Dayjs>>;
|
|
87
|
+
default: undefined;
|
|
88
|
+
};
|
|
89
|
+
value: PropType<KgControlValue>;
|
|
90
|
+
'onUpdate:value': PropType<(value: KgControlValue | null) => void>;
|
|
91
|
+
onKgSubmit: PropType<() => void>;
|
|
92
|
+
onKgChange: PropType<(value: any | null) => void>;
|
|
62
93
|
};
|
|
63
94
|
export declare type KgControlProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import './KgSearch.less';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
kgModel:
|
|
4
|
-
type: import("vue").PropType<Record<string, any>>;
|
|
5
|
-
required: boolean;
|
|
6
|
-
};
|
|
3
|
+
kgModel: import("vue").PropType<Record<string, any>>;
|
|
7
4
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSearch" | "kgReset")[], "kgSearch" | "kgReset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
-
kgModel:
|
|
9
|
-
type: import("vue").PropType<Record<string, any>>;
|
|
10
|
-
required: boolean;
|
|
11
|
-
};
|
|
5
|
+
kgModel: import("vue").PropType<Record<string, any>>;
|
|
12
6
|
}>> & {
|
|
13
7
|
onKgSearch?: ((...args: any[]) => any) | undefined;
|
|
14
8
|
onKgReset?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
export declare const getProps: () => {
|
|
3
3
|
/** 表单对象. */
|
|
4
|
-
kgModel:
|
|
5
|
-
type: PropType<Record<string, any>>;
|
|
6
|
-
required: boolean;
|
|
7
|
-
};
|
|
4
|
+
kgModel: PropType<Record<string, any>>;
|
|
8
5
|
};
|
|
9
6
|
export declare type KgSearchProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
@@ -1,48 +1,34 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
/**
|
|
3
3
|
* 启用变量.
|
|
4
|
-
* @param formID 界面标识.
|
|
4
|
+
* @param formID 界面标识. 在下级组件中调用时, 可以不传该参数.
|
|
5
5
|
*/
|
|
6
|
-
export declare function useKgVar(formID
|
|
7
|
-
/** 变量配置数据. */
|
|
6
|
+
export declare function useKgVar(formID?: string): {
|
|
8
7
|
kgVarStore: import("pinia").Store<"KgVar", import("../store/index.data").KgVarState, {
|
|
9
8
|
getTopFormID(): string | null;
|
|
10
9
|
getVarCatalogs(): Map<string, import("../../..").VarCatalog[]>;
|
|
10
|
+
getVarLookups(): Map<string, import("../../..").VarLookup[]>;
|
|
11
|
+
getVarLookup(): (formID?: string | null | undefined, varName?: string | null | undefined) => import("../../..").VarLookup | null;
|
|
11
12
|
}, {
|
|
12
13
|
leave(formID: string): void;
|
|
13
14
|
deleteAll(formID: string): void;
|
|
14
15
|
retrieveAll(formID?: string | null | undefined): Promise<void>;
|
|
15
16
|
enter(formID: string): Promise<void>;
|
|
16
17
|
}>;
|
|
17
|
-
/**
|
|
18
|
-
* 翻译变量. 响应式的.
|
|
19
|
-
* @param varName 变量名称.
|
|
20
|
-
*/
|
|
21
18
|
t1: (varName?: string | null) => ComputedRef<string>;
|
|
22
|
-
/**
|
|
23
|
-
* 翻译变量. 不是响应式的.
|
|
24
|
-
* @param varName 变量名称.
|
|
25
|
-
*/
|
|
26
19
|
t2: (varName?: string | null) => string;
|
|
27
20
|
} | {
|
|
28
|
-
/** 变量配置数据. */
|
|
29
21
|
kgVarStore: import("pinia").Store<"KgVar", import("../store/index.data").KgVarState, {
|
|
30
22
|
getTopFormID(): string | null;
|
|
31
23
|
getVarCatalogs(): Map<string, import("../../..").VarCatalog[]>;
|
|
24
|
+
getVarLookups(): Map<string, import("../../..").VarLookup[]>;
|
|
25
|
+
getVarLookup(): (formID?: string | null | undefined, varName?: string | null | undefined) => import("../../..").VarLookup | null;
|
|
32
26
|
}, {
|
|
33
27
|
leave(formID: string): void;
|
|
34
28
|
deleteAll(formID: string): void;
|
|
35
29
|
retrieveAll(formID?: string | null | undefined): Promise<void>;
|
|
36
30
|
enter(formID: string): Promise<void>;
|
|
37
31
|
}>;
|
|
38
|
-
/**
|
|
39
|
-
* 翻译变量. 响应式的.
|
|
40
|
-
* @param varName 变量名称.
|
|
41
|
-
*/
|
|
42
32
|
t1: (varName?: string | null) => Ref<string>;
|
|
43
|
-
/**
|
|
44
|
-
* 翻译变量. 不是响应式的.
|
|
45
|
-
* @param varName 变量名称.
|
|
46
|
-
*/
|
|
47
33
|
t2: (varName?: string | null) => string;
|
|
48
34
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type StoreDefinition } from 'pinia';
|
|
2
2
|
import { KgVarState } from './index.data';
|
|
3
|
-
import { VarCatalog } from '../../../apis/WMS/models';
|
|
3
|
+
import { VarCatalog, VarLookup } from '../../../apis/WMS/models';
|
|
4
4
|
declare type IKgVarStore = StoreDefinition<'KgVar', KgVarState, {
|
|
5
5
|
getTopFormID(): string | null;
|
|
6
6
|
getVarCatalogs(): Map<string, Array<VarCatalog>>;
|
|
7
|
+
getVarLookups(): Map<string, Array<VarLookup>>;
|
|
8
|
+
getVarLookup(): (formID?: string | null, varName?: string | null) => VarLookup | null;
|
|
7
9
|
}, {
|
|
8
10
|
leave(formID: string): void;
|
|
9
11
|
deleteAll(formID: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VarCatalog } from '../../../apis/WMS/models';
|
|
1
|
+
import { VarCatalog, VarLookup } from '../../../apis/WMS/models';
|
|
2
2
|
export interface KgVarState {
|
|
3
3
|
/**
|
|
4
4
|
* 当前可能打开了多个界面, 需要按照先后顺序记录下来, 当打开变量配置弹窗时, 打开的是最近那个页面的变量配置.
|
|
@@ -6,4 +6,6 @@ export interface KgVarState {
|
|
|
6
6
|
formIDs: Array<string>;
|
|
7
7
|
/** 变量别名. */
|
|
8
8
|
varCatalogs: Map<string, Array<VarCatalog>>;
|
|
9
|
+
/** 变量查找. */
|
|
10
|
+
varLookups: Map<string, Array<VarLookup>>;
|
|
9
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as KgControl,
|
|
1
|
+
export { default as KgControl, type KgControlProps } from './KgControl';
|
|
2
2
|
export { default as KgSearch, type KgSearchProps } from './KgSearch';
|
|
3
3
|
export { default as KgButton, type KgButtonProps } from './KgButton';
|
|
4
4
|
import KgPage from './KgPage/KgPage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './setup';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Pinia } from 'pinia';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 由于许多数据是由项目维护的, 组件库需要用到这些数据, 则必须让项目调用下面的这些配置方法, 将各种数据设置进来.
|
|
5
|
+
*/
|
|
6
|
+
declare type T = {
|
|
7
|
+
(key: string): string;
|
|
8
|
+
(key: string, locale: string): string;
|
|
9
|
+
(key: string, locale: string, list: unknown[]): string;
|
|
10
|
+
(key: string, locale: string, named: Record<string, unknown>): string;
|
|
11
|
+
(key: string, list: unknown[]): string;
|
|
12
|
+
(key: string, named: Record<string, unknown>): string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 配置翻译方法.
|
|
16
|
+
* @param i18n vue-i18n 的国际化配置.
|
|
17
|
+
*/
|
|
18
|
+
export declare function setupT(i18n: any): void;
|
|
19
|
+
/**
|
|
20
|
+
* 翻译.
|
|
21
|
+
* @param key
|
|
22
|
+
* @param arg
|
|
23
|
+
*/
|
|
24
|
+
export declare const t: T;
|
|
25
|
+
/**
|
|
26
|
+
* 配置 pinia 实例.
|
|
27
|
+
* @param pinia pinia 实例.
|
|
28
|
+
*/
|
|
29
|
+
export declare function setupStore(pinia: Pinia): void;
|
|
30
|
+
/**
|
|
31
|
+
* 获取 pinia 实例.
|
|
32
|
+
*/
|
|
33
|
+
export declare function store(): Pinia | null;
|
|
34
|
+
/**
|
|
35
|
+
* 配置语言.
|
|
36
|
+
* @param locale 语言.
|
|
37
|
+
*/
|
|
38
|
+
export declare function setupLocale(locale: ComputedRef<string>): void;
|
|
39
|
+
/**
|
|
40
|
+
* 获取语言.
|
|
41
|
+
*/
|
|
42
|
+
export declare function locale(): ComputedRef<string> | null;
|
|
43
|
+
export {};
|
|
@@ -18,6 +18,7 @@ export declare const KG_I18N: {
|
|
|
18
18
|
save: string;
|
|
19
19
|
cancel: string;
|
|
20
20
|
confirm: string;
|
|
21
|
+
lookup: string;
|
|
21
22
|
confirmDelete: string;
|
|
22
23
|
KgSearch: {
|
|
23
24
|
title: string;
|
|
@@ -43,6 +44,7 @@ export declare const KG_I18N: {
|
|
|
43
44
|
save: string;
|
|
44
45
|
cancel: string;
|
|
45
46
|
confirm: string;
|
|
47
|
+
lookup: string;
|
|
46
48
|
confirmDelete: string;
|
|
47
49
|
KgSearch: {
|
|
48
50
|
title: string;
|
|
@@ -50,4 +52,3 @@ export declare const KG_I18N: {
|
|
|
50
52
|
};
|
|
51
53
|
};
|
|
52
54
|
};
|
|
53
|
-
export * from './t';
|
|
@@ -15,25 +15,25 @@ export declare const enum KG_APPS_PREFIXS_ENUM {
|
|
|
15
15
|
/** 表单控件类型. */
|
|
16
16
|
export declare const enum KG_CONTROL_TYPES_ENUM {
|
|
17
17
|
/** 文本. */
|
|
18
|
-
|
|
18
|
+
INPUT = "Input_Basic",
|
|
19
19
|
/** 密码. */
|
|
20
20
|
INPUT_PASSWORD = "Input_Password",
|
|
21
21
|
/** 多行文本. */
|
|
22
22
|
INPUT_AREA = "Input_AreaText",
|
|
23
23
|
/** 数字. */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
INPUT_NUMBER = "InputNumber_Basic",
|
|
25
|
+
CHECKBOX = "Checkbox_Basic",
|
|
26
|
+
SWITCH = "Switch_Basic",
|
|
27
27
|
/** 下拉列表单选. */
|
|
28
|
-
|
|
28
|
+
SELECT = "Select_Basic",
|
|
29
29
|
/** 下拉列表多选. */
|
|
30
30
|
SELECT_MULTIPLE = "Select_Multiple",
|
|
31
31
|
DATE_PICKER_DATE = "DatePick_Date",
|
|
32
|
-
DATE_PICKER_DATETIME_RANGE = "DatePick_DateTimeRange",
|
|
33
32
|
DATE_PICKER_DATE_RANGE = "DatePick_DateRange",
|
|
34
33
|
DATE_PICKER_DATETIME = "DatePick_DateTime",
|
|
35
|
-
|
|
34
|
+
DATE_PICKER_DATETIME_RANGE = "DatePick_DateTimeRange",
|
|
36
35
|
DATE_PICKER_WEEK = "DatePick_Week",
|
|
36
|
+
DATE_PICKER_MONTH = "DatePick_Month",
|
|
37
37
|
DATE_PICKER_YEAR = "DatePick_Year",
|
|
38
38
|
/** 单位. */
|
|
39
39
|
UOM = "Uom",
|
|
@@ -63,3 +63,10 @@ export declare const enum KG_BUTTON_TYPES_ENUM {
|
|
|
63
63
|
/** 其他. */
|
|
64
64
|
OTHER = "Other"
|
|
65
65
|
}
|
|
66
|
+
/** 定制级别. */
|
|
67
|
+
export declare const enum KG_CUSTOM_LEVEL {
|
|
68
|
+
/** 系统. */
|
|
69
|
+
L0 = 0,
|
|
70
|
+
/** 用户. */
|
|
71
|
+
L10 = 10
|
|
72
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Pinia } from 'pinia';
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
3
2
|
/** 界面标识. */
|
|
4
3
|
export declare const KG_DI_FORM_ID: InjectionKey<string>;
|
|
5
|
-
/**
|
|
6
|
-
export declare const
|
|
7
|
-
/** pinia. */
|
|
8
|
-
export declare const KG_DI_PINIA: InjectionKey<Pinia>;
|
|
4
|
+
/** 变量名称. */
|
|
5
|
+
export declare const KG_DI_VAR_NAME: InjectionKey<string>;
|
package/dist/src/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kengic/vue",
|
|
3
|
-
"version": "0.1.1-beta.
|
|
3
|
+
"version": "0.1.1-beta.7",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"build:dev": "rimraf dist && vue-tsc && vite build --mode development",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"@ant-design/icons-vue": "6.1.0",
|
|
27
27
|
"ant-design-vue": "3.2.14",
|
|
28
28
|
"axios": "0.26.1",
|
|
29
|
+
"dayjs": "1.11.6",
|
|
29
30
|
"filesize": "10.0.6",
|
|
30
31
|
"lodash-es": "4.17.21",
|
|
31
32
|
"pinia": "2.0.12"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare type T = {
|
|
2
|
-
(key: string): string;
|
|
3
|
-
(key: string, locale: string): string;
|
|
4
|
-
(key: string, locale: string, list: unknown[]): string;
|
|
5
|
-
(key: string, locale: string, named: Record<string, unknown>): string;
|
|
6
|
-
(key: string, list: unknown[]): string;
|
|
7
|
-
(key: string, named: Record<string, unknown>): string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* 配置翻译方法.
|
|
11
|
-
* @param i18n vue-i18n 的国际化配置.
|
|
12
|
-
*/
|
|
13
|
-
export declare function setupT(i18n: any): void;
|
|
14
|
-
/**
|
|
15
|
-
* 翻译.
|
|
16
|
-
* @param key
|
|
17
|
-
* @param arg
|
|
18
|
-
*/
|
|
19
|
-
export declare const t: T;
|
|
20
|
-
export {};
|