作者:Fenchow,来自原文一:顶部网址导航栏的实现view class= quot;swiper-tab quot; view class= quot;swiper-tab-list {{currentTab==0 'on' : ''}} quot; data-current= quot;0 quot; bindtap= quot;swichNav quot;11/view view class= quot;swiper-tab-li 。
宁波小程序开发对于开发者而言,小程序开发门槛相对较低,难度不及APP,能够满足简单的基础应用,适合生活服务类线下商铺以及非刚需低频应用的转换。。
作者:Fenchow,来自原文
一:顶部网址导航栏的实现
lt;view gt;
lt;view data-current="0" bindtap="swichNav" gt;11 lt;/view gt;
lt;view data-current="1" bindtap="swichNav" gt;22 lt;/view gt;
lt;view data-current="2" bindtap="swichNav" gt;33 lt;/view gt;
lt;view data-current="3" bindtap="swichNav" gt;44 lt;/view gt;
lt;view data-current="4" bindtap="swichNav" gt;55 lt;/view gt;
lt;/view gt;
lt;swiper current="{{currentTab}}" duration="300" style="height:{{winHeight - 31}}px" bindchange="bindChange" gt;
lt;!-- 我是哈哈 -- gt;
lt;swiper-item gt;
lt;view gt;我是哈哈 lt;/view gt;
lt;/swiper-item gt;
lt;!-- 我是呵呵 -- gt;
lt;swiper-item gt;
lt;view gt;我是呵呵 lt;/view gt;
lt;/swiper-item gt;
lt;!-- 我是嘿嘿 -- gt;
lt;swiper-item gt;
lt;view gt;我是嘿嘿 lt;/view gt;
lt;/swiper-item gt;
lt;swiper-item gt;
lt;view gt;我是嘿嘿 lt;/view gt;
lt;/swiper-item gt;
lt;swiper-item gt;
lt;view gt;我是嘿嘿 lt;/view gt;
lt;/swiper-item gt;
lt;/swiper gt;
。swiper-tab{
width: 100%;
border-bottom: 2rpx solid #777777;
text-align: center;
line-height: 80rpx;
}
。swiper-tab-list{ font-size: 30rpx;
display: inline-block;
width: 20%;
color: #777777;
}
。宁波微信小程序开发是一种不需要下载安装即可使用的应用,它实现了应用“触手可及”的梦想,用户扫一扫或者搜一下即可打开应用。on{ color: #da7c0c;
border-bottom: 5rpx solid #da7c0c;}
。swiper-box{ display: block; height: 100%; width: 100%; overflow: hidden; }
。swiper-box view{
text-align: center;
}
var app = getApp()
Page( {
data: {
/**
* 页面配置(deploy)
*/
winWidth: 0,
winHeight: 0,
// tab切换
currentTab: 0,
},
onLoad: function() {
var that = this;
/**
* 获取(obtain)系统信息
*/
wx。getSystemInfo( {
success: function( res ) {
that。setData( {
winWidth: res。宁波微信小程序开发其中,通过公众号关联,用户可以实现公众号与小程序之间相互跳转。小程序体现了“用完即走”的理念,用户不用关心是否安装太多应用的问题。应用将无处不在,随时可用,但又无需安装卸载。 windowWidth,
winHeight: res。windowHeight
});
}
});
},
/**
* 滑动切换tab
*/
bindChange: function( e ) {
var that = this;