vxe-table 3.13.7 → 3.13.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/grid/src/grid.js +29 -21
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ja-JP.js +2 -2
- 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/filter/panel.js +18 -9
- package/es/table/src/methods.js +29 -22
- package/es/table/src/table.js +2 -0
- 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/grid/src/grid.js +29 -21
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +91 -73
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -2
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -2
- 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/filter/panel.js +20 -20
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/src/methods.js +31 -25
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +2 -0
- 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 +1 -1
- package/packages/grid/src/grid.ts +29 -21
- package/packages/locale/lang/ja-JP.ts +2 -2
- package/packages/table/module/edit/mixin.ts +7 -5
- package/packages/table/module/filter/panel.ts +25 -12
- package/packages/table/src/methods.ts +32 -23
- package/packages/table/src/table.ts +2 -0
- package/styles/components/table.scss +0 -19
- /package/es/{iconfont.1740188839037.ttf → iconfont.1740397933178.ttf} +0 -0
- /package/es/{iconfont.1740188839037.woff → iconfont.1740397933178.woff} +0 -0
- /package/es/{iconfont.1740188839037.woff2 → iconfont.1740397933178.woff2} +0 -0
- /package/lib/{iconfont.1740188839037.ttf → iconfont.1740397933178.ttf} +0 -0
- /package/lib/{iconfont.1740188839037.woff → iconfont.1740397933178.woff} +0 -0
- /package/lib/{iconfont.1740188839037.woff2 → iconfont.1740397933178.woff2} +0 -0
|
@@ -733,7 +733,7 @@ export default {
|
|
|
733
733
|
const { $refs, toolbar, toolbarConfig, toolbarOpts, proxyOpts, tablePage, pagerConfig, editRules, isRespMsg, isActiveMsg, validConfig, pagerOpts } = this
|
|
734
734
|
const { beforeQuery, afterQuery, beforeDelete, afterDelete, beforeSave, afterSave, ajax = {} } = proxyOpts
|
|
735
735
|
const resConfigs = proxyOpts.response || proxyOpts.props || {}
|
|
736
|
-
const $
|
|
736
|
+
const $xeTable = $refs.xTable
|
|
737
737
|
const formData = this.getFormData()
|
|
738
738
|
let button: any
|
|
739
739
|
let code: string
|
|
@@ -799,8 +799,8 @@ export default {
|
|
|
799
799
|
}
|
|
800
800
|
if (isInited) {
|
|
801
801
|
let defaultSort = null
|
|
802
|
-
if ($
|
|
803
|
-
const { sortOpts } = $
|
|
802
|
+
if ($xeTable) {
|
|
803
|
+
const { sortOpts } = $xeTable
|
|
804
804
|
defaultSort = sortOpts.defaultSort
|
|
805
805
|
}
|
|
806
806
|
// 如果使用默认排序
|
|
@@ -816,16 +816,16 @@ export default {
|
|
|
816
816
|
}
|
|
817
817
|
})
|
|
818
818
|
}
|
|
819
|
-
if ($
|
|
820
|
-
filterList = $
|
|
819
|
+
if ($xeTable) {
|
|
820
|
+
filterList = $xeTable.getCheckedFilters()
|
|
821
821
|
}
|
|
822
822
|
} else {
|
|
823
|
-
if ($
|
|
823
|
+
if ($xeTable) {
|
|
824
824
|
if (isReload) {
|
|
825
|
-
$
|
|
825
|
+
$xeTable.clearAll()
|
|
826
826
|
} else {
|
|
827
|
-
sortList = $
|
|
828
|
-
filterList = $
|
|
827
|
+
sortList = $xeTable.getSortColumns()
|
|
828
|
+
filterList = $xeTable.getCheckedFilters()
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
}
|
|
@@ -848,6 +848,7 @@ export default {
|
|
|
848
848
|
const applyArgs = [commitParams].concat(args)
|
|
849
849
|
return Promise.resolve((beforeQuery || ajaxMethods)(...applyArgs))
|
|
850
850
|
.then(rest => {
|
|
851
|
+
let tableData: any[] = []
|
|
851
852
|
this.tableLoading = false
|
|
852
853
|
if (rest) {
|
|
853
854
|
if (pagerConfig && isEnableConf(pagerOpts)) {
|
|
@@ -855,7 +856,7 @@ export default {
|
|
|
855
856
|
const total = (XEUtils.isFunction(totalProp) ? totalProp({ data: rest, $grid: this }) : XEUtils.get(rest, totalProp || 'page.total')) || 0
|
|
856
857
|
tablePage.total = XEUtils.toNumber(total)
|
|
857
858
|
const resultProp = resConfigs.result
|
|
858
|
-
|
|
859
|
+
tableData = (XEUtils.isFunction(resultProp) ? resultProp({ data: rest, $grid: this }) : XEUtils.get(rest, resultProp || 'result')) || []
|
|
859
860
|
// 检验当前页码,不能超出当前最大页数
|
|
860
861
|
const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1)
|
|
861
862
|
if (tablePage.currentPage > pageCount) {
|
|
@@ -863,10 +864,17 @@ export default {
|
|
|
863
864
|
}
|
|
864
865
|
} else {
|
|
865
866
|
const listProp = resConfigs.list
|
|
866
|
-
|
|
867
|
+
tableData = (listProp ? (XEUtils.isFunction(listProp) ? listProp({ data: rest, $grid: this }) : XEUtils.get(rest, listProp)) : rest) || []
|
|
867
868
|
}
|
|
869
|
+
}
|
|
870
|
+
if ($xeTable as any) {
|
|
871
|
+
$xeTable.loadData(tableData)
|
|
868
872
|
} else {
|
|
869
|
-
|
|
873
|
+
$xeTable.$nextTick(() => {
|
|
874
|
+
if ($xeTable) {
|
|
875
|
+
$xeTable.loadData(tableData)
|
|
876
|
+
}
|
|
877
|
+
})
|
|
870
878
|
}
|
|
871
879
|
if (afterQuery) {
|
|
872
880
|
afterQuery(...applyArgs)
|
|
@@ -894,21 +902,21 @@ export default {
|
|
|
894
902
|
const deleteSuccessMethods = ajax.deleteSuccess
|
|
895
903
|
const deleteErrorMethods = ajax.deleteError
|
|
896
904
|
if (ajaxMethods) {
|
|
897
|
-
const selectRecords = $
|
|
898
|
-
const removeRecords = selectRecords.filter((row: any) => !$
|
|
905
|
+
const selectRecords = $xeTable.getCheckboxRecords()
|
|
906
|
+
const removeRecords = selectRecords.filter((row: any) => !$xeTable.isInsertByRow(row))
|
|
899
907
|
const body = { removeRecords }
|
|
900
908
|
const commitParams = { $grid: this, code, button, body, form: formData, options: ajaxMethods }
|
|
901
909
|
const applyArgs = [commitParams].concat(args)
|
|
902
910
|
if (selectRecords.length) {
|
|
903
911
|
return this.handleDeleteRow(code, 'vxe.grid.deleteSelectRecord', () => {
|
|
904
912
|
if (!removeRecords.length) {
|
|
905
|
-
return $
|
|
913
|
+
return $xeTable.remove(selectRecords)
|
|
906
914
|
}
|
|
907
915
|
this.tableLoading = true
|
|
908
916
|
return Promise.resolve((beforeDelete || ajaxMethods)(...applyArgs))
|
|
909
917
|
.then(rest => {
|
|
910
918
|
this.tableLoading = false
|
|
911
|
-
$
|
|
919
|
+
$xeTable.setPendingRow(removeRecords, false)
|
|
912
920
|
if (isRespMsg) {
|
|
913
921
|
// 检测弹窗模块
|
|
914
922
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
@@ -995,7 +1003,7 @@ export default {
|
|
|
995
1003
|
return Promise.resolve((beforeSave || ajaxMethods)(...applyArgs))
|
|
996
1004
|
.then(rest => {
|
|
997
1005
|
this.tableLoading = false
|
|
998
|
-
$
|
|
1006
|
+
$xeTable.clearPendingRow()
|
|
999
1007
|
if (isRespMsg) {
|
|
1000
1008
|
// 检测弹窗模块
|
|
1001
1009
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
@@ -1054,7 +1062,7 @@ export default {
|
|
|
1054
1062
|
const gCommandOpts = commands.get(code)
|
|
1055
1063
|
if (gCommandOpts) {
|
|
1056
1064
|
if (gCommandOpts.commandMethod) {
|
|
1057
|
-
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $
|
|
1065
|
+
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xeTable }, ...args)
|
|
1058
1066
|
} else {
|
|
1059
1067
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
1060
1068
|
errLog('vxe.error.notCommands', [code])
|
|
@@ -1247,16 +1255,16 @@ export default {
|
|
|
1247
1255
|
},
|
|
1248
1256
|
getProxyInfo () {
|
|
1249
1257
|
const { $refs, sortData, proxyConfig } = this
|
|
1250
|
-
const $
|
|
1258
|
+
const $xeTable = $refs.xTable
|
|
1251
1259
|
if (proxyConfig) {
|
|
1252
1260
|
return {
|
|
1253
|
-
data:
|
|
1261
|
+
data: $xeTable ? $xeTable.getFullData() : [],
|
|
1254
1262
|
filter: this.filterData,
|
|
1255
1263
|
form: this.getFormData(),
|
|
1256
1264
|
sort: sortData.length ? sortData[0] : {},
|
|
1257
1265
|
sorts: sortData,
|
|
1258
1266
|
pager: this.tablePage,
|
|
1259
|
-
pendingRecords: $
|
|
1267
|
+
pendingRecords: $xeTable ? $xeTable.getPendingRecords() : []
|
|
1260
1268
|
}
|
|
1261
1269
|
}
|
|
1262
1270
|
return null
|
|
@@ -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}」は同時に使用できません。これによりエラーが発生する可能性があります',
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
119
119
|
button: {
|
|
120
120
|
confirm: 'OK',
|
|
121
121
|
cancel: 'キャンセル',
|
|
122
|
-
clear: '
|
|
122
|
+
clear: 'パージ'
|
|
123
123
|
},
|
|
124
124
|
filter: {
|
|
125
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') {
|
|
@@ -3,6 +3,8 @@ import { formatText, isEnableConf, getClass } from '../../../ui/src/utils'
|
|
|
3
3
|
import { getSlotVNs } from '../../../ui/src/vn'
|
|
4
4
|
import { CreateElement } from 'vue'
|
|
5
5
|
|
|
6
|
+
import type { VxeTableConstructor, VxeTablePrivateMethods, TableInternalData } from '../../../../types'
|
|
7
|
+
|
|
6
8
|
const { getI18n, getIcon, renderer } = VxeUI
|
|
7
9
|
|
|
8
10
|
export default {
|
|
@@ -17,13 +19,16 @@ export default {
|
|
|
17
19
|
}
|
|
18
20
|
} as any,
|
|
19
21
|
render (this: any, h: CreateElement) {
|
|
20
|
-
const $
|
|
22
|
+
const $panel = this
|
|
23
|
+
const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
24
|
+
const tableInternalData = $xeTable as unknown as TableInternalData
|
|
21
25
|
|
|
22
26
|
const { filterStore } = this
|
|
23
|
-
const {
|
|
27
|
+
const { visible, multiple, column } = filterStore
|
|
24
28
|
const filterRender = column ? column.filterRender : null
|
|
25
29
|
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
26
30
|
const filterClassName = compConf ? (compConf.tableFilterClassName || compConf.filterClassName) : ''
|
|
31
|
+
const params = Object.assign({}, tableInternalData._currFilterParams, { $panel, $table: $xeTable })
|
|
27
32
|
const filterOpts = $xeTable.computeFilterOpts
|
|
28
33
|
const { destroyOnClose } = filterOpts
|
|
29
34
|
return h('div', {
|
|
@@ -31,7 +36,7 @@ export default {
|
|
|
31
36
|
'vxe-table--filter-wrapper',
|
|
32
37
|
'filter--prevent-default',
|
|
33
38
|
compConf && compConf.className ? compConf.className : '',
|
|
34
|
-
getClass(filterClassName,
|
|
39
|
+
getClass(filterClassName, params),
|
|
35
40
|
{
|
|
36
41
|
'is--animat': $xeTable.animat,
|
|
37
42
|
'is--multiple': multiple,
|
|
@@ -43,21 +48,27 @@ export default {
|
|
|
43
48
|
},
|
|
44
49
|
methods: {
|
|
45
50
|
renderOptions (h: CreateElement, filterRender: any, compConf: any) {
|
|
46
|
-
const
|
|
47
|
-
const
|
|
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
|
|
48
57
|
const slots = column ? column.slots : null
|
|
58
|
+
const filterSlot = slots ? slots.filter : null
|
|
59
|
+
const params = Object.assign({}, tableInternalData._currFilterParams, { $panel, $table: $xeTable })
|
|
49
60
|
const rtFilter = compConf ? (compConf.renderTableFilter || compConf.renderFilter) : null
|
|
50
|
-
if (
|
|
61
|
+
if (filterSlot) {
|
|
51
62
|
return [
|
|
52
63
|
h('div', {
|
|
53
64
|
class: 'vxe-table--filter-template'
|
|
54
|
-
}, $
|
|
65
|
+
}, $xeTable.callSlot(filterSlot, params, h))
|
|
55
66
|
]
|
|
56
67
|
} else if (rtFilter) {
|
|
57
68
|
return [
|
|
58
69
|
h('div', {
|
|
59
70
|
class: 'vxe-table--filter-template'
|
|
60
|
-
}, getSlotVNs(rtFilter.call($
|
|
71
|
+
}, getSlotVNs(rtFilter.call($xeTable, h, filterRender, params)))
|
|
61
72
|
]
|
|
62
73
|
}
|
|
63
74
|
const isAllChecked = multiple ? filterStore.isAllSelected : !filterStore.options.some((item: any) => item._checked)
|
|
@@ -75,7 +86,7 @@ export default {
|
|
|
75
86
|
title: getI18n(multiple ? 'vxe.table.allTitle' : 'vxe.table.allFilter')
|
|
76
87
|
},
|
|
77
88
|
on: {
|
|
78
|
-
click: (evnt:
|
|
89
|
+
click: (evnt: MouseEvent) => {
|
|
79
90
|
this.changeAllOption(evnt, !filterStore.isAllSelected)
|
|
80
91
|
}
|
|
81
92
|
}
|
|
@@ -109,7 +120,7 @@ export default {
|
|
|
109
120
|
title: item.label
|
|
110
121
|
},
|
|
111
122
|
on: {
|
|
112
|
-
click: (evnt:
|
|
123
|
+
click: (evnt: MouseEvent) => {
|
|
113
124
|
this.changeOption(evnt, !item._checked, item)
|
|
114
125
|
}
|
|
115
126
|
}
|
|
@@ -128,9 +139,11 @@ export default {
|
|
|
128
139
|
]
|
|
129
140
|
},
|
|
130
141
|
renderFooter (h: CreateElement) {
|
|
131
|
-
const
|
|
132
|
-
|
|
142
|
+
const $xeTable = this.$parent as VxeTableConstructor & VxeTablePrivateMethods
|
|
143
|
+
|
|
144
|
+
const { hasCheckOption, filterStore } = this
|
|
133
145
|
const { column, multiple } = filterStore
|
|
146
|
+
const filterOpts = $xeTable.computeFilterOpts
|
|
134
147
|
const filterRender = column.filterRender
|
|
135
148
|
const compConf = isEnableConf(filterRender) ? renderer.get(filterRender.name) : null
|
|
136
149
|
const isDisabled = !hasCheckOption && !filterStore.isAllSelected && !filterStore.isIndeterminate
|
|
@@ -211,7 +211,7 @@ function cacheColumnMap ($xeTable: VxeTableConstructor) {
|
|
|
211
211
|
let hasFixed: VxeColumnPropTypes.Fixed | undefined
|
|
212
212
|
const handleFunc = (column: VxeTableDefines.ColumnInfo, index: number, items: VxeTableDefines.ColumnInfo[], path?: string[], parentColumn?: VxeTableDefines.ColumnInfo) => {
|
|
213
213
|
const { id: colid, field, fixed, type, treeNode } = column
|
|
214
|
-
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0 }
|
|
214
|
+
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0, oLeft: 0 }
|
|
215
215
|
if (field) {
|
|
216
216
|
if (fullColumnFieldData[field]) {
|
|
217
217
|
errLog('vxe.error.colRepet', ['field', field])
|
|
@@ -1641,6 +1641,21 @@ function handleScrollToRowColumn ($xeTable: VxeTableConstructor & VxeTablePrivat
|
|
|
1641
1641
|
return $xeTable.$nextTick()
|
|
1642
1642
|
}
|
|
1643
1643
|
|
|
1644
|
+
const handleRowExpandReserve = ($xeTable: VxeTableConstructor & VxeTablePrivateMethods, row: any, expanded: boolean) => {
|
|
1645
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
1646
|
+
|
|
1647
|
+
const { rowExpandedReserveRowMap } = internalData
|
|
1648
|
+
const expandOpts = $xeTable.computeExpandOpts
|
|
1649
|
+
if (expandOpts.reserve) {
|
|
1650
|
+
const rowid = getRowid($xeTable, row)
|
|
1651
|
+
if (expanded) {
|
|
1652
|
+
rowExpandedReserveRowMap[rowid] = row
|
|
1653
|
+
} else if (rowExpandedReserveRowMap[rowid]) {
|
|
1654
|
+
delete rowExpandedReserveRowMap[rowid]
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1644
1659
|
// 计算可视渲染相关数据
|
|
1645
1660
|
function computeScrollLoad ($xeTable: VxeTableConstructor & VxeTablePrivateMethods) {
|
|
1646
1661
|
const reactData = $xeTable as unknown as TableReactData
|
|
@@ -6067,7 +6082,7 @@ const Methods = {
|
|
|
6067
6082
|
const rowid = getRowid(this, row)
|
|
6068
6083
|
this.clearHoverRow()
|
|
6069
6084
|
if ($el) {
|
|
6070
|
-
XEUtils.arrayEach($el.querySelectorAll(
|
|
6085
|
+
XEUtils.arrayEach($el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`), elem => addClass(elem, 'row--hover'))
|
|
6071
6086
|
}
|
|
6072
6087
|
this.hoverRow = row
|
|
6073
6088
|
},
|
|
@@ -7540,7 +7555,7 @@ const Methods = {
|
|
|
7540
7555
|
})
|
|
7541
7556
|
}
|
|
7542
7557
|
if (reserve) {
|
|
7543
|
-
validRows.forEach((row) =>
|
|
7558
|
+
validRows.forEach((row) => handleRowExpandReserve($xeTable, row, expanded))
|
|
7544
7559
|
}
|
|
7545
7560
|
}
|
|
7546
7561
|
this.rowExpandedMaps = rExpandedMaps
|
|
@@ -7574,36 +7589,30 @@ const Methods = {
|
|
|
7574
7589
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
7575
7590
|
*/
|
|
7576
7591
|
clearRowExpand () {
|
|
7577
|
-
const $xeTable = this
|
|
7592
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7593
|
+
const reactData = $xeTable as unknown as TableReactData
|
|
7594
|
+
const internalData = $xeTable as unknown as TableInternalData
|
|
7578
7595
|
|
|
7579
|
-
const {
|
|
7596
|
+
const { tableFullData } = internalData
|
|
7597
|
+
const expandOpts = $xeTable.computeExpandOpts
|
|
7580
7598
|
const { reserve } = expandOpts
|
|
7581
|
-
const expList =
|
|
7582
|
-
|
|
7599
|
+
const expList = $xeTable.getRowExpandRecords()
|
|
7600
|
+
reactData.rowExpandedMaps = {}
|
|
7583
7601
|
if (reserve) {
|
|
7584
|
-
tableFullData.forEach((row
|
|
7602
|
+
tableFullData.forEach((row) => handleRowExpandReserve($xeTable, row, false))
|
|
7585
7603
|
}
|
|
7586
|
-
return
|
|
7604
|
+
return $xeTable.$nextTick().then(() => {
|
|
7587
7605
|
if (expList.length) {
|
|
7588
|
-
|
|
7606
|
+
return $xeTable.recalculate()
|
|
7589
7607
|
}
|
|
7590
|
-
}).then(() =>
|
|
7608
|
+
}).then(() => {
|
|
7609
|
+
return $xeTable.updateCellAreas()
|
|
7610
|
+
})
|
|
7591
7611
|
},
|
|
7592
7612
|
clearRowExpandReserve () {
|
|
7593
7613
|
this.rowExpandedReserveRowMap = {}
|
|
7594
7614
|
return this.$nextTick()
|
|
7595
7615
|
},
|
|
7596
|
-
handleRowExpandReserve (row: any, expanded: any) {
|
|
7597
|
-
const { rowExpandedReserveRowMap, expandOpts } = this
|
|
7598
|
-
if (expandOpts.reserve) {
|
|
7599
|
-
const rowid = getRowid(this, row)
|
|
7600
|
-
if (expanded) {
|
|
7601
|
-
rowExpandedReserveRowMap[rowid] = row
|
|
7602
|
-
} else if (rowExpandedReserveRowMap[rowid]) {
|
|
7603
|
-
delete rowExpandedReserveRowMap[rowid]
|
|
7604
|
-
}
|
|
7605
|
-
}
|
|
7606
|
-
},
|
|
7607
7616
|
getRowExpandRecords () {
|
|
7608
7617
|
const rest: any[] = []
|
|
7609
7618
|
XEUtils.each(this.rowExpandedMaps, item => {
|
|
@@ -7639,7 +7648,7 @@ const Methods = {
|
|
|
7639
7648
|
* @param {Row} row 行对象
|
|
7640
7649
|
*/
|
|
7641
7650
|
isTreeExpandLoaded (row: any) {
|
|
7642
|
-
const $xeTable = this
|
|
7651
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
7643
7652
|
|
|
7644
7653
|
const { fullAllDataRowIdData } = this
|
|
7645
7654
|
const rowRest = fullAllDataRowIdData[getRowid($xeTable, row)]
|
|
@@ -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
|