webapp: address eslint issues
This commit is contained in:
parent
b2913f24d3
commit
ee54bebd0b
@ -227,7 +227,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
// Send heartbeat packets regularly * 59s Send a heartbeat
|
// Send heartbeat packets regularly * 59s Send a heartbeat
|
||||||
heartCheck() {
|
heartCheck() {
|
||||||
this.heartInterval && clearTimeout(this.heartInterval);
|
if (this.heartInterval) {
|
||||||
|
clearTimeout(this.heartInterval);
|
||||||
|
}
|
||||||
this.heartInterval = setInterval(() => {
|
this.heartInterval = setInterval(() => {
|
||||||
if (this.socket.readyState === 1) {
|
if (this.socket.readyState === 1) {
|
||||||
// Connection status
|
// Connection status
|
||||||
@ -240,7 +242,9 @@ export default defineComponent({
|
|||||||
/** To break off websocket Connect */
|
/** To break off websocket Connect */
|
||||||
closeSocket() {
|
closeSocket() {
|
||||||
this.socket.close();
|
this.socket.close();
|
||||||
this.heartInterval && clearTimeout(this.heartInterval);
|
if (this.heartInterval) {
|
||||||
|
clearTimeout(this.heartInterval);
|
||||||
|
}
|
||||||
this.isFirstFetchAfterConnect = true;
|
this.isFirstFetchAfterConnect = true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -358,7 +358,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
// Send heartbeat packets regularly * 59s Send a heartbeat
|
// Send heartbeat packets regularly * 59s Send a heartbeat
|
||||||
heartCheck() {
|
heartCheck() {
|
||||||
this.heartInterval && clearTimeout(this.heartInterval);
|
if (this.heartInterval) {
|
||||||
|
clearTimeout(this.heartInterval);
|
||||||
|
}
|
||||||
this.heartInterval = setInterval(() => {
|
this.heartInterval = setInterval(() => {
|
||||||
if (this.socket.readyState === 1) {
|
if (this.socket.readyState === 1) {
|
||||||
// Connection status
|
// Connection status
|
||||||
@ -371,7 +373,9 @@ export default defineComponent({
|
|||||||
/** To break off websocket Connect */
|
/** To break off websocket Connect */
|
||||||
closeSocket() {
|
closeSocket() {
|
||||||
this.socket.close();
|
this.socket.close();
|
||||||
this.heartInterval && clearTimeout(this.heartInterval);
|
if (this.heartInterval) {
|
||||||
|
clearTimeout(this.heartInterval);
|
||||||
|
}
|
||||||
this.isFirstFetchAfterConnect = true;
|
this.isFirstFetchAfterConnect = true;
|
||||||
},
|
},
|
||||||
formatNumber(num: number) {
|
formatNumber(num: number) {
|
||||||
|
|||||||
@ -217,7 +217,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
// Send heartbeat packets regularly * 59s Send a heartbeat
|
// Send heartbeat packets regularly * 59s Send a heartbeat
|
||||||
heartCheck() {
|
heartCheck() {
|
||||||
this.heartInterval && clearTimeout(this.heartInterval);
|
if (this.heartInterval) {
|
||||||
|
clearTimeout(this.heartInterval);
|
||||||
|
}
|
||||||
this.heartInterval = setInterval(() => {
|
this.heartInterval = setInterval(() => {
|
||||||
if (this.socket.readyState === 1) {
|
if (this.socket.readyState === 1) {
|
||||||
// Connection status
|
// Connection status
|
||||||
@ -230,7 +232,9 @@ export default defineComponent({
|
|||||||
/** To break off websocket Connect */
|
/** To break off websocket Connect */
|
||||||
closeSocket() {
|
closeSocket() {
|
||||||
this.socket.close();
|
this.socket.close();
|
||||||
this.heartInterval && clearTimeout(this.heartInterval);
|
if (this.heartInterval) {
|
||||||
|
clearTimeout(this.heartInterval);
|
||||||
|
}
|
||||||
this.isFirstFetchAfterConnect = true;
|
this.isFirstFetchAfterConnect = true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user