<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;
}
},
.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);
}
}
import $ from “jQuery”;
window.$ = window.jQuery = $;
if(window.jQuery && window.$) { const somePlugin = import(“pathtoplugin”); }
Или
if(window.jQuery && window.$) { const somePlugin = require(“pathtoplugin”); }
...
mounted: function(){
$('#selector').somePlugin({
// ... настройки плагина
});
}
...