D
D
Dutymy2021-09-20 17:46:35
Vue.js
Dutymy, 2021-09-20 17:46:35

How to use Vue function in v-bind:value="foo(number)"?

Hello, I want to set the input to the default value that is processed by the function - how to do this
examplev-bind:value="foo(number)"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
low molecular macro, 2021-09-20
@molekulyarniy

hang watcher

A
Andrey Zlobin, 2021-09-22
@AndreyZlobin

watcher is a bad idea, try to make a computed property (computed) and pass it to :value="someComputedFunction"
To change you can subscribe to the @Input event, implement a function and change some state mediocre there
Although ideally see your case, what is required

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question