fixed mailto: links on home
This commit is contained in:
parent
10083d75c5
commit
1bdacc98ff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -123,21 +123,26 @@ export default {
|
||||||
},
|
},
|
||||||
onClickLink(e){
|
onClickLink(e){
|
||||||
console.log("onClickLink", e, this.$router, this.$route)
|
console.log("onClickLink", e, this.$router, this.$route)
|
||||||
let path = null;
|
if (e.originalTarget.protocol == "mailto:") {
|
||||||
// find existing router route compared with link href
|
// https://stackoverflow.com/questions/10172499/mailto-using-javascript
|
||||||
for (let i = 0; i < this.$router.options.routes.length; i++) {
|
window.location.href = e.originalTarget.href
|
||||||
if (this.$router.options.routes[i].path == e.originalTarget.pathname) {
|
}else {
|
||||||
if (e.originalTarget.pathname !== this.$route.path) {
|
let path = null;
|
||||||
path = e.originalTarget.pathname
|
// find existing router route compared with link href
|
||||||
|
for (let i = 0; i < this.$router.options.routes.length; i++) {
|
||||||
|
if (this.$router.options.routes[i].path == e.originalTarget.pathname) {
|
||||||
|
if (e.originalTarget.pathname !== this.$route.path) {
|
||||||
|
path = e.originalTarget.pathname
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
break
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: path
|
path: path
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onClickFieldLabel(e){
|
onClickFieldLabel(e){
|
||||||
|
|
Loading…
Reference in New Issue