watch监听:
watch: { $route(to, from) { console.log(this.$route.path); } },
标签中可以直接用this.$route.path调用: