mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Save memo automatically (#5351)
* Save memo automatically * Use clearTimeout * Clean up * Clean up
This commit is contained in:
parent
c744dbe05d
commit
70b0a395dc
1 changed files with 4 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue