更新记录
1.01(2025-07-10)
下载此版本
tab切换页面组件,支持横向滑动切换、点击切换
平台兼容性
uni-app(4.06)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
√ |
√ |
√ |
- |
- |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
√ |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(4.06)
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
√ |
√ |
- |
- |
- |
√ |
一个简单的tab组件,支持左右滑动切换
<SmoothTab :tabList="tabs">
<template v-slot:default="{ tabIndex }">
<view v-if="tabIndex === 0">
<view class="content">
<text>这是第一个标签页的内容1</text>
<image src="/static/logo.png" mode="aspectFit" alt="示例图片"></image>
</view>
</view>
<view v-if="tabIndex === 1">
<view class="content">
<text>这是第二个标签页的内容</text>
<view class="list">
<text v-for="i in 10" :key="i">列表项 {{i}}</text>
</view>
</view>
</view>
<view v-if="tabIndex === 2">
<view class="content">
<text>这是第三个标签页的内容</text>
<button type="primary">点击按钮</button>
</view>
</view>
</template>
</SmoothTab>
```import SmoothTab from '@/components/xm-SmoothTab/xm-SmoothTab.vue'
export default {
components: {
SmoothTab
},