forked from opentiny/tiny-vue
fix(grid): [grid] fix shadow-root does not have getAttribute function (#1593)
This commit is contained in:
parent
55e65a4464
commit
0bd0d8b9e0
|
@ -179,7 +179,10 @@ export const colToVisible = ($table, column, move) => {
|
|||
}
|
||||
|
||||
export const hasDataTag = (el, value) => {
|
||||
if (!el || !value) return false
|
||||
// el可能为shadow-root,shadow-root没有getAttribute方法
|
||||
if (!el || !value || !el.getAttribute) {
|
||||
return false
|
||||
}
|
||||
|
||||
return (' ' + el.getAttribute('data-tag') + ' ').includes(' ' + value + ' ')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue