Merge pull request #2540 from Leopoldthecoder/dev

Select: fix disabled multiple filterable bug, add missing scrollbar s…
pull/2345/head^2
baiyaaaaa 2017-01-22 14:42:24 +08:00 committed by GitHub
commit 1f46067055
6 changed files with 9 additions and 3 deletions

View File

@ -26,6 +26,7 @@
class="el-select__input"
:class="`is-${ size }`"
@focus="visible = true"
:disabled="disabled"
@keyup="managePlaceholder"
@keydown="resetInputState"
@keydown.down.prevent="navigateOptions('next')"
@ -364,10 +365,11 @@
getOption(value) {
let option;
for (let i = 0, len = this.cachedOptions.length; i < len; i++) {
for (let i = this.cachedOptions.length - 1; i >= 0; i--) {
const cachedOption = this.cachedOptions[i];
if (cachedOption.value === value) {
option = cachedOption;
break;
}
}
if (option) return option;
@ -513,8 +515,8 @@
if (option.created) {
this.query = '';
this.inputLength = 20;
this.$refs.input.focus();
}
if (this.filterable) this.$refs.input.focus();
}
},

View File

@ -515,7 +515,7 @@
--steps-border-radius: 4px;
--steps-padding: 20px;
/* Steps
/* Menu
--------------------------*/
--menu-item-color: var(--link-color);
--menu-item-fill: var(--color-extra-light-gray);

View File

@ -8,3 +8,4 @@
@import "./date-picker/time-range-picker.css";
@import "./date-picker/time-picker.css";
@import "./input.css";
@import "./scrollbar.css";

View File

@ -5,6 +5,7 @@
@import "./tag.css";
@import "./option.css";
@import "./option-group.css";
@import "./scrollbar.css";
@component-namespace el {

View File

@ -2,3 +2,4 @@
@import "./date-picker/time-spinner.css";
@import "./date-picker/time-picker.css";
@import "./input.css";
@import "./scrollbar.css";

View File

@ -1,6 +1,7 @@
@import "./date-picker/picker.css";
@import "./date-picker/date-picker.css";
@import "./common/var.css";
@import "./scrollbar.css";
.time-select {
margin: 5px 0;