提交 d21a5566 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

feat: 增加uni.setAppBadgeNumber示例

上级 4e3ec18d
......@@ -2,7 +2,9 @@
<view class="content">
<button class="normal-button" type="default" @click="handleCreateChannel">创建通知渠道</button>
<button class="normal-button" type="default" @click="handleGetAllChannels">获取所有通知渠道信息</button>
<button class="normal-button" type="default" @click="handleCreateLocalNotification">创建本地通知消息</button>
<button class="normal-button" type="default" @click="handleCreateLocalNotification">创建本地通知消息</button>
<button class="normal-button" type="default" @click="handleSetBadge">设置角标</button>
<button class="normal-button" type="default" @click="handleCleanBadge">清空角标</button>
<button class="normal-button" type="default" @click="handleGetClientId">获取cid</button>
</view>
</template>
......@@ -75,7 +77,13 @@
console.log(e);
}
})
},
},
handleSetBadge(){
uni.setAppBadgeNumber(8)
},
handleCleanBadge(){
uni.setAppBadgeNumber(0)
}
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册