Questions tagged [vue-router4]

190 questions
3
votes
3 answers

warning in vue-router 3.5.1: In Vue Router 4, the v-slot API will by default wrap its content with an element

While using "vue": "^2.6.12" & "vue-router": "^3.5.1", I receive this warning after each reload of the page: [vue-router] In Vue Router 4, the v-slot API will by default wrap its content with an element. Use the custom prop to remove this…
Felix
  • 31
  • 1
  • 2
3
votes
2 answers

warning in vue-router 3.5.1: 's tag prop is deprecated and has been removed in Vue Router 4

Since I updated our Vue.js app's node packages, I get the following warning in the browser console: [vue-router] 's tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this…
jasie
  • 2,192
  • 10
  • 39
  • 54
3
votes
1 answer

on click method with vue-router 4

With vue-router 3, it was possible to add a method on router-link with @click.native="myMethod" like explained here. In vue 3 the .native modifier was deprecated. When a user clicks on Click…
François Romain
  • 13,617
  • 17
  • 89
  • 123
3
votes
1 answer

vue3, vite and vue-router@next, cannot resolve component router-view

I created a project using Vite and added vue-router@next. I am using the router inside of the main.js as I've browsed around and seemed like this was the problem, however it does not fix the issue I am having. // package.json { "name":…
inerpiece
  • 185
  • 2
  • 7
3
votes
3 answers

Vue 3.0 router components transition does not work with mode="out-in"

I building an application with vue 3.0 and vue-router 4.0. I have this very simple code in my App.vue component (first rendered component) :
37 Degres
  • 141
  • 7
3
votes
4 answers

vue-router (vue 3) createWebHistory No match found for location with path

I have a laravel 8 project and upgraded laravel-mix to v6 to support vue 3. The problem is the createWebHistory from vue-router 4 package.json { "private": true, "scripts": { "development": "mix", "watch": "mix watch", …
calin24
  • 905
  • 3
  • 21
  • 43
2
votes
1 answer

Vue Router - Right click / open in new tab

With the vue-router (4) I have the following setup import { createApp } from 'vue' import App from './App.vue' import { createRouter, createWebHashHistory } from 'vue-router' import routes from './methods/routes.js' import Notifications from…
Mark
  • 70
  • 3
  • 13
2
votes
0 answers

How to access the current route's children in Vue Router 4

I am building a Vue 3 frontend and am using Vue Router 4 for navigation. I want to build a generic navigation based on the router definition. I want to use the current route and show links to the children of the route, but I see no children. Here is…
Happo
  • 1,375
  • 3
  • 16
  • 34
2
votes
1 answer

Pass markdown files to Vue component through router

I'm using VueJS. I have externally generated markdowns, and I want to generate static pages out of them thanks to a vue component. I'm using the vite-plugin-md to convert imported md files into a component. Working example Config…
Igor OA
  • 387
  • 3
  • 13
2
votes
2 answers

How to use Vue router inside of Laravel?

I develop with laravel9 and vue3. My problem is simple, But path setting is not go well. When I access url localhost:8080/tasks This url return 404 not found and I get the following type error GET http://localhost:8000/tasks 404 (Not Found) I…
sora sakamoto
  • 83
  • 1
  • 8
2
votes
0 answers

Best way to handle HTML5 Mode Routing (createWebHistory)

I have built a Vue app that is deployed within a WordPress Page on a WordPress site and it works really well. However I have one issue that I am trying to solve. The app runs on the a url something like this https://www.examplesite.com/vue-app Since…
AndyJamesN
  • 468
  • 4
  • 14
2
votes
1 answer

VueJS 3 / Router / redirect with push : Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push')

G'day, I wrote a script to login, and at the end of the script I would like to redirect to a new view (url: http://mywebsite/Home ) I have this script to login : (file : ./component/log.vue)