mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 04:31:20 -08:00
添加log插件demo
This commit is contained in:
1 parent
888c929549
commit
e6242df6d3
4 files changed
+17
-1
No files matched your search
@@ -4777,6 +4777,9 @@
|
||||
var $log = null;
|
||||
layers.add({
|
||||
name: 'log',
|
||||
style: {
|
||||
bottom: '50px'
|
||||
},
|
||||
mounted: function mounted($el) {
|
||||
$log = $el;
|
||||
}
|
||||
@@ -4787,6 +4790,7 @@
|
||||
|
||||
function check() {
|
||||
var count = $log.childElementCount;
|
||||
setStyle($log, 'bottom', art.controls.show ? '50px' : '10px');
|
||||
|
||||
if (count) {
|
||||
if (count > max) {
|
||||
@@ -4809,6 +4813,7 @@
|
||||
return {
|
||||
name: 'log',
|
||||
emit: function emit(msg) {
|
||||
if (typeof msg !== 'string') return;
|
||||
append($log, "<p>".concat(escape(msg), "</p>"));
|
||||
setStyle($log, 'display', 'block');
|
||||
clearTimeout(timer);
|
||||
|
||||
Reference in new issue
Block a user