Procházet zdrojové kódy

忽略style 属性

visuddhinanda před 3 roky
rodič
revize
e1ea1ddbc1
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      dashboard/src/components/template/utilities.ts

+ 5 - 1
dashboard/src/components/template/utilities.ts

@@ -37,7 +37,11 @@ export function XmlToReact(
     for (let i = 0; i < attr.length; i++) {
       if (attr[i].nodeType === 2) {
         let key: string = attr[i].nodeName;
-        output[key] = attr[i].nodeValue;
+        if (key !== "style") {
+          output[key] = attr[i].nodeValue;
+        } else {
+          //TODO 把css style 转换为react style
+        }
       }
     }
     return output;