vxe-table 3.20.6 → 3.20.8

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 (144) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +106 -106
  3. package/es/index.esm.js +2 -1
  4. package/es/style.css +1 -1
  5. package/es/table/src/methods.js +75 -78
  6. package/es/table/src/table.js +14 -2
  7. package/es/table/src/util.js +6 -0
  8. package/es/table/style.css +18 -48
  9. package/es/ui/index.js +1 -1
  10. package/es/ui/src/dom.js +19 -20
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +18 -48
  13. package/lib/index.common.js +2 -1
  14. package/lib/index.umd.js +1915 -3227
  15. package/lib/index.umd.min.js +1 -1
  16. package/lib/style.css +1 -1
  17. package/lib/table/src/methods.js +12 -10
  18. package/lib/table/src/methods.min.js +1 -1
  19. package/lib/table/src/table.js +13 -1
  20. package/lib/table/src/table.min.js +1 -1
  21. package/lib/table/src/util.js +6 -0
  22. package/lib/table/src/util.min.js +1 -1
  23. package/lib/table/style/style.css +18 -48
  24. package/lib/ui/index.js +1 -1
  25. package/lib/ui/index.min.js +1 -1
  26. package/lib/ui/src/dom.js +21 -20
  27. package/lib/ui/src/dom.min.js +1 -1
  28. package/lib/ui/src/log.js +1 -1
  29. package/lib/ui/src/log.min.js +1 -1
  30. package/lib/v-x-e-table/index.js +2 -1
  31. package/lib/v-x-e-table/index.min.js +1 -1
  32. package/lib/vxe-colgroup/index.js +2 -1
  33. package/lib/vxe-colgroup/index.min.js +1 -1
  34. package/lib/vxe-column/index.js +2 -1
  35. package/lib/vxe-column/index.min.js +1 -1
  36. package/lib/vxe-grid/index.js +2 -1
  37. package/lib/vxe-grid/index.min.js +1 -1
  38. package/lib/vxe-table/index.js +2 -1
  39. package/lib/vxe-table/index.min.js +1 -1
  40. package/lib/vxe-table/style/style.css +18 -48
  41. package/lib/vxe-toolbar/index.js +2 -1
  42. package/lib/vxe-toolbar/index.min.js +1 -1
  43. package/lib/vxe-ui/index.js +2 -1
  44. package/lib/vxe-ui/index.min.js +1 -1
  45. package/lib/vxe-v-x-e-table/index.js +2 -1
  46. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  47. package/package.json +93 -93
  48. package/packages/colgroup/index.ts +22 -22
  49. package/packages/column/index.ts +22 -22
  50. package/packages/components.ts +42 -42
  51. package/packages/grid/index.ts +22 -22
  52. package/packages/grid/src/grid.ts +1935 -1935
  53. package/packages/index.ts +4 -4
  54. package/packages/locale/lang/ar-EG.ts +832 -832
  55. package/packages/locale/lang/de-DE.ts +832 -832
  56. package/packages/locale/lang/en-US.ts +832 -832
  57. package/packages/locale/lang/es-ES.ts +832 -832
  58. package/packages/locale/lang/fr-FR.ts +832 -832
  59. package/packages/locale/lang/hu-HU.ts +832 -832
  60. package/packages/locale/lang/hy-AM.ts +832 -832
  61. package/packages/locale/lang/id-ID.ts +832 -832
  62. package/packages/locale/lang/it-IT.ts +832 -832
  63. package/packages/locale/lang/ja-JP.ts +832 -832
  64. package/packages/locale/lang/ko-KR.ts +832 -832
  65. package/packages/locale/lang/ms-MY.ts +832 -832
  66. package/packages/locale/lang/nb-NO.ts +832 -832
  67. package/packages/locale/lang/pt-BR.ts +832 -832
  68. package/packages/locale/lang/ru-RU.ts +832 -832
  69. package/packages/locale/lang/th-TH.ts +832 -832
  70. package/packages/locale/lang/ug-CN.ts +832 -832
  71. package/packages/locale/lang/uk-UA.ts +832 -832
  72. package/packages/locale/lang/uz-UZ.ts +832 -832
  73. package/packages/locale/lang/vi-VN.ts +832 -832
  74. package/packages/locale/lang/zh-CHT.ts +832 -832
  75. package/packages/locale/lang/zh-CN.ts +832 -832
  76. package/packages/locale/lang/zh-HK.ts +3 -3
  77. package/packages/locale/lang/zh-MO.ts +3 -3
  78. package/packages/locale/lang/zh-TC.ts +3 -3
  79. package/packages/locale/lang/zh-TW.ts +3 -3
  80. package/packages/table/index.ts +49 -49
  81. package/packages/table/module/custom/mixin.ts +369 -369
  82. package/packages/table/module/custom/panel.ts +1461 -1461
  83. package/packages/table/module/edit/mixin.ts +1123 -1123
  84. package/packages/table/module/export/export-panel.ts +658 -658
  85. package/packages/table/module/export/import-panel.ts +319 -319
  86. package/packages/table/module/export/mixin.ts +1693 -1693
  87. package/packages/table/module/export/util.ts +24 -24
  88. package/packages/table/module/filter/mixin.ts +507 -507
  89. package/packages/table/module/filter/panel.ts +329 -329
  90. package/packages/table/module/keyboard/mixin.ts +513 -513
  91. package/packages/table/module/menu/mixin.ts +329 -329
  92. package/packages/table/module/menu/panel.ts +212 -212
  93. package/packages/table/module/validator/mixin.ts +626 -626
  94. package/packages/table/render/index.ts +1456 -1456
  95. package/packages/table/src/body.ts +969 -969
  96. package/packages/table/src/cell.ts +1285 -1285
  97. package/packages/table/src/column.ts +205 -205
  98. package/packages/table/src/columnInfo.ts +228 -228
  99. package/packages/table/src/footer.ts +388 -388
  100. package/packages/table/src/group.ts +51 -51
  101. package/packages/table/src/header.ts +602 -602
  102. package/packages/table/src/methods.ts +12936 -12939
  103. package/packages/table/src/props.ts +311 -311
  104. package/packages/table/src/store.ts +15 -15
  105. package/packages/table/src/table.ts +2513 -2502
  106. package/packages/table/src/util.ts +1018 -1012
  107. package/packages/toolbar/index.ts +18 -18
  108. package/packages/toolbar/src/toolbar.ts +856 -856
  109. package/packages/ui/index.ts +530 -530
  110. package/packages/ui/src/anime.ts +52 -52
  111. package/packages/ui/src/comp.ts +3 -3
  112. package/packages/ui/src/dom.ts +237 -236
  113. package/packages/ui/src/log.ts +8 -8
  114. package/packages/ui/src/utils.ts +56 -56
  115. package/packages/ui/src/vn.ts +65 -65
  116. package/packages/v-x-e-table/index.ts +4 -4
  117. package/styles/all.scss +7 -7
  118. package/styles/base.scss +16 -16
  119. package/styles/components/grid.scss +89 -89
  120. package/styles/components/icon.scss +225 -225
  121. package/styles/components/old-icon.scss +715 -715
  122. package/styles/components/table-module/all.scss +6 -6
  123. package/styles/components/table-module/custom.scss +527 -527
  124. package/styles/components/table-module/export.scss +130 -130
  125. package/styles/components/table-module/filter.scss +130 -130
  126. package/styles/components/table-module/menu.scss +81 -81
  127. package/styles/components/table.scss +2679 -2679
  128. package/styles/components/toolbar.scss +119 -119
  129. package/styles/default.scss +2 -2
  130. package/styles/helpers/baseMixin.scss +95 -95
  131. package/styles/index.scss +3 -3
  132. package/styles/modules.scss +5 -5
  133. package/styles/theme/base.scss +93 -93
  134. package/styles/theme/dark.scss +49 -49
  135. package/styles/theme/light.scss +44 -44
  136. package/styles/variable.scss +43 -43
  137. package/types/all.d.ts +53 -53
  138. package/types/index.d.ts +4 -4
  139. /package/es/{iconfont.1773972972913.ttf → iconfont.1774240303597.ttf} +0 -0
  140. /package/es/{iconfont.1773972972913.woff → iconfont.1774240303597.woff} +0 -0
  141. /package/es/{iconfont.1773972972913.woff2 → iconfont.1774240303597.woff2} +0 -0
  142. /package/lib/{iconfont.1773972972913.ttf → iconfont.1774240303597.ttf} +0 -0
  143. /package/lib/{iconfont.1773972972913.woff → iconfont.1774240303597.woff} +0 -0
  144. /package/lib/{iconfont.1773972972913.woff2 → iconfont.1774240303597.woff2} +0 -0
