- Added VueIdb plugins: $db.mytable.add({myelem:'value'}) to insert a record, and $db.mytable.toArray() to receive the array.
This commit is contained in:
28
src/plugins/vue-idb.js
Normal file
28
src/plugins/vue-idb.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import Vue from 'vue'
|
||||
import VueIdb from 'vue-idb'
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.use(VueIdb)
|
||||
|
||||
// Insert here the database for IndexDB
|
||||
new VueIdb({
|
||||
version: 1,
|
||||
database: 'test',
|
||||
schemas: [
|
||||
{ categories: '++id, sub_categ_id, descr_it' }
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
export default new VueIdb({
|
||||
version: 1,
|
||||
database: 'test',
|
||||
schemas: [
|
||||
{ categories: '++id, sub_categ_id, descr_it' }
|
||||
]
|
||||
})
|
||||
*/
|
||||
Reference in New Issue
Block a user