diff options
author | korelstar <korelstar@users.noreply.github.com> | 2022-08-02 11:07:47 +0300 |
---|---|---|
committer | korelstar <korelstar@users.noreply.github.com> | 2022-08-02 11:11:06 +0300 |
commit | eccdd93b5f11b032a899f827e21b05af93036087 (patch) | |
tree | 8635a295b8aa8e43e626d401d2c279f67309b5f1 | |
parent | 46094eabbcb4c0b8af536412dea614e21d1a77f6 (diff) |
use named export Vue.set in order to fix lint
-rw-r--r-- | src/store/notes.js | 12 | ||||
-rw-r--r-- | src/store/sync.js | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/store/notes.js b/src/store/notes.js index ab937864..2f9d7da2 100644 --- a/src/store/notes.js +++ b/src/store/notes.js @@ -1,4 +1,4 @@ -import Vue from 'vue' +import Vue, { set } from 'vue' import { copyNote } from '../Util.js' const state = { @@ -81,20 +81,20 @@ const mutations = { if (updated.content !== undefined && updated.etag !== undefined) { note.content = updated.content note.etag = updated.etag - Vue.set(note, 'unsaved', updated.unsaved) - Vue.set(note, 'error', updated.error) - Vue.set(note, 'errorType', updated.errorType) + set(note, 'unsaved', updated.unsaved) + set(note, 'error', updated.error) + set(note, 'errorType', updated.errorType) } } else { state.notes.push(updated) - Vue.set(state.notesIds, updated.id, updated) + set(state.notesIds, updated.id, updated) } }, setNoteAttribute(state, params) { const note = state.notesIds[params.noteId] if (note) { - Vue.set(note, params.attribute, params.value) + set(note, params.attribute, params.value) } }, diff --git a/src/store/sync.js b/src/store/sync.js index 24e5dbb8..9f87f295 100644 --- a/src/store/sync.js +++ b/src/store/sync.js @@ -1,4 +1,4 @@ -import Vue from 'vue' +import { set } from 'vue' const state = { queue: {}, @@ -15,7 +15,7 @@ const mutations = { addToQueue(state, { noteId, type }) { const cmd = { noteId, type } const key = noteId + '-' + type - Vue.set(state.queue, key, cmd) + set(state.queue, key, cmd) }, clearQueue(state) { |