6,203 questions
1
vote
2
answers
51
views
Vue/Laravel - Mail URL mismatch leads to app root
Vue-Laravel-based environment, Mail sent to user with URL leads to a specific path on application - not app root - , on click it indeed redirects to required path - browser URL bar detects required ...
-1
votes
1
answer
77
views
How to safely redirect to /login without crashing on heavy page renders?
I’m running into an issue with Nuxt 4 / Vue 3 where I need to redirect the user to /login immediately after logging them out or when a token expires. The problem is that if I call navigateTo('/login') ...
0
votes
1
answer
53
views
waiting for a page to load resources with vue-router - equivalent to window.onload?
i'm developing a game with vue.js & vue-router. this often involves fairly large image assets!
working in vanilla javascript, i've approached this with window.onload, displaying a div that only ...
0
votes
0
answers
30
views
Vue 3 Payment Success Page API Called Twice in Production After Stripe Redirect
I'm building a Vue 3 SPA with Vuex and Vue Router. On my Payment Success page, I call an API to assign purchased drinks:
created() {
this.buyDrink()
},
methods: {
buyDrink() {
const payload = ...
0
votes
1
answer
108
views
Scroll Behavior issue with Vue Router and Vite
I've set up a front-end environment with Vue.js, Vite, and Vue Router.
When I navigate between pages, the scroll position is remembered, causing the new page to start at the previous location instead ...
1
vote
0
answers
49
views
Avoid duplicated base URL when serving Vue SPA index.html locally and assets from CDN via Nginx
I’m hosting a Vue.js single-page application using history mode routing. The app’s static assets (JavaScript, CSS, images) are stored on DigitalOcean Spaces CDN, with the Vue app’s publicPath ...
0
votes
1
answer
40
views
Using properties in router-link to field
I have a list of items each with a name and numerical ID. Each one I want to render as a component with a link to a page for that item. This requires me to have a <router-link> tag. I cannot ...
0
votes
1
answer
54
views
Vue Router Does Not Replace the Whole Path
The route I'm having trouble is the below one:
{ path: "/report/:reportid", component: ReportPage, name: "ReportPage", props: true, meta: { requiresAuth: true }}
This page hooks a ...
1
vote
0
answers
38
views
Getting back same point after link at infinite scrolling?
I’m a Vue developer and I use @tanstack/vue-query to fetch data. I have a page with cards wrapped in router-link and infinite scrolling.
The problem is when I scroll many times, go to a card (navigate ...
0
votes
0
answers
49
views
How can I pass a parameter in vue 3
I am learning learning Vue/JavaScript for the first time and I've ran into a problem I am unable to figure out. I am trying to pass a some data I need to the next page via a parameter. Every time I ...
0
votes
1
answer
417
views
Why is useRouter() always returning undefined in my library
I have a vue.js library thats supposed to be kinda simple i just have a custom function for creating a vue app like this:
import AppComp from "./components/App.vue";
export const ...
0
votes
0
answers
35
views
Vue router lazy loading not rendering
I'm trying to convert a react project to vue, for educational purposes only. Instead of using RouterLink, I used a regular anchor like:
<li><a href='#' @click="handleNavMenu('/URL')"...
0
votes
0
answers
83
views
404 error when refreshing browser in Vue app
I have a Vue 3 app that utilizes the Composition API, Vue Router w/ history mode, Vite, Vuetify and Typescript.
When I refresh the browser on a different page, I get a 404 error, and I'm pretty ...
0
votes
0
answers
30
views
Nuxt not recognizing directory in interpolated route
I am attempting to create an image link in Nuxt component
<NuxtLink
v-if="player?.image_url"
:to="`/players/${player.slug}`"
>
&...
2
votes
1
answer
234
views
How to use Vuetify in Vue SFC Playground?
I am trying to use both Vue Router and Vuetify in Vue SFC Playground. I began with the Vue Playground example of Vue Router (taken from Getting Started). This had Vue Router already imported, so I ...
1
vote
1
answer
65
views
Lazy Loading Routes with conditions
My routes.js is:
{...
path: ":term",
name: "some-name",
component: () => import("../path/to/com.vue")
}
...
Question is:
How to make smth like this and make it ...
0
votes
0
answers
29
views
Convert Vue-Router routes to Nuxt pages - issue with nested routes and params
I have the following route defined in my Vue2 app:
classes: {
path: "/:type(workout|relax)",
name: "classes",
component: () => import("@/views/Classes.vue&...
1
vote
1
answer
50
views
Declaring object.prototype in js - VueRouter it automatically calls a method
I declared an extension method for objects by creating my own function. However, I do not call or import it anywhere. As a result, I get an exception. How can I fix this? I don't recall such behavior ...
0
votes
2
answers
99
views
How to create a url-indexed lightbox modal in Nuxt 3 without losing scroll position when it opens?
Problem: when opening a modal / lightbox in my Nuxt app, it resets scrolling of the parent page.
Two criteria seem to clash:
Keep the scroll position intact when opening the modal
Opening the modal ...
0
votes
1
answer
62
views
Vue components keep the old state even when replaced
const queryKey = ref("userData");
const { data, isLoading, error } = useQuery({
queryKey: [queryKey], // Chave única para identificar a consulta
queryFn: async () => {
...
1
vote
2
answers
91
views
Google pages indexation on a Vue.js2 Application ( + Vue router)
Hi folks! o/
I have a few-year-old personal website that I don't use much, but recently, I wanted to check its Google indexation for practice purposes.
Techs used : [ Vue.js2 + Vue-router ]
It's a 5-...
1
vote
1
answer
54
views
Vue 3 Router not displaying the path in the browser
I am migrating from Vue2 to Vue3. The router seems to work properly in the sense that I am being redirected to the correct components, but the url in the browser window does not update i.e. I am in ...
0
votes
0
answers
46
views
Product Detail page not routing in vue js
I have a product list page and productdetails page. When I click on the card of the product,it should go to that product detail page with the ID passed, but it doesnt happen.
I have two console.log. ...
0
votes
0
answers
70
views
How to generate page routes automatically based on "/pages" folder?
I am building an SPA with Nuxt and from the documentation I got the idea that all *.vue files under /pages folder will be automatically used to generate routes. When I run my app locally the routing ...
1
vote
1
answer
220
views
How can I use nested routes in Nuxt 3 to create route-based layouts at the root path (`/`)?
I'm new to Nuxt 3, and I'm trying to replicate some route behavior I implemented with Vue Router in a Nuxt 3 project. Specifically, I want to use nested routes to create route-based layouts for ...
0
votes
2
answers
69
views
How to show two view on the same page in Vue?
Suppose I have a view to show a list of table and a view to show the form, with the route on below:
path: '/projects',
component: Project,
children: [
{
alias: '',
...
0
votes
0
answers
74
views
"NetworkError when attempting to fetch resource" with vue router 4, vue 3 and vuex 4
after an update, going from ‘vue js 2’ to ‘vue js 3’, ‘vue-router 3’ to ‘vue-router 4’ and ‘vuex 3’ to ‘vuex 4’, I'm trying to fix my code so that it all works with Laravel.
This code worked before ...
0
votes
1
answer
169
views
How to setup multiple vue spa-apps on single server with nginx
I've encountered a task to run multiple vue spa apps with their own router on a single linux server.
In my case there is one backend that should serve two vue apps both on vite using nginx.
Both apps ...
1
vote
1
answer
328
views
Vue router returns a 404 on refresh of a Vite MPA app
I'm building a web app in Vue3 and using Vite to serve it during development. The app is split into three parts - management, user and login. Each of these will call the same backend.
The intention is ...
-1
votes
1
answer
57
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
33
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
162
views
Route parameter for modal dialog using unplugin-vue-router
I'd like to create modal dialog pop-up window with it's own url.
Having table of server items I'd like to open one item and trigger pop-up with it's own url with fetched server item details. The pop-...
0
votes
0
answers
68
views
TypeError: u.then is not a function in Vue3+Vue router
Console Error
TypeError: u.then is not a function
at index-CyodobdF.js:26:14273
at Object.runWithContext (index-CyodobdF.js:14:10931)
at we (index-CyodobdF.js:26:19934)
at index-...
0
votes
1
answer
74
views
Vue Router: Force users to change password after first login
Basically, im creating users with a default password and a hasDefaultPassword boolean property set to true and after the login screen i want to force users to change the password and set ...
0
votes
0
answers
29
views
Data Fetching with suspense and route params in Vue3 Composition Api
this is children component
<script setup>
import { computed, ref, watch, watchEffect } from 'vue'
import { useRoute } from 'vue-router'
import dataSource from '../../data.json'
import ...
0
votes
0
answers
60
views
How to get authorization header in Vue project?
I have a project written on Vue and uses Vue Router. I want to get Authorization header. As I can understand, Vue Router manages requests and route components. There is a method beforeEach in router ...
0
votes
0
answers
66
views
Page requires definePageMeta, otherwise remote error 500 occurs
When deploying my Nuxt app on Heroku, I encountered a strange 500 error which I was unable to reproduce locally or see any relevant warning about. I want to squash this and not have it bite me again ...
0
votes
0
answers
200
views
VueJS 3 .vite Error Loading module from `node_modules/.vite/deps/chunk*` blocked because of a disallowed MIME type ("") FireFox
I have a VueJS 3 application with Pinia stores and Primevue JS library hosted in an EC2 bucket and recently out of no where I am getting these errors that are preventing the page from loading, oddly ...
0
votes
1
answer
84
views
Data Lost Between Routes in Vue.js on Refresh
I'm working on a Vue.js application using Vue Router and Axios to fetch user data. I have two pages: /dashboard and /dashboard/me. The data for the /dashboard page is successfully loaded and displayed,...
0
votes
0
answers
106
views
Nuxt 3 Blog: Article Changes When Language Changes, but Slug Does Not Update
I'm working on a multilingual blog using Nuxt 3, and I'm experiencing an issue where the article content updates correctly when the language is changed, but the slug in the route does not update ...
0
votes
1
answer
33
views
Syncfusion ejs-grid child grid icon navigates away from page
I'm trying to add a child grid to a Syncfusion ejs-grid in Vue.
The problem I'm having is that the arrow that is added to the row to allow you to expand a row is causing navigation when I click it.
...
0
votes
0
answers
71
views
Vue.js App Deployed on Render Returns “Not Found” for Sub-Pages or Direct URL Access
I have a Vue.js application built with Vue Router and deployed on Render. The app works perfectly when navigating between pages using Vue Router links. However, I encounter an issue when:
1. ...
0
votes
0
answers
24
views
how should i modify this.$route.query.comment?
The initial number of comments is obtained by passing parameters from another component through routing.This component with a form has the function of deleting comments and can return the total number ...
0
votes
1
answer
37
views
How to include the children of a route when creating a middleware?
I have created a global auth middleware but need to check if you are going to any route in /dashboard and its subroutes like /dashboard/account or /dashboard/settings.
The middleware below is a very ...
0
votes
0
answers
137
views
Augmenting global properties without removing vue-router augmentations
I am developing two plugins that will be used by multiple vue apps. One adds the global property $routes and the other one $auth.
I want the vue apps that use the plugins to know the types of said ...
0
votes
2
answers
66
views
ARGON dashboard router / problems adjusting the routes
I'm having problems customizing the routes.js. I would like to go directly to the login (Login.vue) when I initially call it with / or /login. How can I customize the default routes.js correctly? The ...
0
votes
0
answers
71
views
Pinia State not saved for components in different routes
When I mutate the Pinia state defined as an array (by pushing elements to it), I can't see the corresponding change from the component in another route.
The state changes can be checked in the same ...
0
votes
0
answers
148
views
Vue router suspense triggers the first time but not the second time
so I followed the Vue docs and created a wrapper for the pages so that I can use top-level await. The first time the page is loaded, it works correctly and shows me the spinner. the second time I come ...
0
votes
0
answers
50
views
Vue router doesn't stay in the same page after page refresh
Here's the translation:
I am working on a project using Vue^3.4.21, vue-route: ^4.3.0, and VITE ^5.2.8, and I have the following problem: if I am on the page /someanotherpath and press F5 to refresh ...
0
votes
2
answers
128
views
Pass variables with vue 3 router
I have a newsCard component in vue 3 using options API. When the user clicks on this card I want them to go to a page displaying the full news article. However, I need to pass some data to this full ...