computed: {
selectedData() {
let items = this.selectedItems;
let itemsLength = Object.keys(items).length;
if(itemsLength < 8) {
for(let i = 1; i <= (8 - itemsLength); i++) {
items[-i] = {};
}
}
return items;
}
}
<div v-for="item in selectedData">
<span class="number">{{ item.title }}</span>
</div>
this.selectedItems[itemName] = item
this.$set(this.selectedItems, itemName, item)