x-fullpage-vue

1.0.7 • Public • Published

安装

npm i x-fullpage-vue -S

使用

import fullpage from "x-fullpage-vue/x-fullpage.vue";
components: { fullpage }

<fullpage>
    <div></div>
    <div></div>
    <div></div>
</fullpage>

x-fullpage-ts.vue 最后版本是1.0.6不再更新

  • 使用时请使用x-fullpage.vue文件,也可以自己根据x-fullpage.vue自行补充

使用需注意

  • 建议子标签的数量在2个以上
  • fullpage标签下的子标签直接为要全屏滚动的元素
  • fullpage 自动计算每个子标签的高度,因此可以给定高度,也可以不用给定高度
  • overflowY 移动端浏览器打开向上滚动,导致移动偏移,因此需要隐藏

参数

参数 类型 默认值 备注
skip Number 0 跳转指定页面
overflowY Boolean false 是否允许横向滚动 (仅PC设备生效)
width String 1920px overflowY=true生效
abs Number 1 间隔页面
isTransition Boolean true 一次性跳转多个页面的时候,是否显示过渡
devices Number 800 设备最小宽度

方法

方法名 参数 备注
scroll page 当前页码 (从0开始计数)
mousemove direction 滚动方向
init nodesInfo 所有节点信息集合

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i x-fullpage-vue

      Weekly Downloads

      4

      Version

      1.0.7

      License

      ISC

      Unpacked Size

      24.1 kB

      Total Files

      5

      Last publish

      Collaborators

      • xyzgy