Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods: {
- read() {
- ...
- },
- update(id, color) {
- window.axios.put(`/api/cruds/${id}`, { color }).then(() => {
- // Once AJAX resolves we can update the Crud with the new color
- this.cruds.find(crud => crud.id === id).color = color;
- });
- },
- ...
- }
Add Comment
Please, Sign In to add comment