如何在Vue.js中禁用按钮 [英] How to disable button in vuejs

查看:100
本文介绍了如何在Vue.js中禁用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在填写表格时禁用按钮当所有输入都填满时,将使用vuejs和laravel框架启用按钮

I want to make the button disabled during the form filling when all the inputs are filled the button will be enabled using vuejs and on laravel framework

我尝试通过简单地使

<button type="submit" class="btn btn-info" disabled>Next</button>

但是我不知道如何在vuejs中做到

but i didn't know how to do it in vuejs

推荐答案

只需将 disabled 属性绑定到布尔值,如

Just bind the disabled attribute to a boolean value like

<button :disabled='isDisabled'>Send Form</button>

此示例

这篇关于如何在Vue.js中禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