mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
update
This commit is contained in:
1 parent
bc778a4d07
commit
fc37573482
8 files changed
+153
-421
No files matched your search
@@ -1,7 +1,4 @@
|
||||
import Component from '../utils/component';
|
||||
import flip from './flip';
|
||||
import rotate from './rotate';
|
||||
import aspectRatio from './aspectRatio';
|
||||
import playbackRate from './playbackRate';
|
||||
|
||||
export default class Setting extends Component {
|
||||
@@ -12,51 +9,14 @@ export default class Setting extends Component {
|
||||
|
||||
const {
|
||||
option,
|
||||
template: { $setting, $settingBody },
|
||||
events: { proxy },
|
||||
template: { $setting },
|
||||
} = art;
|
||||
|
||||
this.$parent = $settingBody;
|
||||
this.$parent = $setting;
|
||||
|
||||
if (option.setting) {
|
||||
art.once('ready', () => {
|
||||
proxy($setting, 'click', (event) => {
|
||||
if (event.target === $setting) {
|
||||
this.show = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.add(
|
||||
flip({
|
||||
disable: !option.flip,
|
||||
name: 'flip',
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
rotate({
|
||||
disable: !option.rotate,
|
||||
name: 'rotate',
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
aspectRatio({
|
||||
disable: !option.aspectRatio,
|
||||
name: 'aspectRatio',
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
playbackRate({
|
||||
disable: !option.playbackRate,
|
||||
name: 'playbackRate',
|
||||
}),
|
||||
);
|
||||
|
||||
for (let index = 0; index < option.settings.length; index++) {
|
||||
this.add(option.settings[index]);
|
||||
}
|
||||
this.add(playbackRate(art));
|
||||
});
|
||||
|
||||
art.on('blur', () => {
|
||||
@@ -64,4 +24,8 @@ export default class Setting extends Component {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
add(option) {
|
||||
console.log(option);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user