diff --git a/package.json b/package.json index cf05b5bbe0..71e1d50061 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.9.24", + "version": "4.9.25", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...", "scripts": { "update": "npm install --legacy-peer-deps", diff --git a/packages/table/module/custom/panel.ts b/packages/table/module/custom/panel.ts index e655f952e8..6d3ce22064 100644 --- a/packages/table/module/custom/panel.ts +++ b/packages/table/module/custom/panel.ts @@ -196,7 +196,7 @@ export default defineComponent({ if (showLine) { const optRect = optEl.getBoundingClientRect() dragLineEl.style.display = 'block' - dragLineEl.style.top = `${Math.max(1, optRect.y - wrapperRect.y)}px` + dragLineEl.style.top = `${Math.max(1, optRect.y + el.scrollTop - wrapperRect.y)}px` dragLineEl.style.height = `${optRect.height}px` dragLineEl.style.width = `${optRect.width}px` dragLineEl.setAttribute('drag-pos', dragPos) @@ -209,8 +209,8 @@ export default defineComponent({ const dragTipEl = refDragTipElem.value if (dragTipEl) { dragTipEl.style.display = 'block' - dragTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - dragTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px` - dragTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - dragTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px` + dragTipEl.style.top = `${Math.min(el.clientHeight + el.scrollTop - dragTipEl.clientHeight, evnt.clientY + el.scrollTop - wrapperRect.y)}px` + dragTipEl.style.left = `${Math.min(el.clientWidth + el.scrollLeft - dragTipEl.clientWidth, evnt.clientX + el.scrollLeft - wrapperRect.x)}px` dragTipEl.setAttribute('drag-status', showLine ? (prevDragToChild ? 'sub' : 'normal') : 'disabled') } } @@ -500,7 +500,7 @@ export default defineComponent({ }) ]), h('div', { - class: 'vxe-table--drag-tip-content' + class: 'vxe-table-custom-popup--drag-tip-content' }, getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : ''])) ]) ]) diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index ea1c0bdb15..b4c38494ae 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -2878,7 +2878,10 @@ export default defineComponent({ } return nextTick().then(() => { if ($xeToolbar) { - $xeToolbar.syncUpdate({ collectColumn, $table: $xeTable }) + $xeToolbar.syncUpdate({ + collectColumn: internalData.collectColumn, + $table: $xeTable + }) } return tableMethods.recalculate() })