Files
2026-01-16 01:51:36 +00:00

46 lines
1.6 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from 'react';
export type WaterMarkProps = {
/** 类名 */
className?: string;
/** 样式 */
style?: React.CSSProperties;
/** 水印样式 */
markStyle?: React.CSSProperties;
/** 水印类名 */
markClassName?: string;
/** 水印之间的水平间距 */
gapX?: number;
/** 水印之间的垂直间距 */
gapY?: number;
/** 追加的水印元素的z-index */
zIndex?: number;
/** 水印的宽度 */
width?: number;
/** 水印的高度 */
height?: number;
/** 水印在canvas 画布上绘制的垂直偏移量,正常情况下,水印绘制在中间位置, 即 offsetTop = gapY / 2 */
offsetTop?: number;
/** 水印在canvas 画布上绘制的水平偏移量, 正常情况下,水印绘制在中间位置, 即 offsetTop = gapX / 2 */
offsetLeft?: number;
/** 水印绘制时,旋转的角度,单位 ° */
rotate?: number;
/** ClassName 前缀 */
prefixCls?: string;
/** 高清印图片源, 为了高清屏幕显示,建议使用 2倍或3倍图优先使用图片渲染水印。 */
image?: string;
/** 水印文字内容 */
content?: string | string[];
/** 文字颜色 */
fontColor?: string;
/** 文字样式 */
fontStyle?: 'none' | 'normal' | 'italic' | 'oblique';
/** 文字族 */
fontFamily?: string;
/** 文字粗细 */
fontWeight?: 'normal' | 'light' | 'weight' | number;
/** 文字大小 */
fontSize?: number | string;
children?: React.ReactNode;
};
export declare const WaterMark: React.FC<WaterMarkProps>;