A
A
Arthur2019-07-08 15:20:13
Vue.js
Arthur, 2019-07-08 15:20:13

Separate computed properties for form inputs how?

There is a form in it 2 inputs (and maybe more) after the input is filled, a class should be added to it, but the class is added for all inputs, how to arrange computed so that it only works on the filled input Link

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-07-08
@Artiiiii

No computed properties needed here, can be used to assign the name and password class:

:class="{ 'authorization__label--done': name }"

:class="{ 'authorization__label--done': password }"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question