Browse Source

fix: correct the type of `<details>`'s `onToggle` event handler (#10938)

Fixes #10928
btea 2 năm trước cách đây
mục cha
commit
fd18ce70b1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/runtime-dom/src/jsx.ts

+ 1 - 1
packages/runtime-dom/src/jsx.ts

@@ -406,7 +406,7 @@ export interface DataHTMLAttributes extends HTMLAttributes {
 
 export interface DetailsHTMLAttributes extends HTMLAttributes {
   open?: Booleanish
-  onToggle?: Event
+  onToggle?: (payload: ToggleEvent) => void
 }
 
 export interface DelHTMLAttributes extends HTMLAttributes {