|
@@ -126,11 +126,12 @@ export default {
|
|
|
if (newValue) {
|
|
|
const image = new Image();
|
|
|
image.src = this.logo;
|
|
|
- image.width=58
|
|
|
- image.height=58
|
|
|
+ image.width = 58;
|
|
|
+ image.height = 58;
|
|
|
image.onload = () => {
|
|
|
const canvas = qrcanvas({
|
|
|
- cellSize:5,
|
|
|
+ options: { w: 281, h: 281 },
|
|
|
+ cellSize: 5,
|
|
|
data: this.codeUrl,
|
|
|
padding: 8,
|
|
|
logo: {
|
|
@@ -141,10 +142,9 @@ export default {
|
|
|
};
|
|
|
} else {
|
|
|
let firstDoc = document.getElementById("preview").firstChild;
|
|
|
- if(firstDoc){
|
|
|
- document.getElementById("preview").removeChild(firstDoc);
|
|
|
+ if (firstDoc) {
|
|
|
+ document.getElementById("preview").removeChild(firstDoc);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
title(newValue, oldValue) {
|
|
@@ -169,4 +169,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+#preview {
|
|
|
+ canvas {
|
|
|
+ width: 281px!important;
|
|
|
+ height: 281px!important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|