添加 消息 页面更新

This commit is contained in:
张成
2025-10-01 00:36:51 +08:00
parent dd26282540
commit 78d8ec659e
22 changed files with 1450 additions and 292 deletions

View File

@@ -0,0 +1,33 @@
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 124px 16px;
min-height: 400px;
.empty-icon {
width: 221px;
height: 200px;
position: relative;
border-radius: 20px;
margin-bottom: 12px;
.img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
}
}
.empty-text {
font-family: 'PingFang SC';
font-weight: 400;
font-size: 14px;
line-height: 1.71;
color: rgba(0, 0, 0, 0.35);
}
}

View File

@@ -0,0 +1,23 @@
import { View, Text, Image } from "@tarojs/components";
import "./index.scss";
interface EmptyStateProps {
text?: string;
icon?: any; // 图片资源
}
const EmptyState = ({
text = "暂无数据",
icon = require("@/static/message/emi.svg")
}: EmptyStateProps) => {
return (
<View className="empty-state">
<View className="empty-icon">
<Image className="img" src={icon} />
</View>
<Text className="empty-text">{text}</Text>
</View>
);
};
export default EmptyState;