标签:method formatter ble methods 属性 exp his Matter tab
<el-table @row-click="clickRow" ref="moviesTable" :data="insertModel.tableData"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"/>
<el-table-column prop="name" label="电影名称" align="center" show-overflow-tooltip/>
<el-table-column prop="movieType" label="分类" width="100" align="center" :formatter="formatType"/>
</el-table>
<script>
export default {
methods: {
clickRow(row){
this.$refs.moviesTable.toggleRowSelection(row)
}
}
};
</script>
/* 在<el-table>标签中绑定
@row-click="clickRow" 单击事件 和 ref="moviesTable"属性
然后再单击事件的方法中,写
this.$refs.moviesTable.toggleRowSelection(row)
使用element中的table组件,如何单击某一行数据时选中对应的复选框
标签:method formatter ble methods 属性 exp his Matter tab
原文地址:https://www.cnblogs.com/yixiaoyang-/p/9779924.html