qrcode.vue 3.3.4 → 3.4.1
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.
- package/CHANGELOG.md +12 -0
- package/README-zh_cn.md +16 -0
- package/README.md +16 -0
- package/dist/index.d.ts +81 -80
- package/dist/qrcode.vue.browser.js +1047 -1420
- package/dist/qrcode.vue.browser.min.js +2 -2
- package/dist/qrcode.vue.cjs.js +1047 -1420
- package/dist/qrcode.vue.esm.js +1047 -1420
- package/dist/qrcodegen.d.ts +95 -0
- package/package.json +15 -19
package/CHANGELOG.md
CHANGED
package/README-zh_cn.md
CHANGED
|
@@ -67,6 +67,22 @@ createApp({
|
|
|
67
67
|
</script>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
在 Vue 3 中配合 `TypeScript` 使用:
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<template>
|
|
74
|
+
<qrcode-vue :value="value" :level="level" :render-as="renderAs" />
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<script setup lang="ts">
|
|
78
|
+
import { ref } from 'vue'
|
|
79
|
+
import QrcodeVue, { Level, RenderAs } from 'qrcode.vue'
|
|
80
|
+
|
|
81
|
+
const value = ref<String>('qrcode')
|
|
82
|
+
const level = ref<Level>('M')
|
|
83
|
+
const renderAs = ref<RenderAs>('svg')
|
|
84
|
+
</script>
|
|
85
|
+
|
|
70
86
|
## Component props
|
|
71
87
|
|
|
72
88
|
### `value`
|
package/README.md
CHANGED
|
@@ -69,6 +69,22 @@ Or single-file components with a `*.vue` extension:
|
|
|
69
69
|
</script>
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
When you use the component with Vue 3 with `TypeScript`:
|
|
73
|
+
|
|
74
|
+
```html
|
|
75
|
+
<template>
|
|
76
|
+
<qrcode-vue :value="value" :level="level" :render-as="renderAs" />
|
|
77
|
+
</template>
|
|
78
|
+
<script setup lang="ts">
|
|
79
|
+
import { ref } from 'vue'
|
|
80
|
+
import QrcodeVue, { Level, RenderAs } from 'qrcode.vue'
|
|
81
|
+
|
|
82
|
+
const value = ref('qrcode')
|
|
83
|
+
const level = ref<Level>('M')
|
|
84
|
+
const renderAs = ref<RenderAs>('svg')
|
|
85
|
+
</script>
|
|
86
|
+
```
|
|
87
|
+
|
|
72
88
|
## Component props
|
|
73
89
|
|
|
74
90
|
### `value`
|
package/dist/index.d.ts
CHANGED
|
@@ -1,80 +1,81 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
type Level = 'L' | 'M' | 'Q' | 'H';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
export type Level = 'L' | 'M' | 'Q' | 'H';
|
|
3
|
+
export type RenderAs = 'canvas' | 'svg';
|
|
4
|
+
declare const QrcodeVue: import("vue").DefineComponent<{
|
|
5
|
+
renderAs: {
|
|
6
|
+
type: PropType<RenderAs>;
|
|
7
|
+
required: boolean;
|
|
8
|
+
default: string;
|
|
9
|
+
validator: (as: any) => boolean;
|
|
10
|
+
};
|
|
11
|
+
value: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: boolean;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
level: {
|
|
21
|
+
type: PropType<Level>;
|
|
22
|
+
default: string;
|
|
23
|
+
validator: (l: any) => boolean;
|
|
24
|
+
};
|
|
25
|
+
background: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
foreground: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
margin: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
required: boolean;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
renderAs: {
|
|
40
|
+
type: PropType<RenderAs>;
|
|
41
|
+
required: boolean;
|
|
42
|
+
default: string;
|
|
43
|
+
validator: (as: any) => boolean;
|
|
44
|
+
};
|
|
45
|
+
value: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: boolean;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
size: {
|
|
51
|
+
type: NumberConstructor;
|
|
52
|
+
default: number;
|
|
53
|
+
};
|
|
54
|
+
level: {
|
|
55
|
+
type: PropType<Level>;
|
|
56
|
+
default: string;
|
|
57
|
+
validator: (l: any) => boolean;
|
|
58
|
+
};
|
|
59
|
+
background: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
foreground: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
margin: {
|
|
68
|
+
type: NumberConstructor;
|
|
69
|
+
required: boolean;
|
|
70
|
+
default: number;
|
|
71
|
+
};
|
|
72
|
+
}>>, {
|
|
73
|
+
value: string;
|
|
74
|
+
size: number;
|
|
75
|
+
level: Level;
|
|
76
|
+
background: string;
|
|
77
|
+
foreground: string;
|
|
78
|
+
margin: number;
|
|
79
|
+
renderAs: RenderAs;
|
|
80
|
+
}, {}>;
|
|
81
|
+
export default QrcodeVue;
|