mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
提取共用方法
This commit is contained in:
1 parent
48ade99047
commit
7a84c262da
45 files changed
+242
-257
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { addClass, removeClass } from '../utils';
|
||||
import component from '../utils/component';
|
||||
import flip from './flip';
|
||||
import aspectRatio from './aspectRatio';
|
||||
@@ -64,11 +65,11 @@ export default class Setting {
|
||||
const { $player } = this.art.template;
|
||||
if (value) {
|
||||
this.state = true;
|
||||
$player.classList.add('artplayer-setting-show');
|
||||
addClass($player, 'artplayer-setting-show');
|
||||
this.art.emit('setting:show');
|
||||
} else {
|
||||
this.state = false;
|
||||
$player.classList.remove('artplayer-setting-show');
|
||||
removeClass($player, 'artplayer-setting-show');
|
||||
this.art.emit('setting:hide');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user