SublimeCT / vlf

A Vue plugin from localForage.vue-localForage or vlf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vlf

vue-localforage

Install

npm install  --save vlf

How to use vlf

import Vlf from 'vlf'
Vue.use(Vlf)

In your code

this.$vlf.createInstance({
    storeName: 'user'
}).then((store) => {
    store.setItem('key', [])
    store.length().then((keys) => {
        console.log(keys)
    })
    store.iterate((value, key, num) => {
        return [key, value]
    }).then((result) => {
        console.log(result)
    })
})

The other methods of use are the same as the official website, just add a this.$vlf in front, the same behind!

About

A Vue plugin from localForage.vue-localForage or vlf


Languages

Language:JavaScript 100.0%