feat(react): support fontWeight in number

This commit is contained in:
zoomchan-cxj
2023-03-15 17:09:37 +08:00
committed by Zoom Chan
parent 0142790ecf
commit 2ee66bef7c
@@ -390,6 +390,8 @@ class ElementNode extends ViewNode {
(this.style as any)[styleKey] = colorArrayParse((styleValue as Color[]));
} else if (styleKey.toLowerCase().indexOf('color') > -1) {
(this.style as any)[styleKey] = colorParse((styleValue as Color));
} else if (styleKey === 'fontWeight' && styleValue) {
(this.style as any)[styleKey] = typeof styleValue !== 'string' ? styleValue.toString() : styleValue;
} else if (styleKey === 'backgroundImage' && styleValue) {
this.style = parseBackgroundImage(styleKey, styleValue, this.style);
} else if (styleKey === 'textShadowOffset') {