Skip to content

Commit

Permalink
fix: 修复链接带协议跳转问题.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evansy authored Jul 13, 2023
1 parent cb32881 commit 262a5db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/RenderMessage/text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const fragments = computed(() => {
const openUrl = (url: string) => {
if (!url) return
// 当没有协议时,自动添加协议
window.open('//' + url, '_blank')
window.open(url.startsWith("http") ? url : '//' + url, '_blank')
}
</script>

Expand Down

0 comments on commit 262a5db

Please sign in to comment.