摘要:
let storage = { set (key, value) { localStorage.setItem(key, JSON.stringify(value)) }, get (key) { return JSON.parse(localStorage.getItem(key)) }, rem 阅读全文
摘要:
最开始vue项目里请求数据,我使用的是依赖vue的插件——vue-resource,后来得知vue官方已经不在维护了,果断弃用,转使用axios。 首先先局部安装axios npm install -D axios 安装成功后新建http.js文件 import Vue from 'vue' imp 阅读全文