Merge pull request #9 from tamaina/pop

Pop
This commit is contained in:
tamaina 2018-04-15 23:51:23 +09:00 committed by GitHub
commit 8f518eba09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -113,8 +113,7 @@ export default Vue.extend({
const current = window.scrollY + window.innerHeight;
if (current > document.body.offsetHeight - 8) this.more();
}
if (window.scrollY > 100) this.isTop = false;
else this.isTop = true;
this.isTop = window.scrollY < 100;
},
onKeydown(e) {
if (e.target.tagName != 'INPUT' && e.target.tagName != 'TEXTAREA') {

View File

@ -98,8 +98,7 @@ export default Vue.extend({
});
},
onNote(note) {
if (this.isTop) this.notes.pop();
this.notes.unshift(note);
this.isTop = window.scrollY < 100;
},
onChangeFollowing() {
this.fetch();