mirror of https://github.com/ElemeFE/element
				
				
				
			Pagination: use setCurrentValue when reassigning input value (#11608)
* Pagination: input bug currentValue in input component's data object didn't refresh when changeHandle emited * Update pagination.jspull/11641/head
							parent
							
								
									48c7bcc933
								
							
						
					
					
						commit
						23a2e8d9ee
					
				| 
						 | 
				
			
			@ -253,15 +253,16 @@ export default {
 | 
			
		|||
          const num = parseInt(value, 10);
 | 
			
		||||
          if (!isNaN(num)) {
 | 
			
		||||
            if (num < 1) {
 | 
			
		||||
              this.$refs.input.$el.querySelector('input').value = 1;
 | 
			
		||||
              this.$refs.input.setCurrentValue(1);
 | 
			
		||||
            } else {
 | 
			
		||||
              this.reassignMaxValue(value);
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        reassignMaxValue(value) {
 | 
			
		||||
          if (+value > this.$parent.internalPageCount) {
 | 
			
		||||
            this.$refs.input.$el.querySelector('input').value = this.$parent.internalPageCount;
 | 
			
		||||
          var internalPageCount = this.$parent.internalPageCount;
 | 
			
		||||
          if (+value > internalPageCount) {
 | 
			
		||||
            this.$refs.input.setCurrentValue(internalPageCount);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue