Questions tagged as 'vue.js-2'

2
answers

How to disable a bind conditionally with bind href in vue.js?

I have a project where you will have a dynamically populated area with vue.js. But items should be clickable or not depending on the level of each item. I know that in vue, you can use v-if , but everything inside these tags disappear if...
asked by 08.11.2018 / 00:18
2
answers

How to filter a list in vue with response ignoring accents and uppercase / lowercase?

I'm doing a filter of a list by name, it works, but if I have a name registered as Hi, the filter does not work when I write higor. computed: { filtered: function () { const search = this.configs.search const users = _.orderB...
asked by 26.08.2018 / 04:57
1
answer

Classes, Mixins or the Two?

Currently in my projects I started using Classes in JS, mainly in cases related to a certain specific element, for example, User, all HTTP requests or methods related to it I usually isolate in two classes to facilitate reuse. In t...
asked by 13.11.2018 / 15:44
1
answer

Multiple component calls in list

I have a basic user list with 4 columns ( NAME | EMAIL | PHONE | OPTIONS ). In the options column, for each table record I have an edit and remove button. I would like each edit button to trigger another component (edit-user-modal-component...
asked by 21.06.2018 / 16:30
1
answer

Variables in App.vue

I have inside the App.vue file the variable CustomerName {{nomeCliente}} I'm creating a function inside the App.vue to populate the variable this.$eventHub.$on('mostrarNome', function(value) { this.nomeCliente = value; }); which is...
asked by 01.05.2018 / 15:47
1
answer

Convert strings to CamelCase for kebab-case

I have a list of buttons ... <button @click="chamaEstilo($event)" :data-el="index" class="buttonEstilo" v-for="(item, index) in filteredList" :key="index" v-if="verificaRestricao(item)" > {{index}} </button> I would like you...
asked by 25.03.2018 / 04:07
1
answer

Vue 2: Get input value without using v-model

I'm already detecting when enter is pressed in input , how can I get the current value in> too? It can not be with v-model , because I need to leave a default value, as shown in the example below: HTML <div id="listas-page"&g...
asked by 22.01.2018 / 14:16
1
answer

Can not use v-for directive on prop passed to Vue component

Follow the code: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8" /> <title>Passagem de valores com VueJS</title> </head> <body> <div id="a...
asked by 14.10.2018 / 02:46
2
answers

Clear VUE v-model data at once

I have a Vue instance in which I get values from a form to send via ajax, I would like to clear the data saved by the v-models at once after sending, is it possible? new Vue({ el: '#app', data: { campo1: "", }, methods:{ saveForm:funct...
asked by 17.01.2018 / 18:56
2
answers

Difficulty removing item from inverted list in Vue

I'm picking up time to use list in Vue. An inverted list for a computed display is displayed on the screen. I need to show it reversed so when you add an item it appears at the top. However, the way I did Vue is lost in removing the correct item...
asked by 29.11.2017 / 20:37