Skip to content

Commit

Permalink
fix(pages): about page link issues
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Apr 7, 2022
1 parent 2031927 commit 8b87e06
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/views/account/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@
import { Descriptions, Card, Tag } from 'ant-design-vue';
const { pkg, lastBuildTime } = __APP_INFO__;
const BlankLink = ({ url = '', text }) => (
<a href={`https://www.npmjs.com/package/${url}`} target="_blank">
{text}
</a>
);
const BlankLink = ({ url = '', text }) => {
const target = /^http(s)?:/.test(url) ? url : `https://www.npmjs.com/package/${url}`;
return (
<a href={target} target="_blank">
{text}
</a>
);
};
</script>

1 comment on commit 8b87e06

@vercel
Copy link

@vercel vercel bot commented on 8b87e06 Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue3-antd-admin – ./

vue3-antd-admin-git-main-buqiyuan.vercel.app
vue3-antd-admin.vercel.app
vue3-antd-admin-buqiyuan.vercel.app

Please sign in to comment.