Skip to content

Tag: vue.js

Vue: applying css class if specific condition is met

I’m making a custom image slider using vuex, I want to apply a specific class to the dots used for navigating the sliders, so if the dot is active it will be applied a dotActive class. I want to use activeSlider variable for this This is the slider component: And my Slider Store: I know this could be made eas…

How can I create a custom loading indicator in Nuxt.js?

Inside this page (https://nuxtjs.org/api/configuration-loading-indicator#custom-indicators) says that I can create a custom loading indicator but not says how. Somebody can help me – how to create and set this into to nuxt.config? Answer Here is a collection of default loading indicators in Nuxt.js sour…

vue.js component inline style concatenation

I’m stuck with a vue.js component inline style concatenation. My code is the following: I’m trying to get procolors.user.profile_background_color as inline background color. Special is that the value from procolors.user.profile_background_color has no #. So I have to add this in the template. I tr…

Separate Array push in Vuejs

I am trying to get value from object and push into array using Vue. I wanted to separate every value when into different array every time I click my item. Every time I click todo should be push on different array, how I can separate to push into different array Answer Quick fix One solution is to change mytod…

Iterate over multiple lists simultaneously using vue.js

Is it possible to iterate over multiple lists simultaneously using JavaScript? The reason why I am focusing on vue.js is because, if this is possible, I would use it inside HTML tag. EDIT: A brief explanation how I am going to use it. This question is actually related to one that I have already asked before. …

Cannot render array items in v-for select menu

As a newbie to Vue.js, I’m trying to render this array: Into a select menu: And put UK as default selected item. But instead of Country codes, just cuntries being shown in the menu. How can I fix this? Answer To do what you want and set “UK” as a default add a ‘v-model’ to your s…