Category "vuejs2"

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

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

Vue: Failed to compile (Strings must use singlequote)

I've been working with Visual Studio Code for two days now. I try to build a Vue-Application. But always when I run the application by npm run serve, I get the

Vue select tag on change not firing when selecting the same option

I have a select tag that should trigger function when an option is selected. <select id="selector" class="form-control" @change="executeAction" v-model="sele

How to use router in vue composition api?

I defined a route in vue: /users/:userId Which point to UserComponent: <template> <div>{{username}}</div> </template> and I use

Using formula.js on vue.js

I am trying to use formulja.js in a Vue project. When I import it and try to use PPMT function I am getting this error. I can't define what the error is and how