2024-05-28 10:27:58 +08:00

49 lines
1.2 KiB
TypeScript

// e:\project\dy_video_all\dy_iaa_new_project\components\commTabs\commTabs.ts
Component({
data: {
list: [{
"pagePath": "/pages/home/home",
"iconPath": "/static/tab2/home.png",
"selectedIconPath": "/static/tab2/home_selected.png",
"text": "首页"
},
{
"pagePath": "/pages/recommend/recommend",
"iconPath": "/static/tab2/recommend.png",
"selectedIconPath": "/static/tab2/recommend_selected.png",
"text": "推荐"
},
{
"pagePath": "/pages/theater/theater",
"iconPath": "/static/tab2/theater.png",
"selectedIconPath": "/static/tab2/theater_selected.png",
"text": "剧场"
},
{
"pagePath": "/pages/my/my",
"iconPath": "/static/tab2/my.png",
"selectedIconPath": "/static/tab2/my_selected.png",
"text": "我的"
}
],
statusBarHeight: getApp().globalData.statusBarHeight
},
properties: {
selectedIndex: {
type: Number,
value: 0
}
},
methods: {
toPathTabs(ev: any) {
const item = ev.currentTarget.dataset.item;
console.log(item, "itemitem")
tt.switchTab({
url: item.pagePath,
fail: (faa) => {
console.log(faa, "faafaafaa")
}
});
}
}
})