Questions tagged as 'vue.js'

1
answer

Multiple components in Vue.use

I'm using these components in my code Vue.use(Toaster, {timeout: 5000}) Vue.use(VueAlert) Vue.use(VueSweetAlert) Is there any way I can bind these three in just Vue.use ? Something like this ( incorrect ) Vue.use([ { Toa...
asked by 20.10.2017 / 15:49
1
answer

Error passing props with literal objects via v-bind="object"

In Vue it is described in the documentation that you want to pass all the properties of an object via props you can pass the same as # data do componente post: { title: 'Título da post', content: '...' } # template <blog-post v...
asked by 28.11.2018 / 03:09
1
answer

How to capture an event in a stub? [vue-test-utils]

I'm trying to test an event similar to this: // template: <form @submit.prevent="save"></form> const save = jest.fn() const wrapper = mount(MyComponent, {methods: { save }}) wrapper.find('form').trigger('submit.prevent') expect(sav...
asked by 23.11.2018 / 14:32
1
answer

Insert component after rendering Vue.js

Hi, I'm learning how to use Vue.js and so far I'm learning how to create components. But I'm having a problem, I'm trying to render a component after loading the page. I have a jQuery code that I want to use, but I do not know how to do it....
asked by 07.10.2018 / 15:14
1
answer

Computed v-for Vuejs

I have a v-for <div v-for="(m, ind) in arrayMeses" :key="ind" v-if="m" class="mes"> <table border="1" width="100%"> <tbody> <tr class="mes_title"> <td colspan="7" class="mes_...
asked by 22.09.2018 / 17:49
1
answer

Picking up data from axios and vues

I have a very strange problem, I have the following code inside a VueJS component. I'm developing a system where I choose the options through several checkboxes, and step the id of them for that my component below. And I use the axios to m...
asked by 27.06.2018 / 02:52
1
answer

V-for access and display list [closed]

How do I bring bullet items? Now I can access sliders using v-for="item in slider" :key="item.id" . In the <ul class="c-list-slider__bullets"> part, I had to bring bullet items, how do I get access to / bring item...
asked by 29.06.2018 / 20:54
1
answer

Access prop through watchers in VueJS

A similar problem has been solved in this issue: Access prop in method with VueJS Where prop was null since the ajax request of the parent component was not yet completed; but in my case the prop is undefin...
asked by 16.01.2018 / 19:28
1
answer

Pass input parameter to function

I ran into a problem, to pass the value of my input to my function without using v-model . I know it works that way <Input @click="func" /> func(val){ alert(val) } But I can not pass another parameter, eg: <Input @c...
asked by 21.12.2017 / 17:44
2
answers

Consume Json Vuejs2 with Axios

I'm trying a popular list with a JSON, but I'm having problems. I can only make the list by indexing the array, but only one item in the list goes, and I can not get it populated with all the items in the list. I do not know if I can be very cle...
asked by 27.11.2017 / 15:41