在不调用接口的情况下 使用了element ui table组件 点击某一行的checkBox 过滤当前选中数据
let tableData = [
{id:12334, date: '2016-05-03',name:'王小虎',address:'上海市普陀区金沙路1518号'},
{id:44212, date: '2016-05-02',name:'王小虎',address:'上海市普陀区金沙路1518号'}
]
let multipleSelection = [
{id:44212, date: '2016-05-02',name:'王小虎',address:'上海市普陀区金沙路1518号'}
]
deleted(){
if(multipleSelection.length < tableData.length){
let deleteId = multipleSelection.map(item =>item.id)
tableData = tableData.filter(item => !deletedId.includes(item.id))
}else{
alert('请至少保留一条数据')
}