R
R
Ruslan Absalyamov2018-09-22 18:15:24
Vue.js
Ruslan Absalyamov, 2018-09-22 18:15:24

How can I make it easier to display the button with all the inputs filled?

I have such an example https://jsfiddle.net/rusline/eywraw8t/389024/
That is, I approximately did there that I hung an event on the inputs, but is there any other way to set the value of the button to true?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-09-22
@rusline18

The onButton method and the button property are not needed - a computed showButton property is enough, like this :
<button v-show="showButton">

computed: {
  showButton() {
    return this.username !== '' && this.password !== '';
  },
},

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question