mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
type: update type any => node (#46716)
* docs: update publish Date * type: update type any => node
This commit is contained in:
parent
24b083e8aa
commit
235fb6576c
@ -10,7 +10,7 @@ export const BaseSize = 2;
|
||||
export const FontGap = 3;
|
||||
|
||||
// Prevent external hidden elements from adding accent styles
|
||||
const EmphasizedStyles = {
|
||||
const emphasizedStyle = {
|
||||
visibility: 'visible !important',
|
||||
};
|
||||
|
||||
@ -44,7 +44,7 @@ export default function useWatermark(
|
||||
...markStyle,
|
||||
backgroundImage: `url('${base64Url}')`,
|
||||
backgroundSize: `${Math.floor(markWidth)}px`,
|
||||
...(EmphasizedStyles as React.CSSProperties),
|
||||
...(emphasizedStyle as React.CSSProperties),
|
||||
}),
|
||||
);
|
||||
// Prevents using the browser `Hide Element` to hide watermarks
|
||||
|
@ -15,11 +15,11 @@ export function getPixelRatio() {
|
||||
}
|
||||
|
||||
/** Whether to re-render the watermark */
|
||||
export const reRendering = (mutation: MutationRecord, isWatermarkEle: (ele: any) => boolean) => {
|
||||
export const reRendering = (mutation: MutationRecord, isWatermarkEle: (ele: Node) => boolean) => {
|
||||
let flag = false;
|
||||
// Whether to delete the watermark node
|
||||
if (mutation.removedNodes.length) {
|
||||
flag = Array.from(mutation.removedNodes).some((node) => isWatermarkEle(node));
|
||||
flag = Array.from<Node>(mutation.removedNodes).some((node) => isWatermarkEle(node));
|
||||
}
|
||||
// Whether the watermark dom property value has been modified
|
||||
if (mutation.type === 'attributes' && isWatermarkEle(mutation.target)) {
|
||||
|
Loading…
Reference in New Issue
Block a user