Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods: {
- read() {
- ...
- },
- update(id, color) {
- ...
- },
- create() {
- window.axios.get('/api/cruds/create').then(({ data }) => {
- this.cruds.push(new Crud(data));
- });
- },
- del(id) {
- window.axios.delete(`/api/cruds/${id}`).then(() => {
- let index = this.cruds.findIndex(crud => crud.id === id);
- this.cruds.splice(index, 1);
- });
- }
- }
Add Comment
Please, Sign In to add comment