mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-24 21:50:34 +03:00
Bind titleTemplate function call to component instance
This commit is contained in:
@@ -85,7 +85,7 @@ export default function _getMetaInfo (options = {}) {
|
|||||||
// replace title with populated template
|
// replace title with populated template
|
||||||
if (info.titleTemplate) {
|
if (info.titleTemplate) {
|
||||||
if (typeof info.titleTemplate === 'function') {
|
if (typeof info.titleTemplate === 'function') {
|
||||||
info.title = info.titleTemplate(info.titleChunk)
|
info.title = info.titleTemplate.call(component, info.titleChunk)
|
||||||
} else {
|
} else {
|
||||||
info.title = info.titleTemplate.replace(/%s/g, info.titleChunk)
|
info.title = info.titleTemplate.replace(/%s/g, info.titleChunk)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user