I have 5 objects in API. I want to compare them on a computed way and then use it in the layout. I am getting an error that the type cannot be boolean and the property isAllProperty
is unknown
isAllProperty (): boolean {
let fullProperty = this.property1.name || this.property2.name || this.property3.name || this.property4.name || this.property5.name;
return isAllStack;
}
The syntax is a bit wrong try it like this
isAllProperty: function () {
let fullProperty = this.property1.name ||
this.property2.name || this.property3.name ||
this.property4.name || this.property5.name;
return isAllStack;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.