ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

[feature request] suggestions on El dropdown #18845

Open zcj-cool opened 4 years ago

zcj-cool commented 4 years ago

Existing Component

Component Name

el-dropdown

Description

关于el-dropdown的建议:建议为el-dropdown添加v-model的绑定 然后就可以v-model知道用户选择菜单的值 并且可以通过@command="handleCommand(data)"的方式传值做相应的操作,现在的缺陷就是只能通过@command="handleCommand"才只用用户选择的值 却不能额外传值!

element-bot commented 4 years ago

Translation of this issue:

Existing Component

yes

Component Name

El-dropdown

Description

Suggestions on El dropdown: it is recommended to add V-model binding for El dropdown, and then V-model can know the value of the menu selected by the user and can transfer the value through @ command = "handlecommand (data)" to do the corresponding operation. The defect now is that only the value selected by the user can be transferred through @ command = "handlecommand" but not the value outside!

mei-rune commented 4 years ago

我也有同样的问题,我在一个列表的 左边 增加了一个 dropdown, 然后不知道,这是哪一行的。

mei-rune commented 4 years ago

@runner-mei 是我错了, command 可以是一个对象。

mei-rune commented 4 years ago

文档中可以写清楚一点 增加一个例子

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.