More reactive import
This commit is contained in:
parent
7a9906c742
commit
50f8aab655
|
|
@ -16,8 +16,9 @@ var importComponent = {
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
item: {},
|
item: {},
|
||||||
json: ""
|
json: "",
|
||||||
};
|
versions: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -34,7 +35,13 @@ var importComponent = {
|
||||||
|
|
||||||
storage.setLocalStorage("sections", this.$root.sections);
|
storage.setLocalStorage("sections", this.$root.sections);
|
||||||
|
|
||||||
storage.setVersionedLocalStorage(this.$root.sections.meta.version, "sections", this.$root.sections);
|
this.$root.currentVersion = this.$root.sections.meta.version;
|
||||||
|
|
||||||
|
storage.setVersionedLocalStorage(this.$root.currentVersion, "sections", this.$root.sections);
|
||||||
|
|
||||||
|
if (this.$root.versions.indexOf(this.$root.currentVersion) < 0) {
|
||||||
|
this.$root.versions.push(this.$root.currentVersion)
|
||||||
|
}
|
||||||
|
|
||||||
router.push("section/basics");
|
router.push("section/basics");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue