Vue.js
1
Вклад в тег
<script>
let inputs = document.querySelectorAll('.input__file1');
Array.prototype.forEach.call(inputs, function (input) {
input.addEventListener('change', function() {
let label = this.nextElementSibling;
label.children[0].src="img/activecart1.png";
})
})
let inpts = document.querySelectorAll('.input__file2');
Array.prototype.forEach.call(inpts, function (input) {
input.addEventListener('change', function() {
let label = this.nextElementSibling;
label.children[0].src="img/activecart2.png";
})
})
</script>