mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
变更事件名称
This commit is contained in:
1 parent
4ecdb6b2d9
commit
16586d8d7e
26 files changed
+219
-152
No files matched your search
@@ -6,16 +6,18 @@ export default function flipMix(art, player) {
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'flip', {
|
||||
value: dir => {
|
||||
const dirList = ['normal', 'horizontal', 'vertical'];
|
||||
errorHandle(dirList.includes(dir), `The 'angle' need to be one of '[normal, horizontal, vertical]', but got ${dir}`);
|
||||
art.refs.$player.dataset.flip = dir;
|
||||
value: flip => {
|
||||
const flipList = ['normal', 'horizontal', 'vertical'];
|
||||
errorHandle(flipList.includes(flip), `The 'angle' need to be one of '[normal, horizontal, vertical]', but got ${flip}`);
|
||||
art.refs.$player.dataset.flip = flip;
|
||||
art.emit('flipChange', flip);
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'flipRemove', {
|
||||
value: () => {
|
||||
delete art.refs.$player.dataset.flip;
|
||||
art.emit('flipRemove');
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user