MK
import createPersistedState from 'vuex-persistedstate';
export default ({store, app}) => {
createPersistedState({
key: '
cookie-key',
paths: [
'complete.completeProducts'
],
storage: {
getItem: key => app.$cookie.get(key),
setItem: (key, value) => {
if(key !== '@@') app.$cookie.set(key, value, {
expires: 30 * 86400,
path: '/'
});
},
removeItem: key => {
if(key !== '@@') app.$cookie.remove(key);
},
},
})(store);
};