zh-rocco / vue-auto-storage

:beers: An automatic storage plugin for Vue2, persist the data with localStorage.
https://zh-rocco.github.io/vue-auto-storage/
MIT License
83 stars 4 forks source link

please supoort vue instance, not only vue component #30

Open scil opened 2 years ago

scil commented 2 years ago

Describe the bug

right now Vue instance is not supported

To Reproduce


new Vue({
  template: `  <input type="text"  v-model="persistentForm.name"/> `,
  autoStorage: ["persistentForm"],
  data() { return { 
        persistentForm: {
        name: "123ok", region: "", delivery: false, type: [], resource: "", desc: "",
      },
  }; }, 
}).$mount("#my-app");
<body>
  <div id="my-app"></div>
  <div id="app"></div>
</body>