diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-09-09 20:08:14 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-09-25 06:27:10 +0300 |
commit | f15cc7ac46022487ca36a3d8a66eb86791e040f9 (patch) | |
tree | 97815d7c99eb1facaf6ae2b5134833bca42ad007 /src/App.vue | |
parent | 12bc875329c0d8a9a28aa51daa6adfecb834f6f9 (diff) | |
download | webui-vue-f15cc7ac46022487ca36a3d8a66eb86791e040f9.tar.xz |
Move translation into routes file
- Added intial application load document title update with
created hook
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I73d18ed4a56bd04601fa7382c2d6c2ec504b03f5
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue index 30de752b..b57a91db 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,8 +13,11 @@ export default { name: 'App', watch: { $route: function(to) { - document.title = this.$t(to.meta.title) || 'Page is missing title'; + document.title = to.meta.title || 'Page is missing title'; } + }, + created() { + document.title = this.$route.meta.title || 'Page is missing title'; } }; </script> |