@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.
- package/es/index-bar/IndexBar.mjs +6 -11
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/sticky/Sticky.mjs +1 -3
- package/es/varlet.esm.js +2202 -2210
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +8 -15
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
|
@@ -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(
|
|
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
|
|
196
|
-
|
|
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) {
|
package/es/index.bundle.mjs
CHANGED
|
@@ -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
|
|
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
|
|
177
|
+
const version = '2.22.2'
|
|
178
178
|
|
|
179
179
|
function install(app) {
|
|
180
180
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/sticky/Sticky.mjs
CHANGED
|
@@ -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);
|