import { createApp } from 'vue'
import timeago from 'vue-timeago3'
const app = createApp(App)
...
app.use(timeago)
...
app.mount('#app')
Plugin Options
During the registration of the component you can specify a set of options, which will mutate the plugin globally. If you don't want to define global settings, skip this section and use props instead. To use options, simply pass them during the registration as an object:
import { createApp } from 'vue'
import timeago from 'vue-timeago3'
const app = createApp(App)
...
const timeagoOptions = {
converterOptions: {
includeSeconds: false,
}
}
app.use(timeago, timeagoOptions)
...
app.mount('#app')
As of version 1.0.0 the following options are available: