2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-09 22:22:24 +03:00

support custom options

This commit is contained in:
Declan de Wet
2016-11-10 17:37:44 +02:00
parent 509583873e
commit d218afa2e6
14 changed files with 376 additions and 324 deletions
+16 -14
View File
@@ -1,18 +1,20 @@
import getMetaInfo from '../shared/getMetaInfo'
import updateClientMetaInfo from './updateClientMetaInfo'
/**
* When called, will update the current meta info with new meta info.
* Useful when updating meta info as the result of an asynchronous
* action that resolves after the initial render takes place.
*
* Credit to [Sébastien Chopin](https://github.com/Atinux) for the suggestion
* to implement this method.
*
* @return {Object} - new meta info
*/
export default function refresh () {
const info = getMetaInfo(this.$root)
updateClientMetaInfo(info)
return info
export default function _refresh (options) {
/**
* When called, will update the current meta info with new meta info.
* Useful when updating meta info as the result of an asynchronous
* action that resolves after the initial render takes place.
*
* Credit to [Sébastien Chopin](https://github.com/Atinux) for the suggestion
* to implement this method.
*
* @return {Object} - new meta info
*/
return function refresh () {
const info = getMetaInfo(options)(this.$root)
updateClientMetaInfo(options)(info)
return info
}
}