标签:index 截图 软件开发 截取 destination js afterLoad fullpage 页面
直播平台软件开发,完整截取整个屏幕的截图方式
一、npm install --save vue-fullpage.js
1.man.js引入 ,
// An highlighted block
import router from './router'
Vue.config.productionTip = false
// 整屏滚动
import 'fullpage.js/vendors/scrolloverflow';
import VueFullPage from 'vue-fullpage.js';
Vue.use(VueFullPage)
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
二、使用
1.html,
<template>
<div>
<full-page :options="options" id="fullpage" ref="fullpage">
<div class="section">
<h3>vue-fullpage.js</h3>
</div>
<div class="section">
<div class="slide">
<h3>Slide 2.1</h3>
</div>
<div class="slide">
<h3>Slide 2.2</h3>
</div>
<div class="slide">
<h3>Slide 2.3</h3>
</div>
</div>
<div class="section">
<h3>Section 3</h3>
</div>
</full-page>
</div>
</template>
2.js
export default {
data() {
return {
options: {
anchors: ["page1", "page2", "page3", "page4", "page5", "page6"],
licenseKey: "OPEN-SOURCE-GPLV3-LICENSE",
afterLoad: this.afterLoad, // method中的方法 即回调函数
scrollOverflow: true,
scrollBar: false,
menu: "#menu",
sectionsColor: [
"#23A84A",
"#ff5f45",
"#0798ec",
"#fec401",
"#000000",
"#E7EFFE",
],
},
};
},
}
三、常用API
1.afterLoad:对应的函数写在methods中,常用作对页面的处理
methods:{
afterLoad: function (origin, destination, direction) {
// origin 起点 destination终点 direction方向 固定写法
this.navIndex = destination.index;
//destination.index代表对应页面index(从0开始)
//拿到对应页面的index就可以进行操作
if (destination.index > 0) {
this.phoneShow = true;
}
if (destination.index === 0) {
this.phoneShow = false;
}
},
}
2.moveTo通过事件跳转到对应的page页面
options: {
afterLoad: this.afterLoad,
//一定要在options中插入这段数组,数组的值对应page页面
anchors: ["page1", "page2", "page3", "page4", "page5", "page6"],
licenseKey: "OPEN-SOURCE-GPLV3-LICENSE",
afterLoad: this.afterLoad, // method中的方法 即回调函数
scrollOverflow: true,
scrollBar: false,
menu: "#menu",
sectionsColor: [
"#23A84A",
"#ff5f45",
"#0798ec",
"#fec401",
"#000000",
"#E7EFFE",
],
},
moveTo(pages) {
//固定写法,第一个参数代表options中anchors数组中的值
//在点击时传递对应的pages值即可
fullpage_api.moveTo(pages, 1);
},
以上就是直播平台软件开发,完整截取整个屏幕的截图方式, 更多内容欢迎关注之后的文章
标签:index,截图,软件开发,截取,destination,js,afterLoad,fullpage,页面 来源: https://www.cnblogs.com/yunbaomengnan/p/16194633.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。