# @anycms/watermarker

> ## 安装 npm install @anycms/watermark --save 或 yarn add @anycms/watermark

Latest version **16.0.1** (published 2023-10-01) · 0 weekly downloads

## Install

```sh
npm install @anycms/watermarker
pnpm add @anycms/watermarker
yarn add @anycms/watermarker
bun add @anycms/watermarker
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 16.0.1 |
| Published | 2023-10-01 |
| First published | 2023-10-01 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 49.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | wuliangdi |

## Links

- npm: https://www.npmjs.com/package/@anycms/watermarker
- npm.io page: https://npm.io/package/@anycms/watermarker

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Recent versions

- 16.0.1 (latest) — 2023-10-01
- 16.0.0 — 2023-10-01
- 13.0.0 — 2023-10-01

## README

# Angular 版本水印指令

## 安装
npm install @anycms/watermark --save  或 yarn add @anycms/watermark

## 使用

```javascript
// 业务模块
import { WaterMarkerModule } from '@anycms/watermark';


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    WaterMarkerModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

//业务html，水印宽高是根据元素的宽高定的，请通过css设置元素的宽高
<div class="div" cmsWaterMarker [options]="options" [zIndex]="8"></div>

//业务组件
import { Component } from '@angular/core';
import { WaterMarkerOptionModel } from '@anycms/watermark';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent {
  options: WaterMarkerOptionModel = {
    watermarkLabel: '这是一个水印'
  };
}


```

## 参数
1. options:WaterMarkerOptionModel; 具体参数如下：<br>
// 水印文本<br>
watermarkLabel?: string;<br>
// 水印起始位置x轴坐标<br>
watermarkX?: number;<br>
// 水印起始位置Y轴坐标<br>
watermarkY?: number;<br>
// 水印x轴间隔<br>
watermarkXSpace?: number;<br>
// 水印y轴间隔<br>
watermarkYSpace?: number;<br>
// 水印字体颜色<br>
watermarkColor?: string;<br>
// 水印字体大小<br>
watermarkFontSize?: string;<br>
// 水印透明度，要求设置在大于等于0.003<br>
watermarkAlpha?: number;<br>
// 水印宽度<br>
watermarkWidth?: number;<br>
// 水印高度<br>
watermarkHeight?: number;<br>
// 水印倾斜度数<br>
watermarkAngle?: number;<br>
// 是否显示<br>
showWaterMark?: boolean;<br>
// 分割符号<br>
splitChar?: string;<br>



2. zIndex:number; 层级，默认值为999<br>

---
_Source: https://npm.io/package/@anycms/watermarker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
