mns
/
urna
forked from mns/mini-skamja
4
0
Fork 0
This commit is contained in:
Andrey 2025-03-17 15:16:42 +03:00
parent e18adc368d
commit d457a9e04d
1 changed files with 10 additions and 8 deletions

View File

@ -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 {