微信小程序手写画板
界面布局
<
view
class
=
'content'
>
<
canvas
class
=
'firstCanvas'
canvas-id
=
"firstCanvas"
bindtouchmove
=
'move'
bindtouchstart
=
'start'
bindtouchend
=
'end'
bindtouchcancel
=
'cancel'
bindlongtap
=
'tap'
disable-scroll
=
'true'
binderror
=
'error'
>
</
canvas
>
<
button
bindtap
=
'clearClick'
>
清除
</
button
>
<
button
bindtap
=
'saveClick'
>
保存图片
</
button
>
<
image
id
=
'signatureImg'
src
=
'{
{signImage}}'
></
image
>
</
view
>
界面样式
.content
{
width:
100%
;
height:
500px
;
background-color:
red
;
}
.firstCanvas
{
background-color:
blue
;
width:
100%
;