@kengic/vue 0.26.6-beta.133 → 0.26.6-beta.135

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,7 @@
1
- import { KG_APP, Menu } from '../../const';
2
- import { IKgAppSelectGotoAppEventListener, IKgAppSelectGotoPathEventListener, IKgAppSelectStore } from './index.store';
3
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
+ import { KG_APP, Menu } from '../../const';
3
+ import { IKgAppSelectOnGotoAppEventListener, IKgAppSelectOnGotoPathEventListener, IKgAppSelectStore } from './index.store';
4
4
  export declare type IUseKgAppSelect = {
5
- /** 状态数据. */
6
- store: IKgAppSelectStore;
7
5
  /**
8
6
  * 进入某个模块.
9
7
  * @param app 要进入的模块.
@@ -15,28 +13,30 @@ export declare type IUseKgAppSelect = {
15
13
  * @param path 要进入的地址.
16
14
  */
17
15
  gotoPath(path: string): Promise<void>;
16
+ /**
17
+ * 初始化.
18
+ * 1. 需要根据当前地址设置当前模块.
19
+ */
20
+ init(): void;
18
21
  /**
19
22
  * 判断某个菜单是否属于当前模块.
20
23
  * @param menu 菜单.
21
24
  * @return {} 如果菜单属于当前模块则返回 true, 否则返回 false.
22
25
  */
23
26
  isMenuInCurrentApp(menu: Menu): boolean;
24
- /**
25
- * 初始化.
26
- * 1. 需要根据当前地址设置当前模块.
27
- */
28
- init(): void;
29
27
  /**
30
28
  * 监听事件: 进入某个模块.
31
29
  * @param listener 事件监听函数.
32
30
  * @param isOnce 是否只会触发一次. 默认为 undefined.
33
31
  */
34
- onGotoApp(listener: IKgAppSelectGotoAppEventListener, isOnce?: boolean): IRemoveEventListener;
32
+ onGotoApp(listener: IKgAppSelectOnGotoAppEventListener, isOnce?: boolean): IRemoveEventListener;
35
33
  /**
36
34
  * 监听事件: 进入某个地址.
37
35
  * @param listener 事件监听函数.
38
36
  * @param isOnce 是否只会触发一次. 默认为 undefined.
39
37
  */
40
- onGotoPath(listener: IKgAppSelectGotoPathEventListener, isOnce?: boolean): IRemoveEventListener;
38
+ onGotoPath(listener: IKgAppSelectOnGotoPathEventListener, isOnce?: boolean): IRemoveEventListener;
39
+ /** 状态数据. */
40
+ store: IKgAppSelectStore;
41
41
  };
42
42
  export declare function useKgAppSelect(): IUseKgAppSelect;
@@ -3,27 +3,27 @@ import { StoreDefinition } from 'pinia';
3
3
  import { KG_APP, Menu } from '../../const';
4
4
  /**
5
5
  * 事件类型.
6
- * 'gotoApp': 进入某个模块
7
- * 'gotoPath': 进入某个地址
6
+ * 'onGotoApp': 进入某个模块
7
+ * 'onGotoPath': 进入某个地址
8
8
  */
