更新记录
1.0.2(2025-05-28)
下载此版本
优化Props代码
1.0.1(2025-05-26)
下载此版本
修复背景虚空占位问题
1.0.0(2025-05-26)
下载此版本
初始版本发布
查看更多
平台兼容性
uni-app
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
√ |
√ |
√ |
- |
- |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
√ |
√ |
√ |
√ |
√ |
√ |
- |
√ |
√ |
√ |
√ |
uni-app x
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
√ |
√ |
5.0 |
12 |
- |
√ |
其他
zws-tabs 组件文档
基本介绍
zws-tabs 是一个轻量级的标签页切换组件,支持自定义样式和动画效果。
安装使用
复制代码<template>
<zws-tabs :list="tabsList" :lineStyle="lineStyle" :activeStyle="activeStyle"
:inactiveStyle="inactiveStyle" duration="300ms" @click="ckickTabs" />
</template>
<script setup>
const tabsList = ref([
{ name: '首页' },
{ name: '分类' },
{ name: '我的' },
{ name: '关注' },
{ name: '精彩' },
{ name: '新闻' },
{ name: '少儿' },
{ name: '音乐' }
])
const lineStyle = {
'width': '45rpx',
'height': '4px',
'background-color': 'red'
}
const activeStyle = {
'color': '#303133',
'font-size': '35rpx',
'font-weight': 'bold'
}
const inactiveStyle = {
'color': '#606266',
'font-size': '35rpx'
}
const ckickTabs=(item:UTSJSONObject)=>{
console.log(item);
}
</script>
Tabs Props
参数 |
说明 |
类型 |
示例 |
|
list |
标签数组,元素为对象 |
Array |
[{name: '推荐'}] |
必填 |
lineStyleWidth |
滑块宽 |
String |
45rpx |
选填,默认45rpx |
lineStyleHeidth |
滑块高 |
String |
4px |
选填,默认4px |
lineStyleColor |
滑块颜色 |
String |
#1E90FF |
选填,默认blue |
activeStyle |
菜单选择中时的样式 |
UTSJSONObject |
{'color': '#303133','font-size': '35rpx','font-weight': 'bold'} |
选填,默认示例 |
inactiveStyle |
菜单非选中时的样式 |
UTSJSONObject |
const inactiveStyle = {'color': '#606266','font-size': '35rpx'} |
选填,默认示例 |
duration |
滑块移动一次所需的时间, |
String |
1ms,300ms等 |
选填,默认300ms |
Tabs Events
事件 |
说明 |
回调参数 |
@click |
点击标签时触发 |
index: 标签索引值,name标签名称,其他传入标签数组对象里的这里也有 |
作者QQ:3973360713,有需要可联系