You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 782B

4 years ago
4 years ago
4 years ago
1234567891011121314151617181920212223242526272829303132333435
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. export default new Vuex.Store({
  5. state: {
  6. dialog: false,
  7. items: [
  8. {
  9. src: 'https://images-na.ssl-images-amazon.com/images/I/81Dl5GdAVkL.png',
  10. title: 'Apple',
  11. amount: '1',
  12. },
  13. {
  14. src: 'https://5.imimg.com/data5/PW/ND/MY-46595757/fresh-pineapple-281kg-29-500x500.png',
  15. title: 'Pineapple',
  16. amount: '2',
  17. },
  18. { "src": "https://www.thermofisher.com/blog/food/wp-content/uploads/sites/5/2015/08/single_strawberry__isolated_on_a_white_background.jpg",
  19. "title": "Strawberry",
  20. "amount": "5"
  21. }
  22. ]
  23. },
  24. mutations: {
  25. appendItem(store, item) {
  26. store.items.push(item)
  27. }
  28. },
  29. actions: {
  30. },
  31. modules: {
  32. }
  33. })