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

feat: 增加uni.setAppBadgeNumber示例

上级 4e3ec18d
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<button class="normal-button" type="default" @click="handleCreateChannel">创建通知渠道</button> <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="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> <button class="normal-button" type="default" @click="handleGetClientId">获取cid</button>
</view> </view>
</template> </template>
...@@ -76,6 +78,12 @@ ...@@ -76,6 +78,12 @@
} }
}) })
}, },
handleSetBadge(){
uni.setAppBadgeNumber(8)
},
handleCleanBadge(){
uni.setAppBadgeNumber(0)
}
} }
} }
</script> </script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册