back-bar组件

This commit is contained in:
禺狨
2023-03-07 10:26:52 +08:00
parent 2176bbf7a1
commit 87b29bf0cd
10 changed files with 485 additions and 397 deletions

View 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;
}
}

View 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>
);
};

View File

@@ -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";