-
Notifications
You must be signed in to change notification settings - Fork 0
HorizontalList
Zhexuan Liu edited this page Jun 21, 2018
·
5 revisions
横向选择菜单
<horizontallist selected={myStore.selectedIndex} on-change={xxx}>
<item title="16 : 9" icon="delete_button_icon"></item>
<item title="5 : 3" icon="delete_button_icon"></item>
<item title="5 : 4" icon="delete_button_icon"></item>
<item title="4 : 3" icon="delete_button_icon"></item>
<item title="3 : 2" icon="delete_button_icon"></item>
<item title="1 : 1" icon="delete_button_icon"></item>
</horizontallist>
const { HorizontalList } = 'mesh-envoy-tag'
const list = (
<HorizontalList
selected={this.state.index}
onChange={linkEvent(bar, this)}>
<HorizontalList.Item title="16 : 9" icon="test" />
<HorizontalList.Item title="5 : 3" icon="test" />
<HorizontalList.Item title="5 : 4" icon="test" />
<HorizontalList.Item title="4 : 3" icon="test" />
<HorizontalList.Item title="3 : 2" icon="test" />
<HorizontalList.Item title="1 : 1" icon="test" />
</HorizontalList>
)
名称 | 作用 | 必须 | 可否更改 |
---|---|---|---|
selected | list 当前选择的 index | true | true |
事件 | 触发条件 | 附带参数 |
---|---|---|
change | 选中某一项内容时被触发 | selected 的值 |
名称 | 作用 | 必须 | 可否更改 |
---|---|---|---|
title | 选项的标题 | true | false |
icon | 选项的图标文件名称,不含扩展名。目录中需要包含对应的 @2x @3x 图片 | true | false |