@airpower/web 0.0.24 → 0.0.25
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.
- package/dist/airpower.web.js +6 -0
- package/dist/config/WebI18n.d.ts +13 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/interface/ITableHookOption.d.ts +42 -0
- package/dist/hooks/interface/ITableHookResult.d.ts +80 -0
- package/dist/hooks/interface/IUseDetailOption.d.ts +20 -0
- package/dist/hooks/interface/IUseDetailResult.d.ts +30 -0
- package/dist/hooks/interface/IUseEditorOption.d.ts +31 -0
- package/dist/hooks/interface/IUseEditorResult.d.ts +14 -0
- package/dist/hooks/interface/IUseSelectorOption.d.ts +8 -0
- package/dist/hooks/interface/IUseSelectorResult.d.ts +19 -0
- package/dist/hooks/interface/IUseTableOption.d.ts +8 -0
- package/dist/hooks/interface/IUseTableResult.d.ts +33 -0
- package/dist/hooks/interface/IUseTableTreeOption.d.ts +16 -0
- package/dist/hooks/interface/IUseTableTreeResult.d.ts +13 -0
- package/dist/hooks/interface/index.d.ts +12 -0
- package/dist/hooks/useBaseTable.d.ts +11 -0
- package/dist/hooks/useDetail.d.ts +12 -0
- package/dist/hooks/useEditor.d.ts +12 -0
- package/dist/hooks/useSelector.d.ts +12 -0
- package/dist/hooks/useTable.d.ts +11 -0
- package/dist/hooks/useTableTree.d.ts +11 -0
- package/package.json +1 -1
package/dist/airpower.web.js
CHANGED
|
@@ -17454,6 +17454,11 @@ class WebConfig {
|
|
|
17454
17454
|
localStorage.removeItem(CoreConfig.authorizationHeaderKey);
|
|
17455
17455
|
}
|
|
17456
17456
|
}
|
|
17457
|
+
class WebI18n extends AirI18n {
|
|
17458
|
+
static get() {
|
|
17459
|
+
return AirI18n.get();
|
|
17460
|
+
}
|
|
17461
|
+
}
|
|
17457
17462
|
function bind(fn, thisArg) {
|
|
17458
17463
|
return function wrap() {
|
|
17459
17464
|
return fn.apply(thisArg, arguments);
|
|
@@ -21589,6 +21594,7 @@ export {
|
|
|
21589
21594
|
ToModel,
|
|
21590
21595
|
WebConfig,
|
|
21591
21596
|
WebHttp,
|
|
21597
|
+
WebI18n,
|
|
21592
21598
|
_sfc_main$3 as WebTable,
|
|
21593
21599
|
getFieldConfig,
|
|
21594
21600
|
getModelConfig,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AirI18n } from '@airpower/core';
|
|
2
|
+
export declare abstract class WebI18n extends AirI18n {
|
|
3
|
+
abstract Detail: string;
|
|
4
|
+
abstract Edit: string;
|
|
5
|
+
abstract Add: string;
|
|
6
|
+
abstract EditSuccess: string;
|
|
7
|
+
abstract AddSuccess: string;
|
|
8
|
+
abstract DeleteSuccess: string;
|
|
9
|
+
abstract SelectPlease: string;
|
|
10
|
+
abstract DisableSuccess: string;
|
|
11
|
+
abstract EnableSuccess: string;
|
|
12
|
+
static get(): WebI18n;
|
|
13
|
+
}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AirEntity, QueryPageRequest } from '@airpower/core';
|
|
2
|
+
import { Component } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* # 表格相关的根级配置项
|
|
5
|
+
* @author Hamm.cn
|
|
6
|
+
*/
|
|
7
|
+
export interface ITableHookOption<E extends AirEntity> {
|
|
8
|
+
/**
|
|
9
|
+
* ### 不分页
|
|
10
|
+
* 默认请求分页接口 如配置了 `treeList` 则此项自动失效
|
|
11
|
+
*/
|
|
12
|
+
unPaginate?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* ### 请求专用的 `treeList` 接口
|
|
15
|
+
*/
|
|
16
|
+
treeList?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* ### 默认的筛选器
|
|
19
|
+
*/
|
|
20
|
+
defaultFilter?: E;
|
|
21
|
+
/**
|
|
22
|
+
* ### 详情的视图 `Vue` 文件
|
|
23
|
+
*/
|
|
24
|
+
detailView?: Component;
|
|
25
|
+
/**
|
|
26
|
+
* ### 新增和编辑视图的 `Vue` 文件
|
|
27
|
+
*/
|
|
28
|
+
editView?: Component;
|
|
29
|
+
/**
|
|
30
|
+
* ### 请求的URL
|
|
31
|
+
*
|
|
32
|
+
* 如不传入,则默认为 `Service` 的 `urlForGetXXX`
|
|
33
|
+
*/
|
|
34
|
+
apiUrl?: string;
|
|
35
|
+
/**
|
|
36
|
+
* ### 搜索前的拦截方法
|
|
37
|
+
* 参数为发起请求的数据,请处理后返回
|
|
38
|
+
*
|
|
39
|
+
* @param requestData 请求对象
|
|
40
|
+
*/
|
|
41
|
+
beforeSearch?: (requestData: QueryPageRequest<E>) => QueryPageRequest<E> | void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AirEntity, Page, QueryPageRequest, QueryPageResponse, QuerySort } from '@airpower/core';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { AbstractWebService } from '../../service';
|
|
4
|
+
/**
|
|
5
|
+
* # `TableHook` 的基础返回结构
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export interface ITableHookResult<E extends AirEntity, S extends AbstractWebService<E>> {
|
|
9
|
+
/**
|
|
10
|
+
* ### 当前绑定的 `Loading` 状态
|
|
11
|
+
* 请随意 `v-loading` 到你需要的地方
|
|
12
|
+
*/
|
|
13
|
+
isLoading: Ref<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* ### 响应数据
|
|
16
|
+
*/
|
|
17
|
+
response: Ref<QueryPageResponse<E>>;
|
|
18
|
+
/**
|
|
19
|
+
* ### 请求数据
|
|
20
|
+
*/
|
|
21
|
+
request: Ref<QueryPageRequest<E>>;
|
|
22
|
+
/**
|
|
23
|
+
* ### 返回的单页数据列表
|
|
24
|
+
*/
|
|
25
|
+
list: Ref<E[]>;
|
|
26
|
+
/**
|
|
27
|
+
* ### 选中的数据列表
|
|
28
|
+
*/
|
|
29
|
+
selectList: Ref<E[]>;
|
|
30
|
+
/**
|
|
31
|
+
* ### 实体的实例
|
|
32
|
+
*/
|
|
33
|
+
entity: E;
|
|
34
|
+
/**
|
|
35
|
+
* ### `Service`的实例
|
|
36
|
+
*/
|
|
37
|
+
service: S;
|
|
38
|
+
/**
|
|
39
|
+
* ### 刷新数据 返回第一页
|
|
40
|
+
*/
|
|
41
|
+
onReloadData: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* ### 搜索事件
|
|
44
|
+
*
|
|
45
|
+
* @param request 请求对象
|
|
46
|
+
*/
|
|
47
|
+
onSearch: (request: QueryPageRequest<E>) => void;
|
|
48
|
+
/**
|
|
49
|
+
* ### 分页变更事件
|
|
50
|
+
*
|
|
51
|
+
* @param page 分页对象
|
|
52
|
+
*/
|
|
53
|
+
onPageChanged: (page: Page) => void;
|
|
54
|
+
/**
|
|
55
|
+
* ### 详情事件
|
|
56
|
+
*
|
|
57
|
+
* @param row 选择的行
|
|
58
|
+
*/
|
|
59
|
+
onDetail: (row: E) => void;
|
|
60
|
+
/**
|
|
61
|
+
* ### 添加事件
|
|
62
|
+
*/
|
|
63
|
+
onAdd: () => void;
|
|
64
|
+
/**
|
|
65
|
+
* ### 排序变更事件
|
|
66
|
+
*
|
|
67
|
+
* @param sort 排序对象
|
|
68
|
+
*/
|
|
69
|
+
onSortChanged: (sort?: QuerySort) => void | Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* ### 多选事件
|
|
72
|
+
*
|
|
73
|
+
* @param list 选择的行列表
|
|
74
|
+
*/
|
|
75
|
+
onSelected: (list: E[]) => void;
|
|
76
|
+
/**
|
|
77
|
+
* ### 刷新数据 保持留在当页
|
|
78
|
+
*/
|
|
79
|
+
onGetList: () => void;
|
|
80
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
/**
|
|
3
|
+
* # `Detail` 的 `Hook` 可选配置
|
|
4
|
+
* @author Hamm.cn
|
|
5
|
+
*/
|
|
6
|
+
export interface IUseDetailOption<E extends AirEntity> {
|
|
7
|
+
/**
|
|
8
|
+
* ### 查到详情后的事件
|
|
9
|
+
* 参数为响应的数据,请处理后返回
|
|
10
|
+
*
|
|
11
|
+
* @param detailData 实体
|
|
12
|
+
*/
|
|
13
|
+
afterGetDetail?: (detailData: E) => E | void;
|
|
14
|
+
/**
|
|
15
|
+
* ### 请求查询详情的URL
|
|
16
|
+
*
|
|
17
|
+
* 如不传入,则默认为 `Service` 的 `urlForGetDetail`
|
|
18
|
+
*/
|
|
19
|
+
apiUrl?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { AbstractWebService } from '../../service';
|
|
4
|
+
/**
|
|
5
|
+
* # 详情的 `Hook` 标准返回
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export interface IUseDetailResult<E extends AirEntity, S extends AbstractWebService<E>> {
|
|
9
|
+
/**
|
|
10
|
+
* ### 对话框显示的标题
|
|
11
|
+
*/
|
|
12
|
+
title: Ref<string>;
|
|
13
|
+
/**
|
|
14
|
+
* ### 表单或详情数据
|
|
15
|
+
*/
|
|
16
|
+
formData: Ref<E>;
|
|
17
|
+
/**
|
|
18
|
+
* ### 当前绑定的 `Loading` 状态
|
|
19
|
+
* 请随意 `v-loading` 到你需要的地方
|
|
20
|
+
*/
|
|
21
|
+
isLoading: Ref<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* ### 当前 `Hook` 使用的 `Service` 实例
|
|
24
|
+
*/
|
|
25
|
+
service: S;
|
|
26
|
+
/**
|
|
27
|
+
* ### 查询详情
|
|
28
|
+
*/
|
|
29
|
+
getDetail: () => void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
import { IUseDetailOption } from './IUseDetailOption';
|
|
3
|
+
/**
|
|
4
|
+
* # `Editor` 的 `Hook` 可选配置
|
|
5
|
+
* @author Hamm.cn
|
|
6
|
+
*/
|
|
7
|
+
export interface IUseEditorOption<E extends AirEntity> extends IUseDetailOption<E> {
|
|
8
|
+
/**
|
|
9
|
+
* ### 编辑成功的提示消息
|
|
10
|
+
*/
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
/**
|
|
13
|
+
* ### 请求前拦截器
|
|
14
|
+
* 参数为发起请求的数据,请处理后返回
|
|
15
|
+
*
|
|
16
|
+
* @param submitData 实体
|
|
17
|
+
*/
|
|
18
|
+
beforeSubmit?: (submitData: E) => E | null;
|
|
19
|
+
/**
|
|
20
|
+
* ### 请求添加的URL
|
|
21
|
+
*
|
|
22
|
+
* 如不传入,则默认为 `Service` 的 `urlForAdd`
|
|
23
|
+
*/
|
|
24
|
+
apiUrlAdd?: string;
|
|
25
|
+
/**
|
|
26
|
+
* ### 请求更新的URL
|
|
27
|
+
*
|
|
28
|
+
* 如不传入,则默认为 `Service` 的 `urlForUpdate`
|
|
29
|
+
*/
|
|
30
|
+
apiUrlUpdate?: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../../service';
|
|
3
|
+
import { IUseDetailResult } from './IUseDetailResult';
|
|
4
|
+
/**
|
|
5
|
+
* # `Editor` 的 `Hook` 标准返回
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export interface IUseEditorResult<E extends AirEntity, S extends AbstractWebService<E>> extends IUseDetailResult<E, S> {
|
|
9
|
+
/**
|
|
10
|
+
* ### 表单提交的方法
|
|
11
|
+
* 你可以使用 `beforeSubmit` 方法来拦截请求的数据
|
|
12
|
+
*/
|
|
13
|
+
onSubmit: () => void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { AbstractWebService } from '../../service';
|
|
4
|
+
import { ITableHookResult } from './ITableHookResult';
|
|
5
|
+
/**
|
|
6
|
+
* # 选择器 `Hook` 的标准返回
|
|
7
|
+
* @author Hamm.cn
|
|
8
|
+
*/
|
|
9
|
+
export interface IUseSelectorResult<E extends AirEntity, S extends AbstractWebService<E>> extends ITableHookResult<E, S> {
|
|
10
|
+
/**
|
|
11
|
+
* ### `Selector` 的标题
|
|
12
|
+
*/
|
|
13
|
+
title: Ref<string>;
|
|
14
|
+
/**
|
|
15
|
+
* ### 是否禁用确认按钮
|
|
16
|
+
* 多选时当没有选择任何数据时将禁用确认按钮
|
|
17
|
+
*/
|
|
18
|
+
disableConfirm: Ref<boolean>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../../service';
|
|
3
|
+
import { ITableHookResult } from './ITableHookResult';
|
|
4
|
+
/**
|
|
5
|
+
* # 表格的 `Hook` 标准返回
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export interface IUseTableResult<E extends AirEntity, S extends AbstractWebService<E>> extends ITableHookResult<E, S> {
|
|
9
|
+
/**
|
|
10
|
+
* ### 编辑事件
|
|
11
|
+
*
|
|
12
|
+
* @param row 选择的行
|
|
13
|
+
*/
|
|
14
|
+
onEdit: (row: E) => void;
|
|
15
|
+
/**
|
|
16
|
+
* ### 删除事件
|
|
17
|
+
*
|
|
18
|
+
* @param row 选择的行
|
|
19
|
+
*/
|
|
20
|
+
onDelete: (row: E) => void;
|
|
21
|
+
/**
|
|
22
|
+
* ### 禁用事件
|
|
23
|
+
*
|
|
24
|
+
* @param row 选择的行
|
|
25
|
+
*/
|
|
26
|
+
onDisable: (row: E) => void;
|
|
27
|
+
/**
|
|
28
|
+
* ### 启用事件
|
|
29
|
+
*
|
|
30
|
+
* @param row 选择的行
|
|
31
|
+
*/
|
|
32
|
+
onEnable: (row: E) => void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ITree } from '@airpower/core';
|
|
2
|
+
import { IUseTableOption } from './IUseTableOption';
|
|
3
|
+
/**
|
|
4
|
+
* # `TableTreeList` 的 `Hook` 可选配置
|
|
5
|
+
* @author Hamm.cn
|
|
6
|
+
*/
|
|
7
|
+
export interface IUseTableTreeOption<T extends ITree> extends IUseTableOption<T> {
|
|
8
|
+
/**
|
|
9
|
+
* ### 添加行的子项的前置拦截方法
|
|
10
|
+
* 参数为发起请求的数据,请处理后返回 `param`
|
|
11
|
+
*
|
|
12
|
+
* @param param 添加的数据
|
|
13
|
+
* @param row 当前行数据
|
|
14
|
+
*/
|
|
15
|
+
beforeAddRow?: (param: T, row: T) => T | void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AirEntity } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../../service';
|
|
3
|
+
import { IUseTableResult } from './IUseTableResult';
|
|
4
|
+
/**
|
|
5
|
+
* # 树表格的 `Hook` 标准返回
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export interface IUseTableTreeResult<E extends AirEntity, S extends AbstractWebService<E>> extends IUseTableResult<E, S> {
|
|
9
|
+
/**
|
|
10
|
+
* ### 表格行的添加按钮点击事件
|
|
11
|
+
*/
|
|
12
|
+
onAddRow: (row: E) => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './ITableHookOption';
|
|
2
|
+
export * from './ITableHookResult';
|
|
3
|
+
export * from './IUseDetailOption';
|
|
4
|
+
export * from './IUseDetailResult';
|
|
5
|
+
export * from './IUseEditorOption';
|
|
6
|
+
export * from './IUseEditorResult';
|
|
7
|
+
export * from './IUseSelectorOption';
|
|
8
|
+
export * from './IUseSelectorResult';
|
|
9
|
+
export * from './IUseTableOption';
|
|
10
|
+
export * from './IUseTableResult';
|
|
11
|
+
export * from './IUseTableTreeOption';
|
|
12
|
+
export * from './IUseTableTreeResult';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AirEntity, ClassConstructor } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../service';
|
|
3
|
+
import { ITableHookOption, ITableHookResult } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* # 表格基础`Hook`
|
|
6
|
+
* @param entityClass 实体类
|
|
7
|
+
* @param serviceClass 表格使用的 `Service` 类
|
|
8
|
+
* @param option `可选` 更多配置
|
|
9
|
+
* @author Hamm.cn
|
|
10
|
+
*/
|
|
11
|
+
export declare function useBaseTable<E extends AirEntity, S extends AbstractWebService<E>>(entityClass: ClassConstructor<E>, serviceClass: ClassConstructor<S>, option?: ITableHookOption<E>): ITableHookResult<E, S>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AirEntity, ClassConstructor, IJson } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../service';
|
|
3
|
+
import { IUseDetailOption, IUseDetailResult } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* # 引入详情的`Hook`
|
|
6
|
+
* @param props `defineProps` 的返回值
|
|
7
|
+
* @param entityClass 详情使用的实体类
|
|
8
|
+
* @param serviceClass 详情使用的 `Service`
|
|
9
|
+
* @param option `可选` 更多的配置
|
|
10
|
+
* @author Hamm.cn
|
|
11
|
+
*/
|
|
12
|
+
export declare function useDetail<E extends AirEntity, S extends AbstractWebService<E>>(props: IJson, entityClass: ClassConstructor<E>, serviceClass: ClassConstructor<S>, option?: IUseDetailOption<E>): IUseDetailResult<E, S>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AirEntity, ClassConstructor, IJson } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../service';
|
|
3
|
+
import { IUseEditorOption, IUseEditorResult } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* # 引入`Editor`的`Hook`
|
|
6
|
+
* @param props `defineProps`的返回值
|
|
7
|
+
* @param entityClass `Editor`使用的实体类
|
|
8
|
+
* @param serviceClass `Editor`使用的`Service`
|
|
9
|
+
* @param option `可选` 更多的配置
|
|
10
|
+
* @author Hamm.cn
|
|
11
|
+
*/
|
|
12
|
+
export declare function useEditor<E extends AirEntity, S extends AbstractWebService<E>>(props: IJson, entityClass: ClassConstructor<E>, serviceClass: ClassConstructor<S>, option?: IUseEditorOption<E>): IUseEditorResult<E, S>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AirEntity, ClassConstructor, IJson } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../service';
|
|
3
|
+
import { IUseSelectorOption, IUseSelectorResult } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* # 引入`Selector`使用的`Hook`
|
|
6
|
+
* @param props `defineProps`的返回值
|
|
7
|
+
* @param entityClass 实体类
|
|
8
|
+
* @param serviceClass `Selector`使用的`Service`类
|
|
9
|
+
* @param option `可选` 更多配置
|
|
10
|
+
* @author Hamm.cn
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSelector<E extends AirEntity, S extends AbstractWebService<E>>(props: IJson, entityClass: ClassConstructor<E>, serviceClass: ClassConstructor<S>, option?: IUseSelectorOption<E>): IUseSelectorResult<E, S>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AirEntity, ClassConstructor } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../service';
|
|
3
|
+
import { IUseTableOption, IUseTableResult } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* # 引入表格使用的`Hook`
|
|
6
|
+
* @param entityClass 实体类
|
|
7
|
+
* @param serviceClass 表格使用的`Service`类
|
|
8
|
+
* @param option `可选` 更多配置
|
|
9
|
+
* @author Hamm.cn
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTable<E extends AirEntity, S extends AbstractWebService<E>>(entityClass: ClassConstructor<E>, serviceClass: ClassConstructor<S>, option?: IUseTableOption<E>): IUseTableResult<E, S>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClassConstructor, ITree } from '@airpower/core';
|
|
2
|
+
import { AbstractWebService } from '../service';
|
|
3
|
+
import { IUseTableTreeOption, IUseTableTreeResult } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* # 引入表格树使用的`Hook`
|
|
6
|
+
* @param entityClass 实体类
|
|
7
|
+
* @param serviceClass 表格使用的`Service`类
|
|
8
|
+
* @param option `可选` 更多配置
|
|
9
|
+
* @author Hamm.cn
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTableTree<E extends ITree, S extends AbstractWebService<E>>(entityClass: ClassConstructor<E>, serviceClass: ClassConstructor<S>, option?: IUseTableTreeOption<E>): IUseTableTreeResult<E, S>;
|