|
|
@@ -31,6 +31,16 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :md="6">
|
|
|
+ <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
+ <el-col>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="danger"
|
|
|
+ class="el-icon-delete"
|
|
|
+ @click="clear"
|
|
|
+ >清空</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
|
|
|
<el-card class="box-card">
|
|
|
<div slot="header" class="clearfix">
|
|
|
@@ -82,6 +92,9 @@ export default {
|
|
|
scrollElem.scrollTo({ top: scrollElem.scrollHeight, behavior: 'smooth' })
|
|
|
})
|
|
|
},
|
|
|
+ clear() {
|
|
|
+ this.dataList = []
|
|
|
+ },
|
|
|
initWebSocket: function() {
|
|
|
var url = 'wss://api.reghao.cn/ws/log?token=1234567890'
|
|
|
this.websock = new WebSocket(url)
|