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

请教一下better-scroll在vue中刷新的时机 #16

Closed
Pasoul opened this issue Jun 11, 2017 · 1 comment
Closed

请教一下better-scroll在vue中刷新的时机 #16

Pasoul opened this issue Jun 11, 2017 · 1 comment

Comments

@Pasoul
Copy link

Pasoul commented Jun 11, 2017

代码:

<scroll class="wrapper"  :data="dataObj"  ref="scroll"></scroll>
this.$http.get(url, {})
      .then((res) => {
		this.html = res.data;
		this.$nextTick(() => {
		       this.$refs.scroll.scrollTo(0,0);
		       this.$refs.scroll.refresh();
		})
	})

参考了你的文章,这里仅仅是一个获取数据,确认渲染之后refresh的动作,为什么有时候可以拖动,有时候无法拖动,在scroll组件设置refreshDelay为2s又可以滚动了,是我刷新的时机不对吗

@ustbhuangyi
Copy link
Member

不要新开 issue,可以在这篇文章下评论 #15

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

No branches or pull requests

2 participants