vxe-table 3.15.1 → 3.15.2

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 (45) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/filter/mixin.js +29 -10
  6. package/es/table/module/filter/panel.js +173 -142
  7. package/es/table/src/methods.js +31 -7
  8. package/es/table/style.css +18 -0
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +18 -0
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/index.css +1 -1
  15. package/lib/index.min.css +1 -1
  16. package/lib/index.umd.js +226 -142
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/style.css +1 -1
  19. package/lib/style.min.css +1 -1
  20. package/lib/table/module/filter/mixin.js +33 -9
  21. package/lib/table/module/filter/mixin.min.js +1 -1
  22. package/lib/table/module/filter/panel.js +153 -122
  23. package/lib/table/module/filter/panel.min.js +1 -1
  24. package/lib/table/src/methods.js +36 -7
  25. package/lib/table/src/methods.min.js +1 -1
  26. package/lib/table/style/style.css +18 -0
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +18 -0
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +2 -2
  35. package/packages/table/module/filter/mixin.ts +27 -10
  36. package/packages/table/module/filter/panel.ts +178 -143
  37. package/packages/table/src/methods.ts +31 -7
  38. package/styles/components/table-module/filter.scss +16 -0
  39. package/styles/components/table.scss +6 -1
  40. /package/es/{iconfont.1744336394111.ttf → iconfont.1744428010256.ttf} +0 -0
  41. /package/es/{iconfont.1744336394111.woff → iconfont.1744428010256.woff} +0 -0
  42. /package/es/{iconfont.1744336394111.woff2 → iconfont.1744428010256.woff2} +0 -0
  43. /package/lib/{iconfont.1744336394111.ttf → iconfont.1744428010256.ttf} +0 -0
  44. /package/lib/{iconfont.1744336394111.woff → iconfont.1744428010256.woff} +0 -0
  45. /package/lib/{iconfont.1744336394111.woff2 → iconfont.1744428010256.woff2} +0 -0
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import { VxeUI } from '../../../ui'
3
3
  import { toFilters, handleFieldOrColumn, getRefElem } from '../../src/util'
4
- import { toCssUnit, triggerEvent } from '../../../ui/src/dom'
4
+ import { toCssUnit, triggerEvent, getDomNode } from '../../../ui/src/dom'
5
5
  import { isEnableConf } from '../../../ui/src/utils'
6
6
 
7
7
  import type { VxeTableConstructor, VxeTableDefines, TableReactData, TableInternalData } from '../../../../types'
@@ -75,6 +75,9 @@ export default {
75
75
  filterStore.visible = false
76
76
  } else {
77
77
  const el = $xeTable.$refs.refElem as HTMLDivElement
78
+ const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode()
79
+ const filterOpts = $xeTable.computeFilterOpts
80
+ const { transfer } = filterOpts
78
81
  const tableRect = el.getBoundingClientRect()
79
82
  const btnElem = evnt.currentTarget as HTMLDivElement
80
83
  const { filters, filterMultiple, filterRender } = column
@@ -111,23 +114,37 @@ export default {
111
114
  return
112
115
  }
113
116
  const btnRect = btnElem.getBoundingClientRect()
114
- const filterWidth = filterWrapperElem.offsetWidth
115
117
  const filterHeadElem = filterWrapperElem.querySelector<HTMLDivElement>('.vxe-table--filter-header')
116
118
  const filterFootElem = filterWrapperElem.querySelector<HTMLDivElement>('.vxe-table--filter-footer')
119
+ const filterWidth = filterWrapperElem.offsetWidth
117
120
  const centerWidth = filterWidth / 2
118
- let left = btnRect.left - tableRect.left - centerWidth
119
- const top = btnRect.top - tableRect.top + btnElem.clientHeight
120
- // 判断面板不能大于表格高度
121
- const maxHeight = Math.max(40, el.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14)
122
- if (left < 1) {
123
- left = 1
124
- } else if (left > (el.clientWidth - filterWidth - 1)) {
125
- left = el.clientWidth - filterWidth - 1
121
+ let left = 0
122
+ let top = 0
123
+ let maxHeight = 0
124
+ if (transfer) {
125
+ left = btnRect.left - centerWidth + scrollLeft
126
+ top = btnRect.top + btnElem.clientHeight + scrollTop
127
+ maxHeight = Math.min(Math.max(tableRect.height, Math.floor(visibleHeight / 2)), Math.max(80, visibleHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 28))
128
+ if (left < 16) {
129
+ left = 16
130
+ } else if (left > (visibleWidth - filterWidth - 16)) {
131
+ left = visibleWidth - filterWidth - 16
132
+ }
133
+ } else {
134
+ left = btnRect.left - tableRect.left - centerWidth
135
+ top = btnRect.top - tableRect.top + btnElem.clientHeight
136
+ maxHeight = Math.max(40, el.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14)
137
+ if (left < 1) {
138
+ left = 1
139
+ } else if (left > (el.clientWidth - filterWidth - 1)) {
140
+ left = el.clientWidth - filterWidth - 1
141
+ }
126
142
  }
127
143
  filterStore.style = {
128
144
  top: toCssUnit(top),
129
145
  left: toCssUnit(left)
130
146
  }
147
+ // 判断面板不能大于表格高度
131
148
  filterStore.maxHeight = maxHeight
132
149
  })
