alex-oleshkevich / vue-introjs

intro.js bindings for Vue.
MIT License
301 stars 53 forks source link

hints don't work at all #63

Closed rotemrevivo91 closed 3 years ago

rotemrevivo91 commented 3 years ago
  1. Adding hints by using v-intro-hint:

    <div v-intro-hint="'tooltip text'">
    ...
    </div>
    mounted() {
    this.$intro().addHints()
    this.$intro().showHints()
    }

    In the inspector i can see that v-intro-hint has been transpiled to data-hint but nothing else happens.

  2. Adding hints programmatically:

    <div id="hint-0">
    ...
    </div>
    mounted() {
    const hints = [
    {
      hint: 'tooltip text',
      element: document.querySelector('#hint-0')
    }
    ]
    this.$intro.setOptions({hints})
    this.$intro().addHints()
    this.$intro().showHints()
    }

    In the inspector i can't even see that v-intro-hint has been transpiled to data-hint. Then i tried:

    mounted() {
    ...
    this.$intro().showHintDialog(0)
    }

    i got an error: item is undefined So just in case i tried as well:

    mounted() {
    ...
    console.log(document.querySelector('#hint-0'))
    setTimeout(() => {
    this.$intro().showHintDialog(0)
    }, 1000)
    }

    console.log() prints <div id="hint-0>..

introjs outputs error item is undefined.