dskvr
2 years ago
1 changed files with 16 additions and 0 deletions
@ -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…
Reference in new issue