Browse Source
chore: adjust wave pos (#40192)
* chore: adjust wave pos
* chore: patch check
* chore: update post
pull/40195/head
二货爱吃白萝卜
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
3 deletions
-
components/_util/wave/WaveEffect.tsx
-
scripts/post-script.js
|
|
@ -46,9 +46,12 @@ const WaveEffect: React.FC<WaveEffectProps> = (props) => { |
|
|
|
// Get wave color from target
|
|
|
|
setWaveColor(getTargetWaveColor(target)); |
|
|
|
|
|
|
|
const isStatic = nodeStyle.position === 'static'; |
|
|
|
|
|
|
|
// Rect
|
|
|
|
setLeft(target.offsetLeft); |
|
|
|
setTop(target.offsetTop); |
|
|
|
const { borderLeftWidth, borderTopWidth } = nodeStyle; |
|
|
|
setLeft(isStatic ? target.offsetLeft : -parseFloat(borderLeftWidth)); |
|
|
|
setTop(isStatic ? target.offsetTop : -parseFloat(borderTopWidth)); |
|
|
|
setWidth(target.offsetWidth); |
|
|
|
setHeight(target.offsetHeight); |
|
|
|
|
|
|
@ -128,7 +131,7 @@ export default function showWaveEffect(node: HTMLElement, className: string) { |
|
|
|
holder.style.position = 'absolute'; |
|
|
|
holder.style.left = `0px`; |
|
|
|
holder.style.top = `0px`; |
|
|
|
node.parentElement?.appendChild(holder); |
|
|
|
node?.insertBefore(holder, node?.firstChild); |
|
|
|
|
|
|
|
render(<WaveEffect target={node} className={className} />, holder); |
|
|
|
} |
|
|
|
|
|
@ -28,6 +28,7 @@ const DEPRECIATED_VERSION = { |
|
|
|
'5.1.0': ['https://github.com/react-component/drawer/pull/370'], |
|
|
|
'5.1.2': ['https://github.com/ant-design/ant-design/issues/39949'], |
|
|
|
'5.1.3': ['https://github.com/ant-design/ant-design/issues/40113'], |
|
|
|
'5.1.4': ['https://github.com/ant-design/ant-design/issues/40186'], |
|
|
|
}; |
|
|
|
|
|
|
|
function matchDeprecated(version) { |
|
|
|