Element-ui 表格table实现单选

                 

   欢迎扫码加群,一起讨论,共同学习成长!

<el-table :data="chooseMcaterialData" highlight-current-row border @selection-change="handleSelectionChange" @current-change="chooseMcaterialChange" ref="Table" >

1       handleSelectionChange(val) {
2         if (val.length > 1) {
3         this.$refs.Table.clearSelection()
4         this.$refs.Table.toggleRowSelection(val.pop())
5       } 
6         this.multipleSelection = val;
7       },

扫描二维码关注公众号,回复: 7952472 查看本文章
1       chooseMcaterialChange(val){
2         this.$refs.Table.toggleRowSelection(val)
3       },

猜你喜欢

转载自www.cnblogs.com/CinderellaStory/p/11918923.html