Element-ui form table to achieve radio

                 

 

   Welcome scan code plus group, discuss, learn, grow!

 

 

 

<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       },

 

 

1       chooseMcaterialChange(val){
2         this.$refs.Table.toggleRowSelection(val)
3       },

 

Guess you like

Origin www.cnblogs.com/CinderellaStory/p/11918923.html