@@ -33,10 +33,10 @@ const props = withDefaults(defineProps<Props>(), {
3333})
3434
3535const emits = defineEmits <{
36- (e : ' beginStroke' , val : string ): void
37- (e : ' endStroke' , val : string ): void
38- (e : ' beforeUpdateStroke' , val : string ): void
39- (e : ' afterUpdateStroke' , val : string ): void
36+ (e : ' beginStroke' , val : Signature ): void
37+ (e : ' endStroke' , val : Signature ): void
38+ (e : ' beforeUpdateStroke' , val : Signature ): void
39+ (e : ' afterUpdateStroke' , val : Signature ): void
4040}>()
4141
4242const canvasOptions = ref <CanvasOptions >({
@@ -144,7 +144,7 @@ function handleBeginStroke() {
144144 return canvasOptions .value .signaturePad .addEventListener (
145145 ' beginStroke' ,
146146 () => {
147- emits (' beginStroke' , ' Signature started ' )
147+ emits (' beginStroke' , canvasOptions . value . signaturePad )
148148 },
149149 )
150150}
@@ -153,7 +153,7 @@ function handleEndStroke() {
153153 return canvasOptions .value .signaturePad .addEventListener (
154154 ' endStroke' ,
155155 () => {
156- emits (' endStroke' , ' Signature ended ' )
156+ emits (' endStroke' , canvasOptions . value . signaturePad )
157157 },
158158 )
159159}
@@ -162,7 +162,7 @@ function handleBeforeUpdateStroke() {
162162 return canvasOptions .value .signaturePad .addEventListener (
163163 ' beforeUpdateStroke' ,
164164 () => {
165- emits (' beforeUpdateStroke' , ' Signature before update ' )
165+ emits (' beforeUpdateStroke' , canvasOptions . value . signaturePad )
166166 },
167167 )
168168}
@@ -171,7 +171,7 @@ function handleAfterUpdateStroke() {
171171 return canvasOptions .value .signaturePad .addEventListener (
172172 ' afterUpdateStroke' ,
173173 () => {
174- emits (' afterUpdateStroke' , ' Signature after update ' )
174+ emits (' afterUpdateStroke' , canvasOptions . value . signaturePad )
175175 },
176176 )
177177}
0 commit comments