<div v-bind:class="classObject"></div>
data: {
isActive: true,
error: null
},
computed: {
classObject: function () {
return {
active: this.isActive && !this.error,
'text-danger': this.error && this.error.type === 'fatal'
}
}
}
<div class="booking__step" v-if="showStep">
data: {
customVoucherCount: '$',
showStep: false;
},
watch: {
// эта функция запускается при любом изменении id="value-custom__voucher"
customVoucherCount: function (newCount, oldCount) {
this.showStep = newCount.lenght > 2 ? true : false;
}
},
function generateArrayOfYears(year) {
var max = new Date().getFullYear()
var years = []
for (var i = year; i <= max; i++) {
years.push(i)
}
return years
}
console.log(generateArrayOfYears(2015)) // -> [2015, 2016, 2017, 2018, 2019, 2020, 2021]
submitHandler: function(form) { // <- pass 'form' argument in
$(".submit").attr("disabled", true);
form.submit(); // <- use 'form' argument here.
}
export default function detectAdBlock(){
return new Promise((resolve) => {
const adElement = document.createElement("div");
adElement.classList.add('adsbygoogle');
adElement.style.cssText = 'height: 1px; width: 1px; background-color: transparent';
document.body.appendChild(adElement);
const adElementStyle = getComputedStyle(adElement, null);
window.setTimeout(()=>{
if(adElementStyle.display === 'none'){
resolve(true)
}else{
resolve(false)
}
document.body.removeChild(adElement);
}, 20)
})
}
ReferenceError: wach is not defined
exports.default = wach; <- ошибка
exports.default = watch; <- не ошибка
.table-td {
border: solid 1px silver;
padding: 5px;
margin: 5px;
animation: 1s ease-out 0s 1 slideInFromLeft;
}
@keyframes slideInFromLeft {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(0);
}
}
const a = document.URL //=> https://qna.habr.com/q/980157
a.slice(0, a.lastIndexOf("/")) //=> https://qna.habr.com/q