@@ -1,205 +1,205 @@
1
- import { PropType } from 'vue'
2
- import Cell from './cell'
3
- import { defineVxeComponent } from '../../ui/src/comp'
4
- import { assembleColumn, destroyColumn } from './util'
5
-
6
- import type { VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
7
-
8
- export const columnProps = {
9
- // 列唯一主键
10
- colId: [String, Number],
11
- // 渲染类型 seq,radio,checkbox,expand,html
12
- type: String,
13
- // 列字段名
14
- field: String,
15
- // 列标题
16
- title: String,
17
- // 列宽度
18
- width: [Number, String],
19
- // 列最小宽度,把剩余宽度按比例分配
20
- minWidth: [Number, String],
21
- // 列最大宽度
22
- maxWidth: [Number, String],
23
- // 是否允许拖动列宽调整大小
24
- resizable: {
25
- type: Boolean,
26
- default: null
27
- },
28
- // 将列固定在左侧或者右侧
29
- fixed: String,
30
- // 列对其方式
31
- align: String,
32
- // 表头对齐方式
33
- headerAlign: String,
34
- // 表尾列的对齐方式
35
- footerAlign: String,
36
- // 当内容过长时显示为省略号
37
- showOverflow: {
38
- type: [Boolean, String],
39
- default: null
40
- },
41
- // 当表头内容过长时显示为省略号
42
- showHeaderOverflow: {
43
- type: [Boolean, String],
44
- default: null
45
- },
46
- // 当表尾内容过长时显示为省略号
47
- showFooterOverflow: {
48
- type: [Boolean, String],
49
- default: null
50
- },
51
- // 给单元格附加 className
52
- className: [String, Function],
53
- // 给表头单元格附加 className
54
- headerClassName: [String, Function],
55
- // 给表尾单元格附加 className
56
- footerClassName: [String, Function],
57
- // 格式化显示内容
58
- formatter: [Function, Array, String] as PropType<VxeColumnPropTypes.Formatter<any>>,
59
- // 格式化表头显示内容
60
- headerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.HeaderFormatter>,
61
- // 格式化表尾显示内容
62
- footerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.FooterFormatter>,
63
- // 是否显示间距
64
- padding: {
65
- type: Boolean as PropType<VxeColumnPropTypes.Padding>,
66
- default: null
67
- },
68
- // 垂直对齐方式
69
- verticalAlign: {
70
- type: String as PropType<VxeColumnPropTypes.VerticalAlign>,
71
- default: null
72
- },
73
- // 是否允许排序
74
- sortable: Boolean,
75
- // 在 v3 中废弃
76
- remoteSort: {
77
- type: Boolean,
78
- default: null
79
- },
80
- // 在 v3 中只支持字符串类型
81
- sortBy: [String, Function],
82
- // 排序的字段类型,比如字符串转数值等
83
- sortType: String,
84
- // 在 v3 中废弃
85
- sortMethod: Function,
86
- // 配置筛选条件数组
87
- filters: {
88
- type: Array,
89
- default: null
90
- },
91
- // 筛选是否允许多选
92
- filterMultiple: {
93
- type: Boolean,
94
- default: true
95
- },
96
- // 自定义筛选方法
97
- filterMethod: Function as PropType<VxeColumnPropTypes.FilterMethod<any>>,
98
- // 筛选重置方法
99
- filterResetMethod: Function as PropType<VxeColumnPropTypes.FilterResetMethod>,
100
- // 筛选复原方法
101
- filterRecoverMethod: Function as PropType<VxeColumnPropTypes.FilterRecoverMethod>,
102
- // 筛选模板配置项
103
- filterRender: Object as PropType<VxeColumnPropTypes.FilterRender>,
104
- // 是否显示浮动筛选
105
- floatingFilters: Object as PropType<VxeColumnPropTypes.FloatingFilters>,
106
- // 设置为分组节点
107
- rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
108
- // 设置为树节点
109
- treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
110
- // 设置为拖拽排序
111
- dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
112
- // 设置为行高拖拽
113
- rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
114
- // 是否可视
115
- visible: {
116
- type: Boolean as PropType<VxeColumnPropTypes.Visible>,
117
- default: null
118
- },
119
- // 表头单元格数据导出方法
120
- headerExportMethod: Function,
121
- // 单元格数据导出方法
122
- exportMethod: Function,
123
- // 表尾单元格数据导出方法
124
- footerExportMethod: Function,
125
- // 已废弃,被 titlePrefix 替换
126
- titleHelp: Object,
127
- // 标题前缀图标配置项
128
- titlePrefix: Object,
129
- // 标题后缀图标配置项
130
- titleSuffix: Object,
131
- // 单元格值类型
132
- cellType: String,
133
- // 单元格渲染配置项
134
- cellRender: Object,
135
- // 单元格编辑渲染配置项
136
- editRender: Object,
137
- // 内容渲染配置项
138
- contentRender: Object,
139
-
140
- // 聚合函数
141
- aggFunc: [Boolean, String] as PropType<VxeColumnPropTypes.AggFunc>,
142
- // 将单元格复制到剪贴板
143
- copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
144
- // 将剪贴单元格的值清除
145
- cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
146
- // 从剪贴板赋值到单元格
147
- pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
148
-
149
- // 额外的参数
150
- params: Object
151
- }
152
-
153
- export const columnWatch: Record<string, any> = {}
154
- Object.keys(columnProps).forEach(name => {
155
- columnWatch[name] = function (value: any) {
156
- const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
157
-
158
- this.columnConfig.update(name, value)
159
- if ($xeTable) {
160
- if (name === 'filters') {
161
- $xeTable.setFilter(this.columnConfig, value)
162
- $xeTable.handleUpdateDataQueue()
163
- } else if (['visible', 'fixed', 'width', 'minWidth', 'maxWidth'].includes(name)) {
164
- $xeTable.handleRefreshColumnQueue()
165
- }
166
- }
167
- }
168
- })
169
-
170
- export default /* define-vxe-component start */ defineVxeComponent({
171
- name: 'VxeColumn',
172
- props: columnProps,
173
- provide () {
174
- return {
175
- $xeColumn: this,
176
- $xeGrid: null,
177
- $xeGantt: null
178
- }
179
- },
180
- inject: {
181
- $xeTable: {
182
- default: null
183
- },
184
- $xeColumn: {
185
- default: null
186
- }
187
- },
188
- watch: columnWatch,
189
- created (this: any) {
190
- const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
191
-
192
- this.columnConfig = this.createColumn($xeTable, this)
193
- },
194
- mounted () {
195
- this.columnConfig.slots = this.$scopedSlots
196
- assembleColumn(this)
197
- },
198
- destroyed () {
199
- destroyColumn(this)
200
- },
201
- render (this: any, h: any) {
202
- return h('div', this.$slots.default)
203
- },
204
- methods: Cell
205
- }) /* define-vxe-component end */
1
+ import { PropType } from 'vue'
2
+ import Cell from './cell'
3
+ import { defineVxeComponent } from '../../ui/src/comp'
4
+ import { assembleColumn, destroyColumn } from './util'
5
+
6
+ import type { VxeColumnPropTypes, VxeTableConstructor, VxeTablePrivateMethods } from '../../../types'
7
+
8
+ export const columnProps = {
9
+ // 列唯一主键
10
+ colId: [String, Number],
11
+ // 渲染类型 seq,radio,checkbox,expand,html
12
+ type: String,
13
+ // 列字段名
14
+ field: String,
15
+ // 列标题
16
+ title: String,
17
+ // 列宽度
18
+ width: [Number, String],
19
+ // 列最小宽度,把剩余宽度按比例分配
20
+ minWidth: [Number, String],
21
+ // 列最大宽度
22
+ maxWidth: [Number, String],
23
+ // 是否允许拖动列宽调整大小
24
+ resizable: {
25
+ type: Boolean,
26
+ default: null
27
+ },
28
+ // 将列固定在左侧或者右侧
29
+ fixed: String,
30
+ // 列对其方式
31
+ align: String,
32
+ // 表头对齐方式
33
+ headerAlign: String,
34
+ // 表尾列的对齐方式
35
+ footerAlign: String,
36
+ // 当内容过长时显示为省略号
37
+ showOverflow: {
38
+ type: [Boolean, String],
39
+ default: null
40
+ },
41
+ // 当表头内容过长时显示为省略号
42
+ showHeaderOverflow: {
43
+ type: [Boolean, String],
44
+ default: null
45
+ },
46
+ // 当表尾内容过长时显示为省略号
47
+ showFooterOverflow: {
48
+ type: [Boolean, String],
49
+ default: null
50
+ },
51
+ // 给单元格附加 className
52
+ className: [String, Function],
53
+ // 给表头单元格附加 className
54
+ headerClassName: [String, Function],
55
+ // 给表尾单元格附加 className
56
+ footerClassName: [String, Function],
57
+ // 格式化显示内容
58
+ formatter: [Function, Array, String] as PropType<VxeColumnPropTypes.Formatter<any>>,
59
+ // 格式化表头显示内容
60
+ headerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.HeaderFormatter>,
61
+ // 格式化表尾显示内容
62
+ footerFormatter: [Function, Array, String] as PropType<VxeColumnPropTypes.FooterFormatter>,
63
+ // 是否显示间距
64
+ padding: {
65
+ type: Boolean as PropType<VxeColumnPropTypes.Padding>,
66
+ default: null
67
+ },
68
+ // 垂直对齐方式
69
+ verticalAlign: {
70
+ type: String as PropType<VxeColumnPropTypes.VerticalAlign>,
71
+ default: null
72
+ },
73
+ // 是否允许排序
74
+ sortable: Boolean,
75
+ // 在 v3 中废弃
76
+ remoteSort: {
77
+ type: Boolean,
78
+ default: null
79
+ },
80
+ // 在 v3 中只支持字符串类型
81
+ sortBy: [String, Function],
82
+ // 排序的字段类型,比如字符串转数值等
83
+ sortType: String,
84
+ // 在 v3 中废弃
85
+ sortMethod: Function,
86
+ // 配置筛选条件数组
87
+ filters: {
88
+ type: Array,
89
+ default: null
90
+ },
91
+ // 筛选是否允许多选
92
+ filterMultiple: {
93
+ type: Boolean,
94
+ default: true
95
+ },
96
+ // 自定义筛选方法
97
+ filterMethod: Function as PropType<VxeColumnPropTypes.FilterMethod<any>>,
98
+ // 筛选重置方法
99
+ filterResetMethod: Function as PropType<VxeColumnPropTypes.FilterResetMethod>,
100
+ // 筛选复原方法
101
+ filterRecoverMethod: Function as PropType<VxeColumnPropTypes.FilterRecoverMethod>,
102
+ // 筛选模板配置项
103
+ filterRender: Object as PropType<VxeColumnPropTypes.FilterRender>,
104
+ // 是否显示浮动筛选
105
+ floatingFilters: Object as PropType<VxeColumnPropTypes.FloatingFilters>,
106
+ // 设置为分组节点
107
+ rowGroupNode: Boolean as PropType<VxeColumnPropTypes.RowGroupNode>,
108
+ // 设置为树节点
109
+ treeNode: Boolean as PropType<VxeColumnPropTypes.TreeNode>,
110
+ // 设置为拖拽排序
111
+ dragSort: Boolean as PropType<VxeColumnPropTypes.DragSort>,
112
+ // 设置为行高拖拽
113
+ rowResize: Boolean as PropType<VxeColumnPropTypes.RowResize>,
114
+ // 是否可视
115
+ visible: {
116
+ type: Boolean as PropType<VxeColumnPropTypes.Visible>,
117
+ default: null
118
+ },
119
+ // 表头单元格数据导出方法
120
+ headerExportMethod: Function,
121
+ // 单元格数据导出方法
122
+ exportMethod: Function,
123
+ // 表尾单元格数据导出方法
124
+ footerExportMethod: Function,
125
+ // 已废弃,被 titlePrefix 替换
126
+ titleHelp: Object,
127
+ // 标题前缀图标配置项
128
+ titlePrefix: Object,
129
+ // 标题后缀图标配置项
130
+ titleSuffix: Object,
131
+ // 单元格值类型
132
+ cellType: String,
133
+ // 单元格渲染配置项
134
+ cellRender: Object,
135
+ // 单元格编辑渲染配置项
136
+ editRender: Object,
137
+ // 内容渲染配置项
138
+ contentRender: Object,
139
+
140
+ // 聚合函数
141
+ aggFunc: [Boolean, String] as PropType<VxeColumnPropTypes.AggFunc>,
142
+ // 将单元格复制到剪贴板
143
+ copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
144
+ // 将剪贴单元格的值清除
145
+ cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
146
+ // 从剪贴板赋值到单元格
147
+ pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
148
+
149
+ // 额外的参数
150
+ params: Object
151
+ }
152
+
153
+ export const columnWatch: Record<string, any> = {}
154
+ Object.keys(columnProps).forEach(name => {
155
+ columnWatch[name] = function (value: any) {
156
+ const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
157
+
158
+ this.columnConfig.update(name, value)
159
+ if ($xeTable) {
160
+ if (name === 'filters') {
161
+ $xeTable.setFilter(this.columnConfig, value)
162
+ $xeTable.handleUpdateDataQueue()
163
+ } else if (['visible', 'fixed', 'width', 'minWidth', 'maxWidth'].includes(name)) {
164
+ $xeTable.handleRefreshColumnQueue()
165
+ }
166
+ }
167
+ }
168
+ })
169
+
170
+ export default /* define-vxe-component start */ defineVxeComponent({
171
+ name: 'VxeColumn',
172
+ props: columnProps,
173
+ provide () {
174
+ return {
175
+ $xeColumn: this,
176
+ $xeGrid: null,
177
+ $xeGantt: null
178
+ }
179
+ },
180
+ inject: {
181
+ $xeTable: {
182
+ default: null
183
+ },
184
+ $xeColumn: {
185
+ default: null
186
+ }
187
+ },
188
+ watch: columnWatch,
189
+ created (this: any) {
190
+ const $xeTable = this.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
191
+
192
+ this.columnConfig = this.createColumn($xeTable, this)
193
+ },
194
+ mounted () {
195
+ this.columnConfig.slots = this.$scopedSlots
196
+ assembleColumn(this)
197
+ },
198
+ destroyed () {
199
+ destroyColumn(this)
200
+ },
201
+ render (this: any, h: any) {
202
+ return h('div', this.$slots.default)
203
+ },
204
+ methods: Cell
205
+ }) /* define-vxe-component end */