Save memo automatically (#5351)

* Save memo automatically

* Use clearTimeout

* Clean up

* Clean up
This commit is contained in:
Aya Morisawa 2019-08-28 02:26:19 +09:00 committed by syuilo
parent 9d65768d4d
commit 85721065fd

View File

@ -25,7 +25,8 @@ export default define({
data() {
return {
text: null,
changed: false
changed: false,
timeoutId: null
};
},
@ -45,6 +46,8 @@ export default define({
onChange() {
this.changed = true;
clearTimeout(this.timeoutId);
this.timeoutId = setTimeout(this.saveMemo, 1000);
},
saveMemo() {