mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
parent
0086884179
commit
c35787696b
@ -117,6 +117,33 @@ exports[`renders ./components/button/demo/block.tsx extend context correctly 1`]
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default ant-btn-block"
|
||||
disabled=""
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
disabled
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-text ant-btn-block"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
text
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
>
|
||||
|
@ -117,6 +117,33 @@ exports[`renders ./components/button/demo/block.tsx correctly 1`] = `
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-default ant-btn-block"
|
||||
disabled=""
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
disabled
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
style="margin-bottom:8px"
|
||||
>
|
||||
<button
|
||||
class="ant-btn ant-btn-text ant-btn-block"
|
||||
type="button"
|
||||
>
|
||||
<span>
|
||||
text
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="ant-space-item"
|
||||
>
|
||||
|
@ -160,7 +160,7 @@ const InternalButton: React.ForwardRefRenderFunction<
|
||||
block = false,
|
||||
/** If we extract items here, we don't need use omit.js */
|
||||
// React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
|
||||
htmlType = 'button' as ButtonProps['htmlType'],
|
||||
htmlType = 'button',
|
||||
...rest
|
||||
} = props;
|
||||
|
||||
|
@ -10,6 +10,12 @@ const App: React.FC = () => (
|
||||
<Button type="dashed" block>
|
||||
Dashed
|
||||
</Button>
|
||||
<Button disabled block>
|
||||
disabled
|
||||
</Button>
|
||||
<Button type="text" block>
|
||||
text
|
||||
</Button>
|
||||
<Button type="link" block>
|
||||
Link
|
||||
</Button>
|
||||
|
@ -237,7 +237,7 @@ const Tooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
|
||||
// 根据当前坐标设置动画点
|
||||
const rect = domNode.getBoundingClientRect();
|
||||
|
||||
const transformOrigin = { top: '50%', left: '50%' };
|
||||
const transformOrigin: React.CSSProperties = { top: '50%', left: '50%' };
|
||||
|
||||
if (/top|Bottom/.test(placement)) {
|
||||
transformOrigin.top = `${rect.height - align.offset![1]}px`;
|
||||
|
Loading…
Reference in New Issue
Block a user