M
M
myr0kk2019-04-28 12:55:54
Vue.js
myr0kk, 2019-04-28 12:55:54

How in Vue.js in the input tag if the value is "Yes", then it will display the word "Correct", and if it enters "No", it will display "Incorrect"?

Need to do action only in vue.js

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nurlansu, 2019-04-28
@nurlansu

I suppose this can be achieved using computed properties. Something like this .

valid() {
  if (this.msg === 'Да') {
    return 'Правильно';
  }
  return this.msg === 'Нет' ? 'Неверно' : '';
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question