el-radio-group点击取消单选

  <el-radio-group
                        v-model="form.cognitive"
                        :disabled="detail"
                      >
                        <el-radio
                          label="1"
                          :disabled="detail"
                          style="width: 135px"
                          @click.native="clickitem('1')"
                          >粗筛阴性</el-radio
                        >
                        <el-radio
                          label="2"
                          :disabled="detail"
                          style="width: 135px"
                          @click.native="clickitem('2')"
                          >粗筛阳性</el-radio
                        >
                      </el-radio-group>
                      
clickitem(e){
      if (this.flags === true) {
        this.form.cognitive === e ? this.form.cognitive = '' : this.form.cognitive= e
      }
      this.flags = true
      setTimeout(() => {
        this.flags = false
      }, 300)
    },

你可能感兴趣的:(java,vue.js,elementui)