Skip to content

Commit

Permalink
🐞 fix(scripts): 修复“新标签页查看主题”可能未生效的问题
Browse files Browse the repository at this point in the history
1. 点击意见反馈和消息列表中的主题链接时,会在当前标签页打开
  • Loading branch information
ccnnde committed Jul 10, 2024
1 parent 958d817 commit ba0b169
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Topic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,17 @@ onMounted(() => {
});
const handleTopicClick = (e: Event) => {
e.preventDefault();
const { href } = e.target as HTMLAnchorElement;
if (isTopicLinkBlank.value) {
window.open(href);
return;
}
e.preventDefault();
topicId.value = href.match(topicLinkRegExp)?.[1];
openDialog();
const topicLinkEle = e.target as HTMLAnchorElement;
topicId.value = topicLinkEle.href.match(topicLinkRegExp)?.[1];
getFirstPageData();
};
Expand Down

0 comments on commit ba0b169

Please sign in to comment.