【文件属性】:
文件名称:meteor-notifications:一个简单的通知包
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-02 06:19:53
JavaScript
流星通知
一个简单的通知包。
安装
$ meteor add kenken:meteor-notifications
将创建两个新集合。 一个在客户端(beowser)上运行,另一个在客户端和服务器上运行。 提供了default模板。
##Methods 以下是当前可用的方法。
####MNotifications.add(doc, [callback]) add()方法是将新的通知添加到集合中。 default模板的文档结构如下:
{
userId : Meteor.userId() ,
type : 'notificationType' ,
data : {
class : 'alert alert-success' ,
message : 'Retailer update info successfully.'
}
}
如果省略userId属性,则
【文件预览】:
meteor-notifications-master
----client()
--------notifications.js(589B)
--------templates.js(1KB)
--------templates.html(477B)
--------templates.css(107B)
----lib()
--------notifications.js(1KB)
----package.js(960B)
----LICENSE(1KB)
----README.md(2KB)
----.versions(570B)
----tests()
--------notifications-tests.js(119B)
----server()
--------methods.js(317B)
--------publications.js(294B)