vuex-magento-bridge
v1.0.25
Published
Magento module for Vuex
Downloads
32
Readme
Magento Store Vuex
Enpoints of Magento bridge for Vuex
Usage
import { category } from 'vuex-magento-bridge'
const Category = category(URL, KEY, TIMEOUT)
export default Category
// ...
// in component
import { mixin } from 'vuex-magento-bridge'
export default {
mixins: [
mixin('Category')
],
mounted () {
this.searchAll() // get and store in state 'all'
this.searchAll({ mutation: 'SET_LIST' }) // get and store in state 'list'
this.searchAll({ mutation: 'SET_ALL', page: 1, pagesize: 10}) // get page 1 with 10 products and store in state 'all'
this.searchAll({ mutation: 'SET_ALL', page: 1, pagesize: 10, shuf: true}) // get page 1 with 10 products, suffle and store in state 'all'
}
}
Globals actions
- searchAll:
function ({mutation = 'SET_ALL', page = 0, pagesize = 0, shuffle = false})
Globals mutations
- SET_ALL:
function (list)
Globals getters
- getAll:
function ()
Globals modules state
- all:
Array []