fix: use fromPairs replace Object.fromEntries (#3422)

This commit is contained in:
啝裳 2021-09-15 14:43:34 +08:00 committed by GitHub
parent 9d142ae129
commit 58585bf87d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
import { getCurrentInstance, computed } from 'vue'
import { debugWarn } from '@element-plus/utils/error'
import fromPairs from 'lodash/fromPairs'
import type { ComputedRef } from 'vue'
@ -25,7 +26,7 @@ export default (params: Params = {}): ComputedRef<Record<string, unknown>> => {
}
return computed(() =>
Object.fromEntries(
fromPairs(
Object.entries(instance.proxy?.$attrs).filter(
([key]) =>
!allExcludeKeys.includes(key) &&