Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom state view displayed properties #178

Closed
wants to merge 1 commit into from

Conversation

ccloli
Copy link
Contributor

@ccloli ccloli commented Jun 26, 2024

Example:

<Sidebar.Item
  key="outline"
  label="结构"
  icon={<BuildOutlined />}
  widgetProps={{
    pickStateViewProperties: [
      'stores',
      'pageStore',
      'config',
      'refs',
    ]
  }} />

@@ -23,7 +31,7 @@ export function OutlinePanel({ showStateView = true, ...treeProps }: OutlineView
>
<ComponentsTree {...treeProps} />
</CollapsePanel>
{showStateView && <StateTree />}
{showStateView && <StateTree pickProperties={pickStateViewProperties} />}
Copy link
Contributor

@wwsun wwsun Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不如直接支持传递自定义的 appContext

<StateTree appContext={yourObject} />

@wwsun
Copy link
Contributor

wwsun commented Jun 26, 2024

直接将 routeData 作为默认值传入了

@wwsun wwsun closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants