Create scripts/store/getters
This commit is contained in:
12
scripts/store/getters/group_title.js
Normal file
12
scripts/store/getters/group_title.js
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = function () {
|
||||
if (this.group_title) return this.group_title
|
||||
|
||||
if (Array.isArray(this.categories)) {
|
||||
return this.categories
|
||||
.map(i => i.name)
|
||||
.sort()
|
||||
.join(';')
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
Reference in New Issue
Block a user