Compare commits

...

2 Commits

Author SHA1 Message Date
LiuJiaNan b10ced07f7 优化HeaderBack 2025-10-28 16:13:50 +08:00
LiuJiaNan ad0e3b952a 1.0.13 2025-10-28 15:39:54 +08:00
4 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import type { FC, ReactNode } from "react";
import type { CSSProperties, FC, ReactNode } from "react";
export interface HeaderBackProps {
/** 标题 */
@ -10,6 +10,8 @@ export interface HeaderBackProps {
};
/** 是否显示返回按钮,默认为 true */
previous?: boolean;
/** 自定义样式 */
style?: CSSProperties;
}
/** 头部返回组件 */

View File

@ -6,10 +6,10 @@ import "./index.less";
* 头部返回组件
*/
function HeaderBack(props) {
const { title, history, previous = true } = props;
const { title, history, previous = true, style = {} } = props;
return (
<div className="header-back">
<div className="header-back" style={style}>
<div className="action">
{
previous

View File

@ -1,6 +1,7 @@
.header-back {
padding: 10px 20px;
border-bottom: 1px solid #dcdfe6;
margin-bottom: 10px;
.action {
display: flex;

View File

@ -1,7 +1,7 @@
{
"name": "zy-react-library",
"private": false,
"version": "1.0.12",
"version": "1.0.13",
"type": "module",
"description": "",
"author": "LiuJiaNan",