You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
<Sidebar /> will use menuConfig to generate the antd menu. When <MenuItem> is clicked, it should call the goTo method with argument {pathname, params}.
Agreed, I think the clearer details can help everyone to understand and give feedbacks before implementation. Also, this helps everyone on the same page.
Overview
We can pass
sidebarConfig
andnavbarConfig
to<CMSWrapper />
to render sidebar and navbar easily.Details
There should be two components
<Sidebar />
and<Navbar />
, and then<CMSWrapper />
can just pass their config to them like below.<Sidebar />
Implement sidebar with antd Sider and Menu
sidebarConfig interface
<Sidebar />
will usemenuConfig
to generate the antd menu. When<MenuItem>
is clicked, it should call thegoTo
method with argument{pathname, params}
.menuConfig examples
current implement in CMS
render with schema
if
sidebarConfig.menuConfig
is passed as atrue
means user wants to render menu with schema, for examples:import schema from 'canner.schema.js'
, we will actually get a object like below,We can get the data schema and transform it to menu.
<Navbar />
important with antd Header and Menu
A navbar can be divided to three parts from left to right: logo, menu, save button:
![navbar](https://user-images.githubusercontent.com/8848231/43516827-49d244d4-95b9-11e8-9b24-f51d3d02974f.png)
And there are three properties correspond to the three parts on navbar.
navbarConfig interface
ChangedData
Both
Sidebar
andNavbar
should have different behavior when there are unsaved change:saveButton
on navbar should have dot badge.See current implementation
The text was updated successfully, but these errors were encountered: