@kengic/vue 0.3.3 → 0.3.4

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.
Files changed (35) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/kengic-vue.js +5335 -4389
  3. package/dist/src/apis/WMS/models.d.ts +53 -3
  4. package/dist/src/components/KgButton/components/KgButton.Create.d.ts +0 -2
  5. package/dist/src/components/KgButton/index.hooks.d.ts +1 -1
  6. package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +1 -1
  7. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +2 -2
  8. package/dist/src/components/KgForm.Item/index.vm.d.ts +14 -4
  9. package/dist/src/components/KgResizable/KgResizable.d.ts +6 -0
  10. package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.d.ts +6 -3
  11. package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.data.d.ts +5 -0
  12. package/dist/src/components/KgSearch/index.hooks.d.ts +1 -1
  13. package/dist/src/components/KgSearch/index.vm.d.ts +1 -1
  14. package/dist/src/components/KgSubmit/KgSubmit.d.ts +8 -0
  15. package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +7 -0
  16. package/dist/src/components/KgSubmit/index.d.ts +4 -0
  17. package/dist/src/components/KgSubmit/index.hooks.d.ts +17 -0
  18. package/dist/src/components/KgSubmit/index.store.d.ts +35 -0
  19. package/dist/src/components/KgSubmit/index.vm.d.ts +5 -0
  20. package/dist/src/components/KgTable/index.hooks.d.ts +1 -1
  21. package/dist/src/components/KgTable/index.store.d.ts +4 -4
  22. package/dist/src/components/KgVar/KgVar.d.ts +12 -5
  23. package/dist/src/components/KgVar/index.store.d.ts +26 -2
  24. package/dist/src/components/KgVar/index.store.service.d.ts +2 -1
  25. package/dist/src/components/KgVar/index.vm.d.ts +3 -0
  26. package/dist/src/components/index.d.ts +1 -0
  27. package/dist/src/consts/i18n/en.d.ts +3 -0
  28. package/dist/src/consts/i18n/index.d.ts +6 -0
  29. package/dist/src/consts/i18n/zh_CN.d.ts +3 -0
  30. package/dist/src/consts/index.d.ts +1 -1
  31. package/dist/src/utils/dom.util.d.ts +12 -0
  32. package/dist/src/utils/index.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.CreateModal.d.ts +0 -20
  35. package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.CreateModal.data.d.ts +0 -4
