Skip to content

Commit

Permalink
releases 4.9.29
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 17, 2024
1 parent e167d8a commit 8228c5b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 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": "4.9.28",
"version": "4.9.29",
"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.33"
"vxe-pc-ui": "^4.3.35"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
9 changes: 5 additions & 4 deletions packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLDivElement>
const refBodyTable = ref() as Ref<HTMLTableElement>
Expand Down Expand Up @@ -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[] = []
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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
// 如果是使用优化模式
Expand Down Expand Up @@ -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'}`,
Expand Down
5 changes: 3 additions & 2 deletions packages/table/src/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLDivElement>
const refFooterTable = ref() as Ref<HTMLTableElement>
Expand Down Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion packages/table/src/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 4 additions & 2 deletions packages/ui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 8228c5b

Please sign in to comment.