wechat-miniprogram-tabs
0.0.1 • Public • Published wechat-miniprogram-tabs
特性
下载
git clone https://github.com/simsir-lin/wechat-miniprogram-tabs.git
DEMO
- 打开微信web开发者工具,'本地小程序项目 - 添加项目',项目目录选择为 example 目录
使用
- 安装
npm install --save wechat-miniprogram-tabs
- 在你的页面json中添加
{
"usingComponents": {
"tabs": "wechat-miniprogram-tabs/tabs",
"tab": "wechat-miniprogram-tabs/tab"
}
}
- 每次引入或更新需先执行开发者工具的 npm 构建,微信官方 npm 文档
- 在wxml中即可使用组件
<tabs>
<tab label="第一个"></tab>
<tab label="第二个"></tab>
</tabs>
注意
- 小程序基础库版本 2.2.1 或以上、及开发者工具 1.02.1808300 或以上开始
Tabs Props
name |
description |
type |
default value |
current |
当前激活标签页 |
Number |
0 |
activeColor |
激活显示颜色 |
String |
#333333 |
Tab Props
name |
description |
type |
default value |
label |
标签页标题 |
String |
|
events
name |
description |
parameters |
change |
切换 |
event.detail.index |
贡献
如果你有好的意见或建议,欢迎给我提issue!
Package Sidebar
Install
npm i wechat-miniprogram-tabs
Weekly Downloads