@serializedowen/vue-img-watermark
add watermark for your image with only a single directive
4,583
19
| Install | |
|---|---|
npm install @serializedowen/vue-img-watermark |
|
| Latest Version: | 1.1.0 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Feb 2, 2021 |
| Links: | GitHub · npm |
Maintainer: serializedowen
vue-img-watermark :maple_leaf:
Demo
http://serializedowen.github.io/vue-img-watermark/
Installation
npm install --save @serializedowen/vue-img-watermark
yarn add @serializedowen/vue-img-watermark
Usage
import plugin from '@serializedowen/vue-img-watermark'
Vue.use(plugin)
- put
v-watermarkon your<img>tag to generate watermark for your image - fully customizable with configuration object.
- use
setScopedConfig()inbeforeCreatehook in your vue component to scope configuration to that particular vue component - use
v-watermark={{config: OptionConfig}}to customize watermark behavior - The order of precedance will be directive value > component scoped options > global options
- use
- register your custom rendering strategy with
registerCustomStrategy()which you can later on use with{mode: name of your strategy}:grinning:
Known Issues:
- currently
canvas.drawImage()has to be wrapped in asetTimeout()call to work, reason to be identified.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.1.0 | ^2.6.11 | MIT | |
| 1.0.0 | ^2.6.11 | MIT | |
| 0.4.0 | ^2.6.11 | MIT | |
| 0.3.0 | ^2.6.11 | MIT | |
| 0.2.0 | ^2.6.11 | MIT | |
| 0.1.0 | ^2.6.11 | MIT | |
| 0.0.1 | ^2.6.11 | MIT |