vue-goto-top

1.0.0 • Public • Published

vue-goto-top

下载

npm i vue-goto-top

使用

1. 全局使用

import GoToTop from "vue-goto-top";
Vue.component(GoToTop.name,GoToTop);

2. 局部使用

import GoToTop from "vue-goto-top";
components: {GoToTop}

Props

参数 类型 作用
top number 默认是600, 距离顶部多少px显示回到顶部按钮

例子


 <template>
  <div>
    <GoToTop :top="600"/>
  </div>
 <template/>

<script>
import GoToTop from "vue-goto-top";
export default {
  name: "GoToTop",
  components: {GoToTop},
  data() {
    return {
    }
  },
}
</script>

/vue-goto-top/

    Package Sidebar

    Install

    npm i vue-goto-top

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    100 kB

    Total Files

    13

    Last publish

    Collaborators

    • czrnpm