vxe-table 3.7.0-beta.4 → 3.7.0-beta.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.
Files changed (75) hide show
  1. package/helper/vetur/attributes.json +23 -3
  2. package/helper/vetur/tags.json +5 -0
  3. package/lib/button/src/button.js +9 -3
  4. package/lib/button/src/button.min.js +1 -1
  5. package/lib/edit/src/mixin.js +3 -3
  6. package/lib/edit/src/mixin.min.js +1 -1
  7. package/lib/form/src/form.js +3 -1
  8. package/lib/form/src/form.min.js +1 -1
  9. package/lib/icon/style/style.css +1 -1
  10. package/lib/icon/style/style.min.css +1 -1
  11. package/lib/index.css +1 -1
  12. package/lib/index.umd.js +77 -47
  13. package/lib/index.umd.min.js +1 -1
  14. package/lib/input/src/input.js +5 -0
  15. package/lib/input/src/input.min.js +1 -1
  16. package/lib/pulldown/src/pulldown.js +11 -2
  17. package/lib/pulldown/src/pulldown.min.js +1 -1
  18. package/lib/select/src/select.js +5 -1
  19. package/lib/select/src/select.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/table/src/cell.js +2 -2
  23. package/lib/table/src/cell.min.js +1 -1
  24. package/lib/table/src/methods.js +31 -31
  25. package/lib/table/src/methods.min.js +1 -1
  26. package/lib/table/src/table.js +1 -1
  27. package/lib/table/src/table.min.js +1 -1
  28. package/lib/tools/log.js +1 -1
  29. package/lib/tools/log.min.js +1 -1
  30. package/lib/tooltip/src/tooltip.js +5 -1
  31. package/lib/tooltip/src/tooltip.min.js +1 -1
  32. package/lib/v-x-e-table/index.js +1 -1
  33. package/lib/v-x-e-table/index.min.js +1 -1
  34. package/package.json +1 -1
  35. package/packages/button/src/button.js +5 -4
  36. package/packages/edit/src/mixin.js +3 -3
  37. package/packages/form/src/form.js +3 -1
  38. package/packages/input/src/input.js +5 -0
  39. package/packages/pulldown/src/pulldown.js +6 -3
  40. package/packages/select/src/select.js +3 -2
  41. package/packages/table/src/cell.js +2 -2
  42. package/packages/table/src/methods.js +31 -31
  43. package/packages/table/src/table.js +1 -1
  44. package/packages/tooltip/src/tooltip.js +3 -2
  45. package/types/colgroup.d.ts +3 -1
  46. package/types/column.d.ts +3 -0
  47. package/types/edit.d.ts +4 -2
  48. package/types/export.d.ts +2 -0
  49. package/types/filter.d.ts +3 -1
  50. package/types/footer.d.ts +3 -1
  51. package/types/form-item.d.ts +2 -0
  52. package/types/form.d.ts +2 -0
  53. package/types/grid.d.ts +3 -0
  54. package/types/header.d.ts +3 -1
  55. package/types/index.d.ts +1 -1
  56. package/types/input.d.ts +2 -0
  57. package/types/list.d.ts +1 -1
  58. package/types/menu.d.ts +2 -0
  59. package/types/modal.d.ts +7 -3
  60. package/types/pulldown.d.ts +2 -3
  61. package/types/table.d.ts +29 -26
  62. package/types/textarea.d.ts +1 -0
  63. package/types/toolbar.d.ts +2 -0
  64. package/types/tooltip.d.ts +1 -1
  65. package/types/v-x-e-table/commands.d.ts +2 -0
  66. package/types/v-x-e-table/formats.d.ts +2 -0
  67. package/types/v-x-e-table/index.d.ts +25 -24
  68. package/types/v-x-e-table/interceptor.d.ts +1 -1
  69. package/types/v-x-e-table/renderer.d.ts +5 -3
  70. /package/lib/icon/style/{iconfont.1689208376629.ttf → iconfont.1689639571797.ttf} +0 -0
  71. /package/lib/icon/style/{iconfont.1689208376629.woff → iconfont.1689639571797.woff} +0 -0
  72. /package/lib/icon/style/{iconfont.1689208376629.woff2 → iconfont.1689639571797.woff2} +0 -0
  73. /package/lib/{iconfont.1689208376629.ttf → iconfont.1689639571797.ttf} +0 -0
  74. /package/lib/{iconfont.1689208376629.woff → iconfont.1689639571797.woff} +0 -0
  75. /package/lib/{iconfont.1689208376629.woff2 → iconfont.1689639571797.woff2} +0 -0
