<!DOCTYPE html>
<html>
<head>
<title>Disable input in Vue.js</title>
</head>
<body>
<div id="app">
<button @click="disabled = (disabled + 1) % 2">Switch</button>
<input type="text" :disabled="disabled == 1" />
<pre>{{ $data }}</pre>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<script>
new Vue({
el: "#app",
data: {
disabled: 0
}
});
</script>
</body>
</html>