9
- export declare type IKgAppSelectEvent = 'gotoApp' | 'gotoPath';
10
- export declare type IKgAppSelectGotoAppEventListenerParameter = {
9
+ export declare type IKgAppSelectEvent = 'onGotoApp' | 'onGotoPath';
10
+ export declare type IKgAppSelectOnGotoAppEventListenerParameter = {
11
11
  app: string;
12
12
  };
13
- export declare type IKgAppSelectGotoAppEventListener = ((param: IKgAppSelectGotoAppEventListenerParameter) => Promise<boolean>) & IKgEventListener;
14
- export declare type IKgAppSelectGotoPathEventListenerParameter = {
13
+ export declare type IKgAppSelectOnGotoAppEventListener = ((param: IKgAppSelectOnGotoAppEventListenerParameter) => Promise<boolean>) & IKgEventListener;
14
+ export declare type IKgAppSelectOnGotoPathEventListenerParameter = {
15
15
  path: string;
16
16
  };
17
- export declare type IKgAppSelectGotoPathEventListener = ((param: IKgAppSelectGotoPathEventListenerParameter) => Promise<boolean>) & IKgEventListener;
18
- export declare type IKgAppSelectEventListenerParameter = IKgAppSelectGotoAppEventListenerParameter | IKgAppSelectGotoPathEventListenerParameter;
19
- export declare type IKgAppSelectEventListener = IKgAppSelectGotoAppEventListener | IKgAppSelectGotoPathEventListener;
17
+ export declare type IKgAppSelectOnGotoPathEventListener = ((param: IKgAppSelectOnGotoPathEventListenerParameter) => Promise<boolean>) & IKgEventListener;
18
+ export declare type IKgAppSelectEventListenerParameter = IKgAppSelectOnGotoAppEventListenerParameter | IKgAppSelectOnGotoPathEventListenerParameter;
19
+ export declare type IKgAppSelectEventListener = IKgAppSelectOnGotoAppEventListener | IKgAppSelectOnGotoPathEventListener;
20
20
  export interface IUseKgAppSelectStoreState {
21
21
  /**
22
22
  * 当前模块.
23
23
  */
24
24
  currentApp: KG_APP | null;
25
- gotoAppEventListenerMap: Map<string, Array<IKgAppSelectGotoAppEventListener>>;
26
- gotoPathEventListenerMap: Map<string, Array<IKgAppSelectGotoPathEventListener>>;
25
+ onGotoApp: Map<string, Array<IKgAppSelectOnGotoAppEventListener>>;
26
+ onGotoPath: Map<string, Array<IKgAppSelectOnGotoPathEventListener>>;
27
27
  }
28
28
  export interface IUseKgAppSelectStoreGetters {
29
29
  getCurrentApp(): KG_APP;
@@ -45,10 +45,12 @@ export declare type IKgFormOnBlurEventListenerParameter = {
45
45
  * 表单控件所处环境.
46
46
  */
47
47
  context: KG_FORM_CONTEXT;
48
+ /** @deprecated */
49
+ value: any;
48
50
  /**
49
51
  * 表单控件当前数据.
50
52
  */
51
- value: any;
53
+ values: Array<any>;
52
54
  /**
53
55
  * 变量名称.
54
56
  */
@@ -152,6 +154,8 @@ export declare type IKgFormLookupBeforeOkEventListenerParameter = {
152
154
  /** 勾选的所有值. */
153
155
  values?: Array<any> | null;
154
156
  /** 变量. */
157
+ varNam: string;
158
+ /** @deprecated. */
155
159
  var_nam: string;
156
160
  };
157
161
  export declare type IKgFormLookupBeforeOkEventListener = ((param: IKgFormLookupBeforeOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
@@ -179,6 +183,8 @@ export declare type IKgFormLookupOkEventListenerParameter = {
179
183
  /** 勾选的所有值. */
180
184
  values?: Array<any> | null;
181
185
  /** 变量. */
186
+ varNam: string;
187
+ /** @deprecated. */
182
188
  var_nam: string;
183
189
  };
184
190
  export declare type IKgFormLookupOkEventListener = ((param: IKgFormLookupOkEventListenerParameter) => Promise<boolean>) & IKgEventListener;
@@ -19,7 +19,6 @@ declare const _default: import("vue").DefineComponent<{
19
19
  type: import("vue").PropType<boolean>;
20
20
  default: boolean;
21
21
  };
22
- /** 是否全选. */
23
22
  kgAllowClear: {
24
23
  type: import("vue").PropType<boolean>;
25
24
  default: undefined;
@@ -61,7 +60,6 @@ declare const _default: import("vue").DefineComponent<{
61
60
  type: import("vue").PropType<boolean>;
62
61
  default: boolean;
63
62
  };
64
- /** 是否全选. */
65
63
  kgAllowClear: {
66
64
  type: import("vue").PropType<boolean>;
67
65
  default: undefined;
@@ -15,11 +15,10 @@ declare const _default: import("vue").DefineComponent<{
15
15
  kgSpan: import("vue").PropType<number>;
16
16
  kgPlaceholder: import("vue").PropType<string>;
17
17
  kgMode: import("vue").PropType<"multiple" | "tags">;
18
- /** 初始. */
19
18
  kgShowLabel: {
20
19
  type: import("vue").PropType<boolean>;
21
- default: boolean;
22
- };
20
+ default: boolean; /** 初始. */
21
+ }; /** 初始. */
23
22
  kgAllowClear: {
24
23
  type: import("vue").PropType<boolean>;
25
24
  default: undefined;
@@ -57,11 +56,10 @@ declare const _default: import("vue").DefineComponent<{
57
56
  kgSpan: import("vue").PropType<number>;
58
57
  kgPlaceholder: import("vue").PropType<string>;
59
58
  kgMode: import("vue").PropType<"multiple" | "tags">;
60
- /** 初始. */
61
59
  kgShowLabel: {
62
60
  type: import("vue").PropType<boolean>;
63
- default: boolean;
64
- };
61
+ default: boolean; /** 初始. */
62
+ }; /** 初始. */
65
63
  kgAllowClear: {
66
64
  type: import("vue").PropType<boolean>;
67
65
  default: undefined;
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
28
28
  default: undefined;
29
29
  };
30
30
  kgPicker: {
31
+ /** 是否允许清空. */
31
32
  type: import("vue").PropType<import("ant-design-vue/lib/vc-picker/interface").PickerMode>;
32
33
  default: undefined;
33
34
  };
@@ -69,6 +70,7 @@ declare const _default: import("vue").DefineComponent<{
69
70
  default: undefined;
70
71
  };
71
72
  kgPicker: {
73
+ /** 是否允许清空. */
72
74
  type: import("vue").PropType<import("ant-design-vue/lib/vc-picker/interface").PickerMode>;
73
75
  default: undefined;
74
76
  };
@@ -24,7 +24,7 @@ export declare function _useHeight(param: {
24
24
  maxHeight: import("vue").ComputedRef<number>;
25
25
  minHeight: import("vue").ComputedRef<number>;
26
26
  };
27
- export declare function _useFormModel(param: {
27
+ export declare function useFormModel(param: {
28
28
  kgResizableRef: Ref<any | null>;
29
29
  formRef: Ref<FormInstance | null>;
30
30
  }): {
@@ -1,6 +1,6 @@
1
1
  import { Ref, UnwrapRef } from 'vue';
2
2
  import { KgSubmitProps } from './KgSubmit';
3
- export declare function _useFormModel(): {
3
+ export declare function useFormModel(): {
4
4
  model: Ref<Record<string, any>>;
5
5
  };
6
6
  export declare type IUseResizeObserver = {};
@@ -241,7 +241,7 @@ export interface IUseKgSubmit {
241
241
  * <p>由于提交表单肯定是关联某个按钮的, 因此需要先确认是哪个按钮, 确认逻辑如下:</p>
242
242
  * <ul>
243
243
  * <li>
244
- * <p>如果参数 {@link param.buttonVarName} === <code>undefined</code> && {@link param.buttonVarName} === <code>undefined</code>, 表示修改的是「当前按钮」.</p>
244
+ * <p>如果参数 {@link param.buttonVarName} === <code>undefined</code> && {@link param.buttonType} === <code>undefined</code>, 表示修改的是「当前按钮」.</p>
245
245
  * </li>
246
246
  * <li>
247
247
  * <p>如果参数 {@link param.buttonVarName} !== <code>undefined</code>, 则忽略参数 {@link param.buttonType}, 根据 {@link param.buttonVarName} 和 {@link VarButton.var_nam} 是否匹配来确认按钮.</p>
@@ -28,6 +28,20 @@ export declare class KgVarUtil {
28
28
  value: any;
29
29
  varName: string;
30
30
  }): any;
31
+ /**
32
+ * 计算某个列表数据的文本.
33
+ *
34
+ * <p>
35
+ * labelColumn 可以是一个 JS 表达式, 组件库会解析该表达式, 并得到真正的值. 比如表达式 \`${row.id}\` 表示获取该行的 id 列的值. 表达式中可以使用下列变量:
36
+ * <ul>
37
+ * <li>row: 表示该行数据,</li>
38
+ * </ul>
39
+ * </p>
40
+ *
41
+ * @param row 该行数据.
42
+ * @param labelColumn 文本对应的字段或者表达式.
43
+ */
44
+ static evaluateVarConfigPossibilityLabel(row: any, labelColumn: string): string;
31
45
  /**
32
46
  * 根据控件类型, 将任意的高级查询操作符(可能非法)转换为合法的值.
33
47
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.6-beta.133",
3
+ "version": "0.26.6-beta.135",
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,8 +39,8 @@
39
39
  "@iconify-icons/mdi": "1.2.48",
40
40
  "@iconify-icons/ph": "1.2.5",
41
41
  "@iconify/vue": "4.1.2",
42
- "@kengic/core.core": "0.0.1-beta.16",
43
- "@kengic/core.react": "0.0.1-beta.22",
42
+ "@kengic/core.core": "0.0.1-beta.17",
43
+ "@kengic/core.react": "0.0.1-beta.23",
44
44
  "@kengic/pont": "1.2.17-beta.1",
45
45
  "@rys-fe/vite-plugin-theme": "0.8.6",
46
46
  "@thymine/xunee": "0.4.9-beta.8",
@@ -122,7 +122,7 @@
122
122
  }
123
123
  }
124
124
  ],
125
- "printWidth": 160,
125
+ "printWidth": 200,
126
126
  "semi": true,
127
127
  "singleAttributePerLine": true,
128
128
  "singleQuote": true,