質問編集履歴
1
runnynose への回答
test
CHANGED
File without changes
|
test
CHANGED
@@ -63,3 +63,43 @@
|
|
63
63
|
|
64
64
|
|
65
65
|
何かいい方法があれば教えていただけると幸いです。
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
### 追記
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
```JS
|
74
|
+
|
75
|
+
import scan from "@/library/scan.js";
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
export default {
|
80
|
+
|
81
|
+
data: () => ({
|
82
|
+
|
83
|
+
result: "",
|
84
|
+
|
85
|
+
}),
|
86
|
+
|
87
|
+
created() {
|
88
|
+
|
89
|
+
scan.setReadCallback("resultCallback");
|
90
|
+
|
91
|
+
},
|
92
|
+
|
93
|
+
methods: {
|
94
|
+
|
95
|
+
resultCallback(result) {
|
96
|
+
|
97
|
+
this.result = result;
|
98
|
+
|
99
|
+
},
|
100
|
+
|
101
|
+
},
|
102
|
+
|
103
|
+
};
|
104
|
+
|
105
|
+
```
|