parent
872af4b6d7
commit
d421bb6559
10 changed files with 451 additions and 313 deletions
@ -0,0 +1,36 @@ |
||||
@import 'src/assets/css/mixin.scss'; |
||||
.screenshot { |
||||
width: 280px; |
||||
@include position(absolute, auto, 0, 55px, auto); |
||||
background: #fff; |
||||
padding: 3px; |
||||
overflow: hidden; |
||||
.img { |
||||
height: 155px; |
||||
overflow: hidden; |
||||
position: relative; |
||||
canvas { |
||||
@include position(absolute, 50%, auto, auto, 50%); |
||||
transform: translate(-50%, -50%); |
||||
} |
||||
} |
||||
.close { |
||||
@include position(absolute, -24px, -24px, auto, auto); |
||||
@include wh(0, 0); |
||||
z-index: 1; |
||||
border: 26px solid transparent; |
||||
border-left-color: #fff; |
||||
-webkit-transform: rotate(-45deg); |
||||
transform: rotate(-45deg); |
||||
border-radius: 100%; |
||||
.icon { |
||||
@include position(absolute, -8px, 5px, auto, auto); |
||||
transform: rotate(45deg); |
||||
cursor: pointer; |
||||
} |
||||
} |
||||
.save { |
||||
padding: 10px; |
||||
text-align: center; |
||||
} |
||||
} |
@ -0,0 +1,23 @@ |
||||
import React, { memo, FC } from 'react'; |
||||
import style from './index.module.scss'; |
||||
import Broadcast from '@/components/svgIcon'; |
||||
const Index: FC<{ |
||||
setIsscreenshot: Function; |
||||
screenshotLoading: boolean; |
||||
}> = memo(function Index({ setIsscreenshot, screenshotLoading }) { |
||||
return ( |
||||
<div className={style.screenshot}> |
||||
<div className={style.close} onClick={() => setIsscreenshot(false)}> |
||||
<Broadcast iconClass="close" fill="red" className={style.icon} /> |
||||
</div> |
||||
<div className={style.img} id="JoL-screenshotCanvas"> |
||||
<Broadcast iconClass="loading" className="player-loading" fontSize="55px" /> |
||||
</div> |
||||
<p className={style.save}> |
||||
{screenshotLoading ? '截图加载失败,在点击下' : '鼠标右键图片另存为'} |
||||
</p> |
||||
</div> |
||||
); |
||||
}); |
||||
|
||||
export default Index; |
After Width: | Height: | Size: 614 B |
Loading…
Reference in new issue