소스 검색

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

Richard-Choooou 7 년 전
부모
커밋
4b628e9cf7
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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