Skip to main content

菜单项徽章对象

🌐 MenuItemBadge Object

  • type string(optional)- 可以是 alertsupdatesnew-itemsnone。默认是 none。有关这些类型的详细说明,请参见 创建特定类型的徽章
  • count number(optional)- 徽章显示的项目数量。alertsupdatesnew-items 类型必填;不能与 none 一起使用。
  • content string(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.