瀏覽代碼

Fix script component src attribute (#2887)

Evan Almloff 10 月之前
父節點
當前提交
e5696cd72f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/html/src/document/head.rs

+ 3 - 0
packages/html/src/document/head.rs

@@ -222,6 +222,9 @@ impl ScriptProps {
         if let Some(r#type) = &self.r#type {
             attributes.push(("type", r#type.clone()));
         }
+        if let Some(src) = &self.src {
+            attributes.push(("src", src.clone()));
+        }
         attributes
     }