vue-waterfall-easy
vue-waterfall-easy copied to clipboard
界面返回时控件回到顶部
A界面跳转到B界面后,再B界面返回时,怎么让瀑布流不回到初始状态
例如:我已经滑动到第10个数据了,点了明细,再返回就回到第1个数据了
你解决了吗?我也是
解决了的
---原始邮件--- 发件人: "1131446340aa"<[email protected]> 发送时间: 2020年5月29日(周五) 晚上9:20 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "wzhsh90"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
能说一下怎么解决的吗?
---原始邮件--- 发件人: "wzhsh90"<[email protected]> 发送时间: 2020年5月29日(周五) 晚上11:00 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "1131446340aa"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
解决了的
---原始邮件--- 发件人: "1131446340aa"<[email protected]> 发送时间: 2020年5月29日(周五) 晚上9:20 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "wzhsh90"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
activated() { if (this.scroll > 0) { this.getEasyScroll().scrollTo(0, this.scroll); this.scroll = 0; } //重新做一次排列 if (this.players.length >= 1) { let orgCom = this.$refs["waterfall"]; if (orgCom != null) { orgCom.beginIndex = 0; orgCom.waterfall(); } } },mounted() { this.getEasyScroll().addEventListener('scroll', this.handleScroll);
},handleScroll() { this.scroll = this.getEasyScroll().scrollTop; }getEasyScroll() { let item = document.querySelector('.vue-waterfall-easy-scroll'); return item == null ? window : item; } 处理逻辑:自己记录历史滚动位置,然后再调用一次waterfall方法,我也处理这个问题处理了很久。
------------------ 原始邮件 ------------------ 发件人: "notifications"<[email protected]>; 发送时间: 2020年5月29日(星期五) 晚上11:38 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "@"小万"^^$"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
能说一下怎么解决的吗?
---原始邮件--- 发件人: "wzhsh90"<[email protected]> 发送时间: 2020年5月29日(周五) 晚上11:00 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "1131446340aa"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
解决了的
---原始邮件---
发件人: "1131446340aa"<[email protected]&gt;
发送时间: 2020年5月29日(周五) 晚上9:20
收件人: "lfyfly/vue-waterfall-easy"<[email protected]&gt;;
抄送: "wzhsh90"<[email protected]&gt;;"Author"<[email protected]&gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
谢谢啊。我第一反应也是监听原位置,但是我试了监听scroll事件不会触发。原来是要调用this.getEasyScroll()啊
---原始邮件--- 发件人: "wzhsh90"<[email protected]> 发送时间: 2020年5月31日(周日) 晚上7:09 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "1131446340aa"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
activated() { if (this.scroll > 0) { this.getEasyScroll().scrollTo(0, this.scroll); this.scroll = 0; } //重新做一次排列 if (this.players.length >= 1) { let orgCom = this.$refs["waterfall"]; if (orgCom != null) { orgCom.beginIndex = 0; orgCom.waterfall(); } } },mounted() { this.getEasyScroll().addEventListener('scroll', this.handleScroll);
},handleScroll() { this.scroll = this.getEasyScroll().scrollTop; }getEasyScroll() { let item = document.querySelector('.vue-waterfall-easy-scroll'); return item == null ? window : item; } 处理逻辑:自己记录历史滚动位置,然后再调用一次waterfall方法,我也处理这个问题处理了很久。
------------------ 原始邮件 ------------------ 发件人: "notifications"<[email protected]>; 发送时间: 2020年5月29日(星期五) 晚上11:38 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "@"小万"^^$"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
能说一下怎么解决的吗?
---原始邮件---
发件人: &quot;wzhsh90&quot;<[email protected]&gt;
发送时间: 2020年5月29日(周五) 晚上11:00
收件人: &quot;lfyfly/vue-waterfall-easy&quot;<[email protected]&gt;;
抄送: &quot;1131446340aa&quot;<[email protected]&gt;;&quot;Comment&quot;<[email protected]&gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
解决了的
---原始邮件---
发件人: &quot;1131446340aa&quot;<[email protected]&amp;gt;
发送时间: 2020年5月29日(周五) 晚上9:20
收件人: &quot;lfyfly/vue-waterfall-easy&quot;<[email protected]&amp;gt;;
抄送: &quot;wzhsh90&quot;<[email protected]&amp;gt;;&quot;Author&quot;<[email protected]&amp;gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
&mdash;
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
我也解决了,谢谢啦。开始监听window事件不会触发,然后就监听你给的dom元素就行
---原始邮件--- 发件人: "wzhsh90"<[email protected]> 发送时间: 2020年5月31日(周日) 晚上7:09 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "1131446340aa"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
activated() { if (this.scroll > 0) { this.getEasyScroll().scrollTo(0, this.scroll); this.scroll = 0; } //重新做一次排列 if (this.players.length >= 1) { let orgCom = this.$refs["waterfall"]; if (orgCom != null) { orgCom.beginIndex = 0; orgCom.waterfall(); } } },mounted() { this.getEasyScroll().addEventListener('scroll', this.handleScroll);
},handleScroll() { this.scroll = this.getEasyScroll().scrollTop; }getEasyScroll() { let item = document.querySelector('.vue-waterfall-easy-scroll'); return item == null ? window : item; } 处理逻辑:自己记录历史滚动位置,然后再调用一次waterfall方法,我也处理这个问题处理了很久。
------------------ 原始邮件 ------------------ 发件人: "notifications"<[email protected]>; 发送时间: 2020年5月29日(星期五) 晚上11:38 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "@"小万"^^$"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
能说一下怎么解决的吗?
---原始邮件---
发件人: &quot;wzhsh90&quot;<[email protected]&gt;
发送时间: 2020年5月29日(周五) 晚上11:00
收件人: &quot;lfyfly/vue-waterfall-easy&quot;<[email protected]&gt;;
抄送: &quot;1131446340aa&quot;<[email protected]&gt;;&quot;Comment&quot;<[email protected]&gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
解决了的
---原始邮件---
发件人: &quot;1131446340aa&quot;<[email protected]&amp;gt;
发送时间: 2020年5月29日(周五) 晚上9:20
收件人: &quot;lfyfly/vue-waterfall-easy&quot;<[email protected]&amp;gt;;
抄送: &quot;wzhsh90&quot;<[email protected]&amp;gt;;&quot;Author&quot;<[email protected]&amp;gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
&mdash;
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
不用谢,这个官方解决的话更好
---原始邮件--- 发件人: "1131446340aa"<[email protected]> 发送时间: 2020年5月31日(周日) 晚上8:01 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "wzhsh90"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
我也解决了,谢谢啦。开始监听window事件不会触发,然后就监听你给的dom元素就行
---原始邮件--- 发件人: "wzhsh90"<[email protected]> 发送时间: 2020年5月31日(周日) 晚上7:09 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "1131446340aa"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
activated() {
if (this.scroll &gt; 0) {
this.getEasyScroll().scrollTo(0, this.scroll);
this.scroll = 0;
}
//重新做一次排列
if (this.players.length &gt;= 1) {
let orgCom = this.$refs["waterfall"];
if (orgCom != null) {
orgCom.beginIndex = 0;
orgCom.waterfall();
}
}
},mounted() {
this.getEasyScroll().addEventListener('scroll', this.handleScroll);
},handleScroll() {
this.scroll = this.getEasyScroll().scrollTop;
}getEasyScroll() {
let item = document.querySelector('.vue-waterfall-easy-scroll');
return item == null ? window : item;
}
处理逻辑:自己记录历史滚动位置,然后再调用一次waterfall方法,我也处理这个问题处理了很久。
------------------&nbsp;原始邮件&nbsp;------------------
发件人:&nbsp;"notifications"<[email protected]&gt;;
发送时间:&nbsp;2020年5月29日(星期五) 晚上11:38
收件人:&nbsp;"lfyfly/vue-waterfall-easy"<[email protected]&gt;;
抄送:&nbsp;"@"小万"^^$"<[email protected]&gt;;"Author"<[email protected]&gt;;
主题:&nbsp;Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
能说一下怎么解决的吗?
---原始邮件---
发件人: &amp;quot;wzhsh90&amp;quot;<[email protected]&amp;gt;
发送时间: 2020年5月29日(周五) 晚上11:00
收件人: &amp;quot;lfyfly/vue-waterfall-easy&amp;quot;<[email protected]&amp;gt;;
抄送: &amp;quot;1131446340aa&amp;quot;<[email protected]&amp;gt;;&amp;quot;Comment&amp;quot;<[email protected]&amp;gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
解决了的
---原始邮件---
发件人: &amp;amp;quot;1131446340aa&amp;amp;quot;<[email protected]&amp;amp;amp;gt;
发送时间: 2020年5月29日(周五) 晚上9:20
收件人: &amp;amp;quot;lfyfly/vue-waterfall-easy&amp;amp;quot;<[email protected]&amp;amp;amp;gt;;
抄送: &amp;amp;quot;wzhsh90&amp;amp;quot;<[email protected]&amp;amp;amp;gt;;&amp;amp;quot;Author&amp;amp;quot;<[email protected]&amp;amp;amp;gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
&amp;mdash;
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
不用谢,这个官方解决的话更好
---原始邮件--- 发件人: "1131446340aa"<[email protected]> 发送时间: 2020年5月31日(周日) 晚上8:01 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "wzhsh90"<[email protected]>;"Author"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
我也解决了,谢谢啦。开始监听window事件不会触发,然后就监听你给的dom元素就行
---原始邮件--- 发件人: "wzhsh90"<[email protected]> 发送时间: 2020年5月31日(周日) 晚上7:09 收件人: "lfyfly/vue-waterfall-easy"<[email protected]>; 抄送: "1131446340aa"<[email protected]>;"Comment"<[email protected]>; 主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
activated() {
if (this.scroll &gt; 0) {
this.getEasyScroll().scrollTo(0, this.scroll);
this.scroll = 0;
}
//重新做一次排列
if (this.players.length &gt;= 1) {
let orgCom = this.$refs["waterfall"];
if (orgCom != null) {
orgCom.beginIndex = 0;
orgCom.waterfall();
}
}
},mounted() {
this.getEasyScroll().addEventListener('scroll', this.handleScroll);
},handleScroll() {
this.scroll = this.getEasyScroll().scrollTop;
}getEasyScroll() {
let item = document.querySelector('.vue-waterfall-easy-scroll');
return item == null ? window : item;
}
处理逻辑:自己记录历史滚动位置,然后再调用一次waterfall方法,我也处理这个问题处理了很久。
------------------&nbsp;原始邮件&nbsp;------------------
发件人:&nbsp;"notifications"<[email protected]&gt;;
发送时间:&nbsp;2020年5月29日(星期五) 晚上11:38
收件人:&nbsp;"lfyfly/vue-waterfall-easy"<[email protected]&gt;;
抄送:&nbsp;"@"小万"^^$"<[email protected]&gt;;"Author"<[email protected]&gt;;
主题:&nbsp;Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
能说一下怎么解决的吗?
---原始邮件---
发件人: &amp;quot;wzhsh90&amp;quot;<[email protected]&amp;gt;
发送时间: 2020年5月29日(周五) 晚上11:00
收件人: &amp;quot;lfyfly/vue-waterfall-easy&amp;quot;<[email protected]&amp;gt;;
抄送: &amp;quot;1131446340aa&amp;quot;<[email protected]&amp;gt;;&amp;quot;Comment&amp;quot;<[email protected]&amp;gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
解决了的
---原始邮件---
发件人: &amp;amp;quot;1131446340aa&amp;amp;quot;<[email protected]&amp;amp;amp;gt;
发送时间: 2020年5月29日(周五) 晚上9:20
收件人: &amp;amp;quot;lfyfly/vue-waterfall-easy&amp;amp;quot;<[email protected]&amp;amp;amp;gt;;
抄送: &amp;amp;quot;wzhsh90&amp;amp;quot;<[email protected]&amp;amp;amp;gt;;&amp;amp;quot;Author&amp;amp;quot;<[email protected]&amp;amp;amp;gt;;
主题: Re: [lfyfly/vue-waterfall-easy] 界面返回时控件回到顶部 (#83)
你解决了吗?我也是
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
&amp;mdash;
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.