package/types/form.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { VXETableComponent } from './component'
2
2
  import { FormItemOptions } from './form-item'
3
3
 
4
+ /* eslint-disable no-use-before-define */
5
+
4
6
  /**
5
7
  * 表单
6
8
  */
package/types/grid.d.ts CHANGED
@@ -7,6 +7,8 @@ import { ToolbarOptions } from './toolbar'
7
7
  import { PagerOptions } from './pager'
8
8
  import { RowInfo } from './component'
9
9
 
10
+ /* eslint-disable no-use-before-define */
11
+
10
12
  /**
11
13
  * 高级表格
12
14
  */
@@ -74,6 +76,7 @@ export declare class Grid extends Table {
74
76
  pager: any;
75
77
  pendingRecords: any[];
76
78
  };
79
+
77
80
  [key: string]: any;
78
81
  }
79
82
 
package/types/header.d.ts CHANGED
@@ -2,12 +2,14 @@ import { VXETableComponent } from './component'
2
2
  import { ColumnInfo } from './column'
3
3
  import { TableRenderParams } from './v-x-e-table'
4
4
 
5
+ /* eslint-disable no-use-before-define */
6
+
5
7
  /**
6
8
  * 表头
7
9
  */
8
10
  export declare class Header extends VXETableComponent {}
9
11
 
10
- export interface ColumnHeaderSlotParams extends ColumnHeaderRenderParams {}
12
+ export type ColumnHeaderSlotParams = ColumnHeaderRenderParams
11
13
 
12
14
  /**
13
15
  * 表头渲染参数
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as VXETableExport from './all'
2
2
 
3
3
  /**
4
- * 一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...
4
+ * 一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...
5
5
  */
6
6
  declare const VXETable: typeof VXETableExport
7
7
 
package/types/input.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { VXETableComponent } from './component'
2
2
 
3
+ /* eslint-disable no-use-before-define */
4
+
3
5
  /**
4
6
  * 输入框
5
7
  */
