Closed v2okimochi closed 5 years ago
clicked(idx) {
console.log(`select: ${idx}`)
}
render() {
return (
<div>
<Menu
theme="dark"
className="el-menu-demo"
mode="horizontal"
onSelect={idx => this.clicked(idx)}
>
<Menu.Item index="1">item1</Menu.Item>
<Menu.Item index="2">item2</Menu.Item>
<Menu.Item index="3">item3</Menu.Item>
</Menu>
</div>
)
}
In these snipets, I'm expected that clicked() will be called if I click the Menu-Item "item1". Thanks.