croud-layout
Advanced tools
Comparing version 1.11.1 to 1.11.2
{ | ||
"name": "croud-layout", | ||
"main": "src/plugin.js", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"description": "A Vue.js project", | ||
@@ -6,0 +6,0 @@ "author": "Brock <brock.reece@croud.co.uk>", |
@@ -37,2 +37,27 @@ # croud-layout | ||
``` | ||
## Moment | ||
The croud-layout plugin will add [vue-moment](https://github.com/brockpetrie/vue-moment) to your project. This will globally register the moment filter... | ||
```html | ||
<div>{{ date | moment('YYYY-MM-DD')}}</div> | ||
``` | ||
...and also add $moment to the Vue prototype... | ||
```js | ||
//App.vue | ||
this.$moment(date).format('YYYY-MM-DD') | ||
``` | ||
See their docs for more examples. | ||
### Custom moment instance | ||
You can pass in a custom moment instance to replace vue-moment's default instance by adding a moment object to the croud-layout plugin options | ||
```js | ||
import moment from 'moment-timezone' | ||
... | ||
Vue.use(CroudLayout, { store, moment }) | ||
``` | ||
## Axios plugin | ||
@@ -39,0 +64,0 @@ A drop in replacement for vue-resource |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13261167
138
684