133
150
  }
@@ -5,183 +5,218 @@ import { CreateElement } from 'vue'
5
5
 
6
6
  import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData } from '../../../../types'
7
7
 
8
- const { getI18n, getIcon, renderer } = VxeUI
8
+ const { getI18n, getIcon, renderer, globalMixins } = VxeUI
9
+
10
+ function renderOptions ($xeFilterPanel: any, h: CreateElement, filterRender: any, compConf: any) {
11
+ const props = $xeFilterPanel
12
+ const $xeTable = $xeFilterPanel.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
13
+ const tableInternalData = $xeTable as unknown as TableInternalData
14
+
15
+ const { filterStore } = props
16
+ const { column, multiple, maxHeight } = filterStore
17
+ const slots = column ? column.slots : null
18
+ const filterSlot = slots ? slots.filter : null
19
+ const params = Object.assign({}, tableInternalData._currFilterParams, { $panel: $xeFilterPanel, $table: $xeTable })
20
+ const rtFilter = compConf ? (compConf.renderTableFilter || compConf.renderFilter) : null
21
+ if (filterSlot) {
22
+ return [
23
+ h('div', {
24
+ class: 'vxe-table--filter-template',
25
+ style: maxHeight
26
+ ? {
27
+ maxHeight: `${maxHeight}px`
28
+ }
29
+ : {}
30
+ }, $xeTable.callSlot(filterSlot, params, h))
31
+ ]
32
+ } else if (rtFilter) {
33
+ return [
34
+ h('div', {
35
+ class: 'vxe-table--filter-template',
36
+ style: maxHeight
37
+ ? {
38
+ maxHeight: `${maxHeight}px`
39
+ }
40
+ : {}
41
+ }, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))
42
+ ]
43
+ }
44
+ const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some((item: any) => item._checked)
45
+ const isAllIndeterminate = multiple && filterStore.isIndeterminate
46
+ return [
47
+ h('ul', {
48
+ class: 'vxe-table--filter-header'
49
+ }, [
50
+ h('li', {
51
+ class: ['vxe-table--filter-option', {
52
+ 'is--checked': isAllChecked,
53
+ 'is--indeterminate': isAllIndeterminate
54
+ }],
55
+ attrs: {
56
+ title: getI18n(multiple ? 'vxe.table.allTitle' : 'vxe.table.allFilter')
57
+ },
58
+ on: {
59
+ click: (evnt: MouseEvent) => {
60
+ $xeFilterPanel.changeAllOption(evnt, !filterStore.isAllSelected)
61
+ }
62
+ }
63
+ }, (multiple
64
+ ? [
65
+ h('span', {
66
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
67
+ })
68
+ ]
69
+ : []).concat([
70
+ h('span', {
71
+ class: 'vxe-checkbox--label'
72
+ }, getI18n('vxe.table.allFilter'))
73
+ ]))
74
+ ]),
75
+ h('ul', {
76
+ class: 'vxe-table--filter-body',
77
+ style: maxHeight
78
+ ? {
79
+ maxHeight: `${maxHeight}px`
80
+ }
81
+ : {}
82
+ }, filterStore.options.map((item: any) => {
83
+ const isChecked = item._checked
84
+ const isIndeterminate = false
85
+ return h('li', {
86
+ class: ['vxe-table--filter-option', {
87
+ 'is--checked': isChecked
88
+ }],
89
+ attrs: {
90
+ title: item.label
91
+ },
92
+ on: {
93
+ click: (evnt: MouseEvent) => {
94
+ $xeFilterPanel.changeOption(evnt, !item._checked, item)
95
+ }
96
+ }
97
+ }, (multiple
98
+ ? [
99
+ h('span', {
100
+ class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
101
+ })
102
+ ]
103
+ : []).concat([
104
+ h('span', {
105
+ class: 'vxe-checkbox--label'
106
+ }, formatText(item.label, 1))
107
+ ]))
108
+ }))
109
+ ]
110
+ }
111
+
112
+ function renderFooter ($xeFilterPanel: any, h: CreateElement) {
113
+ const props = $xeFilterPanel
114
+ const $xeTable = $xeFilterPanel.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
115
+
116
+ const { filterStore } = props
117
+ const { column, multiple } = filterStore
118
+ const filterOpts = $xeTable.computeFilterOpts
119
+ const hasCheckOption = $xeFilterPanel.computeHasCheckOption
120
+ const filterRender = column.filterRender
121
+ const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
122
+ const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
123
+ return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false) : true)
124
+ ? [
125
+ h('div', {
126
+ class: 'vxe-table--filter-footer'
127
+ }, [
128
+ h('button', {
129
+ class: {
130
+ 'is--disabled': isDisabled
131
+ },
132
+ attrs: {
133
+ disabled: isDisabled
134
+ },
135
+ on: {
136
+ click: $xeFilterPanel.confirmFilter
137
+ }
138
+ }, filterOpts.confirmButtonText || getI18n('vxe.table.confirmFilter')),
139
+ h('button', {
140
+ on: {
141
+ click: $xeFilterPanel.resetFilter
142
+ }
143
+ }, filterOpts.resetButtonText || getI18n('vxe.table.resetFilter'))
144
+ ])
145
+ ]
146
+ : []
147
+ }
9
148
 
