alvar0hurtad0 / drupal-vuejs-todo Goto Github PK
View Code? Open in Web Editor NEWThis an example of a decoupled application using drupal as backend and vuejs as fronted.
License: GNU General Public License v2.0
This an example of a decoupled application using drupal as backend and vuejs as fronted.
License: GNU General Public License v2.0
here you could use destructuring and object shorthand like so:
[ADD_TODO](state, { id, body }) { state.todos.push({ id, body, completed: false }) },
Creo que no hace falta decir más.
Logueado con user1 tengo problemas para ver mis tareas.
Al hacer checkout al commit anterior al de la agregación del interceptor todo trabaja de forma correcta.
Saludos.
@galan83 realized about some issues on mutations.
Crear setup básico para tener un drupal corriendo con los módulos necesarios.
para ganar comodidad sería bueno separar el item del todo a un componente nuevo.
Drupal should have an endpoint that allow:
GET all todos /api/v1/todos
POST a todo /api/v1/todos {title: ' - - - - ',status:'true/false'}
DELETE a todo /api/v1/todos/{todo_id}
PATCH a todo /api/v1/todos/{todo_id} -> {title: ' - - - - ',status:'true/false'}
hay 4 ficheros vacíos, se trata de usarlos:
/frontend/src/store/modules/
Aquí hay un tutorial sobre cómo se hace:
https://elabismodenull.wordpress.com/2017/06/08/vuejs-los-modulos-en-vuex/
Probably better to just do the .find once, save it and than do the mutation.
`
let t = state.todos.find(todo => todo.id === payload)
t.completed = !t.completed;
`
necesitaríamos un icono borrar para poder borrar cada todo.
Habría que utilizar constantes en los nombres de las mutaciones.
aquí viene explicado por qué.
https://elabismodenull.wordpress.com/2017/06/05/vuejs-las-mutaciones-y-acciones-en-vuex/
Necesitaríamos un contador de tareas pendientes que nos ayude a entender por qué tenemos que almacenar los estados de los todo dentro del state en lugar de forma local en el componente como estamos haciendo ahora.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.