已重写 EditViewLayout 和 ListViewLayout
页面摘要: 在 Strapi 5 中,
content-manager_editViewLayoutManager和content-manager_listViewLayoutManager这两个 Redux hook 已被移除,并替换为用于管理面板自定义的新useDocumentLayouthook。
在 Strapi 5 中,部分管理面板 hook 已从 Redux store 中移除,并引入了新的 useDocumentLayout hook。
本页面是破坏性变更数据库的一部分,提供有关该破坏性变更的信息,以及从 Strapi v4 迁移到 Strapi 5 的附加说明。
破坏性变更说明
在 Strapi v4 中
可以使用 content-manager_editViewLayoutManager 和 content-manager_listViewLayoutManager 这两个 hook。
在 Strapi 5 中
content-manager_editViewLayoutManager和content-manager_listViewLayoutManager已从 Redux store 中移除。- 提供了新的
useDocumentLayouthook。
迁移
本节汇总了关于该破坏性变更的有用说明和操作步骤。
说明
有关 hook 的更多信息可以在 面向插件的 Admin Panel API 文档中找到。
手动操作步骤
在插件中使用了 content-manager_editViewLayoutManager 和 content-manager_listViewLayoutManager hook 的插件开发者需要重构他们的代码。