Commit 14be7f4c authored by youjie's avatar youjie
parents 810306d7 bbbcf8e0
...@@ -229,19 +229,34 @@ ...@@ -229,19 +229,34 @@
showRightMenu(e) { showRightMenu(e) {
if (e.button == 2) { if (e.button == 2) {
let id = '' let id = ''
e.path.forEach(x => { if (e.path) {
if (x.className && x.className.indexOf('el-tabs__item') != -1) { e.path.forEach(x => {
id = x.id.split('-')[1] if (x.className && x.className.indexOf('el-tabs__item') != -1) {
return false id = x.id.split('-')[1]
} return false
}) }
this.tabs.forEach((x, i) => { })
if ((x.name + "_" + i) == id) { this.tabs.forEach((x, i) => {
this.mouseX = e.clientX if ((x.name + "_" + i) == id) {
this.mouserY = e.offsetY this.mouseX = e.clientX
this.currentRightIndex = i this.mouserY = e.offsetY
this.currentRightIndex = i
}
})
} else if (id == '' && e.target && e.target.id) {
var tempArray = e.target.id.split('-');
if (tempArray && tempArray.length > 1) {
id = tempArray[1];
} }
}) this.tabs.forEach((x, i) => {
var newName = x.name + "_" + i;
if (newName == id) {
this.mouseX = e.clientX
this.mouserY = e.offsetY
this.currentRightIndex = i
}
})
}
} }
}, },
goback(t) { goback(t) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment