Compare commits

..

No commits in common. "dd2d9466c37df59924ba44e1476e01c06a24fa87" and "4a24198c436db5397b99f0c65576a7ba314f3b90" have entirely different histories.

1 changed files with 3 additions and 12 deletions

View File

@ -9,7 +9,7 @@
<template> <template>
<div class="sc-form-table" ref="scFormTable"> <div class="sc-form-table" ref="scFormTable">
<el-table :data="data" row-key="id" highlight-current-row ref="table" border :height="tableHeight" @select="select" @select-all="selectAll"> <el-table :data="data" ref="table" border :height="tableHeight" @select="select" @select-all="selectAll">
<el-table-column v-if="canMultiple" type="selection" width="45"></el-table-column> <el-table-column v-if="canMultiple" type="selection" width="45"></el-table-column>
<el-table-column type="index" width="50" fixed="left"> <el-table-column type="index" width="50" fixed="left">
<template #header> <template #header>
@ -124,7 +124,7 @@
}, },
// //
select(rows, row){ select(rows, row){
var isSelect = rows.length && rows.indexOf(row) !== -1&& this.defaultValue.indexOf(row) !== -1 var isSelect = rows.length && rows.indexOf(row) !== -1
if(isSelect){ if(isSelect){
this.defaultValue.push(row) this.defaultValue.push(row)
}else{ }else{
@ -147,16 +147,7 @@
} }
this.$emit('selectAllChange', this.defaultValue); this.$emit('selectAllChange', this.defaultValue);
}, },
setCurrentRows(row){ }
let that = this;
that.$nextTick(() => {
that.$refs.table.toggleRowSelection(row, true);
that.defaultValue.push(row)
this.$emit('selectChange', this.defaultValue);
})
},
},
} }
</script> </script>