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

Customizing menu renderIcon feature #722

Closed
zce opened this issue Jul 29, 2021 · 0 comments · Fixed by #724
Closed

Customizing menu renderIcon feature #722

zce opened this issue Jul 29, 2021 · 0 comments · Fixed by #724
Labels
feature request New feature or request

Comments

@zce
Copy link
Contributor

zce commented Jul 29, 2021

The renderIcon function of the custom menu cannot control whether icons are used.

This function solves the problem (这个功能解决的问题)

Consider not enabling icons when a function returns null or false.

Expected API (期望的 API)

const renderMenuIcon = option => {
  if (!option.icon) return null
  return h(NIcon, null, { default: option.icon })
}
@github-actions github-actions bot added the feature request New feature or request label Jul 29, 2021
07akioni pushed a commit that referenced this issue Jul 29, 2021
…ue (#724)

* feat(NMenu): enhanced renderIcon

close #722

* feat: render-icon enhanced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant