soixantecircuits/idle-vue

Idle time option

Closed this issue · 5 comments

I think idletime option does not work even If I put 500ms.
Any example of implementing this plugin as component and passing custom idle time to it?
I would be grateful
Thanks

Hi! normally you just supply an idle time in ms.

idleTime: 2000

Vue.use(IdleVue, {
  eventEmitter: eventsHub,
  idleTime: 10000
})

const vm = new Vue({
  el: '#app',
  data () {
    return {
      messageStr: 'Hello'
    }
  },
  onIdle() {
    this.messageStr = 'ZZZ'
  },
  onActive() {
    this.messageStr = 'Hello'
  }
})

Could you show a codepen of what you are trying to achieve ?

@piterjov does that work for you ?

Hi @gabrielstuff , still not. How can I use it as component?
which will listen to those events from above?
Thanks

No real life example shared.
Closing.

how pass a time per component using a main.js? need put a script inside a component?
image