vue 配合webSocket和elementui notify设计警告框
websocket基本模式,代码如下
先在data定义以下字段:
data() {
return {
websock: null,
notifications: {}
};
},
initWebSocket() {
const userInfo = sessionStorage.getItem("userInfo");
// console
if (!userInfo) {
return
} els
原创
2020-07-14 11:54:09 ·
729 阅读 ·
0 评论