1、在index.html里引入js.cookie.min.js
2、执行指令
npm install js-cookie --save
3、就可以开始使用cookie了
如果报错:VM1269:1 Uncaught ReferenceError: Cookies is not defined
是因为index.html里没有引入js.cookie.min.js
1、在index.html里引入js.cookie.min.js
2、执行指令
npm install js-cookie --save
3、就可以开始使用cookie了
是因为index.html里没有引入js.cookie.min.js