1.0.2 • Published 3 years ago
watermark-observer v1.0.2
watermark-observer
Watermark effect with dom observer
Installation
npm install watermark-observer
# or use yarn
yarn add watermark-observer
Usage
import watermarkObserver, { watermarkObserverStandalone, createFixedWatermarkContainerDOM } from 'watermark-observer'
// 独立注入水印,检测到修改将会重新创建
watermarkObserverStandalone(createFixedWatermarkContainerDOM('water-mark-standlone'), require('./image.png').default)
// 注入水印至已有内容容器中,检测到修改将会重新设置样式
watermarkObserver(window.container, '/watermark')
Contributing
- Fork it!
- Create your new branch:
git checkout -b feature-new
orgit checkout -b fix-which-bug
- Start your magic work now
- Make sure npm test passes
- Commit your changes:
git commit -am 'feat: some description (close #123)'
orgit commit -am 'fix: some description (fix #123)'
- Push to the branch:
git push
- Submit a pull request :)
Authors
This library is written and maintained by 余聪, yucong06@meituan.com.
License
MIT - 余聪 🐟