|
@@ -25,7 +25,6 @@
|
|
|
|
|
|
<script>
|
|
|
import Popup from 'element-ui/src/utils/popup';
|
|
|
- import throttle from 'throttle-debounce/throttle';
|
|
|
import emitter from 'element-ui/src/mixins/emitter';
|
|
|
|
|
|
export default {
|
|
@@ -98,12 +97,12 @@
|
|
|
this.$emit('input', val);
|
|
|
if (val) {
|
|
|
this.$emit('open');
|
|
|
- this.$el.addEventListener('scroll', this.throttledUpdatePopper);
|
|
|
+ this.$el.addEventListener('scroll', this.updatePopper);
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.dialog.scrollTop = 0;
|
|
|
});
|
|
|
} else {
|
|
|
- this.$el.removeEventListener('scroll', this.throttledUpdatePopper);
|
|
|
+ this.$el.removeEventListener('scroll', this.updatePopper);
|
|
|
this.$emit('close');
|
|
|
}
|
|
|
}
|
|
@@ -130,10 +129,6 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- created() {
|
|
|
- this.throttledUpdatePopper = throttle(100, this.updatePopper);
|
|
|
- },
|
|
|
-
|
|
|
mounted() {
|
|
|
if (this.value) {
|
|
|
this.rendered = true;
|