소스 검색

Select: avoid stack overflow, fix #4106

pengchongfu 8 년 전
부모
커밋
36cc555f6e
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      packages/select/src/select.vue

+ 1 - 0
packages/select/src/select.vue

@@ -542,6 +542,7 @@
           return;
         }
         if (this.options.length === 0 || this.filteredOptionsCount === 0) return;
+        this.optionsAllDisabled = this.options.length === this.options.filter(item => item.disabled === true).length;
         if (!this.optionsAllDisabled) {
           if (direction === 'next') {
             this.hoverIndex++;