Electronic signature
A electronic signature component by Vue.js
w,h need units,like 100px or 100%
| name | type | default | description | |:-------------:|:-------------:|:-------------------------:| :-----------------: | | sigOption |
Object| {penColor:"rgb(0, 0, 0)", backgroundColor:"rgb(255,255,255)"} | penColor, backgroundColor | | w |
String| "100%" |parent container width | | h |
String| "100%" |parent container height | | clearOnResize |
Boolean| false |Canvas is cleared on window resize| | waterMark |
Object| {} |check Usage addWaterMark | | disabled |
Boolean| false |disabled | | defaultUrl |
String| "" |you want show image by default |
| name | params | description | | :-------------: |:-------------: |:-------------:| | save | ()/("image/jpeg")/("image/svg+xml") | save image as PNG/JPEG/SVG | | clear | | clear canvas | | isEmpty | | Returns true if canvas is empty, otherwise returns false | | undo | | remove the last dot or line | | addWaterMark | {} // check Usage addWaterMark | addWaterMark | fromDataURL | (url) | Draws signature image from data URL.
npm install vue-signature
A.vue
Released under the MIT License.