Так, что ли:
data: () => ({
items: [...Array(5).keys()],
}),
methods: {
move(index, step) {
const items = [...this.items];
const newIndex = Math.min(items.length - 1, Math.max(0, index + step));
[ items[index], items[newIndex] ] = [ items[newIndex], items[index] ];
this.items = items;
},
// или
move(index, step) {
const { items } = this;
const newIndex = Math.min(items.length - 1, Math.max(0, index + step));
items.splice(index, 1, items.splice(newIndex, 1, items[index])[0]);
},
// или
move(index, step) {
const newIndex = Math.min(this.items.length - 1, Math.max(0, index + step));
if (index !== newIndex) {
const val = this.items[index];
this.$set(this.items, index, this.items[newIndex]);
this.$set(this.items, newIndex, val);
}
},
},
<div v-for="(n, i) in items">
<input v-model="items[i]">
<button @click="move(i, -1)">вверх</button>
<button @click="move(i, +1)">вниз</button>
</div>
??