C
C
chelkaz2019-01-24 12:30:14
Vue.js
chelkaz, 2019-01-24 12:30:14

How to get THIS of an element in a loop and pass it to a function?

<template v-for="(item, i) in orders">
     <input v-bind:max="item.max" v-bind:value="item.quantity"/>
</template>

methods: {
// как применить эту функцию к инпуту без кликов, именно в цикле, что бы получать в ней THIS.
     quantity: function(max, quantity) {
// тут мне нужно как то получить THIS инпута
}
 //
}

How to get THIS of this input when rendering a component and pass it to methods

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-01-24
@0xD34F Vue.js

Instead of clearly explaining what exactly you need, did you decide to duplicate the question? Oh well. I can repeat what I told you last time: put ref on the input, bypass the resulting array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question