From 88a9845ddc192a39032f13ff5c95de4c3f9f3c09 Mon Sep 17 00:00:00 2001
From: tanjinzhou <415800467@qq.com>
Date: Thu, 24 Oct 2019 18:50:51 +0800
Subject: [PATCH] fix: simple Pagination input not work #1333

---
 components/vc-pagination/Pagination.jsx | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/components/vc-pagination/Pagination.jsx b/components/vc-pagination/Pagination.jsx
index b0963977a..1cc4c1576 100644
--- a/components/vc-pagination/Pagination.jsx
+++ b/components/vc-pagination/Pagination.jsx
@@ -170,10 +170,9 @@ export default {
         event.preventDefault();
       }
     },
-    handleKeyUp(event) {
-      const inputValue = event.target.value;
+    handleKeyUp(e) {
+      const value = this.getValidValue(e);
       const stateCurrentInputValue = this.stateCurrentInputValue;
-      let value;
 
       if (value !== stateCurrentInputValue) {
         this.setState({
@@ -181,11 +180,11 @@ export default {
         });
       }
 
-      if (event.keyCode === KEYCODE.ENTER) {
+      if (e.keyCode === KEYCODE.ENTER) {
         this.handleChange(value);
-      } else if (event.keyCode === KEYCODE.ARROW_UP) {
+      } else if (e.keyCode === KEYCODE.ARROW_UP) {
         this.handleChange(value - 1);
-      } else if (event.keyCode === KEYCODE.ARROW_DOWN) {
+      } else if (e.keyCode === KEYCODE.ARROW_DOWN) {
         this.handleChange(value + 1);
       }
     },