Skip to content

事件

通过混入TabsInstance来实现对各种事件的监听

点击查看源码
javascript
export default {
    name: "tabs-waterfall-demo",
    mixins: [TabsInstance],
    methods: {
        //实现加载页面内容的接口(pageIndex: 当前选中页面索引,pageNum: 分页加载页码)
        onLoadPageDataAsync(pageIndex,pageNum){
        },
        //实现加载页面Child子模块内容的接口(单个横行列表形式版块、多tab的版块)
        onLoadChildrenAsync(type, item, location,param) {
        },
        //切换tabs时回调 (pageIndex: 当前选中页面索引,data: 当前页面的对应Tab数据)
        onPageChange(pageIndex,data){
        },
        //item点击触发事件 (location(坐标信息), childItem(childItem对象), name)
        onChildClick(location, childItem, name) {
        },
        //item获取焦点时回调
        onChildFocused(hasFocus,location,childItem,name){
        },
        //瀑布流节点内容添加到布局之前  展示0-2三个版块,就会回调 onFrontNodesChange(0,[0,1,2])
        onFrontNodesChange(pageIndex, positions) {
        },
        //绑定事件回调 当节点展示隐藏发生变化时回调,比如上下滚动浏览内容
        onRootNodeBind(pageIndex, position) {
        }
    }
}