comand-component-library 3.3.39 → 3.3.40
Sign up to get free protection for your applications and to get access to all the features.
@@ -1627,13 +1627,13 @@ const ol = {
|
|
1627
1627
|
}
|
1628
1628
|
}
|
1629
1629
|
},
|
1630
|
-
|
1630
|
+
mounted() {
|
1631
1631
|
var e;
|
1632
|
-
window.addEventListener("resize", this.onViewportChange), (e = document.querySelector(this.parentSelector)) == null || e.addEventListener("scroll", this.onViewportChange);
|
1632
|
+
window.addEventListener("resize", this.onViewportChange), this.parentSelector === "body" ? window.addEventListener("scroll", this.onViewportChange) : (e = document.querySelector(this.parentSelector)) == null || e.addEventListener("scroll", this.onViewportChange);
|
1633
1633
|
},
|
1634
1634
|
unmounted() {
|
1635
1635
|
var e;
|
1636
|
-
window.removeEventListener("resize", this.onViewportChange), (e = document.querySelector(this.parentSelector)) == null || e.removeEventListener("scroll", this.onViewportChange);
|
1636
|
+
window.removeEventListener("resize", this.onViewportChange), this.parentSelector === "body" ? window.addEventListener("scroll", this.onViewportChange) : (e = document.querySelector(this.parentSelector)) == null || e.removeEventListener("scroll", this.onViewportChange);
|
1637
1637
|
},
|
1638
1638
|
computed: {
|
1639
1639
|
show() {
|
@@ -1647,7 +1647,7 @@ const ol = {
|
|
1647
1647
|
},
|
1648
1648
|
onBackToTop() {
|
1649
1649
|
var e;
|
1650
|
-
(e = document.querySelector(this.parentSelector)) == null || e.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
1650
|
+
this.parentSelector === "body" ? window.scrollTo({ top: 0, left: 0, behavior: "smooth" }) : (e = document.querySelector(this.parentSelector)) == null || e.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
1651
1651
|
}
|
1652
1652
|
}
|
1653
1653
|
}, al = ["title"];
|