@@ -1,3 +1,21 @@
1
+ /** 创建查询条件. */
2
+ export declare class CreateVarProfileMasterQuery {
3
+ /** 是否默认(DefaultFlag). */
4
+ def_flg?: number | null;
5
+ /** 是否启用高级查询(DynamicQueryFlag). */
6
+ dyn_flg?: number | null;
7
+ /** 界面标识(FormID). */
8
+ frm_id?: string | null;
9
+ /** 分组(GroupName). */
10
+ grp_nam?: string | null;
11
+ /** 查询条件变量名称(ProfileVariableName). */
12
+ prf_var_nam?: string | null;
13
+ /** 用户(UserID). */
14
+ usr_id?: string | null;
15
+ /** 字段列表. */
16
+ varProfileDetails?: Array<VarProfileDetail> | null;
17
+ constructor(obj?: CreateVarProfileMasterQuery);
18
+ }
1
19
  export declare class IPage<T0> {
2
20
  /** Current. */
3
21
  current?: number | null;
@@ -115,6 +133,8 @@ export declare class VarDTO {
115
133
  varProfile?: VarProfileDTO | null;
116
134
  /** 查询条件配置. */
117
135
  varProfileConfig?: VarProfileConfig | null;
136
+ /** 提交字段配置. */
137
+ varSubmitConfig?: VarSubmitConfig | null;
118
138
  /** 提交字段. */
119
139
  varSubmitFields?: Array<VarSubmitField> | null;
120
140
  constructor(obj?: VarDTO);
@@ -283,7 +303,7 @@ export declare class VarPossibility {
283
303
  export declare class VarProfileConfig {
284
304
  /** 界面标识(FormID). */
285
305
  frm_id?: string | null;
286
- /** 是否将头部放到页面顶部的导航栏中(HeaderTeleportFlag). */
306
+ /** 是否将头部放到页面顶部的导航栏中. */
287
307
  header_teleport_flg?: number | null;
288
308
  /** 主键. */
289
309
  id?: string | null;
@@ -371,8 +391,32 @@ export declare class VarProfileMasterDTO {
371
391
  varProfileDetails?: Array<VarProfileDetail> | null;
372
392
  constructor(obj?: VarProfileMasterDTO);
373
393
  }
394
+ /** 提交字段配置. */
395
+ export declare class VarSubmitConfig {
396
+ /** 默认宽度. */
397
+ dft_width?: number | null;
398
+ /** 界面标识. */
399
+ frm_id?: string | null;
400
+ /** 是否支持全屏. */
401
+ fullscreen_flg?: number | null;
402
+ /** 主键. */
403
+ id?: string | null;
404
+ /** 文本宽度. */
405
+ label_col?: number | null;
406
+ /** 布局方式. */
407
+ layout?: string | null;
408
+ /** 最大宽度. */
409
+ max_width?: number | null;
410
+ /** 最小宽度. */
411
+ min_width?: number | null;
412
+ /** 是否支持拖动宽度. */
413
+ resizable_flg?: number | null;
414
+ constructor(obj?: VarSubmitConfig);
415
+ }
374
416
  /** 提交字段. */
375
417
  export declare class VarSubmitField {
418
+ /** 复制时的默认值. */
419
+ cpy_dft_val?: string | null;
376
420
  /** 复制时是否可以编辑. */
377
421
  cpy_ena_flg?: number | null;
378
422
  /** 复制时可用. */
@@ -383,6 +427,8 @@ export declare class VarSubmitField {
383
427
  cpy_vis_flg?: number | null;
384
428
  /** 复制时的控件宽度(Width). */
385
429
  cpy_width?: number | null;
430
+ /** 创建时的默认值. */
431
+ crt_dft_val?: string | null;
386
432
  /** 创建时是否可以编辑. */
387
433
  crt_ena_flg?: number | null;
388
434
  /** 创建时可用. */
@@ -393,6 +439,8 @@ export declare class VarSubmitField {
393
439
  crt_vis_flg?: number | null;
394
440
  /** 创建时的控件宽度(Width). */
395
441
  crt_width?: number | null;
442
+ /** 删除时的默认值. */
443
+ del_dft_val?: string | null;
396
444
  /** 删除时是否可以编辑. */
397
445
  del_ena_flg?: number | null;
398
446
  /** 删除时可用. */
@@ -405,8 +453,6 @@ export declare class VarSubmitField {
405
453
  del_width?: number | null;
406
454
  /** 界面标识. */
407
455
  frm_id?: string | null;
408
- /** 更新时可用. */
409
- grd_var_nam?: number | null;
410
456
  /** 分组. */
411
457
  grp_nam?: string | null;
412
458
  /** 主键. */
@@ -417,8 +463,12 @@ export declare class VarSubmitField {
417
463
  placeholder?: string | null;
418
464
  /** 显示顺序. */
419
465
  srtseq?: number | null;
466
+ /** 更新时的默认值. */
467
+ upt_dft_val?: string | null;
420
468
  /** 更新时是否可以编辑. */
421
469
  upt_ena_flg?: number | null;
470
+ /** 更新时可用. */
471
+ upt_flg?: number | null;
422
472
  /** 更新时是否必填. */
423
473
  upt_rqr_flg?: number | null;
424
474
  /** 更新时是否可见. */
@@ -5,7 +5,6 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: import("vue").PropType<boolean | null | undefined>;
6
6
  default: undefined;
7
7
  };
8
- /** 点击按钮. */
9
8
  kgIcon: import("vue").PropType<string | null>;
10
9
  kgText: import("vue").PropType<string | null>;
11
10
  kgColor: import("vue").PropType<import("../../..").KG_BTN_COLOR | null>;
@@ -18,7 +17,6 @@ declare const _default: import("vue").DefineComponent<{
18
17
  type: import("vue").PropType<boolean | null | undefined>;
19
18
  default: undefined;
20
19
  };
21
- /** 点击按钮. */
22
20
  kgIcon: import("vue").PropType<string | null>;
23
21
  kgText: import("vue").PropType<string | null>;
24
22
  kgColor: import("vue").PropType<import("../../..").KG_BTN_COLOR | null>;
@@ -1,5 +1,5 @@
1
- import { IKgButtonClickCb, IKgButtonStore } from './index.store';
2
1
  import { IRemoveEventListenerHandler } from '../../consts/index.vm';
2
+ import { IKgButtonClickCb, IKgButtonStore } from './index.store';
3
3
  export declare type IUseKgButton = {
4
4
  formID: string;
5
5
  /** 状态数据. */
@@ -1,6 +1,6 @@
1
- import './KgForm.Item.less';
2
1
  import { KG_CONTROL_CONTEXT, KG_CONTROL_TYPE } from '../../consts';
3
2
  import { IKgTableRecord } from '../KgTable';
3
+ import './KgForm.Item.less';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  kgVarName: {
6
6
  type: import("vue").PropType<string>;
@@ -28,8 +28,8 @@ declare const _default: import("vue").DefineComponent<{
28
28
  };
29
29
  kgType: import("vue").PropType<import("../../..").KG_CONTROL_TYPE>;
30
30
  kgShowTime: {
31
- /** 获取下拉列表数据. */
32
31
  type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
32
+ /** 获取下拉列表数据. */
33
33
  default: undefined;
34
34
  };
35
35
  onKgBeforeLookupOk: import("vue").PropType<(value: any, record: import("../..").IKgTableRecord<{}> | import("../..").IKgTableRecord<{}>[]) => boolean>;
@@ -67,8 +67,8 @@ declare const _default: import("vue").DefineComponent<{
67
67
  };
68
68
  kgType: import("vue").PropType<import("../../..").KG_CONTROL_TYPE>;
69
69
  kgShowTime: {
70
- /** 获取下拉列表数据. */
71
70
  type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
71
+ /** 获取下拉列表数据. */
72
72
  default: undefined;
73
73
  };
74
74
  onKgBeforeLookupOk: import("vue").PropType<(value: any, record: import("../..").IKgTableRecord<{}> | import("../..").IKgTableRecord<{}>[]) => boolean>;
@@ -1,7 +1,8 @@
1
- import { ExtractPropTypes, InjectionKey, PropType } from 'vue';
2
- import { KG_CONTROL_CONTEXT, KG_CONTROL_TYPE } from '../../consts';
3
- import { Dayjs } from 'dayjs';
4
1
  import { SharedTimeProps } from 'ant-design-vue/es/vc-picker/panels/TimePanel';
2
+ import { Dayjs } from 'dayjs';
3
+ import { ComputedRef, ExtractPropTypes, InjectionKey, PropType } from 'vue';
4
+ import { VarConfig, VarProfileDetail, VarSubmitField } from '../../apis/WMS/models';
5
+ import { KG_CONTROL_CONTEXT, KG_CONTROL_TYPE } from '../../consts';
5
6
  import { IKgTableRecord } from '../KgTable';
6
7
  export declare type IKgFormItemValue = string | number | Array<string | number>;
7
8
  export declare const getProps: () => {
@@ -12,7 +13,7 @@ export declare const getProps: () => {
12
13
  };
13
14
  /**
14
15
  * 控件所处环境.
15
- * @default KG_CONTROL_CONTEXT.SUBMIT
16
+ * @default {@link KG_CONTROL_CONTEXT.SUBMIT}
16
17
  */
17
18
  kgContext: {
18
19
  type: PropType<string>;
@@ -79,5 +80,14 @@ export declare const getProps: () => {
79
80
  onKgSelectDatasChange: PropType<(datas: Array<any>) => void>;
80
81
  };
81
82
  export declare type IKgFormItemProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
83
+ /** 插槽 control 的参数. */
84
+ export declare type IKgFormItemSlotControl = {
85
+ varName: string;
86
+ props: ComputedRef<IKgFormItemProps>;
87
+ model: ComputedRef<Record<string, any>>;
88
+ varConfig: VarConfig;
89
+ varProfileDetail: VarProfileDetail;
90
+ varSubmitField: VarSubmitField;
91
+ };
82
92
  /** 依赖注入 onKgBeforeLookupOk 参数. */
83
93
  export declare const DI_ON_KG_BEFORE_LOOKUP_OK: InjectionKey<(value: any | Array<any>, record: IKgTableRecord | Array<IKgTableRecord>) => boolean>;
@@ -6,6 +6,8 @@ export declare const getProps: () => {
6
6
  type: PropType<"left" | "right" | "bottom" | "top">;
7
7
  default: string;
8
8
  };
9
+ /** 是否禁用. */
10
+ kgDisabled: PropType<boolean>;
9
11
  /** 当前宽度. */
10
12
  kgWidth: {
11
13
  type: PropType<number>;
@@ -46,6 +48,8 @@ declare const _default: import("vue").DefineComponent<{
46
48
  type: PropType<"left" | "right" | "bottom" | "top">;
47
49
  default: string;
48
50
  };
51
+ /** 是否禁用. */
52
+ kgDisabled: PropType<boolean>;
49
53
  /** 当前宽度. */
50
54
  kgWidth: {
51
55
  type: PropType<number>;
@@ -84,6 +88,8 @@ declare const _default: import("vue").DefineComponent<{
84
88
  type: PropType<"left" | "right" | "bottom" | "top">;
85
89
  default: string;
86
90
  };
91
+ /** 是否禁用. */
92
+ kgDisabled: PropType<boolean>;
87
93
  /** 当前宽度. */
88
94
  kgWidth: {
89
95
  type: PropType<number>;
@@ -3,17 +3,20 @@ import './KgSearch.ConfigModal.less';
3
3
  export declare const getProps: () => {
4
4
  visible: PropType<boolean>;
5
5
  'onUpdate:visible': PropType<(value: boolean) => void>;
6
- formID: PropType<string>;
6
+ /** 主页面的页面标识. */
7
+ hostFormID: PropType<string>;
7
8
  };
8
9
  export declare type IKgSearchConfigModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
9
10
  declare const _default: import("vue").DefineComponent<{
10
11
  visible: PropType<boolean>;
11
12
  'onUpdate:visible': PropType<(value: boolean) => void>;
12
- formID: PropType<string>;
13
+ /** 主页面的页面标识. */
14
+ hostFormID: PropType<string>;
13
15
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
14
16
  visible: PropType<boolean>;
15
17
  'onUpdate:visible': PropType<(value: boolean) => void>;
16
- formID: PropType<string>;
18
+ /** 主页面的页面标识. */
19
+ hostFormID: PropType<string>;
17
20
  }>> & {
18
21
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
19
22
  }, {}>;
@@ -0,0 +1,5 @@
1
+ import { ColumnsType } from 'ant-design-vue/es/table';
2
+ import { VarProfileDetail } from '../../../apis/WMS/models';
3
+ export declare const FORM_ID = "kg-search-config-modal";
4
+ export declare const leftVarProfileDetailColumns: (hostFormID: string) => ColumnsType<VarProfileDetail>;
5
+ export declare const rightVarProfileDetailColumns: (hostFormID: string) => ColumnsType<VarProfileDetail>;
@@ -1,6 +1,6 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
3
2
  import { IRemoveEventListenerHandler } from '../../consts/index.vm';
3
+ import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
4
4
  export declare type IUseKgSearch = {
5
5
  formID: string;
6
6
  /** 状态数据. */
@@ -1 +1 @@
1
- export declare const FORM_ID = "kg-search-config-modal";
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import './KgSubmit.less';
3
+ export declare const getProps: () => any;
4
+ export declare type IKgSubmitProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
5
+ declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
6
+ [x: string]: any;
7
+ }>;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * 表单数据对象.
4
+ */
5
+ export declare function _useFormModel(): {
6
+ model: Ref<Record<string, any>>;
7
+ };
@@ -0,0 +1,4 @@
1
+ export { default as KgSubmit, type IKgSubmitProps } from './KgSubmit';
2
+ export * from './index.hooks';
3
+ export * from './index.store';
4
+ export * from './index.vm';
@@ -0,0 +1,17 @@
1
+ import { IRemoveEventListenerHandler } from '../../consts/index.vm';
2
+ import { IKgSubmitBeforeOkCb, IKgSubmitCloseCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
3
+ export declare type IUseKgSubmit = {
4
+ formID: string;
5
+ /** 状态数据. */
6
+ store: IKgSubmitStore;
7
+ /** 监听事件: 打开抽屉. */
8
+ onOpen(cb: IKgSubmitOpenCb): IRemoveEventListenerHandler;
9
+ /** 监听事件: 关闭抽屉. */
10
+ onClose(cb: IKgSubmitCloseCb): IRemoveEventListenerHandler;
11
+ /** 监听事件: 点击保存按钮之后, 执行默认逻辑之前. */
12
+ onBeforeOk(cb: IKgSubmitBeforeOkCb): IRemoveEventListenerHandler;
13
+ };
14
+ /**
15
+ * @param formID 界面标识.
16
+ */
17
+ export declare function useKgSubmit(formID?: string): IUseKgSubmit;
@@ -0,0 +1,35 @@
1
+ import { StoreDefinition } from 'pinia';
2
+ import { Ref } from 'vue';
3
+ /**
4
+ * 事件类型.
5
+ * 'open': 打开抽屉
6
+ * 'close': 关闭抽屉
7
+ * 'beforeOk': 点击保存按钮之后, 执行默认逻辑之前
8
+ */
9
+ export declare type IKgSubmitEvent = 'open' | 'close' | 'beforeOk';
10
+ /** 事件监听函数: open. */
11
+ export declare type IKgSubmitOpenCb = (args?: any | null) => void;
12
+ /** 事件监听函数: close. */
13
+ export declare type IKgSubmitCloseCb = (args?: any | null) => void;
14
+ /** 事件监听函数: beforeOk. */
15
+ export declare type IKgSubmitBeforeOkCb = (model: Ref<Record<string, any>>) => void;
16
+ export declare type IKgSubmitCb = IKgSubmitOpenCb | IKgSubmitCloseCb | IKgSubmitBeforeOkCb;
17
+ export interface IKgSubmitState {
18
+ openListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
19
+ closeListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
20
+ beforeOkListenersMap: Map<string, Array<IKgSubmitBeforeOkCb>>;
21
+ }
22
+ export declare type IKgSubmitStoreDefinition = StoreDefinition<'KgSubmit', IKgSubmitState, {}, {
23
+ dispose(formID?: string | null): void;
24
+ addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitCb): void;
25
+ removeEventListener(formID: string, event: IKgSubmitEvent, cb?: IKgSubmitCb): void;
26
+ /**
27
+ * 触发事件.
28
+ * @param formID 界面标识.
29
+ * @param event 事件名称.
30
+ * @param args 数据.
31
+ */
32
+ emit(formID: string, event: IKgSubmitEvent, args?: any | null): void;
33
+ }>;
34
+ export declare type IKgSubmitStore = ReturnType<IKgSubmitStoreDefinition>;
35
+ export declare const useKgSubmitStore: () => IKgSubmitStoreDefinition;
@@ -0,0 +1,5 @@
1
+ export declare const DEFAULT_MIN_WIDTH = 300;
2
+ export declare const DEFAULT_MAX_WIDTH = 1200;
3
+ export declare const DEFAULT_WIDTH = 600;
4
+ export declare const DEFAULT_LAYOUT = "vertical";
5
+ export declare const DEFAULT_LABEL_COL = 4;
@@ -1,6 +1,6 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
3
2
  import { IRemoveEventListenerHandler } from '../../consts/index.vm';
3
+ import { IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
4
4
  export declare type IUseKgTable = {
5
5
  formID: string;
6
6
  /** 状态数据. */
@@ -1,15 +1,15 @@
1
1
  import { StoreDefinition } from 'pinia';
2
- import { IKgTableRecord } from './index.vm';
3
2
  import { IPage } from '../../apis/WMS/models';
3
+ import { IKgTableRecord } from './index.vm';
4
4
  /**
5
5
  * 事件类型.
6
6
  * 'rowDoubleClick': 双击某行
7
7
  * 'retrieve': 查询数据成功
8
8
  */
9
9
  export declare type IKgTableEvent = 'rowDoubleClick' | 'retrieve';
10
- /** 事件监听函数: 双击某行. */
10
+ /** 事件监听函数: rowDoubleClick. */
11
11
  export declare type IKgTableRowDoubleClickCb = (record: IKgTableRecord) => void;
12
- /** 事件监听函数: 查询数据成功. */
12
+ /** 事件监听函数: retrieve. */
13
13
  export declare type IKgTableRetrieveCb = (page: IPage<IKgTableRecord> | undefined | null) => void;
14
14
  export declare type IKgTableCb = IKgTableRowDoubleClickCb | IKgTableRetrieveCb;
15
15
  export interface IKgTableState {
@@ -38,7 +38,7 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
38
38
  dispose(formID?: string | null): void;
39
39
  addEventListener(formID: string, event: IKgTableEvent, cb: IKgTableCb): void;
40
40
  removeEventListener(formID: string, event: IKgTableEvent, cb?: IKgTableCb): void;
41
- emit(formID: string, event: IKgTableEvent, record?: any | null): void;
41
+ emit(formID: string, event: IKgTableEvent, args?: any | null): void;
42
42
  setSelectedRows(formID: string, selectedRows: Array<IKgTableRecord>): void;
43
43
  setIsRetrieved(formID: string, value: boolean): void;
44
44
  setIsRetrieving(formID: string, value: boolean): void;
@@ -1,8 +1,15 @@
1
- import { ExtractPropTypes } from 'vue';
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
2
  import './KgVar.less';
3
- export declare const getProps: () => any;
3
+ export declare const getProps: () => {
4
+ /** 插槽. */
5
+ kgSlots: PropType<Record<string, any>>;
6
+ };
4
7
  export declare type IKgVarProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
5
- declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
6
- [x: string]: any;
7
- }>;
8
+ declare const _default: import("vue").DefineComponent<{
9
+ /** 插槽. */
10
+ kgSlots: PropType<Record<string, any>>;
11
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
12
+ /** 插槽. */
13
+ kgSlots: PropType<Record<string, any>>;
14
+ }>>, {}>;
8
15
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { type StoreDefinition } from 'pinia';
2
- import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitField } from '../../apis/WMS/models';
2
+ import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
3
3
  export interface IKgVarState {
4
4
  /**
5
5
  * 当前可能打开了多个界面, 需要按照先后顺序记录下来, 当打开变量配置弹窗时, 打开的是最近那个页面的变量配置.
@@ -20,6 +20,7 @@ export interface IKgVarState {
20
20
  varPossibilitiesMap: Map<string, Array<VarPossibility>>;
21
21
  varConfigsMap: Map<string, Array<VarConfig>>;
22
22
  varButtonsMap: Map<string, Array<VarButton>>;
23
+ varSubmitConfigMap: Map<string, VarSubmitConfig | null>;
23
24
  varSubmitFieldsMap: Map<string, Array<VarSubmitField>>;
24
25
  varProfileConfigMap: Map<string, VarProfileConfig | null>;
25
26
  varProfileMap: Map<string, {
@@ -50,10 +51,33 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
50
51
  getVarPossibility(): (formID?: string | null, var_nam?: string | null) => VarPossibility | null;
51
52
  getVarConfig(): (formID?: string | null, var_nam?: string | null) => VarConfig | null;
52
53
  getVarButtons(): (formID?: string | null) => Array<VarButton> | null;
54
+ getVarSubmitConfig(): (formID?: string | null) => VarSubmitConfig | null;
55
+ /** 获取所有提交字段. */
53
56
  getVarSubmitFields(): (formID?: string | null) => Array<VarSubmitField> | null;
57
+ /** 获取创建时的提交字段. */
58
+ getVarSubmitFieldsForCreate(): (formID?: string | null) => Array<VarSubmitField> | null;
59
+ /** 获取创建时的提交字段: 关键字段. */
60
+ getVarSubmitFieldsForCreateKey(): (formID?: string | null) => Array<VarSubmitField> | null;
61
+ /** 获取创建时的提交字段: 不是关键字段. */
62
+ getVarSubmitFieldsForCreateNotKey(): (formID?: string | null) => Array<VarSubmitField> | null;
63
+ /** 获取更新时的提交字段. */
64
+ getVarSubmitFieldsForUpdate(): (formID?: string | null) => Array<VarSubmitField> | null;
65
+ /** 获取更新时的提交字段: 关键字段. */
66
+ getVarSubmitFieldsForUpdateKey(): (formID?: string | null) => Array<VarSubmitField> | null;
67
+ /** 获取更新时的提交字段: 不是关键字段. */
68
+ getVarSubmitFieldsForUpdateNotKey(): (formID?: string | null) => Array<VarSubmitField> | null;
69
+ /** 获取复制时的提交字段. */
70
+ getVarSubmitFieldsForCopy(): (formID?: string | null) => Array<VarSubmitField> | null;
71
+ /** 获取复制时的提交字段: 关键字段. */
72
+ getVarSubmitFieldsForCopyKey(): (formID?: string | null) => Array<VarSubmitField> | null;
73
+ /** 获取复制时的提交字段: 不是关键字段. */
74
+ getVarSubmitFieldsForCopyNotKey(): (formID?: string | null) => Array<VarSubmitField> | null;
54
75
  getVarSubmitField(): (formID?: string | null, var_nam?: string | null) => VarSubmitField | null;
55
- getVarButtonSearch(): (formID?: string | null) => VarButton | null;
56
76
  getVarButton(): (formID?: string | null, var_nam?: string | null) => VarButton | null;
77
+ getVarButtonSearch(): (formID?: string | null) => VarButton | null;
78
+ getVarButtonCreate(): (formID?: string | null) => VarButton | null;
79
+ getVarButtonUpdate(): (formID?: string | null) => VarButton | null;
80
+ getVarButtonCopy(): (formID?: string | null) => VarButton | null;
57
81
  getVarProfileConfig(): (formID?: string | null) => VarProfileConfig | null;
58
82
  getVarProfileMasters(): (formID?: string | null) => Array<VarProfileMasterDTO> | null;
59
83
  getVarProfileDetail(): (formID?: string | null, var_nam?: string | null) => VarProfileDetail | null;
@@ -1,6 +1,7 @@
1
- import { VarButton, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarSubmitField } from '../../apis/WMS/models';
1
+ import { VarButton, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
2
2
  export declare function transformVarGridDTO(varGridDTO?: VarGridDTO | null): VarGridDTO | null;
3
3
  export declare function transformVarProfileMasterDTOs(varGridMasterDTOs?: Array<VarGridMasterDTO> | null): Array<VarGridMasterDTO>;
4
+ export declare function transformVarSubmitConfig(varSubmitConfig?: VarSubmitConfig | null): VarSubmitConfig | null;
4
5
  export declare function transformVarSubmitFields(varSubmitFields?: Array<VarSubmitField> | null): Array<VarSubmitField>;
5
6
  export declare function transformVarButtons(varButtons?: Array<VarButton> | null): Array<VarButton>;
6
7
  /**
@@ -0,0 +1,3 @@
1
+ import { InjectionKey } from 'vue';
2
+ /** 注入 kgSlots 参数. */
3
+ export declare const DI_KG_SLOTS: InjectionKey<Record<string, any> | undefined>;
@@ -2,6 +2,7 @@ export * from './KgModal';
2
2
  export * from './KgProgressA';
3
3
  export * from './KgResizable';
4
4
  export * from './KgSearch';
5
+ export * from './KgSubmit';
5
6
  export * from './KgTable';
6
7
  export * from './KgVar';
7
8
  export * from './KgVarConfig';
@@ -54,7 +54,9 @@ declare const _default: {
54
54
  confirm: string;
55
55
  confirmDelete: string;
56
56
  copy: string;
57
+ copySuccess: string;
57
58
  create: string;
59
+ createSuccess: string;
58
60
  delete: string;
59
61
  deleteSuccess: string;
60
62
  edit: string;
@@ -71,6 +73,7 @@ declare const _default: {
71
73
  show: string;
72
74
  tip: string;
73
75
  update: string;
76
+ updateSuccess: string;
74
77
  yes: string;
75
78
  };
76
79
  };
@@ -55,7 +55,9 @@ export declare const KG_I18N: {
55
55
  confirm: string;
56
56
  confirmDelete: string;
57
57
  copy: string;
58
+ copySuccess: string;
58
59
  create: string;
60
+ createSuccess: string;
59
61
  delete: string;
60
62
  deleteSuccess: string;
61
63
  edit: string;
@@ -72,6 +74,7 @@ export declare const KG_I18N: {
72
74
  show: string;
73
75
  tip: string;
74
76
  update: string;
77
+ updateSuccess: string;
75
78
  yes: string;
76
79
  };
77
80
  };
@@ -130,7 +133,9 @@ export declare const KG_I18N: {
130
133
  confirm: string;
131
134
  confirmDelete: string;
132
135
  copy: string;
136
+ copySuccess: string;
133
137
  create: string;
138
+ createSuccess: string;
134
139
  delete: string;
135
140
  deleteSuccess: string;
136
141
  edit: string;
@@ -147,6 +152,7 @@ export declare const KG_I18N: {
147
152
  show: string;
148
153
  tip: string;
149
154
  update: string;
155
+ updateSuccess: string;
150
156
  yes: string;
151
157
  };
152
158
  };
@@ -53,7 +53,9 @@ declare const _default: {
53
53
  confirm: string;
54
54
  confirmDelete: string;
55
55
  copy: string;
56
+ copySuccess: string;
56
57
  create: string;
58
+ createSuccess: string;
57
59
  delete: string;
58
60
  deleteSuccess: string;
59
61
  edit: string;
@@ -70,6 +72,7 @@ declare const _default: {
70
72
  show: string;
71
73
  tip: string;
72
74
  update: string;
75
+ updateSuccess: string;
73
76
  yes: string;
74
77
  };
75
78
  };
@@ -43,7 +43,7 @@ export declare const enum KG_CONTROL_TYPE {
43
43
  /** 表单控件所处环境. */
44
44
  export declare const enum KG_CONTROL_CONTEXT {
45
45
  /** 位于查询条件. */
46
- PROFILE = "PROFILE",
46
+ SEARCH = "SEARCH",
47
47
  /** 位于表单(创建/更新/复制/...). */
48
48
  SUBMIT = "SUBMIT"
49
49
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * DOM 工具.
3
+ */
4
+ export declare class DomUtil {
5
+ /**
6
+ * 判断元素是否不能响应点击事件.
7
+ * 如果不想让某个元素响应点击事件, 则可以给它的父元素加上 kg-not-clickable 样式类.
8
+ * @param el 元素.
9
+ * @param classes 除了 kg-not-clickable 之外额外需要判断的样式类.
10
+ */
11
+ static isNotClickable(el?: Element | null, classes?: Array<string>): boolean;
12
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './app.util';
2
+ export * from './dom.util';
2
3
  export * from './kg.util';
3
4
  export * from './logger.util';
4
5
  export * from './route.util';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",
@@ -1,20 +0,0 @@
1
- import { ExtractPropTypes, PropType } from 'vue';
2
- import './KgSearch.ConfigModal.CreateModal.less';
3
- export declare const getProps: () => {
4
- visible: PropType<boolean>;
5
- 'onUpdate:visible': PropType<(value: boolean) => void>;
6
- formID: PropType<string>;
7
- };
8
- export declare type IKgSearchConfigModalCreateModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
9
- declare const _default: import("vue").DefineComponent<{
10
- visible: PropType<boolean>;
11
- 'onUpdate:visible': PropType<(value: boolean) => void>;
12
- formID: PropType<string>;
13
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
14
- visible: PropType<boolean>;
15
- 'onUpdate:visible': PropType<(value: boolean) => void>;
16
- formID: PropType<string>;
17
- }>> & {
18
- "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
19
- }, {}>;
20
- export default _default;
@@ -1,4 +0,0 @@
1
- import { ColumnsType } from 'ant-design-vue/es/table';
2
- import { VarProfileDetail } from '../../../apis/WMS/models';
3
- export declare const leftVarProfileDetailColumns: () => ColumnsType<VarProfileDetail>;
4
- export declare const rightVarProfileDetailColumns: () => ColumnsType<VarProfileDetail>;