@varlet/ui 2.22.2-alpha.1706882566427 → 2.22.2

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.
@@ -115,10 +115,7 @@ const __sfc__ = defineComponent({
115
115
  anchorNameList.value = indexAnchors.filter(({ name: name2 }) => name2.value != null).map(({ name: name2 }) => name2.value);
116
116
  })
117
117
  );
118
- onSmartMounted(() => __async(this, null, function* () {
119
- yield setScroller();
120
- addScrollerListener();
121
- }));
118
+ onSmartMounted(setupScroller);
122
119
  onBeforeUnmount(removeScrollerListener);
123
120
  onDeactivated(() => {
124
121
  isDeactivated = true;
@@ -192,16 +189,14 @@ const __sfc__ = defineComponent({
192
189
  clickedName.value = "";
193
190
  });
194
191
  }
195
- function setScroller() {
196
- return __async(this, null, function* () {
197
- yield doubleRaf();
198
- scroller = getParentScroller(barEl.value);
199
- });
200
- }
201
- function addScrollerListener() {
192
+ function setupScroller() {
193
+ scroller = getParentScroller(barEl.value);
202
194
  scroller.addEventListener("scroll", handleScroll);
203
195
  }
204
196
  function removeScrollerListener() {
197
+ if (!scroller) {
198
+ return;
199
+ }
205
200
  scroller.removeEventListener("scroll", handleScroll);
206
201
  }
207
202
  function scrollTo(index, options) {
@@ -262,7 +262,7 @@ import './tooltip/style/index.mjs'
262
262
  import './uploader/style/index.mjs'
263
263
  import './watermark/style/index.mjs'
264
264
 
265
- const version = '2.22.2-alpha.1706882566427'
265
+ const version = '2.22.2'
266
266
 
267
267
  function install(app) {
268
268
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -174,7 +174,7 @@ export * from './tooltip/index.mjs'
174
174
  export * from './uploader/index.mjs'
175
175
  export * from './watermark/index.mjs'
176
176
 
177
- const version = '2.22.2-alpha.1706882566427'
177
+ const version = '2.22.2'
178
178
 
179
179
  function install(app) {
180
180
  ActionSheet.install && app.use(ActionSheet)
@@ -85,6 +85,7 @@ const __sfc__ = defineComponent({
85
85
  watch(() => props2.disabled, resize);
86
86
  onSmartMounted(() => __async(this, null, function* () {
87
87
  yield doubleRaf();
88
+ setupScroller();
88
89
  handleScroll();
89
90
  }));
90
91
  onSmartUnmounted(removeScrollListener);
@@ -132,9 +133,6 @@ const __sfc__ = defineComponent({
132
133
  }
133
134
  }
134
135
  function handleScroll() {
135
- if (!scroller) {
136
- setupScroller();
137
- }
138
136
  const fixedParams = computeFixedParams();
139
137
  if (fixedParams) {
140
138
  call(props2.onScroll, fixedParams.offsetTop, fixedParams.isFixed);