docs: add target properties to all external url link (#51917)
Some checks are pending
Publish Any Commit / build (push) Waiting to run
🔀 Sync mirror to Gitee / mirror (push) Waiting to run
✅ test / lint (push) Waiting to run
✅ test / test-react-legacy (16, 1/2) (push) Waiting to run
✅ test / test-react-legacy (16, 2/2) (push) Waiting to run
✅ test / test-react-legacy (17, 1/2) (push) Waiting to run
✅ test / test-react-legacy (17, 2/2) (push) Waiting to run
✅ test / test-node (push) Waiting to run
✅ test / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test / test-coverage (push) Blocked by required conditions
✅ test / build (push) Waiting to run
✅ test / test lib/es module (es, 1/2) (push) Waiting to run
✅ test / test lib/es module (es, 2/2) (push) Waiting to run
✅ test / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run

This commit is contained in:
碳苯 Carbon 2024-12-06 10:28:15 +08:00 committed by GitHub
parent d65e996658
commit 093c6c2d1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 79 additions and 12 deletions

View File

@ -1117,6 +1117,7 @@ Array [
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only" class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
href="https://www.google.com" href="https://www.google.com"
tabindex="0" tabindex="0"
target="_blank"
> >
<span <span
class="ant-btn-icon" class="ant-btn-icon"
@ -1843,6 +1844,7 @@ exports[`renders components/button/demo/icon.tsx extend context correctly 1`] =
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only" class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
href="https://www.google.com" href="https://www.google.com"
tabindex="0" tabindex="0"
target="_blank"
> >
<span <span
class="ant-btn-icon" class="ant-btn-icon"
@ -2271,6 +2273,7 @@ Array [
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only ant-btn-icon-end" class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only ant-btn-icon-end"
href="https://www.google.com" href="https://www.google.com"
tabindex="0" tabindex="0"
target="_blank"
> >
<span <span
class="ant-btn-icon" class="ant-btn-icon"

View File

@ -1022,6 +1022,7 @@ Array [
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only" class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
href="https://www.google.com" href="https://www.google.com"
tabindex="0" tabindex="0"
target="_blank"
> >
<span <span
class="ant-btn-icon" class="ant-btn-icon"
@ -1666,6 +1667,7 @@ exports[`renders components/button/demo/icon.tsx correctly 1`] = `
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only" class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
href="https://www.google.com" href="https://www.google.com"
tabindex="0" tabindex="0"
target="_blank"
> >
<span <span
class="ant-btn-icon" class="ant-btn-icon"
@ -2016,6 +2018,7 @@ Array [
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only ant-btn-icon-end" class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only ant-btn-icon-end"
href="https://www.google.com" href="https://www.google.com"
tabindex="0" tabindex="0"
target="_blank"
> >
<span <span
class="ant-btn-icon" class="ant-btn-icon"

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { SearchOutlined, MinusSquareOutlined } from '@ant-design/icons'; import { MinusSquareOutlined, SearchOutlined } from '@ant-design/icons';
import { Button, ConfigProvider, Divider, Flex, Radio, Tooltip } from 'antd'; import { Button, ConfigProvider, Divider, Flex, Radio, Tooltip } from 'antd';
import type { ConfigProviderProps } from 'antd'; import type { ConfigProviderProps } from 'antd';
@ -52,7 +52,7 @@ const App: React.FC = () => {
<Button type="dashed" icon={<SearchOutlined />}> <Button type="dashed" icon={<SearchOutlined />}>
Search Search
</Button> </Button>
<Button icon={<SearchOutlined />} href="https://www.google.com" /> <Button icon={<SearchOutlined />} href="https://www.google.com" target="_blank" />
<Button> <Button>
<SearchOutlined /> <SearchOutlined />
Search Search

View File

@ -47,7 +47,12 @@ const App: React.FC = () => {
<Button type="dashed" icon={<SearchOutlined />} iconPosition={position}> <Button type="dashed" icon={<SearchOutlined />} iconPosition={position}>
Search Search
</Button> </Button>
<Button icon={<SearchOutlined />} href="https://www.google.com" iconPosition={position} /> <Button
icon={<SearchOutlined />}
href="https://www.google.com"
target="_blank"
iconPosition={position}
/>
<Button type="primary" loading iconPosition={position}> <Button type="primary" loading iconPosition={position}>
Loading Loading
</Button> </Button>

View File

@ -30,7 +30,7 @@ const App: React.FC = () => (
<Button type="dashed" icon={<SearchOutlined />}> <Button type="dashed" icon={<SearchOutlined />}>
Search Search
</Button> </Button>
<Button icon={<SearchOutlined />} href="https://www.google.com" /> <Button icon={<SearchOutlined />} href="https://www.google.com" target="_blank" />
</Flex> </Flex>
</Flex> </Flex>
); );

View File

@ -406,7 +406,10 @@ const Page: React.FC<{ placement: Placement }> = ({ placement }) => {
<Rate defaultValue={2.5} /> <Rate defaultValue={2.5} />
<br /> <br />
<strong>* Note:</strong> Half star not implemented in RTL direction, it will be <strong>* Note:</strong> Half star not implemented in RTL direction, it will be
supported after <a href="https://github.com/react-component/rate">rc-rate</a>{' '} supported after{' '}
<a href="https://github.com/react-component/rate" target="_blank" rel="noreferrer">
rc-rate
</a>{' '}
implement rtl support. implement rtl support.
</Col> </Col>
<Col span={12}> <Col span={12}>

View File

@ -4343,6 +4343,8 @@ Array [
</p> </p>
<a <a
href="http://github.com/ant-design/ant-design/" href="http://github.com/ant-design/ant-design/"
rel="noreferrer"
target="_blank"
> >
github.com/ant-design/ant-design/ github.com/ant-design/ant-design/
</a> </a>

View File

@ -135,7 +135,7 @@ const App: React.FC = () => {
<DescriptionItem <DescriptionItem
title="Github" title="Github"
content={ content={
<a href="http://github.com/ant-design/ant-design/"> <a href="http://github.com/ant-design/ant-design/" target="_blank" rel="noreferrer">
github.com/ant-design/ant-design/ github.com/ant-design/ant-design/
</a> </a>
} }

View File

@ -7263,6 +7263,8 @@ Array [
> >
<a <a
href="https://www.antgroup.com" href="https://www.antgroup.com"
rel="noopener noreferrer"
target="_blank"
> >
1st menu item 1st menu item
</a> </a>
@ -7296,6 +7298,8 @@ Array [
> >
<a <a
href="https://www.aliyun.com" href="https://www.aliyun.com"
rel="noopener noreferrer"
target="_blank"
> >
2nd menu item 2nd menu item
</a> </a>

View File

@ -5,11 +5,19 @@ import { Dropdown, Space } from 'antd';
const items: MenuProps['items'] = [ const items: MenuProps['items'] = [
{ {
label: <a href="https://www.antgroup.com">1st menu item</a>, label: (
<a href="https://www.antgroup.com" target="_blank" rel="noopener noreferrer">
1st menu item
</a>
),
key: '0', key: '0',
}, },
{ {
label: <a href="https://www.aliyun.com">2nd menu item</a>, label: (
<a href="https://www.aliyun.com" target="_blank" rel="noopener noreferrer">
2nd menu item
</a>
),
key: '1', key: '1',
}, },
{ {

View File

@ -942,6 +942,8 @@ Array [
> >
<a <a
href="https://github.com/ant-design/ant-design/issues/36459" href="https://github.com/ant-design/ant-design/issues/36459"
rel="noreferrer"
target="_blank"
> >
#36459 #36459
</a> </a>
@ -1376,6 +1378,8 @@ Array [
> >
<a <a
href="https://github.com/ant-design/ant-design/issues/36459" href="https://github.com/ant-design/ant-design/issues/36459"
rel="noreferrer"
target="_blank"
> >
#36459 #36459
</a> </a>

View File

@ -778,6 +778,8 @@ Array [
> >
<a <a
href="https://github.com/ant-design/ant-design/issues/36459" href="https://github.com/ant-design/ant-design/issues/36459"
rel="noreferrer"
target="_blank"
> >
#36459 #36459
</a> </a>
@ -1107,6 +1109,8 @@ Array [
> >
<a <a
href="https://github.com/ant-design/ant-design/issues/36459" href="https://github.com/ant-design/ant-design/issues/36459"
rel="noreferrer"
target="_blank"
> >
#36459 #36459
</a> </a>

View File

@ -3,7 +3,15 @@ import { Button, Divider, Form, Input, Select } from 'antd';
const sharedItem = ( const sharedItem = (
<Form.Item <Form.Item
label={<a href="https://github.com/ant-design/ant-design/issues/36459">#36459</a>} label={
<a
href="https://github.com/ant-design/ant-design/issues/36459"
target="_blank"
rel="noreferrer"
>
#36459
</a>
}
initialValue={['bamboo']} initialValue={['bamboo']}
name="select" name="select"
style={{ boxShadow: '0 0 3px red' }} style={{ boxShadow: '0 0 3px red' }}

View File

@ -41,6 +41,7 @@ const App: React.FC = () => {
<Button <Button
key="link" key="link"
href="https://google.com" href="https://google.com"
target="_blank"
type="primary" type="primary"
loading={loading} loading={loading}
onClick={handleOk} onClick={handleOk}

View File

@ -143,6 +143,8 @@ Array [
> >
<a <a
href="https://github.com/ant-design/ant-design/issues/1862" href="https://github.com/ant-design/ant-design/issues/1862"
rel="noopener noreferrer"
target="_blank"
> >
Link Link
</a> </a>

View File

@ -141,6 +141,8 @@ Array [
> >
<a <a
href="https://github.com/ant-design/ant-design/issues/1862" href="https://github.com/ant-design/ant-design/issues/1862"
rel="noopener noreferrer"
target="_blank"
> >
Link Link
</a> </a>

View File

@ -11,7 +11,13 @@ const App: React.FC = () => (
<> <>
<Tag>Tag 1</Tag> <Tag>Tag 1</Tag>
<Tag> <Tag>
<a href="https://github.com/ant-design/ant-design/issues/1862">Link</a> <a
href="https://github.com/ant-design/ant-design/issues/1862"
target="_blank"
rel="noopener noreferrer"
>
Link
</a>
</Tag> </Tag>
<Tag closeIcon onClose={preventDefault}> <Tag closeIcon onClose={preventDefault}>
Prevent Default Prevent Default

View File

@ -8,10 +8,22 @@ const App: React.FC = () => (
> >
<Flex gap="4px 0" wrap> <Flex gap="4px 0" wrap>
<Tag> <Tag>
<a href="https://github.com/ant-design/ant-design/issues/1862">Link</a> <a
href="https://github.com/ant-design/ant-design/issues/1862"
target="_blank"
rel="noreferrer"
>
Link
</a>
</Tag> </Tag>
<Tag bordered={false}> <Tag bordered={false}>
<a href="https://github.com/ant-design/ant-design/issues/1862">Link</a> <a
href="https://github.com/ant-design/ant-design/issues/1862"
target="_blank"
rel="noreferrer"
>
Link
</a>
</Tag> </Tag>
<Tag closable color="magenta"> <Tag closable color="magenta">
Tag 2 Tag 2