Skip to main content

组件 EditViewLayoutListViewLayout 已被重写

🌐 The EditViewLayout and ListViewLayout have been rewritten

在 Strapi 5 中,一些管理面板钩子已从 Redux 存储中移除,并引入了一个新的 useDocumentLayout 钩子。

🌐 In Strapi 5, some admin panel hooks have been removed from the Redux store and a new useDocumentLayout hook is introduced.

此页面是重大更改数据库的一部分,提供关于重大更改的信息以及从 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.

 Is this breaking change affecting plugins?Yes
 Is this breaking change automatically handled by a codemod?No

重大变更描述

🌐 Breaking change description

在 Strapi v4 中

content-manager_editViewLayoutManagercontent-manager_listViewLayoutManager 钩子可以使用。

🌐 The content-manager_editViewLayoutManager and content-manager_listViewLayoutManager hooks can be used.

在 Strapi 5 中

  • content-manager_editViewLayoutManagercontent-manager_listViewLayoutManager 已从 Redux 存储中移除。
  • 新的 useDocumentLayout 钩子可用。

迁移

🌐 Migration

本节重新组合了有关引入的重大更改的有用说明和程序。

🌐 This section regroups useful notes and procedures about the introduced breaking change.

注意

🌐 Notes

有关钩子的更多信息可以在 插件管理面板 API 文档中找到。

🌐 Additional information about hooks can be found in the Admin Panel API for plugins documentation.

手动操作

🌐 Manual procedure

利用插件中的 content-manager_editViewLayoutManagercontent-manager_listViewLayoutManager 钩子的插件开发者需要重构他们的代码。

🌐 Plugins developers taking advantage of the content-manager_editViewLayoutManager and content-manager_listViewLayoutManager hooks in their plugins need to refactor their code.