Category "vuejs2"

How to wait for the middleware to finish before loading the page

I am on Vue2 and Nuxt. I want ended my requests in middleware before load page. How create that ? How can I wait for the end of my request before loading my pag

How to evaluate Vue.js component props in the data property?

I have 2 components: Post and Comments. Inside Post component, there is Comments component that has 3 props: postId, numCom (number of comments) and comments (

Vue3 webcomponents production build problem

I'm trying to migrate my vue2 webcomponent to vue3, although the problem comes when i'm creating a build for production. I was using the vue-cli with --target w

vue-router : router-link not working

I'm trying to use vue-router and router-link. When I click on the link, the URL updates correctly, but nothing is loaded into <router-view></router-vie

Change another module state from one module in Vuex

I have two modules in my vuex store. var store = new Vuex.Store({ modules: { loading: loading posts: posts } }); In the module loading

Overriding Vuetify variables when building a Vue2+Vuetify app with Vite

I'm trying to migrate a Vue2+Vuetify app from Vue-CLI/Webpack to Vite. The app has a couple of SCSS files, main.scss and variables.scss with the latter imported

Vue 2 - render components from an ajax response

Is there a way to render components that come from an ajax response? For example, I registered a component "Test" and in the ajax response I have: <p>d

Vuejs/Nuxtjs Unable to scope the styles to specific component when used with @import?

I am developing an application using Vuejs/Nuxtjs. I would like to import some styles from the external CSS file and would like to include those styles only to

Nuxt3 + Pinia + VueUse -> useStorage() not working

Setup: I'm using Nuxt3 + Pinia + VueUse. Goal: I want to save a state of a pinia store to localstorage via VueUse: useStorage. Problem: For some reason no item

vue cli - Uncaught SyntaxError: Unexpected token <

I create my project with vue-cli 3.0. Initially it runs ok. But after I <ctrl>-c then npm run serve again, it keep throwing error: Uncaught SyntaxErro

Prevent on click on parent A tag when clicking button inside

I have problems with product cards on index page. Inside product card I have Vue component to render form (quantity and add to cart button). When I click on add

How to use SignInWithRedirect with GoogleAuthProvider?

I am creating a Vue App (Vue version 2). I am using Firebase (Web version 9) as a database and for the authentication. I am using Google as Sign in method. On d

Draw d3-axis without direct DOM manipulation

Is there a way to use d3-axis without directly manipulating the DOM? D3.js complements Vue.js nicely when used for its helper functions (especially d3-scale).

Vuejs Webpack Compression Plugin not compressing

I need help debugging Webpack's Compression Plugin. SUMMARY OF PROBLEM Goal is to enable asset compression and reduce my app's bundle size. Using the Brotli alg

How to determine if vue.js is used in a site or web app?

Is there a command in console? Or a tell tale sign like ng directives used in angular for vue that let you know if it's used in a site or app?

Error (Unexpected Token) using optional chaining syntax in Node 14/Vue2.js

Optional chaining isn't working on my Vue.js (v2) project on Node 14.17. const adventurer = { name: 'Alice', cat: { name: 'Dinah' } }; const dogName

Vue 2; export 'default' (imported as 'firebase') was not found in 'firebase/app'

I'm trying to import firebase in a Vue 2 app, but I'm running into this annoying issue. My imports look like: import firebase from 'firebase/app' import 'fireba

How do I pass data in $router.push in Vue.js?

I am creating an alert component for a CRUD app using Vue.js. I want a message to be passed to another component once data has been saved. Currently I am trying

VueJS and Firebase, history mode 404 error when refresh

I removed the hashbang in the link with history mode in my router file. Now when I refresh a page I got the 404 error. I tried to follow this link then, I add

Vuex - Do not mutate vuex store state outside mutation handlers

Why do I get this error: Error [vuex] Do not mutate vuex store state outside mutation handlers. What does it mean? It happens when I try to type in the edit i