mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 05:39:38 +08:00
back-bar组件
This commit is contained in:
20
src/compenents/back-bar/index.module.less
Normal file
20
src/compenents/back-bar/index.module.less
Normal file
@@ -0,0 +1,20 @@
|
||||
.back-bar-box {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 1px;
|
||||
height: 14px;
|
||||
background-color: #d8d8d8;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
29
src/compenents/back-bar/index.tsx
Normal file
29
src/compenents/back-bar/index.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Button } from "antd";
|
||||
import { useState } from "react";
|
||||
import styles from "./index.module.less";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { LeftOutlined } from "@ant-design/icons";
|
||||
|
||||
interface PropInterface {
|
||||
title: string;
|
||||
}
|
||||
|
||||
export const BackBartment = (props: PropInterface) => {
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<div className={styles["back-bar-box"]}>
|
||||
<Button
|
||||
style={{paddingLeft:0}}
|
||||
icon={<LeftOutlined />}
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => navigate(-1)}
|
||||
>
|
||||
返回
|
||||
</Button>
|
||||
<div className={styles["line"]}></div>
|
||||
<div className={styles["name"]}>{props.title}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -2,4 +2,5 @@ export * from "./footer";
|
||||
export * from "./header";
|
||||
export * from "./leftMenu";
|
||||
export * from "./upload-image-button";
|
||||
export * from ".//treeDepartment";
|
||||
export * from "./treeDepartment";
|
||||
export * from "./back-bar";
|
||||
Reference in New Issue
Block a user