Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
036c942f
Commit
036c942f
authored
Jul 29, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 小的确认弹窗组件图标增加默认宽度解决弹窗定位错位的问题, 按钮组件增加不换行属性
parent
55e5598b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
MyButton.tsx
src/components/mui/MyButton.tsx
+7
-0
MyPopconfirm.tsx
src/components/mui/MyPopconfirm.tsx
+10
-9
No files found.
src/components/mui/MyButton.tsx
View file @
036c942f
...
@@ -126,6 +126,13 @@ const theme = createTheme({
...
@@ -126,6 +126,13 @@ const theme = createTheme({
},
},
},
},
},
},
MuiTypography
:
{
styleOverrides
:
{
root
:
{
whiteSpace
:
"nowrap"
,
},
},
},
},
},
});
});
...
...
src/components/mui/MyPopconfirm.tsx
View file @
036c942f
...
@@ -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
>
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment