fast-crud-ui3 1.5.15-beta2 → 1.5.16-tsc-beta

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.
Files changed (168) hide show
  1. package/lib/assets/fonts/iconfont.d.ts +0 -0
  2. package/lib/components/checkbox-group/index.d.ts +2 -0
  3. package/lib/components/checkbox-group/src/fast-checkbox-group.d.ts +72 -0
  4. package/lib/components/content-dialog/index.d.ts +2 -0
  5. package/lib/components/content-dialog/src/fast-cell-content.d.ts +83 -0
  6. package/lib/components/json-viewer/index.d.ts +2 -0
  7. package/lib/components/json-viewer/src/fast-json-viewer.d.ts +48 -0
  8. package/lib/components/mapping.d.ts +5 -0
  9. package/lib/components/object-picker/index.d.ts +2 -0
  10. package/lib/components/object-picker/src/fast-object-picker.d.ts +132 -0
  11. package/lib/components/select/index.d.ts +2 -0
  12. package/lib/components/select/src/fast-select.d.ts +83 -0
  13. package/lib/components/table/index.d.ts +2 -0
  14. package/lib/components/table/src/RowConfirm.d.ts +39 -0
  15. package/lib/components/table/src/dynamic-filter-form.d.ts +118 -0
  16. package/lib/components/table/src/dynamic-filter-list.d.ts +57 -0
  17. package/lib/components/table/src/easy-filter.d.ts +118 -0
  18. package/lib/components/table/src/export-confirm.d.ts +12 -0
  19. package/lib/components/table/src/quick-filter-form.d.ts +42 -0
  20. package/lib/components/table/src/row-form.d.ts +33 -0
  21. package/lib/components/table/src/stored-filter-manager.d.ts +55 -0
  22. package/lib/components/table/src/stored-filter.d.ts +37 -0
  23. package/lib/components/table/src/table-head-cell.d.ts +9 -0
  24. package/lib/components/table/src/table.d.ts +497 -0
  25. package/lib/components/table/src/util.d.ts +77 -0
  26. package/lib/components/table-column/config.d.ts +5 -0
  27. package/lib/components/table-column/index.d.ts +2 -0
  28. package/lib/components/table-column/src/table-column.d.ts +256 -0
  29. package/lib/components/table-column-date-picker/config.d.ts +5 -0
  30. package/lib/components/table-column-date-picker/index.d.ts +2 -0
  31. package/lib/components/table-column-date-picker/src/table-column-date-picker.d.ts +173 -0
  32. package/lib/components/table-column-file/config.d.ts +5 -0
  33. package/lib/components/table-column-file/index.d.ts +2 -0
  34. package/lib/components/table-column-file/src/table-column-file.d.ts +285 -0
  35. package/lib/components/table-column-img/config.d.ts +5 -0
  36. package/lib/components/table-column-img/index.d.ts +2 -0
  37. package/lib/components/table-column-img/src/table-column-img.d.ts +285 -0
  38. package/lib/components/table-column-input/config.d.ts +5 -0
  39. package/lib/components/table-column-input/index.d.ts +2 -0
  40. package/lib/components/table-column-input/src/table-column-input.d.ts +173 -0
  41. package/lib/components/table-column-number/config.d.ts +5 -0
  42. package/lib/components/table-column-number/index.d.ts +2 -0
  43. package/lib/components/table-column-number/src/table-column-number.d.ts +173 -0
  44. package/lib/components/table-column-object/config.d.ts +5 -0
  45. package/lib/components/table-column-object/index.d.ts +2 -0
  46. package/lib/components/table-column-object/src/table-column-object.d.ts +315 -0
  47. package/lib/components/table-column-select/config.d.ts +5 -0
  48. package/lib/components/table-column-select/index.d.ts +2 -0
  49. package/lib/components/table-column-select/src/table-column-select.d.ts +276 -0
  50. package/lib/components/table-column-switch/config.d.ts +5 -0
  51. package/lib/components/table-column-switch/index.d.ts +2 -0
  52. package/lib/components/table-column-switch/src/table-column-switch.d.ts +175 -0
  53. package/lib/components/table-column-textarea/config.d.ts +5 -0
  54. package/lib/components/table-column-textarea/index.d.ts +2 -0
  55. package/lib/components/table-column-textarea/src/table-column-textarea.d.ts +173 -0
  56. package/lib/components/table-column-time-picker/config.d.ts +5 -0
  57. package/lib/components/table-column-time-picker/index.d.ts +2 -0
  58. package/lib/components/table-column-time-picker/src/table-column-time-picker.d.ts +173 -0
  59. package/lib/components/upload/index.d.ts +2 -0
  60. package/lib/components/upload/src/fast-upload.d.ts +120 -0
  61. package/lib/fast-crud-ui3.cjs.js +7 -7
  62. package/lib/fast-crud-ui3.es.js +1123 -1080
  63. package/lib/fast-crud-ui3.umd.js +7 -7
  64. package/lib/global.d.ts +42 -0
  65. package/lib/index.d.ts +56 -0
  66. package/lib/mixins/table-column.d.ts +104 -0
  67. package/lib/mixins/upload.d.ts +15 -0
  68. package/lib/model/cond.d.ts +25 -0
  69. package/lib/model/editComponentConfig.d.ts +25 -0
  70. package/lib/model/fastTableOption.d.ts +355 -0
  71. package/lib/model/filterComponentConfig.d.ts +57 -0
  72. package/lib/model/opt.d.ts +20 -0
  73. package/lib/model/order.d.ts +7 -0
  74. package/lib/model/pageQuery.d.ts +23 -0
  75. package/lib/model/query.d.ts +33 -0
  76. package/lib/model/rel.d.ts +5 -0
  77. package/lib/style.css +1 -1
  78. package/lib/util/cache.d.ts +17 -0
  79. package/lib/util/dialog.d.ts +49 -0
  80. package/lib/util/escape.d.ts +7 -0
  81. package/lib/util/http.d.ts +8 -0
  82. package/lib/util/pick.d.ts +14 -0
  83. package/lib/util/util.d.ts +252 -0
  84. package/package.json +18 -5
  85. package/packages/assets/fonts/iconfont.css +163 -0
  86. package/packages/assets/fonts/iconfont.js +1 -0
  87. package/packages/assets/fonts/iconfont.ttf +0 -0
  88. package/packages/assets/fonts/iconfont.woff +0 -0
  89. package/packages/assets/fonts/iconfont.woff2 +0 -0
  90. package/packages/components/checkbox-group/index.js +7 -0
  91. package/packages/components/checkbox-group/src/fast-checkbox-group.vue +83 -0
  92. package/packages/components/content-dialog/index.js +7 -0
  93. package/packages/components/content-dialog/src/fast-cell-content.vue +115 -0
  94. package/packages/components/json-viewer/index.js +7 -0
  95. package/packages/components/json-viewer/src/fast-json-viewer.vue +54 -0
  96. package/packages/components/mapping.js +95 -0
  97. package/packages/components/object-picker/index.js +7 -0
  98. package/packages/components/object-picker/src/fast-object-picker.vue +170 -0
  99. package/packages/components/select/index.js +7 -0
  100. package/packages/components/select/src/fast-select.vue +89 -0
  101. package/packages/components/table/index.js +7 -0
  102. package/packages/components/table/src/RowConfirm.vue +87 -0
  103. package/packages/components/table/src/dynamic-filter-form.vue +253 -0
  104. package/packages/components/table/src/dynamic-filter-list.vue +172 -0
  105. package/packages/components/table/src/easy-filter.vue +129 -0
  106. package/packages/components/table/src/export-confirm.vue +55 -0
  107. package/packages/components/table/src/quick-filter-form.vue +140 -0
  108. package/packages/components/table/src/row-form.vue +137 -0
  109. package/packages/components/table/src/stored-filter-manager.vue +240 -0
  110. package/packages/components/table/src/stored-filter.vue +180 -0
  111. package/packages/components/table/src/table-head-cell.vue +41 -0
  112. package/packages/components/table/src/table.vue +1309 -0
  113. package/packages/components/table/src/util.js +496 -0
  114. package/packages/components/table-column/config.js +64 -0
  115. package/packages/components/table-column/index.js +7 -0
  116. package/packages/components/table-column/src/table-column.vue +44 -0
  117. package/packages/components/table-column-date-picker/config.js +139 -0
  118. package/packages/components/table-column-date-picker/index.js +7 -0
  119. package/packages/components/table-column-date-picker/src/table-column-date-picker.vue +54 -0
  120. package/packages/components/table-column-file/config.js +83 -0
  121. package/packages/components/table-column-file/index.js +7 -0
  122. package/packages/components/table-column-file/src/table-column-file.vue +79 -0
  123. package/packages/components/table-column-img/config.js +83 -0
  124. package/packages/components/table-column-img/index.js +7 -0
  125. package/packages/components/table-column-img/src/table-column-img.vue +82 -0
  126. package/packages/components/table-column-input/config.js +77 -0
  127. package/packages/components/table-column-input/index.js +7 -0
  128. package/packages/components/table-column-input/src/table-column-input.vue +60 -0
  129. package/packages/components/table-column-number/config.js +89 -0
  130. package/packages/components/table-column-number/index.js +7 -0
  131. package/packages/components/table-column-number/src/table-column-number.vue +54 -0
  132. package/packages/components/table-column-object/config.js +66 -0
  133. package/packages/components/table-column-object/index.js +7 -0
  134. package/packages/components/table-column-object/src/table-column-object.vue +75 -0
  135. package/packages/components/table-column-select/config.js +66 -0
  136. package/packages/components/table-column-select/index.js +7 -0
  137. package/packages/components/table-column-select/src/table-column-select.vue +101 -0
  138. package/packages/components/table-column-switch/config.js +55 -0
  139. package/packages/components/table-column-switch/index.js +7 -0
  140. package/packages/components/table-column-switch/src/table-column-switch.vue +82 -0
  141. package/packages/components/table-column-textarea/config.js +77 -0
  142. package/packages/components/table-column-textarea/index.js +7 -0
  143. package/packages/components/table-column-textarea/src/table-column-textarea.vue +56 -0
  144. package/packages/components/table-column-time-picker/config.js +62 -0
  145. package/packages/components/table-column-time-picker/index.js +7 -0
  146. package/packages/components/table-column-time-picker/src/table-column-time-picker.vue +53 -0
  147. package/packages/components/upload/index.js +7 -0
  148. package/packages/components/upload/src/fast-upload.vue +272 -0
  149. package/packages/global.d.ts +42 -0
  150. package/packages/index.js +145 -0
  151. package/packages/mixins/table-column.js +133 -0
  152. package/packages/mixins/upload.js +14 -0
  153. package/packages/model/cond.js +65 -0
  154. package/packages/model/editComponentConfig.js +72 -0
  155. package/packages/model/fastTableOption.js +538 -0
  156. package/packages/model/filterComponentConfig.js +185 -0
  157. package/packages/model/opt.js +21 -0
  158. package/packages/model/order.js +16 -0
  159. package/packages/model/pageQuery.js +31 -0
  160. package/packages/model/query.js +93 -0
  161. package/packages/model/rel.js +5 -0
  162. package/packages/style.scss +5 -0
  163. package/packages/util/cache.js +92 -0
  164. package/packages/util/dialog.js +133 -0
  165. package/packages/util/escape.js +34 -0
  166. package/packages/util/http.js +18 -0
  167. package/packages/util/pick.js +92 -0
  168. package/packages/util/util.js +833 -0
