使用module.exports导出报错
function save(items) { window.localStorage.setItem('todolist',JSON.stringify(items)) } function get(){ return JSON.parse(window.localStorage.getItem('todolist')) } module.exports = { save: save, get: get }
为什么我在store.js 用commonsjs方式module.exports导出接口就报Uncaught TypeError: Cannot assign to read only property 'exports' of object '#'错误