fix(grid): fix cell click event error on edit mode (#3549)

This commit is contained in:
gimmyhehe 2025-07-02 11:47:59 +08:00 committed by GitHub
parent a2cc153997
commit 5de6b6491b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* eslint-disable no-cond-assign */
import { hooks } from '@opentiny/vue-common'
import { off, on, isNull } from '@opentiny/utils'
import { off, on, isNull, fastdom } from '@opentiny/utils'
import { isUndefined } from '@opentiny/vue-renderless/grid/static/'
import { updateCellTitle, emitEvent } from '@opentiny/vue-renderless/grid/utils'
@ -220,7 +220,10 @@ export const useCellEvent = ({ table, $table }) => {
satisfy(({ type }) => type === 'selection', selectConfig.trigger) ||
satisfy(({ treeNode }) => treeNode, treeConfig.trigger))
) {
$table.triggerCellClickEvent(e, params)
// 捕获阶段单元格进入编辑态常显态的点击事件会被vue移除从而不会执行
fastdom.mutate(() => {
$table.triggerCellClickEvent(e, params)
})
}
if (source.part === 'footer' && tableListeners['footer-cell-click']) {