1.1.3 • Published 6 years ago

vue-sign-canvas v1.1.3

Weekly downloads
57
License
-
Repository
-
Last release
6 years ago

vue-signature

Vue signature component

this component is based on Fabric, a great lib to deal with canvas

How to install

  • npm install vue-sign-canvas

How to use

import VueSignCanvas from 'vue-sign-canvas'
require('vue-sign-canvas/dist/vue-sign-canvas.min.css')
Vue.component('VueSignCanvas', VueSignCanvas)

const options = {
  width: 500,
  height: 500,
  brushColor: '#000',
  brushWidth: 10,
  shadowEnable: false,
  shadowWidth: 10,
  canvasBackgroundColor: '#fff',
  brushType: 'ink'
}

function saveResult (data) {

}
function clear () {

}
<div>
  <VueSignCanvas :options="options" @result="saveResult" @clear="clear" />
<div>

options

nametypedefaultValuedescription
brushColorstring'#000'set brush color
brushWidthnumber10set brush width
brushTypestringdefault('ink','crayon','marker')change brush type
widthnumberdocument.documentElement.clientWidthset canvas width
heightnumberdocument.documentElement.clientHeightset canvas height
shadowEnablebooleanfalseset brush shadow enable or not
shadowWidthnumber10set shadow width
shadowColorstringnullset shadow color
1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago