js vue array change position

JavaScript
Array.prototype.move = function(from, to) {
    this.splice(to, 0, this.splice(from, 1)[0]);
};

// but don't modify the Array prototype,
// simply apply the operations directly to your array
Source

Also in JavaScript: