vue-tables-2
Version:
Vue.js 2 grid components
14 lines (11 loc) • 356 B
JavaScript
module.exports = function (key, value) {
if (!this.opts.saveState || !this.activeState) return;
try {
var currentState = JSON.parse(this.storage.getItem(this.stateKey));
} catch (e) {
var currentState = this.initState();
}
currentState[key] = value;
this.storage.setItem(this.stateKey, JSON.stringify(currentState));
};
;