@bagelink/vue 0.0.616 → 0.0.618
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,7 +15,7 @@ type FormatType = 'image/png' | 'image/jpeg' | 'image/svg+xml';
|
|
|
15
15
|
declare function save(format?: FormatType): string | undefined;
|
|
16
16
|
declare function undo(): void;
|
|
17
17
|
declare function addWaterMark(data: WaterMark): void;
|
|
18
|
-
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
18
|
+
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
19
19
|
sigOption?: SignaturePadOptions;
|
|
20
20
|
width?: string;
|
|
21
21
|
height?: string;
|
|
@@ -25,6 +25,9 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
25
25
|
disabled?: boolean;
|
|
26
26
|
defaultUrl?: string;
|
|
27
27
|
format?: FormatType;
|
|
28
|
+
clearable?: boolean;
|
|
29
|
+
}>, {
|
|
30
|
+
clearable: boolean;
|
|
28
31
|
}>, {
|
|
29
32
|
save: typeof save;
|
|
30
33
|
clear: () => void | undefined;
|
|
@@ -32,7 +35,7 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
32
35
|
undo: typeof undo;
|
|
33
36
|
addWaterMark: typeof addWaterMark;
|
|
34
37
|
fromDataURL: (url: string) => Promise<void> | undefined;
|
|
35
|
-
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
38
|
+
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
36
39
|
sigOption?: SignaturePadOptions;
|
|
37
40
|
width?: string;
|
|
38
41
|
height?: string;
|
|
@@ -42,7 +45,12 @@ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimePr
|
|
|
42
45
|
disabled?: boolean;
|
|
43
46
|
defaultUrl?: string;
|
|
44
47
|
format?: FormatType;
|
|
45
|
-
|
|
48
|
+
clearable?: boolean;
|
|
49
|
+
}>, {
|
|
50
|
+
clearable: boolean;
|
|
51
|
+
}>>>, {
|
|
52
|
+
clearable: boolean;
|
|
53
|
+
}, {}>;
|
|
46
54
|
export default _default;
|
|
47
55
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
48
56
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -53,4 +61,12 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
53
61
|
required: true;
|
|
54
62
|
};
|
|
55
63
|
};
|
|
64
|
+
type __VLS_WithDefaults<P, D> = {
|
|
65
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
66
|
+
default: D[K];
|
|
67
|
+
}> : P[K];
|
|
68
|
+
};
|
|
69
|
+
type __VLS_Prettify<T> = {
|
|
70
|
+
[K in keyof T]: T[K];
|
|
71
|
+
} & {};
|
|
56
72
|
//# sourceMappingURL=SignaturePad.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignaturePad.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SignaturePad.vue"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAMnE,UAAU,SAAS;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACb;AAED,KAAK,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"SignaturePad.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SignaturePad.vue"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAMnE,UAAU,SAAS;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACb;AAED,KAAK,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,CAAA;AAwB9D,iBAAS,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,sBAGhC;AAKD,iBAAS,IAAI,SAMZ;AAgBD,iBAAS,YAAY,CAAC,IAAI,EAAE,SAAS,QA0BpC;;gBA6IY,mBAAmB;YACvB,MAAM;aACL,MAAM;YACP,MAAM;oBACE,OAAO;gBACX,SAAS;eACV,OAAO;iBACL,MAAM;aACV,UAAU;gBACP,OAAO;;;;;;;;;uBAzMM,MAAM;;gBAgMnB,mBAAmB;YACvB,MAAM;aACL,MAAM;YACP,MAAM;oBACE,OAAO;gBACX,SAAS;eACV,OAAO;iBACL,MAAM;aACV,UAAU;gBACP,OAAO;;;;eAAP,OAAO;;AAhBpB,wBAkBG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -56255,7 +56255,8 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
56255
56255
|
waterMark: {},
|
|
56256
56256
|
disabled: { type: Boolean },
|
|
56257
56257
|
defaultUrl: {},
|
|
56258
|
-
format: {}
|
|
56258
|
+
format: {},
|
|
56259
|
+
clearable: { type: Boolean, default: true }
|
|
56259
56260
|
},
|
|
56260
56261
|
setup(__props, { expose: __expose }) {
|
|
56261
56262
|
const props2 = __props;
|
|
@@ -56361,7 +56362,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
56361
56362
|
onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
56362
56363
|
}, ["prevent"]))
|
|
56363
56364
|
}, [
|
|
56364
|
-
!_ctx.disabled ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
|
|
56365
|
+
_ctx.clearable && !_ctx.disabled ? (vue.openBlock(), vue.createBlock(vue.unref(Btn), {
|
|
56365
56366
|
key: 0,
|
|
56366
56367
|
flat: "",
|
|
56367
56368
|
thin: "",
|
package/dist/index.mjs
CHANGED
|
@@ -56253,7 +56253,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
56253
56253
|
waterMark: {},
|
|
56254
56254
|
disabled: { type: Boolean },
|
|
56255
56255
|
defaultUrl: {},
|
|
56256
|
-
format: {}
|
|
56256
|
+
format: {},
|
|
56257
|
+
clearable: { type: Boolean, default: true }
|
|
56257
56258
|
},
|
|
56258
56259
|
setup(__props, { expose: __expose }) {
|
|
56259
56260
|
const props2 = __props;
|
|
@@ -56359,7 +56360,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
56359
56360
|
onTouchmove: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
56360
56361
|
}, ["prevent"]))
|
|
56361
56362
|
}, [
|
|
56362
|
-
!_ctx.disabled ? (openBlock(), createBlock(unref(Btn), {
|
|
56363
|
+
_ctx.clearable && !_ctx.disabled ? (openBlock(), createBlock(unref(Btn), {
|
|
56363
56364
|
key: 0,
|
|
56364
56365
|
flat: "",
|
|
56365
56366
|
thin: "",
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ interface WaterMark {
|
|
|
18
18
|
|
|
19
19
|
type FormatType = 'image/png' | 'image/jpeg' | 'image/svg+xml'
|
|
20
20
|
|
|
21
|
-
const props = defineProps<{
|
|
21
|
+
const props = withDefaults(defineProps<{
|
|
22
22
|
sigOption?: SignaturePadOptions
|
|
23
23
|
width?: string
|
|
24
24
|
height?: string
|
|
@@ -28,7 +28,11 @@ const props = defineProps<{
|
|
|
28
28
|
disabled?: boolean
|
|
29
29
|
defaultUrl?: string
|
|
30
30
|
format?: FormatType
|
|
31
|
-
|
|
31
|
+
clearable?: boolean
|
|
32
|
+
}>(),
|
|
33
|
+
{
|
|
34
|
+
clearable: true,
|
|
35
|
+
})
|
|
32
36
|
|
|
33
37
|
const vCanvas = $ref<HTMLCanvasElement>()
|
|
34
38
|
|
|
@@ -128,7 +132,7 @@ defineExpose({
|
|
|
128
132
|
|
|
129
133
|
<template>
|
|
130
134
|
<div class="bgl_input signature-pad relative" @touchmove.prevent :class="{'bg-transparent':disabled}">
|
|
131
|
-
<Btn v-if="!disabled" flat thin icon="refresh" class="position-bottom-end" @click="clear" />
|
|
135
|
+
<Btn v-if="clearable && !disabled" flat thin icon="refresh" class="position-bottom-end" @click="clear" />
|
|
132
136
|
<canvas ref="vCanvas" class="canvas" :disabled />
|
|
133
137
|
</div>
|
|
134
138
|
</template>
|