应用未读角标插件 Ba-Shortcut-Badge
简介(下载地址)
Ba-Shortcut-Badge
- 支持自动叠加、手动设置、清空
- 支持机型有Huawei、oppo、xiaomi、Samsung、Sony、LG、HTC、ZUK、ASUS、ADW、APEX、NOVA、EverythingMe、ZTE、KISS、LaunchTime、Yandex Launcher等等
使用方法
在 script
中引入组件
const shortCutBadge = uni.requireNativePlugin('Ba-Shortcut-Badge')
在 script
中调用
methods: {
setCount() {//手动设置未读角标数
shortCutBadge.applyCount({
'badgeCount': 10
});
},
addCount() {//自动叠加
shortCutBadge.applyCount();
},
clearCount() {//清空
shortCutBadge.clearCount();
},
}
系列插件
应用未读角标插件 Ba-Shortcut-Badge (文档)
动态修改状态栏、导航栏背景色、字体颜色插件 Ba-AppBar(文档)