iview ui vue2.0 radio 点击选中状态后取消选中状态

 
              
                1
                2
              

method: 

cancelSelection(selectedLabel) {
          if(this.modalType === 'U'){
            if (this.formData.deficiencyType == selectedLabel) {
             this.formData.deficiencyType = '';
               console.log(" this.formData.deficiencyType1: " +  this.formData.deficiencyType);
            }else{
               this.formData.deficiencyType=selectedLabel
            }
            }
            console.log(" this.formData.deficiencyType: " +  this.formData.deficiencyType);
      },

点击红框中的区域可以取消选中状态

但是点击数字这块区域就不行,

上面方法中 把this.formData.deficiencyType 重置为'',但最后输出打印还是1

 

你可能感兴趣的:(iview,view,design,前端,vue.js)