Category "vuejs2"

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

how to use color-thief in a vuejs context

I'm trying to import color-thief from NPM (https://github.com/lokesh/color-thief) like this: import ColorThief from 'colorthief' But when I call new ColorThi

vue-router redirect to default path issue

I want to default to a specific page when user navigates to the root path ie when used goes to myapp.com I want to redirect them to myapp.com/defaultpage My cu

What does slot mean in vue's render function

In vue, there is a slot option in render function, the document says "slot is the name of the slot, if this component is the child of another component". I can

The `/deep/` selector is not working using sass-loader in my VueJS application

In my Vue 2.6.10 webpack application I am trying to add SASS as our team wants to migrate our legacy application from LESS to SCSS. In my package.json I have in

Can't load Leaflet inside Vue component

I am trying to create a Leaflet map as a Vue component but I am having some difficult getting started. I installed Leaflet through npm Where am I going wrong?

How do I set initial state in Vuex 2?

I am using Vue.js 2.0 and Vuex 2.0 for a small app. I am initializing the store in the 'created' life-cycle hook on the root Vue instance by calling an action t

Watching computed properties

I have a component with the following hash { computed: { isUserID: { get: function(){ return this.userId? } } } Should I b

How to use background-image in inline styles in Nuxt.js

I have a .vue file where I want to use inline styles <img src="~static/img/info/production/pic4.jpg" class="t22" /> <a href="/page/fresco-art" class="b

Vue Router: hide parent template when child is open

Im trying to install Vue.js with the router and im running into some view issues. I have a router.js with child routes. I want to use this method for simple bre

Nuxt CSS properties declared on :root selector are not found

I have a Nuxt 2 app and I'd like to create a component with a <style> tag like the following, using CSS properties for styling. The goal is to define a de

[Vue warn]: Duplicate keys detected: x. This may cause an update error

I keep getting an error when I add an item to the array which has duplicate id. i.e. active_widgets:Array[4] 0:Object id:1 name:"Text Blocks" sel

Vuejs String formatting not working correctly

Hi am trying to style a div dynamically in VueJs.But facing this problem that the this.currentProgressLevel is not applied to the width property inside the curr

With vue-head head title is added on events page

I added https://github.com/ktquez/vue-head to vuejs app for head settings and it works differently I expect. When I open home page I have in title : “hom

Get element height with Vuejs

I want to get the height of a div in order to make the height of another div matching it. I used the method clientHeight, but It doesn't return me the good valu

Vue: How to enable multi page in an existing SPA project?

I have a single page (SPA) application written in Vue. Now I need a separate page that should be available without being signed in. To me it seems like a need t