D
D
Denis Bukreev2016-08-16 17:20:21
JavaScript
Denis Bukreev, 2016-08-16 17:20:21

How to just show an attribute in VueJS?

Such a problem: you need to give checkboxes and selects with the checked and selected attribute, respectively.
But there is not a damn thing about this in the docks, there is only information about changing these elements, and how to make them selected in their original position is zero.
There is also a lot of information about working with attributes, but there is nothing how to simply print checkedor selected:
<input type="checkbox" checked>
And then again the problem arises that it is necessary not only to give the attribute state, but also return it when changed.
The documentation, of course, as always, only affects isolated cases, invented from the bulldozer, there would be no real situations to do.
How to implement such work with form elements?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2016-08-16
@denisbookreev

It is not clear what you mean by give and return, but in theory you need to v-model and set the model value = true, then the checkbox will be highlighted, and you can get the value when you need it.
Either set via :checked and catch the @change event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question