一、前期准备工作
软件环境:微信开发者工具
官方下载地址:https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html
1、基本需求。
- 基于swiper组件的tab切换
2、案例目录结构
二、程序实现具体步骤
1.tab切换index.wxml代码
<view class="continer">
<!--内容主体-->
<swiper class="swiper" current="1" duration="200" bindchange="swiperChange" previous-margin="20px" next-margin="20px" style="height: {
{winHeight}}px;">
<swiper-item>
<view class="user-box" style="height: {
{winHeight-40}}px;">
<view class="user-image">
<image class="image" src="https://www