data_protection
v1.0.2
Published
```ts type ProtectionHTMLElement = HTMLElement | null;
Downloads
3
Readme
数据保护自用
type ProtectionHTMLElement = HTMLElement | null;
type DataProtectionOptions = {
disableDevtool?: boolean;
disableContextMenu?: boolean;
disableSelectBehavior?: boolean;
disableBrowserDefaultSaveBehavior?: boolean;
};
type GenerateWaterMarkOptions = {
content: string[];
className: string | string[];
canvasHeight?: number;
canvasWidth?: number;
fontSize?: number;
fillStyle?: string | CanvasGradient | CanvasPattern;
};
type FillStyle = string | CanvasGradient | CanvasPattern;
type ImageWaterMarkOptions = {
fontSize?: number;
fillStyle?: FillStyle;
waterMarkWidth?: number;
waterMarkHeight?: number;
content: string;
};
export function YuYuanWebDataProtect(options: DataProtectionOptions);
export function generateImgWaterMark(imgSrc: string, options: ImageWaterMarkOptions);
export function generateWaterMark(options: GenerateWaterMarkOptions);