直接上代码:
test.vue
<template>
<el-dialog title="选择页面"
:visible.sync="dialogVisible"
style="overflow:hidden"
width="650px"
height="350px"
append-to-body>
<div style='height:350px' >
<div v-scrollBarDiv >
<div class="row" style='height:300px;width:99%'>
<div style="border:1px solid #e9e9e9;margin-top:10px">
<el-table id="columnSelectTableId" ref="columnSelectTable"
:data="tableData.data"
stripe
@selection-change="onSelectionChange"
@row-click="rowClick"
:height="205"
style="width: 100%">
<el-table-column type="selection" label="选择" width="50" center></el-table-column>
<el-table-column prop="testId" label="id" align="center"></el-table-column>
<el-table-column prop="testName" label="名称" align="center"></el-table-column>
</el-table>