Binaryify / vue-custom-scrollbar

Minimalistic but perfect custom scrollbar component for Vue.JS
https://binaryify.github.io/vue-custom-scrollbar/
MIT License
145 stars 17 forks source link

希望提供浏览器引入的安装方式 #4

Closed imyuyu closed 4 years ago

imyuyu commented 5 years ago

如题,可以像下面这种方式进行引入

<script type="text/javascript" src="https://unpkg.com/vue-custom-scrollbar"></script>

现在这样引用没办法使用。

york8817612 commented 4 years ago

還需要引入 utatti/perfect-scrollbar 的js跟css 才可以正常使用

imyuyu commented 4 years ago

還需要引入 utatti/perfect-scrollbar 的js跟css 才可以正常使用

我还没试过,什么时候试一下。

Binaryify commented 4 years ago
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="https://unpkg.com/vue"></script>
  <script src="https://unpkg.com/vue-custom-scrollbar@1.3.0/dist/vueScrollbar.umd.min.js"></script>

  <div id="app">
    <demo style="height:500px;width:500px">
      <div style="height:1000px;width:1000px;background:green"></div>
    </demo>
  </div>

  <script>
    new Vue({
      components: {
        demo: vueScrollbar
      }
    }).$mount('#app')
  </script>
</body>

</html>
imyuyu commented 4 years ago
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="https://unpkg.com/vue"></script>
  <script src="https://unpkg.com/vue-custom-scrollbar@1.3.0/dist/vueScrollbar.umd.min.js"></script>

  <div id="app">
    <demo style="height:500px;width:500px">
      <div style="height:1000px;width:1000px;background:green"></div>
    </demo>
  </div>

  <script>
    new Vue({
      components: {
        demo: vueScrollbar
      }
    }).$mount('#app')
  </script>
</body>

</html>

66,感谢大佬