Small procedure to achieve anchor sliding effect

If you want to achieve anchor in the applet, you need to use, scroll-into-view, Scroll-Into-View, Details


     {{item.title}}       {{item.cont}}     WXSS:   
. Scroll-Box {DISPLAY : flex; flex-wrap: Nowrap;}. Menu-tab {width: 180rpx; Text-align: center; height: 100%; color: # 666; border-right: 1rpx solid # 999} .Item-tab {font -Size: 28Rpx; Padding: 8rpx;}. cont-box {border-top: 1px solid; box-zining: border-box;}. ​​Item-act {background: linear-gradient (to bottom Right, # 6c53b1, # 8b2edf); color: #fff; border-radius: 100px;}

   var APP = GetApp (); Page ({data: {current: 0, // left menu TabList: [{Title: 'Tab1', Checked: True}, {Title: 'Tab2', Checked: false}, {title: 'Tab3', check: false}, {title: 'Tab4', Checked: false}, {Title: 'Tab5', Checked: false}, {title: 'Tab6', Checked: false},] // Right Content Contlist: [{Cont: 'Tab1'}, {Cont: 'Tab2'}, {Cont: 'Tab3'}, {Cont: 'Tab5'}, {Cont: 'Tab6'},},}, // Loop Switch FORTAB (INDEX) {let lens = .length; let _id = 't' + index; for (let i = 0; i {// pull up the screen this.SetData ({Current: progress}); this.fortab;} else if (progress == {Return false;} else {// pull down the screen this.SetData ({Current: progress == 0? 0: Progress – }); this.fortab (progress);}}, online: function (options) {Console.log (THIs.Data.tablist) // Frame size Set wx.getsysteminfo ({Success: (options) => {var wd = options.screenwidth; // page width var ht = options.windowheight; // page height this.SetData {WD: WD, HT: HT}}});}, onshow: function () {// Initialization Status this.SetData ({TOVIEW: ‘T’ + THIS.DATA.CURRENT, TOVIEWRT: ‘T’ + THIS .data.current}}}},})
The above is all the contents of this article, I hope that everyone’s learning is helpful, I hope that everyone will support TUMI clouds.

© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment