EditViewLayout 和 ListViewLayout 已重写
¥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.
| 🔌 此重大更改是否会影响插件? | 是 |
|---|
| 🤖 此重大更改是否由 codemod 自动处理? | 否 |
|---|
重大更改描述
¥Breaking change description
在 Strapi v4 中
¥In Strapi v4
可以使用 content-manager_editViewLayoutManager 和 content-manager_listViewLayoutManager 钩子。
¥The content-manager_editViewLayoutManager and content-manager_listViewLayoutManager hooks can be used.
在 Strapi 5 中
¥In Strapi 5
-
content-manager_editViewLayoutManager和content-manager_listViewLayoutManager已从 Redux 存储中删除。¥The
content-manager_editViewLayoutManagerandcontent-manager_listViewLayoutManagerhave been removed from the Redux store. -
新的
useDocumentLayout钩子可用。¥A new
useDocumentLayouthook is available.
迁移
¥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
在代码中使用实体服务装饰器的插件开发者必须将其替换为文档服务中间件。
¥Plugins developers taking advantage of the content-manager_editViewLayoutManager and content-manager_listViewLayoutManager hooks in their plugins need to refactor their code.