hh-localstorage
v1.0.1
Published
localStorag工具
Downloads
4
Maintainers
Readme
hh-localstorage
hh-localstorage NPM downloads Package Quality
- 为什么用?
- 公共方法抽离
- 使用方便
- 模块化
- 易于维护
- 如何使用? 在vue中可以使用,像挂载其他ui库一样。
import localStorage from 'hh-localstorage';
Vue.use(localStorage);
// 普通用法
console.log(window.$localStorage.get('name'));
// vue 用法
console.log(this.$localStorage.get('name'));
- 安装
- npm
npm install hh-localstorage
- yarn
yarn add hh-localstorage