1.0.1 • Published 8 years ago

qq-badge v1.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

badge 仿QQ未读提醒

拖动徽章可消除未读,拖动至初始位置则不消除。

使用方法

<script src="../index.js"></script>
<script>
    new Badge({
        container: '.msg-badge',
        count: 8,
        overflowCount: 99, // 超过此数字显示+号,默认99
        background: '#f50', // 背景色
        color: '#fff', // 前景色
        onRemoved: function(inst){
            console.log(this, inst)
        } // 消除后回调
    })
</script>

扫一扫看demo

二维码