-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
47 lines (43 loc) · 1.18 KB
/
index.html
1
2
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">
<title>Gerador de QRCode</title>
</head>
<body>
<div id="app">
<h1> {{ title }} </h1>
<div>
<input type="text" size="25" placeholder="Digite para gerar..." v-model="text" >
</div>
<div v-if="text" class="output">
<img :src="newQRCode" alt="QRCode">
</div>
</div>
</body>
<script src="js/vue.min.js"></script>
<script src="js/qrious.min.js"></script>
<script>
new Vue({
el: "#app",
data: {
title: "Gerador QRCode",
text: "https://www.cod3r.com.br",
qrcode: new QRious({ size: 300 })
},
computed: {
newQRCode() {
this.qrcode.value = this.text
return this.qrcode.toDataURL()
}
},
/*
methods: {
onData( event ) {
this.text = event.target.value
}
}*/
})
</script>
</html>