@varlet/ui 2.9.4-alpha.1680198474264 → 2.9.4

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.
@@ -2,7 +2,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
2
2
 
3
3
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4
4
 
5
- import { computed, defineComponent, ref, watch, onBeforeUnmount, onDeactivated } from 'vue';
5
+ import { computed, defineComponent, ref, watch, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
6
6
  import { isPlainObject, toNumber } from '@varlet/shared';
7
7
  import { easeInOutCubic } from '../utils/shared.mjs';
8
8
  import { doubleRaf, getParentScroller, getScrollLeft, getScrollTop, nextTickFrame, requestAnimationFrame, scrollTo as varScrollTo, toPxNum } from '../utils/elements.mjs';
@@ -72,6 +72,7 @@ var __sfc__ = defineComponent({
72
72
  var stickyOffsetTop = computed(() => toPxNum(props.stickyOffsetTop));
73
73
  var zIndex = computed(() => props.zIndex);
74
74
  var scroller = null;
75
+ var isDeactivated = false;
75
76
  var indexBarProvider = {
76
77
  active,
77
78
  sticky,
@@ -137,7 +138,7 @@ var __sfc__ = defineComponent({
137
138
  call(props.onClick, anchorName);
138
139
  }
139
140
 
140
- if (anchorName === active.value) {
141
+ if (anchorName === active.value && !isDeactivated) {
141
142
  return;
142
143
  }
143
144
 
@@ -216,7 +217,20 @@ var __sfc__ = defineComponent({
216
217
  addScrollerListener();
217
218
  }));
218
219
  onBeforeUnmount(removeScrollerListener);
219
- onDeactivated(removeScrollerListener);
220
+ onDeactivated(() => {
221
+ isDeactivated = true;
222
+ removeScrollerListener();
223
+ });
224
+ onActivated(() => {
225
+ if (!isDeactivated || active.value === undefined) return;
226
+ anchorClick({
227
+ anchorName: active.value,
228
+ options: {
229
+ event: false
230
+ }
231
+ });
232
+ isDeactivated = false;
233
+ });
220
234
  return {
221
235
  n,
222
236
  classes,
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
241
241
  import './tooltip/style/index.mjs'
242
242
  import './uploader/style/index.mjs'
243
243
 
244
- const version = '2.9.4-alpha.1680198474264'
244
+ const version = '2.9.4'
245
245
 
246
246
  function install(app) {
247
247
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
160
160
  export * from './tooltip/index.mjs'
161
161
  export * from './uploader/index.mjs'
162
162
 
163
- const version = '2.9.4-alpha.1680198474264'
163
+ const version = '2.9.4'
164
164
 
165
165
  function install(app) {
166
166
  ActionSheet.install && app.use(ActionSheet)
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
+ import '../SnackbarSfc.css'
2
3
  import '../../styles/elevation.css'
3
4
  import '../../loading/loading.css'
4
5
  import '../../button/button.css'
5
6
  import '../../icon/icon.css'
6
7
  import '../snackbar.css'
7
8
  import '../coreSfc.css'
8
- import '../SnackbarSfc.css'