菜单项徽章对象
🌐 MenuItemBadge Object
typestring(optional)- 可以是alerts、updates、new-items或none。默认是none。有关这些类型的详细说明,请参见 创建特定类型的徽章。countnumber(optional)- 徽章显示的项目数量。alerts、updates和new-items类型必填;不能与none一起使用。contentstring(optional)- 在徽章中显示的自定义字符串。仅在none类型下必填且可用。
如果你使用预定义的徽章类型(不是 none),系统会帮你本地化并进行复数处理。如果你自己创建自定义徽章字符串,你需要自己对该字符串进行本地化和复数处理。
🌐 If you use one of the predefined badge types (not none), the system localizes and pluralizes the badge
for you. If you create your own custom badge string, you need to localize and pluralize that string yourself.