更新时间:2020-04-02 00:10:45
1. <trance-line :trances="trances"></trance-line>
2.只需设置type和data两个属性即可。type:1=>点击事件 2=>网络请求 3=>打印 4=>页面调整 5=>报错
data(){
trances: [{
type:1,
data:{
"outerHTML":"<div class='download'>下载</div>",
"tagName":"div",
"className":'download'
}
},{
type:1,
data:{
"outerHTML":"<div>上传</div>",
"tagName":"div",
"className":''
}
},{
type:2,
data:{
'method':'post',
'url':'http://www.baidu.com',
'status':'200',
'time':'40ms'
}
},{
type:3,
data:{
'level':'log',
'arguments': 'hello world'
}
},{
type:4,
data:{
'from':'1.html',
'to': '2.html'
}
},{
type:5,
data:{
'message':'websocket连接错误',
'url': 'http://www.baidu.com',
'trance': 'xxx is undefined'
}
}]
}