Skip to content

Commit

Permalink
releases 4.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Jan 21, 2025
1 parent ab994d4 commit 259fee5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.10.6-beta.27",
"version": "4.10.6-beta.30",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
7 changes: 5 additions & 2 deletions packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ export default defineComponent({
const rowOpts = computeRowOpts.value
const rowDragOpts = computeRowDragOpts.value
const defaultRowHeight = computeDefaultRowHeight.value
const currCellHeight = cellOpts.height || rowOpts.height || defaultRowHeight
const customCellHeight = cellOpts.height || rowOpts.height
const currCellHeight = customCellHeight || defaultRowHeight
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = rowDragOpts
const columnOpts = computeColumnOpts.value
const mouseOpts = computeMouseOpts.value
Expand All @@ -141,6 +142,7 @@ export default defineComponent({
const showTitle = cellOverflow === 'title'
const showTooltip = cellOverflow === true || cellOverflow === 'tooltip'
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis
const isCsHeight = !!customCellHeight
const isRsHeight = resizeHeight > 0
let isDirty
const tdOns: any = {}
Expand Down Expand Up @@ -289,7 +291,7 @@ export default defineComponent({
}

const tcStyle: Record<string, string> = {}
if (scrollYLoad || hasEllipsis || isRsHeight) {
if (scrollYLoad || hasEllipsis || isCsHeight || isRsHeight) {
tcStyle.height = `${cellHeight}px`
} else {
tcStyle.minHeight = `${cellHeight}px`
Expand Down Expand Up @@ -394,6 +396,7 @@ export default defineComponent({
'col--tree-node': treeNode,
'col--edit': isEdit,
'col--ellipsis': hasEllipsis,
'col--cs-height': isCsHeight,
'col--rs-height': isRsHeight,
'col--to-row': showAreaRowStatus,
'col--auto-height': isVNAutoHeight,
Expand Down
12 changes: 8 additions & 4 deletions packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8005,7 +8005,11 @@ export default defineComponent({
// 根到根
}

const fullList = XEUtils.toTreeArray(internalData.afterTreeFullData, { children: childrenField })
const fullList = XEUtils.toTreeArray(internalData.afterTreeFullData, {
key: rowField,
parentKey: parentField,
children: mapChildrenField
})

// 移出
const otfIndex = $xeTable.findRowIndexOf(fullList, dragRow)
Expand All @@ -8025,10 +8029,10 @@ export default defineComponent({
dragRow[parentField] = isDragToChildFlag ? prevDragRow[rowField] : prevDragRow[parentField]

internalData.tableFullTreeData = XEUtils.toArrayTree(fullList, {
key: treeOpts.rowField,
parentKey: treeOpts.parentField,
key: rowField,
parentKey: parentField,
children: childrenField,
mapChildren: treeOpts.mapChildrenField
mapChildren: mapChildrenField
})
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ VxeUI.setConfig({
padding: true
},
headerCellConfig: {
height: 'unset'
},
footerCellConfig: {
height: 'unset'
},
// menuConfig: {
// visibleMethod () {}
Expand Down
2 changes: 2 additions & 0 deletions styles/components/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,8 @@
}
}
}
&.col--cs-height,
&.col--rs-height,
&.col--auto-height {
overflow: hidden;
& > .vxe-cell {
Expand Down

0 comments on commit 259fee5

Please sign in to comment.