forked from mns/mini-skamja
COMMENT
This commit is contained in:
parent
e18adc368d
commit
d457a9e04d
18
pages/qr.vue
18
pages/qr.vue
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="qr-container">
|
||||
<h1 class="qr-title">QR-код</h1>
|
||||
<h1 class="qr-title">QR-КОД</h1>
|
||||
<canvas ref="qrCanvas" class="qr-code"></canvas>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -12,10 +12,13 @@ export default {
|
|||
name: 'QRPage',
|
||||
data() {
|
||||
return {
|
||||
qrText: 'http://192.168.88.153:8106/',
|
||||
qrText: '', // Текст или ссылка для QR-кода
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// Добавляем "https://", если его нет в URL
|
||||
const currentUrl = window.location.href;
|
||||
this.qrText = currentUrl.startsWith('http') ? currentUrl : `https://${currentUrl}`;
|
||||
this.generateQR();
|
||||
},
|
||||
methods: {
|
||||
|
@ -43,12 +46,11 @@ export default {
|
|||
}
|
||||
|
||||
.qr-title {
|
||||
font-family: 'Arial', sans-serif; /* Шрифт */
|
||||
font-size: 2.5rem; /* Размер текста */
|
||||
color: #333; /* Цвет текста */
|
||||
font-weight: bold; /* Жирный текст */
|
||||
text-transform: uppercase; /* Все буквы заглавные */
|
||||
margin-bottom: 0px; /* Отступ снизу */
|
||||
font-family: 'Arial', sans-serif;
|
||||
font-size: 2rem;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.qr-code {
|
||||
|
|
Loading…
Reference in New Issue