diff options
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue index f6991c46..fc04b70b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,9 +7,22 @@ <script> export default { name: 'App', + computed: { + assetTag() { + return this.$store.getters['global/assetTag']; + }, + }, watch: { + assetTag: function (tag) { + if (tag) { + document.title = `${tag} - ${this.$route.meta.title}`; + } + }, $route: function (to) { document.title = to.meta.title || 'Page is missing title'; + if (this.assetTag) { + document.title = `${this.assetTag} - ${to.meta.title}`; + } }, }, created() { |