2小时前小编发现微信小程序用户:【a松涛】提出了一个关于“以前学的,忘了,跪求解答,首页选项怎么做?”的问题,在问题中开发者a松涛对该问题做了如下阐述:
求求大家帮我看看,错在哪里了?结构文件index.wxml
<view>
<scroll-view class=”left-navbar” scroll-y>
<view wx:for=”{{navitems}}” class=”{{curNav == index? `active` : “}}” bindtop=”leftclick” data-index=”{{index}}”>{{item}}</view>
</scroll-view>
<scroll-view class=”right” scroll-y>
<image style=”height: 25%;” src=”/pages/images/4.jpg“></image>
<view wx:for=”{{navitems}}”>{{item}}</view>
</scroll-view>
</view>
格式文件index.wxss
.left-navbar view{
height: 80rpx;
line-height: 80rpx;
text-align: center;
}
.active{
background-color: #fff;
color: red;
font-size: 17px;
}
.right {
position: absolute;
right: 0;
width: 75%;
height: 100%;
background-color: rgb(241, 203, 209);
font-size: 15px;
}
方法文件index.js
Page({
data: {
navitems: [`手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, `手表`, ]
},
curNav:0,
leftclick:function(e){
var index = e.target.dataset.index
console.log(index)
this.setData({
curNav:index
})
},
注:以上是微信小程序开发者:”a松涛”对于本问题的一些阐述,这里做一个引用,我们将实时关注微信小程序助手对该问题提出的解决方案。
【2小时前】微信小程序技术运营专员对用户a松涛提出的以前学的,忘了,跪求解答,首页选项怎么做?给予如下回复
先学一下怎么添加代码
微信官方智能微信小程序将提供超过60个AI接口和超过20个NA化组件给开发人员,包括语音、文字、图像和人脸识别等。进入智能化时期,微信官方不是空喊口号,已经在大步实施。
如果您也在使用微信小程序,请关注我们,如果您有关于微信小程序的使用问题请关注我们,如果您要找百度小程序模板、微信小程序模板请关注小程序模板网或者去微信开放社区找官方人员给予解决,相信微信官方在小程序上的发力会是一个里程碑!