vue-localforage
npm install --save vlf
import Vlf from 'vlf'
Vue.use(Vlf)
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!