uniapp + uview:使用uniapp的swiper和uview的tabs标签组合实现
Tabs 标签 | uview-plus 3.0 - 全面兼容nvue的uni-app生态框架 - uni-app UI框架
```vue
:duration='300'> {{item.name}}
import {
onMounted,
onUnmounted,
ref,
reactive,
computed,
markRaw,
getCurrentInstance,
nextTick
} from "vue";
import {
formatDateByDate,
Toast
} from "@/utils/utils.js";
import store from "@/store/index.js";
import {
onPullDownRefresh,
onReachBottom,
onShow,
onLoad
} from "@dcloudio/uni-app";
const {
proxy
} = getCurrentInstance();
const state = reactive({
list: [{
name: '全部',
id: ''
},{
name: '组筹备阶段',
id: '1'
},{
name: '准备阶段',
id: '2'
},{
name: '实施阶段',
id: '3'
},{
name: '收尾阶段',
id: '4'
},],
current: 0,
});
// tab切换
const clickTab = (e) => {
state.current = e.index
}
// 页面滑动
const swiperChange = (e) => {
state.current = e.detail.current
}
.main {
height: 100%;
background: #EFF4FB;
box-sizing: border-box;
overflow: hidden;
.swiper-box {
height: calc(100vh - 224rpx);
padding: 24rpx 24rpx;
box-sizing: border-box;
}
}
```
猜你喜欢
- 6天前梦中被追逐的心理分析与应对
- 6天前梦中生日宴请宾客的深层寓意
- 6天前18种好运来临的征兆
- 6天前梦中命案现场的心理解析
- 6天前梦见左门牙脱落预示什么
- 3天前梦中遇袭的心理分析与应对
- 3天前女人梦见被蛇追赶预示什么
- 3天前梦见老虎象征哪位仙家
- 3天前梦中惊现陌生死尸的心理学解析
- 3天前梦见杀猪的周公解梦解析
网友评论
- 搜索
- 最新文章
- 热门文章