fix[ExternalLink]: fixed bug when url include chinese

This commit is contained in:
Pan
2018-10-10 17:50:31 +08:00
parent 8c0668d0d3
commit 54c2b2848e
3 changed files with 8 additions and 4 deletions

View File

@@ -68,3 +68,7 @@ export function formatTime(time, option) {
)
}
}
export function isExternal(path) {
return /^(https?:|mailto:|tel:)/.test(path)
}