@airpower/web 0.1.2 → 0.2.0
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/README.md +14 -13
- package/dist/base/AbstractService.d.ts +30 -0
- package/dist/base/IEntity.d.ts +11 -0
- package/dist/base/RootEntity.d.ts +24 -0
- package/dist/base/RootModel.d.ts +8 -0
- package/dist/base/index.d.ts +4 -0
- package/dist/components/button/Button.vue.d.ts +114 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/type.d.ts +1 -0
- package/dist/components/copy/Copy.vue.d.ts +49 -0
- package/dist/components/copy/index.d.ts +2 -0
- package/dist/components/datetime/DateTime.vue.d.ts +68 -0
- package/dist/components/datetime/index.d.ts +2 -0
- package/dist/components/desensitize/Desensitize.vue.d.ts +84 -0
- package/dist/components/desensitize/index.d.ts +2 -0
- package/dist/components/dialog/Dialog.vue.d.ts +342 -0
- package/dist/components/dialog/DialogProps.d.ts +191 -0
- package/dist/components/dialog/DialogUtil.d.ts +48 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/empty/Empty.vue.d.ts +18 -0
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/form/FormField.vue.d.ts +54 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/frame/Frame.vue.d.ts +32 -0
- package/dist/components/frame/index.d.ts +2 -0
- package/dist/components/group/Group.vue.d.ts +144 -0
- package/dist/components/group/index.d.ts +2 -0
- package/dist/components/image/Image.vue.d.ts +48 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/index.d.ts +24 -2
- package/dist/components/input/DateTimeType.d.ts +27 -0
- package/dist/components/input/Input.vue.d.ts +50 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/menu/ChildMenu.vue.d.ts +17 -0
- package/dist/components/menu/IMenu.d.ts +24 -0
- package/dist/components/menu/Menu.vue.d.ts +20 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/money/Money.vue.d.ts +71 -0
- package/dist/components/money/index.d.ts +3 -0
- package/dist/components/money/type.d.ts +1 -0
- package/dist/components/page/Page.vue.d.ts +18 -0
- package/dist/components/page/index.d.ts +2 -0
- package/dist/components/panel/Panel.vue.d.ts +115 -0
- package/dist/components/panel/index.d.ts +2 -0
- package/dist/components/payload/IPayload.d.ts +11 -0
- package/dist/components/payload/Payload.vue.d.ts +35 -0
- package/dist/components/payload/index.d.ts +3 -0
- package/dist/components/phone/Call.vue.d.ts +56 -0
- package/dist/components/phone/Phone.vue.d.ts +69 -0
- package/dist/components/phone/index.d.ts +3 -0
- package/dist/components/qrcode/Qrcode.vue.d.ts +34 -0
- package/dist/components/qrcode/index.d.ts +2 -0
- package/dist/components/select/Select.vue.d.ts +47 -0
- package/dist/components/select/Selector.vue.d.ts +107 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/tab/Tab.vue.d.ts +35 -0
- package/dist/components/tab/Tabs.vue.d.ts +17 -0
- package/dist/components/tab/index.d.ts +3 -0
- package/dist/components/table/Table.vue.d.ts +157 -0
- package/dist/components/table/component/ColumnSelector.vue.d.ts +20 -0
- package/dist/components/table/component/CopyColumn.vue.d.ts +18 -0
- package/dist/components/table/component/EnumColumn.vue.d.ts +20 -0
- package/dist/components/table/component/Export.vue.d.ts +44 -0
- package/dist/components/table/component/index.d.ts +5 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/useTableButton.d.ts +74 -0
- package/dist/components/table/useTableColumn.d.ts +36 -0
- package/dist/components/table/useTableSelect.d.ts +24 -0
- package/dist/components/tree/TreeBox.vue.d.ts +43 -0
- package/dist/components/tree/index.d.ts +2 -0
- package/dist/components/upload/IUploadProps.d.ts +62 -0
- package/dist/components/upload/Upload.vue.d.ts +47 -0
- package/dist/components/upload/index.d.ts +3 -0
- package/dist/components/user/IUser.d.ts +14 -0
- package/dist/components/user/User.vue.d.ts +67 -0
- package/dist/components/user/index.d.ts +3 -0
- package/dist/config/WebConfig.d.ts +306 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/curd/AbstractCurdService.d.ts +138 -0
- package/dist/curd/index.d.ts +2 -0
- package/dist/curd/type.d.ts +8 -0
- package/dist/decorator/@Field/Field.d.ts +28 -0
- package/dist/decorator/@Field/IFieldConfig.d.ts +18 -0
- package/dist/decorator/@Field/index.d.ts +2 -0
- package/dist/decorator/@Form/Form.d.ts +24 -0
- package/dist/decorator/@Form/FormTrim.d.ts +19 -0
- package/dist/decorator/@Form/IFormField.d.ts +224 -0
- package/dist/decorator/@Form/index.d.ts +3 -0
- package/dist/decorator/@Model/IModelConfig.d.ts +69 -0
- package/dist/decorator/@Model/Model.d.ts +12 -0
- package/dist/decorator/@Model/index.d.ts +2 -0
- package/dist/decorator/@Search/ISearchField.d.ts +29 -0
- package/dist/decorator/@Search/Search.d.ts +24 -0
- package/dist/decorator/@Search/index.d.ts +2 -0
- package/dist/decorator/{@table → @Table}/IElementTableColumn.d.ts +1 -1
- package/dist/decorator/@Table/ITableColumn.d.ts +63 -0
- package/dist/decorator/{@table → @Table}/Table.d.ts +5 -5
- package/dist/decorator/{@table → @Table}/index.d.ts +1 -1
- package/dist/decorator/common/IBaseField.d.ts +12 -0
- package/dist/decorator/common/index.d.ts +1 -0
- package/dist/decorator/index.d.ts +6 -1
- package/dist/enum/DisableEnum.d.ts +10 -0
- package/dist/enum/IWebEnum.d.ts +13 -0
- package/dist/enum/WebColor.d.ts +23 -0
- package/dist/enum/WebEnum.d.ts +20 -0
- package/dist/enum/index.d.ts +5 -0
- package/dist/enum/type.d.ts +8 -0
- package/dist/{controller/interface/IDetailControllerOption.d.ts → hooks/detail/IDetailOption.d.ts} +3 -4
- package/dist/hooks/detail/IDetailResult.d.ts +30 -0
- package/dist/hooks/detail/index.d.ts +3 -0
- package/dist/hooks/detail/useDetail.d.ts +13 -0
- package/dist/{controller/interface/IUseEditorOption.d.ts → hooks/editor/IEditorOption.d.ts} +13 -5
- package/dist/hooks/editor/IEditorResult.d.ts +29 -0
- package/dist/hooks/editor/index.d.ts +3 -0
- package/dist/hooks/editor/useEditor.d.ts +13 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/{controller/interface/ITableControllerOption.d.ts → hooks/table/base/IBaseTableOption.d.ts} +5 -5
- package/dist/hooks/table/base/IBaseTableResult.d.ts +81 -0
- package/dist/hooks/table/base/index.d.ts +3 -0
- package/dist/hooks/table/base/useBaseTable.d.ts +11 -0
- package/dist/hooks/table/index.d.ts +4 -0
- package/dist/hooks/table/list/ITableOption.d.ts +8 -0
- package/dist/hooks/table/list/ITableResult.d.ts +33 -0
- package/dist/hooks/table/list/index.d.ts +3 -0
- package/dist/hooks/table/list/useTable.d.ts +11 -0
- package/dist/hooks/table/selector/ISelectorOption.d.ts +8 -0
- package/dist/hooks/table/selector/ISelectorResult.d.ts +19 -0
- package/dist/hooks/table/selector/index.d.ts +3 -0
- package/dist/hooks/table/selector/useSelector.d.ts +13 -0
- package/dist/{controller/interface/ITableTreeControllerOption.d.ts → hooks/table/tree/ITableTreeOption.d.ts} +5 -5
- package/dist/hooks/table/tree/ITableTreeResult.d.ts +13 -0
- package/dist/hooks/table/tree/index.d.ts +3 -0
- package/dist/hooks/table/tree/useTableTree.d.ts +12 -0
- package/dist/i18n/WebI18n.d.ts +52 -3
- package/dist/index.d.ts +7 -4
- package/dist/main.js +9229 -0
- package/dist/model/export/ExportModel.d.ts +24 -0
- package/dist/model/export/index.d.ts +1 -0
- package/dist/model/index.d.ts +3 -0
- package/dist/model/query/QueryPage.d.ts +15 -0
- package/dist/model/query/QueryRequest.d.ts +27 -0
- package/dist/model/query/QueryRequestPage.d.ts +13 -0
- package/dist/model/query/QueryResponsePage.d.ts +30 -0
- package/dist/model/query/QuerySort.d.ts +26 -0
- package/dist/model/query/index.d.ts +6 -0
- package/dist/model/query/type.d.ts +4 -0
- package/dist/model/tree/ITree.d.ts +21 -0
- package/dist/model/tree/index.d.ts +1 -0
- package/dist/type/index.d.ts +1 -0
- package/dist/util/feedback/FeedbackUtil.d.ts +97 -0
- package/dist/util/feedback/index.d.ts +2 -0
- package/dist/util/feedback/type.d.ts +1 -0
- package/dist/util/file/IFile.d.ts +10 -0
- package/dist/util/file/WebFileUtil.d.ts +11 -0
- package/dist/util/file/index.d.ts +1 -0
- package/dist/util/http/Http.d.ts +121 -0
- package/dist/util/http/HttpResponse.d.ts +19 -0
- package/dist/util/http/enum/HttpContentType.d.ts +27 -0
- package/dist/util/http/enum/HttpHeader.d.ts +15 -0
- package/dist/util/http/enum/HttpMethod.d.ts +12 -0
- package/dist/util/http/enum/HttpStatus.d.ts +31 -0
- package/dist/util/http/enum/index.d.ts +4 -0
- package/dist/util/http/index.d.ts +4 -0
- package/dist/util/http/type.d.ts +13 -0
- package/dist/util/index.d.ts +5 -1
- package/dist/util/permission/PermissionAction.d.ts +42 -0
- package/dist/util/permission/PermissionUtil.d.ts +50 -0
- package/dist/util/permission/index.d.ts +2 -0
- package/dist/util/validator/WebValidator.d.ts +198 -0
- package/dist/util/validator/index.d.ts +2 -0
- package/dist/util/validator/type.d.ts +24 -0
- package/dist/web.css +1531 -0
- package/package.json +15 -12
- package/dist/airpower.web.js +0 -490
- package/dist/components/WebTable.vue.d.ts +0 -22
- package/dist/controller/DetailController.d.ts +0 -29
- package/dist/controller/EditorController.d.ts +0 -11
- package/dist/controller/index.d.ts +0 -4
- package/dist/controller/interface/index.d.ts +0 -4
- package/dist/controller/table/BaseTableController.d.ts +0 -68
- package/dist/controller/table/TableController.d.ts +0 -36
- package/dist/controller/table/TableTreeController.d.ts +0 -16
- package/dist/controller/table/index.d.ts +0 -3
- package/dist/decorator/@table/ITableFieldConfig.d.ts +0 -23
- package/dist/http/WebHttp.d.ts +0 -18
- package/dist/http/index.d.ts +0 -1
- package/dist/service/AbstractWebService.d.ts +0 -27
- package/dist/service/index.d.ts +0 -1
- package/dist/shared/index.d.ts +0 -1
- package/dist/util/WebAccessTokenUtil.d.ts +0 -20
- /package/dist/decorator/{@table → @Table}/TableType.d.ts +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ITransformerConstructor } from '@airpower/transformer';
|
|
2
|
+
import { RootEntity } from '../../base';
|
|
3
|
+
/**
|
|
4
|
+
* # 表格按钮权限控制
|
|
5
|
+
*
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export declare function useTableButton<E extends RootEntity>(params: {
|
|
9
|
+
/**
|
|
10
|
+
* ### 实体类
|
|
11
|
+
*/
|
|
12
|
+
entityClass: ITransformerConstructor<E>;
|
|
13
|
+
/**
|
|
14
|
+
* ### 编辑权限标识
|
|
15
|
+
*/
|
|
16
|
+
editPermission?: string;
|
|
17
|
+
/**
|
|
18
|
+
* ### 删除权限标识
|
|
19
|
+
*/
|
|
20
|
+
deletePermission?: string;
|
|
21
|
+
/**
|
|
22
|
+
* ### 添加子项权限标识
|
|
23
|
+
*/
|
|
24
|
+
addRowPermission?: string;
|
|
25
|
+
/**
|
|
26
|
+
* ### 禁用权限标识
|
|
27
|
+
*/
|
|
28
|
+
disablePermission?: string;
|
|
29
|
+
/**
|
|
30
|
+
* ### 启用权限标识
|
|
31
|
+
*/
|
|
32
|
+
enablePermission?: string;
|
|
33
|
+
/**
|
|
34
|
+
* ### 详情权限标识
|
|
35
|
+
*/
|
|
36
|
+
detailPermission?: string;
|
|
37
|
+
/**
|
|
38
|
+
* ### 禁用添加子项函数
|
|
39
|
+
* @param row 行数据
|
|
40
|
+
*/
|
|
41
|
+
disableAddRow: (row: E) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* ### 禁用删除函数
|
|
44
|
+
* @param row 行数据
|
|
45
|
+
*/
|
|
46
|
+
disableDelete: (row: E) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* ### 禁用编辑函数
|
|
49
|
+
* @param row 行数据
|
|
50
|
+
*/
|
|
51
|
+
disableEdit: (row: E) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* ### 禁用状态切换函数
|
|
54
|
+
* @param row 行数据
|
|
55
|
+
*/
|
|
56
|
+
disableChangeStatus: (row: E) => boolean;
|
|
57
|
+
/**
|
|
58
|
+
* ### 是否可选
|
|
59
|
+
* @param row 行数据
|
|
60
|
+
*/
|
|
61
|
+
selectable: (row: E) => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* ### 添加按钮是否禁用
|
|
64
|
+
* @param row 行数据
|
|
65
|
+
*/
|
|
66
|
+
isAddDisabled: (row: E) => boolean;
|
|
67
|
+
}): {
|
|
68
|
+
isSelectable: (row: E) => boolean;
|
|
69
|
+
isAddRowDisabled: (row: E) => boolean;
|
|
70
|
+
isDeleteDisabled: (row: E) => boolean;
|
|
71
|
+
isEditDisabled: (row: E) => boolean;
|
|
72
|
+
isDetailDisabled: (row: E) => boolean;
|
|
73
|
+
isDisableChangeStatus: (row: E) => boolean;
|
|
74
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { RootEntity } from '../../base';
|
|
3
|
+
import { IModelConfig, ITableColumn } from '../../decorator';
|
|
4
|
+
/**
|
|
5
|
+
* # 表格字段
|
|
6
|
+
*
|
|
7
|
+
* @author Hamm.cn
|
|
8
|
+
*/
|
|
9
|
+
export declare function useTableColumn<E extends RootEntity>(params: {
|
|
10
|
+
/**
|
|
11
|
+
* ### 实体实例
|
|
12
|
+
*/
|
|
13
|
+
entityInstance: E;
|
|
14
|
+
/**
|
|
15
|
+
* ### 自定义字段
|
|
16
|
+
*/
|
|
17
|
+
customColumns: Array<ITableColumn>;
|
|
18
|
+
/**
|
|
19
|
+
* ### 字段缓存key
|
|
20
|
+
*/
|
|
21
|
+
columnCacheKey?: string;
|
|
22
|
+
/**
|
|
23
|
+
* ### 隐藏字段选择器
|
|
24
|
+
*/
|
|
25
|
+
hideColumnSelector: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* ### 模型配置
|
|
28
|
+
*/
|
|
29
|
+
modelConfig: IModelConfig;
|
|
30
|
+
}): {
|
|
31
|
+
updateSelectKeys: (list?: string[]) => void;
|
|
32
|
+
allColumnList: Ref<ITableColumn[], ITableColumn[]>;
|
|
33
|
+
selectKeys: Ref<string[], string[]>;
|
|
34
|
+
showColumnList: Ref<ITableColumn[], ITableColumn[]>;
|
|
35
|
+
isColumnSelectorEnabled: Ref<boolean, boolean>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TableInstance } from 'element-plus';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { RootEntity } from '../../base';
|
|
4
|
+
/**
|
|
5
|
+
* ### 表格多选
|
|
6
|
+
*
|
|
7
|
+
* @author Hamm.cn
|
|
8
|
+
*/
|
|
9
|
+
export declare function useTableSelect<E extends RootEntity>(params: {
|
|
10
|
+
/**
|
|
11
|
+
* ### 表格实例
|
|
12
|
+
*/
|
|
13
|
+
tableInstance: Ref<TableInstance | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* ### 数据列表
|
|
16
|
+
*/
|
|
17
|
+
dataList: Array<E>;
|
|
18
|
+
/**
|
|
19
|
+
* ### 选中列表
|
|
20
|
+
*/
|
|
21
|
+
selectList: Array<E>;
|
|
22
|
+
}): {
|
|
23
|
+
toggleSelection: () => void;
|
|
24
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RootEntity } from '../../base';
|
|
2
|
+
import { ITree } from '../../model';
|
|
3
|
+
declare const _default: <T extends ITree & RootEntity>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{
|
|
5
|
+
title: string;
|
|
6
|
+
hideIcon: boolean;
|
|
7
|
+
width: number;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
collapse: boolean;
|
|
10
|
+
defaultExpandAll: boolean;
|
|
11
|
+
hideTree: boolean;
|
|
12
|
+
searchable: boolean;
|
|
13
|
+
isTreeLoading: boolean;
|
|
14
|
+
defaultCollapse: boolean;
|
|
15
|
+
}> & Omit<{
|
|
16
|
+
readonly title: string;
|
|
17
|
+
readonly hideIcon: boolean;
|
|
18
|
+
readonly width: number;
|
|
19
|
+
readonly placeholder: string;
|
|
20
|
+
readonly collapse: boolean;
|
|
21
|
+
readonly defaultExpandAll: boolean;
|
|
22
|
+
readonly hideTree: boolean;
|
|
23
|
+
readonly searchable: boolean;
|
|
24
|
+
readonly treeData: T[];
|
|
25
|
+
readonly isTreeLoading: boolean;
|
|
26
|
+
readonly defaultCollapse: boolean;
|
|
27
|
+
readonly onOnChange?: ((data: T | undefined) => any) | undefined;
|
|
28
|
+
readonly onChange?: ((data: T | undefined) => any) | undefined;
|
|
29
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "title" | "hideIcon" | "width" | "placeholder" | "collapse" | "defaultExpandAll" | "hideTree" | "searchable" | "isTreeLoading" | "defaultCollapse">, "onChange" | "treeData" | "onOnChange" | ("title" | "hideIcon" | "width" | "placeholder" | "collapse" | "defaultExpandAll" | "hideTree" | "searchable" | "isTreeLoading" | "defaultCollapse")> & {} & Partial<{}>> & import('vue').PublicProps;
|
|
30
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
31
|
+
attrs: any;
|
|
32
|
+
slots: {
|
|
33
|
+
icon?(_: {}): any;
|
|
34
|
+
default?(_: {}): any;
|
|
35
|
+
};
|
|
36
|
+
emit: ((evt: "onChange", data: T | undefined) => void) & ((evt: "change", data: T | undefined) => void);
|
|
37
|
+
}>) => import('vue').VNode & {
|
|
38
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
39
|
+
};
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_PrettifyLocal<T> = {
|
|
42
|
+
[K in keyof T]: T[K];
|
|
43
|
+
} & {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { IJson, ITransformerConstructor } from '@airpower/transformer';
|
|
2
|
+
import { RootEntity } from '../../base';
|
|
3
|
+
import { IFile } from '../../util';
|
|
4
|
+
/**
|
|
5
|
+
* # 上传配置项
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export interface IUploadProps<F extends IFile & RootEntity> {
|
|
9
|
+
/**
|
|
10
|
+
* ### 对话框标题
|
|
11
|
+
*/
|
|
12
|
+
title?: string;
|
|
13
|
+
/**
|
|
14
|
+
* ### 最大允许上传字节数
|
|
15
|
+
*/
|
|
16
|
+
maxSize?: number;
|
|
17
|
+
/**
|
|
18
|
+
* ### 如传入数组包含 `*` 则直接允许所有格式
|
|
19
|
+
* 允许上传文件后缀数组 不要加 `·`
|
|
20
|
+
*/
|
|
21
|
+
extensions?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* ### 上传表单的字段名 默认 `file`
|
|
24
|
+
*/
|
|
25
|
+
uploadName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* ### 上传的地址 默认无需传入
|
|
28
|
+
*/
|
|
29
|
+
uploadUrl?: string;
|
|
30
|
+
/**
|
|
31
|
+
* ### 上传成功的文案提示
|
|
32
|
+
*/
|
|
33
|
+
uploadSuccess?: string;
|
|
34
|
+
/**
|
|
35
|
+
* ### 上传右下角的确认按钮文字
|
|
36
|
+
* 如传入 则显示 否则隐藏按钮
|
|
37
|
+
*/
|
|
38
|
+
confirmText?: string;
|
|
39
|
+
/**
|
|
40
|
+
* ### 上传文件的接收实体类
|
|
41
|
+
*/
|
|
42
|
+
entity?: ITransformerConstructor<F>;
|
|
43
|
+
/**
|
|
44
|
+
* ### 自定义上传成功的回调
|
|
45
|
+
* 如果传入了回调, `DialogUtil.showUpload()` 将返回 `null`
|
|
46
|
+
* 请在此回调中接收数据
|
|
47
|
+
*/
|
|
48
|
+
onCustomSuccess?: Function;
|
|
49
|
+
/**
|
|
50
|
+
* ### 上传文件时同时传输的body数据
|
|
51
|
+
* 如为实体对象, 请自行 `.toJson()`
|
|
52
|
+
*/
|
|
53
|
+
data?: IJson;
|
|
54
|
+
/**
|
|
55
|
+
* ### 上传文件时同时传输的header数据
|
|
56
|
+
*/
|
|
57
|
+
header?: IJson;
|
|
58
|
+
/**
|
|
59
|
+
* ### 显示的提示文字
|
|
60
|
+
*/
|
|
61
|
+
tips?: string;
|
|
62
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IJson, ITransformerConstructor } from '@airpower/transformer';
|
|
2
|
+
import { RootEntity } from '../../base';
|
|
3
|
+
import { IFile } from '../../util';
|
|
4
|
+
declare const _default: <F extends IFile & RootEntity>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{
|
|
6
|
+
title: string;
|
|
7
|
+
data: IJson<any>;
|
|
8
|
+
header: IJson<any>;
|
|
9
|
+
confirmText: string;
|
|
10
|
+
onConfirm: (file: F | null) => void;
|
|
11
|
+
onCancel: Function;
|
|
12
|
+
onCustomConfirm: Function;
|
|
13
|
+
onCustomSuccess: Function;
|
|
14
|
+
maxSize: number;
|
|
15
|
+
uploadName: string;
|
|
16
|
+
uploadSuccess: string;
|
|
17
|
+
uploadUrl: string;
|
|
18
|
+
extensions: string[];
|
|
19
|
+
tips: string;
|
|
20
|
+
}> & Omit<{
|
|
21
|
+
readonly title: string;
|
|
22
|
+
readonly data: IJson<any>;
|
|
23
|
+
readonly header: IJson<any>;
|
|
24
|
+
readonly onConfirm: (file: F | null) => void;
|
|
25
|
+
readonly onCancel: Function;
|
|
26
|
+
readonly onCustomConfirm: Function;
|
|
27
|
+
readonly onCustomSuccess: Function;
|
|
28
|
+
readonly maxSize: number;
|
|
29
|
+
readonly uploadName: string;
|
|
30
|
+
readonly uploadSuccess: string;
|
|
31
|
+
readonly uploadUrl: string;
|
|
32
|
+
readonly extensions: string[];
|
|
33
|
+
readonly entity: ITransformerConstructor<F>;
|
|
34
|
+
readonly tips: string;
|
|
35
|
+
readonly confirmText?: string | undefined;
|
|
36
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "title" | "data" | "header" | "confirmText" | "onConfirm" | "onCancel" | "onCustomConfirm" | "onCustomSuccess" | "maxSize" | "uploadName" | "uploadSuccess" | "uploadUrl" | "extensions" | "tips">, "entity" | ("title" | "data" | "header" | "confirmText" | "onConfirm" | "onCancel" | "onCustomConfirm" | "onCustomSuccess" | "maxSize" | "uploadName" | "uploadSuccess" | "uploadUrl" | "extensions" | "tips")> & {} & Partial<{}>> & import('vue').PublicProps;
|
|
37
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
38
|
+
attrs: any;
|
|
39
|
+
slots: {};
|
|
40
|
+
emit: {};
|
|
41
|
+
}>) => import('vue').VNode & {
|
|
42
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_PrettifyLocal<T> = {
|
|
46
|
+
[K in keyof T]: T[K];
|
|
47
|
+
} & {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IUser } from './IUser';
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
title?(_: {}): any;
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
14
|
+
/**
|
|
15
|
+
* # 用户信息
|
|
16
|
+
*/
|
|
17
|
+
user: {
|
|
18
|
+
type: PropType<IUser>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* # 宽度
|
|
23
|
+
*/
|
|
24
|
+
width: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* # 宽度
|
|
30
|
+
*/
|
|
31
|
+
height: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
36
|
+
/**
|
|
37
|
+
* # 用户信息
|
|
38
|
+
*/
|
|
39
|
+
user: {
|
|
40
|
+
type: PropType<IUser>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* # 宽度
|
|
45
|
+
*/
|
|
46
|
+
width: {
|
|
47
|
+
type: NumberConstructor;
|
|
48
|
+
default: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* # 宽度
|
|
52
|
+
*/
|
|
53
|
+
height: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
}>> & Readonly<{}>, {
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
61
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
62
|
+
export default _default;
|
|
63
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
64
|
+
new (): {
|
|
65
|
+
$slots: S;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { MoneyDirection } from '../components';
|
|
2
|
+
import { HttpHeader, HttpStatus } from '../util';
|
|
3
|
+
/**
|
|
4
|
+
* # 全局配置
|
|
5
|
+
*
|
|
6
|
+
* @author Hamm.cn
|
|
7
|
+
*/
|
|
8
|
+
export declare class WebConfig {
|
|
9
|
+
/**
|
|
10
|
+
* ### 应用标识
|
|
11
|
+
*/
|
|
12
|
+
static appKey: string;
|
|
13
|
+
/**
|
|
14
|
+
* ### 是否自动处理权限前缀
|
|
15
|
+
*/
|
|
16
|
+
static autoPermissionPrefix: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* ### 最大文本域长度
|
|
19
|
+
*/
|
|
20
|
+
static maxTextAreaLength: number;
|
|
21
|
+
/**
|
|
22
|
+
* ### 最大文本长度
|
|
23
|
+
*/
|
|
24
|
+
static maxTextLength: number;
|
|
25
|
+
/**
|
|
26
|
+
* ### 文本域的最小行数
|
|
27
|
+
*/
|
|
28
|
+
static textareaMinRows: number;
|
|
29
|
+
/**
|
|
30
|
+
* ### 文本域的最大行数
|
|
31
|
+
*/
|
|
32
|
+
static textareaMaxRows: number;
|
|
33
|
+
/**
|
|
34
|
+
* ### 上传地址
|
|
35
|
+
*/
|
|
36
|
+
static uploadUrl: string;
|
|
37
|
+
/**
|
|
38
|
+
* ### 是否禁用权限
|
|
39
|
+
*
|
|
40
|
+
* - 如此项配置为 `true`, 则所有自动处理权限的功能都将失效。
|
|
41
|
+
*/
|
|
42
|
+
static disablePermission: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* ### 金额方向 (向上取、向下取、四舍五入)
|
|
45
|
+
*/
|
|
46
|
+
static moneyDirection: MoneyDirection;
|
|
47
|
+
/**
|
|
48
|
+
* ### 金额精度
|
|
49
|
+
*/
|
|
50
|
+
static moneyPrecision: number;
|
|
51
|
+
/**
|
|
52
|
+
* ### 每页显示条数可选项
|
|
53
|
+
*/
|
|
54
|
+
static pageSizes: number[];
|
|
55
|
+
/**
|
|
56
|
+
* ### 默认的上传文件名称
|
|
57
|
+
*/
|
|
58
|
+
static uploadFileName: string;
|
|
59
|
+
/**
|
|
60
|
+
* ### element-plus 语言包
|
|
61
|
+
*/
|
|
62
|
+
static elementPlusLocale: {
|
|
63
|
+
name: string;
|
|
64
|
+
el: {
|
|
65
|
+
breadcrumb: {
|
|
66
|
+
label: string;
|
|
67
|
+
};
|
|
68
|
+
colorpicker: {
|
|
69
|
+
confirm: string;
|
|
70
|
+
clear: string;
|
|
71
|
+
defaultLabel: string;
|
|
72
|
+
description: string;
|
|
73
|
+
alphaLabel: string;
|
|
74
|
+
};
|
|
75
|
+
datepicker: {
|
|
76
|
+
now: string;
|
|
77
|
+
today: string;
|
|
78
|
+
cancel: string;
|
|
79
|
+
clear: string;
|
|
80
|
+
confirm: string;
|
|
81
|
+
dateTablePrompt: string;
|
|
82
|
+
monthTablePrompt: string;
|
|
83
|
+
yearTablePrompt: string;
|
|
84
|
+
selectedDate: string;
|
|
85
|
+
selectDate: string;
|
|
86
|
+
selectTime: string;
|
|
87
|
+
startDate: string;
|
|
88
|
+
startTime: string;
|
|
89
|
+
endDate: string;
|
|
90
|
+
endTime: string;
|
|
91
|
+
prevYear: string;
|
|
92
|
+
nextYear: string;
|
|
93
|
+
prevMonth: string;
|
|
94
|
+
nextMonth: string;
|
|
95
|
+
year: string;
|
|
96
|
+
month1: string;
|
|
97
|
+
month2: string;
|
|
98
|
+
month3: string;
|
|
99
|
+
month4: string;
|
|
100
|
+
month5: string;
|
|
101
|
+
month6: string;
|
|
102
|
+
month7: string;
|
|
103
|
+
month8: string;
|
|
104
|
+
month9: string;
|
|
105
|
+
month10: string;
|
|
106
|
+
month11: string;
|
|
107
|
+
month12: string;
|
|
108
|
+
weeks: {
|
|
109
|
+
sun: string;
|
|
110
|
+
mon: string;
|
|
111
|
+
tue: string;
|
|
112
|
+
wed: string;
|
|
113
|
+
thu: string;
|
|
114
|
+
fri: string;
|
|
115
|
+
sat: string;
|
|
116
|
+
};
|
|
117
|
+
weeksFull: {
|
|
118
|
+
sun: string;
|
|
119
|
+
mon: string;
|
|
120
|
+
tue: string;
|
|
121
|
+
wed: string;
|
|
122
|
+
thu: string;
|
|
123
|
+
fri: string;
|
|
124
|
+
sat: string;
|
|
125
|
+
};
|
|
126
|
+
months: {
|
|
127
|
+
jan: string;
|
|
128
|
+
feb: string;
|
|
129
|
+
mar: string;
|
|
130
|
+
apr: string;
|
|
131
|
+
may: string;
|
|
132
|
+
jun: string;
|
|
133
|
+
jul: string;
|
|
134
|
+
aug: string;
|
|
135
|
+
sep: string;
|
|
136
|
+
oct: string;
|
|
137
|
+
nov: string;
|
|
138
|
+
dec: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
inputNumber: {
|
|
142
|
+
decrease: string;
|
|
143
|
+
increase: string;
|
|
144
|
+
};
|
|
145
|
+
select: {
|
|
146
|
+
loading: string;
|
|
147
|
+
noMatch: string;
|
|
148
|
+
noData: string;
|
|
149
|
+
placeholder: string;
|
|
150
|
+
};
|
|
151
|
+
dropdown: {
|
|
152
|
+
toggleDropdown: string;
|
|
153
|
+
};
|
|
154
|
+
mention: {
|
|
155
|
+
loading: string;
|
|
156
|
+
};
|
|
157
|
+
cascader: {
|
|
158
|
+
noMatch: string;
|
|
159
|
+
loading: string;
|
|
160
|
+
placeholder: string;
|
|
161
|
+
noData: string;
|
|
162
|
+
};
|
|
163
|
+
pagination: {
|
|
164
|
+
goto: string;
|
|
165
|
+
pagesize: string;
|
|
166
|
+
total: string;
|
|
167
|
+
pageClassifier: string;
|
|
168
|
+
page: string;
|
|
169
|
+
prev: string;
|
|
170
|
+
next: string;
|
|
171
|
+
currentPage: string;
|
|
172
|
+
prevPages: string;
|
|
173
|
+
nextPages: string;
|
|
174
|
+
deprecationWarning: string;
|
|
175
|
+
};
|
|
176
|
+
dialog: {
|
|
177
|
+
close: string;
|
|
178
|
+
};
|
|
179
|
+
drawer: {
|
|
180
|
+
close: string;
|
|
181
|
+
};
|
|
182
|
+
messagebox: {
|
|
183
|
+
title: string;
|
|
184
|
+
confirm: string;
|
|
185
|
+
cancel: string;
|
|
186
|
+
error: string;
|
|
187
|
+
close: string;
|
|
188
|
+
};
|
|
189
|
+
upload: {
|
|
190
|
+
deleteTip: string;
|
|
191
|
+
delete: string;
|
|
192
|
+
preview: string;
|
|
193
|
+
continue: string;
|
|
194
|
+
};
|
|
195
|
+
slider: {
|
|
196
|
+
defaultLabel: string;
|
|
197
|
+
defaultRangeStartLabel: string;
|
|
198
|
+
defaultRangeEndLabel: string;
|
|
199
|
+
};
|
|
200
|
+
table: {
|
|
201
|
+
emptyText: string;
|
|
202
|
+
confirmFilter: string;
|
|
203
|
+
resetFilter: string;
|
|
204
|
+
clearFilter: string;
|
|
205
|
+
sumText: string;
|
|
206
|
+
};
|
|
207
|
+
tour: {
|
|
208
|
+
next: string;
|
|
209
|
+
previous: string;
|
|
210
|
+
finish: string;
|
|
211
|
+
};
|
|
212
|
+
tree: {
|
|
213
|
+
emptyText: string;
|
|
214
|
+
};
|
|
215
|
+
transfer: {
|
|
216
|
+
noMatch: string;
|
|
217
|
+
noData: string;
|
|
218
|
+
titles: string[];
|
|
219
|
+
filterPlaceholder: string;
|
|
220
|
+
noCheckedFormat: string;
|
|
221
|
+
hasCheckedFormat: string;
|
|
222
|
+
};
|
|
223
|
+
image: {
|
|
224
|
+
error: string;
|
|
225
|
+
};
|
|
226
|
+
pageHeader: {
|
|
227
|
+
title: string;
|
|
228
|
+
};
|
|
229
|
+
popconfirm: {
|
|
230
|
+
confirmButtonText: string;
|
|
231
|
+
cancelButtonText: string;
|
|
232
|
+
};
|
|
233
|
+
carousel: {
|
|
234
|
+
leftArrow: string;
|
|
235
|
+
rightArrow: string;
|
|
236
|
+
indicator: string;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* ### 接口根地址
|
|
242
|
+
* 以 `/` 结尾
|
|
243
|
+
*/
|
|
244
|
+
static apiUrl: string;
|
|
245
|
+
/**
|
|
246
|
+
* ### 最大数字
|
|
247
|
+
*/
|
|
248
|
+
static maxNumber: number;
|
|
249
|
+
/**
|
|
250
|
+
* ### 最小数字
|
|
251
|
+
*/
|
|
252
|
+
static minNumber: number;
|
|
253
|
+
/**
|
|
254
|
+
* ### `AccessToken` 对应的 `Key`
|
|
255
|
+
*/
|
|
256
|
+
static authorizationHeaderKey: HttpHeader;
|
|
257
|
+
/**
|
|
258
|
+
* ### 全局 `http` 请求返回 成功状态码
|
|
259
|
+
*/
|
|
260
|
+
static successCode: HttpStatus;
|
|
261
|
+
/**
|
|
262
|
+
* ### 全局 `http` 请求返回 登录状态码
|
|
263
|
+
*/
|
|
264
|
+
static unAuthorizeCode: HttpStatus;
|
|
265
|
+
/**
|
|
266
|
+
* ### 超时时间 毫秒
|
|
267
|
+
* 超时后请求会自动断开并抛出异常
|
|
268
|
+
*/
|
|
269
|
+
static timeout: number;
|
|
270
|
+
/**
|
|
271
|
+
* ### 导出模板地址
|
|
272
|
+
*/
|
|
273
|
+
static importTemplateUrl: string;
|
|
274
|
+
/**
|
|
275
|
+
* ### 导入API地址
|
|
276
|
+
*/
|
|
277
|
+
static importUrl: string;
|
|
278
|
+
/**
|
|
279
|
+
* ### 导出API地址
|
|
280
|
+
*/
|
|
281
|
+
static exportUrl: string;
|
|
282
|
+
/**
|
|
283
|
+
* ### 导出查询API地址
|
|
284
|
+
*/
|
|
285
|
+
static exportQueryUrl: string;
|
|
286
|
+
/**
|
|
287
|
+
* ### 静态资源地址
|
|
288
|
+
*/
|
|
289
|
+
static staticUrl: string;
|
|
290
|
+
/**
|
|
291
|
+
* ### 登录地址
|
|
292
|
+
*/
|
|
293
|
+
static loginUrl: string;
|
|
294
|
+
/**
|
|
295
|
+
* ### 小数精度位数
|
|
296
|
+
*/
|
|
297
|
+
static numberPrecision: number;
|
|
298
|
+
/**
|
|
299
|
+
* ### 获取 `AccessToken`
|
|
300
|
+
*/
|
|
301
|
+
static getAccessToken(): string;
|
|
302
|
+
/**
|
|
303
|
+
* ### 移除 `AccessToken`
|
|
304
|
+
*/
|
|
305
|
+
static removeAccessToken(): void;
|
|
306
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WebConfig';
|