MCPcopy
hub / github.com/coderwhy/LearnMiniProgram / handleTabClick

Function handleTabClick

pages/home/home.js:78–86  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

76
77 // ------------------- 事件监听函数 -------------------------
78 handleTabClick(event) {
79 // 取出index
80 const index = event.detail.index;
81
82 // 设置currentType
83 this.setData({
84 currentType: types[index]
85 })
86 },
87 handleImageLoad() {
88 wx.createSelectorQuery().select('#tab-control').boundingClientRect(rect => {
89 this.data.tabScrollTop = rect.top

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected