This commit is contained in:
syuilo
2019-02-20 22:21:12 +09:00
parent 893795a31d
commit ed0fdaddbd
3 changed files with 29 additions and 11 deletions

View File

@@ -61,7 +61,24 @@ export default Vue.extend({
return {
withFiles: false,
images: [],
makePromise: cursor => this.$root.api('users/notes', {
makePromise: null
};
},
watch: {
user() {
this.genPromiseMaker();
}
},
created() {
this.fetch();
this.genPromiseMaker();
},
methods: {
genPromiseMaker() {
this.makePromise = cursor => this.$root.api('users/notes', {
userId: this.user.id,
limit: fetchLimit + 1,
untilId: cursor ? cursor : undefined,
@@ -82,15 +99,9 @@ export default Vue.extend({
cursor: null
};
}
})
};
},
});
},
created() {
this.fetch();
},
methods: {
fetch() {
const image = [
'image/jpeg',