@kengic/vue 0.7.6 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,8 @@
1
1
  import { ColumnsType } from 'ant-design-vue/es/table';
2
+ import { TransferItem } from 'ant-design-vue/es/transfer';
3
+ import { Ref, UnwrapRef } from 'vue';
2
4
  import { VarProfileDetail } from '../../../apis/WMS/models';
3
5
  export declare const leftVarProfileDetailColumns: (hostFormID: string) => ColumnsType<VarProfileDetail>;
4
6
  export declare const rightVarProfileDetailColumns: (hostFormID: string) => ColumnsType<VarProfileDetail>;
7
+ export declare type IUseDragRow = {};
8
+ export declare function _useDragRow(transferRef: Ref<UnwrapRef<HTMLDivElement | null>>, transferRightRows: Ref<UnwrapRef<Array<TransferItem>>>): IUseDragRow;
@@ -28,8 +28,10 @@ export declare type IKgTableBeforeRetrieveCbParam = {
28
28
  export declare type IKgTableBeforeRetrieveCb = ((param: IKgTableBeforeRetrieveCbParam) => Promise<boolean>) & IKgEventCb;
29
29
  /** 事件监听函数: beforeSetDatas. */
30
30
  export declare type IKgTableBeforeSetDatasCbParam = {
31
- /** 经过组件处理之后的列表数据. */
31
+ /** 列表数据. */
32
32
  datas: Ref<Array<IKgTableRow>>;
33
+ /** 设置列表数据. */
34
+ setDatas(datas: Array<IKgTableRow>): void;
33
35
  /** 总数. */
34
36
  total: Ref<number>;
35
37
  };
@@ -38,13 +40,17 @@ export declare type IKgTableBeforeSetDatasCb = ((param: IKgTableBeforeSetDatasCb
38
40
  export declare type IKgTableRetrieveCbParam = {
39
41
  /** 接口返回的分页数据. */
40
42
  page: IPage<IKgTableRow> | undefined | null;
41
- /** 经过组件处理之后的列表数据. */
43
+ /** 列表数据. */
42
44
  datas: Ref<Array<IKgTableRow>>;
45
+ /** 设置列表数据. */
46
+ setDatas(datas: Array<IKgTableRow>): void;
43
47
  };
44
48
  export declare type IKgTableRetrieveCb = ((param: IKgTableRetrieveCbParam) => Promise<boolean>) & IKgEventCb;
45
49
  export declare type IKgTableCbParam = IKgTableRowDoubleClickParam | IKgTableBeforeRetrieveCbParam | IKgTableBeforeSetDatasCbParam | IKgTableRetrieveCbParam;
46
50
  export declare type IKgTableCb = IKgTableRowDoubleClickCb | IKgTableBeforeRetrieveCb | IKgTableBeforeSetDatasCb | IKgTableRetrieveCb;
47
51
  export interface IKgTableState {
52
+ /** 列表数据. */
53
+ datasMap: Map<String, Array<IKgTableRow>>;
48
54
  /** 勾选的行的主键. */
49
55
  selectedRowKeysMap: Map<string, Ref<Array<Key>>>;
50
56
  /** 勾选的行. */
@@ -66,43 +72,51 @@ export interface IKgTableState {
66
72
  retrieveListenersMap: Map<string, Array<IKgTableRetrieveCb>>;
67
73
  }
68
74
  export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTableState, {
75
+ /** 列表数据. */
76
+ getDatas(): (formID: string | null | undefined) => Array<IKgTableRow>;
69
77
  /** 当前勾选的所有行的主键. */
70
- getSelectedRowKeys(): (formID?: string | null) => Ref<Array<Key>>;
78
+ getSelectedRowKeys(): (formID: string | null | undefined) => Ref<Array<Key>>;
71
79
  /** 当前勾选的所有行. */
72
- getSelectedRows(): (formID?: string | null) => Array<IKgTableRow> | null;
80
+ getSelectedRows(): (formID: string | null | undefined) => Array<IKgTableRow> | null;
73
81
  /** 当前勾选的第一行. */
74
- getSelectedFirstRow(): (formID?: string | null) => IKgTableRow | null;
82
+ getSelectedFirstRow(): (formID: string | null | undefined) => IKgTableRow | null;
75
83
  /** 当前勾选的唯一行. */
76
- getSelectedRow(): (formID?: string | null) => IKgTableRow | null;
77
- getIsRetrieved(): (formID?: string | null) => boolean | null;
78
- getIsRetrieving(): (formID?: string | null) => boolean | null;
79
- getTableWidth(): (formID?: string | null) => number | null;
84
+ getSelectedRow(): (formID: string | null | undefined) => IKgTableRow | null;
85
+ getIsRetrieved(): (formID: string | null | undefined) => boolean | null;
86
+ getIsRetrieving(): (formID: string | null | undefined) => boolean | null;
87
+ getTableWidth(): (formID: string | null | undefined) => number | null;
80
88
  }, {
81
- dispose(formID?: string | null): void;
82
- addEventListener(formID: string, event: IKgTableEvent, cb: IKgTableCb): void;
83
- removeEventListener(formID: string, event: IKgTableEvent, cb?: IKgTableCb): void;
84
- emit(formID: string, event: IKgTableEvent, param: IKgTableCbParam): Promise<boolean>;
89
+ dispose(formID: string | null | undefined): void;
90
+ addEventListener(formID: string | null | undefined, event: IKgTableEvent, cb: IKgTableCb): void;
91
+ removeEventListener(formID: string | null | undefined, event: IKgTableEvent, cb?: IKgTableCb): void;
92
+ emit(formID: string | null | undefined, event: IKgTableEvent, param: IKgTableCbParam): Promise<boolean>;
93
+ /**
94
+ * 设置列表数据.
95
+ * @param formID 界面标识.
96
+ * @param datas 列表数据.
97
+ */
98
+ setDatas(formID: string | null | undefined, datas: Array<IKgTableRow>): void;
85
99
  /**
86
100
  * 设置勾选的行.
87
101
  * @param formID 界面标识.
88
102
  * @param selectedRows 勾选的行.
89
103
  */
90
- setSelectedRows(formID: string, selectedRows: Array<IKgTableRow>): void;
104
+ setSelectedRows(formID: string | null | undefined, selectedRows: Array<IKgTableRow>): void;
91
105
  /**
92
106
  * 设置某行的勾选状态.
93
107
  * @param formID 界面标识.
94
108
  * @param row 行.
95
109
  * @param selected 是否勾选.
96
110
  */
97
- setRowSelect(formID: string, row: IKgTableRow, selected: boolean): void;
98
- setIsRetrieved(formID: string, value: boolean): void;
99
- setIsRetrieving(formID: string, value: boolean): void;
100
- setTableWidth(formID: string, value: number): void;
111
+ setRowSelect(formID: string | null | undefined, row: IKgTableRow, selected: boolean): void;
112
+ setIsRetrieved(formID: string | null | undefined, value: boolean): void;
113
+ setIsRetrieving(formID: string | null | undefined, value: boolean): void;
114
+ setTableWidth(formID: string | null | undefined, value: number): void;
101
115
  /**
102
116
  * 清空表格数据.
103
117
  * @param formID 界面标识.
104
118
  */
105
- clearDatas(formID: string): void;
119
+ clearDatas(formID: string | null | undefined): void;
106
120
  }>;
107
121
  export declare type IKgTableStore = ReturnType<IKgTableStoreDefinition>;
108
122
  export declare const useKgTableStore: () => IKgTableStoreDefinition;
@@ -119,6 +119,7 @@ declare const _default: {
119
119
  delete: string;
120
120
  deleteSuccess: string;
121
121
  downloadImportTemplate: string;
122
+ dragToSort: string;
122
123
  edit: string;
123
124
  emptyText: string;
124
125
  export: string;
@@ -118,6 +118,7 @@ declare const _default: {
118
118
  delete: string;
119
119
  deleteSuccess: string;
120
120
  downloadImportTemplate: string;
121
+ dragToSort: string;
121
122
  edit: string;
122
123
  emptyText: string;
123
124
  export: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.7.6",
3
+ "version": "0.8.0",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",