添加 消息 页面更新
This commit is contained in:
23
src/components/EmptyState/index.tsx
Normal file
23
src/components/EmptyState/index.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user