10
149
  export default {
11
150
  name: 'VxeTableFilterPanel',
151
+ mixins: [
152
+ globalMixins.sizeMixin
153
+ ],
12
154
  props: {
13
155
  filterStore: Object
14
156
  },
157
+ inject: {
158
+ $xeTable: {
159
+ default: null
160
+ }
161
+ },
15
162
  computed: {
16
- hasCheckOption () {
163
+ computeHasCheckOption () {
17
164
  const { filterStore } = this
18
165
  return filterStore && filterStore.options.some((option: any) => option.checked)
19
166
  }
20
167
  } as any,
168
+ mounted (this: any) {
169
+ const $xeFilterPanel = this
170
+ const $xeTable = $xeFilterPanel.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
171
+ const filterOpts = $xeTable.computeFilterOpts
172
+ const { transfer } = filterOpts
173
+ const el = this.$refs.refElem as HTMLDivElement
174
+
175
+ if (transfer && el) {
176
+ document.body.appendChild(el)
177
+ }
178
+ },
179
+ beforeDestroy (this: any) {
180
+ const el = this.$refs.refElem as HTMLDivElement
181
+
182
+ if (el && el.parentNode) {
183
+ el.parentNode.removeChild(el)
184
+ }
185
+ },
21
186
  render (this: any, h: CreateElement) {
22
- const $panel = this
23
- const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
187
+ const $xeFilterPanel = this
188
+ const props = $xeFilterPanel
189
+ const $xeTable = $xeFilterPanel.$xeTable as VxeTableConstructor & VxeTablePrivateMethods
24
190
  const tableInternalData = $xeTable as unknown as TableInternalData
25
191
 
26
- const { filterStore } = this
192
+ const { filterStore } = props
27
193
  const { visible, multiple, column } = filterStore
28
194
  const filterRender = column ? column.filterRender : null
29
195
  const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
30
196
  const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
31
- const params = Object.assign({}, tableInternalData._currFilterParams, { $panel, $table: $xeTable })
197
+ const params = Object.assign({}, tableInternalData._currFilterParams, { $panel: $xeFilterPanel, $table: $xeTable })
198
+ const tableProps = $xeTable
199
+ const vSize = $xeFilterPanel.computeSize
32
200
  const filterOpts = $xeTable.computeFilterOpts
33
201
  const { destroyOnClose } = filterOpts
34
202
  return h('div', {
203
+ ref: 'refElem',
35
204
  class: [
36
205
  'vxe-table--filter-wrapper',
37
206
  'filter--prevent-default',
38
207
  compConf && compConf.className ? compConf.className : '',
39
208
  getClass(filterClassName, params),
40
209
  {
41
- 'is--animat': $xeTable.animat,
210
+ [`size--${vSize}`]: vSize,
211
+ 'is--animat': tableProps.animat,
42
212
  'is--multiple': multiple,
43
213
  'is--active': visible
44
214
  }
45
215
  ],
46
216
  style: filterStore.style
47
- }, filterStore.visible && (destroyOnClose ? visible : true) && column ? this.renderOptions(h, filterRender, compConf).concat(this.renderFooter(h)) : [])
217
+ }, filterStore.visible && (destroyOnClose ? visible : true) && column ? renderOptions($xeFilterPanel, h, filterRender, compConf).concat(renderFooter($xeFilterPanel, h)) : [])
48
218
  },
