2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-17 06:50:33 +03:00

Add meta templates

This commit is contained in:
Alexander Lichter
2018-03-19 12:07:07 +01:00
parent 617500fe98
commit 0457b585e5
6 changed files with 246 additions and 9 deletions
+2 -1
View File
@@ -20,7 +20,7 @@ const escapeHTML = (str) => typeof window === 'undefined'
.replace(/'/g, '\u0027')
export default function _getMetaInfo (options = {}) {
const { keyName, tagIDKeyName } = options
const { keyName, tagIDKeyName, metaTemplateKeyName } = options
/**
* Returns the correct meta info for the given component
* (child components will overwrite parent meta info)
@@ -52,6 +52,7 @@ export default function _getMetaInfo (options = {}) {
component,
option: keyName,
deep: true,
metaTemplateKeyName,
arrayMerge (target, source) {
// we concat the arrays without merging objects contained in,
// but we check for a `vmid` property on each object in the array