koel/resources/assets/js/mixins/album-attributes.js

16 lines
264 B
JavaScript
Raw Normal View History

2017-10-02 23:01:37 +00:00
import { secondsToHis } from '@/utils'
2017-04-23 16:01:02 +00:00
export default {
computed: {
length () {
return this.album.songs.reduce((acc, song) => {
return acc + song.length
}, 0)
},
fmtLength () {
return secondsToHis(this.length)
}
}
}