Skip to content

Signature ​

VSignature uses normalized stroke data as its cross-target controlled value. H5 uses pointer canvas input; mini-program uses native canvas touch events.

Demo ​

Draw in the canvas with a pointer or touch.

Props ​

PropTypeDefaultDescription
valueSignatureStroke[][]Controlled signature
disabledbooleanfalseDisable drawing and clear
heightnumber200Canvas height
lineColorstring'#172033'Stroke color
lineWidthnumber2Stroke width
backgroundstring'#ffffff'Canvas background
showClearbooleantrueShow the clear action
clearTextstring'清除签名'Clear action label
ariaLabelstring'Signature pad'Canvas accessible name

Events ​

EventPayloadDescription
update:valueSignatureStroke[]Commit strokes
changeSignatureStroke[]Signature changed
startvoidStroke started
endSignatureStrokeStroke completed
clearvoidAll strokes cleared