Skip to content

Instantly share code, notes, and snippets.

@reasdom
Last active April 13, 2019 11:31
Show Gist options
  • Save reasdom/45414e8a49b4fbddb410e90c1d2ef0ed to your computer and use it in GitHub Desktop.
Save reasdom/45414e8a49b4fbddb410e90c1d2ef0ed to your computer and use it in GitHub Desktop.
$(document).ready(function () {
$(function () {
$("#itemTable tbody").sortable({});
});
const app = new Vue({
el: "#app",
data: {
items: [{
"order": 0,
"name": "Item 0"
}]
},
methods: {
addItem: function () {
var order = this.items.length;
Vue.set(app.items, order, {
"order": order,
"name": "Item " + order
});
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment