mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix all property types
This commit is contained in:
@@ -1767,16 +1767,15 @@ export const borderLeftWidthProperty = new CssProperty<Style, Length>({
|
||||
borderLeftWidthProperty.register(Style);
|
||||
|
||||
// Border Radius properties.
|
||||
const borderRadiusProperty = new ShorthandProperty<Style, number>({
|
||||
const borderRadiusProperty = new ShorthandProperty<Style, string | number>({
|
||||
name: "borderRadius", cssName: "border-radius",
|
||||
getter: function (this: Style) {
|
||||
if (this.borderTopLeftRadius === this.borderTopRightRadius &&
|
||||
this.borderTopLeftRadius === this.borderBottomRightRadius &&
|
||||
this.borderTopLeftRadius === this.borderBottomLeftRadius) {
|
||||
return this.borderTopLeftRadius + "";
|
||||
} else {
|
||||
return `${this.borderTopLeftRadius} ${this.borderTopRightRadius} ${this.borderBottomRightRadius} ${this.borderBottomLeftRadius}`;
|
||||
return this.borderTopLeftRadius;
|
||||
}
|
||||
return `${this.borderTopLeftRadius} ${this.borderTopRightRadius} ${this.borderBottomRightRadius} ${this.borderBottomLeftRadius}`;
|
||||
},
|
||||
converter: function (value) {
|
||||
if (typeof value === "string"){
|
||||
|
||||
2
tns-core-modules/ui/core/view.d.ts
vendored
2
tns-core-modules/ui/core/view.d.ts
vendored
@@ -722,7 +722,7 @@ declare module "ui/core/view" {
|
||||
export const borderBottomWidthProperty: CssProperty<Style, Length>;
|
||||
export const borderLeftWidthProperty: CssProperty<Style, Length>;
|
||||
|
||||
export const borderRadiusProperty: CssProperty<Style, number>;
|
||||
export const borderRadiusProperty: ShorthandProperty<Style, string | number>;
|
||||
export const borderTopLeftRadiusProperty: CssProperty<Style, number>;
|
||||
export const borderTopRightRadiusProperty: CssProperty<Style, number>;
|
||||
export const borderBottomRightRadiusProperty: CssProperty<Style, number>;
|
||||
|
||||
Reference in New Issue
Block a user