vxe-table 3.25.0-beta.3 → 3.25.0-beta.4
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.
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/filter/mixin.js +4 -7
- package/es/table/module/filter/panel.js +47 -48
- package/es/table/src/methods.js +11 -5
- package/es/table/src/table.js +48 -27
- package/es/table/src/util.js +1 -2
- package/es/table/style.css +31 -12
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +31 -12
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +103 -83
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/filter/mixin.js +5 -7
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/filter/panel.js +41 -37
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/src/methods.js +3 -3
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +50 -31
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +31 -12
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +31 -12
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +2 -1
- package/packages/table/module/filter/mixin.ts +4 -7
- package/packages/table/module/filter/panel.ts +50 -48
- package/packages/table/src/methods.ts +12 -5
- package/packages/table/src/table.ts +51 -27
- package/packages/table/src/util.ts +1 -2
- package/packages/ui/index.ts +1 -1
- package/styles/components/table-module/filter.scss +25 -14
- /package/es/{iconfont.1792117667851.ttf → iconfont.1792139868734.ttf} +0 -0
- /package/es/{iconfont.1792117667851.woff → iconfont.1792139868734.woff} +0 -0
- /package/es/{iconfont.1792117667851.woff2 → iconfont.1792139868734.woff2} +0 -0
- /package/lib/{iconfont.1792117667851.ttf → iconfont.1792139868734.ttf} +0 -0
- /package/lib/{iconfont.1792117667851.woff → iconfont.1792139868734.woff} +0 -0
- /package/lib/{iconfont.1792117667851.woff2 → iconfont.1792139868734.woff2} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "3.25.0-beta.
|
|
3
|
+
"version": "3.25.0-beta.4",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vue-i18n": "^8.15.1",
|
|
66
66
|
"vue-router": "^3.5.1",
|
|
67
67
|
"vue-template-compiler": "2.6.14",
|
|
68
|
-
"vxe-pc-ui": "3.20.
|
|
68
|
+
"vxe-pc-ui": "3.20.9"
|
|
69
69
|
},
|
|
70
70
|
"vetur": {
|
|
71
71
|
"tags": "helper/vetur/tags.json",
|
|
@@ -10,7 +10,7 @@ import { tableProps } from '../../table/src/props'
|
|
|
10
10
|
import VxeTableComponent from '../../table'
|
|
11
11
|
import VxeToolbarComponent from '../../toolbar'
|
|
12
12
|
|
|
13
|
-
import type { VxeFormItemProps, VxeFormDefines, VxeComponentStyleType, VxeComponentSizeType, ValueOf, VxeFormInstance, VxeFormItemPropTypes, VxePagerInstance } from 'vxe-pc-ui'
|
|
13
|
+
import type { VxeFormItemProps, VxeFormDefines, VxeComponentStyleType, VxeComponentSizeType, VxeComponentIsVScrollbar, ValueOf, VxeFormInstance, VxeFormItemPropTypes, VxePagerInstance } from 'vxe-pc-ui'
|
|
14
14
|
import type { GridReactData, VxeTablePropTypes, VxeGridConstructor, VxeToolbarPropTypes, VxeToolbarInstance, VxeGridPropTypes, VxeTableMethods, GridInternalData, VxeGridEmits, VxePagerDefines, VxeTableConstructor, VxeTableDefines, VxeTablePrivateMethods, TableInternalData, VxeTableProps, VxeGridDefines } from '../../../types'
|
|
15
15
|
|
|
16
16
|
const { warnLog, errLog } = createComponentLog('grid')
|
|
@@ -139,6 +139,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
139
139
|
computed: {
|
|
140
140
|
...({} as {
|
|
141
141
|
computeSize(): VxeComponentSizeType
|
|
142
|
+
computeIsVScrollbar(): VxeComponentIsVScrollbar
|
|
142
143
|
}),
|
|
143
144
|
isRespMsg () {
|
|
144
145
|
const $xeGrid = this
|
|
@@ -17,7 +17,7 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
17
17
|
const internalData = $xeTable as unknown as TableInternalData
|
|
18
18
|
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
19
19
|
|
|
20
|
-
const { filterStore } = reactData
|
|
20
|
+
const { filterStore, scrollbarHeight } = reactData
|
|
21
21
|
const { elemStore } = internalData
|
|
22
22
|
const { column, targetEl } = filterStore
|
|
23
23
|
if (!column) {
|
|
@@ -39,8 +39,6 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
39
39
|
if (!filterWrapperElem) {
|
|
40
40
|
return $xeTable.$nextTick()
|
|
41
41
|
}
|
|
42
|
-
const filterHeadElem = filterWrapperElem.querySelector<HTMLDivElement>('.vxe-table--filter-header')
|
|
43
|
-
const filterFootElem = filterWrapperElem.querySelector<HTMLDivElement>('.vxe-table--filter-footer')
|
|
44
42
|
|
|
45
43
|
/**
|
|
46
44
|
* 是否显示筛选按钮图标
|
|
@@ -80,9 +78,9 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
80
78
|
} else {
|
|
81
79
|
const filterWidth = filterWrapperElem.offsetWidth
|
|
82
80
|
const centerWidth = targetEl ? filterWidth / 2 : ((filterWidth - column.renderWidth) / 2)
|
|
83
|
-
maxHeight = Math.max(40, tableEl.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14)
|
|
84
81
|
left = btnRect.left - tableRect.left - centerWidth
|
|
85
82
|
top = btnRect.top - tableRect.top + currEl.clientHeight
|
|
83
|
+
maxHeight = Math.max(40, tableEl.clientHeight - top - scrollbarHeight)
|
|
86
84
|
if (left < 1) {
|
|
87
85
|
left = 1
|
|
88
86
|
} else if (left > (tableEl.clientWidth - filterWidth - 1)) {
|
|
@@ -104,7 +102,6 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
104
102
|
if (zIndex) {
|
|
105
103
|
panelStyle.zIndex = zIndex
|
|
106
104
|
}
|
|
107
|
-
filterStore.style = panelStyle
|
|
108
105
|
// 筛选面板是自适应表格高度
|
|
109
106
|
if (compConf ? !compConf.tableFilterAutoHeight : false) {
|
|
110
107
|
maxHeight = 0
|
|
@@ -113,8 +110,8 @@ function updatePopupStyle ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
113
110
|
maxHeight = customMaxHeight > maxHeight ? maxHeight : customMaxHeight
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
|
-
|
|
117
|
-
filterStore.
|
|
113
|
+
panelStyle['--vxe-ui-vxe-table-filter-default-max-height'] = maxHeight ? toCssUnit(maxHeight) : 'none'
|
|
114
|
+
filterStore.style = panelStyle
|
|
118
115
|
}
|
|
119
116
|
handleStyle()
|
|
120
117
|
return $xeTable.$nextTick().then(() => {
|
|
@@ -2,7 +2,7 @@ import { CreateElement, PropType } from 'vue'
|
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import { formatText, isEnableConf } from '../../../ui/src/utils'
|
|
5
|
-
import { getPropClass
|
|
5
|
+
import { getPropClass } from '../../../ui/src/dom'
|
|
6
6
|
import { getSlotVNs } from '../../../ui/src/vn'
|
|
7
7
|
import { createComponentLog } from '../../../ui/src/log'
|
|
8
8
|
|
|
@@ -142,16 +142,20 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
142
142
|
*************************/
|
|
143
143
|
|
|
144
144
|
renderOptions (h: CreateElement, filterRender: VxeColumnPropTypes.FilterRender | null, compConf: VxeGlobalRendererOptions | null) {
|
|
145
|
+
const VxeUIScrollbarComponent = VxeUI.getComponent('VxeScrollbar')
|
|
146
|
+
|
|
145
147
|
const $xeFilterPanel = this
|
|
146
148
|
const props = $xeFilterPanel
|
|
147
149
|
const $xeTable = $xeFilterPanel.$xeTable
|
|
148
150
|
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
149
151
|
|
|
150
152
|
const { filterStore } = props
|
|
151
|
-
const { column
|
|
153
|
+
const { column } = filterStore
|
|
152
154
|
if (!column) {
|
|
153
155
|
return []
|
|
154
156
|
}
|
|
157
|
+
const filterOpts = $xeTable.computeFilterOpts
|
|
158
|
+
const { useScrollbar } = filterOpts
|
|
155
159
|
const { filterMultiple, filters, slots } = column
|
|
156
160
|
const filterOptions = (filters || []) as VxeTableDefines.FilterOption[]
|
|
157
161
|
const filterSlot = slots ? slots.filter : null
|
|
@@ -160,33 +164,52 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
160
164
|
if (filterSlot) {
|
|
161
165
|
return [
|
|
162
166
|
h('div', {
|
|
163
|
-
class: 'vxe-table--filter-template'
|
|
164
|
-
style: maxHeight
|
|
165
|
-
? {
|
|
166
|
-
maxHeight: toCssUnit(maxHeight)
|
|
167
|
-
}
|
|
168
|
-
: {}
|
|
167
|
+
class: 'vxe-table--filter-template'
|
|
169
168
|
}, $xeTable.callSlot(filterSlot, params, h))
|
|
170
169
|
]
|
|
171
170
|
} else if (filterRender && rtFilter) {
|
|
172
171
|
return [
|
|
173
172
|
h('div', {
|
|
174
|
-
class: 'vxe-table--filter-template'
|
|
175
|
-
style: maxHeight
|
|
176
|
-
? {
|
|
177
|
-
maxHeight: toCssUnit(maxHeight)
|
|
178
|
-
}
|
|
179
|
-
: {}
|
|
173
|
+
class: 'vxe-table--filter-template'
|
|
180
174
|
}, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))
|
|
181
175
|
]
|
|
182
176
|
}
|
|
183
177
|
const isAllChecked = filterMultiple ? filterStore.isAllSelected : !filterOptions.some((item) => item._checked)
|
|
184
178
|
const isAllIndeterminate = filterMultiple && filterStore.isIndeterminate
|
|
179
|
+
|
|
180
|
+
const optVNs = filterOptions.map((item: any) => {
|
|
181
|
+
const isChecked = item._checked
|
|
182
|
+
const isIndeterminate = false
|
|
183
|
+
return h('div', {
|
|
184
|
+
class: ['vxe-table--filter-option', {
|
|
185
|
+
'is--checked': isChecked
|
|
186
|
+
}],
|
|
187
|
+
attrs: {
|
|
188
|
+
title: item.label
|
|
189
|
+
},
|
|
190
|
+
on: {
|
|
191
|
+
click: (evnt: MouseEvent) => {
|
|
192
|
+
($xeFilterPanel as any).changeOption(evnt, !item._checked, item)
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, (filterMultiple
|
|
196
|
+
? [
|
|
197
|
+
h('span', {
|
|
198
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
: []).concat([
|
|
202
|
+
h('span', {
|
|
203
|
+
class: 'vxe-checkbox--label'
|
|
204
|
+
}, formatText(item.label, 1))
|
|
205
|
+
]))
|
|
206
|
+
})
|
|
207
|
+
|
|
185
208
|
return [
|
|
186
|
-
h('
|
|
209
|
+
h('div', {
|
|
187
210
|
class: 'vxe-table--filter-header'
|
|
188
211
|
}, [
|
|
189
|
-
h('
|
|
212
|
+
h('div', {
|
|
190
213
|
class: ['vxe-table--filter-option', {
|
|
191
214
|
'is--checked': isAllChecked,
|
|
192
215
|
'is--indeterminate': isAllIndeterminate
|
|
@@ -211,40 +234,19 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
211
234
|
}, getI18n('vxe.table.allFilter'))
|
|
212
235
|
]))
|
|
213
236
|
]),
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
: {}
|
|
221
|
-
}, filterOptions.map((item: any) => {
|
|
222
|
-
const isChecked = item._checked
|
|
223
|
-
const isIndeterminate = false
|
|
224
|
-
return h('li', {
|
|
225
|
-
class: ['vxe-table--filter-option', {
|
|
226
|
-
'is--checked': isChecked
|
|
227
|
-
}],
|
|
228
|
-
attrs: {
|
|
229
|
-
title: item.label
|
|
237
|
+
useScrollbar
|
|
238
|
+
? h(VxeUIScrollbarComponent, {
|
|
239
|
+
class: 'vxe-table--scrollbar-filter-body',
|
|
240
|
+
props: {
|
|
241
|
+
viewClassName: 'vxe-table--scrollbar-filter-body-view'
|
|
230
242
|
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
($xeFilterPanel as any).changeOption(evnt, !item._checked, item)
|
|
234
|
-
}
|
|
243
|
+
scopedSlots: {
|
|
244
|
+
default: () => optVNs
|
|
235
245
|
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
})
|
|
241
|
-
]
|
|
242
|
-
: []).concat([
|
|
243
|
-
h('span', {
|
|
244
|
-
class: 'vxe-checkbox--label'
|
|
245
|
-
}, formatText(item.label, 1))
|
|
246
|
-
]))
|
|
247
|
-
}))
|
|
246
|
+
})
|
|
247
|
+
: h('div', {
|
|
248
|
+
class: 'vxe-table--filter-body'
|
|
249
|
+
}, optVNs)
|
|
248
250
|
]
|
|
249
251
|
},
|
|
250
252
|
renderFooter (h: CreateElement) {
|
|
@@ -3242,6 +3242,7 @@ function handleRecalculateStyle ($xeTable: VxeTableConstructor & VxeTablePrivate
|
|
|
3242
3242
|
if (reFull) {
|
|
3243
3243
|
updateTreeLineStyle($xeTable)
|
|
3244
3244
|
}
|
|
3245
|
+
$xeTable.updateScrollbar()
|
|
3245
3246
|
internalData.rceRunTime = Date.now()
|
|
3246
3247
|
if (reFull) {
|
|
3247
3248
|
return computeScrollLoad($xeTable)
|
|
@@ -10275,8 +10276,15 @@ const tableMethods: any = {
|
|
|
10275
10276
|
*/
|
|
10276
10277
|
updateScrollbar () {
|
|
10277
10278
|
const $xeTable = this
|
|
10278
|
-
|
|
10279
|
-
$xeTable.
|
|
10279
|
+
|
|
10280
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
10281
|
+
if (isVScrollbar) {
|
|
10282
|
+
return $xeTable.$nextTick().then(() => {
|
|
10283
|
+
$xeTable.updateThumbSize()
|
|
10284
|
+
$xeTable.updateThumbOffset()
|
|
10285
|
+
})
|
|
10286
|
+
}
|
|
10287
|
+
return Promise.resolve()
|
|
10280
10288
|
},
|
|
10281
10289
|
/**
|
|
10282
10290
|
* 表头单元格按下事件
|
|
@@ -12820,12 +12828,11 @@ const tableMethods: any = {
|
|
|
12820
12828
|
},
|
|
12821
12829
|
triggerBodyScrollEvent (evnt: Event, fixedType: '' | 'left' | 'right') {
|
|
12822
12830
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
12823
|
-
const props = $xeTable
|
|
12824
12831
|
const reactData = $xeTable as unknown as TableReactData
|
|
12825
12832
|
const internalData = $xeTable as unknown as TableInternalData
|
|
12826
12833
|
|
|
12827
|
-
const { useScrollbar } = props
|
|
12828
12834
|
const { scrollYLoad, scrollXLoad } = reactData
|
|
12835
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
12829
12836
|
const { elemStore, intoRunScroll, lastScrollTop, lastScrollLeft, inWheelScroll, inVirtualScroll, inHeaderScroll, inBodyScroll, scrollRenderType, inFooterScroll } = internalData
|
|
12830
12837
|
if (inWheelScroll || inVirtualScroll || inHeaderScroll || inFooterScroll) {
|
|
12831
12838
|
return
|
|
@@ -12844,7 +12851,7 @@ const tableMethods: any = {
|
|
|
12844
12851
|
if (!bodyScrollElem) {
|
|
12845
12852
|
return
|
|
12846
12853
|
}
|
|
12847
|
-
if (!
|
|
12854
|
+
if (!isVScrollbar) {
|
|
12848
12855
|
if (!xHandleEl) {
|
|
12849
12856
|
return
|
|
12850
12857
|
}
|
|
@@ -33,6 +33,27 @@ const { warnLog, errLog } = createComponentLog('table')
|
|
|
33
33
|
|
|
34
34
|
const { getConfig, getIcon, getI18n, renderer, globalResize, globalEvents, domUtils, globalMixins, renderEmptyElement } = VxeUI
|
|
35
35
|
|
|
36
|
+
function bindScrollbarResize ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
37
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
38
|
+
|
|
39
|
+
const { elemStore } = internalData
|
|
40
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
41
|
+
if (isVScrollbar) {
|
|
42
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
43
|
+
const viewInnerEl = getRefElem(elemStore['main-body-table'])
|
|
44
|
+
const scrollObserver = globalResize.create(() => {
|
|
45
|
+
($xeTable as any).reScrollFlag++
|
|
46
|
+
})
|
|
47
|
+
if (el) {
|
|
48
|
+
scrollObserver.observe(el)
|
|
49
|
+
}
|
|
50
|
+
if (viewInnerEl) {
|
|
51
|
+
scrollObserver.observe(viewInnerEl)
|
|
52
|
+
}
|
|
53
|
+
internalData.scrollObserver = scrollObserver
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
36
57
|
function handleUpdateMergeBodyCells ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, merges: VxeTableDefines.MergeOptions | VxeTableDefines.MergeOptions[]) {
|
|
37
58
|
const internalData = $xeTable as unknown as TableInternalData
|
|
38
59
|
|
|
@@ -564,14 +585,13 @@ function renderNativeBody (h: CreateElement, $xeTable: VxeTableConstructor & Vxe
|
|
|
564
585
|
}
|
|
565
586
|
|
|
566
587
|
function renderVirtualBody (h: CreateElement, $xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
567
|
-
const props = $xeTable
|
|
568
588
|
const reactData = $xeTable as unknown as TableReactData
|
|
569
589
|
const internalData = $xeTable as unknown as TableInternalData
|
|
570
590
|
const $xeGantt = $xeTable.$xeGantt
|
|
571
591
|
const $xeGanttView = internalData.xeGanttView
|
|
572
592
|
|
|
573
|
-
const { useScrollbar } = props
|
|
574
593
|
const { xThumbWidth, yThumbHeight } = reactData
|
|
594
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
575
595
|
const scrollbarOpts = $xeTable.computeScrollbarOpts
|
|
576
596
|
const scrollXAutoHide = $xeTable.computeScrollXAutoHide
|
|
577
597
|
const scrollYAutoHide = $xeTable.computeScrollYAutoHide
|
|
@@ -586,10 +606,10 @@ function renderVirtualBody (h: CreateElement, $xeTable: VxeTableConstructor & Vx
|
|
|
586
606
|
return h('div', {
|
|
587
607
|
key: 'lvb',
|
|
588
608
|
class: ['vxe-table--layout-wrapper', `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
589
|
-
'is--virtual-scrollbar':
|
|
590
|
-
'ov-padding':
|
|
591
|
-
'ov-x--auto-hide':
|
|
592
|
-
'ov-y--auto-hide':
|
|
609
|
+
'is--virtual-scrollbar': isVScrollbar,
|
|
610
|
+
'ov-padding': isVScrollbar && scrollbarOpts.padding,
|
|
611
|
+
'ov-x--auto-hide': isVScrollbar && scrollXAutoHide,
|
|
612
|
+
'ov-y--auto-hide': isVScrollbar && scrollYAutoHide,
|
|
593
613
|
'overflow-y': yThumbHeight,
|
|
594
614
|
'overflow-x': xThumbWidth
|
|
595
615
|
}]
|
|
@@ -1091,8 +1111,8 @@ export default {
|
|
|
1091
1111
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1092
1112
|
const props = $xeTable
|
|
1093
1113
|
|
|
1094
|
-
const
|
|
1095
|
-
return Object.assign({ useScrollbar }, getConfig().tooltip, getConfig().table.tooltipConfig, props.tooltipConfig)
|
|
1114
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
1115
|
+
return Object.assign({ useScrollbar: isVScrollbar }, getConfig().tooltip, getConfig().table.tooltipConfig, props.tooltipConfig)
|
|
1096
1116
|
},
|
|
1097
1117
|
tipConfig () {
|
|
1098
1118
|
return { ...this.tooltipOpts }
|
|
@@ -1162,7 +1182,8 @@ export default {
|
|
|
1162
1182
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
1163
1183
|
const props = $xeTable
|
|
1164
1184
|
|
|
1165
|
-
|
|
1185
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
1186
|
+
return Object.assign({ useScrollbar: isVScrollbar }, getConfig().table.filterConfig, props.filterConfig)
|
|
1166
1187
|
},
|
|
1167
1188
|
computeFloatingFilterOpts () {
|
|
1168
1189
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -1783,40 +1804,44 @@ export default {
|
|
|
1783
1804
|
|
|
1784
1805
|
$xeTable.reLayoutFlag++
|
|
1785
1806
|
},
|
|
1807
|
+
computeIsVScrollbar () {
|
|
1808
|
+
const $xeTable = this
|
|
1809
|
+
|
|
1810
|
+
$xeTable.$nextTick(() => {
|
|
1811
|
+
bindScrollbarResize($xeTable)
|
|
1812
|
+
$xeTable.$nextTick(() => {
|
|
1813
|
+
$xeTable.reLayoutFlag++
|
|
1814
|
+
})
|
|
1815
|
+
})
|
|
1816
|
+
},
|
|
1786
1817
|
computeScrollbarXToTop () {
|
|
1787
1818
|
const $xeTable = this
|
|
1788
1819
|
|
|
1789
|
-
$xeTable.reScrollFlag++
|
|
1790
1820
|
$xeTable.reLayoutFlag++
|
|
1791
1821
|
},
|
|
1792
1822
|
computeScrollbarYToLeft () {
|
|
1793
1823
|
const $xeTable = this
|
|
1794
1824
|
|
|
1795
|
-
$xeTable.reScrollFlag++
|
|
1796
1825
|
$xeTable.reLayoutFlag++
|
|
1797
1826
|
},
|
|
1798
1827
|
computeScrollXVisible () {
|
|
1799
1828
|
const $xeTable = this
|
|
1800
1829
|
|
|
1801
|
-
$xeTable.reScrollFlag++
|
|
1802
1830
|
$xeTable.reLayoutFlag++
|
|
1803
1831
|
},
|
|
1804
1832
|
computeScrollYVisible () {
|
|
1805
1833
|
const $xeTable = this
|
|
1806
1834
|
|
|
1807
|
-
$xeTable.reScrollFlag++
|
|
1808
1835
|
$xeTable.reLayoutFlag++
|
|
1809
1836
|
},
|
|
1810
1837
|
computeScrollXHeight () {
|
|
1811
1838
|
const $xeTable = this
|
|
1812
1839
|
|
|
1813
|
-
$xeTable.reScrollFlag++
|
|
1814
1840
|
$xeTable.reLayoutFlag++
|
|
1815
1841
|
},
|
|
1816
1842
|
computeScrollYWidth () {
|
|
1817
1843
|
const $xeTable = this
|
|
1818
1844
|
|
|
1819
|
-
$xeTable.reScrollFlag++
|
|
1820
1845
|
$xeTable.reLayoutFlag++
|
|
1821
1846
|
},
|
|
1822
1847
|
computeCellHeitht () {
|
|
@@ -1827,18 +1852,15 @@ export default {
|
|
|
1827
1852
|
reLayoutFlag () {
|
|
1828
1853
|
const $xeTable = this
|
|
1829
1854
|
|
|
1830
|
-
$xeTable.$nextTick(() => {
|
|
1855
|
+
$xeTable.$nextTick().then(() => {
|
|
1831
1856
|
$xeTable.recalculate(true)
|
|
1832
1857
|
})
|
|
1833
1858
|
},
|
|
1834
1859
|
reScrollFlag () {
|
|
1835
1860
|
const $xeTable = this
|
|
1836
1861
|
|
|
1837
|
-
$xeTable
|
|
1862
|
+
$xeTable.updateScrollbar().then(() => {
|
|
1838
1863
|
$xeTable.updateScrollbar()
|
|
1839
|
-
$xeTable.$nextTick(() => {
|
|
1840
|
-
$xeTable.updateScrollbar()
|
|
1841
|
-
})
|
|
1842
1864
|
})
|
|
1843
1865
|
},
|
|
1844
1866
|
|
|
@@ -2319,7 +2341,7 @@ export default {
|
|
|
2319
2341
|
}
|
|
2320
2342
|
|
|
2321
2343
|
$xeTable.$nextTick(() => {
|
|
2322
|
-
const {
|
|
2344
|
+
const { autoResize } = props
|
|
2323
2345
|
const { elemStore } = internalData
|
|
2324
2346
|
|
|
2325
2347
|
// 使用已安装的组件,如果未安装则不渲染
|
|
@@ -2327,6 +2349,7 @@ export default {
|
|
|
2327
2349
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip')
|
|
2328
2350
|
|
|
2329
2351
|
const { showOverflow, showHeaderOverflow, showFooterOverflow } = props
|
|
2352
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
2330
2353
|
const tooltipOpts = $xeTable.computeTooltipOpts
|
|
2331
2354
|
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts
|
|
2332
2355
|
const footerTooltipOpts = $xeTable.computeFooterTooltipOpts
|
|
@@ -2368,7 +2391,7 @@ export default {
|
|
|
2368
2391
|
}
|
|
2369
2392
|
|
|
2370
2393
|
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
2371
|
-
if (
|
|
2394
|
+
if (isVScrollbar) {
|
|
2372
2395
|
const viewInnerEl = getRefElem(elemStore['main-body-table'])
|
|
2373
2396
|
const scrollObserver = globalResize.create(() => {
|
|
2374
2397
|
$xeTable.reScrollFlag++
|
|
@@ -2498,9 +2521,10 @@ export default {
|
|
|
2498
2521
|
|
|
2499
2522
|
const { xID } = $xeTable
|
|
2500
2523
|
|
|
2501
|
-
const { loading, stripe,
|
|
2524
|
+
const { loading, stripe, showHeader, height, treeConfig, mouseConfig, showFooter, highlightCell, highlightHoverRow, highlightHoverColumn, editConfig, editRules, importConfig, exportConfig, printConfig } = props
|
|
2502
2525
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore, tooltipStore } = reactData
|
|
2503
2526
|
const { leftList, rightList } = columnStore
|
|
2527
|
+
const isVScrollbar = $xeTable.computeIsVScrollbar
|
|
2504
2528
|
const loadingSlot = slots.loading
|
|
2505
2529
|
const tipSlots = {
|
|
2506
2530
|
header: slots.headerTooltip || slots['header-tooltip'],
|
|
@@ -2546,7 +2570,7 @@ export default {
|
|
|
2546
2570
|
}
|
|
2547
2571
|
return h('div', {
|
|
2548
2572
|
ref: 'refElem',
|
|
2549
|
-
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`,
|
|
2573
|
+
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, isVScrollbar ? 'is--virtual-scrollbar' : 'is--native-scrollbar', `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
2550
2574
|
[`size--${vSize}`]: vSize,
|
|
2551
2575
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
2552
2576
|
'vxe-editable': !!editConfig,
|
|
@@ -2614,7 +2638,7 @@ export default {
|
|
|
2614
2638
|
h('div', {
|
|
2615
2639
|
key: 'tw',
|
|
2616
2640
|
class: 'vxe-table--render-wrapper'
|
|
2617
|
-
},
|
|
2641
|
+
}, isVScrollbar
|
|
2618
2642
|
? [renderVirtualBody(h, $xeTable)]
|
|
2619
2643
|
: (
|
|
2620
2644
|
scrollbarXToTop
|
|
@@ -2805,7 +2829,7 @@ export default {
|
|
|
2805
2829
|
props: {
|
|
2806
2830
|
isArrow: false,
|
|
2807
2831
|
enterable: false,
|
|
2808
|
-
useScrollbar
|
|
2832
|
+
useScrollbar: isVScrollbar
|
|
2809
2833
|
}
|
|
2810
2834
|
})
|
|
2811
2835
|
: renderEmptyElement($xeTable),
|
|
@@ -2877,7 +2901,7 @@ export default {
|
|
|
2877
2901
|
enterable: validTipConfig.enterable,
|
|
2878
2902
|
enterDelay: validTipConfig.enterDelay,
|
|
2879
2903
|
leaveDelay: validTipConfig.leaveDelay,
|
|
2880
|
-
useScrollbar
|
|
2904
|
+
useScrollbar: validTipConfig.useScrollbar
|
|
2881
2905
|
}
|
|
2882
2906
|
})
|
|
2883
2907
|
: renderEmptyElement($xeTable)
|
package/packages/ui/index.ts
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
.vxe-table--filter-wrapper {
|
|
32
32
|
display: none;
|
|
33
33
|
position: absolute;
|
|
34
|
+
flex-direction: column;
|
|
34
35
|
top: 0;
|
|
35
36
|
min-width: 100px;
|
|
36
37
|
font-size: var(--vxe-ui-font-size-default);
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
color: var(--vxe-ui-font-color);
|
|
41
42
|
box-shadow: var(--vxe-ui-base-popup-box-shadow);
|
|
42
43
|
z-index: 15;
|
|
44
|
+
max-height: var(--vxe-ui-vxe-table-filter-default-max-height);
|
|
43
45
|
&:not(.is--multiple) {
|
|
44
46
|
.vxe-table--filter-header,
|
|
45
47
|
.vxe-table--filter-body {
|
|
@@ -47,11 +49,24 @@
|
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
&.is--active {
|
|
50
|
-
display:
|
|
52
|
+
display: flex;
|
|
53
|
+
}
|
|
54
|
+
.vxe-table--filter-body,
|
|
55
|
+
.vxe-table--scrollbar-filter-body {
|
|
56
|
+
overflow: auto;
|
|
57
|
+
flex-grow: 1;
|
|
58
|
+
}
|
|
59
|
+
.vxe-table--scrollbar-filter-body {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
.vxe-table--scrollbar-filter-body-view {
|
|
63
|
+
flex-grow: 1;
|
|
64
|
+
}
|
|
51
65
|
}
|
|
52
66
|
.vxe-table--filter-header,
|
|
53
|
-
.vxe-table--filter-body
|
|
54
|
-
|
|
67
|
+
.vxe-table--filter-body,
|
|
68
|
+
.vxe-table--scrollbar-filter-body {
|
|
69
|
+
.vxe-table--filter-option {
|
|
55
70
|
overflow: hidden;
|
|
56
71
|
text-overflow: ellipsis;
|
|
57
72
|
white-space: nowrap;
|
|
@@ -69,11 +84,12 @@
|
|
|
69
84
|
.vxe-table--filter-header {
|
|
70
85
|
padding-top: 0.2em;
|
|
71
86
|
}
|
|
72
|
-
.vxe-table--filter-body
|
|
73
|
-
|
|
87
|
+
.vxe-table--filter-body,
|
|
88
|
+
.vxe-table--scrollbar-filter-body {
|
|
74
89
|
padding-bottom: 0.2em;
|
|
75
90
|
}
|
|
76
|
-
|
|
91
|
+
.vxe-table--filter-header,
|
|
92
|
+
.vxe-table--filter-body {
|
|
77
93
|
list-style-type: none;
|
|
78
94
|
padding: 0;
|
|
79
95
|
margin: 0;
|
|
@@ -81,12 +97,9 @@
|
|
|
81
97
|
overflow: auto;
|
|
82
98
|
user-select: none;
|
|
83
99
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
padding: 0.25em 0.8em 0.25em 1em;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
100
|
+
.vxe-table--filter-header,
|
|
101
|
+
.vxe-table--filter-footer {
|
|
102
|
+
flex-shrink: 0;
|
|
90
103
|
}
|
|
91
104
|
.vxe-table--filter-footer {
|
|
92
105
|
border-top: 1px solid var(--vxe-ui-base-popup-border-color);
|
|
@@ -116,8 +129,6 @@
|
|
|
116
129
|
@include baseMixin.createCheckboxIcon();
|
|
117
130
|
}
|
|
118
131
|
|
|
119
|
-
|
|
120
|
-
|
|
121
132
|
.vxe-table--filter-wrapper {
|
|
122
133
|
&.size--medium {
|
|
123
134
|
font-size: var(--vxe-ui-font-size-medium);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|