提交
This commit is contained in:
@ -20,12 +20,10 @@ export const initSSE = (url: any) => {
|
||||
});
|
||||
|
||||
watch(error, () => {
|
||||
console.log('SSE connection error:', error.value);
|
||||
error.value = null;
|
||||
});
|
||||
|
||||
watch(data, () => {
|
||||
console.log('🚀 ~ initSSE ~ data:', JSON.parse(data.value));
|
||||
let label = '';
|
||||
let route1 = '';
|
||||
let detailId = '';
|
||||
@ -33,6 +31,9 @@ export const initSSE = (url: any) => {
|
||||
if (JSON.parse(data.value)) {
|
||||
const obj = JSON.parse(data.value);
|
||||
route1 = obj.type;
|
||||
if (obj.type == 'count') {
|
||||
return;
|
||||
}
|
||||
label = obj.content;
|
||||
// detailId = obj.detailId;
|
||||
data.value = null;
|
||||
|
Reference in New Issue
Block a user