gitlab-org--gitlab-foss/app/assets/javascripts/notes/mixins/autosave.js

15 lines
336 B
JavaScript

import Autosave from '../../autosave';
export default {
methods: {
initAutoSave() {
this.autosave = new Autosave($(this.$refs.noteForm.$refs.textarea), ['Note', 'Issue', this.note.id], 'issue');
},
resetAutoSave() {
this.autosave.reset();
},
setAutoSave() {
this.autosave.save();
},
},
};