From fdf76b9fb9dae45d52781f4f554e87528e01e5b4 Mon Sep 17 00:00:00 2001 From: bowen Date: Fri, 20 May 2022 16:19:14 +0800 Subject: [PATCH] fix: use fromPairs replace Object.fromEntries (#5605) * fix: use fromPairs replace Object.fromEntries * fix: use lodash-es replace lodash --- components/_util/reactivePick.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/_util/reactivePick.ts b/components/_util/reactivePick.ts index 4911106cc..c4164470e 100644 --- a/components/_util/reactivePick.ts +++ b/components/_util/reactivePick.ts @@ -1,5 +1,6 @@ import type { UnwrapRef } from 'vue'; import { reactive, toRef } from 'vue'; +import fromPairs from 'lodash-es/fromPairs'; /** * Reactively pick fields from a reactive object @@ -10,5 +11,5 @@ export function reactivePick( obj: T, ...keys: K[] ): { [S in K]: UnwrapRef } { - return reactive(Object.fromEntries(keys.map(k => [k, toRef(obj, k)]))) as any; + return reactive(fromPairs(keys.map(k => [k, toRef(obj, k)]))) as any; }