Skip to content

Commit 8b87e06

Browse files
committed
fix(pages): about page link issues
1 parent 2031927 commit 8b87e06

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/views/account/about.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@
5959
import { Descriptions, Card, Tag } from 'ant-design-vue';
6060
const { pkg, lastBuildTime } = __APP_INFO__;
6161
62-
const BlankLink = ({ url = '', text }) => (
63-
<a href={`https://www.npmjs.com/package/${url}`} target="_blank">
64-
{text}
65-
</a>
66-
);
62+
const BlankLink = ({ url = '', text }) => {
63+
const target = /^http(s)?:/.test(url) ? url : `https://www.npmjs.com/package/${url}`;
64+
return (
65+
<a href={target} target="_blank">
66+
{text}
67+
</a>
68+
);
69+
};
6770
</script>

0 commit comments

Comments
 (0)