@mdsfe/mds-ui 0.4.10 → 0.4.11-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/backtop.js CHANGED
@@ -344,18 +344,21 @@ var easeInOutCubic = function easeInOutCubic(t, b, c, d) {
344
344
  }
345
345
  },
346
346
  mounted: function mounted() {
347
- var getTarget = this.target;
348
- this.scrollEvent = getTarget().addEventListener('scroll', this.handleScroll);
347
+ var target = this.target();
348
+ target.addEventListener('scroll', this.handleScroll);
349
349
  this.handleScroll();
350
- document.body.appendChild(this.$refs.BackTop);
350
+ if (this.$refs.BackTop) {
351
+ document.body.appendChild(this.$refs.BackTop);
352
+ }
351
353
  },
352
354
  beforeDestroy: function beforeDestroy() {
353
- document.body.removeChild(this.$refs.BackTop);
355
+ if (this.$refs.BackTop && this.$refs.BackTop.parentNode) {
356
+ this.$refs.BackTop.parentNode.removeChild(this.$refs.BackTop);
357
+ }
354
358
  },
355
359
  destroyed: function destroyed() {
356
- if (this.scrollEvent) {
357
- this.scrollEvent.remove();
358
- }
360
+ var target = this.target();
361
+ target.removeEventListener('scroll', this.handleScroll);
359
362
  },
360
363
 
361
364
  methods: {
@@ -8309,6 +8309,9 @@ quarter_component.options.__file = "components/datepicker/picker/quarter.vue"
8309
8309
  this.$emit('dodestroy');
8310
8310
  document.body.removeEventListener('keydown', this.handleKeydown);
8311
8311
  },
8312
+ beforeDestroy: function beforeDestroy() {
8313
+ document.body.removeEventListener('keydown', this.handleKeydown);
8314
+ },
8312
8315
  handleKeydown: function handleKeydown(event) {
8313
8316
  var keyCode = event.keyCode;
8314
8317
  var list = [38, 40, 37, 39];
package/dist/drawer.js CHANGED
@@ -877,6 +877,7 @@ var PREFIXCLS = 'mds-drawer';
877
877
  }
878
878
  },
879
879
  beforeDestroy: function beforeDestroy() {
880
+ this.move();
880
881
  if (this.appendToBody && this.$el && this.$el.parentNode) {
881
882
  this.$el.parentNode.removeChild(this.$el);
882
883
  }
package/dist/dropdown.js CHANGED
@@ -454,6 +454,8 @@ var proptype_ = __webpack_require__(8);
454
454
  mounted: function mounted() {
455
455
  var overlay = this.$refs.overlay;
456
456
  var dropdown = this.isButton ? this.$el : this.$slots.default[0].elm;
457
+ this.popper = overlay;
458
+ this.reference = dropdown;
457
459
 
458
460
  if (this.trigger === 'click') {
459
461
  dropdown.addEventListener('click', this.toggle);
@@ -465,9 +467,25 @@ var proptype_ = __webpack_require__(8);
465
467
  overlay.addEventListener('mouseleave', this.hide);
466
468
  }
467
469
  overlay.addEventListener('click', this.hide);
470
+ },
471
+ beforeDestroy: function beforeDestroy() {
472
+ var overlay = this.$refs.overlay;
473
+ var dropdown = this.reference;
468
474
 
469
- this.popper = overlay;
470
- this.reference = dropdown;
475
+ if (this.trigger === 'click') {
476
+ if (dropdown) dropdown.removeEventListener('click', this.toggle);
477
+ document.removeEventListener('click', this.clickDocument, true);
478
+ } else {
479
+ if (dropdown) {
480
+ dropdown.removeEventListener('mouseenter', this.show);
481
+ dropdown.removeEventListener('mouseleave', this.hide);
482
+ }
483
+ if (overlay) {
484
+ overlay.removeEventListener('mouseenter', this.show);
485
+ overlay.removeEventListener('mouseleave', this.hide);
486
+ }
487
+ }
488
+ if (overlay) overlay.removeEventListener('click', this.hide);
471
489
  }
472
490
  });
473
491
  // CONCATENATED MODULE: ./components/dropdown/dropdown.vue?vue&type=script&lang=js&