Comparing version 0.2.0 to 0.3.0
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "0.2.0" | ||
"version": "0.3.0" | ||
} |
@@ -15,3 +15,3 @@ # vue-utils | ||
``` | ||
Vue.use(require('vue-utils'), ['pageTop', 'pageFade']); | ||
Vue.use(require('vue-utils'), ['pageTop', 'pageFade', 'pageMeta']); | ||
``` | ||
@@ -24,3 +24,4 @@ | ||
pageTop: {key: 'someKey'}, | ||
pageFade: {duration: 1000} | ||
pageFade: {duration: 1000}, | ||
pageMeta: {} | ||
}); | ||
@@ -84,2 +85,28 @@ ``` | ||
Any routes in the same `group` will NOT scroll to top. Only routes between DIFFERENT groups will scroll to the top (or no group set at all). | ||
Any routes in the same `group` will NOT scroll to top. Only routes between DIFFERENT groups will scroll to the top (or no group set at all). | ||
### `pageMeta` | ||
Set meta properties defined in the route. | ||
It will try to find meta tags by `name` or `property` and set it's `content`. | ||
**NOTE:** This is just a simply utility for setting static meta content. If setting some kind of open graph meta it's best to use some kind of global store. | ||
It's more useful for setting visible things like the `title`. | ||
``` | ||
... | ||
'/login': { | ||
meta: { | ||
title: 'Login', | ||
meta: [ | ||
{attribute: 'description', content: 'This is the login page description.'} | ||
] | ||
}, | ||
component: require('./components/pages/Login.vue'), | ||
} | ||
... | ||
``` |
7855
6
119
109