TS 封装WebSocket
这一个TS 封装WebSocket用法:const wbSocket = new Socket<T, RT>({ url: url })wbSocket.onmessage((data: RT) => { const str = JSON.stringify(data) console.log('server data:', str) })封装如下:import { Message } from 'element-ui'expo