49
219
  methods: {
50
- renderOptions (h: CreateElement, filterRender: any, compConf: any) {
51
- const $panel = this
52
- const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
53
- const tableInternalData = $xeTable as unknown as TableInternalData
54
-
55
- const { filterStore } = this
56
- const { column, multiple, maxHeight } = filterStore
57
- const slots = column ? column.slots : null
58
- const filterSlot = slots ? slots.filter : null
59
- const params = Object.assign({}, tableInternalData._currFilterParams, { $panel, $table: $xeTable })
60
- const rtFilter = compConf ? (compConf.renderTableFilter || compConf.renderFilter) : null
61
- if (filterSlot) {
62
- return [
63
- h('div', {
64
- class: 'vxe-table--filter-template',
65
- style: maxHeight
66
- ? {
67
- maxHeight: `${maxHeight}px`
68
- }
69
- : {}
70
- }, $xeTable.callSlot(filterSlot, params, h))
71
- ]
72
- } else if (rtFilter) {
73
- return [
74
- h('div', {
75
- class: 'vxe-table--filter-template',
76
- style: maxHeight
77
- ? {
78
- maxHeight: `${maxHeight}px`
79
- }
80
- : {}
81
- }, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))
82
- ]
83
- }
84
- const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some((item: any) => item._checked)
85
- const isAllIndeterminate = multiple && filterStore.isIndeterminate
86
- return [
87
- h('ul', {
88
- class: 'vxe-table--filter-header'
89
- }, [
90
- h('li', {
91
- class: ['vxe-table--filter-option', {
92
- 'is--checked': isAllChecked,
93
- 'is--indeterminate': isAllIndeterminate
94
- }],
95
- attrs: {
96
- title: getI18n(multiple ? 'vxe.table.allTitle' : 'vxe.table.allFilter')
97
- },
98
- on: {
99
- click: (evnt: MouseEvent) => {
100
- this.changeAllOption(evnt, !filterStore.isAllSelected)
101
- }
102
- }
103
- }, (multiple
104
- ? [
105
- h('span', {
106
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
107
- })
108
- ]
109
- : []).concat([
110
- h('span', {
111
- class: 'vxe-checkbox--label'
112
- }, getI18n('vxe.table.allFilter'))
113
- ]))
114
- ]),
115
- h('ul', {
116
- class: 'vxe-table--filter-body',
117
- style: maxHeight
118
- ? {
119
- maxHeight: `${maxHeight}px`
120
- }
121
- : {}
122
- }, filterStore.options.map((item: any) => {
123
- const isChecked = item._checked
124
- const isIndeterminate = false
125
- return h('li', {
126
- class: ['vxe-table--filter-option', {
127
- 'is--checked': isChecked
128
- }],
129
- attrs: {
130
- title: item.label
131
- },
132
- on: {
133
- click: (evnt: MouseEvent) => {
134
- this.changeOption(evnt, !item._checked, item)
135
- }
136
- }
137
- }, (multiple
138
- ? [
139
- h('span', {
140
- class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
141
- })
142
- ]
143
- : []).concat([
144
- h('span', {
145
- class: 'vxe-checkbox--label'
146
- }, formatText(item.label, 1))
147
- ]))
148
- }))
149
- ]
150
- },
151
- renderFooter (h: CreateElement) {
152
- const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
153
-
154
- const { hasCheckOption, filterStore } = this
155
- const { column, multiple } = filterStore
156
- const filterOpts = $xeTable.computeFilterOpts
157
- const filterRender = column.filterRender
158
- const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
159
- const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
160
- return multiple && (compConf ? !(compConf.showTableFilterFooter === false || compConf.showFilterFooter === false || compConf.isFooter === false) : true)
161
- ? [
162
- h('div', {
163
- class: 'vxe-table--filter-footer'
164
- }, [
165
- h('button', {
166
- class: {
167
- 'is--disabled': isDisabled
168
- },
169
- attrs: {
170
- disabled: isDisabled
171
- },
172
- on: {
173
- click: this.confirmFilter
174
- }
175
- }, filterOpts.confirmButtonText || getI18n('vxe.table.confirmFilter')),
176
- h('button', {
177
- on: {
178
- click: this.resetFilter
179
- }
180
- }, filterOpts.resetButtonText || getI18n('vxe.table.resetFilter'))
181
- ])
182
- ]
183
- : []
184
- },
185
220
  // 全部筛选事件
