1. v-web-storage

v-web-storage

####安装
npm install v-web-storage --save-dev
####vue中使用

import storagePlugin from 'v-web-storage'
Vue.use(storagePlugin)

####设置

this.$storage.local.set(key, val);
this.$storage.session.set(key, val);

####获取

this.$storage.local.get(key);
this.$storage.session.get(key);

####移除指定的一个

this.$storage.local.remove(key);
this.$storage.session.remove(key);

####移除所有

this.$storage.local.clear();
this.$storage.session.clear();

####是否有某个键

this.$storage.local.hasKey(key);
this.$storage.session.hasKey(key);