mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 11:11:20 -08:00
修复提示语的 timer bug
This commit is contained in:
1 parent
e33934d982
commit
03605262bd
4 files changed
+2
-4
No files matched your search
@@ -2800,7 +2800,6 @@
|
|||||||
i18nMix(i18n);
|
i18nMix(i18n);
|
||||||
layers.add({
|
layers.add({
|
||||||
name: 'artplayer-plugin-gif-progress',
|
name: 'artplayer-plugin-gif-progress',
|
||||||
html: '<div class="artplayer-plugin-gif-progress"></div>',
|
|
||||||
style: {
|
style: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '0',
|
top: '0',
|
||||||
|
|||||||
@@ -5275,9 +5275,9 @@
|
|||||||
$noticeInner = _this$art$template.$noticeInner;
|
$noticeInner = _this$art$template.$noticeInner;
|
||||||
setStyle($notice, 'display', 'block');
|
setStyle($notice, 'display', 'block');
|
||||||
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
|
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
|
||||||
if (autoHide) {
|
if (autoHide) {
|
||||||
clearTimeout(this.timer);
|
|
||||||
this.timer = setTimeout(function () {
|
this.timer = setTimeout(function () {
|
||||||
_this.hide();
|
_this.hide();
|
||||||
}, time);
|
}, time);
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ function artplayerPluginGif(art) {
|
|||||||
|
|
||||||
layers.add({
|
layers.add({
|
||||||
name: 'artplayer-plugin-gif-progress',
|
name: 'artplayer-plugin-gif-progress',
|
||||||
html: '<div class="artplayer-plugin-gif-progress"></div>',
|
|
||||||
style: {
|
style: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '0',
|
top: '0',
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export default class Notice {
|
|||||||
const { $notice, $noticeInner } = this.art.template;
|
const { $notice, $noticeInner } = this.art.template;
|
||||||
setStyle($notice, 'display', 'block');
|
setStyle($notice, 'display', 'block');
|
||||||
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
|
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
|
||||||
|
clearTimeout(this.timer);
|
||||||
if (autoHide) {
|
if (autoHide) {
|
||||||
clearTimeout(this.timer);
|
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.hide();
|
this.hide();
|
||||||
}, time);
|
}, time);
|
||||||
|
|||||||
Reference in new issue
Block a user