Browse Source

fix(compiler-core): change v-for key type to match Object.keys (#10963)

close #8819
Alexandre Ferrera 2 years ago
parent
commit
9fead52343
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/runtime-core/src/helpers/renderList.ts

+ 1 - 1
packages/runtime-core/src/helpers/renderList.ts

@@ -42,7 +42,7 @@ export function renderList<T>(
   source: T,
   source: T,
   renderItem: <K extends keyof T>(
   renderItem: <K extends keyof T>(
     value: T[K],
     value: T[K],
-    key: K,
+    key: string,
     index: number,
     index: number,
   ) => VNodeChild,
   ) => VNodeChild,
 ): VNodeChild[]
 ): VNodeChild[]