mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 03:08:21 +08:00
fix(components): [table-v2] the selector is invalid when row-key
is a number (#16989)
* fix: rowKey use number or start of number onRowHovered Throw Error#16988 * fix: use String() replace to `as string` #16989
This commit is contained in:
parent
8bd642f567
commit
7648011303
@ -64,7 +64,7 @@ export const useRow = (
|
||||
return
|
||||
}
|
||||
const tableRoot = tableInstance!.vnode.el as HTMLElement
|
||||
const rows = tableRoot.querySelectorAll(`[rowkey=${rowKey as string}]`)
|
||||
const rows = tableRoot.querySelectorAll(`[rowkey="${String(rowKey)}"]`)
|
||||
rows.forEach((row) => {
|
||||
if (hovered) {
|
||||
row.classList.add(ns.is('hovered'))
|
||||
|
Loading…
Reference in New Issue
Block a user