mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
分离template
This commit is contained in:
1 parent
e96146b19f
commit
3fb41eedf7
39 files changed
+277
-256
No files matched your search
@@ -8,7 +8,7 @@ export default class Info {
|
||||
|
||||
init() {
|
||||
const {
|
||||
refs: { $infoClose },
|
||||
template: { $infoClose },
|
||||
events: { proxy },
|
||||
} = this.art;
|
||||
proxy($infoClose, 'click', () => {
|
||||
@@ -17,7 +17,7 @@ export default class Info {
|
||||
}
|
||||
|
||||
show() {
|
||||
const { $info, $infoPanel } = this.art.refs;
|
||||
const { $info, $infoPanel } = this.art.template;
|
||||
setStyle($info, 'display', 'block');
|
||||
if (!$infoPanel.innerHTML) {
|
||||
append($infoPanel, this.creatInfo());
|
||||
@@ -78,7 +78,7 @@ export default class Info {
|
||||
}
|
||||
|
||||
readInfo() {
|
||||
const { $infoPanel, $video } = this.art.refs;
|
||||
const { $infoPanel, $video } = this.art.template;
|
||||
const types = Array.from($infoPanel.querySelectorAll('[data-video]'));
|
||||
types.forEach(item => {
|
||||
const value = $video[item.dataset.video];
|
||||
@@ -95,7 +95,7 @@ export default class Info {
|
||||
}
|
||||
|
||||
hide() {
|
||||
const { $info } = this.art.refs;
|
||||
const { $info } = this.art.template;
|
||||
setStyle($info, 'display', 'none');
|
||||
clearTimeout(this.timer);
|
||||
this.art.emit('info:hide', $info);
|
||||
|
||||
Reference in new issue
Block a user