소스 검색

fix: 修复使用 extendSlots 时插槽参数未传递的问题。 (#2056)

Co-authored-by: sevth <pengqiang@vastweb>
sevth 2 년 전
부모
커밋
266c33819f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/utils/helper/tsxHelper.tsx

+ 1 - 1
src/utils/helper/tsxHelper.tsx

@@ -29,7 +29,7 @@ export function extendSlots(slots: Slots, excludeKeys: string[] = []) {
     if (excludeKeys.includes(key)) {
       return null;
     }
-    ret[key] = () => getSlot(slots, key);
+    ret[key] = (data?: any) => getSlot(slots, key, data);
   });
   return ret;
 }