先说明一下,‘重点的地方’ 及‘ 常用的地方’基本都用文字说明了,可以仔细看一下
接触前端时间不长,大家可以一起交流分享自己的所得!
第一步,html 页面显示 table 样式直接复制
ref 及 change 还有columns 都是不可以少的 为了更好的得到数据
这上面是html中的代码
<div style="height:500px;overflow:scroll;">
<Table border ref="selection" @on-selection-change="handleSelectRow()" style="margin-top: 20px;" :columns="columns4" :data="tdata2"></Table>
</div>
第二步,放在data中的一些数据
data({
return{
columns4: [
// 重点说明:key 里面的值,是和后台的字段相对应的
{type: 'selection',width: 60,align: 'center'}, //这里是复选框
{title: '淘宝订单号',width:170,key: 'tbOrderCode'},
{title: '收货人姓名',width:100,key: 'taShrname'},