You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							37 lines
						
					
					
						
							987 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							37 lines
						
					
					
						
							987 B
						
					
					
				| export default { | |
|   data() { | |
|     return {} | |
|   }, | |
|   methods: { | |
|     // table-checkbox选择项发生变化时会触发该事件 | |
|     handleSelectionChange(val) { | |
|       if (val.length === this.dataList.length) { | |
|         this.$refs.checkfooter.cheackAllFooter = true | |
|       } else { | |
|         this.$refs.checkfooter.cheackAllFooter = false | |
|       } | |
|       this.currentTableList = val | |
|       console.log(this.currentTableList) | |
|     }, | |
|     // 全选 | |
|     cheackAllChange(tableRef) { | |
|       if (this.cheackAllFooter) { | |
|         this.$parent.$refs[tableRef].toggleAllSelection() | |
|       } else { | |
|         this.$parent.$refs[tableRef].clearSelection() | |
|       } | |
|     }, | |
|     // 反选 | |
|     cheackReverseClick(tableRef) { | |
|       this.dataList.forEach((row) => { | |
|         this.$parent.$refs[tableRef].toggleRowSelection(row) | |
|       }) | |
|     }, | |
|     // 取消 | |
|     cancelClick(tableRef) { | |
|       this.cheackAllFooter = false | |
|       this.cheackReverseFooter = false | |
|       this.$parent.$refs[tableRef].clearSelection() | |
|     } | |
|   } | |
| }
 |