Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@icedesign/awesome-nav

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icedesign/awesome-nav

ICE 导航组件体验版

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

title: AwesomeNav category: Components chinese: 导航组件体验版

ICE 导航组件,为页面和功能提供导航的菜单列表。底层基于 rc-menu 并做了 ICE Design 的样式改造。

何时使用

导航菜单是一个网站的灵魂,用户依赖导航在各个页面中进行跳转。一般分为顶部导航和侧边导航,顶部导航提供全局性的类目和功能,侧边导航提供多级结构来收纳和排列网站架构。

<AwesomeNav>
  <AwesomeNav.Item>菜单项</AwesomeNav.Item>
  <AwesomeNav.SubMenu title="子菜单">
    <AwesomeNav.Item>子菜单项</AwesomeNav.Item>
  </AwesomeNav.SubMenu>
</AwesomeNav>

API

Menu props

参数说明类型默认值
theme主题颜色string: light darklight
color支持 Colorful ICE 配色string: blue, green, orange, red, roseo
mode菜单类型,现在支持垂直、水平、和内嵌模式三种string: vertical horizontal inlinevertical
selectedKeys当前选中的菜单项 key 数组string[]
defaultSelectedKeys初始选中的菜单项 key 数组string[]
openKeys当前展开的 SubMenu 菜单项 key 数组string[]
defaultOpenKeys初始展开的 SubMenu 菜单项 key 数组
onOpenChangeSubMenu 展开/关闭的回调Function(openKeys: string[])noop
onSelect被选中时调Function({ item, key, selectedKeys })
onDeselect取消选中时调用,仅在 multiple 生效Function({ item, key, selectedKeys })-
onClick点击 menuitem 调用此函数,参数为 {item, key, keyPath},在 MenuItem 上面设置 onClick 无效function-
style根节点样式object
inlineIndentinline 模式的菜单缩进宽度number24
multiple是否允许多选booleanfalse

More options in rc-menu

AwesomeNav.Item props

参数说明类型默认值
disabled是否禁用booleanfalse
keyitem 的唯一标志string

AwesomeNav.SubMenu props

参数说明类型默认值
disabled是否禁用booleanfalse
key唯一标志string
title子菜单项值string|ReactNode
children子菜单的菜单项Array<MenuItem|SubMenu>
onTitleClick点击子菜单标题Function({ eventKey, domEvent })

AwesomeNav.ItemGroup props

参数说明类型默认值
title分组标题string|ReactNode
children分组的菜单项MenuItem[]

AwesomeNav.Divider

菜单项分割线,只用在弹出菜单内。

Keywords

ice-components

FAQs

Package last updated on 06 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts