const STORAGE_KEY = 'todos-vaejs'
export default {
fetch: function(){
return JSON.parse(window.localStorage.getItem(STORAGE_KEY) || '[]')
},
save: function(items){
window.localStorage.setItem(STORAGE_KEY, JSON.stringify(items))
}
}
错误提示
[HMR] bundle has 1 errors
client.js?7955:161./src/store.js
Module not found: Error: Can't resolve 'babel-runtime/core-js/json/stringify' in 'G:\vue\sell\src'
@ ./src/store.js 1:0-67
@ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/Hello.vue
@ ./src/components/Hello.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./build/dev-client ./src/main.js
new_object_
相关分类