1
0
mirror of synced 2025-12-15 02:38:10 +08:00

修复编辑单元格偏移问题

This commit is contained in:
xuliangzhan
2022-04-04 21:05:23 +08:00
parent f47b03ae7c
commit 6b7963b8fb
3 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "vxe-table", "name": "vxe-table",
"version": "4.2.2-beta.1", "version": "4.2.2",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、贼灵活的配置项、扩展接口等...",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@@ -482,7 +482,7 @@ const editHook: VxeGlobalHooksHandles.HookOptions = {
$columnIndex: $xetable.getVMColumnIndex(column) $columnIndex: $xetable.getVMColumnIndex(column)
}, evnt || null) }, evnt || null)
} }
return ($xetable.clearValidate ? $xetable.clearValidate() : nextTick()).then(() => $xetable.recalculate()) return $xetable.clearValidate ? $xetable.clearValidate() : nextTick()
}, },
/** /**
* 清除所选中源状态 * 清除所选中源状态
@@ -575,7 +575,9 @@ const editHook: VxeGlobalHooksHandles.HookOptions = {
} }
} }
$xetable.closeTooltip() $xetable.closeTooltip()
editMethods.clearActived(evnt) if (actived.column) {
editMethods.clearActived(evnt)
}
type = 'edit-actived' type = 'edit-actived'
column.renderHeight = cell.offsetHeight column.renderHeight = cell.offsetHeight
actived.args = params actived.args = params

View File

@@ -772,7 +772,7 @@ export default defineComponent({
if (rest) { if (rest) {
if (isEnableConf(pagerConfig)) { if (isEnableConf(pagerConfig)) {
const total = XEUtils.get(rest, proxyProps.total || 'page.total') || 0 const total = XEUtils.get(rest, proxyProps.total || 'page.total') || 0
tablePage.total = total tablePage.total = XEUtils.toNumber(total)
reactData.tableData = XEUtils.get(rest, proxyProps.result || 'result') || [] reactData.tableData = XEUtils.get(rest, proxyProps.result || 'result') || []
// 检验当前页码,不能超出当前最大页数 // 检验当前页码,不能超出当前最大页数
const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1) const pageCount = Math.max(Math.ceil(total / tablePage.pageSize), 1)