Forráskód Böngészése

fix: 修复标题重叠和替换的问题

carver 2 éve
szülő
commit
a0ccd00413

+ 23 - 24
antbuilder/industry/hospitalV2/components/index-head/indexHead.js

@@ -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: {