瀏覽代碼

fix(types): allow style to be an array in JSX (#2947)

Kadir Yazıcı 5 年之前
父節點
當前提交
13c9d2ca82
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      packages/runtime-dom/types/jsx.d.ts

+ 4 - 1
packages/runtime-dom/types/jsx.d.ts

@@ -245,11 +245,14 @@ interface AriaAttributes {
   'aria-valuetext'?: string
 }
 
+// Vue's style normalization supports nested arrays
+type StyleValue = string | CSSProperties | Array<StyleValue>
+
 export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
   innerHTML?: string
 
   class?: any
-  style?: string | CSSProperties
+  style?: StyleValue
 
   // Standard HTML Attributes
   accesskey?: string