@veritree/ui 0.65.2 → 0.66.0
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative flex snap-start overflow-x-scroll">
|
|
2
|
+
<div class="relative flex snap-start overflow-x-scroll [&>*]:shrink-0">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
this.$el.removeEventListener('scrollend', this.
|
|
24
|
+
this.$el.removeEventListener('scrollend', this.onScroll);
|
|
25
25
|
this.mutationObserver.disconnect(this.$el);
|
|
26
26
|
},
|
|
27
27
|
|
|
@@ -55,13 +55,14 @@ export default {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Adds an event listener to the current element to listen for the 'scrollend' event
|
|
58
|
-
* and invokes the '
|
|
58
|
+
* and invokes the 'onScroll' method when the event is triggered.
|
|
59
59
|
*/
|
|
60
60
|
addEventListeners() {
|
|
61
|
-
|
|
61
|
+
console.log('Add event listener');
|
|
62
|
+
this.$el.addEventListener('scroll', this.onScroll);
|
|
62
63
|
},
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
onScroll() {
|
|
65
66
|
this.apiCarousel().isLeftEndReached();
|
|
66
67
|
this.apiCarousel().isLeftStartReached();
|
|
67
68
|
},
|