患者1.2

This commit is contained in:
zoujiandong
2024-01-10 08:57:23 +08:00
parent 49c01e8922
commit 5d865d1bbb
339 changed files with 23720 additions and 267 deletions
+7 -5
View File
@@ -61,10 +61,8 @@ var ROOT_ELEMENT = '.van-sticky';
}
this.scrollTop = scrollTop || this.scrollTop;
if (typeof container === 'function') {
Promise.all([
(0, utils_1.getRect)(this, ROOT_ELEMENT),
this.getContainerRect(),
]).then(function (_a) {
Promise.all([(0, utils_1.getRect)(this, ROOT_ELEMENT), this.getContainerRect()])
.then(function (_a) {
var root = _a[0], container = _a[1];
if (offsetTop + root.height > container.height + container.top) {
_this.setDataAfterDiff({
@@ -82,7 +80,8 @@ var ROOT_ELEMENT = '.van-sticky';
else {
_this.setDataAfterDiff({ fixed: false, transform: 0 });
}
});
})
.catch(function () { });
return;
}
(0, utils_1.getRect)(this, ROOT_ELEMENT).then(function (root) {
@@ -118,6 +117,9 @@ var ROOT_ELEMENT = '.van-sticky';
},
getContainerRect: function () {
var nodesRef = this.data.container();
if (!nodesRef) {
return Promise.reject(new Error('not found container'));
}
return new Promise(function (resolve) { return nodesRef.boundingClientRect(resolve).exec(); });
},
},