js内置禁用按钮 disabled
按钮在监听到disabled后面的布尔值就可以实现是否禁用
一:
<button :disabled="book.count <= 1" @click="decrement(index)">-</button>
二:
<button onclick="this.disabled='true'; console.log(this.isDisabled);">Disable Me</button>
一:
<button :disabled="book.count <= 1" @click="decrement(index)">-</button>
二:
<button onclick="this.disabled='true'; console.log(this.isDisabled);">Disable Me</button>