更新记录
1.0.0(2024-05-07)
应用未读角标插件(完善推送、通知、消息效果) Ba-Shortcut-Badge-U
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | - | - | 4.4 | × | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | - | × | × | × | × |
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | 5.0 | × | - | × |
应用未读角标插件(完善推送、通知、消息效果) Ba-Shortcut-Badge-U
简介
Ba-Shortcut-Badge-U
- 支持设置未读、清空未读
- 支持机型有Huawei、oppo、xiaomi、Samsung、Sony、LG、HTC、ZUK、ASUS、ADW、APEX、NOVA、EverythingMe、ZTE、KISS、LaunchTime、Yandex Launcher等等
使用方法
在 script
中引入组件
import * as shortcutBadge from "@/uni_modules/Ba-Shortcut-Badge-U";
在 script
中调用
methods: {
applyCount() {//设置未读角标数
let badgeCount = 5;
let res = shortcutBadge.applyCount(badgeCount);
console.log(res)
},
clearCount() {//清空
let res = shortcutBadge.clearCount();
console.log(res)
},
}