data() {
return {
show: null,
...@click="show = watch". Закрытие: @click="show = null". В шаблоне попапа исправляете watch на show: :src="`img/catalog/${show.model}/group.jpg`".
правильно ли я все понял?
.button:hover {
animation: hover 2s linear;
}
@keyframes hover {
0%, 50% {
opacity: 0.5;
},
100% {
opactity: 1;
}
}
data: () => ({
componentNames: [ 'comp1', 'comp2', 'comp3', 'comp4' ],
...
}),
computed: {
componentName() {
return [ 1, 2 ].includes(this.Q) && this.componentNames[this.B - 1];
},
},<component :is="componentName"></component>data: () => ({
components: [
{ name: '...', props: { ... } },
{ name: '...', props: { ... } },
...
],
...
}),<component
v-if="component"
:is="component.name"
v-bind="component.props"
></component>
mainArray.filter(n => n !== example).const compareArrays = (a, b) =>
a.length === b.length && a.every((n, i) => Object.is(n, b[i]));mainArray.filter(n => !compareArrays(n, example)).
this.currentImg = Math.min(+this.currentImg + 1, this.maxImages - 1);
$('#results').on('change', 'tr', function(e) {
console.log(e, $(this).data('xxx'));
});
function displayLine(data) {
$('#results').append($(`
<tr>
<th scope="row">${importLines.length}</th>
<td><input class="checkbox" type="checkbox"></td>
<td>${data[0]}</td>
<td>${data[2]}</td>
<td>${data[11]}</td>
<td id="status-${data[0]}"><b><span style="color: orange">PENDING</span></b></td>
</tr>
`).data('xxx', data));
}
onClickOutside(e) {
if (!this.$el.contains(e.target)) {
// закрываем дропдаун
}
},created() {
const { onClickOutside } = this;
document.addEventListener('click', onClickOutside);
this.$on('hook:beforeDestroy', () => document.removeEventListener('click', onClickOutside));
},
if(currentSlide == 2){this.el.style.backgroundImage = ...photos: {
Проблема явно в строке<li v-for="array in filterBy(arrays, input)">
Я взял вот этот листинг:
https://next.vuetifyjs.com/ru/components/lists
В консоли ошибка :
[Vue warn]: Unknown custom element
нужно пройтись в сторе по массиву найти у какого объекта stepConditions.active === true ему поставить false, а следующему объекту в stepConditions.active выставить true
case OPEN_NEXT_EXPRESS_FORM_STEP:
const active = 1 + state.findIndex(n => n.stepConditions.active);
return active ? state.map((n, i) => ({
...n,
stepConditions: {
...n.stepConditions,
active: i === active,
},
})) : state;case OPEN_NEXT_EXPRESS_FORM_STEP:
return state.map((n, i, arr) => ({
...n,
stepConditions: {
...n.stepConditions,
active: !!(i && arr[i - 1].stepConditions.active),
},
}));
arr.propertyIsEnumerable(length) // => true
$(document).on('click', '.sandwitch', function () {
if ($(window).width() < 520) {
$(this).toggleClass('sandwitch--active');
$('.main-menu-list').slideToggle();
}
});