Commit 14be7f4c authored by youjie's avatar youjie
parents 810306d7 bbbcf8e0
...@@ -229,6 +229,7 @@ ...@@ -229,6 +229,7 @@
showRightMenu(e) { showRightMenu(e) {
if (e.button == 2) { if (e.button == 2) {
let id = '' let id = ''
if (e.path) {
e.path.forEach(x => { e.path.forEach(x => {
if (x.className && x.className.indexOf('el-tabs__item') != -1) { if (x.className && x.className.indexOf('el-tabs__item') != -1) {
id = x.id.split('-')[1] id = x.id.split('-')[1]
...@@ -242,6 +243,20 @@ ...@@ -242,6 +243,20 @@
this.currentRightIndex = i 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