<template>
<div class="divRadio">
<div class="divus" style="margin-top: 0px;">
<input type="checkbox" id="name1" class="checkus" @change="schetRadio" />
<label for="name1" class="labelus">Василенко Пётр Владимирович</label>
</div>
<div class="divus">
<input type="checkbox" id="name2" class="checkus" @change="schetRadio" />
<label for="name2" class="labelus">Ерёменко Владислав Игоревич</label>
</div>
<div class="divus">
<input type="checkbox" id="name3" class="checkus" @change="schetRadio" />
<label for="name3" class="labelus">Антонова Елена Сергеевна</label>
</div>
</div>
</template>
export default {
data() {
return {
schetchik: 0,
};
},
methods: {
schetRadio() {
this.schetchik = Array.from(document.querySelectorAll('.checkus'))
.filter((checkbox) => checkbox.checked)
.length;
this.$emit('schetchik', this.schetchik);
},
},
};
const countryModalBtn = document.querySelector(".country-js");
const countryModal = document.getElementById("countryModal");
let timeoutId;
function openDropdown() {
clearTimeout(timeoutId);
countryModal.classList.add("country-modal--active");
}
function closeDropdown() {
timeoutId = setTimeout(function() {
countryModal.classList.remove("country-modal--active");
}, 200);
}
countryModalBtn.addEventListener("mouseover", openDropdown);
countryModalBtn.addEventListener("mouseout", closeDropdown);
countryModal.addEventListener("mouseout", closeDropdown);
import svgImg from "../../assets/react.svg";
export default function AnimalItem({ color, name, speed }: Animal) {
const props = { color, name, speed };
return (
<div>
<div>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
role="img"
className="iconify iconify--logos"
width="35.93"
height="32"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 256 228"
style={{ fill: props.color }} // Применение цвета к свойству fill
import moment from 'moment';
npm run dev
и проверьте, не появилась ли ошибка "moment is not defined" при использовании npm install @nuxtjs/axios
// nuxt.config.js
export default {
modules: [
'@nuxtjs/axios',
],
axios: {
// Настройки Axios
// Здесь вы можете указать базовый URL и другие параметры
},
}
await this.$axios.post('http://localhost:3333/auth/refresh', null, {
withCredentials: true,
})
const popup = document.querySelector('.popup');
const pseudoElement = popup.querySelector('::before');
popup.addEventListener('scroll', function() {
if (popup.scrollHeight - popup.scrollTop === popup.clientHeight) {
pseudoElement.style.display = 'none';
} else {
pseudoElement.style.display = 'block';
}
});
jQuery(document).ready(function($) {
document.addEventListener('wpcf7mailsent', function(event) {
var id = event.detail.contactFormId;
var popupId = 'pamyatka-popap-<?php echo get_row_index(); ?>';
// Проверяем, находимся ли мы внутри попапа с определенным ID
if ($(event.target).closest('#' + popupId).length) {
if (id == 19124) {
window.open("<?php echo esc_url($m_dobavit_knopku['url']); ?>", '_blank');
}
}
}, false);
});
// Получаем выбранное торговое предложение
const selectedOffer = this.offers[this.offerNum];
// Получаем свойства выбранного торгового предложения
const selectedOfferProps = selectedOffer['PROPERTIES'];
// Перебираем свойства и выводим их название и значение
for (const propName in selectedOfferProps) {
if (selectedOfferProps.hasOwnProperty(propName)) {
const propValue = selectedOfferProps[propName].VALUE;
console.log(`Название свойства: ${propName}, Значение: ${propValue}`);
}
}
const selectboxss = document.querySelector('.selectboxss');
const liElements = document.querySelectorAll('.selectboxssmenu li');
liElements.forEach(li => {
li.addEventListener('click', () => {
const additionalClass = li.classList[1];
selectboxss.classList.remove(...selectboxss.classList);
selectboxss.classList.add(additionalClass);
});
});
<div class="box">
<div class="head">
<h2 class="title">Select documents to download</h2>
<span class="arrow">
<svg xmlns="http://www.w3.org/2000/svg" width="27.269" height="15.756" viewBox="0 0 27.269 15.756">
<path d="M925.974,98.658l-13.2-13.2a1.5,1.5,0,1,1,2.121-2.121l11.074,11.074,11.074-11.074a1.5,1.5,0,0,1,2.121,2.121Z" transform="translate(-912.339 -82.902)" fill="#dc5d37" />
</svg>
</span>
</div>
<div class="body">
<ul class="download-list">
<?php
// Check rows exists.
if (have_rows('download_docs')) :
$cnt = 0;
// Loop through rows.
while (have_rows('download_docs')) : the_row(); ?>
<?php
$cnt++;
$file = get_sub_field('doc');
$filedir = get_attached_file($file['id']);
$filename = get_the_title($file['id']);
if ($file) : ?>
<li class="item">
<?php
//$newStr = end(explode('/', $file['url']));
?>
<input value="<?php echo $filedir; ?>" type="checkbox" class="checkdownload" id="ch<?php echo $cnt; ?>">
<label for="ch<?php echo $cnt; ?>"><?php echo $filename; ?></label>
</li>
<!-- <a class="cheker" href="--><?php //echo $file['url'];
?>
<!--">--><?php //echo $file['filename'];
?>
<!--</a>-->
<?php endif; ?>
<?php
endwhile;
// No value.
else :
// Do something...
endif; ?>
</ul>
<div class="btn-wrap">
<button onclick="getCheckedCheckBoxes()" href="#download" class="btn btn-right popup-modal">Download</button>
</div>
</div>
</div>
function getCheckedCheckBoxes() {
var checkboxes = document.getElementsByClassName('checkdownload');
var checkboxesChecked = [];
for (var index = 0; index < checkboxes.length; index++) {
if (checkboxes[index].checked) {
checkboxesChecked.push(checkboxes[index].value); //
var sendUrls = (checkboxes[index].value); //
//console.log(sendUrls);
}
}
return checkboxesChecked;
}
<button id="btn">
Start
</button>
<div id="wrapper"></div>
<br />
<canvas id="canvas" style="background:black;width:512px;height:255px;"></canvas>
document.getElementById("btn").addEventListener("click", function() {
var canvas = document.getElementById('canvas');
var canvasCtx = canvas.getContext("2d");
var audioContext = new (window.AudioContext || window.webkitAudioContext)();
var player = document.getElementById('audio_player');
var analyser = audioContext.createAnalyser();
var data = new Uint8Array(analyser.frequencyBinCount);
function render() {
analyser.getByteFrequencyData(data);
canvasCtx.clearRect(0, 0, canvas.width, canvas.height);
for (var i = 0, l = data.length; i < l; i++) {
canvasCtx.fillStyle = "#ffffff";
canvasCtx.fillRect(i, -(canvas.height/255) * data[i], 1, canvas.height);
}
requestAnimationFrame(render);
}
requestAnimationFrame(render);
var audio = new Audio();
audio.loop = true;
audio.autoplay = false;
audio.crossOrigin = "anonymous";
audio.addEventListener('error', function(e) {
console.log(e);
});
audio.src = "https://greggman.github.io/doodles/sounds/DOCTOR VOX - Level Up.mp3";
//audio.play();
audio.controls = true;
document.getElementById("wrapper").append(audio);
audio.addEventListener('canplay', function() {
var audioSourceNode = audioContext.createMediaElementSource(audio);
audioSourceNode.connect(analyser);
analyser.connect(audioContext.destination);
});
});