1.<el-row>
<el-col v-for="item in data" @contextmenu.prevent.native="rightClick(item)">
<el-dropdown trigger="click" :ref="`work_flow_${item.name}`">
<----展示的内容--->
<el-dropdown-menu slot="dropdown">
<el-dropdoen-item @click.native="edit" >/el-dropdoen-item>
<el-dropdoen-item @click.native="add" ></el-dropdoen-item>
</el-dropdown-menu >
</el-dropdown>
</el-col>
</el-row>
methods:{
rightClick(item) {
const name = `work_flow_${item.name}`;
this.$refs[name][0].show(); // 这步最关键,让下拉菜单显示
}
}