vxe-table 4.8.16 → 4.9.1
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/README.en.md +1 -1
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/es/locale/lang/en-US.js +1 -0
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +4 -0
- package/es/table/module/edit/hook.js +53 -34
- package/es/table/module/filter/hook.js +2 -3
- package/es/table/module/keyboard/hook.js +2 -2
- package/es/table/src/body.js +31 -24
- package/es/table/src/cell.js +99 -59
- package/es/table/src/emits.js +3 -0
- package/es/table/src/footer.js +177 -147
- package/es/table/src/header.js +144 -107
- package/es/table/src/props.js +5 -1
- package/es/table/src/table.js +346 -108
- package/es/table/src/util.js +9 -0
- package/es/table/style.css +33 -20
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +9 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +33 -20
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +1035 -573
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +4 -0
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/edit/hook.js +63 -42
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/filter/hook.js +1 -2
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +2 -2
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/body.js +34 -21
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +110 -51
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/footer.js +222 -183
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +188 -150
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +5 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +380 -110
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +10 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +33 -20
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +9 -4
- 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 +33 -20
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/locale/lang/en-US.ts +1 -0
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/custom/hook.ts +4 -0
- package/packages/table/module/edit/hook.ts +54 -34
- package/packages/table/module/filter/hook.ts +2 -3
- package/packages/table/module/keyboard/hook.ts +2 -2
- package/packages/table/src/body.ts +46 -31
- package/packages/table/src/cell.ts +140 -92
- package/packages/table/src/emits.ts +3 -0
- package/packages/table/src/footer.ts +189 -152
- package/packages/table/src/header.ts +157 -116
- package/packages/table/src/props.ts +5 -1
- package/packages/table/src/table.ts +358 -109
- package/packages/table/src/util.ts +10 -0
- package/packages/ui/index.ts +8 -3
- package/styles/components/table.scss +42 -35
- /package/es/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
- /package/es/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
- /package/es/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
- /package/lib/{iconfont.1731633504443.ttf → iconfont.1731937248477.ttf} +0 -0
- /package/lib/{iconfont.1731633504443.woff → iconfont.1731937248477.woff} +0 -0
- /package/lib/{iconfont.1731633504443.woff2 → iconfont.1731937248477.woff2} +0 -0
|
@@ -308,6 +308,7 @@ export default {
|
|
|
308
308
|
fileTypeHint: 'Support {0} file types',
|
|
309
309
|
fileSizeHint: 'Single file size does not exceed {0}',
|
|
310
310
|
fileCountHint: 'Up to {0} file can be uploaded',
|
|
311
|
+
uploadTypeErr: '文件类型不匹配!',
|
|
311
312
|
overCountErr: 'You can only choose {0} file!',
|
|
312
313
|
overCountExtraErr: 'It has exceeded the maximum number {0}, and more than {0} file will be ignored!超出最大数量 1 个,超出的 1 个文件将被忽略!',
|
|
313
314
|
overSizeErr: 'The size of the file is not more than {0}}!',
|
|
@@ -308,6 +308,7 @@ export default {
|
|
|
308
308
|
fileTypeHint: 'Поддерживаемые типы файлов: {0}',
|
|
309
309
|
fileSizeHint: 'Размер одного файла не превышает {0}',
|
|
310
310
|
fileCountHint: 'Можно загрузить до {0} файлов.',
|
|
311
|
+
uploadTypeErr: '文件类型不匹配!',
|
|
311
312
|
overCountErr: 'Можно выбрать только {0} файлов!',
|
|
312
313
|
overCountExtraErr: 'Превышено максимальное количество файлов ({0}). Лишние файлы ({1}) будут проигнорированы!',
|
|
313
314
|
overSizeErr: 'Максимальный размер файла не может превышать {0}!',
|
|
@@ -308,6 +308,7 @@ export default {
|
|
|
308
308
|
fileTypeHint: '支持 {0} 文件类型',
|
|
309
309
|
fileSizeHint: '单个文件大小不超过{0}',
|
|
310
310
|
fileCountHint: '最多可上传{0}个文件',
|
|
311
|
+
uploadTypeErr: '文件类型不匹配!',
|
|
311
312
|
overCountErr: '最多只能选择{0}个文件!',
|
|
312
313
|
overCountExtraErr: '已超出最大数量{0}个,超出的{1}个文件将被忽略!',
|
|
313
314
|
overSizeErr: '文件大小最大不能超过{0}!',
|
|
@@ -308,6 +308,7 @@ export default {
|
|
|
308
308
|
fileTypeHint: '支持 {0} 文件类型',
|
|
309
309
|
fileSizeHint: '单个文件大小不超过{0}',
|
|
310
310
|
fileCountHint: '最多可上传{0}个文件',
|
|
311
|
+
uploadTypeErr: '文件类型不匹配!',
|
|
311
312
|
overCountErr: '最多只能选择{0}个文件!',
|
|
312
313
|
overCountExtraErr: '已超出最大数量{0}个,超出的{1}个文件将被忽略!',
|
|
313
314
|
overSizeErr: '文件大小最大不能超过{0}!',
|
|
@@ -308,6 +308,7 @@ export default {
|
|
|
308
308
|
fileTypeHint: '支援 {0} 文件類型',
|
|
309
309
|
fileSizeHint: '單一檔案大小不超過{0}',
|
|
310
310
|
fileCountHint: '最多可上傳{0}個文件',
|
|
311
|
+
uploadTypeErr: '文件类型不匹配!',
|
|
311
312
|
overCountErr: '最多只能選擇{0}個檔案!',
|
|
312
313
|
overCountExtraErr: '已超出最大數量{0}個,超出的{1}個檔案將被忽略!',
|
|
313
314
|
overSizeErr: '檔案大小最大不能超過{0}!',
|
|
@@ -308,6 +308,7 @@ export default {
|
|
|
308
308
|
fileTypeHint: '支持 {0} 文件类型',
|
|
309
309
|
fileSizeHint: '单个文件大小不超过{0}',
|
|
310
310
|
fileCountHint: '最多可上传{0}个文件',
|
|
311
|
+
uploadTypeErr: '文件类型不匹配!',
|
|
311
312
|
overCountErr: '最多只能选择{0}个文件!',
|
|
312
313
|
overCountExtraErr: '已超出最大数量{0}个,超出的{1}个文件将被忽略!',
|
|
313
314
|
overSizeErr: '文件大小最大不能超过{0}!',
|
|
@@ -256,6 +256,48 @@ hooks.add('tableEditModule', {
|
|
|
256
256
|
})
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
+
const handleClearEdit = (evnt: Event | null, targetRow?: any) => {
|
|
260
|
+
const { mouseConfig } = props
|
|
261
|
+
const { editStore } = reactData
|
|
262
|
+
const { actived, focused } = editStore
|
|
263
|
+
const { row, column } = actived
|
|
264
|
+
const validOpts = computeValidOpts.value
|
|
265
|
+
const mouseOpts = computeMouseOpts.value
|
|
266
|
+
if (row || column) {
|
|
267
|
+
if (targetRow && getRowid($xeTable, targetRow) !== getRowid($xeTable, row)) {
|
|
268
|
+
return nextTick()
|
|
269
|
+
}
|
|
270
|
+
syncActivedCell()
|
|
271
|
+
actived.args = null
|
|
272
|
+
actived.row = null
|
|
273
|
+
actived.column = null
|
|
274
|
+
$xeTable.updateFooter()
|
|
275
|
+
$xeTable.dispatchEvent('edit-closed', {
|
|
276
|
+
row,
|
|
277
|
+
rowIndex: $xeTable.getRowIndex(row),
|
|
278
|
+
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
279
|
+
column,
|
|
280
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
281
|
+
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
282
|
+
}, evnt || null)
|
|
283
|
+
}
|
|
284
|
+
nextTick(() => {
|
|
285
|
+
if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
|
|
286
|
+
return $xeTable.handleRecalculateCellAreas()
|
|
287
|
+
}
|
|
288
|
+
})
|
|
289
|
+
if (validOpts.autoClear) {
|
|
290
|
+
if (validOpts.msgMode !== 'full' || getConfig().cellVaildMode === 'obsolete') {
|
|
291
|
+
if ($xeTable.clearValidate) {
|
|
292
|
+
return $xeTable.clearValidate()
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
focused.row = null
|
|
297
|
+
focused.column = null
|
|
298
|
+
return nextTick()
|
|
299
|
+
}
|
|
300
|
+
|
|
259
301
|
editMethods = {
|
|
260
302
|
/**
|
|
261
303
|
* 往表格中插入临时数据
|
|
@@ -514,46 +556,18 @@ hooks.add('tableEditModule', {
|
|
|
514
556
|
}
|
|
515
557
|
return null
|
|
516
558
|
},
|
|
517
|
-
clearActived (
|
|
559
|
+
clearActived (row) {
|
|
518
560
|
// 即将废弃
|
|
519
561
|
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
520
562
|
warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
|
|
521
563
|
}
|
|
522
|
-
return this.clearEdit(
|
|
564
|
+
return this.clearEdit(row)
|
|
523
565
|
},
|
|
524
566
|
/**
|
|
525
567
|
* 清除激活的编辑
|
|
526
568
|
*/
|
|
527
|
-
clearEdit (
|
|
528
|
-
|
|
529
|
-
const { actived, focused } = editStore
|
|
530
|
-
const { row, column } = actived
|
|
531
|
-
const validOpts = computeValidOpts.value
|
|
532
|
-
if (row || column) {
|
|
533
|
-
syncActivedCell()
|
|
534
|
-
actived.args = null
|
|
535
|
-
actived.row = null
|
|
536
|
-
actived.column = null
|
|
537
|
-
$xeTable.updateFooter()
|
|
538
|
-
$xeTable.dispatchEvent('edit-closed', {
|
|
539
|
-
row,
|
|
540
|
-
rowIndex: $xeTable.getRowIndex(row),
|
|
541
|
-
$rowIndex: $xeTable.getVMRowIndex(row),
|
|
542
|
-
column,
|
|
543
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
544
|
-
$columnIndex: $xeTable.getVMColumnIndex(column)
|
|
545
|
-
}, evnt || null)
|
|
546
|
-
}
|
|
547
|
-
if (validOpts.autoClear) {
|
|
548
|
-
if (validOpts.msgMode !== 'full' || getConfig().cellVaildMode === 'obsolete') {
|
|
549
|
-
if ($xeTable.clearValidate) {
|
|
550
|
-
return $xeTable.clearValidate()
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
focused.row = null
|
|
555
|
-
focused.column = null
|
|
556
|
-
return nextTick()
|
|
569
|
+
clearEdit (row) {
|
|
570
|
+
return handleClearEdit(null, row)
|
|
557
571
|
},
|
|
558
572
|
/**
|
|
559
573
|
* 清除所选中源状态
|
|
@@ -687,7 +701,7 @@ hooks.add('tableEditModule', {
|
|
|
687
701
|
}
|
|
688
702
|
$xeTable.closeTooltip()
|
|
689
703
|
if (actived.column) {
|
|
690
|
-
|
|
704
|
+
handleClearEdit(evnt)
|
|
691
705
|
}
|
|
692
706
|
type = 'edit-activated'
|
|
693
707
|
column.renderHeight = cell.offsetHeight
|
|
@@ -765,6 +779,12 @@ hooks.add('tableEditModule', {
|
|
|
765
779
|
handleActived (params, evnt) {
|
|
766
780
|
return editPrivateMethods.handleEdit(params, evnt)
|
|
767
781
|
},
|
|
782
|
+
/**
|
|
783
|
+
* 处理取消编辑
|
|
784
|
+
* @param evnt
|
|
785
|
+
* @returns
|
|
786
|
+
*/
|
|
787
|
+
handleClearEdit,
|
|
768
788
|
/**
|
|
769
789
|
* 处理聚焦
|
|
770
790
|
*/
|
|
@@ -836,7 +856,7 @@ hooks.add('tableEditModule', {
|
|
|
836
856
|
const selectMethod = () => {
|
|
837
857
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
838
858
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
839
|
-
|
|
859
|
+
handleClearEdit(evnt)
|
|
840
860
|
editMethods.clearSelected()
|
|
841
861
|
if ($xeTable.clearCellAreas) {
|
|
842
862
|
$xeTable.clearCellAreas()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nextTick } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
|
-
import { toFilters, handleFieldOrColumn } from '../../src/util'
|
|
4
|
+
import { toFilters, handleFieldOrColumn, getRefElem } from '../../src/util'
|
|
5
5
|
import { getDomNode, triggerEvent } from '../../../ui/src/dom'
|
|
6
6
|
import { isEnableConf } from '../../../ui/src/utils'
|
|
7
7
|
|
|
@@ -251,8 +251,7 @@ hooks.add('tableFilterModule', {
|
|
|
251
251
|
const { elemStore } = internalData
|
|
252
252
|
const { fixed } = column
|
|
253
253
|
return $xeTable.scrollToColumn(column).then(() => {
|
|
254
|
-
const
|
|
255
|
-
const headerWrapperElem = headerWrapperRef ? headerWrapperRef.value : null
|
|
254
|
+
const headerWrapperElem = getRefElem(elemStore[`${fixed || 'main'}-header-wrapper`] || elemStore['main-header-wrapper'])
|
|
256
255
|
if (headerWrapperElem) {
|
|
257
256
|
const filterBtnElem = headerWrapperElem.querySelector(`.vxe-header--column.${column.id} .vxe-filter--btn`) as HTMLElement
|
|
258
257
|
triggerEvent(filterBtnElem, 'click')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import { VxeUI } from '../../../ui'
|
|
3
|
+
import { getRefElem } from '../../src/util'
|
|
3
4
|
import { browse, hasClass, getAbsolutePos, addClass, removeClass, getEventTargetNode } from '../../../ui/src/dom'
|
|
4
5
|
|
|
5
6
|
import type { TableKeyboardPrivateMethods } from '../../../../types'
|
|
@@ -79,8 +80,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
79
80
|
const { elemStore } = internalData
|
|
80
81
|
const disX = evnt.clientX
|
|
81
82
|
const disY = evnt.clientY
|
|
82
|
-
const
|
|
83
|
-
const bodyWrapperElem = bodyWrapperRef ? bodyWrapperRef.value : null
|
|
83
|
+
const bodyWrapperElem = getRefElem(elemStore[`${column.fixed || 'main'}-body-wrapper`] || elemStore['main-body-wrapper'])
|
|
84
84
|
if (!bodyWrapperElem) {
|
|
85
85
|
return
|
|
86
86
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCommentVNode, defineComponent, TransitionGroup, h, ref, Ref, PropType, inject, nextTick, ComputedRef, onBeforeUnmount, onMounted, onUnmounted } from 'vue'
|
|
2
2
|
import XEUtils from 'xe-utils'
|
|
3
3
|
import { VxeUI } from '../../ui'
|
|
4
|
-
import { mergeBodyMethod, getRowid, XEBodyScrollElement } from './util'
|
|
4
|
+
import { mergeBodyMethod, getRowid, XEBodyScrollElement, getRefElem } from './util'
|
|
5
5
|
import { updateCellTitle, getPropClass, setScrollTop, setScrollLeft } from '../../ui/src/dom'
|
|
6
6
|
import { isEnableConf } from '../../ui/src/utils'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
@@ -359,7 +359,7 @@ export default defineComponent({
|
|
|
359
359
|
getPropClass(className, params),
|
|
360
360
|
getPropClass(allCellClassName, params)
|
|
361
361
|
],
|
|
362
|
-
key: columnKey || columnOpts.useKey || rowOpts.useKey ? colid : $columnIndex,
|
|
362
|
+
key: columnKey || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex,
|
|
363
363
|
...attrs,
|
|
364
364
|
style: Object.assign({
|
|
365
365
|
height: cellHeight
|
|
@@ -370,13 +370,14 @@ export default defineComponent({
|
|
|
370
370
|
|
|
371
371
|
const renderRows = (fixedType: any, tableData: any, tableColumn: any) => {
|
|
372
372
|
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, showOverflow: allColumnOverflow, editConfig, treeConfig } = tableProps
|
|
373
|
-
const { hasFixedColumn, treeExpandedMaps, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, pendingRowList } = tableReactData
|
|
373
|
+
const { hasFixedColumn, treeExpandedMaps, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, pendingRowList, isDragColMove } = tableReactData
|
|
374
374
|
const { fullAllDataRowIdData } = tableInternalData
|
|
375
375
|
const checkboxOpts = computeCheckboxOpts.value
|
|
376
376
|
const radioOpts = computeRadioOpts.value
|
|
377
377
|
const treeOpts = computeTreeOpts.value
|
|
378
378
|
const editOpts = computeEditOpts.value
|
|
379
379
|
const rowOpts = computeRowOpts.value
|
|
380
|
+
const columnOpts = computeColumnOpts.value
|
|
380
381
|
const { transform } = treeOpts
|
|
381
382
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
382
383
|
const rows: any[] = []
|
|
@@ -431,30 +432,44 @@ export default defineComponent({
|
|
|
431
432
|
rowChildren = row[childrenField]
|
|
432
433
|
isExpandTree = rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid]
|
|
433
434
|
}
|
|
435
|
+
const trClass = [
|
|
436
|
+
'vxe-body--row',
|
|
437
|
+
treeConfig ? `row--level-${rowLevel}` : '',
|
|
438
|
+
{
|
|
439
|
+
'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
|
|
440
|
+
'is--new': isNewRow,
|
|
441
|
+
'is--expand-row': isExpandRow,
|
|
442
|
+
'is--expand-tree': isExpandTree,
|
|
443
|
+
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
444
|
+
'row--radio': radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
|
|
445
|
+
'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
446
|
+
'row--pending': pendingRowList.length && !!pendingRowMaps[rowid]
|
|
447
|
+
},
|
|
448
|
+
getPropClass(rowClassName, params)
|
|
449
|
+
]
|
|
450
|
+
const tdVNs = tableColumn.map((column: any, $columnIndex: any) => {
|
|
451
|
+
return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData)
|
|
452
|
+
})
|
|
434
453
|
rows.push(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
...trOn
|
|
455
|
-
}, tableColumn.map((column: any, $columnIndex: any) => {
|
|
456
|
-
return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData)
|
|
457
|
-
}))
|
|
454
|
+
columnOpts.drag
|
|
455
|
+
? h(TransitionGroup, {
|
|
456
|
+
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
|
|
457
|
+
tag: 'tr',
|
|
458
|
+
class: trClass,
|
|
459
|
+
rowid: rowid,
|
|
460
|
+
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
461
|
+
key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
462
|
+
...trOn
|
|
463
|
+
}, {
|
|
464
|
+
default: () => tdVNs
|
|
465
|
+
})
|
|
466
|
+
: h('tr', {
|
|
467
|
+
class: trClass,
|
|
468
|
+
rowid: rowid,
|
|
469
|
+
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
470
|
+
key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
471
|
+
...trOn
|
|
472
|
+
}, tdVNs)
|
|
458
473
|
)
|
|
459
474
|
// 如果行被展开了
|
|
460
475
|
if (isExpandRow) {
|
|
@@ -578,10 +593,8 @@ export default defineComponent({
|
|
|
578
593
|
const leftElem = leftBody ? leftBody.$el as HTMLDivElement : null
|
|
579
594
|
const rightElem = rightBody ? rightBody.$el as HTMLDivElement : null
|
|
580
595
|
const bodyElem = tableBody.$el as HTMLDivElement
|
|
581
|
-
const
|
|
582
|
-
const
|
|
583
|
-
const bodyXRef = elemStore['main-body-xSpace']
|
|
584
|
-
const bodyXElem = bodyXRef ? bodyXRef.value : null
|
|
596
|
+
const bodyYElem = getRefElem(elemStore['main-body-ySpace'])
|
|
597
|
+
const bodyXElem = getRefElem(elemStore['main-body-xSpace'])
|
|
585
598
|
const bodyHeight = scrollYLoad && bodyYElem ? bodyYElem.clientHeight : bodyElem.clientHeight
|
|
586
599
|
const bodyWidth = scrollXLoad && bodyXElem ? bodyXElem.clientWidth : bodyElem.clientWidth
|
|
587
600
|
const remainSize = isPrevWheelTop === isTopWheel ? Math.max(0, wheelYSize - wheelYTotal) : 0
|
|
@@ -712,6 +725,7 @@ export default defineComponent({
|
|
|
712
725
|
const emptyOpts = computeEmptyOpts.value
|
|
713
726
|
const keyboardOpts = computeKeyboardOpts.value
|
|
714
727
|
const mouseOpts = computeMouseOpts.value
|
|
728
|
+
const columnOpts = computeColumnOpts.value
|
|
715
729
|
// const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value
|
|
716
730
|
// const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value
|
|
717
731
|
// 如果是使用优化模式
|
|
@@ -787,8 +801,9 @@ export default defineComponent({
|
|
|
787
801
|
/**
|
|
788
802
|
* 内容
|
|
789
803
|
*/
|
|
790
|
-
rowOpts.drag
|
|
804
|
+
rowOpts.drag || columnOpts.drag
|
|
791
805
|
? h(TransitionGroup, {
|
|
806
|
+
ref: refBodyTBody,
|
|
792
807
|
name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`,
|
|
793
808
|
tag: 'tbody'
|
|
794
809
|
}, {
|