20 lines
558 B
JavaScript
20 lines
558 B
JavaScript
"use strict";
|
|
const PageScrollMixin = {
|
|
data() {
|
|
return {
|
|
// 默认的滚动组件 ref 列表
|
|
scrollRefs: this.$options.scrollRefs || ["customNavbar"]
|
|
};
|
|
},
|
|
// 页面生命周期
|
|
onPageScroll(e) {
|
|
this.scrollRefs.forEach((refName) => {
|
|
if (this.$refs[refName] && typeof this.$refs[refName].handlePageScroll === "function") {
|
|
this.$refs[refName].handlePageScroll(e);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
exports.PageScrollMixin = PageScrollMixin;
|
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/mixins/page-scroll-mixin.js.map
|