Skip to content

Commit d973c2b

Browse files
committed
docs: update
1 parent 4e0af88 commit d973c2b

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ const handleAddWaterMark = () => {
113113
<div class="flex flex-col items-center space-y-4">
114114
<div class="bg-gray-100 p-6">
115115
<VueSignaturePad ref="signature" height="400px" width="1280px" :maxWidth="2" :minWidth="2"
116-
:disabled="state.disabled"
117-
:options="{
118-
penColor: state.options.penColor, backgroundColor: state.options.backgroundColor
119-
}" />
116+
:disabled="state.disabled" />
120117
</div>
121118

122119
<button type="button" @click="handleSave('image/jpeg')">Save</button>

website/src/App.vue

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import PropsTable from './components/PropsTable.vue'
1010
1111
const options = ref({
1212
penColor: 'rgb(0,0,0)',
13-
backgroundColor: 'rgb(255, 255, 255)',
1413
maxWidth: 2,
1514
minWidth: 2,
1615
})
@@ -345,9 +344,9 @@ export interface Signature {
345344
}
346345
347346
export interface Props {
348-
options: Options
349-
width: string
350-
height: string
347+
options?: Options
348+
width?: string
349+
height?: string
351350
minWidth?: number
352351
maxWidth?: number
353352
waterMark?: WaterMarkObj
@@ -426,10 +425,6 @@ onMounted(() => {
426425
:max-width="options.maxWidth"
427426
:clear-on-resize="false"
428427
:min-width="options.minWidth"
429-
:options="{
430-
penColor: options.penColor,
431-
backgroundColor: options.backgroundColor,
432-
}"
433428
/>
434429
</div>
435430

@@ -441,10 +436,6 @@ onMounted(() => {
441436
:max-width="options.maxWidth"
442437
:clear-on-resize="false"
443438
:min-width="options.minWidth"
444-
:options="{
445-
penColor: options.penColor,
446-
backgroundColor: options.backgroundColor,
447-
}"
448439
/>
449440
</div>
450441

@@ -456,10 +447,6 @@ onMounted(() => {
456447
:max-width="options.maxWidth"
457448
:clear-on-resize="false"
458449
:min-width="options.minWidth"
459-
:options="{
460-
penColor: options.penColor,
461-
backgroundColor: options.backgroundColor,
462-
}"
463450
/>
464451
</div>
465452

@@ -771,10 +758,9 @@ import { VueSignaturePad } from '@selemondev/vue3-signature-pad'
771758
import type { CanvasSignature } from '@selemondev/vue3-signature-pad'
772759
773760
const options = ref({
774-
penColor: 'rgb(0,0,0)',
775-
backgroundColor: 'rgb(255, 255, 255)',
776-
maxWidth: 2,
777-
minWidth: 2,
761+
penColor: 'rgb(255,0,0)',
762+
maxWidth: 4,
763+
minWidth: 4,
778764
})
779765
780766
const colors = [
@@ -815,8 +801,7 @@ function handleSaveSignature() {
815801
:max-width='options.maxWidth'
816802
:min-width='options.minWidth'
817803
:options='{
818-
penColor: options.penColor,
819-
backgroundColor: options.backgroundColor,
804+
penColor: options.penColor
820805
}'
821806
/>
822807
@@ -1007,8 +992,7 @@ function handleSaveSignature() {
1007992
:clear-on-resize="false"
1008993
:min-width="options.minWidth"
1009994
:options="{
1010-
penColor: options.penColor,
1011-
backgroundColor: options.backgroundColor,
995+
penColor: options.penColor
1012996
}"
1013997
/>
1014998
</div>
@@ -1023,7 +1007,6 @@ function handleSaveSignature() {
10231007
:min-width="options.minWidth"
10241008
:options="{
10251009
penColor: options.penColor,
1026-
backgroundColor: options.backgroundColor,
10271010
}"
10281011
/>
10291012
</div>
@@ -1037,8 +1020,7 @@ function handleSaveSignature() {
10371020
:clear-on-resize="false"
10381021
:min-width="options.minWidth"
10391022
:options="{
1040-
penColor: options.penColor,
1041-
backgroundColor: options.backgroundColor,
1023+
penColor: options.penColor
10421024
}"
10431025
/>
10441026
</div>

0 commit comments

Comments
 (0)