下面展示一些 内联代码片
。
`<el-table :data="zcList" border ref="mainTable" v-loading="dataListLoading"`
`@selection-change="selectionChangeHandle"`
`style="width: 100%;height: 400px">`
if (this.planZcList.length > 0) {
for (let i = 0; i < this.zcList.length; i++) {
for (let j = 0; j < this.planZcList.length; j++) {
if (this.zcList[i].id == this.planZcList[j].zcId) {
this.$nextTick(function () {
this.$refs.mainTable.toggleRowSelection(this.zcList[i], true)
})
}
}
}
}
效果展示