@kengic/vue 0.6.11-beta.1 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
2
2
|
import { IRemoveEventListenerHandler } from '../../consts';
|
3
|
-
import { IKgTableBeforeRetrieveCb, IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
|
3
|
+
import { IKgTableBeforeRetrieveCb, IKgTableBeforeSetDatasCb, IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
|
4
4
|
export declare type IUseKgTable = {
|
5
5
|
formID: string;
|
6
6
|
/** 状态数据. */
|
@@ -42,7 +42,13 @@ export declare type IUseKgTable = {
|
|
42
42
|
*/
|
43
43
|
onBeforeRetrieve(cb: IKgTableBeforeRetrieveCb, once?: boolean): IRemoveEventListenerHandler;
|
44
44
|
/**
|
45
|
-
* 监听事件:
|
45
|
+
* 监听事件: 查询请求成功, 表格数据尚未赋值. 此处可以对返回的列表数据作处理.
|
46
|
+
* @param cb 回调函数.
|
47
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
48
|
+
*/
|
49
|
+
onBeforeSetDatas(cb: IKgTableBeforeSetDatasCb, once?: boolean): IRemoveEventListenerHandler;
|
50
|
+
/**
|
51
|
+
* 监听事件: 查询请求成功, 表格数据已经赋值.
|
46
52
|
* @param cb 回调函数.
|
47
53
|
* @param once 是否只会触发一次. 默认为 undefined.
|
48
54
|
*/
|
@@ -6,11 +6,12 @@ import { IKgEventCb } from '../../consts';
|
|
6
6
|
import { IKgTableRow } from './index.vm';
|
7
7
|
/**
|
8
8
|
* 事件类型.
|
9
|
-
* 'rowDoubleClick':
|
10
|
-
* 'beforeRetrieve':
|
11
|
-
* '
|
9
|
+
* 'rowDoubleClick': 双击某行.
|
10
|
+
* 'beforeRetrieve': 即将发起查询请求.
|
11
|
+
* 'beforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对返回的列表数据作处理.
|
12
|
+
* 'retrieve': 查询请求成功, 表格数据已经赋值.
|
12
13
|
*/
|
13
|
-
export declare type IKgTableEvent = 'rowDoubleClick' | 'beforeRetrieve' | 'retrieve';
|
14
|
+
export declare type IKgTableEvent = 'rowDoubleClick' | 'beforeRetrieve' | 'beforeSetDatas' | 'retrieve';
|
14
15
|
/** 事件监听函数: rowDoubleClick. */
|
15
16
|
export declare type IKgTableRowDoubleClickParam = {
|
16
17
|
/** 双击的行. */
|
@@ -25,16 +26,24 @@ export declare type IKgTableBeforeRetrieveCbParam = {
|
|
25
26
|
response: Ref;
|
26
27
|
};
|
27
28
|
export declare type IKgTableBeforeRetrieveCb = ((param: IKgTableBeforeRetrieveCbParam) => Promise<boolean>) & IKgEventCb;
|
29
|
+
/** 事件监听函数: beforeSetDatas. */
|
30
|
+
export declare type IKgTableBeforeSetDatasCbParam = {
|
31
|
+
/** 经过组件处理之后的列表数据. */
|
32
|
+
datas: Ref<Array<IKgTableRow>>;
|
33
|
+
/** 总数. */
|
34
|
+
total: Ref<number>;
|
35
|
+
};
|
36
|
+
export declare type IKgTableBeforeSetDatasCb = ((param: IKgTableBeforeSetDatasCbParam) => Promise<boolean>) & IKgEventCb;
|
28
37
|
/** 事件监听函数: retrieve. */
|
29
38
|
export declare type IKgTableRetrieveCbParam = {
|
30
39
|
/** 接口返回的分页数据. */
|
31
40
|
page: IPage<IKgTableRow> | undefined | null;
|
32
|
-
/**
|
41
|
+
/** 经过组件处理之后的列表数据. */
|
33
42
|
datas: Ref<Array<IKgTableRow>>;
|
34
43
|
};
|
35
44
|
export declare type IKgTableRetrieveCb = ((param: IKgTableRetrieveCbParam) => Promise<boolean>) & IKgEventCb;
|
36
|
-
export declare type IKgTableCbParam = IKgTableRowDoubleClickParam | IKgTableBeforeRetrieveCbParam | IKgTableRetrieveCbParam;
|
37
|
-
export declare type IKgTableCb = IKgTableRowDoubleClickCb | IKgTableBeforeRetrieveCb | IKgTableRetrieveCb;
|
45
|
+
export declare type IKgTableCbParam = IKgTableRowDoubleClickParam | IKgTableBeforeRetrieveCbParam | IKgTableBeforeSetDatasCbParam | IKgTableRetrieveCbParam;
|
46
|
+
export declare type IKgTableCb = IKgTableRowDoubleClickCb | IKgTableBeforeRetrieveCb | IKgTableBeforeSetDatasCb | IKgTableRetrieveCb;
|
38
47
|
export interface IKgTableState {
|
39
48
|
/** 勾选的行的主键. */
|
40
49
|
selectedRowKeysMap: Map<string, Ref<Array<Key>>>;
|
@@ -53,6 +62,7 @@ export interface IKgTableState {
|
|
53
62
|
/** '双击某行'事件监听函数列表. */
|
54
63
|
rowDoubleClickListenersMap: Map<string, Array<IKgTableRowDoubleClickCb>>;
|
55
64
|
beforeRetrieveListenersMap: Map<string, Array<IKgTableBeforeRetrieveCb>>;
|
65
|
+
beforeSetDatasListenersMap: Map<string, Array<IKgTableBeforeSetDatasCb>>;
|
56
66
|
retrieveListenersMap: Map<string, Array<IKgTableRetrieveCb>>;
|
57
67
|
}
|
58
68
|
export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTableState, {
|
package/package.json
CHANGED
@@ -1,86 +1,86 @@
|
|
1
|
-
{
|
2
|
-
"name": "@kengic/vue",
|
3
|
-
"version": "0.6.11
|
4
|
-
"scripts": {
|
5
|
-
"build": "rimraf dist && vue-tsc && vite build",
|
6
|
-
"build:dev": "rimraf dist && vue-tsc && vite build --mode development",
|
7
|
-
"publish:all:beta": "npm run bump-version:beta && npm run publish:all",
|
8
|
-
"publish:all:patch": "npm run bump-version:patch && npm run publish:all",
|
9
|
-
"publish:all:minor": "npm run bump-version:minor && npm run publish:all",
|
10
|
-
"publish:all:major": "npm run bump-version:major && npm run publish:all",
|
11
|
-
"----------------------- C": "",
|
12
|
-
"bump-to:luotao.c.wms-vue3": "tsx scripts/bump-to.luotao.c.wms-vue3.ts",
|
13
|
-
"copy-to:luotao.c.wms-vue3": "npm run build:dev && tsx scripts/copy-to.luotao.c.wms-vue3.ts",
|
14
|
-
"bump-to:luotao.c.wms-vue3:focus": "tsx scripts/bump-to.luotao.c.wms-vue3.focus.ts",
|
15
|
-
"copy-to:luotao.c.wms-vue3:focus": "npm run build:dev && tsx scripts/copy-to.luotao.c.wms-vue3.focus.ts",
|
16
|
-
"--------------------- D": "",
|
17
|
-
"bump-to:luotao.wms-vue3": "tsx scripts/bump-to.luotao.wms-vue3.ts",
|
18
|
-
"copy-to:luotao.wms-vue3": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.ts",
|
19
|
-
"bump-to:luotao.wms-vue3:focus": "tsx scripts/bump-to.luotao.wms-vue3.focus.ts",
|
20
|
-
"copy-to:luotao.wms-vue3:focus": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.focus.ts",
|
21
|
-
"--------------------": "",
|
22
|
-
"cnpm:sync": "cnpm sync @kengic/vue",
|
23
|
-
"gen:apis:WMS": "kengic-pont generate-apis --config kg.config.ts --origin WMS",
|
24
|
-
"bump-version:beta": "tsx scripts/bump.ts beta",
|
25
|
-
"bump-version:major": "tsx scripts/bump.ts major",
|
26
|
-
"bump-version:minor": "tsx scripts/bump.ts minor",
|
27
|
-
"bump-version:patch": "tsx scripts/bump.ts patch",
|
28
|
-
"publish:all": "tsx scripts/publish.ts",
|
29
|
-
"publish:npm": "npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public"
|
30
|
-
},
|
31
|
-
"peerDependencies": {
|
32
|
-
"vue": "3.2.43"
|
33
|
-
},
|
34
|
-
"dependencies": {
|
35
|
-
"@ant-design/icons-vue": "6.1.0",
|
36
|
-
"@iconify-icons/ant-design": "1.2.5",
|
37
|
-
"@iconify/vue": "4.1.1",
|
38
|
-
"@vueuse/core": "8.9.4",
|
39
|
-
"@vueuse/shared": "8.9.4",
|
40
|
-
"ant-design-vue": "3.2.14",
|
41
|
-
"axios": "0.26.1",
|
42
|
-
"dayjs": "1.11.6",
|
43
|
-
"filesize": "10.0.6",
|
44
|
-
"lodash-es": "4.17.21",
|
45
|
-
"pinia": "2.0.12",
|
46
|
-
"store": "2.0.12",
|
47
|
-
"vue-router": "4.1.6"
|
48
|
-
},
|
49
|
-
"devDependencies": {
|
50
|
-
"@kengic/pont": "1.2.10-beta.44",
|
51
|
-
"@types/lodash-es": "~4.17.7",
|
52
|
-
"@types/node": "~18.14.6",
|
53
|
-
"@types/semver": "~7.3.13",
|
54
|
-
"@types/store": "2.0.2",
|
55
|
-
"@vitejs/plugin-vue": "~3.2.0",
|
56
|
-
"@vitejs/plugin-vue-jsx": "~1.3.10",
|
57
|
-
"chalk": "~4.1.2",
|
58
|
-
"less": "~4.1.3",
|
59
|
-
"prettier": "~2.8.4",
|
60
|
-
"rimraf": "~3.0.2",
|
61
|
-
"rollup": "~2.79.1",
|
62
|
-
"semver": "~7.3.8",
|
63
|
-
"tsx": "~3.12.3",
|
64
|
-
"typescript": "~4.8.4",
|
65
|
-
"vite": "~3.2.5",
|
66
|
-
"vue": "~3.2.45",
|
67
|
-
"vue-tsc": "~1.2.0"
|
68
|
-
},
|
69
|
-
"main": "./dist/kengic-vue.js",
|
70
|
-
"module": "./dist/kengic-vue.js",
|
71
|
-
"types": "./dist/src/index.d.ts",
|
72
|
-
"exports": {
|
73
|
-
".": {
|
74
|
-
"import": "./dist/kengic-vue.js"
|
75
|
-
},
|
76
|
-
"./dist/index.css": "./dist/index.css"
|
77
|
-
},
|
78
|
-
"prettier": {
|
79
|
-
"endOfLine": "auto",
|
80
|
-
"printWidth": 160,
|
81
|
-
"semi": true,
|
82
|
-
"singleQuote": true,
|
83
|
-
"tabWidth": 4,
|
84
|
-
"trailingComma": "all"
|
85
|
-
}
|
86
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@kengic/vue",
|
3
|
+
"version": "0.6.11",
|
4
|
+
"scripts": {
|
5
|
+
"build": "rimraf dist && vue-tsc && vite build",
|
6
|
+
"build:dev": "rimraf dist && vue-tsc && vite build --mode development",
|
7
|
+
"publish:all:beta": "npm run bump-version:beta && npm run publish:all",
|
8
|
+
"publish:all:patch": "npm run bump-version:patch && npm run publish:all",
|
9
|
+
"publish:all:minor": "npm run bump-version:minor && npm run publish:all",
|
10
|
+
"publish:all:major": "npm run bump-version:major && npm run publish:all",
|
11
|
+
"----------------------- C": "",
|
12
|
+
"bump-to:luotao.c.wms-vue3": "tsx scripts/bump-to.luotao.c.wms-vue3.ts",
|
13
|
+
"copy-to:luotao.c.wms-vue3": "npm run build:dev && tsx scripts/copy-to.luotao.c.wms-vue3.ts",
|
14
|
+
"bump-to:luotao.c.wms-vue3:focus": "tsx scripts/bump-to.luotao.c.wms-vue3.focus.ts",
|
15
|
+
"copy-to:luotao.c.wms-vue3:focus": "npm run build:dev && tsx scripts/copy-to.luotao.c.wms-vue3.focus.ts",
|
16
|
+
"--------------------- D": "",
|
17
|
+
"bump-to:luotao.wms-vue3": "tsx scripts/bump-to.luotao.wms-vue3.ts",
|
18
|
+
"copy-to:luotao.wms-vue3": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.ts",
|
19
|
+
"bump-to:luotao.wms-vue3:focus": "tsx scripts/bump-to.luotao.wms-vue3.focus.ts",
|
20
|
+
"copy-to:luotao.wms-vue3:focus": "npm run build:dev && tsx scripts/copy-to.luotao.wms-vue3.focus.ts",
|
21
|
+
"--------------------": "",
|
22
|
+
"cnpm:sync": "cnpm sync @kengic/vue",
|
23
|
+
"gen:apis:WMS": "kengic-pont generate-apis --config kg.config.ts --origin WMS",
|
24
|
+
"bump-version:beta": "tsx scripts/bump.ts beta",
|
25
|
+
"bump-version:major": "tsx scripts/bump.ts major",
|
26
|
+
"bump-version:minor": "tsx scripts/bump.ts minor",
|
27
|
+
"bump-version:patch": "tsx scripts/bump.ts patch",
|
28
|
+
"publish:all": "tsx scripts/publish.ts",
|
29
|
+
"publish:npm": "npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public"
|
30
|
+
},
|
31
|
+
"peerDependencies": {
|
32
|
+
"vue": "3.2.43"
|
33
|
+
},
|
34
|
+
"dependencies": {
|
35
|
+
"@ant-design/icons-vue": "6.1.0",
|
36
|
+
"@iconify-icons/ant-design": "1.2.5",
|
37
|
+
"@iconify/vue": "4.1.1",
|
38
|
+
"@vueuse/core": "8.9.4",
|
39
|
+
"@vueuse/shared": "8.9.4",
|
40
|
+
"ant-design-vue": "3.2.14",
|
41
|
+
"axios": "0.26.1",
|
42
|
+
"dayjs": "1.11.6",
|
43
|
+
"filesize": "10.0.6",
|
44
|
+
"lodash-es": "4.17.21",
|
45
|
+
"pinia": "2.0.12",
|
46
|
+
"store": "2.0.12",
|
47
|
+
"vue-router": "4.1.6"
|
48
|
+
},
|
49
|
+
"devDependencies": {
|
50
|
+
"@kengic/pont": "1.2.10-beta.44",
|
51
|
+
"@types/lodash-es": "~4.17.7",
|
52
|
+
"@types/node": "~18.14.6",
|
53
|
+
"@types/semver": "~7.3.13",
|
54
|
+
"@types/store": "2.0.2",
|
55
|
+
"@vitejs/plugin-vue": "~3.2.0",
|
56
|
+
"@vitejs/plugin-vue-jsx": "~1.3.10",
|
57
|
+
"chalk": "~4.1.2",
|
58
|
+
"less": "~4.1.3",
|
59
|
+
"prettier": "~2.8.4",
|
60
|
+
"rimraf": "~3.0.2",
|
61
|
+
"rollup": "~2.79.1",
|
62
|
+
"semver": "~7.3.8",
|
63
|
+
"tsx": "~3.12.3",
|
64
|
+
"typescript": "~4.8.4",
|
65
|
+
"vite": "~3.2.5",
|
66
|
+
"vue": "~3.2.45",
|
67
|
+
"vue-tsc": "~1.2.0"
|
68
|
+
},
|
69
|
+
"main": "./dist/kengic-vue.js",
|
70
|
+
"module": "./dist/kengic-vue.js",
|
71
|
+
"types": "./dist/src/index.d.ts",
|
72
|
+
"exports": {
|
73
|
+
".": {
|
74
|
+
"import": "./dist/kengic-vue.js"
|
75
|
+
},
|
76
|
+
"./dist/index.css": "./dist/index.css"
|
77
|
+
},
|
78
|
+
"prettier": {
|
79
|
+
"endOfLine": "auto",
|
80
|
+
"printWidth": 160,
|
81
|
+
"semi": true,
|
82
|
+
"singleQuote": true,
|
83
|
+
"tabWidth": 4,
|
84
|
+
"trailingComma": "all"
|
85
|
+
}
|
86
|
+
}
|