mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
update
This commit is contained in:
1 parent
eaeb74ef7a
commit
030913dc48
4 files changed
+27
-9
No files matched your search
@@ -1,6 +1,5 @@
|
||||
import Component from '../utils/component';
|
||||
import { append, addClass, setStyle, inverseClass } from '../utils/dom';
|
||||
|
||||
import { append, addClass, setStyle, inverseClass, includeFromEvent } from '../utils';
|
||||
import flip from './flip';
|
||||
import aspectRatio from './aspectRatio';
|
||||
import playbackRate from './playbackRate';
|
||||
@@ -30,7 +29,8 @@ export default class Setting extends Component {
|
||||
|
||||
const {
|
||||
option,
|
||||
template: { $setting },
|
||||
events: { proxy },
|
||||
template: { $setting, $player },
|
||||
} = art;
|
||||
|
||||
this.art = art;
|
||||
@@ -66,6 +66,17 @@ export default class Setting extends Component {
|
||||
this.show = false;
|
||||
this.init(this.option);
|
||||
});
|
||||
|
||||
proxy($player, 'click', (event) => {
|
||||
if (
|
||||
this.show &&
|
||||
!includeFromEvent(event, art.controls.setting) &&
|
||||
!includeFromEvent(event, this.$parent)
|
||||
) {
|
||||
this.show = false;
|
||||
this.init(this.option);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user