Kaynağa Gözat

fix(shared): normalizeStyle should handle strings

fix #4138
Evan You 5 yıl önce
ebeveyn
işleme
a8c3a8ad61
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      packages/shared/src/normalizeProp.ts

+ 2 - 0
packages/shared/src/normalizeProp.ts

@@ -18,6 +18,8 @@ export function normalizeStyle(value: unknown): NormalizedStyle | undefined {
       }
       }
     }
     }
     return res
     return res
+  } else if (isString(value)) {
+    return parseStringStyle(value)
   } else if (isObject(value)) {
   } else if (isObject(value)) {
     return value
     return value
   }
   }