mirror of
https://github.com/element-plus/element-plus.git
synced 2025-01-18 10:59:10 +08:00
fix: use fromPairs replace Object.fromEntries (#3422)
This commit is contained in:
parent
9d142ae129
commit
58585bf87d
@ -1,5 +1,6 @@
|
|||||||
import { getCurrentInstance, computed } from 'vue'
|
import { getCurrentInstance, computed } from 'vue'
|
||||||
import { debugWarn } from '@element-plus/utils/error'
|
import { debugWarn } from '@element-plus/utils/error'
|
||||||
|
import fromPairs from 'lodash/fromPairs'
|
||||||
|
|
||||||
import type { ComputedRef } from 'vue'
|
import type { ComputedRef } from 'vue'
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ export default (params: Params = {}): ComputedRef<Record<string, unknown>> => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return computed(() =>
|
return computed(() =>
|
||||||
Object.fromEntries(
|
fromPairs(
|
||||||
Object.entries(instance.proxy?.$attrs).filter(
|
Object.entries(instance.proxy?.$attrs).filter(
|
||||||
([key]) =>
|
([key]) =>
|
||||||
!allExcludeKeys.includes(key) &&
|
!allExcludeKeys.includes(key) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user