feat(test): 添加更新通知组件测试页面

添加用于
This commit is contained in:
超级老白兔
2025-08-19 15:20:00 +08:00
parent 16fae82c17
commit d2560784a2
2 changed files with 185 additions and 0 deletions

View File

@@ -0,0 +1,179 @@
import React from "react";
import UpdateNotification from "@/components/UpdateNotification";
const UpdateNotificationTest: React.FC = () => {
return (
<div
style={{
minHeight: "100vh",
backgroundColor: "#f5f5f5",
position: "relative",
}}
>
{/* 更新通知组件 */}
<UpdateNotification forceShow={true} />
{/* 页面内容 */}
<div
style={{
paddingTop: "calc(80px + env(safe-area-inset-top))", // 为通知栏留出空间
padding: "20px",
maxWidth: "800px",
margin: "0 auto",
}}
>
<div
style={{
backgroundColor: "white",
borderRadius: "12px",
padding: "24px",
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)",
marginBottom: "20px",
}}
>
<h2
style={{
fontSize: "20px",
fontWeight: "600",
marginBottom: "16px",
color: "#333",
}}
>
UpdateNotification
</h2>
<div style={{ marginBottom: "16px" }}>
<h3
style={{
fontSize: "16px",
fontWeight: "500",
marginBottom: "8px",
color: "#666",
}}
>
</h3>
<ul
style={{
paddingLeft: "20px",
lineHeight: "1.6",
color: "#666",
}}
>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div style={{ marginBottom: "16px" }}>
<h3
style={{
fontSize: "16px",
fontWeight: "500",
marginBottom: "8px",
color: "#666",
}}
>
</h3>
<ul
style={{
paddingLeft: "20px",
lineHeight: "1.6",
color: "#666",
}}
>
<li>&ldquo;&rdquo;</li>
<li>&ldquo;&rdquo;10</li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<div
style={{
padding: "16px",
backgroundColor: "#f8f9fa",
borderRadius: "8px",
border: "1px solid #e9ecef",
}}
>
<p
style={{
margin: 0,
fontSize: "14px",
color: "#666",
lineHeight: "1.5",
}}
>
<strong></strong>
使
</p>
</div>
</div>
{/* 模拟页面内容 */}
<div
style={{
backgroundColor: "white",
borderRadius: "12px",
padding: "24px",
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)",
}}
>
<h3
style={{
fontSize: "18px",
fontWeight: "500",
marginBottom: "16px",
color: "#333",
}}
>
</h3>
<p
style={{
lineHeight: "1.6",
color: "#666",
marginBottom: "16px",
}}
>
</p>
<p
style={{
lineHeight: "1.6",
color: "#666",
marginBottom: "16px",
}}
>
</p>
<div
style={{
height: "200px",
backgroundColor: "#f8f9fa",
borderRadius: "8px",
display: "flex",
alignItems: "center",
justifyContent: "center",
color: "#999",
fontSize: "14px",
}}
>
</div>
</div>
</div>
</div>
);
};
export default UpdateNotificationTest;

View File

@@ -1,6 +1,7 @@
import SelectTest from "@/pages/mobile/test/select";
import TestIndex from "@/pages/mobile/test/index";
import UploadTest from "@/pages/mobile/test/upload";
import UpdateNotificationTest from "@/pages/mobile/test/update-notification";
import IframeDebugPage from "@/pages/iframe";
import { DEV_FEATURES } from "@/utils/env";
@@ -22,6 +23,11 @@ const componentTestRoutes = DEV_FEATURES.SHOW_TEST_PAGES
element: <UploadTest />,
auth: true,
},
{
path: "/test/update-notification",
element: <UpdateNotificationTest />,
auth: true,
},
{
path: "/test/iframe",
element: <IframeDebugPage />,