I want to use a vue component called vue-timeago:
import VueTimeago from 'vue-timeago'
Vue.use(VueTimeago, {
name: 'Timeago', // Component name, `Timeago` by default
locale: undefined, // Default locale
locales: {
'zh-CN': require('date-fns/locale/zh_cn'),
'ja': require('date-fns/locale/ja'),
}
})
However, I didn't built my webapp as a complete Vue app. I used Django's templates function and only added Vue as an add-on on each page:
<script>
let app = new Vue({
delimiters: ['[[',']]'],
el: '#app',
data: {
},
...
How can I use that component mentioned above? Thanks a lot!