@@ -0,0 +1,42 @@
1
+ // 引入你的组件实现(dts插件会为它们生成类型)
2
+ // 注意:这里要根据实际生成后的类型路径来写,或者直接引用源码
3
+ import FastTable from './components/table'
4
+ import FastSelect from './components/select'
5
+ import FastCheckboxGroup from './components/checkbox-group'
6
+ import FastObjectPicker from './components/object-picker'
7
+ import FastTableColumn from './components/table-column'
8
+ import FastTableColumnDatePicker from './components/table-column-date-picker'
9
+ import FastTableColumnFile from './components/table-column-file'
10
+ import FastTableColumnImg from './components/table-column-img'
11
+ import FastTableColumnInput from './components/table-column-input'
12
+ import FastTableColumnNumber from './components/table-column-number'
13
+ import FastTableColumnObject from './components/table-column-object'
14
+ import FastTableColumnSelect from './components/table-column-select'
15
+ import FastTableColumnSwitch from './components/table-column-switch'
16
+ import FastTableColumnTextarea from './components/table-column-textarea'
17
+ import FastTableColumnTimePicker from './components/table-column-time-picker'
18
+ import FastUpload from './components/upload'
19
+ // ... 引入其他所有组件
20
+
21
+ declare module '@vue/runtime-core' {
22
+ export interface GlobalComponents {
23
+ FastTable: typeof FastTable
24
+ FastSelect: typeof FastSelect
25
+ FastCheckboxGroup: typeof FastCheckboxGroup
26
+ FastObjectPicker: typeof FastObjectPicker
27
+ FastTableColumn: typeof FastTableColumn
28
+ FastTableColumnDatePicker: typeof FastTableColumnDatePicker
29
+ FastTableColumnFile: typeof FastTableColumnFile
30
+ FastTableColumnImg: typeof FastTableColumnImg
31
+ FastTableColumnInput: typeof FastTableColumnInput
32
+ FastTableColumnNumber: typeof FastTableColumnNumber
33
+ FastTableColumnObject: typeof FastTableColumnObject
34
+ FastTableColumnSelect: typeof FastTableColumnSelect
35
+ FastTableColumnSwitch: typeof FastTableColumnSwitch
36
+ FastTableColumnTextarea: typeof FastTableColumnTextarea
37
+ FastTableColumnTimePicker: typeof FastTableColumnTimePicker
38
+ FastUpload: typeof FastUpload
39
+ }
40
+ }
41
+
42
+ export {}
package/lib/index.d.ts ADDED
@@ -0,0 +1,56 @@
1
+ import { default as FastCheckboxGroup } from './components/checkbox-group';
2
+ import { default as FastCellContent } from './components/content-dialog/src/fast-cell-content';
3
+ import { default as FastJsonViewer } from './components/json-viewer/src/fast-json-viewer';
4
+ import { default as FastSelect } from './components/select';
5
+ import { default as FastUpload } from './components/upload';
6
+ import { default as FastObjectPicker } from './components/object-picker';
7
+ import { default as FastTable } from './components/table';
8
+ import { default as FastTableColumn } from './components/table-column';
9
+ import { default as FastTableColumnDatePicker } from './components/table-column-date-picker';
10
+ import { default as FastTableColumnFile } from './components/table-column-file';
11
+ import { default as FastTableColumnImg } from './components/table-column-img';
12
+ import { default as FastTableColumnInput } from './components/table-column-input';
13
+ import { default as FastTableColumnNumber } from './components/table-column-number';
14
+ import { default as FastTableColumnObject } from './components/table-column-object';
15
+ import { default as FastTableColumnSelect } from './components/table-column-select';
16
+ import { default as FastTableColumnSwitch } from './components/table-column-switch';
17
+ import { default as FastTableColumnTextarea } from './components/table-column-textarea';
18
+ import { default as FastTableColumnTimePicker } from './components/table-column-time-picker';
19
+ import { default as FastTableOption } from './model/fastTableOption.js';
20
+ import { default as Opt } from './model/opt.js';
21
+ import { default as PageQuery } from './model/pageQuery.js';
22
+ import { default as Query } from './model/query.js';
23
+ import { default as Order } from './model/order.js';
24
+ import { default as Cond } from './model/cond.js';
25
+ import { isEmpty, isString, isNumber, isArray, ifBlank, isFunction, isObject, isBoolean, isNull, isUndefined, defaultIfEmpty, defaultIfBlank, camelCaseTo, caseToCamel, clear, deepClone, merge, coverMerge } from './util/util';
26
+ import { openDialog } from './util/dialog';
27
+ import { pick } from './util/pick';
28
+ export function getAppContext(): any;
29
+ declare namespace _default {
30
+ export { install };
31
+ }
32
+ export default _default;
33
+ export namespace util {
34
+ export { isEmpty };
35
+ export { isString };
36
+ export { isNumber };
37
+ export { isArray };
38
+ export { ifBlank };
39
+ export { isFunction };
40
+ export { isObject };
41
+ export { isBoolean };
42
+ export { isNull };
43
+ export { isUndefined };
44
+ export { defaultIfEmpty };
45
+ export { defaultIfBlank };
46
+ export { camelCaseTo };
47
+ export { caseToCamel };
48
+ export { clear };
49
+ export { deepClone };
50
+ export { merge };
51
+ export { coverMerge };
52
+ export { openDialog };
53
+ export { pick };
54
+ }
55
+ declare function install(app: any, opts?: {}): void;
56
+ export { FastCheckboxGroup, FastCellContent, FastJsonViewer, FastSelect, FastUpload, FastObjectPicker, FastTable, FastTableColumn, FastTableColumnDatePicker, FastTableColumnFile, FastTableColumnImg, FastTableColumnInput, FastTableColumnNumber, FastTableColumnObject, FastTableColumnSelect, FastTableColumnSwitch, FastTableColumnTextarea, FastTableColumnTimePicker, FastTableOption, Opt, PageQuery, Query, Order, Cond };
@@ -0,0 +1,104 @@
1
+ import { default as FastTableHeadCell } from '../components/table/src/table-head-cell';
2
+ import { default as FastCellContent } from '../components/content-dialog/src/fast-cell-content';
3
+ declare namespace _default {
4
+ let inject: string[];
5
+ let emits: string[];
6
+ namespace components {
7
+ export { FastTableHeadCell };
8
+ export { FastCellContent };
9
+ }
10
+ namespace props {
11
+ namespace prop {
12
+ let type: StringConstructor;
13
+ let required: boolean;
14
+ }
15
+ namespace label {
16
+ let type_1: StringConstructor;
17
+ export { type_1 as type };
18
+ let required_1: boolean;
19
+ export { required_1 as required };
20
+ }
21
+ namespace link {
22
+ let type_2: (StringConstructor | BooleanConstructor)[];
23
+ export { type_2 as type };
24
+ function _default(): boolean;
25
+ export { _default as default };
26
+ }
27
+ namespace hidden {
28
+ let type_3: BooleanConstructor;
29
+ export { type_3 as type };
30
+ function _default_1(): boolean;
31
+ export { _default_1 as default };
32
+ }
33
+ namespace filter {
34
+ let type_4: (BooleanConstructor | NumberConstructor)[];
35
+ export { type_4 as type };
36
+ function _default_2(): boolean;
37
+ export { _default_2 as default };
38
+ }
39
+ namespace quickFilter {
40
+ let type_5: (BooleanConstructor | NumberConstructor)[];
41
+ export { type_5 as type };
42
+ function _default_3(): boolean;
43
+ export { _default_3 as default };
44
+ }
45
+ namespace quickFilterBlock {
46
+ let type_6: BooleanConstructor;
47
+ export { type_6 as type };
48
+ function _default_4(): boolean;
49
+ export { _default_4 as default };
50
+ }
51
+ let quickFilterConfig: ObjectConstructor;
52
+ namespace dynamicFilter {
53
+ let type_7: BooleanConstructor;
54
+ export { type_7 as type };
55
+ function _default_5(): boolean;
56
+ export { _default_5 as default };
57
+ }
58
+ namespace unique {
59
+ let type_8: BooleanConstructor;
60
+ export { type_8 as type };
61
+ function _default_6(): boolean;
62
+ export { _default_6 as default };
63
+ }
64
+ namespace firstFilter {
65
+ let type_9: BooleanConstructor;
66
+ export { type_9 as type };
67
+ function _default_7(): boolean;
68
+ export { _default_7 as default };
69
+ }
70
+ namespace showOverflowTooltip {
71
+ let type_10: BooleanConstructor;
72
+ export { type_10 as type };
73
+ function _default_8(): boolean;
74
+ export { _default_8 as default };
75
+ }
76
+ namespace showLength {
77
+ let type_11: NumberConstructor;
78
+ export { type_11 as type };
79
+ function _default_9(): number;
80
+ export { _default_9 as default };
81
+ }
82
+ }
83
+ function data(): {
84
+ columnProp: any;
85
+ };
86
+ namespace methods {
87
+ /**
88
+ * 是否展示编辑模式
89
+ * @param fatRow
90
+ * @param column element原生列配置
91
+ * @param $index 当前行索引
92
+ * @returns {boolean}
93
+ */
94
+ function canEdit(fatRow: any, column: any, $index: any): boolean;
95
+ function showLabel(fatRow: any): any;
96
+ function headCellClick(column: any): void;
97
+ function handleChange(val: any, scope: any): void;
98
+ function handleFocus(event: any, scope: any): void;
99
+ function handleBlur(event: any, scope: any): void;
100
+ function handleInput(val: any, scope: any): void;
101
+ function handleClear(scope: any): void;
102
+ }
103
+ }
104
+ export default _default;
@@ -0,0 +1,15 @@
1
+ declare namespace _default {
2
+ namespace props {
3
+ let onPreview: FunctionConstructor;
4
+ let beforeRemove: FunctionConstructor;
5
+ let onRemove: FunctionConstructor;
6
+ let onSuccess: FunctionConstructor;
7
+ let onError: FunctionConstructor;
8
+ let onProgress: FunctionConstructor;
9
+ let onChange: FunctionConstructor;
10
+ let onExceed: FunctionConstructor;
11
+ let beforeUpload: FunctionConstructor;
12
+ let responseHandler: FunctionConstructor;
13
+ }
14
+ }
15
+ export default _default;
@@ -0,0 +1,25 @@
1
+ export default Cond;
2
+ declare class Cond {
3
+ /**
4
+ * 通过json构建条件
5
+ * @param condJson {object} 条件的json
6
+ * @return {Cond}
7
+ */
8
+ static build(condJson: object): Cond;
9
+ constructor(col: any, opt: any, val: any);
10
+ col: any;
11
+ opt: any;
12
+ val: any;
13
+ /**
14
+ * 设置操作符
15
+ * @param opt {string}
16
+ * @return {Cond}
17
+ */
18
+ setOpt(opt: string): Cond;
19
+ /**
20
+ * 设置值
21
+ * @param val {object}
22
+ * @return {Cond}
23
+ */
24
+ setVal(val: object): Cond;
25
+ }
@@ -0,0 +1,25 @@
1
+ export default EditComponentConfig;
2
+ /**
3
+ * 编辑组件配置
4
+ */
5
+ declare class EditComponentConfig {
6
+ constructor({ component, col, label, props, val, eventMethods, type, unique, tableOption }: {
7
+ component: any;
8
+ col: any;
9
+ label: any;
10
+ props: any;
11
+ val: any;
12
+ eventMethods: any;
13
+ type: any;
14
+ unique: any;
15
+ tableOption: any;
16
+ });
17
+ component: any;
18
+ col: any;
19
+ label: any;
20
+ props: any;
21
+ val: any;
22
+ editable: any;
23
+ type: any;
24
+ eventMethods: any;
25
+ }
@@ -0,0 +1,355 @@
1
+ import { default as Vue } from 'vue';
2
+ export default FastTableOption;
3
+ declare class FastTableOption {
4
+ static $http: any;
5
+ static $router: any;
6
+ constructor({ context, id, title, showTitle, module, baseUrl, pageUrl, listUrl, insertUrl, batchInsertUrl, updateUrl, batchUpdateUrl, deleteUrl, batchDeleteUrl, uploadUrl, exportUrl, existsUrl, enableDblClickEdit, enableMulti, enableIndex, enableColumnFilter, enableFilterCache, lazyLoad, editType, queryable, insertable, updatable, deletable, exportable, idField, createTimeField, sortField, sortDesc, moreButtons, pagination, style, render, conds, condGroups, condExtra, beforeReset, beforeLoad, loadSuccess, loadFail, beforeToInsert, beforeInsert, insertSuccess, insertFail, beforeToUpdate, beforeUpdate, updateSuccess, updateFail, beforeDeleteTip, beforeDelete, deleteSuccess, deleteFail, beforeCancel, beforeExport, exportSuccess, exportFail }: {
7
+ context: any;
8
+ id?: string;
9
+ title?: string;
10
+ showTitle?: boolean;
11
+ module?: string;
12
+ baseUrl?: string;
13
+ pageUrl?: string;
14
+ listUrl?: string;
15
+ insertUrl?: string;
16
+ batchInsertUrl?: string;
17
+ updateUrl?: string;
18
+ batchUpdateUrl?: string;
19
+ deleteUrl?: string;
20
+ batchDeleteUrl?: string;
21
+ uploadUrl?: string;
22
+ exportUrl?: string;
23
+ existsUrl?: string;
24
+ enableDblClickEdit?: boolean;
25
+ enableMulti?: boolean;
26
+ enableIndex?: boolean;
27
+ enableColumnFilter?: boolean;
28
+ enableFilterCache?: boolean;
29
+ lazyLoad?: boolean;
30
+ editType?: string;
31
+ queryable?: boolean;
32
+ insertable?: boolean;
33
+ updatable?: boolean;
34
+ deletable?: boolean;
35
+ exportable?: boolean;
36
+ idField?: string;
37
+ createTimeField?: string;
38
+ sortField?: string;
39
+ sortDesc?: boolean;
40
+ moreButtons?: any[];
41
+ pagination?: {
42
+ layout: string;
43
+ 'page-sizes': number[];
44
+ size: number;
45
+ };
46
+ style?: {};
47
+ render?: () => any[];
48
+ conds?: any[];
49
+ condGroups?: any[];
50
+ condExtra?: {};
51
+ beforeReset?: ({ query }: {
52
+ query: any;
53
+ }) => Promise<void>;
54
+ beforeLoad?: ({ query }: {
55
+ query: any;
56
+ }) => Promise<void>;
57
+ loadSuccess?: ({ query, res }: {
58
+ query: any;
59
+ res: any;
60
+ }) => Promise<any>;
61
+ loadFail?: ({ query, error }: {
62
+ query: any;
63
+ error: any;
64
+ }) => Promise<void>;
65
+ beforeToInsert?: (rows: any) => Promise<void>;
66
+ beforeInsert?: ({ fatRows, rows, editRows }: {
67
+ fatRows: any;
68
+ rows: any;
69
+ editRows: any;
70
+ }) => Promise<any>;
71
+ insertSuccess?: ({ fatRows, rows, editRows, res }: {
72
+ fatRows: any;
73
+ rows: any;
74
+ editRows: any;
75
+ res: any;
76
+ }) => Promise<void>;
77
+ insertFail?: ({ fatRows, rows, editRows, error }: {
78
+ fatRows: any;
79
+ rows: any;
80
+ editRows: any;
81
+ error: any;
82
+ }) => Promise<void>;
83
+ beforeToUpdate?: ({ fatRows, rows }: {
84
+ fatRows: any;
85
+ rows: any;
86
+ }) => Promise<void>;
87
+ beforeUpdate?: ({ fatRows, rows, editRows }: {
88
+ fatRows: any;
89
+ rows: any;
90
+ editRows: any;
91
+ }) => Promise<any>;
92
+ updateSuccess?: ({ fatRows, rows, editRows, res }: {
93
+ fatRows: any;
94
+ rows: any;
95
+ editRows: any;
96
+ res: any;
97
+ }) => Promise<void>;
98
+ updateFail?: ({ fatRows, rows, editRows, error }: {
99
+ fatRows: any;
100
+ rows: any;
101
+ editRows: any;
102
+ error: any;
103
+ }) => Promise<void>;
104
+ beforeDeleteTip?: ({ fatRows, rows }: {
105
+ fatRows: any;
106
+ rows: any;
107
+ }) => Promise<void>;
108
+ beforeDelete?: ({ fatRows, rows }: {
109
+ fatRows: any;
110
+ rows: any;
111
+ }) => Promise<any>;
112
+ deleteSuccess?: ({ fatRows, rows, res }: {
113
+ fatRows: any;
114
+ rows: any;
115
+ res: any;
116
+ }) => Promise<void>;
117
+ deleteFail?: ({ fatRows, rows, error }: {
118
+ fatRows: any;
119
+ rows: any;
120
+ error: any;
121
+ }) => Promise<void>;
122
+ beforeCancel?: ({ fatRows, rows, status }: {
123
+ fatRows: any;
124
+ rows: any;
125
+ status: any;
126
+ }) => Promise<void>;
127
+ beforeExport?: ({ columns, pageQuery }: {
128
+ columns: any;
129
+ pageQuery: any;
130
+ }) => Promise<any>;
131
+ exportSuccess?: ({ columns, pageQuery, data }: {
132
+ columns: any;
133
+ pageQuery: any;
134
+ data: any;
135
+ }) => Promise<void>;
136
+ exportFail?: ({ columns, pageQuery, error }: {
137
+ columns: any;
138
+ pageQuery: any;
139
+ error: any;
140
+ }) => Promise<void>;
141
+ });
142
+ /**
143
+ * 当前组件。一般配置当前组件(this), 这样钩子函数中可以使用this
144
+ * @type {Vue}
145
+ */
146
+ context: typeof Vue;
147
+ ref: any;
148
+ /**
149
+ * 唯一id值。用于浏览器缓存时不同fast-table之间的隔离,不配置则内部默认生成
150
+ * @type {string}
151
+ */
152
+ id: string;
153
+ /**
154
+ * 表格标题。配置后默认会显示在表格上方
155
+ * @type {string}
156
+ */
157
+ title: string;
158
+ /**
159
+ * 是否显示标题。默认true
160
+ * @type {boolean}
161
+ */
162
+ showTitle: boolean;
163
+ /**
164
+ * 表格Rest接口的根path。
165
+ * @type {string}
166
+ */
167
+ baseUrl: string;
168
+ pageUrl: string;
169
+ listUrl: string;
170
+ insertUrl: string;
171
+ batchInsertUrl: string;
172
+ updateUrl: string;
173
+ batchUpdateUrl: string;
174
+ deleteUrl: string;
175
+ batchDeleteUrl: string;
176
+ uploadUrl: string;
177
+ exportUrl: string;
178
+ existsUrl: string;
179
+ enableDblClickEdit: boolean;
180
+ enableMulti: boolean;
181
+ enableIndex: boolean;
182
+ enableColumnFilter: boolean;
183
+ enableFilterCache: boolean;
184
+ lazyLoad: boolean;
185
+ editType: string;
186
+ queryable: boolean;
187
+ insertable: boolean;
188
+ updatable: boolean;
189
+ deletable: boolean;
190
+ exportable: boolean;
191
+ idField: string;
192
+ createTimeField: string;
193
+ parent: {
194
+ option: typeof FastTableOption;
195
+ map: ObjectConstructor;
196
+ };
197
+ sortField: any;
198
+ sortDesc: boolean;
199
+ moreButtons: any[];
200
+ pagination: {
201
+ layout: string;
202
+ 'page-sizes': number[];
203
+ size: number;
204
+ };
205
+ style: {
206
+ flexHeight: boolean;
207
+ bodyRowHeight: string;
208
+ size: string;
209
+ formLabelWidth: string;
210
+ formLayout: any;
211
+ quickFilterSpan: number;
212
+ quickFilterGridGap: string;
213
+ };
214
+ render: () => any[];
215
+ conds: any[];
216
+ condGroups: any[];
217
+ condExtra: {};
218
+ beforeReset: ({ query }: {
219
+ query: any;
220
+ }) => Promise<void>;
221
+ beforeLoad: ({ query }: {
222
+ query: any;
223
+ }) => Promise<void>;
224
+ loadSuccess: ({ query, res }: {
225
+ query: any;
226
+ res: any;
227
+ }) => Promise<any>;
228
+ loadFail: ({ query, error }: {
229
+ query: any;
230
+ error: any;
231
+ }) => Promise<void>;
232
+ beforeInsert: ({ fatRows, rows, editRows }: {
233
+ fatRows: any;
234
+ rows: any;
235
+ editRows: any;
236
+ }) => Promise<any>;
237
+ insertSuccess: ({ fatRows, rows, editRows, res }: {
238
+ fatRows: any;
239
+ rows: any;
240
+ editRows: any;
241
+ res: any;
242
+ }) => Promise<void>;
243
+ insertFail: ({ fatRows, rows, editRows, error }: {
244
+ fatRows: any;
245
+ rows: any;
246
+ editRows: any;
247
+ error: any;
248
+ }) => Promise<void>;
249
+ beforeUpdate: ({ fatRows, rows, editRows }: {
250
+ fatRows: any;
251
+ rows: any;
252
+ editRows: any;
253
+ }) => Promise<any>;
254
+ updateSuccess: ({ fatRows, rows, editRows, res }: {
255
+ fatRows: any;
256
+ rows: any;
257
+ editRows: any;
258
+ res: any;
259
+ }) => Promise<void>;
260
+ updateFail: ({ fatRows, rows, editRows, error }: {
261
+ fatRows: any;
262
+ rows: any;
263
+ editRows: any;
264
+ error: any;
265
+ }) => Promise<void>;
266
+ beforeDelete: ({ fatRows, rows }: {
267
+ fatRows: any;
268
+ rows: any;
269
+ }) => Promise<any>;
270
+ deleteSuccess: ({ fatRows, rows, res }: {
271
+ fatRows: any;
272
+ rows: any;
273
+ res: any;
274
+ }) => Promise<void>;
275
+ deleteFail: ({ fatRows, rows, error }: {
276
+ fatRows: any;
277
+ rows: any;
278
+ error: any;
279
+ }) => Promise<void>;
280
+ beforeToInsert: (rows: any) => Promise<void>;
281
+ beforeToUpdate: ({ fatRows, rows }: {
282
+ fatRows: any;
283
+ rows: any;
284
+ }) => Promise<void>;
285
+ beforeDeleteTip: ({ fatRows, rows }: {
286
+ fatRows: any;
287
+ rows: any;
288
+ }) => Promise<void>;
289
+ beforeCancel: ({ fatRows, rows, status }: {
290
+ fatRows: any;
291
+ rows: any;
292
+ status: any;
293
+ }) => Promise<void>;
294
+ beforeExport: ({ columns, pageQuery }: {
295
+ columns: any;
296
+ pageQuery: any;
297
+ }) => Promise<any>;
298
+ exportSuccess: ({ columns, pageQuery, data }: {
299
+ columns: any;
300
+ pageQuery: any;
301
+ data: any;
302
+ }) => Promise<void>;
303
+ exportFail: ({ columns, pageQuery, error }: {
304
+ columns: any;
305
+ pageQuery: any;
306
+ error: any;
307
+ }) => Promise<void>;
308
+ /**
309
+ * 向内置条件组中增加条件
310
+ * @param cond
311
+ * @param repeatable 是否允许重复的col, 默认false, 即若多次添加相同col的条件, 只会保留最新的
312
+ */
313
+ addCond(cond: any, repeatable?: boolean): void;
314
+ /**
315
+ * 从内置条件组中移除条件
316
+ * @param col
317
+ */
318
+ removeCond(col: any): void;
319
+ /**
320
+ * 新增行, 返回promise
321
+ * @param fatRows
322
+ * @returns {Promise<void>|Promise<unknown>}
323
+ */
324
+ _insertRows(fatRows: any): Promise<void> | Promise<unknown>;
325
+ /**
326
+ * 更新行
327
+ * @param fatRows
328
+ * @return 返回promise, 若成功更新则resolve; 若失败或取消, 则返回reject err或用户自定义的内容
329
+ */
330
+ _updateRows(fatRows: any): Promise<any>;
331
+ /**
332
+ * 列表查询
333
+ * @param query 查询条件 Query类型
334
+ * @param config
335
+ */
336
+ _list(query: any, config: any): any;
337
+ /**
338
+ * 导出
339
+ * @param columnConfigs
340
+ * @param pageQuery
341
+ */
342
+ _exportData(columnConfigs: any, pageQuery: any): void;
343
+ /**
344
+ * 存在性判断
345
+ */
346
+ _exist(conds?: any[]): Promise<any>;
347
+ /**
348
+ * 利用/list接口构造选项列表数据
349
+ * @param query
350
+ * @param valKey
351
+ * @param labelKey
352
+ * @return {Promise<*>}
353
+ */
354
+ _buildSelectOptions(query: any, valKey: any, labelKey: any): Promise<any>;
355
+ }
@@ -0,0 +1,57 @@
1
+ export default FilterComponentConfig;
2
+ /**
3
+ * 筛选组件配置
4
+ */
5
+ declare class FilterComponentConfig {
6
+ /**
7
+ * 构造函数
8
+ * @param component 组件
9
+ * @param col 字段名
10
+ * @param opt 操作符
11
+ * @param val 值
12
+ * @param label 中文名
13
+ * @param props 组件对应的props
14
+ * @param condMapFn 条件获取过滤函数
15
+ */
16
+ constructor({ component, col, opt, val, label, props, condMapFn, type }: {
17
+ component: any;
18
+ col: any;
19
+ opt?: "like";
20
+ val: any;
21
+ label: any;
22
+ props: any;
23
+ condMapFn?: (cond: any) => any[];
24
+ type: any;
25
+ });
26
+ component: any;
27
+ col: any;
28
+ opt: "like";
29
+ val: any;
30
+ label: any;
31
+ props: any;
32
+ defaultVal: any;
33
+ disabled: boolean;
34
+ type: any;
35
+ condMapFn: (cond: any) => any[];
36
+ index: number;
37
+ condMsg: string;
38
+ /**
39
+ * 值为默认值
40
+ */
41
+ isDefaultVal(): boolean;
42
+ /**
43
+ * 此筛选项是否有效
44
+ * @returns {boolean}
45
+ */
46
+ isEffective(): boolean;
47
+ /**
48
+ * 返回值是否变更
49
+ * @return {boolean}
50
+ */
51
+ reset(): boolean;
52
+ getConds(): any[];
53
+ /**
54
+ * 更新条件的文本描述, 例如用于回显在dynamic-filter-list上
55
+ */
56
+ updateCondMsg(): Promise<any>;
57
+ }