小程序学习过程中遇到的问题 整理1

2017-01-19  本文已影响770人  jlnbda3488375

< view class="v1" hover="true" hover-class="v1_changed" hover-start-time="1000" hover-stay-time="500">1< /view>

/* pages/index/scroll_view.wxss*/
.scroll-x{
flex-direction: row;
display: -webkit-flex;
display: block;
white-space: nowrap;
/*flex-wrap: nowrap;/*
width: 500rpx;
}

< swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" current='1' interval="1000" duration="10a00" circular="{{cicular}}">
< swiper-item>
< view style="background-color: blue; height: 300rpx"></view>
< swiper-item>
< swiper-item>
<view style="background-color: red; height: 300rpx"></view>
< swiper-item>
< swiper-item>
< view style="background-color: green; height: 300rpx"></view>
< swiper-item>

< swiper>

<block wx:for="{{type}}">
<icon type="{{item}}" size="40" color="red"></icon>
< block>

var textnow = "这是一个关于text的例子"
var textdata = [];
Page({
data:{
tex:textnow
},
add:function(e){
textdata.push('push')
this.setData({
tex:textnow+textdata[0]
})
},
remove:function(){
textdata.pop()
this.setData({
tex:textnow
})
}
})

上一篇 下一篇

猜你喜欢

热点阅读