Skip to content

Commit 4b28825

Browse files
committed
v-link: should work on non-anchor elements (fix #156)
1 parent 9335a80 commit 4b28825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/directives/link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function (Vue) {
2828
// don't redirect on right click
2929
if (e.button !== 0) return
3030

31-
if (this.el.tagName === 'A') {
31+
if (this.el.tagName === 'A' || e.target === this.el) {
3232
// v-link on <a v-link="'path'">
3333
e.preventDefault()
3434
if (this.destination != null) {

0 commit comments

Comments
 (0)