Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的 React 应用程序中使用 admin-on-rest 并想知道如何创建一个包含具有指定资源 ID 的 Show(或其他详细信息组件)的自定义页面(例如:我希望我的应用程序仅获取 id = 1 的资源)
我不知道这是规范的还是预期的做事方式,但您可以将 basePath 和 record 作为道具提供给 ShowButton 和 EditButton 组件。
您可以使用它基本上将您的用户重定向到任何地方。
应该可以(使用一些 switch case 或依赖输入插件)将这些道具添加到 Show and Edit 视图中的 ListButton 并将您的用户重定向回原始 ListView。
这是为列表视图提供操作的文档。
https://marmelab.com/admin-on-rest/List.html#actions