vxe-table 3.7.0-beta.8 → 3.7.0-beta.9

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 (71) hide show
  1. package/lib/edit/src/mixin.js +7 -6
  2. package/lib/edit/src/mixin.min.js +1 -1
  3. package/lib/export/src/mixin.js +1 -1
  4. package/lib/export/src/mixin.min.js +1 -1
  5. package/lib/icon/style/style.css +1 -1
  6. package/lib/icon/style/style.min.css +1 -1
  7. package/lib/index.css +1 -1
  8. package/lib/index.umd.js +54 -57
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/style.css +1 -1
  11. package/lib/style.min.css +1 -1
  12. package/lib/table/src/body.js +2 -2
  13. package/lib/table/src/body.min.js +1 -1
  14. package/lib/table/src/cell.js +5 -3
  15. package/lib/table/src/cell.min.js +1 -1
  16. package/lib/table/src/columnInfo.js +3 -3
  17. package/lib/table/src/columnInfo.min.js +1 -1
  18. package/lib/table/src/methods.js +35 -29
  19. package/lib/table/src/methods.min.js +1 -1
  20. package/lib/table/src/table.js +11 -5
  21. package/lib/table/src/table.min.js +1 -1
  22. package/lib/table/src/util.js +1 -1
  23. package/lib/table/src/util.min.js +1 -1
  24. package/lib/table/style/style.css +5 -0
  25. package/lib/table/style/style.min.css +1 -1
  26. package/lib/toolbar/src/toolbar.js +5 -1
  27. package/lib/toolbar/src/toolbar.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/style/style.css +0 -6
  31. package/lib/tooltip/style/style.min.css +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/lib/v-x-e-table/src/commands.js +7 -5
  35. package/lib/v-x-e-table/src/commands.min.js +1 -1
  36. package/lib/v-x-e-table/src/conf.js +3 -3
  37. package/lib/v-x-e-table/src/conf.min.js +1 -1
  38. package/lib/v-x-e-table/src/formats.js +7 -5
  39. package/lib/v-x-e-table/src/formats.min.js +1 -1
  40. package/lib/v-x-e-table/src/menus.js +7 -5
  41. package/lib/v-x-e-table/src/menus.min.js +1 -1
  42. package/lib/validator/src/mixin.js +10 -0
  43. package/lib/validator/src/mixin.min.js +1 -1
  44. package/package.json +1 -1
  45. package/packages/edit/src/mixin.js +6 -6
  46. package/packages/export/src/mixin.js +1 -1
  47. package/packages/table/src/body.js +2 -2
  48. package/packages/table/src/cell.js +3 -3
  49. package/packages/table/src/columnInfo.js +3 -3
  50. package/packages/table/src/methods.js +32 -32
  51. package/packages/table/src/table.js +11 -5
  52. package/packages/table/src/util.js +1 -1
  53. package/packages/toolbar/src/toolbar.js +4 -1
  54. package/packages/v-x-e-table/src/commands.js +6 -4
  55. package/packages/v-x-e-table/src/conf.js +3 -3
  56. package/packages/v-x-e-table/src/formats.js +6 -4
  57. package/packages/v-x-e-table/src/menus.js +6 -4
  58. package/packages/validator/src/mixin.js +10 -0
  59. package/styles/table.scss +7 -0
  60. package/styles/tooltip.scss +0 -8
  61. package/types/all.d.ts +2 -2
  62. package/types/table.d.ts +20 -4
  63. package/types/v-x-e-table/formats.d.ts +1 -1
  64. package/types/v-x-e-table/index.d.ts +3 -3
  65. package/types/v-x-e-table/setup.d.ts +10 -33
  66. /package/lib/icon/style/{iconfont.1690504677290.ttf → iconfont.1690761747506.ttf} +0 -0
  67. /package/lib/icon/style/{iconfont.1690504677290.woff → iconfont.1690761747506.woff} +0 -0
  68. /package/lib/icon/style/{iconfont.1690504677290.woff2 → iconfont.1690761747506.woff2} +0 -0
  69. /package/lib/{iconfont.1690504677290.ttf → iconfont.1690761747506.ttf} +0 -0
  70. /package/lib/{iconfont.1690504677290.woff → iconfont.1690761747506.woff} +0 -0
  71. /package/lib/{iconfont.1690504677290.woff2 → iconfont.1690761747506.woff2} +0 -0
