mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
commit
6ab61e420c
@ -338,6 +338,7 @@ const Base = React.forwardRef((props: InternalBlockProps, ref: any) => {
|
|||||||
className={className}
|
className={className}
|
||||||
style={style}
|
style={style}
|
||||||
direction={direction}
|
direction={direction}
|
||||||
|
component={component}
|
||||||
maxLength={editConfig.maxLength}
|
maxLength={editConfig.maxLength}
|
||||||
autoSize={editConfig.autoSize}
|
autoSize={editConfig.autoSize}
|
||||||
enterIcon={editConfig.enterIcon}
|
enterIcon={editConfig.enterIcon}
|
||||||
|
@ -20,6 +20,7 @@ interface EditableProps {
|
|||||||
maxLength?: number;
|
maxLength?: number;
|
||||||
autoSize?: boolean | AutoSizeType;
|
autoSize?: boolean | AutoSizeType;
|
||||||
enterIcon?: React.ReactNode;
|
enterIcon?: React.ReactNode;
|
||||||
|
component?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Editable: React.FC<EditableProps> = ({
|
const Editable: React.FC<EditableProps> = ({
|
||||||
@ -34,6 +35,7 @@ const Editable: React.FC<EditableProps> = ({
|
|||||||
onSave,
|
onSave,
|
||||||
onCancel,
|
onCancel,
|
||||||
onEnd,
|
onEnd,
|
||||||
|
component,
|
||||||
enterIcon = <EnterOutlined />,
|
enterIcon = <EnterOutlined />,
|
||||||
}) => {
|
}) => {
|
||||||
const ref = React.useRef<any>();
|
const ref = React.useRef<any>();
|
||||||
@ -108,6 +110,8 @@ const Editable: React.FC<EditableProps> = ({
|
|||||||
confirmChange();
|
confirmChange();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const textClassName = component ? `${prefixCls}-${component}` : '';
|
||||||
|
|
||||||
const textAreaClassName = classNames(
|
const textAreaClassName = classNames(
|
||||||
prefixCls,
|
prefixCls,
|
||||||
`${prefixCls}-edit-content`,
|
`${prefixCls}-edit-content`,
|
||||||
@ -115,6 +119,7 @@ const Editable: React.FC<EditableProps> = ({
|
|||||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||||
},
|
},
|
||||||
className,
|
className,
|
||||||
|
textClassName,
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1103,6 +1103,295 @@ Array [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>,
|
</div>,
|
||||||
|
<h1
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h1. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h1>,
|
||||||
|
<h2
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h2. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h2>,
|
||||||
|
<h3
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h3. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h3>,
|
||||||
|
<h4
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h4. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h4>,
|
||||||
|
<h5
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h5. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip"
|
||||||
|
style="opacity:0;pointer-events:none"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-content"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-arrow"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-tooltip-arrow-content"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-tooltip-inner"
|
||||||
|
role="tooltip"
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h5>,
|
||||||
|
<div
|
||||||
|
class="ant-divider ant-divider-horizontal"
|
||||||
|
role="separator"
|
||||||
|
/>,
|
||||||
<div
|
<div
|
||||||
class="ant-typography"
|
class="ant-typography"
|
||||||
>
|
>
|
||||||
|
@ -841,6 +841,175 @@ Array [
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>,
|
</div>,
|
||||||
|
<h1
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h1. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</h1>,
|
||||||
|
<h2
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h2. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</h2>,
|
||||||
|
<h3
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h3. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</h3>,
|
||||||
|
<h4
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h4. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</h4>,
|
||||||
|
<h5
|
||||||
|
class="ant-typography"
|
||||||
|
style="margin:0"
|
||||||
|
>
|
||||||
|
h5. Ant Design
|
||||||
|
<div
|
||||||
|
aria-label="Edit"
|
||||||
|
class="ant-typography-edit"
|
||||||
|
role="button"
|
||||||
|
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
aria-label="edit"
|
||||||
|
class="anticon anticon-edit"
|
||||||
|
role="button"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="edit"
|
||||||
|
fill="currentColor"
|
||||||
|
focusable="false"
|
||||||
|
height="1em"
|
||||||
|
viewBox="64 64 896 896"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</h5>,
|
||||||
|
<div
|
||||||
|
class="ant-divider ant-divider-horizontal"
|
||||||
|
role="separator"
|
||||||
|
/>,
|
||||||
<div
|
<div
|
||||||
class="ant-typography"
|
class="ant-typography"
|
||||||
>
|
>
|
||||||
|
@ -15,7 +15,7 @@ Provide additional interactive capacity of editable and copyable.
|
|||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Checkbox, Radio, Typography } from 'antd';
|
import { Checkbox, Radio, Typography, Divider } from 'antd';
|
||||||
import { CheckOutlined, HighlightOutlined, SmileOutlined, SmileFilled } from '@ant-design/icons';
|
import { CheckOutlined, HighlightOutlined, SmileOutlined, SmileFilled } from '@ant-design/icons';
|
||||||
|
|
||||||
const { Paragraph } = Typography;
|
const { Paragraph } = Typography;
|
||||||
@ -119,6 +119,22 @@ const Demo = () => {
|
|||||||
>
|
>
|
||||||
{lengthLimitedStr}
|
{lengthLimitedStr}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
|
<Typography.Title editable level={1} style={{ margin: 0 }}>
|
||||||
|
h1. Ant Design
|
||||||
|
</Typography.Title>
|
||||||
|
<Typography.Title editable level={2} style={{ margin: 0 }}>
|
||||||
|
h2. Ant Design
|
||||||
|
</Typography.Title>
|
||||||
|
<Typography.Title editable level={3} style={{ margin: 0 }}>
|
||||||
|
h3. Ant Design
|
||||||
|
</Typography.Title>
|
||||||
|
<Typography.Title editable level={4} style={{ margin: 0 }}>
|
||||||
|
h4. Ant Design
|
||||||
|
</Typography.Title>
|
||||||
|
<Typography.Title editable level={5} style={{ margin: 0 }}>
|
||||||
|
h5. Ant Design
|
||||||
|
</Typography.Title>
|
||||||
|
<Divider />
|
||||||
<Paragraph copyable>This is a copyable text.</Paragraph>
|
<Paragraph copyable>This is a copyable text.</Paragraph>
|
||||||
<Paragraph copyable={{ text: 'Hello, Ant Design!' }}>Replace copy text.</Paragraph>
|
<Paragraph copyable={{ text: 'Hello, Ant Design!' }}>Replace copy text.</Paragraph>
|
||||||
<Paragraph
|
<Paragraph
|
||||||
|
@ -43,26 +43,36 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1&,
|
h1&,
|
||||||
|
div&-h1,
|
||||||
|
div&-h1 > textarea,
|
||||||
h1 {
|
h1 {
|
||||||
.typography-title-1();
|
.typography-title-1();
|
||||||
}
|
}
|
||||||
|
|
||||||
h2&,
|
h2&,
|
||||||
|
div&-h2,
|
||||||
|
div&-h2 > textarea,
|
||||||
h2 {
|
h2 {
|
||||||
.typography-title-2();
|
.typography-title-2();
|
||||||
}
|
}
|
||||||
|
|
||||||
h3&,
|
h3&,
|
||||||
|
div&-h3,
|
||||||
|
div&-h3 > textarea,
|
||||||
h3 {
|
h3 {
|
||||||
.typography-title-3();
|
.typography-title-3();
|
||||||
}
|
}
|
||||||
|
|
||||||
h4&,
|
h4&,
|
||||||
|
div&-h4,
|
||||||
|
div&-h4 > textarea,
|
||||||
h4 {
|
h4 {
|
||||||
.typography-title-4();
|
.typography-title-4();
|
||||||
}
|
}
|
||||||
|
|
||||||
h5&,
|
h5&,
|
||||||
|
div&-h5,
|
||||||
|
div&-h5 > textarea,
|
||||||
h5 {
|
h5 {
|
||||||
.typography-title-5();
|
.typography-title-5();
|
||||||
}
|
}
|
||||||
@ -198,6 +208,10 @@
|
|||||||
right: 10px;
|
right: 10px;
|
||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
color: @text-color-secondary;
|
color: @text-color-secondary;
|
||||||
|
// default style
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: @font-size-base;
|
||||||
|
font-style: normal;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user