mounted() {
    if (localStorage.getItem("data")) {
      try {
        this.data = JSON.parse(localStorage.getItem("data"));
      } catch (e) {
        localStorage.removeItem("data");
      }
    }
},
 data() {
    return {
      data: []
    };
 },
 methods: {
   cacheData() {
     localStorage.setItem("data", JSON.stringify(this.data));
   }
 }