Last active
January 15, 2019 02:39
-
-
Save DezChuang/0d18d1abaf0db74b302956c8068e3649 to your computer and use it in GitHub Desktop.
myPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async fetch({ app, store }) { | |
app.$registerStore({ | |
module: MyModule, | |
moduleName: `myModule`, | |
store | |
}) | |
await store.dispatch('myModule/INIT_DATA') | |
}, | |
beforeCreate() { | |
this.$registerStore({ | |
module: MyModule, | |
moduleName: `myModule`, | |
store: this.$store | |
}) | |
}, | |
beforeDestroy() { | |
this.$store.unregisterModule('myModule') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment