Commit 036c942f authored by chenshouchao's avatar chenshouchao

fix: 小的确认弹窗组件图标增加默认宽度解决弹窗定位错位的问题, 按钮组件增加不换行属性

parent 55e5598b
...@@ -126,6 +126,13 @@ const theme = createTheme({ ...@@ -126,6 +126,13 @@ const theme = createTheme({
}, },
}, },
}, },
MuiTypography: {
styleOverrides: {
root: {
whiteSpace: "nowrap",
},
},
},
}, },
}); });
......
...@@ -6,7 +6,7 @@ import MyButton from "./MyButton"; ...@@ -6,7 +6,7 @@ import MyButton from "./MyButton";
import tipsIcon from "@/assets/project/information-outline.svg"; import tipsIcon from "@/assets/project/information-outline.svg";
import Popper from "@mui/material/Popper"; import Popper from "@mui/material/Popper";
interface IMyPopconfirmProps { interface IMyPopconfirmProps {
title: string | ReactNode; title: string | ReactNode;
placement?: placement?:
| "auto-end" | "auto-end"
...@@ -30,7 +30,7 @@ interface IMyPopconfirmProps { ...@@ -30,7 +30,7 @@ interface IMyPopconfirmProps {
showCancel?: boolean; showCancel?: boolean;
onCancel?: any; onCancel?: any;
onConfirm?: any; onConfirm?: any;
}; }
const MyPopconfirm = (props: IMyPopconfirmProps) => { const MyPopconfirm = (props: IMyPopconfirmProps) => {
const { const {
...@@ -75,7 +75,12 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => { ...@@ -75,7 +75,12 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
> >
<Box sx={{ marginBottom: "16px" }}> <Box sx={{ marginBottom: "16px" }}>
<img <img
style={{ marginRight: "12px", position: "relative", top: "3px" }} style={{
width: "16px",
marginRight: "12px",
position: "relative",
top: "3px",
}}
src={tipsIcon} src={tipsIcon}
alt="" alt=""
/> />
...@@ -85,18 +90,14 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => { ...@@ -85,18 +90,14 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
{showCancel && ( {showCancel && (
<MyButton <MyButton
text={cancelText} text={cancelText}
variant='outlined' variant="outlined"
size="small" size="small"
color="inherit" color="inherit"
onClick={handleCancel} onClick={handleCancel}
style={{ marginRight: "12px" }} style={{ marginRight: "12px" }}
/> />
)} )}
<MyButton <MyButton text={okText} size="small" onClick={handleOk} />
text={okText}
size="small"
onClick={handleOk}
/>
</Box> </Box>
</Popper> </Popper>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment