vue设置input不可编辑切换

html:

 <Input name="a" v-model="formValidate.coName" placeholder="请输入姓名" v-bind:disabled="diasabledInput"></Input>

 

script
<script>
    export default {
      
        data () {
          
            return {
                diasabledInput:false,
            }
        },
     methods: {
            handleSubmit:function () {
                  if(this.diasabledInput){
                   this.diasabledInput=false;
                }else{
                   this.diasabledInput=true;
                }
            }
    }

 

posted @ 2019-10-04 10:49 ___mouM 阅读(...) 评论(...) 编辑 收藏