Sfoglia il codice sorgente

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

Richard-Choooou 7 anni fa
parent
commit
4b628e9cf7
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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