Skip to content

mingo6/wepy-com-tabs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

微信小程序 wepyjs 第三方tabs组件

说明

菜单栏组件、可滑动、下划线、css动画

此组件依赖于wepyjs

需要开启 Promise 支持

使用

安装组件

npm install wepy-com-tabs --save

引入组件

// index.wpy
<template>
    <tabs @change.user="tabChange" />
</template>
<script>
    import wepy from 'wepy';
    import Tabs from 'wepy-com-tabs';

    export default class Index extends wepy.page {
        components = {
            tabs: Tabs
        };
    }
</script>

属性值

属性 默认值 类型 必填 说明
height 35 String 高度px
sliderWidth 20 String 下划线宽度px
fontSize 12 String 字体大小px
selectColor #1AAD19 String 选择时颜色
color #888888 String 颜色

调用方法

this.$invoke('tabs','init',['选项1','选项2','选项3']);

methods = {
    tabChange(index){
        console.log(index);
    }
};

展示

image

About

微信小程序 wepyjs 第三方tabs组件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published