Browse Source

Rate: pressing nav keys shouldn't update value when disabled (#10726)

Richard-Choooou 7 years ago
parent
commit
4b628e9cf7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/rate/src/main.vue

+ 3 - 0
packages/rate/src/main.vue

@@ -278,6 +278,9 @@
       },
 
       handleKey(e) {
+        if (this.rateDisabled) {
+          return;
+        }
         let currentValue = this.currentValue;
         const keyCode = e.keyCode;
         if (keyCode === 38 || keyCode === 39) { // left / down