@varlet/ui 2.22.1 → 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 +7 -15
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/sticky/Sticky.mjs +17 -15
- package/es/test/style/index.mjs +0 -0
- package/es/varlet.esm.js +2695 -2706
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +25 -31
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/lib/varlet.cjs.js
CHANGED
|
@@ -9723,7 +9723,11 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9723
9723
|
const offsetTop = vue.computed(() => toPxNum(props2.offsetTop));
|
|
9724
9724
|
let scroller;
|
|
9725
9725
|
vue.watch(() => props2.disabled, resize);
|
|
9726
|
-
onSmartMounted(
|
|
9726
|
+
onSmartMounted(() => __async$c(this, null, function* () {
|
|
9727
|
+
yield doubleRaf();
|
|
9728
|
+
setupScroller();
|
|
9729
|
+
handleScroll();
|
|
9730
|
+
}));
|
|
9727
9731
|
onSmartUnmounted(removeScrollListener);
|
|
9728
9732
|
onWindowResize(resize);
|
|
9729
9733
|
useEventListener(() => window, "scroll", handleScroll);
|
|
@@ -9762,15 +9766,24 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9762
9766
|
isFixed: false
|
|
9763
9767
|
};
|
|
9764
9768
|
}
|
|
9765
|
-
function
|
|
9766
|
-
|
|
9767
|
-
|
|
9769
|
+
function setupScroller() {
|
|
9770
|
+
scroller = getParentScroller(stickyEl.value);
|
|
9771
|
+
if (scroller !== window) {
|
|
9772
|
+
scroller.addEventListener("scroll", handleScroll);
|
|
9768
9773
|
}
|
|
9774
|
+
}
|
|
9775
|
+
function handleScroll() {
|
|
9769
9776
|
const fixedParams = computeFixedParams();
|
|
9770
9777
|
if (fixedParams) {
|
|
9771
9778
|
call(props2.onScroll, fixedParams.offsetTop, fixedParams.isFixed);
|
|
9772
9779
|
}
|
|
9773
9780
|
}
|
|
9781
|
+
function removeScrollListener() {
|
|
9782
|
+
if (!scroller || scroller === window) {
|
|
9783
|
+
return;
|
|
9784
|
+
}
|
|
9785
|
+
scroller.removeEventListener("scroll", handleScroll);
|
|
9786
|
+
}
|
|
9774
9787
|
function resize() {
|
|
9775
9788
|
return __async$c(this, null, function* () {
|
|
9776
9789
|
isFixed.value = false;
|
|
@@ -9778,17 +9791,6 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9778
9791
|
computeFixedParams();
|
|
9779
9792
|
});
|
|
9780
9793
|
}
|
|
9781
|
-
function addScrollListener() {
|
|
9782
|
-
return __async$c(this, null, function* () {
|
|
9783
|
-
yield doubleRaf();
|
|
9784
|
-
scroller = getParentScroller(stickyEl.value);
|
|
9785
|
-
scroller !== window && scroller.addEventListener("scroll", handleScroll);
|
|
9786
|
-
handleScroll();
|
|
9787
|
-
});
|
|
9788
|
-
}
|
|
9789
|
-
function removeScrollListener() {
|
|
9790
|
-
scroller !== window && scroller.removeEventListener("scroll", handleScroll);
|
|
9791
|
-
}
|
|
9792
9794
|
return {
|
|
9793
9795
|
stickyEl,
|
|
9794
9796
|
wrapperEl,
|
|
@@ -15945,16 +15947,10 @@ const __sfc__$F = vue.defineComponent({
|
|
|
15945
15947
|
() => length.value,
|
|
15946
15948
|
() => __async$6(this, null, function* () {
|
|
15947
15949
|
yield doubleRaf();
|
|
15948
|
-
indexAnchors.
|
|
15949
|
-
if (name2.value)
|
|
15950
|
-
anchorNameList.value.push(name2.value);
|
|
15951
|
-
});
|
|
15950
|
+
anchorNameList.value = indexAnchors.filter(({ name: name2 }) => name2.value != null).map(({ name: name2 }) => name2.value);
|
|
15952
15951
|
})
|
|
15953
15952
|
);
|
|
15954
|
-
onSmartMounted(
|
|
15955
|
-
yield setScroller();
|
|
15956
|
-
addScrollerListener();
|
|
15957
|
-
}));
|
|
15953
|
+
onSmartMounted(setupScroller);
|
|
15958
15954
|
vue.onBeforeUnmount(removeScrollerListener);
|
|
15959
15955
|
vue.onDeactivated(() => {
|
|
15960
15956
|
isDeactivated = true;
|
|
@@ -16028,16 +16024,14 @@ const __sfc__$F = vue.defineComponent({
|
|
|
16028
16024
|
clickedName.value = "";
|
|
16029
16025
|
});
|
|
16030
16026
|
}
|
|
16031
|
-
function
|
|
16032
|
-
|
|
16033
|
-
yield doubleRaf();
|
|
16034
|
-
scroller = getParentScroller(barEl.value);
|
|
16035
|
-
});
|
|
16036
|
-
}
|
|
16037
|
-
function addScrollerListener() {
|
|
16027
|
+
function setupScroller() {
|
|
16028
|
+
scroller = getParentScroller(barEl.value);
|
|
16038
16029
|
scroller.addEventListener("scroll", handleScroll);
|
|
16039
16030
|
}
|
|
16040
16031
|
function removeScrollerListener() {
|
|
16032
|
+
if (!scroller) {
|
|
16033
|
+
return;
|
|
16034
|
+
}
|
|
16041
16035
|
scroller.removeEventListener("scroll", handleScroll);
|
|
16042
16036
|
}
|
|
16043
16037
|
function scrollTo$1(index, options) {
|
|
@@ -25147,7 +25141,7 @@ withInstall(stdin_default$1);
|
|
|
25147
25141
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
25148
25142
|
const _WatermarkComponent = stdin_default$1;
|
|
25149
25143
|
var stdin_default = stdin_default$1;
|
|
25150
|
-
const version = "2.22.
|
|
25144
|
+
const version = "2.22.2";
|
|
25151
25145
|
function install(app) {
|
|
25152
25146
|
stdin_default$3m.install && app.use(stdin_default$3m);
|
|
25153
25147
|
stdin_default$3k.install && app.use(stdin_default$3k);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.2",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/use": "2.22.
|
|
51
|
+
"@varlet/shared": "2.22.2",
|
|
52
|
+
"@varlet/icons": "2.22.2",
|
|
53
|
+
"@varlet/use": "2.22.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.3",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.4.3",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/cli": "2.22.
|
|
70
|
-
"@varlet/ui": "2.22.
|
|
71
|
-
"@varlet/touch-emulator": "2.22.
|
|
69
|
+
"@varlet/cli": "2.22.2",
|
|
70
|
+
"@varlet/ui": "2.22.2",
|
|
71
|
+
"@varlet/touch-emulator": "2.22.2"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|