@kengic/vue 0.26.6-beta.134 → 0.26.6-beta.137

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;
@@ -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 = {};
@@ -33,7 +33,7 @@ export declare class KgUtil {
33
33
  * <ul>
34
34
  * <li>删除无用属性,</li>
35
35
  * <li>日期转换为字符串,</li>
36
- * <li>解析动态属性, 比如「仓库号」,</li>
36
+ * <li>解析动态属性, 比如「仓库号」等等,</li>
37
37
  * </ul>
38
38
  *
39
39
  * @param params 请求参数.
@@ -45,7 +45,7 @@ export declare class KgUtil {
45
45
  * 处理请求参数: 解析字符串类型的参数值.
46
46
  *
47
47
  * <ol>
48
- * <li>填充通用参数的值:
48
+ * <li>解析动态参数的值, 若参数值是用{}包裹的, 则该参数值称为'动态参数', '动态参数'需要被替换成实际的值,
49
49
  * <ul>
50
50
  * <li>{WAREHOUSE}: 当前仓库编号</li>
51
51
  * <li>{WORK_STATION}: 当前工作站</li>
@@ -63,7 +63,7 @@ export declare class KgUtil {
63
63
  * @param param.value 参数的原始值.
64
64
  * @param param.varName 变量名称.
65
65
  */
66
- static parseParamFromString(param: {
66
+ static parseParamsFromString(param: {
67
67
  $dayjs?: typeof dayjs;
68
68
  formID?: string | null;
69
69
  value: string;
@@ -76,7 +76,7 @@ export declare class KgUtil {
76
76
  * @param param.key 属性名.
77
77
  * @param param.value 参数的原始值.
78
78
  */
79
- static parseParamFromDayjs(param: {
79
+ static parseParamsFromDayjs(param: {
80
80
  formID?: string | null;
81
81
  isPad?: boolean;
82
82
  key: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.6-beta.134",
3
+ "version": "0.26.6-beta.137",
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",