mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(css): widget properties in css didn't work (#6889)
This commit is contained in:
@@ -481,7 +481,8 @@ export class CssState {
|
||||
if (property in this.view.style) {
|
||||
this.view.style[`css:${property}`] = value;
|
||||
} else {
|
||||
this.view[property] = value;
|
||||
const camelCasedProperty = property.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
|
||||
this.view[camelCasedProperty] = value;
|
||||
}
|
||||
} catch (e) {
|
||||
traceWrite(`Failed to apply property [${property}] with value [${value}] to ${this.view}. ${e}`, traceCategories.Error, traceMessageType.error);
|
||||
|
||||
Reference in New Issue
Block a user