Carousel: fix item change handler blocked by debounce with multiple instances (#3380)

pull/3389/head
杨奕 2017-03-09 15:57:05 +08:00 committed by baiyaaaaa
parent e695088606
commit 12cefcf26a
1 changed files with 1 additions and 4 deletions

View File

@ -143,10 +143,6 @@ export default {
});
},
handleItemChange: debounce(100, function() {
this.updateItems();
}),
updateItems() {
this.items = this.$children.filter(child => child.$options.name === 'ElCarouselItem');
},
@ -217,6 +213,7 @@ export default {
},
created() {
this.handleItemChange = debounce(100, this.updateItems);
this.throttledArrowClick = throttle(300, true, index => {
this.setActiveItem(index);
});