common-notification-plus
v1.1.92
Published
Common Notification Plus
Downloads
109
Maintainers
Readme
公共消息模块组件
安装依赖
npm install common-notification-plus开始使用
1:在main.js文件中引入
import SelfNotification from 'common-notification-plus'
import "common-notification-plus/dist/style.css"
app.use(SelfNotification)
2:在需要的文件中使用
<SelfNotification :requestUrl="url" :token="token" :socketPath="WebSocketPath" :isOpen="isOpen" @update:isOpen="listenOpen"></SelfNotification>
data(){
return{
url: 'https://profile-api.ddmarketinghub.com',
token: "Bearer " + yourIdToken,
WebSocketPath: notification的websocket链接,
isOpen: 默认是否打开 true/false
}
}
methods: {
// 检测当前状态是否是打开状态
listenOpen(isOpen) {}
}