Skip to content

Commit

Permalink
releases 4.9.33
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 20, 2024
1 parent bd4a4b7 commit c79e48f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions examples/views/grid/GridTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const gridOptions = reactive<VxeGridProps>({
columnConfig: {
useKey: true
},
cellConfig: {
paddingMode: 'compact'
},
rowConfig: {
keyField: 'id',
isHover: true
Expand Down
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": "4.9.32",
"version": "4.9.33",
"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": "^4.3.38"
"vxe-pc-ui": "^4.3.40"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
8 changes: 4 additions & 4 deletions packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
)
Expand Down
6 changes: 4 additions & 2 deletions packages/table/src/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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: [
Expand All @@ -253,6 +254,7 @@ export default defineComponent({
})
}
return h('tr', {
key: $rowIndex,
class: [
'vxe-footer--row',
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
Expand Down
6 changes: 4 additions & 2 deletions packages/table/src/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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', {
Expand Down Expand Up @@ -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: [
Expand All @@ -298,6 +299,7 @@ export default defineComponent({
})
}
return h('tr', {
key: $rowIndex,
class: [
'vxe-header--row',
headerRowClassName ? (XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName) : ''
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c79e48f

Please sign in to comment.