diff --git a/examples/routers/select.vue b/examples/routers/select.vue index 4c935e1..301c753 100644 --- a/examples/routers/select.vue +++ b/examples/routers/select.vue @@ -2,8 +2,8 @@ {{model}} - - {{option.label}} + + {{option.label}} @@ -82,10 +82,13 @@ return item.label.toLowerCase() .indexOf(query.toLowerCase()) > -1; }); - }, 200); + }, 500); } else { this.options = []; } + }, + handleInput () { +// console.log(1) } }, mounted () { diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 95d07e0..b240da5 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -222,9 +222,12 @@ cb(child); } else if (child.$children.length) { _this.$nextTick(() => { - child.$children.forEach((innerChild) => { - find(innerChild, cb); - }); +// child.$children.forEach((innerChild) => { +// find(innerChild, cb); +// }); + }); + child.$children.forEach((innerChild) => { + find(innerChild, cb); }); } }; @@ -300,6 +303,7 @@ }, updateMultipleSelected (init = false, slot = false) { if (this.multiple && Array.isArray(this.model)) { + // todo 这里的 label 有问题,另删除字符时也有问题 let selected = this.remote ? this.selectedMultiple : []; for (let i = 0; i < this.model.length; i++) { -- libgit2 0.21.4