A
A
Ankozar2021-05-09 11:48:43
Vue.js
Ankozar, 2021-05-09 11:48:43

How to pass this parameter to vue?

.... @change="clog(var)"

...
data: (){
return {var: 'text'}
}

methods: {clog(var){
        console.log(this.var)
     }}
...


Here he cannot deliver after the dot.
And syntax like this[var] Vue does not understand in this case.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-05-09
@yarkov Vue.js

syntax like this[var] Vue does not understand in this case.

What is it for? Always worked, but today is a special day? Somewhere you are dark.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question