Add nuxt-module for moment and remove vue-moment
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
<v-flex xs12 sm6><strong>Datum:</strong> {{event.date}} ({{event.date | moment('dddd') }})</v-flex>
|
<v-flex xs12 sm6><strong>Datum:</strong> {{event.date}} ({{ weekday }})</v-flex>
|
||||||
<v-flex xs12 sm6 v-if="event.time"><strong>Tid:</strong> {{event.time}}</v-flex>
|
<v-flex xs12 sm6 v-if="event.time"><strong>Tid:</strong> {{event.time}}</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
@@ -33,6 +33,11 @@
|
|||||||
type: Function,
|
type: Function,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
weekday() {
|
||||||
|
return window.$nuxt.$moment(this.event.date).format('dddd');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+1
-2
@@ -26,8 +26,7 @@ module.exports = {
|
|||||||
{src: '~/plugins/vuetify.js', ssr: false},
|
{src: '~/plugins/vuetify.js', ssr: false},
|
||||||
{src: '~/plugins/graph-routing.js', ssr: false},
|
{src: '~/plugins/graph-routing.js', ssr: false},
|
||||||
{src: '~/plugins/app-components.js', ssr: false},
|
{src: '~/plugins/app-components.js', ssr: false},
|
||||||
{src: '~/plugins/vue-lazyload.js', ssr: false},
|
{src: '~/plugins/vue-lazyload.js', ssr: false}
|
||||||
{src: '~/plugins/vue-moment.js', ssr: false}
|
|
||||||
],
|
],
|
||||||
router: {
|
router: {
|
||||||
middleware: ['auth']
|
middleware: ['auth']
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
"sass-loader": "^7.0.3",
|
"sass-loader": "^7.0.3",
|
||||||
"vue": "^2.5.22",
|
"vue": "^2.5.22",
|
||||||
"vue-lazyload": "^1.2.6",
|
"vue-lazyload": "^1.2.6",
|
||||||
"vue-moment": "^4.0.0",
|
|
||||||
"vuetify": "^1.4.2"
|
"vuetify": "^1.4.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
import moment from 'moment';
|
|
||||||
import vueMoment from 'vue-moment';
|
|
||||||
import 'moment/locale/sv';
|
|
||||||
|
|
||||||
Vue.use(vueMoment, {
|
|
||||||
moment
|
|
||||||
});
|
|
||||||
@@ -8433,13 +8433,6 @@ vue-meta@^1.5.6:
|
|||||||
lodash.uniqueid "^4.0.1"
|
lodash.uniqueid "^4.0.1"
|
||||||
object-assign "^4.1.1"
|
object-assign "^4.1.1"
|
||||||
|
|
||||||
vue-moment@^4.0.0:
|
|
||||||
version "4.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/vue-moment/-/vue-moment-4.0.0.tgz#20809d1e7d7fca63d556fb8d008b95993d32f5ea"
|
|
||||||
integrity sha512-lNkEPuA3i3A4q4TDSwOXoRF4Y2vHHdaTOSvpPyGgxoFQP8n4sUh6jU5aJj3FIMlXo5UaHLPIz5hvvpvYx9Wj0w==
|
|
||||||
dependencies:
|
|
||||||
moment "^2.11.1"
|
|
||||||
|
|
||||||
vue-no-ssr@^1.1.0:
|
vue-no-ssr@^1.1.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz#875f3be6fb0ae41568a837f3ac1a80eaa137b998"
|
resolved "https://registry.yarnpkg.com/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz#875f3be6fb0ae41568a837f3ac1a80eaa137b998"
|
||||||
|
|||||||
Reference in New Issue
Block a user