mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
格式化
This commit is contained in:
1 parent
0454f785be
commit
203ad0d3a0
75 files changed
+3120
-2904
No files matched your search
@@ -1,23 +1,26 @@
|
||||
import { errorHandle } from '../utils';
|
||||
|
||||
export default function flipMix(art, player) {
|
||||
Object.defineProperty(player, 'flipState', {
|
||||
get: () => art.refs.$player.dataset.flip
|
||||
});
|
||||
Object.defineProperty(player, 'flipState', {
|
||||
get: () => art.refs.$player.dataset.flip,
|
||||
});
|
||||
|
||||
Object.defineProperty(player, 'flip', {
|
||||
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, 'flip', {
|
||||
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');
|
||||
}
|
||||
});
|
||||
Object.defineProperty(player, 'flipRemove', {
|
||||
value: () => {
|
||||
delete art.refs.$player.dataset.flip;
|
||||
art.emit('flipRemove');
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user