186
221
  filterCheckAllEvent (evnt: any, value: any) {
187
222
  const filterStore = this.filterStore
@@ -3014,7 +3014,12 @@ const Methods = {
3014
3014
  $xeTable.checkSelectionStatus()
3015
3015
  return new Promise<void>(resolve => {
3016
3016
  this.$nextTick()
3017
- .then(() => $xeTable.recalculate())
3017
+ .then(() => handleRecalculateLayout($xeTable, false))
3018
+ .then(() => {
3019
+ calcCellHeight($xeTable)
3020
+ updateRowOffsetTop($xeTable)
3021
+ return handleRecalculateLayout($xeTable, false)
3022
+ })
3018
3023
  .then(() => {
3019
3024
  let targetScrollLeft = lastScrollLeft
3020
3025
  let targetScrollTop = lastScrollTop
@@ -3028,8 +3033,7 @@ const Methods = {
3028
3033
  targetScrollTop = 0
3029
3034
  }
3030
3035
  reactData.isRowLoading = false
3031
- calcCellHeight($xeTable)
3032
- updateRowOffsetTop($xeTable)
3036
+ handleRecalculateLayout($xeTable, false)
3033
3037
  // 是否变更虚拟滚动
3034
3038
  if (oldScrollYLoad === sYLoad) {
3035
3039
  restoreScrollLocation($xeTable, targetScrollLeft, targetScrollTop)
@@ -6654,6 +6658,10 @@ const Methods = {
6654
6658
  const currentColumnOpts = $xeTable.computeCurrentColumnOpts
6655
6659
  const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod as any
6656
6660
  const { column: newValue } = params
6661
+ const { trigger } = currentColumnOpts
6662
+ if (trigger === 'manual') {
6663
+ return
6664
+ }
6657
6665
  const isChange = oldValue !== newValue
6658
6666
  if (!beforeRowMethod || beforeRowMethod({ column: newValue, $table: $xeTable })) {
6659
6667
  $xeTable.setCurrentColumn(newValue)
@@ -6673,6 +6681,10 @@ const Methods = {
6673
6681
  const currentRowOpts = $xeTable.computeCurrentRowOpts
6674
6682
  const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod as any
6675
6683
  const { row: newValue } = params
6684
+ const { trigger } = currentRowOpts
6685
+ if (trigger === 'manual') {
6686
+ return
6687
+ }
6676
6688
  const isChange = oldValue !== newValue
6677
6689
  if (!beforeRowMethod || beforeRowMethod({ row: newValue, $table: $xeTable })) {
6678
6690
  $xeTable.setCurrentRow(newValue)
@@ -8441,10 +8453,10 @@ const Methods = {
8441
8453
  const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
8442
8454
  const internalData = $xeTable as unknown as TableInternalData
8443
8455
 
8444
- const { treeExpandLazyLoadedMaps } = internalData
8456
+ const { treeExpandLazyLoadedMaps, treeEATime } = internalData
8445
8457
  const treeOpts = $xeTable.computeTreeOpts
8446
8458
  const { row, column } = params
8447
- const { lazy, trigger } = treeOpts
8459
+ const { lazy, trigger, accordion } = treeOpts
8448
8460
  if (trigger === 'manual') {
8449
8461
  return
8450
8462
  }
@@ -8454,7 +8466,17 @@ const Methods = {
8454
8466
  const expanded = !$xeTable.isTreeExpandByRow(row)
8455
8467
  const columnIndex = $xeTable.getColumnIndex(column)
8456
8468
  const $columnIndex = $xeTable.getVMColumnIndex(column)
8457
- $xeTable.setTreeExpand(row, expanded)
8469
+ if (treeEATime) {
8470
+ clearTimeout(treeEATime)
8471
+ }
8472
+ $xeTable.setTreeExpand(row, expanded).then(() => {
8473
+ if (accordion) {
8474
+ internalData.treeEATime = setTimeout(() => {
8475
+ internalData.treeEATime = undefined
8476
+ $xeTable.scrollToRow(row)
8477
+ }, 20)
8478
+ }
8479
+ })
8458
8480
  $xeTable.dispatchEvent('toggle-tree-expand', { expanded, column, columnIndex, $columnIndex, row }, evnt)
8459
8481
  }
8460
8482
  },
@@ -9225,7 +9247,8 @@ const Methods = {
9225
9247
  if (isScrollXBig && mouseOpts.area) {
9226
9248
  errLog('vxe.error.notProp', ['mouse-config.area'])
9227
9249
  }
9228
- $xeTable.$nextTick(() => {
9250
+ calcScrollbar($xeTable)
9251
+ return $xeTable.$nextTick(() => {
9229
9252
  updateStyle($xeTable)
9230
9253
  })
9231
9254
  }
@@ -9335,6 +9358,7 @@ const Methods = {
9335
9358
  if (isScrollYBig && mouseOpts.area) {
9336
9359
  errLog('vxe.error.notProp', ['mouse-config.area'])
9337
9360
  }
9361
+ calcScrollbar($xeTable)
9338
9362
  return $xeTable.$nextTick().then(() => {
9339
9363
  updateStyle($xeTable)
9340
9364
  })
@@ -33,9 +33,11 @@
33
33
  position: absolute;
34
34
  top: 0;
35
35
  min-width: 100px;
36
+ font-size: var(--vxe-ui-font-size-default);
36
37
  border-radius: var(--vxe-ui-border-radius);
37
38
  background-color: var(--vxe-ui-layout-background-color);
38
39
  border: 1px solid var(--vxe-ui-base-popup-border-color);
40
+ color: var(--vxe-ui-font-color);
39
41
  box-shadow: var(--vxe-ui-base-popup-box-shadow);
40
42
  z-index: 10;
41
43
  &:not(.is--multiple) {
@@ -110,3 +112,17 @@
110
112
  .vxe-table--filter-option {
111
113
  @include baseMixin.createCheckboxIcon();
112
114
  }
115
+
116
+
117
+
118
+ .vxe-table--filter-wrapper {
119
+ &.size--medium {
120
+ font-size: var(--vxe-ui-font-size-medium);
121
+ }
122
+ &.size--small {
123
+ font-size: var(--vxe-ui-font-size-small);
124
+ }
125
+ &.size--mini {
126
+ font-size: var(--vxe-ui-font-size-mini);
127
+ }
128
+ }
@@ -1617,10 +1617,12 @@
1617
1617
  height: 1em;
1618
1618
  text-align: center;
1619
1619
  transform: translateY(-50%);
1620
- // background-color: var(--vxe-ui-layout-background-color);
1621
1620
  z-index: 1;
1622
1621
  user-select: none;
1623
1622
  cursor: pointer;
1623
+ & > i {
1624
+ background-color: var(--vxe-ui-layout-background-color);
1625
+ }
1624
1626
  }
1625
1627
  .vxe-tree--node-btn {
1626
1628
  display: block;
@@ -1650,6 +1652,9 @@
1650
1652
  &.col--rs-height,
1651
1653
  &.col--auto-height {
1652
1654
  overflow: hidden;
1655
+ &.col--tree-node {
1656
+ overflow: unset;
1657
+ }
1653
1658
  & > .vxe-cell {
1654
1659
  overflow: hidden;
1655
1660
  }