1.@keyup.space.native.prevent=’‘fun’’
在项目中使用
HTML
<el-button size="mini" type="danger"
@click="hDel(scope.row.id)"
@keyup.space.native.prevent="fun">删除</el-button>
JS
fun() {
console.log('空格')
}
2.$(’#id’).blur() // 使按钮失焦
3.this.buttonDisabled = true // 禁用按钮
<el-button @click=“clickFun” :disabled=“buttonDisabled”>点击< /el-button >