fix(router): don't intercept download links (#1452)

pull/1453/head
yuhengshen 2 years ago committed by GitHub
parent 067e1a9743
commit 54cf6ce51f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -142,7 +142,7 @@ export function createRouter(
if (button) return
const link = (e.target as Element).closest('a')
if (link && !link.closest('.vp-raw')) {
if (link && !link.closest('.vp-raw') && !link.download) {
const { href, origin, pathname, hash, search, target } = link
const currentUrl = window.location
const extMatch = pathname.match(/\.\w+$/)

Loading…
Cancel
Save