package/types/list.d.ts CHANGED
@@ -62,7 +62,7 @@ export declare class List extends VXETableComponent {
62
62
  * 刷新滚动操作,手动同步滚动相关位置
63
63
  */
64
64
  refreshScroll(): Promise<any>;
65
-
65
+
66
66
  /**
67
67
  * 手动清除滚动相关信息,还原到初始状态
68
68
  */
package/types/menu.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { VXETableComponent } from './component'
2
2
  import { ColumnCellRenderParams } from './v-x-e-table'
3
3
 
4
+ /* eslint-disable no-use-before-define */
5
+
4
6
  /**
5
7
  * 快捷菜单
6
8
  */
package/types/modal.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { CreateElement, VNode } from 'vue'
2
2
  import { VXETableComponent } from './component'
3
3
 
4
+ /* eslint-disable no-use-before-define */
5
+
4
6
  /**
5
7
  * 弹窗
6
8
  */
@@ -40,6 +42,7 @@ export declare class Modal extends VXETableComponent {
40
42
  top?: number;
41
43
  left?: number;
42
44
  };
45
+
43
46
  /**
44
47
  * 窗口的标题
45
48
  */
@@ -157,6 +160,7 @@ export declare class Modal extends VXETableComponent {
157
160
  top?: number;
158
161
  left?: number;
159
162
  } | null;
163
+
160
164
  /**
161
165
  * 设置窗口位置
162
166
  */
@@ -257,9 +261,9 @@ export interface ModalDefaultSlotParams {
257
261
  $modal: Modal;
258
262
  }
259
263
 
260
- export interface ModalHeaderSlotParams extends ModalDefaultSlotParams {}
261
- export interface ModalTitleSlotParams extends ModalDefaultSlotParams {}
262
- export interface ModalFooterSlotParams extends ModalDefaultSlotParams {}
264
+ export type ModalHeaderSlotParams = ModalDefaultSlotParams
265
+ export type ModalTitleSlotParams = ModalDefaultSlotParams
266
+ export type ModalFooterSlotParams = ModalDefaultSlotParams
263
267
 
264
268
  export interface ModalEventParams {
265
269
  $modal: Modal;
@@ -30,15 +30,14 @@ export declare class Pulldown extends VXETableComponent {
30
30
  * 切换下拉面板
31
31
  */
32
32
  togglePanel(): Promise<any>;
33
-
33
+
34
34
  /**
35
35
  * 显示下拉面板
36
36
  */
37
37
  showPanel(): Promise<any>;
38
-
38
+
39
39
  /**
40
40
  * 隐藏下拉面板
41
41
  */
42
42
  hidePanel(): Promise<any>;
43
-
44
43
  }
package/types/table.d.ts CHANGED
@@ -7,6 +7,8 @@ import { ColumnEditRule, ColumnEditValidErrMapParams } from './validator'
7
7
  import { ColumnFooterRenderParams } from './footer'
8
8
  import { MenuOptions, MenuFirstOption } from './menu'
9
9
 
10
+ /* eslint-disable no-use-before-define */
11
+
10
12
  /**
11
13
  * 表格
12
14
  */
@@ -95,51 +97,51 @@ export declare class Table extends VXETableComponent {
95
97
  /**
96
98
  * 给行附加 className
97
99
  */
98
- rowClassName?: string | Function;
100
+ rowClassName?: string | ((params: any) => any);
99
101
  /**
100
102
  * 给单元格附加 className
101
103
  */
102
- cellClassName?: string | Function;
104
+ cellClassName?: string | ((params: any) => any);
103
105
  /**
104
106
  * 给表头的行附加 className
105
107
  */
106
- headerRowClassName?: string | Function;
108
+ headerRowClassName?: string | ((params: any) => any);
107
109
  /**
108
110
  * 给表头的单元格附加 className
109
111
  */
110
- headerCellClassName?: string | Function;
112
+ headerCellClassName?: string | ((params: any) => any);
111
113
  /**
112
114
  * 给表尾的行附加 className
113
115
  */
114
- footerRowClassName?: string | Function;
116
+ footerRowClassName?: string | ((params: any) => any);
115
117
  /**
116
118
  * 给表尾的单元格附加 className
117
119
  */
118
- footerCellClassName?: string | Function;
120
+ footerCellClassName?: string | ((params: any) => any);
119
121
  /**
120
122
  * 给单元格附加样式
121
123
  */
122
- cellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
124
+ cellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
123
125
  /**
124
126
  * 给表头单元格附加样式
125
127
  */
126
- headerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
128
+ headerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
127
129
  /**
128
130
  * 给表尾单元格附加样式
129
131
  */
130
- footerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
132
+ footerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
131
133
  /**
132
134
  * 给行附加样式
133
135
  */
134
- rowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
136
+ rowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
135
137
  /**
136
138
  * 给表头行附加样式
137
139
  */
138
- headerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
140
+ headerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
139
141
  /**
140
142
  * 给表尾行附加样式
141
143
  */
142
- footerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
144
+ footerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
143
145
  /**
144
146
  * 临时合并单元格
145
147
  */
@@ -496,6 +498,7 @@ export declare class Table extends VXETableComponent {
496
498
  fixed?: boolean
497
499
  order?: boolean
498
500
  }): Promise<any>;
501
+
499
502
  /**
500
503
  * 刷新列配置
501
504
  * 对于动态修改属性、显示/隐藏列等场景下可能会用到
@@ -1161,18 +1164,18 @@ export interface TableOptions {
1161
1164
  highlightCell?: boolean;
1162
1165
  showFooter?: boolean;
1163
1166
  footerMethod?: typeof TableFooterMethod;
1164
- rowClassName?: string | Function;
1165
- cellClassName?: string | Function;
1166
- headerRowClassName?: string | Function;
1167
- headerCellClassName?: string | Function;
1168
- footerRowClassName?: string | Function;
1169
- footerCellClassName?: string | Function;
1170
- cellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
1171
- headerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
1172
- footerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
1173
- rowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
1174
- headerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
1175
- footerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | Function;
1167
+ rowClassName?: string | ((params: any) => any);
1168
+ cellClassName?: string | ((params: any) => any);
1169
+ headerRowClassName?: string | ((params: any) => any);
1170
+ headerCellClassName?: string | ((params: any) => any);
1171
+ footerRowClassName?: string | ((params: any) => any);
1172
+ footerCellClassName?: string | ((params: any) => any);
1173
+ cellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
1174
+ headerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
1175
+ footerCellStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
1176
+ rowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
1177
+ headerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
1178
+ footerRowStyle?: { [key: string]: any } | Array<string | number | boolean | { [key: string]: any }> | ((params: any) => any);
1176
1179
  mergeCells?: TableMergeConfig[];
1177
1180
  mergeFooterItems?: TableMergeConfig[];
1178
1181
  spanMethod?: typeof TableSpanMethod;
@@ -1277,13 +1280,13 @@ export interface TableSeqConfig {
1277
1280
  }
1278
1281
  export type SeqConfig = TableSeqConfig
1279
1282
 
1283
+ export type TableSortOrder = 'asc' | 'desc' | '' | null;
1284
+
1280
1285
  export interface TableSortConfs {
1281
1286
  field: string;
1282
1287
  order?: TableSortOrder;
1283
1288
  }
1284
1289
 
1285
- export type TableSortOrder = 'asc' | 'desc' | '' | null;
1286
-
1287
1290
  /**
1288
1291
  * 排序配置项
1289
1292
  */
@@ -43,6 +43,7 @@ export declare class Textarea extends VXETableComponent {
43
43
  minRows?: number;
44
44
  maxRows?: number;
45
45
  };
46
+
46
47
  /**
47
48
  * 原生 form 属性
48
49
  */
@@ -3,6 +3,8 @@ import { VXETableComponent } from './component'
3
3
  import { ColumnInfo } from './column'
4
4
  import { GridRenderParams, RenderOptions } from './v-x-e-table'
5
5
 
6
+ /* eslint-disable no-use-before-define */
7
+
6
8
  /**
7
9
  * 工具栏
8
10
  */
@@ -19,7 +19,7 @@ export declare class Tooltip extends VXETableComponent {
19
19
  /**
20
20
  * 显示内容
21
21
  */
22
- content?: string | Function;
22
+ content?: string | ((params: any) => any);
23
23
  /**
24
24
  * 自定义堆叠顺序
25
25
  */
@@ -1,6 +1,8 @@
1
1
  import { ToolbarButtonConfig } from '../toolbar'
2
2
  import { GridRenderParams } from './renderer'
3
3
 
4
+ /* eslint-disable no-use-before-define */
5
+
4
6
  declare function commandsFunc(params: CommandsParams, ...args: any[]): any;
5
7
 
6
8
  /**
@@ -1,5 +1,7 @@
1
1
  import { ColumnInfo } from '../column'
2
2
 
3
+ /* eslint-disable no-use-before-define */
4
+
3
5
  declare function formatsFunc(params: FormatsParams, ...args: any[]): any;
4
6
 
5
7
  /**
@@ -10,23 +10,25 @@ import { VxeGlobalFormats } from './formats'
10
10
  import { VxeGlobalMenus } from './menus'
11
11
  import { VxeGlobalSetup } from './setup'
12
12
 
13
+ /* eslint-disable no-use-before-define */
14
+
13
15
  export type VxeGlobalI18n = (key: string, args?: any) => number | string;
14
16
  export type VxeGlobalTranslate = (key: string, args?: any) => string;
15
17
  export type VxeGlobalUse = (plugin: VXETablePluginObject, ...options: any[]) => VXETableCore;
16
18
 
17
- export const setup: VxeGlobalSetup;
18
- export const interceptor: VxeGlobalInterceptor;
19
- export const renderer: VxeGlobalRenderer;
20
- export const commands: VxeGlobalCommands;
21
- export const formats: VxeGlobalFormats;
22
- export const menus: VxeGlobalMenus;
23
- export const modal: ModalController;
24
- export const saveFile: SaveFileFunction;
25
- export const readFile: ReadFileFunction;
26
- export const print: PrintFunction;
27
- export const t: VxeGlobalI18n;
28
- export const _t: VxeGlobalTranslate;
29
- export const use: VxeGlobalUse;
19
+ export const setup: VxeGlobalSetup
20
+ export const interceptor: VxeGlobalInterceptor
21
+ export const renderer: VxeGlobalRenderer
22
+ export const commands: VxeGlobalCommands
23
+ export const formats: VxeGlobalFormats
24
+ export const menus: VxeGlobalMenus
25
+ export const modal: ModalController
26
+ export const saveFile: SaveFileFunction
27
+ export const readFile: ReadFileFunction
28
+ export const print: PrintFunction
29
+ export const t: VxeGlobalI18n
30
+ export const _t: VxeGlobalTranslate
31
+ export const use: VxeGlobalUse
30
32
 
31
33
  export interface VXETablePluginObject {
32
34
  install(vxetable: VXETableCore, ...options: any[]): void;
@@ -101,16 +103,15 @@ export interface VXETableCore {
101
103
  }
102
104
 
103
105
  /**
104
- * 一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟滚动、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、虚拟列表、弹窗、自定义模板、渲染器、贼灵活的配置项等...
106
+ * 一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟滚动、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、虚拟列表、弹窗、自定义模板、渲染器、贼灵活的配置项等...
105
107
  */
106
- export const VXETable: VXETableCore
108
+ export const VXETable: VXETableCore
109
+
110
+ export * from './renderer'
111
+ export * from './interceptor'
112
+ export * from './commands'
113
+ export * from './formats'
114
+ export * from './menus'
115
+ export * from './setup'
107
116
 
108
- export * from './renderer'
109
- export * from './interceptor'
110
- export * from './commands'
111
- export * from './formats'
112
- export * from './menus'
113
- export * from './setup'
114
-
115
- export default VXETable
116
-
117
+ export default VXETable
@@ -19,7 +19,7 @@ export interface InterceptorParams extends GridRenderParams {
19
19
  $event: any;
20
20
  }
21
21
 
22
- export interface InterceptorKeydownParams extends InterceptorParams { }
22
+ export type InterceptorKeydownParams = InterceptorParams
23
23
 
24
24
  export interface InterceptorExportParams extends InterceptorParams {
25
25
  options: TableExportConfig;
@@ -10,6 +10,8 @@ import { ColumnFilterRenderOptions, ColumnFilterRenderParams, ColumnFilterMethod
10
10
  import { ToolbarButtonRenderOptions, ToolbarButtonRenderParams, ToolbarToolRenderOptions, ToolbarToolRenderParams } from '../toolbar'
11
11
  import { FormItemRenderOptions, FormItemRenderParams, FormItemVisibleParams, FormItemResetParams } from '../form-item'
12
12
 
13
+ /* eslint-disable no-use-before-define */
14
+
13
15
  /**
14
16
  * 渲染器
15
17
  */
@@ -43,7 +45,7 @@ export interface RendererMapOptions {
43
45
 
44
46
  // 单元格渲染
45
47
  cellClassName?: string | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => string | VNodeClassName)
46
- cellStyle?: VNodeStyle | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => VNodeStyle)
48
+ cellStyle?: VNodeStyle | ((params: ColumnCellRenderParams | ColumnEditRenderParams) => VNodeStyle)
47
49
  renderHeader?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
48
50
  renderDefault?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnCellRenderParams | ColumnEditRenderParams): SlotVNodeType | SlotVNodeType[];
49
51
  renderFooter?(h: CreateElement, renderOpts: ColumnCellRenderOptions | ColumnEditRenderOptions, params: ColumnFooterRenderParams): SlotVNodeType | SlotVNodeType[];
@@ -101,11 +103,11 @@ export class RenderOptions {
101
103
  /**
102
104
  * 目标组件渲染的事件
103
105
  */
104
- events?: { [key: string]: Function };
106
+ events?: { [key: string]: ((...angs: any[])=>any) };
105
107
  /**
106
108
  * 目标组件渲染的原生事件
107
109
  */
108
- nativeEvents?: { [key: string]: Function };
110
+ nativeEvents?: { [key: string]: ((...angs: any[])=>any) };
109
111
  [key: string]: any;
110
112
  }
111
113