WIP MMCM
This commit is contained in:
22
src/stores/mmcm.js
Normal file
22
src/stores/mmcm.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import {defineStore} from 'pinia'
|
||||
|
||||
export const useMMCMStore = defineStore('counter', {
|
||||
state: () => ({count: 0, name: 'Eduardo', street: '', zipCode: '', city: '', productList : []}),
|
||||
getters: {
|
||||
fullAddress: (state) => state.street + ' ' + state.zipCode + '' + state.city
|
||||
},
|
||||
actions: {
|
||||
setStreet(street) {
|
||||
this.street = street
|
||||
},
|
||||
setZipCode(zipCode) {
|
||||
this.zipCode = zipCode
|
||||
},
|
||||
setCity(city) {
|
||||
this.city = city
|
||||
},
|
||||
setProductList(array){
|
||||
this.productList = array
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user