Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.5.4 去掉导航,下拉刷新失效 #130

Closed
tmeme opened this issue Dec 3, 2015 · 6 comments · Fixed by #208
Closed

0.5.4 去掉导航,下拉刷新失效 #130

tmeme opened this issue Dec 3, 2015 · 6 comments · Fixed by #208
Assignees

Comments

@tmeme
Copy link

tmeme commented Dec 3, 2015

导航去掉后,下拉刷新失效
image
给pull-to-refresh-content加上margin-top 至看到箭头,下拉刷新又好了
image

@tmeme
Copy link
Author

tmeme commented Dec 3, 2015

出现在chrome F12模拟器中。在手机上目前没有发现问题。

@tmeme
Copy link
Author

tmeme commented Dec 3, 2015

image
image
在上图结构中,随着工具栏每次切换到绑定了下拉刷新的页面,当前的页面的refresh事件 绑定+1 。

@tmeme tmeme changed the title 去掉导航,下拉刷新失效 0.5.4 去掉导航,下拉刷新失效 Dec 3, 2015
@Mickey-
Copy link
Contributor

Mickey- commented Dec 8, 2015

http://m.sui.taobao.org/demos/pull-to-refresh/ 这个Demo能解决你的疑问吗,我断点看事件句柄并没有执行多次

@tmeme
Copy link
Author

tmeme commented Dec 9, 2015

并不能,http://121.43.150.219:81/repo/tangli/sui/home.html 这个是我的demo。它出现了3个bug:
1.去掉导航,chrome模拟器中iphone4下拉刷新失效,手机端暂时没发现问题
2.每次切换到绑定了下拉刷新的页面,当前的页面的refresh事件 绑定+1。模拟器和手机都这样。
3.工具栏的选中样式active并不能随着工具栏切换更改,页面刷新时也不能根据hash值选中子栏。需自己额外处理。
事实上,我也没有发现绑定事件执行了多次,但一次下拉刷新触发的事件是随着切换到此页面的次数增加的

@Mickey-
Copy link
Contributor

Mickey- commented Dec 10, 2015

  1. 手机上无问题忽略。2. 我们正在看,后面回复

关于第三点这里说下, 工具栏本身只是UI,并没有脚本逻辑。另外我们在工具栏http://m.sui.taobao.org/components/#toolbar 设计的初衷是:不同工具栏的icon链接通常代表形态完全不同的业务模块、范畴, 不要做成一个SPA应用

就是说,假如你工具栏有3个入口,那么这3个工具icon对应的链接最好是.external的。也就是刷新页面进入新url的形式,而不是以路由单页的形式滑页进入。可以说这3个icon对应了3个SPA链路的入口。

@xiaran113
Copy link
Contributor

1.去掉导航,chrome模拟器中iphone4下拉刷新失效,手机端暂时没发现问题
这是js滚动模式下的一个bug,下个版本会修复
2.每次切换到绑定了下拉刷新的页面,当前的页面的refresh事件 绑定+1。模拟器和手机都这样。
重复触发refresh,优化,下个版本会有。你可以自己设置一个标志位控制setTimeout不会被同时触发两次,或者等下个版本
3.工具栏的选中样式active并不能随着工具栏切换更改,页面刷新时也不能根据hash值选中子栏。需自己额外处理。
这个看上面mickey的回复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants