@kengic/vue 0.26.6-beta.60 → 0.26.6-beta.63

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- import './KgVarFactory.less';
2
1
  export declare function KgVarFactory(param?: {
3
2
  formID?: string | null | undefined;
4
3
  }): import("vue").DefineComponent<{
@@ -11,8 +10,8 @@ export declare function KgVarFactory(param?: {
11
10
  type: import("vue").PropType<number>;
12
11
  default: number;
13
12
  };
14
- kgProps: import("vue").PropType<import("../../components").IKgProps>;
15
- kgSlots: import("vue").PropType<import("../../components").IKgSlots>;
13
+ kgProps: import("vue").PropType<import("./index.vm").IKgProps>;
14
+ kgSlots: import("vue").PropType<import("./index.vm").IKgSlots>;
16
15
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17
16
  kgBackgroundGray: {
18
17
  type: import("vue").PropType<boolean>;
@@ -23,8 +22,8 @@ export declare function KgVarFactory(param?: {
23
22
  type: import("vue").PropType<number>;
24
23
  default: number;
25
24
  };
26
- kgProps: import("vue").PropType<import("../../components").IKgProps>;
27
- kgSlots: import("vue").PropType<import("../../components").IKgSlots>;
25
+ kgProps: import("vue").PropType<import("./index.vm").IKgProps>;
26
+ kgSlots: import("vue").PropType<import("./index.vm").IKgSlots>;
28
27
  }>>, {
29
28
  kgBackgroundGray: boolean;
30
29
  kgLevel: number;
@@ -32,7 +31,7 @@ export declare function KgVarFactory(param?: {
32
31
  /**
33
32
  * 默认的 KgVar 组件.
34
33
  */
35
- export declare const DEFAULT: import("vue").DefineComponent<{
34
+ export declare const KgVar2: import("vue").DefineComponent<{
36
35
  kgBackgroundGray: {
37
36
  type: import("vue").PropType<boolean>;
38
37
  default: undefined;
@@ -42,8 +41,8 @@ export declare const DEFAULT: import("vue").DefineComponent<{
42
41
  type: import("vue").PropType<number>;
43
42
  default: number;
44
43
  };
45
- kgProps: import("vue").PropType<import("../../components").IKgProps>;
46
- kgSlots: import("vue").PropType<import("../../components").IKgSlots>;
44
+ kgProps: import("vue").PropType<import("./index.vm").IKgProps>;
45
+ kgSlots: import("vue").PropType<import("./index.vm").IKgSlots>;
47
46
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
48
47
  kgBackgroundGray: {
49
48
  type: import("vue").PropType<boolean>;
@@ -54,8 +53,8 @@ export declare const DEFAULT: import("vue").DefineComponent<{
54
53
  type: import("vue").PropType<number>;
55
54
  default: number;
56
55
  };
57
- kgProps: import("vue").PropType<import("../../components").IKgProps>;
58
- kgSlots: import("vue").PropType<import("../../components").IKgSlots>;
56
+ kgProps: import("vue").PropType<import("./index.vm").IKgProps>;
57
+ kgSlots: import("vue").PropType<import("./index.vm").IKgSlots>;
59
58
  }>>, {
60
59
  kgBackgroundGray: boolean;
61
60
  kgLevel: number;
@@ -1,4 +1,5 @@
1
1
  export { default as KgVar, type IKgVarProps, type KgVarProps } from './KgVar';
2
+ export * from './KgVarFactory';
2
3
  export * from './index.hooks';
3
4
  export * from './index.store';
4
5
  export * from './index.vm';
@@ -7,7 +7,8 @@ import { type IUseKgSearch } from '../KgSearch';
7
7
  import { IUseKgSubmit } from '../KgSubmit';
8
8
  import { IUseKgTable } from '../KgTable';
9
9
  import { IUseKgVarConfig } from '../KgVarConfig';
10
- import { IKgVarRetrieveEventListener, IKgVarStore } from './index.store';
10
+ import { IKgVarRequestEventListener, IKgVarStore } from './index.store';
11
+ import { IKgProps, IKgSlots } from './index.vm';
11
12
  export declare type IUseKgVar = {
12
13
  /**
13
14
  * <p>添加一个「变量配置:表单控件」.</p>
@@ -127,11 +128,12 @@ export declare type IUseKgVar = {
127
128
  * @param listener 事件监听函数.
128
129
  * @param isOnce 是否只会触发一次. 默认为 undefined.
129
130
  */
130
- onRetrieve(listener: IKgVarRetrieveEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
131
+ onRetrieve(listener: IKgVarRequestEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
131
132
  /**
132
133
  * 父亲界面.
133
134
  */
134
135
  parent: ComputedRef<ReturnType<IKgVarStore['getParent']>>;
136
+ props: ComputedRef<ReturnType<IKgVarStore['getProps']>>;
135
137
  /**
136
138
  * 查询所有变量配置.
137
139
  *
@@ -140,6 +142,9 @@ export declare type IUseKgVar = {
140
142
  requestAll(param?: {
141
143
  isForceRequest?: boolean;
142
144
  }): Promise<void>;
145
+ setProps(props: IKgProps): void;
146
+ setSlots(slots: IKgSlots): void;
147
+ slots: ComputedRef<ReturnType<IKgVarStore['getSlots']>>;
143
148
  /** 状态数据. */
144
149
  store: IKgVarStore;
145
150
  /**
@@ -2,14 +2,21 @@ import { StoreDefinition } from 'pinia';
2
2
  import { VarButton, VarButtonConfig, VarChildDetail, VarConfigControl, VarConfigDescription, VarConfigInput, VarConfigLookup, VarConfigPossibility, VarConfigTip, VarDda, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail, VarVariable } from '../../apis/WMS/models';
3
3
  import { IKgEventListener, KG__VAR_BUTTON__TYPE } from '../../consts';
4
4
  import { IUseKgVar } from './index.hooks';
5
+ import { IKgProps, IKgSlots } from './index.vm';
5
6
  /**
6
7
  * 事件类型.
7
- * 'retrieve': 变量配置查询完成
8
+ * 'onRequest': 变量配置查询完成
8
9
  */
9
- export declare type IKgVarEvent = 'retrieve';
10
- export declare type IKgVarRetrieveEventListener = (() => void) & IKgEventListener;
11
- export declare type IKgVarEventListenerParameter = any;
12
- export declare type IKgVarEventListener = IKgVarRetrieveEventListener;
10
+ export declare type IKgVarEvent = 'onRequest';
11
+ export declare type IKgVarRequestEventListenerParameter = {
12
+ /**
13
+ * 界面标识.
14
+ */
15
+ formID: string;
16
+ };
17
+ export declare type IKgVarRequestEventListener = ((param: IKgVarRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
18
+ export declare type IKgVarEventListenerParameter = IKgVarRequestEventListenerParameter;
19
+ export declare type IKgVarEventListener = IKgVarRequestEventListener;
13
20
  export interface IUseKgVarStoreState {
14
21
  /** 正在复制: 正在调用接口. */
15
22
  isCopyingRequestingMap: Map<string, boolean>;
@@ -35,8 +42,10 @@ export interface IUseKgVarStoreState {
35
42
  * 界面层级.
36
43
  */
37
44
  levelMap: Map<string, number>;
38
- /** 事件监听函数列表: retrieve. */
39
- onRetrieveEventListenerMap: Map<string, Array<IKgVarRetrieveEventListener>>;
45
+ /** 事件监听函数列表: onRequest. */
46
+ onRequestEventListenerMap: Map<string, Array<IKgVarRequestEventListener>>;
47
+ propsMap: Map<string, IKgProps>;
48
+ slotsMap: Map<string, IKgSlots>;
40
49
  varButtonConfigMap: Map<string, VarButtonConfig | null>;
41
50
  varButtonMap: Map<string, Array<VarButton>>;
42
51
  varChildDetailMap: Map<string, Array<VarChildDetail>>;
@@ -90,6 +99,8 @@ export interface IUseKgVarStoreGetters {
90
99
  */
91
100
  getLevel(): (formID: string | null | undefined) => number;
92
101
  getParent(): (formID: string | null | undefined) => IUseKgVar | null;
102
+ getProps(): (formID: string | null | undefined) => IKgProps | null;
103
+ getSlots(): (formID: string | null | undefined) => IKgSlots | null;
93
104
  /**
94
105
  * 和 var_nam 获取 VarButton.
95
106
  */
@@ -173,9 +184,9 @@ export interface IUseKgVarStoreActions {
173
184
  * 触发事件.
174
185
  * @param formID 界面标识.
175
186
  * @param event 事件名称.
176
- * @param args 事件参数.
187
+ * @param param 事件参数.
177
188
  */
178
- emit(formID: string, event: IKgVarEvent, args?: any): void;
189
+ emit<T = IKgVarEventListenerParameter>(formID: string, event: IKgVarEvent, param: T): Promise<boolean>;
179
190
  /**
180
191
  * 进入一个界面. 同一个界面不允许进入多次.
181
192
  * @param param.formID 界面标识.
@@ -233,6 +244,8 @@ export interface IUseKgVarStoreActions {
233
244
  setIsDeletingRequesting(formID: string, value: boolean): void;
234
245
  setIsOtherRequesting(formID: string, value: boolean): void;
235
246
  setIsUpdatingRequesting(formID: string, value: boolean): void;
247
+ setProps(formID: string, value: IKgProps): void;
248
+ setSlots(formID: string, value: IKgSlots): void;
236
249
  /**
237
250
  * 设置某个 VarConfigPossibility 配置.
238
251
  * @param formID 界面标识.
@@ -36,6 +36,8 @@ export declare type IKgSlots = {
36
36
  };
37
37
  /** KgTable 下面. */
38
38
  afterKgTable?: () => any;
39
+ /** 底部. */
40
+ bottom?: () => any;
39
41
  /**
40
42
  * 孩子页面.
41
43
  */
@@ -1,6 +1,5 @@
1
1
  export * from './KgPageDda';
2
2
  export { default as KgPageDda } from './KgPageDda';
3
- export * from './KgVarFactory';
4
3
  /**
5
4
  * 路由.
6
5
  *
@@ -51,16 +51,6 @@ declare class KgLogger {
51
51
  * @param collapsed 是否折叠.
52
52
  */
53
53
  static debug(message: string, args?: Record<string, any>, collapsed?: boolean): void;
54
- /**
55
- * 打印调试日志: DDA.
56
- * @param formID 界面标识.
57
- * @param component 组件.
58
- * @param method 方法.
59
- * @param message 提示消息.
60
- * @param args 数据对象.
61
- * @param collapsed 是否折叠.
62
- */
63
- static debugDDA(formID: string | null | undefined, component: string | null | undefined, method: string | null | undefined, message: string | null | undefined, args?: Record<string, any>, collapsed?: boolean): void;
64
54
  }
65
55
  declare const ____DEBUG____: typeof KgLogger.debug;
66
56
  declare const ____INFO_____: typeof KgLogger.info;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.6-beta.60",
3
+ "version": "0.26.6-beta.63",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",
@@ -39,7 +39,7 @@
39
39
  "@iconify-icons/mdi": "1.2.48",
40
40
  "@iconify-icons/ph": "1.2.5",
41
41
  "@iconify/vue": "4.1.1",
42
- "@kengic/core": "6.0.1-beta.64",
42
+ "@kengic/core": "6.0.1-beta.67",
43
43
  "@kengic/pont": "1.2.17-beta.1",
44
44
  "@rys-fe/vite-plugin-theme": "0.8.6",
45
45
  "@thymine/xunee": "0.4.9-beta.8",
@@ -1 +0,0 @@
1
- export { KgVarFactory, DEFAULT as KgVar2 } from './KgVarFactory';