From 1e5283db84a2a22c0d044fb818127000134101f7 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sun, 28 Apr 2019 22:17:57 +0800 Subject: [PATCH] Support post autosave. --- src/api/option.js | 10 +++++ src/components/Tools/UserMenu.vue | 54 +++++++++++++++++----- src/views/post/PostEdit.vue | 74 +++++++++++++++++++++++-------- src/views/sheet/SheetEdit.vue | 41 ++++++++++++----- 4 files changed, 141 insertions(+), 38 deletions(-) diff --git a/src/api/option.js b/src/api/option.js index 4bdca458..5c97dc55 100644 --- a/src/api/option.js +++ b/src/api/option.js @@ -11,6 +11,16 @@ optionApi.listAll = () => { }) } +optionApi.listByKeys = keys => { + return service({ + url: `/api/admin/options/map_keys`, + method: 'get', + params: { + keys: keys + } + }) +} + optionApi.save = options => { return service({ url: `${baseUrl}/saving`, diff --git a/src/components/Tools/UserMenu.vue b/src/components/Tools/UserMenu.vue index 35f9e2bb..6429e343 100644 --- a/src/components/Tools/UserMenu.vue +++ b/src/components/Tools/UserMenu.vue @@ -1,31 +1,47 @@