Im learning how to use Vue and having trouble wrapping my head around the "vue" way to do things.
Is there a Vue function or method i can use to not have to write so many statements?
this.catArr = []
if (cat === 'All Modules') {
if (this.assetType !== '') {
this.catArr.push(this.assetType)
}
if (this.assetFormat !== '') {
this.catArr.push(this.assetFormat)
}
if (this.assetUse !== '') {
this.catArr.push(this.assetUse)
}
this.catArr.push(this.assetMod)
} else if (cat === 'All Types') {
if (this.assetMod !== '') {
this.catArr.push(this.assetMod)
}
if (this.assetFormat !== '') {
this.catArr.push(this.assetFormat)
}
if (this.assetUse !== '') {
this.catArr.push(this.assetUse)
}
this.catArr.push(this.assetType)
} else {
if (this.assetMod !== '') {
this.catArr.push(this.assetMod)
}
if (this.assetType !== '') {
this.catArr.push(this.assetType)
}
if (this.assetFormat !== '') {
this.catArr.push(this.assetFormat)
}
if (this.assetUse !== '') {
this.catArr.push(this.assetUse)
}
}