added: 测试页面

This commit is contained in:
none 2023-03-03 14:20:16 +08:00
parent 050912f60d
commit d13de512fc
7 changed files with 59 additions and 3 deletions

View File

@ -1,3 +1,4 @@
export * from "./footer";
export * from "./header";
export * from "./leftMenu";
export * from "./leftMenu";
export * from "./uploadImageButton";

View File

@ -0,0 +1,33 @@
import React, { useState } from "react";
import { Button, Drawer } from "antd";
export const UploadImageButton: React.FC = () => {
const [showModal, setShowModal] = useState<boolean>(false);
return (
<>
<Button
onClick={() => {
setShowModal(true);
}}
>
</Button>
{showModal && (
<Drawer
title="Basic Drawer"
placement="right"
onClose={() => {
setShowModal(false);
}}
open={showModal}
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</Drawer>
)}
</>
);
};

View File

@ -2,4 +2,5 @@ export * from "./home";
export * from "./login";
export * from "./dashboard";
export * from "./error";
export * from "./course";
export * from "./course";
export * from "./test";

View File

10
src/pages/test/index.tsx Normal file
View File

@ -0,0 +1,10 @@
import React from "react";
import { UploadImageButton } from "../../compenents";
export const TestPage: React.FC = () => {
return (
<div>
<UploadImageButton></UploadImageButton>
</div>
);
};

View File

@ -1,5 +1,12 @@
import { RouteObject } from "react-router-dom";
import { Login, HomePage, Dashboard, ErrorPage, VodListPage } from "../pages";
import {
Login,
HomePage,
Dashboard,
ErrorPage,
VodListPage,
TestPage,
} from "../pages";
const routes: RouteObject[] = [
{
@ -20,6 +27,10 @@ const routes: RouteObject[] = [
path: "/login",
element: <Login />,
},
{
path: "/test",
element: <TestPage />,
},
{
path: "*",
element: <ErrorPage />,