Skip to content

Commit

Permalink
releases 3.11.37
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 20, 2024
1 parent 6225334 commit 09ac677
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 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.11.36",
"version": "3.11.37",
"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.3.41"
"vxe-pc-ui": "^3.3.43"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
Expand Down
7 changes: 4 additions & 3 deletions packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function renderColumn (h: any, _vm: any, $xetable: any, seq: any, rowid: any, fi
getClass(className, params),
getClass(allCellClassName, params)
],
key: columnKey || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? column.id : $columnIndex,
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? column.id : $columnIndex,
attrs,
style: Object.assign({
height: cellHeight
Expand All @@ -362,6 +362,7 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
expandOpts,
editOpts,
treeExpandedMaps,
scrollXLoad,
scrollYLoad,
rowExpandedMaps,
radioOpts,
Expand Down Expand Up @@ -467,7 +468,7 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
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,
nativeOn: trOn
}, tdVNs)
: h('tr', {
Expand All @@ -476,7 +477,7 @@ function renderRows (h: CreateElement, _vm: any, $xeTable: any, fixedType: any,
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,
on: 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 @@ -26,7 +26,7 @@ function mergeFooterMethod (mergeFooterList: any, _rowIndex: any, _columnIndex:

function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.ColumnInfo[], footerTableData: any[], row: any, $rowIndex: number, _rowIndex: number) {
const { $parent: $xetable, fixedType } = _vm
const { $listeners: tableListeners, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, mergeFooterList, footerSpanMethod, align: allAlign, scrollXLoad, columnKey, columnOpts, showFooterOverflow: allColumnFooterOverflow, currentColumn, overflowX, scrollbarWidth, tooltipOpts } = $xetable
const { $listeners: tableListeners, footerCellClassName, footerCellStyle, footerAlign: allFooterAlign, mergeFooterList, footerSpanMethod, align: allAlign, scrollXLoad, columnKey, columnOpts, showFooterOverflow: allColumnFooterOverflow, currentColumn, overflowX, scrollYLoad, scrollbarWidth, tooltipOpts } = $xetable

return tableColumn.map((column: any, $columnIndex: any) => {
const { type, showFooterOverflow, footerAlign, align, footerClassName, editRender, cellRender } = column
Expand Down Expand Up @@ -135,7 +135,7 @@ function renderRows (h: CreateElement, _vm: any, tableColumn: VxeTableDefines.Co
attrs,
style: footerCellStyle ? (XEUtils.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle) : null,
on: 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 @@ -170,6 +170,7 @@ function renderHeads (h: CreateElement, _vm: any, footerTableData: any[]) {

if (columnOpts.drag && columnDragOpts.animation) {
return h('transition-group', {
key: $rowIndex,
props: {
tag: 'tr',
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
Expand All @@ -182,6 +183,7 @@ function renderHeads (h: CreateElement, _vm: any, footerTableData: any[]) {
}, renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex))
}
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 @@ -17,7 +17,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo

const { fixedType } = _vm

const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, currentColumn, scrollXLoad, overflowX, scrollbarWidth, mouseConfig, columnOpts } = $xeTable
const { resizable: allResizable, border, columnKey, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, currentColumn, scrollXLoad, scrollYLoad, overflowX, scrollbarWidth, mouseConfig, columnOpts } = $xeTable
const columnDragOpts = $xeTable.computeColumnDragOpts
const { disabledMethod: dragDisabledMethod } = columnDragOpts
return cols.map((column: any, $columnIndex: any) => {
Expand Down Expand Up @@ -90,7 +90,7 @@ const renderRows = (h: CreateElement, _vm: any, cols: VxeTableDefines.ColumnInfo
attrs: thAttrs,
style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) : null,
on: 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 @@ -140,6 +140,7 @@ function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {

if (columnOpts.drag && columnDragOpts.animation) {
return h('transition-group', {
key: $rowIndex,
props: {
tag: 'tr',
name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`,
Expand All @@ -152,6 +153,7 @@ function renderHeads (h: CreateElement, _vm: any, headerGroups: any[]) {
}, renderRows(h, _vm, cols, $rowIndex))
}
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/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6785,7 +6785,7 @@ const Methods = {

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
9 changes: 6 additions & 3 deletions packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,11 @@ export default {
}
return false
},
tableBorder () {
const { border } = this
computeTableBorder () {
const $xeTable = this
const props = $xeTable

const { border } = props
if (border === true) {
return 'full'
}
Expand Down Expand Up @@ -1213,7 +1216,6 @@ export default {
stripe,
showHeader,
height,
tableBorder,
treeOpts,
treeConfig,
mouseConfig,
Expand Down Expand Up @@ -1250,6 +1252,7 @@ export default {
const loadingSlot = $scopedSlots.loading
const currLoading = this._isLoading || loading
const vSize = computeSize
const tableBorder = $xeTable.computeTableBorder
const virtualScrollBars = $xeTable.computeVirtualScrollBars
const isArea = mouseConfig && mouseOpts.area
const tableStyle = $xeTable.computeTableStyle
Expand Down

0 comments on commit 09ac677

Please sign in to comment.