@jerrold_langworth Вы можете использовать $route в Vue.js чтоыб получить URL страницы, небольшой пример кода ниже:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<template> <div> <p> Текущий URL: <span>{{ currentUrl }}</span> </p> </div> </template> <script> export default { name: 'CurrentUrl', data: () => ({ currentUrl: '', }), created() { this.currentUrl = this.$route.fullPath }, } </script> |