Skip to content

Commit

Permalink
fix(portal-web): 去掉 legacyBehavior,会影响 target=“_blank” 在新窗口或标签中打开链接的效果 (
Browse files Browse the repository at this point in the history
#844)

目前使用的next版本13.4.10,如果增加了legacyBehavior,会影响target="_blank"的核心效果(即在新窗口或标签中打开链接),此pr去掉FileManager中的该属性,保证能在打开终端时新开页面
  • Loading branch information
tongchong authored Sep 7, 2023
1 parent a8034f3 commit 154f5a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-ducks-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scow/portal-web": patch
---

去掉 legacyBehavior,会影响 target=\_blank 在新窗口或标签中打开链接的效果
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export const FileManager: React.FC<Props> = ({ cluster, path, urlPrefix }) => {
</Button>
{
publicConfig.ENABLE_SHELL ? (
<Link href={`/shell/${cluster.id}/${loginNode}${path}`} target="_blank" legacyBehavior>
<Link href={`/shell/${cluster.id}/${loginNode}${path}`} target="_blank">
<Button icon={<MacCommandOutlined />}>
在终端中打开
</Button>
Expand Down

0 comments on commit 154f5a8

Please sign in to comment.