Answer the question
In order to leave comments, you need to log in
How to add disable value to button in vue.js?
I found an example https://jsfiddle.net/asemahle/eo8kd2wd/
But I would like to know how to do this by the condition that the textarea is empty?
Answer the question
In order to leave comments, you need to log in
<template>
<div>
<textarea v-model="comment"></textarea>
<button :disabled="!comment">send</button>
</div>
</template>
<script>
export default {
name: 'my-component',
data() {
return {
comment: ''
}
}
}
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question