Global contants for default keys

This commit is contained in:
Alicia Sykes
2021-04-16 15:36:30 +01:00
parent c5f630849f
commit 56f2ba4155
8 changed files with 60 additions and 25 deletions

View File

@@ -19,13 +19,14 @@ export default {
Footer,
},
data: () => ({
pageInfo: conf.pageInfo,
pageInfo: conf.pageInfo || Defaults.pageInfo,
appConfig: conf.appConfig || Defaults.appConfig,
showFooter: Defaults.visibleComponents.footer,
}),
methods: {
/* Returns either page info from the config, or default values */
getPageInfo(pageInfo) {
const defaults = { title: 'Demo', description: '' };
const defaults = Defaults.pageInfo;
if (pageInfo) {
return {
title: pageInfo.title || defaults.title,