<span v-if="ruleForm.isValid === false">
Текст ошибки
</span>
ruleForm: {
cars: [],
isValid: null,
carModels: {
toyota: true,
ferrari: false,
suzuki: false,
bmw: true
}
}
validateCars(formName) {
if (this.ruleForm.cars.length === 0) {
this.ruleForm.isValid = false;
} else {
this.ruleForm.isValid = true;
console.log('success');
}
}
div1 = document.createElement('div')
div1.classList.add("block");
div1.style.background = randColor();
div1.addEventListener('click', function(event) {
document.querySelector('.block').addEventListener('click', function(event) {
document.querySelector('body').addEventListener('click', '.block', function(event) {
document.addEventListener('click', function(event) {
if (event.target.closest('.block')) {
// ...
}
}
image: require('../images/logo.jpg')
image: import('../images/logo.jpg')
Number('asd') + 20
document.querySelectorAll('.other-price').forEach(n => {
n.textContent = parseInt(n.textContent.split(' ').join('')) +
parseInt(document.querySelector('.current-price').textContent.split(' ').join(''));
});
res.sendDate
на
res.json