From 8228c5b0d08ed722cb04db2845c3512113085151 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Tue, 17 Dec 2024 10:57:43 +0800 Subject: [PATCH] releases 4.9.29 --- package.json | 4 ++-- packages/table/src/body.ts | 9 +++++---- packages/table/src/footer.ts | 5 +++-- packages/table/src/header.ts | 3 ++- packages/ui/index.ts | 6 ++++-- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index b54ef22d8e..e4b02e5222 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.9.28", + "version": "4.9.29", "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.33" + "vxe-pc-ui": "^4.3.35" }, "devDependencies": { "@types/resize-observer-browser": "^0.1.11", diff --git a/packages/table/src/body.ts b/packages/table/src/body.ts index e3efc48027..10f1363989 100644 --- a/packages/table/src/body.ts +++ b/packages/table/src/body.ts @@ -36,7 +36,7 @@ export default defineComponent({ const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable const { refTableBody, refTableHeader, refTableFooter, refTableLeftBody, refTableRightBody, refScrollXHandleElem, refScrollYHandleElem } = $xeTable.getRefMaps() - const { computeEditOpts, computeMouseOpts, computeAreaOpts, computeSYOpts, computeEmptyOpts, computeKeyboardOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts } = $xeTable.getComputeMaps() + const { computeEditOpts, computeMouseOpts, computeAreaOpts, computeSYOpts, computeEmptyOpts, computeKeyboardOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeColumnDragOpts } = $xeTable.getComputeMaps() const refElem = ref() as Ref const refBodyTable = ref() as Ref @@ -407,6 +407,7 @@ export default defineComponent({ const editOpts = computeEditOpts.value const rowOpts = computeRowOpts.value const columnOpts = computeColumnOpts.value + const columnDragOpts = computeColumnDragOpts.value const { transform, seqMode } = treeOpts const childrenField = treeOpts.children || treeOpts.childrenField const rows: any[] = [] @@ -483,7 +484,7 @@ export default defineComponent({ return renderColumn(seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData) }) rows.push( - columnOpts.drag + columnOpts.drag && columnDragOpts.animation ? h(TransitionGroup, { name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', @@ -769,7 +770,7 @@ export default defineComponent({ const emptyOpts = computeEmptyOpts.value const keyboardOpts = computeKeyboardOpts.value const mouseOpts = computeMouseOpts.value - const columnOpts = computeColumnOpts.value + const rowDragOpts = computeRowDragOpts.value // const isMergeLeftFixedExceeded = computeIsMergeLeftFixedExceeded.value // const isMergeRightFixedExceeded = computeIsMergeRightFixedExceeded.value // 如果是使用优化模式 @@ -852,7 +853,7 @@ export default defineComponent({ /** * 内容 */ - rowOpts.drag || columnOpts.drag + rowOpts.drag && rowDragOpts.animation ? h(TransitionGroup, { ref: refBodyTBody, name: `vxe-body--row-list${isDragRowMove ? '' : '-disabled'}`, diff --git a/packages/table/src/footer.ts b/packages/table/src/footer.ts index 8c1c2d7644..9091f4f0be 100644 --- a/packages/table/src/footer.ts +++ b/packages/table/src/footer.ts @@ -48,7 +48,7 @@ export default defineComponent({ const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable const { refTableHeader, refTableBody, refScrollXHandleElem } = $xeTable.getRefMaps() - const { computeTooltipOpts, computeColumnOpts } = $xeTable.getComputeMaps() + const { computeTooltipOpts, computeColumnOpts, computeColumnDragOpts } = $xeTable.getComputeMaps() const refElem = ref() as Ref const refFooterTable = ref() as Ref @@ -230,12 +230,13 @@ export default defineComponent({ const { footerRowClassName, footerRowStyle } = tableProps const { isDragColMove } = tableReactData const columnOpts = computeColumnOpts.value + const columnDragOpts = computeColumnDragOpts.value return footerTableData.map((row, $rowIndex) => { const _rowIndex = $rowIndex const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType } - if (columnOpts.drag) { + if (columnOpts.drag && columnDragOpts.animation) { return h(TransitionGroup, { name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', diff --git a/packages/table/src/header.ts b/packages/table/src/header.ts index 8746090bdb..0056337454 100644 --- a/packages/table/src/header.ts +++ b/packages/table/src/header.ts @@ -276,11 +276,12 @@ export default defineComponent({ const { headerRowClassName, headerRowStyle } = tableProps const { isDragColMove } = tableReactData const columnOpts = computeColumnOpts.value + const columnDragOpts = computeColumnDragOpts.value return headerGroups.map((cols, $rowIndex) => { const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType } - if (columnOpts.drag) { + if (columnOpts.drag && columnDragOpts.animation) { return h(TransitionGroup, { name: `vxe-header--col-list${isDragColMove ? '' : '-disabled'}`, tag: 'tr', diff --git a/packages/ui/index.ts b/packages/ui/index.ts index 91a7df18de..4e0574f0e8 100644 --- a/packages/ui/index.ts +++ b/packages/ui/index.ts @@ -48,10 +48,12 @@ VxeUI.setConfig({ strict: true }, rowDragConfig: { - showIcon: true + showIcon: true, + animation: true }, columnDragConfig: { - showIcon: true + showIcon: true, + animation: true }, checkboxConfig: { // trigger: 'default',