mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 04:01:20 -08:00
调整整体样式
This commit is contained in:
1 parent
487e865017
commit
fa585e536a
49 files changed
+984
-322
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { setStyles, setStyle, srtToVtt, vttToBlob } from './utils';
|
||||
import { setStyles, srtToVtt, vttToBlob } from './utils';
|
||||
|
||||
export default class Subtitle {
|
||||
constructor(art) {
|
||||
@@ -74,28 +74,16 @@ export default class Subtitle {
|
||||
}
|
||||
|
||||
show() {
|
||||
const {
|
||||
template: { $subtitle },
|
||||
i18n,
|
||||
notice,
|
||||
} = this.art;
|
||||
setStyle($subtitle, 'display', 'block');
|
||||
const { $player } = this.art.template;
|
||||
this.state = true;
|
||||
notice.show(i18n.get('Show subtitle'));
|
||||
this.art.emit('subtitle:show', $subtitle);
|
||||
$player.classList.remove('artplayer-subtitle-hide');
|
||||
this.art.emit('subtitle:show');
|
||||
}
|
||||
|
||||
hide() {
|
||||
const {
|
||||
template: { $subtitle },
|
||||
i18n,
|
||||
notice,
|
||||
} = this.art;
|
||||
|
||||
setStyle($subtitle, 'display', 'none');
|
||||
const { $player } = this.art.template;
|
||||
this.state = false;
|
||||
notice.show(i18n.get('Hide subtitle'));
|
||||
this.art.emit('subtitle:hide', $subtitle);
|
||||
$player.classList.add('artplayer-subtitle-hide');
|
||||
}
|
||||
|
||||
toggle() {
|
||||
|
||||
Reference in new issue
Block a user