Last active
April 13, 2019 11:31
-
-
Save reasdom/45414e8a49b4fbddb410e90c1d2ef0ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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