package/styles/table.scss CHANGED
@@ -1300,6 +1300,13 @@
1300
1300
  }
1301
1301
  }
1302
1302
 
1303
+ .vxe-table--tooltip-wrapper {
1304
+ &.vxe-table--valid-error {
1305
+ background-color: #f56c6c;
1306
+ color: #fff;
1307
+ }
1308
+ }
1309
+
1303
1310
  /*footer*/
1304
1311
  .vxe-table--footer-wrapper {
1305
1312
  color: $vxe-table-footer-font-color;
@@ -125,11 +125,3 @@
125
125
  }
126
126
  }
127
127
  }
128
-
129
- /*valid error*/
130
- .vxe-table--tooltip-wrapper {
131
- &.vxe-table--valid-error {
132
- background-color: #f56c6c;
133
- color: #fff;
134
- }
135
- }
package/types/all.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import Vue from 'vue'
2
2
 
3
3
  import { ModalController } from './modal'
4
- import { VXETableSetupOptions, VXETableCore, VxeGlobalTranslate, VxeGlobalI18n } from './v-x-e-table'
4
+ import { VXETableConfigOptions, VXETableCore, VxeGlobalTranslate, VxeGlobalI18n } from './v-x-e-table'
5
5
 
6
- export function install(app: typeof Vue, options?: VXETableSetupOptions): void;
6
+ export function install(app: typeof Vue, options?: VXETableConfigOptions): void;
7
7
 
8
8
  export interface VXETableClipboard {
9
9
  text: string;
package/types/table.d.ts CHANGED
@@ -1390,26 +1390,41 @@ export type ExpandConfig = TableExpandConfig
1390
1390
  * 树形结构配置项
1391
1391
  */
1392
1392
  export interface TableTreeConfig {
1393
- children?: string;
1393
+ childrenField?: string;
1394
1394
  indent?: number;
1395
- line?: boolean;
1395
+ showLine?: boolean;
1396
1396
  expandAll?: boolean;
1397
1397
  expandRowKeys?: string[] | number[];
1398
1398
  accordion?: boolean;
1399
1399
  trigger?: 'default' | 'cell' | 'row' | '';
1400
1400
  lazy?: boolean;
1401
- hasChild?: string;
1401
+ hasChildField?: string;
1402
1402
  loadMethod?(params: { row: RowInfo }): Promise<any[]>;
1403
1403
  toggleMethod?(params: { expanded: boolean, row: RowInfo, column: ColumnInfo, columnIndex: number, $columnIndex: number }): boolean;
1404
1404
  showIcon?: boolean;
1405
1405
  iconOpen?: string;
1406
1406
  iconClose?: string;
1407
1407
  iconLoaded?: string;
1408
+ /**
1409
+ * 已废弃,请使用 showLine
1410
+ * @deprecated
1411
+ */
1412
+ line?: boolean;
1413
+ /**
1414
+ * 已废弃,请使用 hasChildField
1415
+ * @deprecated
1416
+ */
1417
+ hasChild: string;
1418
+ /**
1419
+ * 已废弃,请使用 childrenField
1420
+ * @deprecated
1421
+ */
1422
+ children?: string
1408
1423
  }
1409
1424
  export type TreeConfig = TableTreeConfig
1410
1425
 
1411
1426
  export interface TreeOpts {
1412
- children: string;
1427
+ childrenField: string;
1413
1428
  indent: number;
1414
1429
  line?: boolean;
1415
1430
  expandAll?: boolean;
@@ -1418,6 +1433,7 @@ export interface TreeOpts {
1418
1433
  trigger?: 'default' | 'cell' | 'row' | '';
1419
1434
  lazy?: boolean;
1420
1435
  hasChild: string;
1436
+ hasChildField: string;
1421
1437
  loadMethod?(params: { row: RowInfo }): Promise<any[]>;
1422
1438
  toggleMethod?(params: { expanded: boolean, row: RowInfo, column: ColumnInfo, columnIndex: number, $columnIndex: number }): boolean;
1423
1439
  showIcon: boolean;
@@ -4,7 +4,7 @@ import { ColumnInfo } from '../column'
4
4
 
5
5
  export namespace VxeGlobalFormatsHandles {
6
6
  export interface FormatsOptions {
7
- formatMethod?: (params: FormatMethodParams, ...args: any[]) => string | number
7
+ cellFormatMethod?: (params: FormatMethodParams, ...args: any[]) => string | number
8
8
  }
9
9
  export interface FormatMethodParams {
10
10
  cellValue: any
@@ -9,7 +9,7 @@ import { VxeGlobalCommands } from './commands'
9
9
  import { VxeGlobalFormats } from './formats'
10
10
  import { VxeGlobalMenus } from './menus'
11
11
  import { VxeGlobalValidators } from './validators'
12
- import { VxeGlobalSetup } from './setup'
12
+ import { VxeGlobalConfigMethod } from './setup'
13
13
 
14
14
  /* eslint-disable no-use-before-define */
15
15
 
@@ -17,7 +17,7 @@ export type VxeGlobalI18n = (key: string, args?: any) => number | string;
17
17
  export type VxeGlobalTranslate = (key: string, args?: any) => string;
18
18
  export type VxeGlobalUse = (plugin: VXETablePluginObject, ...options: any[]) => VXETableCore;
19
19
 
20
- export const setup: VxeGlobalSetup
20
+ export const setup: VxeGlobalConfigMethod
21
21
  export const interceptor: VxeGlobalInterceptor
22
22
  export const renderer: VxeGlobalRenderer
23
23
  export const commands: VxeGlobalCommands
@@ -53,7 +53,7 @@ export interface VXETableCore {
53
53
  /**
54
54
  * 设置全局参数/获取所有参数
55
55
  */
56
- setup: VxeGlobalSetup;
56
+ setup: VxeGlobalConfigMethod;
57
57
  /**
58
58
  * Table interceptor
59
59
  */
@@ -5,7 +5,7 @@ interface DefaultOptions {
5
5
  [key: string]: any;
6
6
  }
7
7
 
8
- export interface VXETableSetupOptions {
8
+ export interface VXETableConfigOptions {
9
9
  size?: SizeType;
10
10
  zIndex?: number;
11
11
  version?: number;
@@ -39,36 +39,13 @@ export interface VXETableSetupOptions {
39
39
  [key: string]: any;
40
40
  }
41
41
 
42
- export interface VXETableGlobalConfig extends VXETableSetupOptions {
43
- size: SizeType;
44
- zIndex: number;
45
- version: number;
46
- emptyCell: string;
47
- icon: {
48
- [key: string]: string;
49
- };
50
- table: any;
51
- grid: any;
52
- export: {
53
- types: {
54
- [key: string]: 0 | 1 | 2;
55
- }
56
- [key: string]: any;
57
- };
58
- tooltip: DefaultOptions;
59
- pager: any;
60
- form: DefaultOptions;
61
- input: DefaultOptions;
62
- textarea: DefaultOptions;
63
- select: DefaultOptions;
64
- toolbar: any;
65
- button: DefaultOptions;
66
- radio: DefaultOptions;
67
- checkbox: DefaultOptions;
68
- switch: DefaultOptions;
69
- modal: DefaultOptions;
70
- list: DefaultOptions;
71
- i18n(key: string, args?: any): string;
72
- }
42
+ export type VxeGlobalConfigMethod = (options?: VXETableConfigOptions) => Required<VXETableConfigOptions>
73
43
 
74
- export type VxeGlobalSetup = (options?: VXETableSetupOptions) => VXETableGlobalConfig;
44
+ /**
45
+ * @deprecated
46
+ */
47
+ export type VXETableSetupOptions = VXETableConfigOptions
48
+ /**
49
+ * @deprecated
50
+ */
51
+ export type VxeGlobalSetup = VxeGlobalConfigMethod;