更新记录

1.0.0(2019-07-29) 下载此版本

基于uni的本地存储1.0.0初始化


平台兼容性

使用介绍

binerStore是基于存储构造函数构造出来的一个uniStore的一个子类,满足前端的定时缓存功能,对数据的封装

使用方法

  1. 将biner-store文件夹放入components目录中
  2. 在main.js中引入:
    复制代码// 引入wTools
    import binerStore from '@/components/biner-store/biner-store'
    // 绑定在vue原型上 全局使用
    Vue.prototype.$binerStore = binerStore;
  3. 然后全局可以使用;

使用实例

  1. 存储 setStorage(key,data,timer)

    复制代码this.$binerStore.setStorage(key,data,3000);
  2. 获取 getStorage(key)

    复制代码var data = this.$binerStore.getStorage(key);
    if(!data){
        uni.showToast('数据已过期或者没有数据')
    }else{
        console.log(data);
    }
  3. 移除 removeStorage(key)

复制代码    this.$binerStore.removeStorage(key);
  1. 清除 clearStorage()
复制代码    this.$binerStore.clearStorage();

参数说明

name defalut type 是否必须 common
key String
data String Object
timer timestamp 毫秒数不传是永久

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

2019-09-05

存东西是没有问题,但是这个时间好像只能一直在线的时候才有用

清尽

2019-09-05

逍涯

2019-08-19

101***@qq.com

2019-08-12

挺好的,可以长久存储,不过想问下,vue和nvue应该能相互通用的吧?

107***@qq.com 2019-08-12

是可以的

115***@qq.com

2019-08-07

先给好评

107***@qq.com 2019-08-07

谢谢

yde***@qq.com

2019-07-30

107***@qq.com 2019-07-30

谢谢

107***@qq.com

2019-07-29

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问