|
@@ -23,12 +23,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-dropdown split-button type="primary" size="small" @click="handleCommand('0', scope.row)"
|
|
|
- @command="handleCommand($event, scope.row)">
|
|
|
+ <el-dropdown split-button type="primary" size="small" :ref="'myDropdown'+scope.$index" trigger="click" :hide-on-click="false" @click="handleCommand('0', scope)"
|
|
|
+ @command="handleCommand($event, scope)">
|
|
|
<span>编 辑</span>
|
|
|
<el-dropdown-menu slot="dropdown" style="text-align:center">
|
|
|
<el-dropdown-item>
|
|
|
- <el-dropdown trigger="hover" placement="left-start" @command="handleCommand($event,scope.row)">
|
|
|
+ <el-dropdown trigger="hover" placement="left-start" @command="handleCommand($event,scope)">
|
|
|
<p class="el-dropdown-link">新增产品</p>
|
|
|
<el-dropdown-menu class="text-align_center">
|
|
|
<el-dropdown-item command="7">新增本公司产品</el-dropdown-item>
|
|
@@ -137,7 +137,12 @@ export default {
|
|
|
|
|
|
},
|
|
|
// 编辑下拉菜单
|
|
|
- handleCommand(val, row) {
|
|
|
+ handleCommand(val, scope) {
|
|
|
+ var row = scope.row
|
|
|
+ var index = scope.$index
|
|
|
+ if(val!=undefined){
|
|
|
+ this.$refs['myDropdown'+index].hide()
|
|
|
+ }
|
|
|
this.$emit('options', { val, row })
|
|
|
},
|
|
|
|