当前位置:网站首页>In wechat applet, after jumping from one page to another, I found that the page scrolled synchronously after returning
In wechat applet, after jumping from one page to another, I found that the page scrolled synchronously after returning
2022-07-05 10:19:00 【huxiaoxiao.】
Problem description :
There is a recent project bug, Introduced another component in one component , Suppose the names of these two components are A and B
I am here A Click at the top of the page to jump to B page , stay B Page scrolls to bottom , Select a value to return automatically A( Or click the back button at the top to return to A), It's time to find out A Also scroll to the bottom .
resolvent :
1. Not recommended , Recommend to use 2
Through the components of prestige applet scroll-view, Set fixed height , Through scroll-view Medium bindscroll Method , Get the distance from the top when scrolling , And save the assignment . Call wx.pageScrollTo, Among them scrollTop It's the value you recorded , That's it
2.
Similar to the first method , But it's simpler , It's also the use of scroll-view, Take you whole A Of Scrollable area Wrap it up , Note that Scrollable area , The problem is solved when the height is fixed
One more word here , Generally, the normal return key is provided by the applet , Normal return will not have this problem , For reference only !
边栏推荐
- Matrix processing practice
- Cut off 20% of Imagenet data volume, and the performance of the model will not decline! Meta Stanford et al. Proposed a new method, using knowledge distillation to slim down the data set
- @JsonAdapter注解使用
- Using directive in angualr2 to realize that the picture size changes with the window size
- Unity粒子特效系列-毒液喷射预制体做好了,unitypackage包直接用 -下
- @Jsonadapter annotation usage
- Events and bubbles in the applet of "wechat applet - Basics"
- 历史上的今天:第一本电子书问世;磁条卡的发明者出生;掌上电脑先驱诞生...
- Activity jump encapsulation
- 程序员搞开源,读什么书最合适?
猜你喜欢
随机推荐
天龙八部TLBB系列 - 关于包裹掉落的物品
《剑来》语句摘录(七)
CSDN always jumps to other positions when editing articles_ CSDN sends articles without moving the mouse
Write double click event
> Could not create task ‘:app:MyTest.main()‘. > SourceSet with name ‘main‘ not found.问题修复
C语言实现QQ聊天室小项目 [完整源码]
Activity enter exit animation
ConstraintLayout官方提供圆角ImageFilterView
mongoDB副本集
Cerebral cortex: directed brain connection recognition widespread functional network abnormalities in Parkinson's disease
Singleton mode encapsulates activity management class
MySQL数字类型学习笔记
Energy momentum: how to achieve carbon neutralization in the power industry?
【黑马早报】罗永浩回应调侃东方甄选;董卿丈夫密春雷被执行超7亿;吉利正式收购魅族;华为发布问界M7;豆瓣为周杰伦专辑提前开分道歉...
Swift uses userdefaults and codable to save an array of class objects or structure instances
Z-blog template installation and use tutorial
@Jsonadapter annotation usage
Cut off 20% of Imagenet data volume, and the performance of the model will not decline! Meta Stanford et al. Proposed a new method, using knowledge distillation to slim down the data set
Comparison of batch merge between Oracle and MySQL
B站大量虚拟主播被集体强制退款:收入蒸发,还倒欠B站;乔布斯被追授美国总统自由勋章;Grafana 9 发布|极客头条...