mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
添加更多错误机制
This commit is contained in:
1 parent
eb879d3e2d
commit
f6c236c260
8 files changed
+32
-19
No files matched your search
+2
-2
@@ -5,9 +5,9 @@ export default class Notice {
|
||||
}
|
||||
|
||||
show(msg, autoHide = true, time = 1000) {
|
||||
const { $notice } = this.art.refs;
|
||||
const { $notice, $noticeInner } = this.art.refs;
|
||||
$notice.style.display = 'block';
|
||||
$notice.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
|
||||
$noticeInner.innerHTML = msg instanceof Error ? msg.message.trim() : msg;
|
||||
if (autoHide) {
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
|
||||
Reference in new issue
Block a user