diff --git a/packages/app/layouts/default.vue b/packages/app/layouts/default.vue index 97f05b81..d48aff3c 100644 --- a/packages/app/layouts/default.vue +++ b/packages/app/layouts/default.vue @@ -257,7 +257,27 @@ export default { methods: { filterMenu(menuLinks){ const parser = new UrlParser(this.$store); - return menuLinks.map((item)=> 'to' in item? {...item, to: parser.parse(item.to)}: item); + return menuLinks.map((item)=> { + let newItem = item + + if ('to' in newItem) { + newItem = { + ...item, + to: parser.parse(item.to) + } + } else { + newItem = item + } + + if('submenu' in newItem) { + newItem.submenu = this.filterMenu(newItem.submenu) + } + if('mega_menu' in newItem) { + newItem.mega_menu = this.filterMenu(newItem.mega_menu) + } + + return newItem + }); }, closeCookies () { this.cookies = false diff --git a/packages/app/package.json b/packages/app/package.json index ef8a8ba6..3ca1d0d1 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -19,7 +19,7 @@ "@nuxtjs/google-analytics": "^2.4.0", "@nuxtjs/pwa": "^3.3.5", "@nuxtjs/sentry": "^5.0.3", - "@zhp-pl/ui": "^0.3.0", + "@zhp-pl/ui": "^0.3.1", "body-scroll-lock": "^3.1.5", "lodash.debounce": "^4.0.8", "nuxt": "^2.15.6", diff --git a/packages/ui/package.json b/packages/ui/package.json index 765ca0b0..f805699c 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@zhp-pl/ui", - "version": "0.3.0", + "version": "0.3.1", "scripts": { "create-index": "node scripts/create-index-file.js", "version": "yarn create-index", diff --git a/packages/ui/src/components/atoms/ZButton/ZButton.vue b/packages/ui/src/components/atoms/ZButton/ZButton.vue index 916eeb72..ee864fbe 100644 --- a/packages/ui/src/components/atoms/ZButton/ZButton.vue +++ b/packages/ui/src/components/atoms/ZButton/ZButton.vue @@ -40,7 +40,7 @@ export default { const { hack, tagComputed } = this; switch (tagComputed) { case 'a': - return { href: hack, target: '__blank' }; + return { href: hack, target: '_blank' }; case 'router-link': case 'nuxt-link': return { to: hack }; diff --git a/yarn.lock b/yarn.lock index b2d2c1e0..9c8c0ace 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:74d8bbae1532228122aeb41d3bbe513d819a173d39239976250b9cb616b5198b -size 719428 +oid sha256:4373f8218940aa47f06dd340708e3596b6c96add2454432fd28cc4823f1072af +size 731696