优化 WebSocket 工具
This commit is contained in:
@@ -113,9 +113,10 @@ let navTools = {
|
|||||||
},
|
},
|
||||||
'websocket': {
|
'websocket': {
|
||||||
title: 'WebSocket',
|
title: 'WebSocket',
|
||||||
|
desc: 'WebSocket 测试工具',
|
||||||
component: 'OtherWebSocket',
|
component: 'OtherWebSocket',
|
||||||
update: '20211106',
|
update: '20211108',
|
||||||
version: '1',
|
version: '2',
|
||||||
enabled: true
|
enabled: true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -186,6 +186,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
beforeDestroy () {
|
||||||
|
this.wsClose();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -207,15 +210,25 @@ export default {
|
|||||||
* 清空输入
|
* 清空输入
|
||||||
*/
|
*/
|
||||||
clearInputs() {
|
clearInputs() {
|
||||||
|
const msg = '确定要清空输入内容吗?';
|
||||||
|
this.$confirm(msg, '确认', {
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
this.inputs = '';
|
this.inputs = '';
|
||||||
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空消息
|
* 清空消息
|
||||||
*/
|
*/
|
||||||
clearMessages() {
|
clearMessages() {
|
||||||
|
const msg = '确定要清空消息内容吗?';
|
||||||
|
this.$confirm(msg, '确认', {
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
this.messages = [];
|
this.messages = [];
|
||||||
this.messageID = 0;
|
this.messageID = 0;
|
||||||
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -420,10 +433,12 @@ export default {
|
|||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
user-select: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
margin: 0.5rem 0;
|
margin: 0.5rem 0;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tag {
|
.el-tag {
|
||||||
|
Reference in New Issue
Block a user