|
@@ -22,7 +22,6 @@ Component(
|
|
|
async onPageScroll(_, { scrollTop }) {
|
|
|
const { id, isScrollOver } = this.data;
|
|
|
let contentHeight = 0;
|
|
|
-
|
|
|
if (this.contentHeight) {
|
|
|
// eslint-disable-next-line prefer-destructuring
|
|
|
contentHeight = this.contentHeight;
|
|
@@ -34,29 +33,29 @@ Component(
|
|
|
}
|
|
|
/* 这里动态设置标题栏 */
|
|
|
|
|
|
- if (scrollTop > contentHeight) {
|
|
|
- if (!isScrollOver) {
|
|
|
- const { componentData } = this.props;
|
|
|
- const { title } = getExtInfo(componentData);
|
|
|
- my.setNavigationBar({
|
|
|
- title,
|
|
|
- });
|
|
|
- this.setData({
|
|
|
- isScrollOver: true,
|
|
|
- });
|
|
|
- }
|
|
|
- } else if (isScrollOver) {
|
|
|
- my.setNavigationBar({
|
|
|
- title: " ",
|
|
|
- });
|
|
|
- this.setData({
|
|
|
- isScrollOver: false,
|
|
|
- });
|
|
|
- } else {
|
|
|
- my.setNavigationBar({
|
|
|
- title: " ",
|
|
|
- });
|
|
|
- }
|
|
|
+ // if (scrollTop > contentHeight) {
|
|
|
+ // if (!isScrollOver) {
|
|
|
+ // const { componentData } = this.props;
|
|
|
+ // const { title } = getExtInfo(componentData);
|
|
|
+ // my.setNavigationBar({
|
|
|
+ // title,
|
|
|
+ // });
|
|
|
+ // this.setData({
|
|
|
+ // isScrollOver: true,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // } else if (isScrollOver) {
|
|
|
+ // my.setNavigationBar({
|
|
|
+ // title: " ",
|
|
|
+ // });
|
|
|
+ // this.setData({
|
|
|
+ // isScrollOver: false,
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // my.setNavigationBar({
|
|
|
+ // title: " ",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
},
|
|
|
})({
|
|
|
props: {
|