👔 Logic work for multi-page support
This commit is contained in:
@@ -8,7 +8,7 @@ import { searchTiles } from '@/utils/Search';
|
||||
|
||||
const HomeMixin = {
|
||||
props: {
|
||||
confPath: String,
|
||||
subPageInfo: Object,
|
||||
},
|
||||
computed: {
|
||||
sections() {
|
||||
@@ -40,8 +40,9 @@ const HomeMixin = {
|
||||
},
|
||||
methods: {
|
||||
async getConfigForRoute() {
|
||||
if (this.confPath) { // Get config for sub-page
|
||||
await this.$store.dispatch(Keys.INITIALIZE_MULTI_PAGE_CONFIG, this.confPath);
|
||||
this.$store.commit(Keys.SET_CURRENT_SUB_PAGE, this.subPageInfo);
|
||||
if (this.subPageInfo && this.subPageInfo.confPath) { // Get config for sub-page
|
||||
await this.$store.dispatch(Keys.INITIALIZE_MULTI_PAGE_CONFIG, this.subPageInfo.confPath);
|
||||
} else { // Otherwise, use main config
|
||||
this.$store.commit(Keys.USE_MAIN_CONFIG);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user