修复提示语的 timer bug

This commit is contained in:
Harvey Zack committed 2018-12-07 10:18:28 +08:00
1 parent e33934d982
commit 03605262bd
4 files changed
+2 -4

No files matched your search

-1
View File
@@ -2800,7 +2800,6 @@
i18nMix(i18n);
layers.add({
name: 'artplayer-plugin-gif-progress',
html: '<div class="artplayer-plugin-gif-progress"></div>',
style: {
position: 'absolute',
top: '0',
+1 -1
View File
@@ -5275,9 +5275,9 @@
$noticeInner = _this$art$template.$noticeInner;
setStyle($notice, 'display', 'block');
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
clearTimeout(this.timer);
if (autoHide) {
clearTimeout(this.timer);
this.timer = setTimeout(function () {
_this.hide();
}, time);
@@ -40,7 +40,6 @@ function artplayerPluginGif(art) {
layers.add({
name: 'artplayer-plugin-gif-progress',
html: '<div class="artplayer-plugin-gif-progress"></div>',
style: {
position: 'absolute',
top: '0',
+1 -1
View File
@@ -10,8 +10,8 @@ export default class Notice {
const { $notice, $noticeInner } = this.art.template;
setStyle($notice, 'display', 'block');
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
clearTimeout(this.timer);
if (autoHide) {
clearTimeout(this.timer);
this.timer = setTimeout(() => {
this.hide();
}, time);