import Vue from 'vue' ; import Component from 'vue-class-component' ; @ Component export default class VueStore extends Vue { public key : string = 'aplayer-setting' ; public store : any [ ] = this . get ( this . key ) ; public get ( key ) { return JSON . parse ( localStorage . getItem ( key ) || '[]' ) ; } public set ( val ) { this . store = val ; localStorage . setItem ( this . key , JSON . stringify ( val ) ) ; } render ( ) { return null ; } }