Skip to main content

lockIcon 属性被替换 licenseOnly

¥lockIcon property replaced by licenseOnly

Strapi 5 添加了一个新的 licenseOnly 布尔属性,用于在 addMenuLinkaddSettingsLinkaddSettingsLinks 操作中传递。添加此属性会在链接附近显示一个闪电⚡️图标,并指示付费功能。

¥Strapi 5 adds a new licenseOnly boolean property to pass in the addMenuLink, in the addSettingsLink and in the addSettingsLinks actions. Adding this property shows a lightning ⚡️ icon near the link, and indicates paid features.

通过添加 lockIcon 属性,可以在 Strapi v4 中实现类似的结果。

¥A similar result can be achieved in Strapi v4 by adding the lockIcon property.

此页面是 重大变更数据库 的一部分,提供有关重大更改的信息以及从 Strapi v4 迁移到 Strapi 5 的其他说明。

¥This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 此重大更改是否会影响插件?
🤖 此重大更改是否由 codemod 自动处理?

重大更改描述

¥Breaking change description

在 Strapi v4 中

¥In Strapi v4

  • lockIcon 属性用于管理面板 API 的 addMenuLink()addSettingsLinkaddSettingsLinks() 方法。

    ¥The lockIcon property is used in the addMenuLink(), addSettingsLink, and addSettingsLinks() methods of the Admin Panel API.

  • 该属性添加了一个锁定图标。

    ¥The property adds a lock icon.

在 Strapi 5 中

¥In Strapi 5

  • licenseOnly 属性用于管理面板 API 的 addMenuLink()addSettingsLinkaddSettingsLinks() 方法。

    ¥The licenseOnly property is used in the addMenuLink(), addSettingsLink, and addSettingsLinks() methods of the Admin Panel API.

  • 该属性添加了一个闪电图标⚡️。

    ¥The property adds a lightning icon ⚡️.

迁移

¥Migration

注意

¥Notes

  • 传递 licenseOnly: true 将添加一个闪电图标⚡️,以便:

    ¥Passing licenseOnly: true will add a lightning icon ⚡️, so that:

    • 菜单图标将如下所示:

      ¥a menu icon will look like the following:

  • 设置菜单项将如下所示:

    ¥a settings menu item will look like the following:

手动迁移

¥Manual migration

如果你的自定义 Strapi v4 代码使用 lockIcon 属性高亮需要 GrowthThis feature is available with a Growth plan.EnterpriseThis feature is available with an Enterprise plan. 计划的付费功能,请搜索并将 lockIcon: true 替换为 licenseOnly: true

¥If your custom Strapi v4 code uses the lockIcon property to highlight a paid feature that requires a GrowthThis feature is available with a Growth plan. or an EnterpriseThis feature is available with an Enterprise plan. plan, search and replace lockIcon: true by licenseOnly: true.