Explorar el Código

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

Richard-Choooou hace 7 años
padre
commit
4b628e9cf7
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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