Skip to content

Commit de6c417

Browse files
committed
feat: event metaKey
1 parent 00127a0 commit de6c417

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/templates/plugin.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export default ({ app: { router } }) => {
99
const href = event.currentTarget.getAttribute('href')
1010
if (href && href[0] === '/') {
1111
event.preventDefault()
12-
router.push(href)
12+
event.metaKey
13+
? window.open(href, '_blank')
14+
: router.push(href)
1315
}
1416
}
1517

0 commit comments

Comments
 (0)