weixin_39586335
2020-12-28 05:57 阅读 132

[bug] Uncaught ReferenceError: Vue is not defined

I currently use vue-tippy v0.1.2 because the newer versions don't work for me.

I tried updating to v0.1.5, but when I do my app doesn't load and I get this error in the console:

Uncaught ReferenceError: Vue is not defined

Digging deeper, chrome dev tools highlights this part of the code as problematic:

Vue.prototype.$tippy = {

该提问来源于开源项目:KABBOUCHI/vue-tippy

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

8条回答 默认 最新

  • weixin_39595487 weixin_39595487 2020-12-28 05:57

    Please try now with v0.1.7

    点赞 评论 复制链接分享
  • weixin_39586335 weixin_39586335 2020-12-28 05:57

    It seems the problem is now fixed!

    And that annoying bug where the popup text would be replaced with 'html' is also gone.

    Thanks!

    点赞 评论 复制链接分享
  • weixin_39595487 weixin_39595487 2020-12-28 05:57

    Happy to help, also make sure to check readme and examples file you can now bind title, use HTML and Vue component.

    点赞 评论 复制链接分享
  • weixin_39826342 weixin_39826342 2020-12-28 05:57

    where I can find example file? Your plugin is not working. I got empty page!

    
    <template>
      <div>
        <button title="Hi!" v-tippy> My Button! </button>
        <h1>test</h1>
      </div>
    </template>
    
    <script>
    import Vue from 'vue'
    import vueTippy from 'vue-tippy'
    Vue.use(vueTippy)
    </script>
    
    点赞 评论 复制链接分享
  • weixin_39595487 weixin_39595487 2020-12-28 05:57

    is there any error in the console? did you setup your ES6?

    here an example using the lib from unpkg.com: https://jsfiddle.net/t3n7aLjL/

    点赞 评论 复制链接分享
  • weixin_39826342 weixin_39826342 2020-12-28 05:57

    thanks it's working now.

    Did you tried it with Nuxt/SSR? Because I can't set up original tippy with SSR. I hope your wrapper will work...

    点赞 评论 复制链接分享
  • weixin_39826342 weixin_39826342 2020-12-28 05:57

    Confirmed - working perfectly with Nuxt! Thanks for awesome plugin

    点赞 评论 复制链接分享
  • weixin_39595487 weixin_39595487 2020-12-28 05:57

    thank you :)

    点赞 评论 复制链接分享

相关推荐