Skip to content

Commit

Permalink
releases 4.9.24
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 13, 2024
1 parent 4625ae9 commit ff658e6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.9.24-beta.1",
"version": "4.9.24",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
7 changes: 6 additions & 1 deletion packages/table/module/custom/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,12 @@ export default defineComponent({
evnt.preventDefault()
const offsetY = evnt.clientY - optEl.getBoundingClientRect().y
const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom'
if ((dragCol && dragCol.id === column.id) || (!isCrossDrag && column.level === 1) || (!immediate && column.level > 1) || column.renderFixed) {
if (
(dragCol && dragCol.id === column.id) ||
(!isCrossDrag && column.level > 1) ||
(!immediate && column.level > 1) ||
column.renderFixed
) {
showDropTip(evnt, optEl, false, dragPos)
return
}
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ export default defineComponent({
class: trClass,
rowid: rowid,
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
...trOn
}, tdVNs)
)
Expand Down
3 changes: 3 additions & 0 deletions packages/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8201,6 +8201,9 @@ export default defineComponent({
'is--virtual-x': scrollXLoad,
'is--virtual-y': scrollYLoad
}],
style: {
'--vxe-ui-table-drag-column-move-delay': `${Math.max(0.05, Math.min(0.3, tableData.length / 800))}s`
},
spellcheck: false,
onKeydown: keydownEvent
}, [
Expand Down
4 changes: 3 additions & 1 deletion styles/components/table-module/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@
}

.vxe-table-custom--list-move {
transition: transform 0.35s;
transition-property: transform;
transition-duration: 0.35s;
transition-delay: 0.05s;
}

.vxe-table-custom-popup--column-sort-placeholder {
Expand Down
8 changes: 6 additions & 2 deletions styles/components/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,9 @@
}
}
.vxe-header--col-list-move {
transition: transform 0.35s;
transition-property: transform;
transition-duration: 0.35s;
transition-delay: var(--vxe-ui-table-drag-column-move-delay, 0.3s);
}

.vxe-table--drag-col-line,
Expand Down Expand Up @@ -1367,7 +1369,9 @@
}
}
.vxe-body--row-list-move {
transition: transform 0.35s;
transition-property: transform;
transition-duration: 0.35s;
transition-delay: 0.05s;
}
.vxe-table--drag-sort-tip {
display: none;
Expand Down

0 comments on commit ff658e6

Please sign in to comment.