vue备用

handleCheck (item) {
      if (item.isChecked) {
        this.checkData.push(item.id)
        this.checkData = _.uniqWith(this.checkData, _.isEqual)
      } else {
        this.checkData = _.remove(this.checkData, i => i !== item.id)
      }
    },
<template slot="checkBox" slot-scope="props">
          <Checkbox v-model="props.scope.isChecked" @on-change="handleCheck(props.scope)"></Checkbox>
        </template>
{
          title: '选择',
          width: 50,
          type: 'template',
          slot: 'checkBox'
        },

 

posted @ 2018-09-27 15:36  知九  阅读(96)  评论(0编辑  收藏  举报