Skip to content

silif/react-dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-dropdown

react-dropdown

<Dropdown 
    onCommand={this.handleCommand.bind(this)}
    trigger="hover"
    // type="button" type="text" 文字还是按钮 待完成
    menu={(
      <Dropdown.Menu>
        <Dropdown.Item command="a">英语</Dropdown.Item>
        <Dropdown.Item command="b">汉语</Dropdown.Item>
        <Dropdown.Item command="c">日本语</Dropdown.Item>
        <Dropdown.Item command="d" disabled>德语</Dropdown.Item>
        <Dropdown.Item command="e">法语</Dropdown.Item>
      </Dropdown.Menu>
  )}>

        选择语言
</Dropdown>

<Dropdown 
    onCommand={this.handleCommand.bind(this)}
    // 事件可不用写
    trigger="click" // 触发方式只能是hover click 
    // type="button" type="text" 文字还是按钮 待完成
    menu={(
        <Dropdown.Menu>
            <Dropdown.Item command="a">英语</Dropdown.Item>
            <Dropdown.Item command="b">汉语</Dropdown.Item>
            <Dropdown.Item command="c">日本语</Dropdown.Item>
            <Dropdown.Item command="d">德语</Dropdown.Item>
            <Dropdown.Item command="e">法语</Dropdown.Item>
        </Dropdown.Menu>
      )}>
    选择语言
</Dropdown>

Releases

No releases published

Packages

No packages published