<el-table-column
inline-template
:context="_self"
label="操作">
<template>
<el-dropdown @command="onOperate">
<span class="el-dropdown-link">
操作
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="approve">通过</el-dropdown-item>
<el-dropdown-item command="reject">驳回</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>

这种用法(在表格中以下拉菜单形式呈现按钮组)如果合理的话,理应能将当前 row 传给 @command 事件。但 @command 默认带上 command 字符串,能否也带上 row?
Never mind. @command is unnecessary. Could totally use @click event, but remember to use .native flag - that would be @click.native on el-dropdown-item.
大佬,怎么解决的啊?
Most helpful comment
Never mind.
@commandis unnecessary. Could totally use@clickevent, but remember to use.nativeflag - that would be@click.nativeonel-dropdown-item.