# watermark-js-plus **Repository Path**: manong99898/watermark-js-plus ## Basic Information - **Project Name**: watermark-js-plus - **Description**: watermark for the browser - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 21 - **Created**: 2023-12-11 - **Last Updated**: 2023-12-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

watermark logo

npm package GitHub Workflow Status npm bundle size npm download week GitHub Join the chat at https://gitter.im/china-hy/watermark-js-plus

# Watermark > 这是一个基于 *canvas* 画布的水印库,作用于浏览器中。 - 🛠️ 丰富的功能 - 🔑 完全类型化的API - 📦️ 极致轻量化 同时支持 Vue 2、Vue 3和React。 ## 安装 ```bash # or pnpm or yarn npm install watermark-js-plus ``` ## 用法 ### 普通水印 ```ts import { Watermark } from 'watermark-js-plus' const watermark = new Watermark({ content: 'hello my watermark', width: 200, height: 200, onSuccess: () => { // success callback } }) watermark.create() ``` ### 暗水印 ```ts import { BlindWatermark } from 'watermark-js-plus' const watermark = new BlindWatermark({ content: 'hello my watermark', width: 200, height: 200, onSuccess: () => { // success callback } }) watermark.create() ``` ### 解析暗水印 ```js import { BlindWatermark } from 'watermark-js-plus' BlindWatermark.decode({ url: uploadFile.url, // image url onSuccess: (imageBase64) => { // success callback } }) ``` ## 文档 要了解更多,请查看[文档](https://zhensherlock.github.io/watermark-js-plus) ## 维护者 [@zhensherlock](https://github.com/zhensherlock)。 ## 如何贡献 非常欢迎你的加入![提一个 Issue](https://github.com/zhensherlock/watermark-js-plus/issues/new/choose) 或者提交一个 Pull Request。 标准 Readme 遵循 [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) 行为规范。 ### 贡献者 感谢以下参与项目的人: ## 使用许可 [MIT](LICENSE) © MichaelSun