@varlet/ui 2.22.1 → 2.22.2-alpha.1706882566427
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 +1 -4
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/sticky/Sticky.mjs +17 -13
- package/es/test/style/index.mjs +0 -0
- package/es/varlet.esm.js +579 -582
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +19 -18
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/lib/varlet.cjs.js
CHANGED
|
@@ -9723,7 +9723,10 @@ 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
|
+
handleScroll();
|
|
9729
|
+
}));
|
|
9727
9730
|
onSmartUnmounted(removeScrollListener);
|
|
9728
9731
|
onWindowResize(resize);
|
|
9729
9732
|
useEventListener(() => window, "scroll", handleScroll);
|
|
@@ -9762,15 +9765,27 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9762
9765
|
isFixed: false
|
|
9763
9766
|
};
|
|
9764
9767
|
}
|
|
9768
|
+
function setupScroller() {
|
|
9769
|
+
scroller = getParentScroller(stickyEl.value);
|
|
9770
|
+
if (scroller !== window) {
|
|
9771
|
+
scroller.addEventListener("scroll", handleScroll);
|
|
9772
|
+
}
|
|
9773
|
+
}
|
|
9765
9774
|
function handleScroll() {
|
|
9766
9775
|
if (!scroller) {
|
|
9767
|
-
|
|
9776
|
+
setupScroller();
|
|
9768
9777
|
}
|
|
9769
9778
|
const fixedParams = computeFixedParams();
|
|
9770
9779
|
if (fixedParams) {
|
|
9771
9780
|
call(props2.onScroll, fixedParams.offsetTop, fixedParams.isFixed);
|
|
9772
9781
|
}
|
|
9773
9782
|
}
|
|
9783
|
+
function removeScrollListener() {
|
|
9784
|
+
if (!scroller || scroller === window) {
|
|
9785
|
+
return;
|
|
9786
|
+
}
|
|
9787
|
+
scroller.removeEventListener("scroll", handleScroll);
|
|
9788
|
+
}
|
|
9774
9789
|
function resize() {
|
|
9775
9790
|
return __async$c(this, null, function* () {
|
|
9776
9791
|
isFixed.value = false;
|
|
@@ -9778,17 +9793,6 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9778
9793
|
computeFixedParams();
|
|
9779
9794
|
});
|
|
9780
9795
|
}
|
|
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
9796
|
return {
|
|
9793
9797
|
stickyEl,
|
|
9794
9798
|
wrapperEl,
|
|
@@ -15945,10 +15949,7 @@ const __sfc__$F = vue.defineComponent({
|
|
|
15945
15949
|
() => length.value,
|
|
15946
15950
|
() => __async$6(this, null, function* () {
|
|
15947
15951
|
yield doubleRaf();
|
|
15948
|
-
indexAnchors.
|
|
15949
|
-
if (name2.value)
|
|
15950
|
-
anchorNameList.value.push(name2.value);
|
|
15951
|
-
});
|
|
15952
|
+
anchorNameList.value = indexAnchors.filter(({ name: name2 }) => name2.value != null).map(({ name: name2 }) => name2.value);
|
|
15952
15953
|
})
|
|
15953
15954
|
);
|
|
15954
15955
|
onSmartMounted(() => __async$6(this, null, function* () {
|
|
@@ -25147,7 +25148,7 @@ withInstall(stdin_default$1);
|
|
|
25147
25148
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
25148
25149
|
const _WatermarkComponent = stdin_default$1;
|
|
25149
25150
|
var stdin_default = stdin_default$1;
|
|
25150
|
-
const version = "2.22.
|
|
25151
|
+
const version = "2.22.2-alpha.1706882566427";
|
|
25151
25152
|
function install(app) {
|
|
25152
25153
|
stdin_default$3m.install && app.use(stdin_default$3m);
|
|
25153
25154
|
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-alpha.1706882566427",
|
|
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/icons": "2.22.
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/
|
|
51
|
+
"@varlet/icons": "2.22.2-alpha.1706882566427",
|
|
52
|
+
"@varlet/use": "2.22.2-alpha.1706882566427",
|
|
53
|
+
"@varlet/shared": "2.22.2-alpha.1706882566427"
|
|
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/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/ui": "2.22.2-alpha.1706882566427",
|
|
70
|
+
"@varlet/touch-emulator": "2.22.2-alpha.1706882566427",
|
|
71
|
+
"@varlet/cli": "2.22.2-alpha.1706882566427"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|