All Questions
829 questions
-1
votes
1
answer
35
views
I dont have VueRouter or Router from 'vue-router' [closed]
I dont know how to make a web router in vue because im a beginner, so in every tutorial, i see that they import router or vuerouter from 'vue-router'
What i've already tried? i ran npm install vue-...
0
votes
0
answers
28
views
How are cascading router-view elements handled?
TL;DR: how are the priorities of Vue routes (global vs child) calculated?
Quasar is a Vue framework that can bootstrap applications. I am trying to follow its suggested structure but I am not sure how ...
0
votes
0
answers
35
views
Why won't data persist in a component that is reused?
I have a Vue component that is rendered on a route like this:
{
path: '/chat/:Username(\\w+)?',
name: 'ViewChat',
component: Chat
}
The Chat.vue component should render at the path /chat and ...
0
votes
0
answers
188
views
Module not found: Error: Can't resolve 'vue-router' in '{Project Path}\src'
In my vue.js project, I put this code :
import {createRouter, createWebHistory} from 'vue-router';
on the file router.js, but when I try to run the project on browser I always got this error message
...
0
votes
1
answer
469
views
Right way of middleware in vue-router
I have created routes in vue, and defined some middleware conditions before each route. But It's not working as I expected.
This is router/index.js file.
const token = computed(() => useAuthStore()...
4
votes
1
answer
5k
views
VUE error : Discarded invalid param(s) "recordIds", "datasources" when navigating
in Vue i am facing an issue while passing params from one route to another.
This with what my target route looks like :
{
path: '/record-modification',
name: 'recordModification',
component: ...
0
votes
1
answer
2k
views
Vue - refresh state on clicking back button in the browser
I am developing a login page, which lists different provider options. If you click on a provider, it will redirect to the sign-in page of the respective provider. This login component has a bool ...
0
votes
1
answer
99
views
Vue route not being registered
I am trying to add a new route to an existing web app:
This is the entry point:
// main.js
import router from './router';
... etc
new Vue({
router,
... etc
render: (h) => h(App),
}).$mount('...
0
votes
0
answers
620
views
How can I pass props to route components in vue.js using Vue Router?
I'm still new to learning vue.js. I'm trying to introduce a dropdown menu into my website so I can simply navigate to other pages. The problem is when I try and pass props in the manner that the ...
0
votes
1
answer
65
views
Displaying VUE CDN
I can't display v-for using CDN
const Gallery = { template: '{{$t('gallery')}} <img :class="[[item.class]]" v-for="(item, index) in carousel" :src="[[item.img]]" alt=&...
0
votes
1
answer
95
views
Vue prop will pass through <router-view /> to child component 1, but not child component 2. Why?
In App.vue I am parsing JSON data from index.html, assigning it to data "parsedUser" and sending it as prop "user". "user" passes through to 1 of 2 child components ...
0
votes
1
answer
379
views
How can I implement Vue 3's built in KeepAlive component to cache a child component of a page so that it only calls it's API on first page load
My project is Vue 3, Vue Router 4, and I'm using script-setup.
I have a reporting page specified like this in my routes.js:
{
path: '/reporting',
name: 'reporting',
component: () =...
0
votes
2
answers
670
views
Close menu after changing route: VueJs3 + Tailwind (vue-router)
I am trying to createa nice navigation menu that's responsive and can be toggled in mobile.
When in mobile, I want the hamb menu to be opend on click and then close when I'm changig page.
But when I ...
1
vote
1
answer
2k
views
Problem: Unhandled error during execution of setup function and Unhandled error during execution of scheduler flush
I have a component UserView:
<template>
<div>
<div class="text-center w-full text-xl text-green-700" v-if="isLoading">
Loading...
</div>
<div ...
1
vote
1
answer
47
views
Сhanging number of buttons with different functions in Header-component
I would like to have a Header-component but with varying number of buttons and different functions that those buttons can trigger, for example, "visit about page", "trigger vuex action ...