1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

perf(sticky): avoid set data if nothing change ()

This commit is contained in:
rex 2020-12-18 16:10:11 +08:00 committed by GitHub
parent 2390413915
commit d5e4cf9ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -108,7 +108,9 @@ VantComponent({
return prev;
}, {});
this.setData(diff);
if (Object.keys(diff).length > 0) {
this.setData(diff);
}
this.$emit('scroll', {
scrollTop: this.scrollTop,