add global filter

This commit is contained in:
Jonathan Baecker 2020-04-30 17:11:15 +02:00
parent 6856da1aa4
commit 68cbc58b75

View File

@ -9,3 +9,12 @@ Vue.filter('toMin', function (sec) {
return ''
}
})
Vue.filter('filename', function (path) {
if (path) {
const pathArr = path.split('/')
return pathArr[pathArr.length - 1]
} else {
return ''
}
})