添加 红点标记

This commit is contained in:
张成
2025-11-21 11:41:22 +08:00
parent fe523ac2bc
commit ebd49553a8
2 changed files with 5 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ const GuideBar = (props) => {
if (code === currentPage) { if (code === currentPage) {
return; return;
} }
// 如果提供了 onTabChange 回调,优先使用(单页面模式) // 如果提供了 onTabChange 回调,优先使用(单页面模式)
if (onTabChange) { if (onTabChange) {
onTabChange(code); onTabChange(code);
@@ -91,9 +91,9 @@ const GuideBar = (props) => {
key={item.code} key={item.code}
> >
<Text>{item.text}</Text> <Text>{item.text}</Text>
{/* {item.code === "message" && hasReddot && ( {item.code === "message" && hasReddot && (
<View className="reddot"></View> <View className="reddot"></View>
)} */} )}
</View> </View>
))} ))}
</View> </View>

View File

@@ -170,7 +170,7 @@ const Message = () => {
/> />
{commentUnreadCount > 0 && ( {commentUnreadCount > 0 && (
<View className="badge"> <View className="badge">
{commentUnreadCount > 99 ? '99+' : commentUnreadCount} {commentUnreadCount > 99 ? '+99' : `+${commentUnreadCount}`}
</View> </View>
)} )}
</View> </View>
@@ -188,7 +188,7 @@ const Message = () => {
/> />
{followUnreadCount > 0 && ( {followUnreadCount > 0 && (
<View className="badge"> <View className="badge">
{followUnreadCount > 99 ? '99+' : followUnreadCount} {followUnreadCount > 99 ? '+99' : `+${followUnreadCount}`}
</View> </View>
)} )}
</View> </View>