From c79e48fe537d3458aca19cc6a06eab02597e2d14 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Fri, 20 Dec 2024 15:43:42 +0800 Subject: [PATCH] releases 4.9.33 --- examples/views/grid/GridTest.vue | 3 +++ package.json | 4 ++-- packages/table/src/body.ts | 8 ++++---- packages/table/src/footer.ts | 6 ++++-- packages/table/src/header.ts | 6 ++++-- packages/table/src/table.ts | 2 +- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/examples/views/grid/GridTest.vue b/examples/views/grid/GridTest.vue index e1d9ba07ef..9afbb6e5ed 100644 --- a/examples/views/grid/GridTest.vue +++ b/examples/views/grid/GridTest.vue @@ -37,6 +37,9 @@ const gridOptions = reactive({ columnConfig: { useKey: true }, + cellConfig: { + paddingMode: 'compact' + }, rowConfig: { keyField: 'id', isHover: true diff --git a/package.json b/package.json index 08b09a9eab..8c16e505e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.9.32", + "version": "4.9.33", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...", "scripts": { "update": "npm install --legacy-peer-deps", @@ -28,7 +28,7 @@ "style": "lib/style.css", "typings": "types/index.d.ts", "dependencies": { - "vxe-pc-ui": "^4.3.38" + "vxe-pc-ui": "^4.3.40" }, "devDependencies": { "@types/resize-observer-browser": "^0.1.11", diff --git a/packages/table/src/body.ts b/packages/table/src/body.ts index 5588eb5b84..a5effefa20 100644 --- a/packages/table/src/body.ts +++ b/packages/table/src/body.ts @@ -390,7 +390,7 @@ export default defineComponent({ getPropClass(className, params), getPropClass(allCellClassName, params) ], - key: columnKey || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex, + key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex, ...attrs, style: Object.assign({ height: cellHeight @@ -401,7 +401,7 @@ export default defineComponent({ const renderRows = (fixedType: any, tableData: any, tableColumn: any) => { const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, showOverflow: allColumnOverflow, editConfig, treeConfig } = tableProps - const { hasFixedColumn, treeExpandedMaps, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove } = tableReactData + const { hasFixedColumn, treeExpandedMaps, scrollXLoad, scrollYLoad, rowExpandedMaps, expandColumn, selectRadioRow, pendingRowMaps, isDragColMove } = tableReactData const { fullAllDataRowIdData } = tableInternalData const checkboxOpts = computeCheckboxOpts.value const radioOpts = computeRadioOpts.value @@ -493,7 +493,7 @@ export default defineComponent({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, - key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex, + key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex, ...trOn }, { default: () => tdVNs @@ -502,7 +502,7 @@ export default defineComponent({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, - key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex, + key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex, ...trOn }, tdVNs) ) diff --git a/packages/table/src/footer.ts b/packages/table/src/footer.ts index 54f8670a8a..f2a3dac5a6 100644 --- a/packages/table/src/footer.ts +++ b/packages/table/src/footer.ts @@ -100,7 +100,7 @@ export default defineComponent({ const renderRows = (tableColumn: VxeTableDefines.ColumnInfo[], footerTableData: any[], row: any, $rowIndex: number, _rowIndex: number) => { const { fixedType } = props const { footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, footerSpanMethod, align: allAlign, columnKey, showFooterOverflow: allColumnFooterOverflow } = tableProps - const { scrollXLoad, overflowX, scrollbarWidth, currentColumn, mergeFooterList } = tableReactData + const { scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, currentColumn, mergeFooterList } = tableReactData const tooltipOpts = computeTooltipOpts.value const columnOpts = computeColumnOpts.value @@ -208,7 +208,7 @@ export default defineComponent({ ...attrs, style: footerCellStyle ? (XEUtils.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle) : null, ...tfOns, - key: columnKey || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex + key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex }, [ h('div', { class: ['vxe-cell', { @@ -241,6 +241,7 @@ export default defineComponent({ if (columnOpts.drag && columnDragOpts.animation) { return h(TransitionGroup, { + key: $rowIndex, name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', class: [ @@ -253,6 +254,7 @@ export default defineComponent({ }) } return h('tr', { + key: $rowIndex, class: [ 'vxe-footer--row', footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : '' diff --git a/packages/table/src/header.ts b/packages/table/src/header.ts index 6a3ece0ea4..6ac601ea00 100644 --- a/packages/table/src/header.ts +++ b/packages/table/src/header.ts @@ -167,7 +167,7 @@ export default defineComponent({ const renderRows = (cols: VxeTableDefines.ColumnInfo[], $rowIndex: number) => { const { fixedType } = props const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps - const { currentColumn, scrollXLoad, overflowX, scrollbarWidth } = tableReactData + const { currentColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth } = tableReactData const columnOpts = computeColumnOpts.value const columnDragOpts = computeColumnDragOpts.value const { disabledMethod: dragDisabledMethod } = columnDragOpts @@ -243,7 +243,7 @@ export default defineComponent({ style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) : null, ...thAttrs, ...thOns, - key: columnKey || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex + key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex }, [ h('div', { class: ['vxe-cell', { @@ -286,6 +286,7 @@ export default defineComponent({ if (columnOpts.drag && columnDragOpts.animation) { return h(TransitionGroup, { + key: $rowIndex, name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', class: [ @@ -298,6 +299,7 @@ export default defineComponent({ }) } return h('tr', { + key: $rowIndex, class: [ 'vxe-header--row', headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : '' diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index 368f0a0fad..f49c671282 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -3083,7 +3083,7 @@ export default defineComponent({ const lazyScrollYData = () => { const { lyTimeout, lyRunTime, scrollYStore } = internalData const { visibleSize } = scrollYStore - const fpsTime = Math.min(80, Math.floor(visibleSize * 2)) + const fpsTime = Math.min(80, Math.floor(visibleSize)) if (lyTimeout) { clearTimeout(lyTimeout) }