element表格复选框回显,取消选择

this.dataList = response.rows
                    this.tableColumnList=response.tableColumnList
                    this.queryParams.total=response.total
                
                    if (this.pointitle=='修改') {
                        console.log("xxxx")
                        let arr=this.dataList
                        let arr1=this.tags
                        this.$nextTick(()=>{
                        arr.forEach((row)=>{
                            arr1.forEach((row1)=>{
                                if (row1.id==row.id) {
                                    this.$refs.dataList.toggleRowSelection(row,true)
                                }
                                })
                            })
                        })
                    } else {
                    //    取消选择
                        this.$refs.dataList.clearSelection()
                    }

你可能感兴趣的:(javascript,前端,开发语言)