vxe-table 3.13.6 → 3.13.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.
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -1
- package/es/locale/lang/de-DE.js +2 -1
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/id-ID.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +3 -2
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/edit/mixin.js +7 -5
- package/es/table/module/export/mixin.js +2 -2
- package/es/table/module/filter/mixin.js +87 -79
- package/es/table/module/menu/mixin.js +2 -1
- package/es/table/src/methods.js +8 -6
- package/es/table/src/table.js +1 -1
- package/es/table/style.css +0 -17
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +0 -17
- 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 +128 -118
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +2 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +3 -2
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +3 -2
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/edit/mixin.js +7 -5
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +2 -2
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/mixin.js +105 -99
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -1
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/methods.js +7 -7
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +0 -17
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- 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 +0 -17
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +2 -1
- package/packages/locale/lang/de-DE.ts +2 -1
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/id-ID.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +3 -2
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/module/edit/mixin.ts +7 -5
- package/packages/table/module/export/mixin.ts +2 -2
- package/packages/table/module/filter/mixin.ts +85 -77
- package/packages/table/module/menu/mixin.ts +2 -1
- package/packages/table/src/methods.ts +8 -6
- package/packages/table/src/table.ts +1 -1
- package/styles/components/table.scss +0 -19
- /package/es/{iconfont.1740103990490.ttf → iconfont.1740359276306.ttf} +0 -0
- /package/es/{iconfont.1740103990490.woff → iconfont.1740359276306.woff} +0 -0
- /package/es/{iconfont.1740103990490.woff2 → iconfont.1740359276306.woff2} +0 -0
- /package/lib/{iconfont.1740103990490.ttf → iconfont.1740359276306.ttf} +0 -0
- /package/lib/{iconfont.1740103990490.woff → iconfont.1740359276306.woff} +0 -0
- /package/lib/{iconfont.1740103990490.woff2 → iconfont.1740359276306.woff2} +0 -0
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
text: 'Loading...'
|
|
11
11
|
},
|
|
12
12
|
error: {
|
|
13
|
-
downErr: '
|
|
13
|
+
downErr: 'ダウンロードに失敗しました',
|
|
14
14
|
errLargeData: '当绑定的数据量过大时,应该请使用 {0},否则可能会出现卡顿',
|
|
15
15
|
groupFixed: 'ヘッダー結合を使用する場合、固定列はグループで設定しなければなりません',
|
|
16
16
|
groupMouseRange: 'ヘッダー結合と「{0}」は同時に使用できません。これによりエラーが発生する可能性があります',
|
|
@@ -118,7 +118,8 @@ export default {
|
|
|
118
118
|
},
|
|
119
119
|
button: {
|
|
120
120
|
confirm: 'OK',
|
|
121
|
-
cancel: 'キャンセル'
|
|
121
|
+
cancel: 'キャンセル',
|
|
122
|
+
clear: 'パージ'
|
|
122
123
|
},
|
|
123
124
|
filter: {
|
|
124
125
|
search: '検索'
|
|
@@ -320,7 +320,7 @@ function handleClearEdit ($xeTable: VxeTableConstructor & VxeTablePrivateMethods
|
|
|
320
320
|
return $xeTable.$nextTick().then(() => $xeTable.updateCellAreas())
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
-
function handleEditActive ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, params: any, evnt: Event | null, isFocus: boolean) {
|
|
323
|
+
function handleEditActive ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, params: any, evnt: Event | null, isFocus: boolean, isPos: boolean) {
|
|
324
324
|
const props = $xeTable
|
|
325
325
|
const reactData = $xeTable as unknown as TableReactData
|
|
326
326
|
|
|
@@ -413,7 +413,7 @@ function handleEditActive ($xeTable: VxeTableConstructor & VxeTablePrivateMethod
|
|
|
413
413
|
column.renderHeight = cell.offsetHeight
|
|
414
414
|
actived.args = params
|
|
415
415
|
actived.column = column
|
|
416
|
-
if (
|
|
416
|
+
if (isPos) {
|
|
417
417
|
setTimeout(() => {
|
|
418
418
|
$xeTable.handleFocus(params, evnt)
|
|
419
419
|
})
|
|
@@ -444,7 +444,7 @@ function handleEditCell ($xeTable: VxeTableConstructor & VxeTablePrivateMethods,
|
|
|
444
444
|
columnIndex: $xeTable.getColumnIndex(column),
|
|
445
445
|
cell,
|
|
446
446
|
$table: $xeTable
|
|
447
|
-
}, null,
|
|
447
|
+
}, null, isPos, isPos)
|
|
448
448
|
internalData._lastCallTime = Date.now()
|
|
449
449
|
}
|
|
450
450
|
return $xeTable.$nextTick()
|
|
@@ -717,7 +717,7 @@ export default {
|
|
|
717
717
|
handleEdit (params: any, evnt: any) {
|
|
718
718
|
const $xeTable = this
|
|
719
719
|
|
|
720
|
-
return handleEditActive($xeTable, params, evnt, true)
|
|
720
|
+
return handleEditActive($xeTable, params, evnt, true, true)
|
|
721
721
|
},
|
|
722
722
|
/**
|
|
723
723
|
* @deprecated
|
|
@@ -860,10 +860,12 @@ export default {
|
|
|
860
860
|
const $xeTable = this
|
|
861
861
|
|
|
862
862
|
let column = XEUtils.find(this.visibleColumn, column => isEnableConf(column.editRender))
|
|
863
|
+
let isPos = false
|
|
863
864
|
if (fieldOrColumn) {
|
|
865
|
+
isPos = true
|
|
864
866
|
column = XEUtils.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn
|
|
865
867
|
}
|
|
866
|
-
return handleEditCell($xeTable, row, column,
|
|
868
|
+
return handleEditCell($xeTable, row, column, isPos)
|
|
867
869
|
},
|
|
868
870
|
_setActiveCell (row: any, fieldOrColumn: any) {
|
|
869
871
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
@@ -1095,7 +1095,7 @@ function handleExportAndPrint ($xeTable: VxeTableConstructor, options: VxeTableP
|
|
|
1095
1095
|
isMerge: hasMerge,
|
|
1096
1096
|
useStyle: true,
|
|
1097
1097
|
current: 'current',
|
|
1098
|
-
modes:
|
|
1098
|
+
modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ['all'] : []).concat(['current', 'selected', 'empty'])
|
|
1099
1099
|
}, options)
|
|
1100
1100
|
const types = defOpts.types || XEUtils.keys(exportOpts._typeMaps)
|
|
1101
1101
|
const modes = defOpts.modes || []
|
|
@@ -1273,7 +1273,7 @@ export default {
|
|
|
1273
1273
|
isMerge: hasMerge,
|
|
1274
1274
|
useStyle: true,
|
|
1275
1275
|
current: 'current',
|
|
1276
|
-
modes:
|
|
1276
|
+
modes: (proxyOpts.ajax && proxyOpts.ajax.queryAll ? ['all'] : []).concat(['current', 'selected', 'empty']),
|
|
1277
1277
|
download: true,
|
|
1278
1278
|
type: 'csv'
|
|
1279
1279
|
// filename: '',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
|
-
import { toFilters, handleFieldOrColumn } from '../../src/util'
|
|
3
|
+
import { toFilters, handleFieldOrColumn, getRefElem } from '../../src/util'
|
|
4
4
|
import { getDomNode, triggerEvent } from '../../../ui/src/dom'
|
|
5
5
|
import { isEnableConf } from '../../../ui/src/utils'
|
|
6
6
|
|
|
7
|
-
import type { VxeTableDefines } from '../../../../types'
|
|
7
|
+
import type { VxeTableConstructor, VxeTableDefines, TableReactData, TableInternalData } from '../../../../types'
|
|
8
8
|
|
|
9
9
|
const { renderer } = VxeUI
|
|
10
10
|
|
|
@@ -61,89 +61,97 @@ export default {
|
|
|
61
61
|
* @param {Object} params 参数
|
|
62
62
|
*/
|
|
63
63
|
triggerFilterEvent (evnt: any, column: any, params: any) {
|
|
64
|
+
const $xeTable = this as VxeTableConstructor
|
|
65
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
66
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
67
|
+
|
|
64
68
|
const { filterStore } = this
|
|
65
69
|
if (filterStore.column === column && filterStore.visible) {
|
|
66
70
|
filterStore.visible = false
|
|
67
71
|
} else {
|
|
68
|
-
const {
|
|
69
|
-
const {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
const { initStore, filterStore } = reactData
|
|
73
|
+
const { elemStore } = internalData
|
|
74
|
+
if (filterStore.column === column && filterStore.visible) {
|
|
75
|
+
filterStore.visible = false
|
|
76
|
+
} else {
|
|
77
|
+
const { clientY, pageX } = evnt
|
|
78
|
+
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
79
|
+
const tableRect = el.getBoundingClientRect()
|
|
80
|
+
const targetElem = evnt.target as HTMLDivElement
|
|
81
|
+
const { visibleWidth } = getDomNode()
|
|
82
|
+
const { filters, filterMultiple, filterRender } = column
|
|
83
|
+
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
84
|
+
const frMethod = column.filterRecoverMethod || (compConf ? (compConf.tableFilterRecoverMethod || compConf.filterRecoverMethod) : null)
|
|
85
|
+
internalData._currFilterParams = params
|
|
86
|
+
Object.assign(filterStore, {
|
|
87
|
+
multiple: filterMultiple,
|
|
88
|
+
options: filters,
|
|
89
|
+
column,
|
|
90
|
+
style: null
|
|
91
|
+
})
|
|
92
|
+
// 复原状态
|
|
93
|
+
filterStore.options.forEach((option: any) => {
|
|
94
|
+
const { _checked, checked } = option
|
|
95
|
+
option._checked = checked
|
|
96
|
+
if (!checked && _checked !== checked) {
|
|
97
|
+
if (frMethod) {
|
|
98
|
+
frMethod({ option, column, $table: $xeTable })
|
|
99
|
+
}
|
|
88
100
|
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const headerElem = refTableHeader ? refTableHeader.$el : null
|
|
98
|
-
if (!bodyElem) {
|
|
99
|
-
return
|
|
100
|
-
}
|
|
101
|
-
const filterWrapperElem = filterWrapper.$el
|
|
102
|
-
if (!filterWrapperElem) {
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
const filterWidth = filterWrapperElem.offsetWidth
|
|
106
|
-
const filterHeight = filterWrapperElem.offsetHeight
|
|
107
|
-
const filterHeadElem = filterWrapperElem.querySelector('.vxe-table--filter-header')
|
|
108
|
-
const filterFootElem = filterWrapperElem.querySelector('.vxe-table--filter-footer')
|
|
109
|
-
const centerWidth = filterWidth / 2
|
|
110
|
-
const minMargin = 10
|
|
111
|
-
const maxLeft = bodyElem.clientWidth - filterWidth - minMargin
|
|
112
|
-
let left, right
|
|
113
|
-
const style: any = {
|
|
114
|
-
top: `${targetElem.offsetTop + targetElem.offsetParent.offsetTop + targetElem.offsetHeight}px`
|
|
115
|
-
}
|
|
116
|
-
// 判断面板不能大于表格高度
|
|
117
|
-
let maxHeight = null
|
|
118
|
-
const bodyHeight = bodyElem.clientHeight - (headerElem ? headerElem.clientHeight / 2 : 0)
|
|
119
|
-
if (filterHeight >= bodyHeight) {
|
|
120
|
-
maxHeight = Math.max(40, bodyHeight - (filterFootElem ? filterFootElem.offsetHeight : 0) - (filterHeadElem ? filterHeadElem.offsetHeight : 0))
|
|
121
|
-
}
|
|
122
|
-
if (column.fixed === 'left') {
|
|
123
|
-
left = targetElem.offsetLeft + targetElem.offsetParent.offsetLeft - centerWidth
|
|
124
|
-
} else if (column.fixed === 'right') {
|
|
125
|
-
right = (targetElem.offsetParent.offsetWidth - targetElem.offsetLeft) + (targetElem.offsetParent.offsetParent.offsetWidth - targetElem.offsetParent.offsetLeft) - column.renderWidth - centerWidth
|
|
126
|
-
} else {
|
|
127
|
-
left = targetElem.offsetLeft + targetElem.offsetParent.offsetLeft - centerWidth - bodyElem.scrollLeft
|
|
128
|
-
}
|
|
129
|
-
if (left) {
|
|
130
|
-
const overflowWidth = (pageX + filterWidth - centerWidth + minMargin) - visibleWidth
|
|
131
|
-
if (overflowWidth > 0) {
|
|
132
|
-
left -= overflowWidth
|
|
101
|
+
})
|
|
102
|
+
this.checkFilterOptions()
|
|
103
|
+
filterStore.visible = true
|
|
104
|
+
initStore.filter = true
|
|
105
|
+
$xeTable.$nextTick(() => {
|
|
106
|
+
const headerScrollElem = getRefElem(elemStore['main-header-scroll'])
|
|
107
|
+
if (!headerScrollElem) {
|
|
108
|
+
return
|
|
133
109
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
right += overflowWidth
|
|
110
|
+
const tableFilter = $xeTable.$refs.refTableFilter
|
|
111
|
+
const filterWrapperElem = tableFilter ? (tableFilter as any).$el as HTMLDivElement : null
|
|
112
|
+
if (!filterWrapperElem) {
|
|
113
|
+
return
|
|
139
114
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
115
|
+
const filterWidth = filterWrapperElem.offsetWidth
|
|
116
|
+
const filterHeadElem = filterWrapperElem.querySelector<HTMLDivElement>('.vxe-table--filter-header')
|
|
117
|
+
const filterFootElem = filterWrapperElem.querySelector<HTMLDivElement>('.vxe-table--filter-footer')
|
|
118
|
+
const centerWidth = filterWidth / 2
|
|
119
|
+
const minMargin = 10
|
|
120
|
+
const maxLeft = el.clientWidth - filterWidth - minMargin
|
|
121
|
+
let left, right
|
|
122
|
+
const thEl = targetElem.offsetParent as HTMLTableCellElement
|
|
123
|
+
const trEl = thEl.offsetParent as HTMLTableCellElement
|
|
124
|
+
const style: any = {
|
|
125
|
+
top: `${targetElem.offsetTop + thEl.offsetTop + targetElem.offsetHeight}px`
|
|
126
|
+
}
|
|
127
|
+
// 判断面板不能大于表格高度
|
|
128
|
+
const maxHeight = Math.max(40, el.clientHeight - (clientY - tableRect.y) - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14)
|
|
129
|
+
if (column.fixed === 'left') {
|
|
130
|
+
left = targetElem.offsetLeft + thEl.offsetLeft - centerWidth
|
|
131
|
+
} else if (column.fixed === 'right') {
|
|
132
|
+
right = (thEl.offsetWidth - targetElem.offsetLeft) + (trEl.offsetWidth - trEl.offsetLeft) - column.renderWidth - centerWidth
|
|
133
|
+
} else {
|
|
134
|
+
left = targetElem.offsetLeft + thEl.offsetLeft - centerWidth - headerScrollElem.scrollLeft
|
|
135
|
+
}
|
|
136
|
+
if (left) {
|
|
137
|
+
const overflowWidth = (pageX + filterWidth - centerWidth + minMargin) - visibleWidth
|
|
138
|
+
if (overflowWidth > 0) {
|
|
139
|
+
left -= overflowWidth
|
|
140
|
+
}
|
|
141
|
+
style.left = `${Math.min(maxLeft, Math.max(minMargin, left))}px`
|
|
142
|
+
} else if (right) {
|
|
143
|
+
const overflowWidth = (pageX + filterWidth - centerWidth + minMargin) - visibleWidth
|
|
144
|
+
if (overflowWidth > 0) {
|
|
145
|
+
right += overflowWidth
|
|
146
|
+
}
|
|
147
|
+
style.right = `${Math.max(minMargin, right)}px`
|
|
148
|
+
}
|
|
149
|
+
filterStore.style = style
|
|
150
|
+
filterStore.maxHeight = maxHeight
|
|
151
|
+
})
|
|
152
|
+
}
|
|
153
|
+
$xeTable.dispatchEvent('filter-visible', { column, field: column.field, property: column.field, filterList: $xeTable.getCheckedFilters(), visible: filterStore.visible }, evnt)
|
|
145
154
|
}
|
|
146
|
-
this.emitEvent('filter-visible', { column, field: column.field, property: column.field, filterList: this.getCheckedFilters(), visible: filterStore.visible }, evnt)
|
|
147
155
|
},
|
|
148
156
|
handleFilterConfirmFilter (evnt: Event | null) {
|
|
149
157
|
const $xeTable = this
|
|
@@ -60,6 +60,7 @@ export default {
|
|
|
60
60
|
|
|
61
61
|
const { $refs, tId, editStore, menuConfig, contextMenu, ctxMenuStore, ctxMenuOpts, mouseConfig, mouseOpts } = this
|
|
62
62
|
const { selected } = editStore
|
|
63
|
+
const tableFilter = $xeTable.$refs.refTableFilter
|
|
63
64
|
const layoutList = ['header', 'body', 'footer']
|
|
64
65
|
if (isEnableConf(menuConfig) || contextMenu) {
|
|
65
66
|
if (ctxMenuStore.visible && $refs.refTableMenu && getEventTargetNode(evnt, $refs.refTableMenu.$el).flag) {
|
|
@@ -128,7 +129,7 @@ export default {
|
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
if (
|
|
132
|
+
if (tableFilter && !getEventTargetNode(evnt, tableFilter.$el).flag) {
|
|
132
133
|
this.closeFilter()
|
|
133
134
|
}
|
|
134
135
|
this.closeMenu()
|
|
@@ -4643,12 +4643,14 @@ const Methods = {
|
|
|
4643
4643
|
handleGlobalMousedownEvent (evnt: any) {
|
|
4644
4644
|
const { $el, $refs, $xegrid, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this
|
|
4645
4645
|
const { actived } = editStore
|
|
4646
|
-
const {
|
|
4646
|
+
const { customWrapper, refValidTooltip } = $refs
|
|
4647
|
+
const tableFilter = $refs.refTableFilter
|
|
4648
|
+
const tableMenu = $refs.refTableMenu
|
|
4647
4649
|
// 筛选
|
|
4648
|
-
if (
|
|
4650
|
+
if (tableFilter) {
|
|
4649
4651
|
if (getEventTargetNode(evnt, $el, 'vxe-cell--filter').flag) {
|
|
4650
4652
|
// 如果点击了筛选按钮
|
|
4651
|
-
} else if (getEventTargetNode(evnt,
|
|
4653
|
+
} else if (getEventTargetNode(evnt, tableFilter.$el).flag) {
|
|
4652
4654
|
// 如果点击筛选容器
|
|
4653
4655
|
} else {
|
|
4654
4656
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
@@ -4725,7 +4727,7 @@ const Methods = {
|
|
|
4725
4727
|
}
|
|
4726
4728
|
}
|
|
4727
4729
|
} else if (mouseConfig) {
|
|
4728
|
-
if (!getEventTargetNode(evnt, $el).flag && !($xegrid && getEventTargetNode(evnt, $xegrid.$el).flag) && !(
|
|
4730
|
+
if (!getEventTargetNode(evnt, $el).flag && !($xegrid && getEventTargetNode(evnt, $xegrid.$el).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.$el).flag) && !($toolbar && getEventTargetNode(evnt, $toolbar.$el).flag)) {
|
|
4729
4731
|
if (this.clearSelected) {
|
|
4730
4732
|
this.clearSelected()
|
|
4731
4733
|
}
|
|
@@ -4744,7 +4746,7 @@ const Methods = {
|
|
|
4744
4746
|
}
|
|
4745
4747
|
}
|
|
4746
4748
|
// 如果配置了快捷菜单且,点击了其他地方则关闭
|
|
4747
|
-
if (ctxMenuStore.visible &&
|
|
4749
|
+
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
4748
4750
|
this.closeMenu()
|
|
4749
4751
|
}
|
|
4750
4752
|
const isActivated = getEventTargetNode(evnt, ($xegrid || this).$el).flag
|
|
@@ -6065,7 +6067,7 @@ const Methods = {
|
|
|
6065
6067
|
const rowid = getRowid(this, row)
|
|
6066
6068
|
this.clearHoverRow()
|
|
6067
6069
|
if ($el) {
|
|
6068
|
-
XEUtils.arrayEach($el.querySelectorAll(
|
|
6070
|
+
XEUtils.arrayEach($el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`), elem => addClass(elem, 'row--hover'))
|
|
6069
6071
|
}
|
|
6070
6072
|
this.hoverRow = row
|
|
6071
6073
|
},
|
|
@@ -648,15 +648,6 @@
|
|
|
648
648
|
.vxe-table {
|
|
649
649
|
.vxe-table--header-wrapper {
|
|
650
650
|
color: var(--vxe-ui-table-header-font-color);
|
|
651
|
-
&::after {
|
|
652
|
-
content: "";
|
|
653
|
-
position: absolute;
|
|
654
|
-
left: 0;
|
|
655
|
-
bottom: 0;
|
|
656
|
-
height: 0;
|
|
657
|
-
width: 100%;
|
|
658
|
-
border-bottom: var(--vxe-ui-table-border-width) solid var(--vxe-ui-table-border-color);
|
|
659
|
-
}
|
|
660
651
|
}
|
|
661
652
|
/*排序*/
|
|
662
653
|
.vxe-cell--sort {
|
|
@@ -993,11 +984,6 @@
|
|
|
993
984
|
}
|
|
994
985
|
}
|
|
995
986
|
}
|
|
996
|
-
&.header-cell--area {
|
|
997
|
-
.vxe-table--header-wrapper {
|
|
998
|
-
user-select: none;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
987
|
&.body-cell--area {
|
|
1002
988
|
.vxe-table--body-wrapper {
|
|
1003
989
|
user-select: none;
|
|
@@ -1249,11 +1235,6 @@
|
|
|
1249
1235
|
.vxe-table--border-line {
|
|
1250
1236
|
display: none;
|
|
1251
1237
|
}
|
|
1252
|
-
.vxe-table--header-wrapper {
|
|
1253
|
-
&::after {
|
|
1254
|
-
display: none;
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
1238
|
}
|
|
1258
1239
|
|
|
1259
1240
|
&.size--medium {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|