@juzhenfe/page-model 3.22.3 → 3.22.6
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/components/buttons-renderer/components/button-item-render/index.vue.d.ts +66 -0
- package/dist/components/buttons-renderer/index.vue.d.ts +40 -0
- package/dist/components/buttons-renderer/utils/index.d.ts +2 -2
- package/dist/components/column-filter-tools/index.vue.d.ts +10 -0
- package/dist/components/column-sort-tools/index.vue.d.ts +10 -0
- package/dist/components/draggable-list/index.vue.d.ts +25 -0
- package/dist/components/editable-table/components/column-tools/index.vue.d.ts +11 -0
- package/dist/components/editable-table/components/column-tools/setting.vue.d.ts +9 -0
- package/dist/components/editable-table/components/table-cell/index.vue.d.ts +16 -0
- package/dist/components/editable-table/index.d.ts +13 -14
- package/dist/components/editable-table/index.vue.d.ts +74 -0
- package/dist/components/form/components/col-container/components/module-container/index.vue.d.ts +30 -0
- package/dist/components/form/components/col-container/components/section-title-els/index.vue.d.ts +24 -0
- package/dist/components/form/components/col-container/components/tabs-mode-container/index.vue.d.ts +32 -0
- package/dist/components/form/components/col-container/index.vue.d.ts +24 -0
- package/dist/components/form/components/column-tools/setting.vue.d.ts +11 -0
- package/dist/components/form/components/column-tools/use-setting.d.ts +14 -14
- package/dist/components/form/components/container-component/index.vue.d.ts +22 -0
- package/dist/components/form/components/section-config/merge.d.ts +3 -3
- package/dist/components/form/components/section-config/use.d.ts +14 -14
- package/dist/components/form/constructor.d.ts +79 -80
- package/dist/components/form/index.d.ts +2 -3
- package/dist/components/form/index.vue.d.ts +19 -0
- package/dist/components/form/type.d.ts +168 -0
- package/dist/components/form/utils/save-columns.d.ts +30 -30
- package/dist/components/form/utils/use-form-els.d.ts +4 -4
- package/dist/components/form-container/components/dialog-mode/index.vue.d.ts +29 -0
- package/dist/components/form-container/components/drawer-mode/index.vue.d.ts +29 -0
- package/dist/components/form-container/components/full-page/index.vue.d.ts +29 -0
- package/dist/components/form-container/index.vue.d.ts +27 -0
- package/dist/components/form-dialog/index.vue.d.ts +30 -0
- package/dist/components/form-dialog/use-move.d.ts +19 -19
- package/dist/components/form-drawer/index.vue.d.ts +35 -0
- package/dist/components/form-item-renderer/index.vue.d.ts +75 -0
- package/dist/components/line-clamp-tools/index.vue.d.ts +9 -0
- package/dist/components/normal-tab/index.vue.d.ts +17 -0
- package/dist/components/normal-tab/type.d.ts +20 -0
- package/dist/components/page-model/components/selectable-operate/index.vue.d.ts +16 -0
- package/dist/components/page-model/components/top-tabs/constructor.d.ts +9 -10
- package/dist/components/page-model/components/top-tabs/index.vue.d.ts +21 -0
- package/dist/components/page-model/components/top-tabs/type.d.ts +11 -0
- package/dist/components/page-model/constructor.d.ts +156 -157
- package/dist/components/page-model/index.d.ts +4 -6
- package/dist/components/page-model/index.vue.d.ts +118 -0
- package/dist/components/page-model/patches/patch-config-urls.d.ts +2 -2
- package/dist/components/page-model/patches/patch-default-config.d.ts +2 -2
- package/dist/components/page-model/patches/patch-selectable.d.ts +2 -2
- package/dist/components/page-model/patches/patch-size.d.ts +2 -2
- package/dist/components/page-model/patches/patch-table-dragable.d.ts +2 -2
- package/dist/components/page-model/patches/patch-user-config.d.ts +2 -2
- package/dist/components/page-model/type.d.ts +345 -0
- package/dist/components/page-model/utils/default-config.d.ts +1 -1
- package/dist/components/page-model/utils/default-excel-export-config.d.ts +1 -1
- package/dist/components/page-model/utils/default-style-config.d.ts +1 -1
- package/dist/components/page-model/utils/default-text-config.d.ts +1 -1
- package/dist/components/page-model/utils/default-user-setting.d.ts +1 -1
- package/dist/components/page-model/utils/error-handler.d.ts +1 -1
- package/dist/components/page-model/utils/manager-controller.d.ts +47 -48
- package/dist/components/page-model/utils/patch-config.d.ts +1 -2
- package/dist/components/page-model/utils/use-auth-buttons.d.ts +7 -8
- package/dist/components/page-model/utils/use-keyboard-event.d.ts +9 -9
- package/dist/components/scenes-tab/index.vue.d.ts +5 -0
- package/dist/components/scenes-tab/type.d.ts +14 -0
- package/dist/components/search-form/components/search-form-full/index.vue.d.ts +16 -0
- package/dist/components/search-form/constructor.d.ts +21 -22
- package/dist/components/search-form/index.vue.d.ts +19 -0
- package/dist/components/search-form/type.d.ts +42 -0
- package/dist/components/search-form/use-detect-item-width.d.ts +5 -6
- package/dist/components/simple-popover/index.vue.d.ts +29 -0
- package/dist/components/table/components/column-tools/index.vue.d.ts +10 -0
- package/dist/components/table/components/column-tools/setting.vue.d.ts +17 -0
- package/dist/components/table/components/column-tools/use-setting.d.ts +14 -14
- package/dist/components/table/components/column-tools/use-user-config.d.ts +14 -14
- package/dist/components/table/components/column-tools/use-user-show-row-config.d.ts +35 -35
- package/dist/components/table/components/column-tools/user-config.vue.d.ts +11 -0
- package/dist/components/table/components/context-column-summary/index.vue.d.ts +13 -0
- package/dist/components/table/components/context-menu/index.vue.d.ts +35 -0
- package/dist/components/table/components/empty-data/index.vue.d.ts +7 -0
- package/dist/components/table/components/export-form/index.vue.d.ts +13 -0
- package/dist/components/table/components/export-form/use.d.ts +16 -17
- package/dist/components/table/components/selections-table/index.vue.d.ts +10 -0
- package/dist/components/table/components/selections-table/use.d.ts +15 -15
- package/dist/components/table/components/table-column/components/filter-zone/index.vue.d.ts +9 -0
- package/dist/components/table/components/table-column/components/filter-zone/utils/index.d.ts +69 -69
- package/dist/components/table/components/table-column/index.vue.d.ts +7 -0
- package/dist/components/table/components/table-v2/index.vue.d.ts +20 -0
- package/dist/components/table/components/table-wrap/index.vue.d.ts +24 -0
- package/dist/components/table/constructor.d.ts +344 -345
- package/dist/components/table/index.vue.d.ts +30 -0
- package/dist/components/table/type.d.ts +366 -0
- package/dist/components/table/utils/save-column-filter.d.ts +2 -2
- package/dist/components/table/utils/save-column-sort.d.ts +2 -2
- package/dist/components/table/utils/save-columns.d.ts +38 -38
- package/dist/components/table/utils/save-config.d.ts +6 -6
- package/dist/components/table/utils/use-column-drag.d.ts +8 -8
- package/dist/components/table/utils/use-listen-scroll.d.ts +5 -6
- package/dist/components/table/utils/use-static-summary.d.ts +11 -12
- package/dist/components/table/utils/use-table-config-change.d.ts +5 -6
- package/dist/components/table/utils/use-table-els.d.ts +4 -5
- package/dist/components/table-cell-renderer/index.vue.d.ts +58 -0
- package/dist/components/table-toolsbox/index.vue.d.ts +24 -0
- package/dist/index.es.js +1809 -1803
- package/dist/index.umd.js +2 -2
- package/dist/main.d.ts +14 -13
- package/dist/types/common.d.ts +485 -0
- package/dist/types/form-item-types/cascader.d.ts +39 -0
- package/dist/types/form-item-types/checkbox-group.d.ts +19 -0
- package/dist/types/form-item-types/color-picker.d.ts +21 -0
- package/dist/types/form-item-types/date-picker.d.ts +46 -0
- package/dist/types/form-item-types/input-number.d.ts +16 -0
- package/dist/types/form-item-types/input.d.ts +18 -0
- package/dist/types/form-item-types/jz-a-map.d.ts +14 -0
- package/dist/types/form-item-types/jz-cascader.d.ts +21 -0
- package/dist/types/form-item-types/jz-city-picker.d.ts +28 -0
- package/dist/types/form-item-types/jz-ck-editor.d.ts +27 -0
- package/dist/types/form-item-types/jz-editor.d.ts +20 -0
- package/dist/types/form-item-types/jz-file-upload.d.ts +20 -0
- package/dist/types/form-item-types/jz-img-upload.d.ts +23 -0
- package/dist/types/form-item-types/jz-long-input.d.ts +10 -0
- package/dist/types/form-item-types/jz-td-map.d.ts +13 -0
- package/dist/types/form-item-types/no-e-type.d.ts +12 -0
- package/dist/types/form-item-types/radio-group.d.ts +17 -0
- package/dist/types/form-item-types/rate.d.ts +30 -0
- package/dist/types/form-item-types/select-v2.d.ts +48 -0
- package/dist/types/form-item-types/select.d.ts +43 -0
- package/dist/types/form-item-types/slider.d.ts +31 -0
- package/dist/types/form-item-types/switch.d.ts +15 -0
- package/dist/types/form-item-types/time-picker.d.ts +42 -0
- package/dist/types/form-item-types/time-select.d.ts +31 -0
- package/dist/types/renderer.d.ts +10 -0
- package/dist/types/shims-vue-property.d.ts +8 -0
- package/dist/types/shims-vue.d.ts +7 -0
- package/dist/types/window.d.ts +10 -0
- package/dist/utils/config-saver.d.ts +51 -51
- package/dist/utils/define-config.d.ts +2 -3
- package/dist/utils/event-chain.d.ts +9 -9
- package/dist/utils/event-emitter.d.ts +7 -7
- package/dist/utils/index.d.ts +101 -102
- package/dist/utils/infinite-table.d.ts +49 -49
- package/dist/utils/manager.d.ts +13 -14
- package/dist/utils/provide-keys.d.ts +20 -20
- package/dist/utils/reflect/index.d.ts +14 -15
- package/dist/utils/reflect/reflect-collector.d.ts +25 -25
- package/dist/utils/resize.d.ts +2 -3
- package/package.json +9 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const patchSelectable: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
-
export default patchSelectable;
|
|
1
|
+
declare const patchSelectable: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
+
export default patchSelectable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const patchConfigSize: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
-
export default patchConfigSize;
|
|
1
|
+
declare const patchConfigSize: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
+
export default patchConfigSize;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const patchSelectable: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
-
export default patchSelectable;
|
|
1
|
+
declare const patchSelectable: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
+
export default patchSelectable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const patchUserConfig: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
-
export default patchUserConfig;
|
|
1
|
+
declare const patchUserConfig: (config: PageModel.Config) => PageModel.Config<AnyObject, any>;
|
|
2
|
+
export default patchUserConfig;
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/// <reference path="../../types/common.d.ts" />
|
|
2
|
+
/// <reference path="./components/top-tabs/type.d.ts" />
|
|
3
|
+
/// <reference path="../search-form/type.d.ts" />
|
|
4
|
+
/// <reference path="../table/type.d.ts" />
|
|
5
|
+
/// <reference path="../form/type.d.ts" />
|
|
6
|
+
|
|
7
|
+
import { default as ReflectRelation } from '../../utils/reflect/reflect-collector';
|
|
8
|
+
import { Component, WatchStopHandle } from 'vue';
|
|
9
|
+
import { default as FormManager } from '../form/constructor';
|
|
10
|
+
import { default as SearchFormManager } from '../search-form/constructor';
|
|
11
|
+
import { default as PageModelManager } from './constructor';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
declare global {
|
|
15
|
+
namespace PageModel {
|
|
16
|
+
|
|
17
|
+
type Size = 'large' | 'default' | 'small'
|
|
18
|
+
|
|
19
|
+
type UrlMode = 'path' | 'params'
|
|
20
|
+
|
|
21
|
+
type AjaxMethod = 'get' | 'post' | 'delete' | 'put' | 'patch' | 'head' | 'options' | 'connect' | 'trace'
|
|
22
|
+
|
|
23
|
+
type ExportMode = 'get' | 'build'
|
|
24
|
+
|
|
25
|
+
type RequestProcessFn<CTX = any> = (this: CTX, ...rest: any[]) => any;
|
|
26
|
+
|
|
27
|
+
type GetReqResultProcessFn<CTX = any> = (this: CTX, ...rest: any[]) => {
|
|
28
|
+
total: number;
|
|
29
|
+
list: any[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 可能返回promise的函数
|
|
34
|
+
*/
|
|
35
|
+
type MayBeAPromiseFn<T extends (...args: any[]) => any> = T | ((...args: Parameters<T>) => Promise<ReturnType<T>>)
|
|
36
|
+
|
|
37
|
+
type PatchConfigFn = {
|
|
38
|
+
(this: PageModelManager, config: PageModel.Config | PageModel.UConfig): PageModel.Config | PageModel.UConfig
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type InnerPatchName = 'serverFormErrorHandler'
|
|
42
|
+
|
|
43
|
+
type Patch = InnerPatchName | PatchConfigFn
|
|
44
|
+
|
|
45
|
+
type Reflections = {
|
|
46
|
+
[key: string]: any[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type TreeProps = {
|
|
50
|
+
id: string;
|
|
51
|
+
pId: string;
|
|
52
|
+
children?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type ReflectWatches = WatchStopHandle[] & {
|
|
56
|
+
reflect: ReflectRelation
|
|
57
|
+
}
|
|
58
|
+
type Config<MODEL = AnyObject, EXTENDS = any> = {
|
|
59
|
+
// 模块名称
|
|
60
|
+
name?: string;
|
|
61
|
+
/**
|
|
62
|
+
* 启用按钮权限
|
|
63
|
+
*/
|
|
64
|
+
openAuthButton?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 是否在config准备完毕后直接获取数据
|
|
67
|
+
*/
|
|
68
|
+
getImmediate?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* 是否开启外置数据反射
|
|
71
|
+
*/
|
|
72
|
+
reflect?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 全局设置尺寸
|
|
75
|
+
*/
|
|
76
|
+
size?: Size;
|
|
77
|
+
/**
|
|
78
|
+
* 阴影
|
|
79
|
+
*/
|
|
80
|
+
shadow?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* 键盘事件
|
|
83
|
+
*/
|
|
84
|
+
keyboardEvents?: {
|
|
85
|
+
[key: string]: (this: PageModelManager, e: KeyboardEvent) => any;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 基请求地址,增删改查接口基于此url构建restful风格地址
|
|
90
|
+
*/
|
|
91
|
+
url?: string;
|
|
92
|
+
/**
|
|
93
|
+
* 删除接口、详情接口参数构建方式,path参与路径,params参数请求
|
|
94
|
+
*/
|
|
95
|
+
urlMode?: UrlMode;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 获取API地址
|
|
99
|
+
*/
|
|
100
|
+
getUrl?: string;
|
|
101
|
+
/**
|
|
102
|
+
* 获取method
|
|
103
|
+
*/
|
|
104
|
+
getMethod?: AjaxMethod;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 自定义获取器
|
|
108
|
+
*/
|
|
109
|
+
customGetter?: MayBeAPromiseFn<(this: PageModelManager, reqParams: AnyObject) => {
|
|
110
|
+
total: number;
|
|
111
|
+
data: MODEL[];
|
|
112
|
+
}>
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* 获取的其他参数
|
|
116
|
+
*/
|
|
117
|
+
otherParams?: AnyObject;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 列表接口请求前回调
|
|
121
|
+
*/
|
|
122
|
+
beforeGetRequest?: (this: PageModelManager, reqParams: AnyObject) => void;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* 获取的数据拿取方式(处理不同请求返回数据列表的方法)
|
|
126
|
+
*/
|
|
127
|
+
getReqResultProcessFn?: MayBeAPromiseFn<GetReqResultProcessFn<PageModelManager>>
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 请求参数回调处理
|
|
131
|
+
* @param this
|
|
132
|
+
* @param data 列表数据
|
|
133
|
+
* @returns 列表数据
|
|
134
|
+
*/
|
|
135
|
+
getDataCallback?: (this: PageModelManager, data: MODEL[]) => ExtendKeys<MODEL>[];
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 树形数据配置
|
|
139
|
+
*/
|
|
140
|
+
treeProps?: TreeProps;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 删除地址
|
|
144
|
+
*/
|
|
145
|
+
delUrl?: string;
|
|
146
|
+
/**
|
|
147
|
+
* 从row中获取删除参数的key
|
|
148
|
+
*/
|
|
149
|
+
delKey?: keyof MODEL;
|
|
150
|
+
/**
|
|
151
|
+
* 删除参数的rowKey键名称
|
|
152
|
+
*/
|
|
153
|
+
delParamsKey?: keyof MODEL;
|
|
154
|
+
/**
|
|
155
|
+
* 删除method
|
|
156
|
+
*/
|
|
157
|
+
delMethod?: AjaxMethod;
|
|
158
|
+
/**
|
|
159
|
+
* 删除参数
|
|
160
|
+
*/
|
|
161
|
+
delParams?: AnyObject | ((this: PageModelManager, data: MODEL) => AnyObject);
|
|
162
|
+
/**
|
|
163
|
+
* 删除的参数处理方法
|
|
164
|
+
*/
|
|
165
|
+
delReqDataProcessFn?: RequestProcessFn;
|
|
166
|
+
/**
|
|
167
|
+
* 删除的数据拿取方式
|
|
168
|
+
*/
|
|
169
|
+
delReqResultProcessFn?: RequestProcessFn;
|
|
170
|
+
|
|
171
|
+
// 更新地址
|
|
172
|
+
updUrl?: string;
|
|
173
|
+
// 更新方法
|
|
174
|
+
updMethod?: AjaxMethod;
|
|
175
|
+
// 更新的数据拿取方式
|
|
176
|
+
updReqResultProcessFn?: RequestProcessFn;
|
|
177
|
+
|
|
178
|
+
// 新增地址
|
|
179
|
+
addUrl?: string;
|
|
180
|
+
// 新增方法
|
|
181
|
+
addMethod?: AjaxMethod;
|
|
182
|
+
// 新增的数据拿取方式
|
|
183
|
+
addReqResultProcessFn?: RequestProcessFn;
|
|
184
|
+
// 新增按钮的样式
|
|
185
|
+
addButton?: Pick<Button, 'text' | 'props'>;
|
|
186
|
+
// 新增按钮是否放置在多选操作
|
|
187
|
+
addButtonInSelectButtonsArea?: boolean;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 详情地址
|
|
191
|
+
*/
|
|
192
|
+
detailUrl?: string;
|
|
193
|
+
/**
|
|
194
|
+
* 提取详情参数的rowKey键名称
|
|
195
|
+
*/
|
|
196
|
+
detailKey?: keyof MODEL;
|
|
197
|
+
/**
|
|
198
|
+
* 详情请求参数的rowKey键名称
|
|
199
|
+
*/
|
|
200
|
+
detailParamsKey?: keyof MODEL;
|
|
201
|
+
/**
|
|
202
|
+
* 详情method
|
|
203
|
+
*/
|
|
204
|
+
detailMethod?: string;
|
|
205
|
+
// 详情的参数获取方式
|
|
206
|
+
detailReqDataProcessFn?: RequestProcessFn;
|
|
207
|
+
// 详情的数据拿取方式
|
|
208
|
+
detailReqResultProcessFn?: RequestProcessFn;
|
|
209
|
+
// 详情是否显示记载中
|
|
210
|
+
detailLoading?: boolean;
|
|
211
|
+
// 是否使用详情
|
|
212
|
+
useDetail?: boolean;
|
|
213
|
+
|
|
214
|
+
// 导入地址
|
|
215
|
+
importUrl?: string;
|
|
216
|
+
// 导入方法
|
|
217
|
+
importMethod?: AjaxMethod;
|
|
218
|
+
// 导入文件名称
|
|
219
|
+
importFileKey?: string;
|
|
220
|
+
// 导入参数
|
|
221
|
+
importParams?: AnyObject | ((this: any, data: MODEL) => AnyObject);
|
|
222
|
+
|
|
223
|
+
// 导出地址
|
|
224
|
+
exportUrl?: string;
|
|
225
|
+
// 导出的模式 后端构建 get 或者 前端构建 build
|
|
226
|
+
exportMode?: ExportMode;
|
|
227
|
+
// 导出参数
|
|
228
|
+
exportParams?: AnyObject | ((this: any, data: MODEL) => AnyObject);
|
|
229
|
+
|
|
230
|
+
// 补丁,可以对config进行处理
|
|
231
|
+
patches?: Patch[];
|
|
232
|
+
|
|
233
|
+
// 顶部布局参数,包含tab栏等
|
|
234
|
+
tabs?: Tabs;
|
|
235
|
+
|
|
236
|
+
// config事件
|
|
237
|
+
events?: {
|
|
238
|
+
[key: string]: (this: PageModelManager, ...rest: any[]) => any;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// 搜索表单
|
|
242
|
+
searchForm?: SearchForm<MODEL, SearchFormManager>;
|
|
243
|
+
|
|
244
|
+
// 表格
|
|
245
|
+
table: Table<MODEL, TableManager>;
|
|
246
|
+
|
|
247
|
+
// 是否存在表单
|
|
248
|
+
hasForm?: boolean;
|
|
249
|
+
|
|
250
|
+
// 表单配置
|
|
251
|
+
form?: Form<MODEL, FormManager<MODEL>>;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// 使用配置
|
|
255
|
+
type UConfig<T = AnyObject, K = any> = Config<T, K> & {
|
|
256
|
+
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// 注册时候的配置
|
|
260
|
+
type InstallOptions = {
|
|
261
|
+
// 请求对象 必须实现
|
|
262
|
+
request: IRequest;
|
|
263
|
+
// 捕获错误
|
|
264
|
+
errorHandler?: ErrorHandler;
|
|
265
|
+
// 默认配置
|
|
266
|
+
config?: Config<any, any>;
|
|
267
|
+
// patches
|
|
268
|
+
patches?: PatchConfigFn[];
|
|
269
|
+
// 文本配置
|
|
270
|
+
textConfig: TextConfig;
|
|
271
|
+
// 样式
|
|
272
|
+
style?: GlobalStyle;
|
|
273
|
+
// 导出excel的配置
|
|
274
|
+
excelExportConfig?: ExcelExportConfig;
|
|
275
|
+
// 保存配置
|
|
276
|
+
userSetting?: UserSetting
|
|
277
|
+
// 空内容组件
|
|
278
|
+
emptyData?: Component
|
|
279
|
+
/**
|
|
280
|
+
* 获取zIndex
|
|
281
|
+
*/
|
|
282
|
+
getZIndex?: () => number;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
type ErrorHandler = {
|
|
287
|
+
(error: any): void;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type IRquestRquestMethods<T extends string, K> = {
|
|
291
|
+
[key in T]: K;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
type IRequest = IRquestRquestMethods<AjaxMethod, (url: string, ...rest: any[]) => Promise<any>>
|
|
295
|
+
|
|
296
|
+
type TextConfig = {
|
|
297
|
+
delTitle?: string;
|
|
298
|
+
delText?: string;
|
|
299
|
+
delSuccessText?: string;
|
|
300
|
+
addSuccessText?: string;
|
|
301
|
+
updSuccessText?: string;
|
|
302
|
+
importSuccessText?: string;
|
|
303
|
+
leaveConfirmTitle?: string;
|
|
304
|
+
leaveConfirmText?: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
type GlobalStyle = {
|
|
308
|
+
searchFormItemWidth?: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
type ExcelExportConfig = {
|
|
312
|
+
fontFamily?: string;
|
|
313
|
+
fontSize?: number;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
type PageModelUserConfig = {
|
|
317
|
+
/**
|
|
318
|
+
* 显示的行数,超出隐藏
|
|
319
|
+
*/
|
|
320
|
+
showRowNumbers?: number;
|
|
321
|
+
/**
|
|
322
|
+
* 改变即刻搜索
|
|
323
|
+
*/
|
|
324
|
+
searchOnValueChange?: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* enter监听搜索
|
|
327
|
+
*/
|
|
328
|
+
enterSearch?: boolean;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
type userSettingMode = 'user' | 'server'
|
|
332
|
+
|
|
333
|
+
type UserSetting = {
|
|
334
|
+
// 配置的模式 本地 、服务端
|
|
335
|
+
mode?: userSettingMode;
|
|
336
|
+
// 提交的方法
|
|
337
|
+
serverUpdateFn?: (key: string, val: string) => Promise<boolean>;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export type Config<MODEL, EXTEND> = PageModel.Config<MODEL, EXTEND>
|
|
344
|
+
|
|
345
|
+
export type InstallOptions = PageModel.InstallOptions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getPageModelDefaultConfig: () => PageModel.Config;
|
|
1
|
+
export declare const getPageModelDefaultConfig: () => PageModel.Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getDefaultExcelExportConfig: () => PageModel.ExcelExportConfig;
|
|
1
|
+
export declare const getDefaultExcelExportConfig: () => PageModel.ExcelExportConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getDefaultGlobalStyleConfig: () => PageModel.GlobalStyle;
|
|
1
|
+
export declare const getDefaultGlobalStyleConfig: () => PageModel.GlobalStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getDefaultTextConfig: () => PageModel.TextConfig;
|
|
1
|
+
export declare const getDefaultTextConfig: () => PageModel.TextConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getDefaultUserSettingConfig: () => PageModel.UserSetting;
|
|
1
|
+
export declare const getDefaultUserSettingConfig: () => PageModel.UserSetting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function defaultErrorHandler(error: Error): void;
|
|
1
|
+
export default function defaultErrorHandler(error: Error): void;
|
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
import { default as PageModelManager } from '../constructor';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export default managerController;
|
|
2
|
+
declare class ManagerController {
|
|
3
|
+
/**
|
|
4
|
+
* 初始的managerId
|
|
5
|
+
*/
|
|
6
|
+
private _id;
|
|
7
|
+
/**
|
|
8
|
+
* 当前激活的managerId
|
|
9
|
+
*/
|
|
10
|
+
private currentManagerId;
|
|
11
|
+
/**
|
|
12
|
+
* managers
|
|
13
|
+
*/
|
|
14
|
+
private managers;
|
|
15
|
+
/**
|
|
16
|
+
* 获取一个managerId
|
|
17
|
+
*/
|
|
18
|
+
getManagerId(): number;
|
|
19
|
+
/**
|
|
20
|
+
* 获取一个manager
|
|
21
|
+
*/
|
|
22
|
+
getManager(id: number): PageModelManager;
|
|
23
|
+
/**
|
|
24
|
+
* 获取当前激活的manager
|
|
25
|
+
*/
|
|
26
|
+
getCurrentManager(): PageModelManager;
|
|
27
|
+
/**
|
|
28
|
+
* 获取当前激活的managerId
|
|
29
|
+
*/
|
|
30
|
+
getCurrentManagerId(): number;
|
|
31
|
+
/**
|
|
32
|
+
* 设置当前激活的managerId
|
|
33
|
+
*/
|
|
34
|
+
setCurrentManagerId(id: number): void;
|
|
35
|
+
/**
|
|
36
|
+
* 注册一个manager
|
|
37
|
+
*/
|
|
38
|
+
register(manager: PageModelManager): void;
|
|
39
|
+
/**
|
|
40
|
+
* 销毁一个manager
|
|
41
|
+
*/
|
|
42
|
+
destroy(id: number): void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 全局managerl管理器
|
|
46
|
+
*/
|
|
47
|
+
declare const managerController: ManagerController;
|
|
48
|
+
export default managerController;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { default as PageModelManager } from '../constructor';
|
|
2
|
-
|
|
3
|
-
export default function patchConfig(this: PageModelManager, config: PageModel.Config, patches: PageModel.PatchConfigFn[]): any;
|
|
2
|
+
export default function patchConfig(this: PageModelManager, config: PageModel.Config, patches: PageModel.PatchConfigFn[]): any;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export { useAuthButtons };
|
|
2
|
+
/**
|
|
3
|
+
* 使用授权按钮
|
|
4
|
+
*/
|
|
5
|
+
declare function useAuthButtons(props: any, injectValue?: string[] | Ref<string[]>): {
|
|
6
|
+
authButtons: import('vue').ComputedRef<any>;
|
|
7
|
+
};
|
|
8
|
+
export { useAuthButtons };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 监听键盘事件
|
|
3
|
-
* @returns
|
|
4
|
-
*/
|
|
5
|
-
export declare const useKeyBoardEvent: () => {
|
|
6
|
-
useKeyboardEvents: {
|
|
7
|
-
onMouseenter: (...rest: any[]) => void;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* 监听键盘事件
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
export declare const useKeyBoardEvent: () => {
|
|
6
|
+
useKeyboardEvents: {
|
|
7
|
+
onMouseenter: (...rest: any[]) => void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {
|
|
4
|
+
getValue: () => {};
|
|
5
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as SearchFormManager } from '../../constructor';
|
|
2
|
+
type Opts = {
|
|
3
|
+
formData: AnyObject;
|
|
4
|
+
context: any;
|
|
5
|
+
formEls: any[];
|
|
6
|
+
searchFormManager: SearchFormManager;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {
|
|
9
|
+
show: (opts: Opts) => void;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
11
|
+
filter: (formData: AnyObject) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
13
|
+
onFilter?: (formData: AnyObject) => any;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { default as IManager } from '../../utils/manager';
|
|
2
2
|
import { ComponentPublicInstance } from 'vue';
|
|
3
3
|
import { default as PageModelManager } from '../page-model/constructor';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
get
|
|
11
|
-
get
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
4
|
+
export default class SearchFormManager extends IManager {
|
|
5
|
+
propsConfig?: PageModel.SearchForm;
|
|
6
|
+
formData: AnyObject;
|
|
7
|
+
isExpanded: boolean;
|
|
8
|
+
constructor(form?: PageModel.SearchForm);
|
|
9
|
+
get form(): PageModel.SearchForm<any, any>;
|
|
10
|
+
get size(): PageModel.Size;
|
|
11
|
+
get expandMode(): PageModel.SearchFormExpandMode;
|
|
12
|
+
refreshPage(): void;
|
|
13
|
+
getReqParams(): {};
|
|
14
|
+
init(): void;
|
|
15
|
+
getInitialFormData(): {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
};
|
|
18
|
+
setInitialFormData(): void;
|
|
19
|
+
toggleExpand(): void;
|
|
20
|
+
updateContext(context: ComponentPublicInstance): void;
|
|
21
|
+
isUpdateConfig: boolean;
|
|
22
|
+
onConfigUpdated(): void;
|
|
23
|
+
register(manager: PageModelManager): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as PageModelManager } from '../page-model/constructor';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
5
|
+
form?: PageModel.SearchForm;
|
|
6
|
+
manager?: PageModelManager;
|
|
7
|
+
}, {
|
|
8
|
+
doSearchFormLayout: () => void;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
10
|
+
form?: PageModel.SearchForm;
|
|
11
|
+
manager?: PageModelManager;
|
|
12
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
|
13
|
+
default?: (props: {}) => any;
|
|
14
|
+
}>;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|