Skip to content

Commit

Permalink
fix(Descriptions): fix ellipsis type error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Nov 15, 2022
1 parent 4b522af commit d051be5
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 342 deletions.
2 changes: 1 addition & 1 deletion packages/descriptions/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export type ProDescriptionsItemProps<T = Record<string, any>, ValueType = 'text'
hide?: boolean;
plain?: boolean;
copyable?: boolean;
ellipsis?: boolean;
ellipsis?: boolean | { showTitle?: boolean };
mode?: ProFieldFCMode;
children?: React.ReactNode;
order?: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/demos/config-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@ant-design/pro-components';
import { ConfigProvider, Input } from 'antd';
import enUS from 'antd/es/locale/en_US';
import { LightWrapper } from '../BaseForm';
import { LightWrapper } from '../BaseForm/LightWrapper';

export default () => (
<ConfigProvider locale={enUS}>
Expand Down
78 changes: 1 addition & 77 deletions packages/layout/src/demos/designSiderMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import {
CaretDownFilled,
GithubFilled,
InfoCircleFilled,
PlusCircleFilled,
QuestionCircleFilled,
SearchOutlined,
} from '@ant-design/icons';
import { GithubFilled, InfoCircleFilled, QuestionCircleFilled } from '@ant-design/icons';
import ProCard from '@ant-design/pro-card';
import type { ProSettings } from '@ant-design/pro-layout';
import { PageContainer, ProLayout, SettingDrawer } from '@ant-design/pro-layout';
import { css } from '@emotion/css';
import { Dropdown, Input } from 'antd';
import { useState } from 'react';
import defaultProps from './_defaultProps';

Expand Down Expand Up @@ -69,73 +60,6 @@ export default () => {
<GithubFilled key="GithubFilled" />,
];
}}
menuExtraRender={(props) => {
if (props.collapsed) return [];
return (
<>
<Dropdown placement="bottom">
<div
style={{
color: 'rgba(0, 0, 0, 0.85)',
fontWeight: 500,
cursor: 'pointer',
display: 'flex',
gap: 4,
alignItems: 'center',
minWidth: '180px',
}}
className={css`
font-size: 16px;
margin-top: 24px;
padding: 0 12px;
&:hover {
background-color: rgba(0, 0, 0, 0.03);
}
`}
>
<span> 企业级资产中心</span>
<CaretDownFilled />
</div>
</Dropdown>
<div
key="SearchOutlined"
aria-hidden
style={{
marginBlockStart: '24px',
display: 'flex',
alignItems: 'center',
}}
onMouseDown={(e) => {
e.stopPropagation();
e.preventDefault();
}}
>
<Input
style={{
borderRadius: 4,
marginInlineEnd: 12,
backgroundColor: 'rgba(0,0,0,0.03)',
}}
prefix={
<SearchOutlined
style={{
color: 'rgba(0, 0, 0, 0.15)',
}}
/>
}
placeholder="搜索方案"
bordered={false}
/>
<PlusCircleFilled
style={{
color: 'var(--ant-primary-color)',
fontSize: 24,
}}
/>
</div>
</>
);
}}
menuItemRender={(item, dom) => (
<div
onClick={() => {
Expand Down
79 changes: 1 addition & 78 deletions packages/layout/src/demos/siderMode.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import {
CaretDownFilled,
GithubFilled,
InfoCircleFilled,
PlusCircleFilled,
QuestionCircleFilled,
SearchOutlined,
} from '@ant-design/icons';
import { GithubFilled, InfoCircleFilled, QuestionCircleFilled } from '@ant-design/icons';
import ProCard from '@ant-design/pro-card';
import type { ProSettings } from '@ant-design/pro-layout';
import { PageContainer, ProLayout, SettingDrawer } from '@ant-design/pro-layout';
import { css } from '@emotion/css';
import { Dropdown, Input } from 'antd';
import { useState } from 'react';
import defaultProps from './_defaultProps';

Expand Down Expand Up @@ -67,74 +58,6 @@ export default () => {
<GithubFilled key="GithubFilled" />,
];
}}
menuExtraRender={(props) => {
if (props.collapsed) return [];
return (
<>
<Dropdown placement="bottom">
<div
style={{
color: 'rgba(0, 0, 0, 0.85)',
fontWeight: 500,
cursor: 'pointer',
display: 'flex',
gap: 4,
alignItems: 'center',
minWidth: '180px',
}}
className={css`
font-size: 16px;
margin-top: 24px;
padding: 0 12px;
&:hover {
background-color: rgba(0, 0, 0, 0.03);
}
`}
>
<span> 企业级资产中心</span>
<CaretDownFilled />
</div>
</Dropdown>

<div
key="SearchOutlined"
aria-hidden
style={{
marginBlockStart: '24px',
display: 'flex',
alignItems: 'center',
}}
onMouseDown={(e) => {
e.stopPropagation();
e.preventDefault();
}}
>
<Input
style={{
borderRadius: 4,
marginInlineEnd: 12,
backgroundColor: 'rgba(0,0,0,0.03)',
}}
prefix={
<SearchOutlined
style={{
color: 'rgba(0, 0, 0, 0.15)',
}}
/>
}
placeholder="搜索方案"
bordered={false}
/>
<PlusCircleFilled
style={{
color: 'var(--ant-primary-color)',
fontSize: 24,
}}
/>
</div>
</>
);
}}
menuItemRender={(item, dom) => (
<div
onClick={() => {
Expand Down
3 changes: 1 addition & 2 deletions packages/layout/src/demos/splitMenus.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ProLayout, { SettingDrawer } from '@ant-design/pro-layout';
import { PageContainer } from '../components/PageContainer';
import { PageContainer, SettingDrawer, ProLayout } from '@ant-design/pro-components';
import defaultProps from './_defaultProps';

export default () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/components/ListToolBar/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const genProListStyle: GenerateStyle<ProListToken> = (token) => {
justifyContent: 'space-between',
paddingBlock: token.padding,
paddingInline: 0,
' &-mobile': { flexDirection: 'column' },
'&-mobile': { flexDirection: 'column' },
},
'&-title': {
display: 'flex',
Expand Down
Loading

0 comments on commit d051be5

Please sign in to comment.