Browse Source

add mixins

update/libraries
dskvr 2 years ago
parent
commit
7fcef12cd4
  1. 16
      src/mixins/titleMixin.js

16
src/mixins/titleMixin.js

@ -0,0 +1,16 @@
function getTitle (vm) {
const { title } = vm.$options
if (title) {
return typeof title === 'function'
? title.call(vm)
: title
}
}
export default {
created () {
const title = getTitle(this)
if (title) {
document.title = title
}
}
}
Loading…
Cancel
Save