UNPKG

@ccs-design/rc-pro

Version:

ccs design basic react component

66 lines (65 loc) 1.9 kB
import React from 'react'; export declare type WaterMarkProps = { /** 水印文字内容 */ content?: string; /** 类名 */ 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; /** * @description 文字颜色 * @default rgba(0,0,0,.15) */ fontColor?: string; /** * @description 文字样式 * @default normal */ fontStyle?: 'none' | 'normal' | 'italic' | 'oblique'; /** * @description 文字族 * @default sans-serif */ fontFamily?: string; /** * @description 文字粗细 * @default normal */ fontWeight?: 'normal' | 'light' | 'weight' | number; /** * @description 文字大小 * @default 16 */ fontSize?: number | string; }; /** * 水印组件 * @param WaterMarkProps * @returns */ declare const CcsWaterMark: React.FC<WaterMarkProps>; export default CcsWaterMark;