Skip to content

Commit

Permalink
releases 3.13.20
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Mar 7, 2025
1 parent 9764938 commit 18ff6d7
Show file tree
Hide file tree
Showing 6 changed files with 246 additions and 74 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "3.13.19",
"version": "3.13.20",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^3.4.2"
"vxe-pc-ui": "^3.4.6"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
Expand Down
5 changes: 5 additions & 0 deletions packages/grid/src/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,11 @@ export default {
}
return []
},
getEl () {
const $xeGrid = this

return $xeGrid.$refs.refElem as HTMLDivElement
},
/**
* 获取需要排除的高度
*/
Expand Down
15 changes: 10 additions & 5 deletions packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ function renderTdColumn (
tdOns.dblclick = (evnt: MouseEvent) => {
$xeTable.triggerCellDblclickEvent(evnt, cellParams)
}
let isMergeCell = false
// 合并行或列
if (mergeList.length) {
const spanRest = mergeBodyMethod(mergeList, _rowIndex, _columnIndex)
Expand All @@ -226,9 +227,11 @@ function renderTdColumn (
return null
}
if (rowspan > 1) {
isMergeCell = true
tdAttrs.rowspan = rowspan
}
if (colspan > 1) {
isMergeCell = true
tdAttrs.colspan = colspan
}
}
Expand Down Expand Up @@ -263,11 +266,13 @@ function renderTdColumn (
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')

let isVNPreEmptyStatus = false
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
isVNPreEmptyStatus = true
} else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
isVNPreEmptyStatus = true
if (!isMergeCell) {
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
if (scrollYLoad && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
isVNPreEmptyStatus = true
} else if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
isVNPreEmptyStatus = true
}
}
}

Expand Down
9 changes: 7 additions & 2 deletions packages/table/src/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
tfOns.dblclick = (evnt: MouseEvent) => {
$xeTable.dispatchEvent('footer-cell-dblclick', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt)
}
let isMergeCell = false
// 合并行或列
if (mergeFooterList.length) {
const spanRest = mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex)
Expand All @@ -119,9 +120,11 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
return null
}
if (rowspan > 1) {
isMergeCell = true
attrs.rowspan = rowspan
}
if (colspan > 1) {
isMergeCell = true
attrs.colspan = colspan
}
}
Expand All @@ -142,8 +145,10 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')

let isVNPreEmptyStatus = false
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
isVNPreEmptyStatus = true
if (!isMergeCell) {
if (scrollXLoad && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
isVNPreEmptyStatus = true
}
}

const tcStyle: Record<string, string> = {}
Expand Down
Loading

0 comments on commit 18ff6d7

Please sign in to comment.