mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Merge pull request #45198 from ant-design/master
chore: merge master into feature
This commit is contained in:
commit
e1f3b795e5
@ -208,12 +208,10 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
|
||||
const dependencies: Record<PropertyKey, string> = jsx.split('\n').reduce(
|
||||
(acc, line) => {
|
||||
const matches = line.match(/import .+? from '(.+)';$/);
|
||||
if (matches && matches[1] && !line.includes('antd')) {
|
||||
if (matches?.[1]) {
|
||||
const paths = matches[1].split('/');
|
||||
if (paths.length) {
|
||||
const dep = paths[0].startsWith('@') ? `${paths[0]}/${paths[1]}` : paths[0];
|
||||
acc[dep] = 'latest';
|
||||
}
|
||||
const dep = paths[0].startsWith('@') ? `${paths[0]}/${paths[1]}` : paths[0];
|
||||
acc[dep] ??= pkgDependencyList[dep] ?? 'latest';
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
|
@ -370,13 +370,12 @@ const GlobalStyle: React.FC = () => {
|
||||
&:first-child {
|
||||
width: 18%;
|
||||
min-width: 58px;
|
||||
color: #595959;
|
||||
color: ${token.colorText};
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
width: 55%;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,10 @@ import ConfigProvider from 'antd/es/config-provider';
|
||||
import useLocale from '../../../hooks/useLocale';
|
||||
import useLocation from '../../../hooks/useLocation';
|
||||
import GlobalStyles from '../../common/GlobalStyles';
|
||||
import Footer from '../../slots/Footer';
|
||||
import Header from '../../slots/Header';
|
||||
import SiteContext from '../../slots/SiteContext';
|
||||
import '../../static/style';
|
||||
import IndexLayout from '../IndexLayout';
|
||||
import ResourceLayout from '../ResourceLayout';
|
||||
import SidebarLayout from '../SidebarLayout';
|
||||
|
||||
@ -64,10 +64,9 @@ const DocLayout: React.FC = () => {
|
||||
['/index'].some((path) => pathname.startsWith(path))
|
||||
) {
|
||||
return (
|
||||
<>
|
||||
<div style={{ minHeight: '100vh' }}>{outlet}</div>
|
||||
<Footer />
|
||||
</>
|
||||
<IndexLayout title={locale.title} desc={locale.description}>
|
||||
{outlet}
|
||||
</IndexLayout>
|
||||
);
|
||||
}
|
||||
if (pathname.startsWith('/docs/resource')) {
|
||||
@ -87,13 +86,10 @@ const DocLayout: React.FC = () => {
|
||||
data-direction={direction}
|
||||
className={classNames({ rtl: direction === 'rtl' })}
|
||||
/>
|
||||
<title>{locale?.title}</title>
|
||||
<link
|
||||
sizes="144x144"
|
||||
href="https://gw.alipayobjects.com/zos/antfincdn/UmVnt3t4T0/antd.png"
|
||||
/>
|
||||
<meta name="description" content={locale.description} />
|
||||
<meta property="og:title" content={locale?.title} />
|
||||
<meta property="og:description" content={locale.description} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta
|
||||
|
21
.dumi/theme/layouts/IndexLayout/index.tsx
Normal file
21
.dumi/theme/layouts/IndexLayout/index.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import { Helmet } from 'dumi';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import React from 'react';
|
||||
import Footer from '../../slots/Footer';
|
||||
|
||||
const IndexLayout: React.FC<PropsWithChildren<{ title: string; desc: string }>> = ({
|
||||
children,
|
||||
...restProps
|
||||
}) => (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>{restProps.title}</title>
|
||||
<meta property="og:title" content={restProps.title} />
|
||||
{restProps.desc && <meta name="description" content={restProps.desc} />}
|
||||
</Helmet>
|
||||
<div style={{ minHeight: '100vh' }}>{children}</div>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
|
||||
export default IndexLayout;
|
@ -44,9 +44,11 @@ class AntdReactTechStack extends ReactTechStack {
|
||||
|
||||
const codePath = opts.fileAbsPath!.replace(/\.\w+$/, '.tsx');
|
||||
const code = fs.existsSync(codePath) ? fs.readFileSync(codePath, 'utf-8') : '';
|
||||
const pkgDependencyList = localPackage.dependencies;
|
||||
|
||||
props.pkgDependencyList = pkgDependencyList;
|
||||
props.pkgDependencyList = {
|
||||
...localPackage.devDependencies,
|
||||
...localPackage.dependencies,
|
||||
};
|
||||
props.jsx = sylvanas.parseText(code);
|
||||
|
||||
if (md) {
|
||||
|
4
.github/workflows/preview-deploy.yml
vendored
4
.github/workflows/preview-deploy.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
# Save PR id to output
|
||||
- name: save PR id
|
||||
id: pr
|
||||
run: echo "::set-output name=id::$(<pr-id.txt)"
|
||||
run: echo "id=$(<pr-id.txt)" >> $GITHUB_OUTPUT
|
||||
|
||||
# Download site artifact
|
||||
- name: download site artifact
|
||||
@ -93,7 +93,7 @@ jobs:
|
||||
# Save PR id to output
|
||||
- name: save PR id
|
||||
id: pr
|
||||
run: echo "::set-output name=id::$(<pr-id.txt)"
|
||||
run: echo "id=$(<pr-id.txt)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: The job has failed
|
||||
uses: actions-cool/maintain-one-comment@v3
|
||||
|
@ -65,7 +65,7 @@ Some components use dynamic style to support wave effect. You can config `csp` p
|
||||
| popupOverflow | Select like component popup logic. Can set to show in viewport or follow window scroll | 'viewport' \| 'scroll' <InlinePopover previewURL="https://user-images.githubusercontent.com/5378891/230344474-5b9f7e09-0a5d-49e8-bae8-7d2abed6c837.png"></InlinePopover> | 'viewport' | 5.5.0 |
|
||||
| prefixCls | Set prefix className | string | `ant` | |
|
||||
| renderEmpty | Set empty content of components. Ref [Empty](/components/empty/) | function(componentName: string): ReactNode | - | |
|
||||
| theme | Set theme, ref [Customize Theme](/docs/react/customize-theme) | - | - | 5.0.0 |
|
||||
| theme | Set theme, ref [Customize Theme](/docs/react/customize-theme) | [Theme](/docs/react/customize-theme#theme) | - | 5.0.0 |
|
||||
| virtual | Disable virtual scroll when set to `false` | boolean | - | 4.3.0 |
|
||||
| warning | Config warning level, when `strict` is `false`, it will aggregate deprecated information into a single message | { strict: boolean } | - | 5.10.0 |
|
||||
|
||||
|
@ -66,7 +66,7 @@ export default Demo;
|
||||
| popupOverflow | Select 类组件弹层展示逻辑,默认为可视区域滚动,可配置成滚动区域滚动 | 'viewport' \| 'scroll' <InlinePopover previewURL="https://user-images.githubusercontent.com/5378891/230344474-5b9f7e09-0a5d-49e8-bae8-7d2abed6c837.png"></InlinePopover> | 'viewport' | 5.5.0 |
|
||||
| prefixCls | 设置统一样式前缀 | string | `ant` | |
|
||||
| renderEmpty | 自定义组件空状态。参考 [空状态](/components/empty-cn) | function(componentName: string): ReactNode | - | |
|
||||
| theme | 设置主题,参考 [定制主题](/docs/react/customize-theme-cn) | - | - | 5.0.0 |
|
||||
| theme | 设置主题,参考 [定制主题](/docs/react/customize-theme-cn) | [Theme](/docs/react/customize-theme-cn#theme) | - | 5.0.0 |
|
||||
| virtual | 设置 `false` 时关闭虚拟滚动 | boolean | - | 4.3.0 |
|
||||
| warning | 设置警告等级,`strict` 为 `false` 时会将废弃相关信息聚合为单条信息 | { strict: boolean } | - | 5.10.0 |
|
||||
|
||||
|
@ -321054,7 +321054,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
tamam
|
||||
Tamam
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
|
@ -7,7 +7,7 @@ import type { SliderRef } from 'rc-slider/lib/Slider';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import DisabledContext from '../config-provider/DisabledContext';
|
||||
import type { TooltipPlacement } from '../tooltip';
|
||||
import type { AbstractTooltipProps, TooltipPlacement } from '../tooltip';
|
||||
import SliderTooltip from './SliderTooltip';
|
||||
import useStyle from './style';
|
||||
|
||||
@ -28,7 +28,7 @@ export type HandleGeneratorFn = (config: {
|
||||
export type Formatter = (value?: number) => React.ReactNode;
|
||||
const defaultFormatter: Formatter = (val) => (typeof val === 'number' ? val.toString() : '');
|
||||
|
||||
export interface SliderTooltipProps {
|
||||
export interface SliderTooltipProps extends AbstractTooltipProps {
|
||||
prefixCls?: string;
|
||||
open?: boolean;
|
||||
placement?: TooltipPlacement;
|
||||
|
@ -58,7 +58,7 @@ const columns = [
|
||||
## 相关推荐
|
||||
|
||||
- [Kitchen Sketch 插件 💎](https://kitchen.alipay.com/):设计师神器,两步自动生成 Ant Design 表格组件。
|
||||
- [ProTable](https://procomponents.ant.design/components/table-cn) 高级表格:在 `antd` Table 之上扩展了更多便捷易用的功能,内置搜索、筛选、刷新等常用表格行为,并为多种类型数据展示提供了内置格式化。
|
||||
- [ProTable](https://procomponents.ant.design/components/table) 高级表格:在 `antd` Table 之上扩展了更多便捷易用的功能,内置搜索、筛选、刷新等常用表格行为,并为多种类型数据展示提供了内置格式化。
|
||||
- [S2](https://s2.antv.vision/zh) 多维交叉分析表格:[AntV S2 和 Antd Table 有什么区别?](https://zhuanlan.zhihu.com/p/494995642)
|
||||
|
||||
## 代码演示
|
||||
|
@ -116,7 +116,7 @@ antd 内部会对 props 进行浅比较实现性能优化。当状态变更,
|
||||
| Ant Design 1.x | https://ant-design-1x.gitee.io |
|
||||
| Ant Design Pro | https://ant-design-pro.gitee.io/ |
|
||||
| Ant Design Mobile | https://ant-design-mobile.antgroup.com/zh <br /> https://antd-mobile.gitee.io/ |
|
||||
| Ant Design Mini | https://ant-design-mini.antgroup.com/zh <br /> https://antd-mobile.gitee.io/ |
|
||||
| Ant Design Mini | https://ant-design-mini.antgroup.com <br /> https://antd-mobile.gitee.io/ |
|
||||
| Ant Design Charts | https://ant-design-charts.antgroup.com<br /> https://antd-mobile.gitee.io/ |
|
||||
| AntV | https://antv.antgroup.com |
|
||||
| Ant Motion | https://ant-motion.gitee.io |
|
||||
|
@ -138,7 +138,7 @@
|
||||
"rc-motion": "^2.9.0",
|
||||
"rc-notification": "~5.2.0",
|
||||
"rc-pagination": "~3.6.1",
|
||||
"rc-picker": "~3.14.4",
|
||||
"rc-picker": "~3.14.5",
|
||||
"rc-progress": "~3.5.1",
|
||||
"rc-rate": "~2.12.0",
|
||||
"rc-resize-observer": "^1.3.1",
|
||||
|
Loading…
Reference in New Issue
Block a user