This commit is contained in:
2019-12-28 14:27:57 +08:00
parent 4140d8e8d6
commit 3f513f121a
5 changed files with 23 additions and 12 deletions

View File

@@ -5,14 +5,16 @@ Page({
* 页面的初始数据
*/
data: {
index:0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
index: options.index == undefined ? 0:options.index
})
},
/**

View File

@@ -1,3 +1,3 @@
<view class="box">
<tab style="width:100%"></tab>
<tab style="width:100%" index="{{index}}"></tab>
</view>