fullpage.js版本3.0.9报错问题(licenseKey)

在fullpage.js文件里搜索licenseKey,删除!不会对程序造成任何影响,后面还有个else。把else这四个字母也删掉。

//测试有效
if(!isOK){
    showError('error', 'Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option. Read about it here:');
    showError('error', 'https://github.com/alvarotrigo/fullPage.js#options.');
}
 

再加载 fullpage的时候,如果英文版本看不懂,可以看这个连接http://fullpage.81hu.com/

js代码在线美化工具:https://beautifier.io/

主要是为了方便看,使用这个工具,可以自动加上空格换行等。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在 Vue.js 项目中使用 fullpage.js,可以使用 Vue-fullpage.js 插件。下面是一个简单的使用示例: 1. 安装 Vue-fullpage.js 使用 npm 或 yarn 安装 Vue-fullpage.js: ``` npm install vue-fullpage.js ``` 或者 ``` yarn add vue-fullpage.js ``` 2. 在 Vue.js 项目中引入 Vue-fullpage.js 在 main.js 中引入 Vue-fullpage.js: ```javascript import Vue from 'vue' import VueFullpage from 'vue-fullpage.js' Vue.use(VueFullpage) ``` 3. 创建 fullpage 组件 在组件中使用 `<vue-fullpage>` 标签创建 fullpage 组件,然后在组件的 data 中定义页面: ```vue <template> <div> <vue-fullpage :options="options"> <div class="section"> <h1>Page 1</h1> </div> <div class="section"> <h1>Page 2</h1> </div> <div class="section"> <h1>Page 3</h1> </div> </vue-fullpage> </div> </template> <script> export default { data() { return { options: { sectionsColor: ['#f2f2f2', '#4BBFC3', '#7BAABE'] } } } } </script> ``` 在这个示例中,我们创建了一个 fullpage 组件,定义了三个页面,每个页面都是一个 `<div>` 元素,并设置了页面的颜色。 4. 配置和使用 fullpage.js 可以在组件的 data 中设置 fullpage.js 的配置参数,例如页面滚动的速度、页面的动画效果、是否循环滚动等。可以在 options 对象中设置 fullpage.js 的配置参数,例如: ```javascript data() { return { options: { sectionsColor: ['#f2f2f2', '#4BBFC3', '#7BAABE'], scrollingSpeed: 1000, easingcss3: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)', loopBottom: true, loopTop: true, anchors: ['page1', 'page2', 'page3'] } } } ``` 可以使用 fullpage.js 提供的钩子函数,例如: ```javascript data() { return { options: { afterLoad: function(origin, destination, direction) { console.log('afterLoad', origin.index, destination.index, direction) }, onLeave: function(origin, destination, direction) { console.log('onLeave', origin.index, destination.index, direction) } } } } ``` 在这个示例中,我们定义了 `afterLoad` 和 `onLeave` 两个钩子函数,分别在页面滚动到新页面之后和离开当前页面之前执行。这些钩子函数可以用来执行一些特定的操作,例如修改页面标题、添加动画效果等。 这样就可以在 Vue.js 项目中使用 fullpage.js 了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值