mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
添加设置样式小工具
This commit is contained in:
1 parent
6e4087a080
commit
96a6e1eb0e
14 files changed
+113
-109
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { append, tooltip, secondToTime } from '../utils';
|
||||
import { append, tooltip, secondToTime, setStyle } from '../utils';
|
||||
import icons from '../icons';
|
||||
|
||||
export default class Screenshot {
|
||||
@@ -28,7 +28,7 @@ export default class Screenshot {
|
||||
canvas.getContext('2d').drawImage($video, 0, 0);
|
||||
const dataUri = canvas.toDataURL('image/png');
|
||||
const elink = document.createElement('a');
|
||||
elink.style.display = 'none';
|
||||
setStyle(elink, 'display', 'none');
|
||||
elink.href = dataUri;
|
||||
elink.download = `${secondToTime($video.currentTime)}.png`;
|
||||
document.body.appendChild(elink);
|
||||
|
||||
Reference in new issue
Block a user