1.0.6 • Published 4 years ago

@wstreet7/watermark v1.0.6

Weekly downloads
10
License
ISC
Repository
github
Last release
4 years ago

WaterMark

一个无法删除的水印组件

Installation

# use npm
npm install @wstreet7/watermark --save

# or use yarn
yarn add @wstreet7/watermark

# or script
<script src="https://unpkg.com/@wstreet7/watermark@latest/lib/watermark.min.js"></script>

Usage

Simple Example

import WaterMark from '@wstreet7/watermark';

const config = {
    text: '@wstreet7',
    height: 60,
    width: 100
}
const waterMark = new WaterMark(config)

Config

字段描述默认值
idcontainer的idwater-mark
height每个repeat单元的height100
width每个repeat单元的width150
font字体相关,font-size和font-family必须包含10px sans-serif   其他配置
rotate文本倾斜角度-30(canvas 正旋转为顺时针)https://www.yuque.com/streetex/fbqzli/fdz7ic#ui7xH
fillStyle文本颜色#ccc
opacity透明度1.0
zIndexz-index9999
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago